7 #ifndef LINUX_LIBV2_SOURCE_WDG_LIB_WDG_H_ 8 #define LINUX_LIBV2_SOURCE_WDG_LIB_WDG_H_ 23 #define ERROR_NOSUPPORT -1 25 #define WATCHDOG_IOCTL_BASE 'W' 26 #define WDIOC_GETSUPPORT _IOR(WATCHDOG_IOCTL_BASE, 0, struct watchdog_info) 27 #define WDIOC_SETTIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 6, int) 28 #define WDIOC_GETTIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 7, int) 29 #define WDIOS_DISABLECARD 0x0001 30 #define WDIOS_ENABLECARD 0x0002 31 #define WDIOC_SETOPTIONS _IOR(WATCHDOG_IOCTL_BASE, 4, int) 32 #define WDIOC_KEEPALIVE _IOR(WATCHDOG_IOCTL_BASE, 5, int) 35 #define WDG_API extern "C" WDG_API int FeedWtd(int fd)
喂狗操作
unsigned int firmware_version
该卡的固定卡版本
WDG_API int EnableWtd(int TimeOut_s)
使能看门狗设备
unsigned char identity[32]
板21的信息
WDG_API int DisableWtd(int fd)
关闭看门狗
unsigned int options
卡/驱动程序支持的选项19