8051-ELL库  beta 1.1.6
8051-ELL library API Document Center
STC8x_RST.h 文件参考
#include "ELL_CORE.h"
#include "STC8Ax_REG.h"
STC8x_RST.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

宏定义

#define PER_LIB_MCU_MUODEL   STC8Ax
 如果没有定义这个宏,默认为STC8Ax。 If the mirco is undefined,select to STC8Ax 更多...
 
#define PER_LIB_RST_CTRL   1
 如果没有定义这个宏,默认为1。 If the mirco is undefined,select to "1" 更多...
 
#define PER_LIB_RST_INIT_CTRL   1
 如果没有定义这个宏,默认为1。 If the mirco is undefined,select to "1" 更多...
 
#define PER_LIB_RST_WORK_CTRL   1
 如果没有定义这个宏,默认为1。 If the mirco is undefined,select to "1" 更多...
 
#define RST_P54_ENABLE()   do{RSTCFG |= 0x10;}while(0)
 使能P54作为复位IO。 更多...
 
#define RST_P54_DISABLE()   do{RSTCFG &= 0xEF;}while(0)
 不使能P54作为复位IO。 更多...
 

枚举

enum  RSTChoice_Type { RST_USER_DATA_KEEP = 0x00 , RST_USER_DATA_CLEAN = 0x01 }
 RST复位方式选择枚举体。 更多...
 
enum  LVDRstDiv_Type { LVD_RST_2_2V = 0x00 , LVD_RST_2_4V = 0x01 , LVD_RST_2_7V = 0x02 , LVD_RST_3_0V = 0x03 }
 低压复位的电压临界点选择枚举体。 更多...
 

函数

FSCSTATE LVD_RST_Init (LVDRstDiv_Type lvDiv, BOOL run)
 低压复位函数,可以选择不同低压复位标准。 更多...
 
FSCSTATE SFW_RST_Ctrl (RSTChoice_Type choice, BOOL run)
 软件复位控制函数。 更多...
 
void Auto_RST_download (void)
 软件复位自动下载功能,需要在串口中断里调用, 需要在STC-ISP助手里设置下载口令:10个0x7F。 更多...
 

宏定义说明

◆ PER_LIB_MCU_MUODEL

#define PER_LIB_MCU_MUODEL   STC8Ax

如果没有定义这个宏,默认为STC8Ax。 If the mirco is undefined,select to STC8Ax

◆ PER_LIB_RST_CTRL

#define PER_LIB_RST_CTRL   1

如果没有定义这个宏,默认为1。 If the mirco is undefined,select to "1"

◆ PER_LIB_RST_INIT_CTRL

#define PER_LIB_RST_INIT_CTRL   1

如果没有定义这个宏,默认为1。 If the mirco is undefined,select to "1"

◆ PER_LIB_RST_WORK_CTRL

#define PER_LIB_RST_WORK_CTRL   1

如果没有定义这个宏,默认为1。 If the mirco is undefined,select to "1"

◆ RST_P54_DISABLE

#define RST_P54_DISABLE ( )    do{RSTCFG &= 0xEF;}while(0)

不使能P54作为复位IO。

Disables P54 to act as a reset IO.

◆ RST_P54_ENABLE

#define RST_P54_ENABLE ( )    do{RSTCFG |= 0x10;}while(0)

使能P54作为复位IO。

Enables P54 to act as a reset IO.

枚举类型说明

◆ LVDRstDiv_Type

低压复位的电压临界点选择枚举体。

Low voltage reset Reset working mode enum.

枚举值
LVD_RST_2_2V 

2.2V

LVD_RST_2_4V 

2.4V

LVD_RST_2_7V 

2.7V

LVD_RST_3_0V 

3.0V

◆ RSTChoice_Type

RST复位方式选择枚举体。

RST Reset Select Enumerator.

枚举值
RST_USER_DATA_KEEP 

软件复位后,代码从用户程序区执行,并且用户数据区中的数据保持不变。 After the software is reset, the code is executed from the user program area, and the data in the user data area remains unchanged.

RST_USER_DATA_CLEAN 

软件复位后,代码从系统的ISP区域执行,并且清除用户数据区域中的数据。 After the software is reset, the code is executed from the ISP area of the system, and the data in the user data area is cleared.

函数说明

◆ Auto_RST_download()

void Auto_RST_download ( void  )

软件复位自动下载功能,需要在串口中断里调用, 需要在STC-ISP助手里设置下载口令:10个0x7F。

Software reset automatic download function, need to be called in serial interrupt, The download password needs to be set in the STC-ISP assistant: 10 0x7F.

参数
None.
返回
None.

◆ LVD_RST_Init()

FSCSTATE LVD_RST_Init ( LVDRstDiv_Type  lvDiv,
BOOL  run 
)

低压复位函数,可以选择不同低压复位标准。

Low voltage reset function, you can select different low voltage reset standards.

参数
[in]lvDiv低压复位标准。low voltage reset standards.
[in]run使能控制位。 Enable control bit.
返回
FSC_SUCCESS 返回成功。Return to success.
FSC_FAIL 返回失败。Return to fail.

◆ SFW_RST_Ctrl()

FSCSTATE SFW_RST_Ctrl ( RSTChoice_Type  choice,
BOOL  run 
)

软件复位控制函数。

Software reset function.

参数
[in]choice复位方式选择。Reset mode selection.
[in]run使能控制位。 Enable control bit.
返回
FSC_SUCCESS 返回成功。Return to success.
FSC_FAIL 返回失败。Return to fail.