32 #ifndef __STC8x_RST_H_
33 #define __STC8x_RST_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
123 #if (PER_LIB_RST_CTRL == 1)
125 #if (PER_LIB_RST_INIT_CTRL == 1)
140 #if (PER_LIB_RST_WORK_CTRL == 1)
170 #define RST_P54_ENABLE() do{RSTCFG |= 0x10;}while(0)
177 #define RST_P54_DISABLE() do{RSTCFG &= 0xEF;}while(0)
BOOL
Definition: ELL_CORE.h:50
FSCSTATE
Definition: ELL_CORE.h:65
FSCSTATE LVD_RST_Init(LVDRstDiv_Type lvDiv, BOOL run)
低压复位函数,可以选择不同低压复位标准。
RSTChoice_Type
RST复位方式选择枚举体。
Definition: STC8x_RST.h:94
@ RST_USER_DATA_CLEAN
Definition: STC8x_RST.h:101
@ RST_USER_DATA_KEEP
Definition: STC8x_RST.h:96
void Auto_RST_download(void)
软件复位自动下载功能,需要在串口中断里调用, 需要在STC-ISP助手里设置下载口令:10个0x7F。
FSCSTATE SFW_RST_Ctrl(RSTChoice_Type choice, BOOL run)
软件复位控制函数。
LVDRstDiv_Type
低压复位的电压临界点选择枚举体。
Definition: STC8x_RST.h:113
@ LVD_RST_2_7V
Definition: STC8x_RST.h:116
@ LVD_RST_3_0V
Definition: STC8x_RST.h:117
@ LVD_RST_2_4V
Definition: STC8x_RST.h:115
@ LVD_RST_2_2V
Definition: STC8x_RST.h:114