TS-8950-49xx Buttons

From Technologic Systems Manuals
Revision as of 15:48, 9 July 2015 by Mark (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The TS-TPC-8950 includes two buttons that can be read by user applications. These are run in parallel with pins on the #DIO Header. In android, these are connected as the "Home" and "Back" buttons. In Linux these are accessed with the gpio sysfs subsystem:


## Back button
echo 138 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio138/direction
cat /sys/class/gpio/gpio138/value
# 0 is pressed

## Home button
echo 112 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio112/direction
cat /sys/class/gpio/gpio112/value
# 0 is pressed