Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: Lloyd777 on December 13, 2013, 04:47:09 PM

Title: Use the android buttons on a debian image ?
Post by: Lloyd777 on December 13, 2013, 04:47:09 PM
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
Title: Re: Use the android buttons on a debian image ?
Post by: misterzu on December 16, 2013, 11:53:26 AM
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 (http://stackoverflow.com/questions/16695432/input-event-structure-description-from-linux-input-h)
Title: Re: Use the android buttons on a debian image ?
Post by: Lloyd777 on December 17, 2013, 10:11:52 AM
Thank you very much, I will check the events, once I have the card.