32 #ifndef __STC8x_WDT_H_
33 #define __STC8x_WDT_H_
44 #if (PER_LIB_MCU_MUODEL == STC8Ax)
46 #elif (PER_LIB_MCU_MUODEL == STC8Cx)
48 #elif (PER_LIB_MCU_MUODEL == STC8Fx)
50 #elif (PER_LIB_MCU_MUODEL == STC8Gx)
52 #elif (PER_LIB_MCU_MUODEL == STC8Hx)
61 #ifndef PER_LIB_MCU_MUODEL
64 #define PER_LIB_MCU_MUODEL STC8Ax
68 #ifndef PER_LIB_RST_CTRL
71 #define PER_LIB_RST_CTRL 1
75 #ifndef PER_LIB_RST_INIT_CTRL
78 #define PER_LIB_RST_INIT_CTRL 1
82 #ifndef PER_LIB_RST_WORK_CTRL
85 #define PER_LIB_RST_WORK_CTRL 1
93 #define WDTCLK_DIV2 0x00
94 #define WDTCLK_DIV4 0x01
95 #define WDTCLK_DIV8 0x02
96 #define WDTCLK_DIV16 0x03
97 #define WDTCLK_DIV32 0x04
98 #define WDTCLK_DIV64 0x05
99 #define WDTCLK_DIV128 0x06
100 #define WDTCLK_DIV256 0x07
106 #if (PER_LIB_RST_CTRL == 1)
108 #if (PER_LIB_RST_INIT_CTRL == 1)
122 #if (PER_LIB_RST_WORK_CTRL == 1)
138 #define WDT_FEED() do{WDT_CONTR |= 0x10;}while(0)
BOOL
Definition: ELL_CORE.h:50
FSCSTATE
Definition: ELL_CORE.h:65
unsigned long uint32_t
Definition: ELL_TYPE.h:74
unsigned char uint8_t
Definition: ELL_TYPE.h:72
uint32_t Get_WDT_Time(void)
获取喂狗时间函数,以便定时喂狗。
FSCSTATE WDT_Init(uint8_t clKDiv, BOOL run)
看门狗初始函数。