A20-OLinuXino-LIME2 external interrupt

Started by Alex, January 04, 2016, 08:11:22 am

Previous topic - Next topic


January 04, 2016, 08:11:22 am Last Edit: January 04, 2016, 12:38:43 pm by Alex
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



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.