天嵌二次封装库使用手册  V2.1.2
lib_wdg.h
浏览该文件的文档.
1 
7 #ifndef LINUX_LIBV2_SOURCE_WDG_LIB_WDG_H_
8 #define LINUX_LIBV2_SOURCE_WDG_LIB_WDG_H_
9 
10 // Copyright 2024
11 
12 
17 {
18  unsigned int options;
19  unsigned int firmware_version;
20  unsigned char identity[32];
21 };
22 #define ERROR_OK 0
23 #define ERROR_NOSUPPORT -1
24 
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)
33 
34 #ifdef __cplusplus
35 #define WDG_API extern "C"
36 #else
37 #define WDG_API
38 #endif
39 
44  WDG_API int EnableWtd(int TimeOut_s);
45 
51  WDG_API int FeedWtd(int fd);
52 
58  WDG_API int DisableWtd(int fd);
59 
60 #endif
WDG_API int FeedWtd(int fd)
喂狗操作
unsigned int firmware_version
该卡的固定卡版本
Definition: lib_wdg.h:19
WDG_API int EnableWtd(int TimeOut_s)
使能看门狗设备
unsigned char identity[32]
板21的信息
Definition: lib_wdg.h:20
看门狗信息结构体
Definition: lib_wdg.h:16
WDG_API int DisableWtd(int fd)
关闭看门狗
#define WDG_API
Definition: lib_wdg.h:37
unsigned int options
卡/驱动程序支持的选项19
Definition: lib_wdg.h:18