![MYiR MYD-AM335X Development Manual Download Page 47](http://html.mh-extra.com/html/myir/myd-am335x/myd-am335x_development-manual_1862478047.webp)
4.8 KeyPad
This example demonstrates how to read the keypad event information by Linux user
APIs, please refer to the source code for detail.
Hardware Preparation:
Hardware debugging environment to see chapter second.
MYD-AM335x series development board
Software Preparation:
Linux Kernel 4.1.18
hexdump command
keypad_test application
Test Steps:
Copy cross compiled
<WORKDIR>/Examples/keypad/keypad_test
to
/usr/bin
directory
of the MYD-AM335x series development board, run
keypad_test
application as
below:
$ chmod 777 /usr/bin/keypad_test
$ keypad_test -h
Usage: keypad_test [options]
Version 1.0
Options:
-d | --device name keypad device name, default: /dev/input/event0
-h | --help Print this message
View the device nodes of MYD-AM335X keypad, the following information
shows
K2
and
K3
keypads are corresponding to
/dev/input/event1
。
# ls /dev/input/
by-path/ event0 event1 mice mouse0
# cat /sys/class/input/event0/device/name
ti-tsc
# cat /sys/class/input/event1/device/name
47