天嵌二次封装库使用手册
V2.1.2
|
类 | |
struct | watchdog_info |
看门狗信息结构体 更多... | |
宏定义 | |
#define | ERROR_OK 0 |
函数返回值,函数正常结束返回值 更多... | |
#define | ERROR_NOSUPPORT -1 |
函数返回值,不支持返回值 更多... | |
#define | WATCHDOG_IOCTL_BASE 'W' |
定义看门狗 更多... | |
#define | WDIOC_GETSUPPORT _IOR(WATCHDOG_IOCTL_BASE, 0, struct watchdog_info) |
获取看门狗信息 更多... | |
#define | WDIOC_SETTIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 6, int) |
设置超时间 更多... | |
#define | WDIOC_GETTIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 7, int) |
设置超时间 更多... | |
#define | WDIOS_DISABLECARD 0x0001 |
关闭看门狗定时器 更多... | |
#define | WDIOS_ENABLECARD 0x0002 |
打开看门狗定时器 更多... | |
#define | WDIOC_SETOPTIONS _IOR(WATCHDOG_IOCTL_BASE, 4, int) |
设置关闭状态 更多... | |
#define | WDIOC_KEEPALIVE _IOR(WATCHDOG_IOCTL_BASE, 5, int) |
设置喂狗状态 更多... | |
#define | WDG_API |
函数 | |
WDG_API int | EnableWtd (int TimeOut_s) |
使能看门狗设备 更多... | |
WDG_API int | FeedWtd (int fd) |
喂狗操作 更多... | |
WDG_API int | DisableWtd (int fd) |
关闭看门狗 更多... | |
#define WDIOC_GETSUPPORT _IOR(WATCHDOG_IOCTL_BASE, 0, struct watchdog_info) |
#define WDIOC_GETTIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 7, int) |
#define WDIOC_KEEPALIVE _IOR(WATCHDOG_IOCTL_BASE, 5, int) |
#define WDIOC_SETOPTIONS _IOR(WATCHDOG_IOCTL_BASE, 4, int) |
#define WDIOC_SETTIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 6, int) |
WDG_API int DisableWtd | ( | int | fd | ) |
关闭看门狗
fd | 看门狗设备描述符 |
WDG_API int EnableWtd | ( | int | TimeOut_s | ) |
使能看门狗设备
TimeOut_s | 指定看门狗的最大喂狗间隔(秒) |
WDG_API int FeedWtd | ( | int | fd | ) |
喂狗操作
fd | 看门狗设备描述符 |