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.

How to capture event when two GPIO buttons pressed simultaneously



Hello All,

I am using beagle bone black with ti-kernel-3.12 running on it. we are working on the GPIO keys, if you press the key you should get the event and this is working properly, but we have a case where we need to capture an event when two buttons pressed at the same time.

We have a different functions for the individual buttons pressing. Lets say BUTTON1 and BUTTON2  are there, if BUTTON1 presses blink LED1 and similarly if BUTTON2 presses blink led2 and also if both the buttons(BUTTON1 and BUTTON2 ) presses at the same time for more than 2 seconds my system should shutdown. First two cases I am able to make it work but for the third case how can I capture event when two buttons pressed at the similar time or how could I know that two buttons pressed now.

Thanks a lot,