range Pi 用户手册 深圳市迅龙软件有限公司版权所有
www.orangepi.cn 65 www.xunlong.tv
Testing events. Please, press CTRL-C to abort.
1602840581.225093: event type EV_MSC(0x04): scancode = 0x45c
1602840581.225105: event type EV_SYN(0x00).
1602840581.663187: event type EV_MSC(0x04): scancode = 0x45c
1602840581.663197: event type EV_SYN(0x00).
3.20.
Hardware watchdog test
1) Download the code of wiringOP
root@orangepi:~# apt update
root@orangepi:~# apt install git
root@orangepi:~# git clone https://github.com/orangepi-xunlong/wiringOP
2) Compile wiringOP
root@orangepi:~# cd wiringOP
root@orangepi:~/wiringOP# ./build clean
root@orangepi:~/wiringOP# ./build
3) Compile the watchdog test program
root@orangepi:~/wiringOP# cd examples/
root@orangepi:~/wiringOP/examples# make watchdog
[CC] watchdog.c
[link]
4) Run the watchdog test program
a. The second parameter 10 represents the counting time of the watchdog. If the dog
is not fed within this time, the system will restart
b. We can feed the dog by pressing any key on the keyboard (except ESC). After
feeding the dog, the program will print a line of keep alive to indicate the success of
feeding the dog
root@orangepi:~/wiringOP/examples# ./watchdog 10
open success
options is 33152,identity is sunxi-wdt
put_usr return,if 0,success:0
The old reset time is: 16