Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.


  Search this Thread
Old 02-11-2011, 03:20 AM   #1
LQ Newbie
Registered: Feb 2011
Posts: 4

Rep: Reputation: 0
AT91 gpio device driver access

Hi embedded developer community,

i got an AT91SAM9RL-EK with a 2.6.30 Linux buildroot running.
The device-drivers (i guess the sources are /arch/arm/mach-at91/leds.c and
drivers/input/keyboard/gpio_keys.c) for the boards LEDs and
Keys(Interrupts)are installed with the Kernel.

I want to write now a C programm to access the LEDS (later to read the
keys) while i am in user-space.

the leds can be found in /sys/class/leds
the keys are located in /dev/input/event0

So far iŽve heard about two options:
1. using open , read , mmap but i could maybe use some help on there.
2. using the device drivers API i really could need help here.

Has anyone some sample code for a similar board or can help me to access
the keys and leds?

Old 02-14-2011, 02:08 AM   #2
LQ Newbie
Registered: Feb 2011
Posts: 4

Original Poster
Rep: Reputation: 0
Ok got it working with the open, and write functions.
Old 11-01-2013, 04:56 AM   #3
LQ Newbie
Registered: Nov 2013
Posts: 2

Rep: Reputation: Disabled

Could u share the working code please .

Thanks and regards


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ppc4xx gpio driver not loading using arch_initcall max21226 Linux - Kernel 3 08-31-2010 11:04 AM
GPIO driver for MPC837xerdb ramukaka Linux - Kernel 1 08-15-2010 09:29 PM
Using GPIO (from kernel GPIO support) in MY application DannyGilbert Linux - Kernel 2 03-16-2009 07:52 AM
GPIO access from users pace? ra2008 Linux - Embedded & Single-board computer 13 08-05-2008 08:48 AM
GPIO driver for Intel 6300ESB I/O Controller lartip Linux - Software 0 03-13-2007 05:02 PM > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 01:44 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration