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

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

问题描述

我必须将我的 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.

例如,我为 GSM 模块分配了一个用于电源键的 GPIO.我需要通过应用程序更改引脚方式(高或低).

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 机制.使用这些机制通常是最简单的.Documentation/gpio.txt 中的概述.这是常见的新手话题,有很多不错的教程,比如 gpio_sysfs.如果您被挂起,您可以发表评论并提供更多信息,例如您使用的 SBC 和内核版本(例如 LogicPD Zoom 和 2.6.33),以及您将首先尝试的 GPIO 引脚.

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.

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

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