Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: Alex on January 04, 2016, 08:11:22 AM

Title: A20-OLinuXino-LIME2 external interrupt
Post by: Alex on January 04, 2016, 08:11:22 AM
Hi All,

How can one register interrupt routine to be called for external interrupt pin on A20-OLinuXino-LIME2?

OS: Linux Debian 8.1
Image: a20-lime2_debian_3.4.103_Jessie_2G_release_3.img
Kernel: Linux 3.4.103-00033-g9a1cd03-dirty

Thanks,
Alex
Title: Re: A20-OLinuXino-LIME2 external interrupt
Post by: MBR on January 24, 2016, 09:48:05 PM
In Linux, the interrupts may be served only in the kernel mode, so you will have to write a kernel module to do it. But if you want just to know when an event happend without all the polling and the pin is a GPIO with trigger file inside its directory, you can use the select() function/syscall to wait for an interrupt in the userspace.