Automatic GPIO signal detection to make it use as Interrupt based


Hi all,

I want to make my c code as Interrupt based, like whenever change in the value of any GPIO’s(let’s say any 3 gpio’s) i want to read the all 3 gpio’s and print those i don’t want to do polling all 3 gpio’s.

I am using Android 5.0.1 OS default one.
Is there is any GPIO API’s or libraries to achieve this.

Please let any one give me the solution,how i can achieve this.


There are certainly libraries to help but I’m afraid I have no idea which are available for Android.

However, IIRC, the kernel sysfs interface should be available for gpios and relies on nothing more than open, poll and lseek (all of which I assume are available in bionic).