RidgeRun - Embedded Solutions

index

Tag Cloud

Linux application using GPIO interrupt input

Using the GPIO sub-system in Linux, you can write a Linux application that blocks execution until an interrupt occurs on the GPIO signal being monitored. This is done by configure the GPIO signal edge you want to monitor, then using poll() to wait for that edge to be detected. I used this approach to create a simple user space driver for interacting with an external PIC. When the PIC detects a change, it asserts the GPIO signal, causing the application to be unblocked. The application reads all the PIC's registers using I2C, processes the changes that occurred, and again calls poll() to wait for the next interrupt from the PIC. You can read the details, with sample source code, on how a Linux application can monitor a GPIO interrupt input on the RidgeRun Developer Wiki at https://www.ridgerun.com/developer/wiki/index.php/How_to_use_GPIO_signals

Contact Info

right column contact

RidgeRun, LLC
340 S. Lemon Ave
PMB #6030
Walnut, CA 91789

Phones:
USA: 1-800-798-6093
INDIA: +91-9731995485


Contact US 

Services

right column services
In addition to providing integrated and tested Linux board support packages, RidgeRun also offers an array of engineering services. 

More Info