处理用户空间的GPIO嵌入式Linux ARM9 [英] Handle GPIOs in User space for Embedded Linux ARM9

查看:285
本文介绍了处理用户空间的GPIO嵌入式Linux ARM9的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要我的接口GSM模块基于ARM9的AM1808。

I have to interface my GSM module with the AM1808 based on ARM9.

我已经分配的所有GPIO引脚到Da850.c以及mux.h文件。
我成功创建的uImage和我的闪存插入的图像。

I have assigned all the GPIO pins to the Da850.c as well as mux.h files. I successfully created a uImage and inserted that image in my flash.

我需要处理一些GPIO从用户应用。

I need to handle some of that GPIO from User application.

我知道,我们可以从Kerel空间处理GPIO,但我需要从用户空间来处理。

I know that we can handle the GPIO from the Kerel space but i need to handle from the user space.

至于例子中,我分配了一个GPIO为电源键GSM模块。我需要通过应用程序来改变销装置(高或低)。

As for example I have assigned a GPIO for power key to GSM module. I need to change the pin means (HIGH or LOW) through application.

我该如何处理呢?

我使用Ubuntu 10.04的开发。

I am using UBUNTU 10.04 for development.

感谢您提前。

推荐答案

大多数Linux内核具有内置的GPIO的机制。它通常是最容易使用的。在文档概述/ gpio.txt 。这是常见的新手的话题,有很多很好的教程有像 gpio_sysfs
如果你挂,你可以​​发布更多的信息注释,如其中SBC和你使用(例如LogicPD变焦和2.6.33)内核版本,以及GPIO引脚(S),你会先试。

Most Linux kernels have GPIO mechanisms built in. It's usually easiest to use those. Overview in Documentation/gpio.txt. This is common newbie topic, there are lots of nice tutorials out there like gpio_sysfs. If you get hung, you could post comment with more info such as which SBC and kernel version you're using (e.g. LogicPD Zoom and 2.6.33), and which GPIO pin(s) you will try first.

这篇关于处理用户空间的GPIO嵌入式Linux ARM9的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆