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?