Re: AW: GPIO OF OMAP5912

w.b.b
2006-08-30T02:15:50Z

[-- Attachment #1: Type: text/plain, Size: 3145 bytes --]

thanks.
I get information about how to get use of the hardware in linux,but I am still confused about it.
-----------------------------------------------------------
the following steps about it:
1. apply for the resource to linux kernel
2. if you have applied ,then you can do some work about it.
3.if you have finished ,release the resouce.
-------------------------------------------------------------
i can only get the physical memory of the registers from the omap process guide.but I don't know their address in linux.
though it's a very basical question,i have to apply for help.
maybe a simple example can make me understand quickly!
thanks
w.b.b

I
----- Original Message -----
From: "Hingkwan Huen" <hkh@cypress.com>
To: "LIMITED Nguyen Duong Thanh (CR/AEM Praktikant)" <DuongThanh.Nguyen@de.bosch.com>
Cc: "w.b.b" <rememberme_2000@126.com>; <Linux-omap-open-source@linux.omap.com>
Sent: Wednesday, August 30, 2006 12:50 AM
Subject: Re: AW: GPIO OF OMAP5912

> Don't think you can access physical memory directly in user space. You
> should use /dev/mem instead.
>
> -kwan
>
> On Tue, 2006-08-29 at 16:08 +0200, LIMITED Nguyen Duong Thanh (CR/AEM
> Praktikant) wrote:
>> Hello,
>>
>> I don't know if my idea help you.
>> Maybe the problem is about the libraries in directory /lib/ on OMAP file systems. It doesn't contain the libraries, which your program need.
>>
>> Regard,
>> Thanh
>>
>> -----Ursprüngliche Nachricht-----
>> Von: linux-omap-open-source-bounces@linux.omap.com [mailto:linux-omap-open-source-bounces@linux.omap.com] Im Auftrag von w.b.b
>> Gesendet: Dienstag, 29. August 2006 08:44
>> An: Linux-omap-open-source@linux.omap.com
>> Betreff: GPIO OF OMAP5912
>>
>> hi:
>>
>> i want to do some work about OMAP5912'GPIO.but I am failed to do that.
>>
>> the following is a simple program:
>>
>> test.c
>>
>> -----------------------------------------------------
>>
>> #include <stdio.h>
>> #include <unistd.h>
>> #include <asm/io.h>
>>
>> #define GPIO3_OUT 0xfffbbc40 /* lp1 */
>>
>> int main()
>> {
>> /* Get access to the ports */
>>
>>
>> /* Set the data signals (D0-7) of the port to all low (0) */
>> outb(0xffff, GPIO3_OUT);
>>
>> /* Sleep for a while (100 ms) */
>> usleep(100000);
>> }
>> -----------------------------------------------------
>> arm-linux-gcc -g test.c -o test.out
>> ----------------------------------------------------
>> I run the binary file on the omap:./test.out
>> -----------------------------------------------------
>> but i get the result:segmentation falt!
>> ---------------------------------------------------
>> who can provide me with information? if you have done work related with gpio,would you like send me some examplefile?
>> thanks!
>> _______________________________________________
>> Linux-omap-open-source mailing list
>> Linux-omap-open-source@linux.omap.com
>> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>>
>>
>
>

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]