按键功能
GW102网关提供了两个按键,功能分别为,RST系统复位和USR用户自定义。USR用户自定义按键,用户可根据应用层软件自定义相关功能。此外如果长按USR按键后上电或复位系统,系统将从Micro SD卡启动。用户可以通过SD卡启动系统,更新Flash的程序。
按键实物图如下:
PCB丝印 | 功能说明 |
---|---|
S1 | Reset,硬件复位按钮 |
S2 | USR,用户自定义功能 |
使用evtest命令测试USR按键
root@gw102d512e4:~# evtest /dev/input/event1
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 2 (KEY_1)
Properties:
Testing ... (interrupt to exit)
Event: time 1642542046.009682, type 1 (EV_KEY), code 2 (KEY_1), value 1
Event: time 1642542046.009682, -------------- SYN_REPORT ------------
Event: time 1642542046.179647, type 1 (EV_KEY), code 2 (KEY_1), value 0
Event: time 1642542046.179647, -------------- SYN_REPORT ------------
Event: time 1642542046.479690, type 1 (EV_KEY), code 2 (KEY_1), value 1
Event: time 1642542046.479690, -------------- SYN_REPORT ------------
Event: time 1642542046.519659, type 1 (EV_KEY), code 2 (KEY_1), value 0
Event: time 1642542046.519659, -------------- SYN_REPORT ------------
value1为按下,value 0为释放。
作者:SteveChen 创建时间:2024-09-14 17:12
最后编辑:SteveChen 更新时间:2024-09-18 01:21
最后编辑:SteveChen 更新时间:2024-09-18 01:21