📄 watchdog.c
字号:
#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include "log.h"int openwatchdog(char * watchDogDev,char* pMod){ int fd; if((fd=open(watchDogDev,O_RDWR|O_NONBLOCK))<=0) { return -1; } return fd;}void *feeddogthread(int *pfd){ int fd=*pfd; // ioctl(fd, WDIOC_SETTIMEOUT, &timeout); writelog("feeddogthread is running\n"); /* while(programControlConfWord->systemReboot!=1) { write(fd, "\0", 1); fsync(fd); sleep(3); }*/}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -