看门狗的开启与使用方法
/dev/watchdog字符设备直接打开进行操作即可。
#define WATCHDOG_DEV "/dev/watchdog"
#define WATCHDOG_IOCTL_BASE 'W'
#define WDIOC_KEEPALIVE _IOR(WATCHDOG_IOCTL_BASE, 5, int)
int fd = -1;
fd = open(WATCHDOG_DEV, O_RDWR, 0);
/* Feed */
ioctl(fd, WDIOC_KEEPALIVE);
/* Disable */
char ch = 'V';
write(fd, &ch, 1);