Dear All,
I would like to control the user LEDs and DIP switches from my application running in Linux on the ARM926 (OMAPL137).
Which header files should I include in my application? Is there any example available?
Many thanks,
Bogdan
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Dear All,
I would like to control the user LEDs and DIP switches from my application running in Linux on the ARM926 (OMAPL137).
Which header files should I include in my application? Is there any example available?
Many thanks,
Bogdan
Hi Bogdan,
Assuming that these are interfaced using GPIO, you can have a look at the GPIO example included the in PSP package in src/examples/gpio.
http://software-dl.ti.com/dsps/dsps_public_sw/psp/LinuxPSP/DaVinci_03_20/index.html
Thanks,
Sekhar
Hi Sekhar,
Thanks for the reply! The example creates a module. Is there any way to do the same thing without writing a kernel module i.e. to modify the OMAPL137 registers directly from my application?
Bogdan
Hi Bogdan,
The Linux kernel does not have a direct user space interface to GPIOs.
You should implement an LED/Switch driver providing a user space interface and utilizing the GPIO library present in the kernel.
You could probably manipulate the GPIO registers directly from userspace by using a tool like devmem2, but that would not be advised because you could end up in a race with the kernel side GPIO driver.
Thanks,
Sekhar