【接上一章节明远智睿MY-IMX6-EK200 Linux-4.1.15测试手册v2.0(1)】
2.10 GPIO-KEY测试
【测试说明】:使用 evtest 进行测试
【接口标识】:KEY3, KEY2, KEY1
【系统接口】:/dev/input/eventX
测试操作
运行 evtest 准备测试
=====> 输入指令:
evtest
=====> 输出信息:
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: WM8962 Beep Generator
/dev/input/event1: gpio-keys
Select the device event number [0-1]:
选择 gpio-keys 所对应的序号
=====> 输入指令:
1
=====> 输出信息:
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "gpio-keys"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 114 (KEY_VOLUMEDOWN)
Event code 115 (KEY_VOLUMEUP)
Event code 116 (KEY_POWER)
Properties:
Testing ... (interrupt to exit)
按动开发板上的按键
Event: time 1537921332.815219, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 1
Event: time 1537921332.815219, -------------- SYN_REPORT ------------
Event: time 1537921332.985211, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 0
Event: time 1537921332.985211, -------------- SYN_REPORT ------------
Event: time 1537921335.355204, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1
Event: time 1537921335.355204, -------------- SYN_REPORT ------------
Event: time 1537921335.535203, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0