static void Sleep(uint32_t milliseconds)
让线程进入休眠状态 Puts the thread to sleep
通用看门狗(Watchdog)抽象接口 General Watchdog interface for both thread and task style usage
virtual ErrorCode SetConfig(const Configuration &config)=0
初始化硬件并设置超时时间 Initialize hardware and set overflow time
uint32_t auto_feed_interval_ms
自动喂狗间隔
virtual ~Watchdog()
虚析构函数 / Virtual destructor
virtual ErrorCode Start()=0
启动看门狗 / Start the watchdog
static void ThreadFun(Watchdog *wdg)
Watchdog 自动喂狗线程函数 Watchdog thread function for auto-feeding.
virtual ErrorCode Feed()=0
立即手动喂狗 Feed the watchdog immediately
Watchdog()
构造函数 / Constructor
static void TaskFun(Watchdog *wdg)
Watchdog 自动喂狗定时器任务函数 Watchdog timer task function for auto-feeding.
virtual ErrorCode Stop()=0
停止看门狗 / Stop the watchdog
LibXR 命名空间 / LibXR namespace.
ErrorCode
定义错误码枚举 / Defines an enumeration for error codes
看门狗配置结构体 Configuration for the watchdog
uint32_t feed_ms
自动喂狗周期 / Auto feed interval (ms, < timeout_ms)
uint32_t timeout_ms
看门狗溢出时间 / Watchdog overflow time (ms)