Use the android buttons on a debian image ?

Started by Lloyd777, December 13, 2013, 04:47:09 PM

Previous topic - Next topic

Lloyd777

Hello,

I installed an debian image on a a20 board and I would like to know if it's possible to use the buttons normally used for Android (V+,V-,Home,etc...).

Refering to the official site : https://www.olimex.com/wiki/A20-OLinuXino-MICRO#Linux
pyA20 is used to control GPIO,I2C and SPI.

I check the board layout (https://www.olimex.com/wiki/A20-OLinuXino-MICRO) but the buttons android are only referenced by their functions. Do you have any ideas about how to detect an input from theses buttons on debian image ?

Regards

misterzu

#1
cat /dev/input/event1 gives reports on power button press, I think it (or event0/event2) will report also on other buttons, but currently my card is enclosed into box and I cant verify any button except power.
In order to parse this in C application - you should read from that device such structures: http://stackoverflow.com/questions/16695432/input-event-structure-description-from-linux-input-h

Lloyd777

Thank you very much, I will check the events, once I have the card.