2021-02-18 13:29:12 +08:00
|
|
|
|
#ifndef __SWM320_WDT_H__
|
2021-05-06 10:42:41 +08:00
|
|
|
|
#define __SWM320_WDT_H__
|
2021-02-18 13:29:12 +08:00
|
|
|
|
|
2021-05-06 10:42:41 +08:00
|
|
|
|
#define WDT_MODE_RESET 0
|
|
|
|
|
#define WDT_MODE_INTERRUPT 1
|
2021-02-18 13:29:12 +08:00
|
|
|
|
|
2021-05-06 10:42:41 +08:00
|
|
|
|
void WDT_Init(WDT_TypeDef *WDTx, uint32_t peroid, uint32_t mode); //WDT看门狗初始化
|
|
|
|
|
void WDT_Start(WDT_TypeDef *WDTx); //启动指定WDT,开始倒计时
|
|
|
|
|
void WDT_Stop(WDT_TypeDef *WDTx); //关闭指定WDT,停止倒计时
|
2021-02-18 13:29:12 +08:00
|
|
|
|
|
2021-05-06 10:42:41 +08:00
|
|
|
|
void WDT_Feed(WDT_TypeDef *WDTx); //喂狗,重新从装载值开始倒计时
|
2021-02-18 13:29:12 +08:00
|
|
|
|
|
2021-05-06 10:42:41 +08:00
|
|
|
|
int32_t WDT_GetValue(WDT_TypeDef *WDTx); //获取指定看门狗定时器的当前倒计时值
|
2021-02-18 13:29:12 +08:00
|
|
|
|
|
2021-05-06 10:42:41 +08:00
|
|
|
|
void WDT_INTClr(WDT_TypeDef *WDTx); //中断标志清除
|
|
|
|
|
uint32_t WDT_INTStat(WDT_TypeDef *WDTx); //中断状态查询
|
2021-02-18 13:29:12 +08:00
|
|
|
|
|
|
|
|
|
#endif //__SWM320_WDT_H__
|