天嵌二次封装库使用手册  V1.0
tq_wdg.h
浏览该文件的文档.
1 
2 #ifndef _TQ_WDG_H_
3 #define _TQ_WDG_H_
4 
20 #include <stdio.h>
21 #include <unistd.h>
22 #include <sys/types.h>
23 #include <sys/stat.h>
24 #include <fcntl.h>
25 #include <sys/ioctl.h>
26 
31 {
32  unsigned int options;
33  unsigned int firmware_version;
34  unsigned char identity[32];
35 };
36 #define ERROR_OK 0
37 #define ERROR_NOSUPPORT -1
38 
39 #define WATCHDOG_IOCTL_BASE 'W'
40 #define WDIOC_GETSUPPORT _IOR(WATCHDOG_IOCTL_BASE, 0, struct watchdog_info)
41 #define WDIOC_SETTIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 6, int)
42 #define WDIOC_GETTIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 7, int)
43 #define WDIOS_DISABLECARD 0x0001
44 #define WDIOS_ENABLECARD 0x0002
45 #define WDIOC_SETOPTIONS _IOR(WATCHDOG_IOCTL_BASE, 4, int)
46 #define WDIOC_KEEPALIVE _IOR(WATCHDOG_IOCTL_BASE, 5, int)
47 #ifdef __cplusplus
48 extern "C"
49 {
50 #endif
51 
56  int EnableWtd(int TimeOut_s);
57 
63  int FeedWtd(int fd);
64 
70  int DisableWtd(int fd);
71 #ifdef __cplusplus
72 }
73 #endif
74 #endif
int FeedWtd(int fd)
喂狗操作
int EnableWtd(int TimeOut_s)
使能看门狗设备
unsigned int firmware_version
该卡的固定卡版本
Definition: tq_wdg.h:33
unsigned char identity[32]
板21的信息
Definition: tq_wdg.h:34
看门狗信息结构体
Definition: tq_wdg.h:30
unsigned int options
卡/驱动程序支持的选项19
Definition: tq_wdg.h:32
int DisableWtd(int fd)
关闭看门狗