Englishify some of the CH592 StdPeriphDriver
This commit is contained in:
@@ -15,9 +15,11 @@
|
||||
/*********************************************************************
|
||||
* @fn LClk32K_Select
|
||||
*
|
||||
* @brief 32K <EFBFBD><EFBFBD>Ƶʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ
|
||||
* @brief 32K Low Frequency clock source select
|
||||
*
|
||||
* @param hc - ѡ<EFBFBD><EFBFBD>32Kʹ<EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ
|
||||
* @param hc - Use internal or external 32K oscillator
|
||||
* Clk32K_LSI - Internal
|
||||
* Clk32K_LSE - External
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
@@ -43,10 +45,10 @@ void LClk32K_Select(LClk32KTypeDef hc)
|
||||
/*********************************************************************
|
||||
* @fn LClk32K_Cfg
|
||||
*
|
||||
* @brief 32K <EFBFBD><EFBFBD>Ƶʱ<EFBFBD>ӵ<EFBFBD>Դ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @brief 32K Low Frequency clock power
|
||||
*
|
||||
* @param hc - ѡ<EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD>32K<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⲿ32K
|
||||
* @param s - <EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD>Դ
|
||||
* @param hc - Clock Selection
|
||||
* @param s - Power ENABLE/DISABLE
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
@@ -85,7 +87,7 @@ void LClk32K_Cfg(LClk32KTypeDef hc, FunctionalState s)
|
||||
/*********************************************************************
|
||||
* @fn HSECFG_Current
|
||||
*
|
||||
* @brief HSE<EFBFBD><EFBFBD><EFBFBD><EFBFBD> ƫ<>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @brief HSE Bias Current configuration
|
||||
*
|
||||
* @param c - 75%,100%,125%,150%
|
||||
*
|
||||
@@ -106,7 +108,7 @@ void HSECFG_Current(HSECurrentTypeDef c)
|
||||
/*********************************************************************
|
||||
* @fn HSECFG_Capacitance
|
||||
*
|
||||
* @brief HSE<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @brief HSE Load Capacitor configuration
|
||||
*
|
||||
* @param c - refer to HSECapTypeDef
|
||||
*
|
||||
@@ -127,7 +129,7 @@ void HSECFG_Capacitance(HSECapTypeDef c)
|
||||
/*********************************************************************
|
||||
* @fn LSECFG_Current
|
||||
*
|
||||
* @brief LSE<EFBFBD><EFBFBD><EFBFBD><EFBFBD> ƫ<>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @brief LSE Bias Current configuration
|
||||
*
|
||||
* @param c - 70%,100%,140%,200%
|
||||
*
|
||||
@@ -148,7 +150,7 @@ void LSECFG_Current(LSECurrentTypeDef c)
|
||||
/*********************************************************************
|
||||
* @fn LSECFG_Capacitance
|
||||
*
|
||||
* @brief LSE<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @brief LSE Load Capacitor configuration
|
||||
*
|
||||
* @param c - refer to LSECapTypeDef
|
||||
*
|
||||
@@ -169,11 +171,12 @@ void LSECFG_Capacitance(LSECapTypeDef c)
|
||||
/*********************************************************************
|
||||
* @fn Calibration_LSI
|
||||
*
|
||||
* @brief У<EFBFBD>ڲ<EFBFBD>32Kʱ<EFBFBD><EFBFBD>
|
||||
* @brief Calibrate 32K LSI clock from HSE
|
||||
*
|
||||
* @param cali_Lv - У<EFBFBD>ȼ<EFBFBD>ѡ<EFBFBD><EFBFBD> Level_32 <20><>2.4ms 1000ppm (32M <20><>Ƶ) 1100ppm (60M <20><>Ƶ)
|
||||
* Level_64 <20><>4.4ms 800ppm (32M <EFBFBD><EFBFBD>Ƶ) 1000ppm (60M <EFBFBD><EFBFBD>Ƶ)
|
||||
* Level_128 <20><>8.4ms 600ppm (32M <EFBFBD><EFBFBD>Ƶ) 800ppm (60M <EFBFBD><EFBFBD>Ƶ)
|
||||
* @param cali_Lv - Calibration Level Selection
|
||||
* Level_32 <20><>2.4ms 1000ppm (32M HSE), 1100ppm (60M HSE)
|
||||
* Level_64 <20><>4.4ms 800ppm (32M HSE), 1000ppm (60M HSE)
|
||||
* Level_128 <20><>8.4ms 600ppm (32M HSE), 800ppm (60M HSE)
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
@@ -197,7 +200,7 @@ void Calibration_LSI(Cali_LevelTypeDef cali_Lv)
|
||||
|
||||
while(1)
|
||||
{
|
||||
// <EFBFBD>ֵ<EFBFBD>
|
||||
// coarse adjustment
|
||||
sys_safe_access_enable();
|
||||
R8_OSC_CAL_CTRL &= ~RB_OSC_CNT_TOTAL;
|
||||
R8_OSC_CAL_CTRL |= 1;
|
||||
@@ -253,7 +256,7 @@ void Calibration_LSI(Cali_LevelTypeDef cali_Lv)
|
||||
sys_safe_access_disable();
|
||||
}
|
||||
|
||||
// ϸ<EFBFBD><EFBFBD>
|
||||
// fine adjustment
|
||||
// <20><><EFBFBD><EFBFBD>ϸ<EFBFBD><CFB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F3A3ACB6><EFBFBD>2<EFBFBD>β<EFBFBD><CEB2><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD>Σ<EFBFBD><CEA3><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB>һ<EFBFBD><D2BB>
|
||||
sys_safe_access_enable();
|
||||
R8_OSC_CAL_CTRL &= ~RB_OSC_CNT_TOTAL;
|
||||
@@ -354,14 +357,14 @@ void Calibration_LSI(Cali_LevelTypeDef cali_Lv)
|
||||
/*********************************************************************
|
||||
* @fn RTCInitTime
|
||||
*
|
||||
* @brief RTCʱ<EFBFBD>ӳ<EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰʱ<EFBFBD><EFBFBD>
|
||||
* @brief RTC Clock initialize with time and date
|
||||
*
|
||||
* @param y - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>꣬MAX_Y = BEGYEAR + 44
|
||||
* @param mon - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>£<EFBFBD>MAX_MON = 12
|
||||
* @param d - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>գ<EFBFBD>MAX_D = 31
|
||||
* @param h - <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Сʱ<EFBFBD><EFBFBD>MAX_H = 23
|
||||
* @param m - <EFBFBD><EFBFBD><EFBFBD>÷<EFBFBD><EFBFBD>ӣ<EFBFBD>MAX_M = 59
|
||||
* @param s - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>룬MAX_S = 59
|
||||
* @param y - year, MAX_Y = BEGYEAR + 44
|
||||
* @param mon - month, MAX_MON = 12
|
||||
* @param d - day, MAX_D = 31
|
||||
* @param h - hour, MAX_H = 23
|
||||
* @param m - minute, MAX_M = 59
|
||||
* @param s - second, MAX_S = 59
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
@@ -420,14 +423,14 @@ void RTC_InitTime(uint16_t y, uint16_t mon, uint16_t d, uint16_t h, uint16_t m,
|
||||
/*********************************************************************
|
||||
* @fn RTC_GetTime
|
||||
*
|
||||
* @brief <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>ǰʱ<EFBFBD><EFBFBD>
|
||||
* @brief Get the current time and date from RTC
|
||||
*
|
||||
* @param py - <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>꣬MAX_Y = BEGYEAR + 44
|
||||
* @param pmon - <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>£<EFBFBD>MAX_MON = 12
|
||||
* @param pd - <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>գ<EFBFBD>MAX_D = 31
|
||||
* @param ph - <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Сʱ<EFBFBD><EFBFBD>MAX_H = 23
|
||||
* @param pm - <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD><EFBFBD>ӣ<EFBFBD>MAX_M = 59
|
||||
* @param ps - <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>룬MAX_S = 59
|
||||
* @param py - year, MAX_Y = BEGYEAR + 44
|
||||
* @param pmon - month, MAX_MON = 12
|
||||
* @param pd - day, MAX_D = 31
|
||||
* @param ph - hour, MAX_H = 23
|
||||
* @param pm - minute, MAX_M = 59
|
||||
* @param ps - second, MAX_S = 59
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
@@ -465,9 +468,9 @@ void RTC_GetTime(uint16_t *py, uint16_t *pmon, uint16_t *pd, uint16_t *ph, uint1
|
||||
/*********************************************************************
|
||||
* @fn RTC_SetCycle32k
|
||||
*
|
||||
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD>LSE/LSIʱ<EFBFBD>ӣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>ǰRTC <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @brief Based on LSI/LSE clock, configure the number of cycles for RTC
|
||||
*
|
||||
* @param cyc - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD>MAX_CYC = 0xA8BFFFFF = 2831155199
|
||||
* @param cyc - cycle count, MAX_CYC = 0xA8BFFFFF = 2831155199
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
@@ -489,11 +492,11 @@ void RTC_SetCycle32k(uint32_t cyc)
|
||||
/*********************************************************************
|
||||
* @fn RTC_GetCycle32k
|
||||
*
|
||||
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD>LSE/LSIʱ<EFBFBD>ӣ<EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>ǰRTC <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @brief Get the current number of cycles for RTC based on LSI/LSE clock
|
||||
*
|
||||
* @param none
|
||||
*
|
||||
* @return <EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>MAX_CYC = 0xA8BFFFFF = 2831155199
|
||||
* @return cycle count, MAX_CYC = 0xA8BFFFFF = 2831155199
|
||||
*/
|
||||
uint32_t RTC_GetCycle32k(void)
|
||||
{
|
||||
@@ -509,7 +512,7 @@ uint32_t RTC_GetCycle32k(void)
|
||||
/*********************************************************************
|
||||
* @fn RTC_TMRFunCfg
|
||||
*
|
||||
* @brief RTC<EFBFBD><EFBFBD>ʱģʽ<EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD>ע<EFBFBD>ⶨʱ<EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD>Ϊ32768Hz<EFBFBD><EFBFBD>
|
||||
* @brief RTC Timer configuration (timebase is fixed to 32768Hz)
|
||||
*
|
||||
* @param t - refer to RTC_TMRCycTypeDef
|
||||
*
|
||||
@@ -528,7 +531,7 @@ void RTC_TMRFunCfg(RTC_TMRCycTypeDef t)
|
||||
/*********************************************************************
|
||||
* @fn RTC_TRIGFunCfg
|
||||
*
|
||||
* @brief RTCʱ<EFBFBD>䴥<EFBFBD><EFBFBD>ģʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @brief RTC Timer Trigger configuration
|
||||
*
|
||||
* @param cyc - <20><><EFBFBD>Ե<EFBFBD>ǰʱ<C7B0><CAB1><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>䣬<EFBFBD><E4A3AC><EFBFBD><EFBFBD>LSE/LSIʱ<49><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*
|
||||
@@ -580,11 +583,11 @@ void RTC_ModeFunDisable(RTC_MODETypeDef m)
|
||||
/*********************************************************************
|
||||
* @fn RTC_GetITFlag
|
||||
*
|
||||
* @brief <EFBFBD><EFBFBD>ȡRTC<EFBFBD>жϱ<EFBFBD>־
|
||||
* @brief Get RTC interrupt flags
|
||||
*
|
||||
* @param f - refer to RTC_EVENTTypeDef
|
||||
*
|
||||
* @return <EFBFBD>жϱ<EFBFBD>־״̬
|
||||
* @return Interrupt flag status
|
||||
*/
|
||||
uint8_t RTC_GetITFlag(RTC_EVENTTypeDef f)
|
||||
{
|
||||
@@ -601,7 +604,7 @@ uint8_t RTC_GetITFlag(RTC_EVENTTypeDef f)
|
||||
/*********************************************************************
|
||||
* @fn RTC_ClearITFlag
|
||||
*
|
||||
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD>RTC<EFBFBD>жϱ<EFBFBD>־
|
||||
* @brief Clear RTC interrupt flags
|
||||
*
|
||||
* @param f - refer to RTC_EVENTTypeDef
|
||||
*
|
||||
|
||||
@@ -10,6 +10,16 @@
|
||||
* microcontroller manufactured by Nanjing Qinheng Microelectronics.
|
||||
*******************************************************************************/
|
||||
|
||||
/*
|
||||
* true's notes:
|
||||
*
|
||||
* flash is practically undocumented.
|
||||
*
|
||||
* R8_FLASH_CTRL - 0x51 flash on, no waitstates?
|
||||
* 0x51 flash on, unknown waitstates?
|
||||
* 0x04 flash off
|
||||
*/
|
||||
|
||||
#include "CH59x_common.h"
|
||||
|
||||
/* RESET_EN */
|
||||
@@ -56,7 +66,7 @@ void FLASH_ROM_READ(uint32_t StartAddr, void *Buffer, uint32_t len)
|
||||
* @brief Configure User Option Byte.<2E><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч,<2C><>ÿ<EFBFBD><C3BF><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
||||
* (ʹ<>øú<C3B8><C3BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD>ùٷ<C3B9><D9B7>ṩ<EFBFBD><E1B9A9>.S<>ļ<EFBFBD><C4BC><EFBFBD>ͬʱ<CDAC><CAB1><EFBFBD>øú<C3B8><C3BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5>Խӿ<D4BD>Ĭ<EFBFBD>Ϲر<CFB9>)
|
||||
*
|
||||
* @param RESET_EN - <EFBFBD>ⲿ<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD>
|
||||
* @param RESET_EN - External reset pin enable
|
||||
* @param BOOT_PIN - ENABLE-ʹ<><CAB9>Ĭ<EFBFBD><C4AC>boot<6F><74>-PB22,DISABLE-ʹ<><CAB9>boot<6F><74>-PB11
|
||||
* @param UART_NO_KEY_EN - <20><><EFBFBD><EFBFBD><EFBFBD>ⰴ<EFBFBD><E2B0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9>
|
||||
* @param FLASHProt_Size - д<><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С(<28><>λ4K)
|
||||
@@ -173,7 +183,7 @@ void UserOptionByte_Active(void)
|
||||
*
|
||||
* @param Buffer - Pointer to the buffer where data should be stored, Must be aligned to 4 bytes.
|
||||
*
|
||||
* @return 0-SUCCESS (!0)-FAILURE
|
||||
* @return none
|
||||
*/
|
||||
void GET_UNIQUE_ID(uint8_t *Buffer)
|
||||
{
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
/*********************************************************************
|
||||
* @fn GPIOA_ModeCfg
|
||||
*
|
||||
* @brief GPIOA<EFBFBD>˿<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @brief GPIOA Port Pin Mode configuration
|
||||
*
|
||||
* @param pin - PA0-PA15
|
||||
* @param mode - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @param mode - GPIO input / output mode
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
@@ -62,10 +62,10 @@ void GPIOA_ModeCfg(uint32_t pin, GPIOModeTypeDef mode)
|
||||
/*********************************************************************
|
||||
* @fn GPIOB_ModeCfg
|
||||
*
|
||||
* @brief GPIOB<EFBFBD>˿<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @brief GPIOB Port Pin Mode configuration
|
||||
*
|
||||
* @param pin - PB0-PB23
|
||||
* @param mode - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @param mode - GPIO input / output mode
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
@@ -109,10 +109,10 @@ void GPIOB_ModeCfg(uint32_t pin, GPIOModeTypeDef mode)
|
||||
/*********************************************************************
|
||||
* @fn GPIOA_ITModeCfg
|
||||
*
|
||||
* @brief GPIOA<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>ģʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @brief GPIOA interrupt configuration
|
||||
*
|
||||
* @param pin - PA0-PA15
|
||||
* @param mode - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @param mode - Interrupt Trigger type (edge, level)
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
@@ -120,22 +120,22 @@ void GPIOA_ITModeCfg(uint32_t pin, GPIOITModeTpDef mode)
|
||||
{
|
||||
switch(mode)
|
||||
{
|
||||
case GPIO_ITMode_LowLevel: // <20>͵<EFBFBD>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD>
|
||||
case GPIO_ITMode_LowLevel:
|
||||
R16_PA_INT_MODE &= ~pin;
|
||||
R32_PA_CLR |= pin;
|
||||
break;
|
||||
|
||||
case GPIO_ITMode_HighLevel: // <20>ߵ<EFBFBD>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD>
|
||||
case GPIO_ITMode_HighLevel:
|
||||
R16_PA_INT_MODE &= ~pin;
|
||||
R32_PA_OUT |= pin;
|
||||
break;
|
||||
|
||||
case GPIO_ITMode_FallEdge: // <20>½<EFBFBD><C2BD>ش<EFBFBD><D8B4><EFBFBD>
|
||||
case GPIO_ITMode_FallEdge:
|
||||
R16_PA_INT_MODE |= pin;
|
||||
R32_PA_CLR |= pin;
|
||||
break;
|
||||
|
||||
case GPIO_ITMode_RiseEdge: // <20><><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>
|
||||
case GPIO_ITMode_RiseEdge:
|
||||
R16_PA_INT_MODE |= pin;
|
||||
R32_PA_OUT |= pin;
|
||||
break;
|
||||
@@ -150,10 +150,10 @@ void GPIOA_ITModeCfg(uint32_t pin, GPIOITModeTpDef mode)
|
||||
/*********************************************************************
|
||||
* @fn GPIOB_ITModeCfg
|
||||
*
|
||||
* @brief GPIOB<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>ģʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @brief GPIOB interrupt configuration
|
||||
*
|
||||
* @param pin - PB0-PB23
|
||||
* @param mode - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @param mode - Interrupt Trigger type (edge, level)
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
@@ -162,22 +162,22 @@ void GPIOB_ITModeCfg(uint32_t pin, GPIOITModeTpDef mode)
|
||||
uint32_t Pin = pin | ((pin & (GPIO_Pin_22 | GPIO_Pin_23)) >> 14);
|
||||
switch(mode)
|
||||
{
|
||||
case GPIO_ITMode_LowLevel: // <20>͵<EFBFBD>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD>
|
||||
case GPIO_ITMode_LowLevel:
|
||||
R16_PB_INT_MODE &= ~Pin;
|
||||
R32_PB_CLR |= pin;
|
||||
break;
|
||||
|
||||
case GPIO_ITMode_HighLevel: // <20>ߵ<EFBFBD>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD>
|
||||
case GPIO_ITMode_HighLevel:
|
||||
R16_PB_INT_MODE &= ~Pin;
|
||||
R32_PB_OUT |= pin;
|
||||
break;
|
||||
|
||||
case GPIO_ITMode_FallEdge: // <20>½<EFBFBD><C2BD>ش<EFBFBD><D8B4><EFBFBD>
|
||||
case GPIO_ITMode_FallEdge:
|
||||
R16_PB_INT_MODE |= Pin;
|
||||
R32_PB_CLR |= pin;
|
||||
break;
|
||||
|
||||
case GPIO_ITMode_RiseEdge: // <20><><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>
|
||||
case GPIO_ITMode_RiseEdge:
|
||||
R16_PB_INT_MODE |= Pin;
|
||||
R32_PB_OUT |= pin;
|
||||
break;
|
||||
@@ -192,17 +192,17 @@ void GPIOB_ITModeCfg(uint32_t pin, GPIOITModeTpDef mode)
|
||||
/*********************************************************************
|
||||
* @fn GPIOPinRemap
|
||||
*
|
||||
* @brief <EFBFBD><EFBFBD><EFBFBD>蹦<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD><EFBFBD>
|
||||
* @brief GPIO Pin Peripheral Function Remapping
|
||||
*
|
||||
* @param s - <EFBFBD>Ƿ<EFBFBD>ʹ<EFBFBD><EFBFBD>ӳ<EFBFBD><EFBFBD>
|
||||
* @param s - Enable / Disable remap
|
||||
* @param perph - RB_RF_ANT_SW_EN - RF antenna switch control output on PA4/PA5/PA12/PA13/PA14/PA15
|
||||
* RB_PIN_U0_INV - RXD0/RXD0_/TXD0/TXD0_ invert input/output
|
||||
* RB_PIN_INTX - INTX: INT24/INT25 PB8/PB9 -> INT24_/INT25_ PB22/PB23
|
||||
* RB_PIN_MODEM - MODEM: PA6/PA7 -> PB12/PB13
|
||||
* RB_PIN_I2C - I2C: PB14/PB15 -> PB14/PB15
|
||||
* RB_PIN_I2C - I2C: PB14/PB15 -> PB14/PB15 (no remap possible)
|
||||
* RB_PIN_PWMX - PWMX: PA12/PA13 -> PA6/PA7
|
||||
* RB_PIN_SPI0 - SPI0: PA12/PA13/PA14/PA15 -> PB12/PB13/PB14/PB15
|
||||
* RB_PIN_UART3 - UART3: PA4/PA5 -> PA4/PA5
|
||||
* RB_PIN_UART3 - UART3: PA4/PA5 -> PA4/PA5 (no remap possible)
|
||||
* RB_PIN_UART2 - UART2: PB22/PB23 -> PA6/PA7
|
||||
* RB_PIN_UART1 - UART1: PA8/PA9 -> PB12/PB13
|
||||
* RB_PIN_UART0 - UART0: PB4/PB7 -> PA15/PA14
|
||||
@@ -228,25 +228,25 @@ void GPIOPinRemap(FunctionalState s, uint16_t perph)
|
||||
/*********************************************************************
|
||||
* @fn GPIOAGPPCfg
|
||||
*
|
||||
* @brief ģ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>GPIO<EFBFBD><EFBFBD><EFBFBD>Ź<EFBFBD><EFBFBD>ܿ<EFBFBD><EFBFBD><EFBFBD>
|
||||
* @brief GPIO Analog Pin Peripheral Function configuration
|
||||
*
|
||||
* @param s - ENABLE - <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>蹦<EFBFBD>ܣ<EFBFBD><EFBFBD>ر<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹ<EFBFBD><EFBFBD><EFBFBD>
|
||||
* DISABLE - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֹ<EFBFBD><EFBFBD>ܣ<EFBFBD><EFBFBD>ر<EFBFBD>ģ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>蹦<EFBFBD><EFBFBD>
|
||||
* @param perph - RB_PIN_ADC8_9_IE - ADC/TKEY 9/8ͨ<EFBFBD><EFBFBD>
|
||||
* RB_PIN_ADC6_7_IE - ADC/TKEY 7/6ͨ<EFBFBD><EFBFBD>
|
||||
* RB_PIN_ADC10_IE - ADC/TKEY 10ͨ<EFBFBD><EFBFBD>
|
||||
* RB_PIN_ADC11_IE - ADC/TKEY 11 ͨ<><CDA8>
|
||||
* RB_PIN_USB2_DP_PU - USB2 U2D+<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @param s - ENABLE - Turn on analog, disable digital functions
|
||||
* DISABLE - Turn off analog, enable digital functions
|
||||
* @param perph - RB_PIN_ADC8_9_IE - ADC/TKEY 9/8
|
||||
* RB_PIN_ADC6_7_IE - ADC/TKEY 7/6
|
||||
* RB_PIN_ADC10_IE - ADC/TKEY 10
|
||||
* RB_PIN_ADC11_IE - ADC/TKEY 11
|
||||
* RB_PIN_USB2_DP_PU - USB2 U2D+ internal pullup
|
||||
* RB_PIN_USB2_IE - USB2<42><32><EFBFBD><EFBFBD>
|
||||
* RB_PIN_USB_DP_PU - USB UD+<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* RB_PIN_USB_DP_PU - USB UD+ internal pullup
|
||||
* RB_PIN_USB_IE - USB <20><><EFBFBD><EFBFBD>
|
||||
* RB_PIN_ADC0_IE - ADC/TKEY 0 ͨ<><CDA8>
|
||||
* RB_PIN_ADC1_IE - ADC/TKEY 1 ͨ<><CDA8>
|
||||
* RB_PIN_ADC12_IE - ADC/TKEY 12 ͨ<><CDA8>
|
||||
* RB_PIN_ADC13_IE - ADC/TKEY 13 ͨ<><CDA8>
|
||||
* RB_PIN_XT32K_IE - 32KHz<EFBFBD><EFBFBD><EFBFBD><EFBFBD>LSE<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* RB_PIN_ADC2_3_IE - ADC/TKEY 2/3 ͨ<><CDA8>
|
||||
* RB_PIN_ADC4_5_IE - ADC/TKEY 4/5 ͨ<><CDA8>
|
||||
* RB_PIN_ADC0_IE - ADC/TKEY 0
|
||||
* RB_PIN_ADC1_IE - ADC/TKEY 1
|
||||
* RB_PIN_ADC12_IE - ADC/TKEY 12
|
||||
* RB_PIN_ADC13_IE - ADC/TKEY 13
|
||||
* RB_PIN_XT32K_IE - 32KHz LSE
|
||||
* RB_PIN_ADC2_3_IE - ADC/TKEY 2/3
|
||||
* RB_PIN_ADC4_5_IE - ADC/TKEY 4/5
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
/*********************************************************************
|
||||
* @fn PWR_DCDCCfg
|
||||
*
|
||||
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD>DC/DC<44><43>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD><EFBFBD>ڽ<EFBFBD>Լϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>
|
||||
* @brief Enable DC/DC converter, to reduce power consumption
|
||||
*
|
||||
* @param s - <EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DCDC<EFBFBD><EFBFBD>Դ
|
||||
* @param s - ENABLE or DISABLE the DC/DC converter
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
@@ -30,7 +30,7 @@ void PWR_DCDCCfg(FunctionalState s)
|
||||
{
|
||||
|
||||
adj &= ~RB_DCDC_CHARGE;
|
||||
plan &= ~(RB_PWR_DCDC_EN | RB_PWR_DCDC_PRE); // <EFBFBD><EFBFBD>· DC/DC
|
||||
plan &= ~(RB_PWR_DCDC_EN | RB_PWR_DCDC_PRE); // bypass DC/DC
|
||||
sys_safe_access_enable();
|
||||
R16_AUX_POWER_ADJ = adj;
|
||||
R16_POWER_PLAN = plan;
|
||||
@@ -88,10 +88,10 @@ void PWR_UnitModCfg(FunctionalState s, uint8_t unit)
|
||||
/*********************************************************************
|
||||
* @fn PWR_PeriphClkCfg
|
||||
*
|
||||
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>ӿ<EFBFBD><EFBFBD><EFBFBD>λ
|
||||
* @brief Peripheral clock control
|
||||
*
|
||||
* @param s - <EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>
|
||||
* @param perph - please refer to Peripher CLK control bit define
|
||||
* @param s - ENABLE or DISABLE peripheral clock
|
||||
* @param perph - please refer to Peripheral CLK control bit define
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
@@ -182,9 +182,9 @@ void PWR_PeriphWakeUpCfg(FunctionalState s, uint8_t perph, WakeUP_ModeypeDef mod
|
||||
/*********************************************************************
|
||||
* @fn PowerMonitor
|
||||
*
|
||||
* @brief <EFBFBD><EFBFBD>Դ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @brief Battery Monitoring
|
||||
*
|
||||
* @param s - <EFBFBD>Ƿ<EFBFBD><EFBFBD>˹<EFBFBD><EFBFBD><EFBFBD>
|
||||
* @param s - ENABLE or DISABLE
|
||||
* @param vl - refer to VolM_LevelypeDef
|
||||
*
|
||||
* @return none
|
||||
@@ -238,7 +238,7 @@ __HIGH_CODE
|
||||
void LowPower_Idle(void)
|
||||
{
|
||||
FLASH_ROM_SW_RESET();
|
||||
R8_FLASH_CTRL = 0x04; //flash<EFBFBD>ر<EFBFBD>
|
||||
R8_FLASH_CTRL = 0x04; // disable flash
|
||||
|
||||
PFIC->SCTLR &= ~(1 << 2); // sleep
|
||||
__WFI();
|
||||
@@ -261,14 +261,14 @@ void LowPower_Halt(void)
|
||||
uint8_t x32Kpw, x32Mpw;
|
||||
|
||||
FLASH_ROM_SW_RESET();
|
||||
R8_FLASH_CTRL = 0x04; //flash<EFBFBD>ر<EFBFBD>
|
||||
R8_FLASH_CTRL = 0x04; // disable flash
|
||||
x32Kpw = R8_XT32K_TUNE;
|
||||
x32Mpw = R8_XT32M_TUNE;
|
||||
x32Mpw = (x32Mpw & 0xfc) | 0x03; // 150%<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
x32Kpw = (x32Kpw & 0xfc) | 0x01; // LSE<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
x32Mpw = (x32Mpw & 0xfc) | 0x03; // 150% current
|
||||
x32Kpw = (x32Kpw & 0xfc) | 0x01; // LSE drive current reduced to normal
|
||||
|
||||
sys_safe_access_enable();
|
||||
R8_BAT_DET_CTRL = 0; // <EFBFBD>رյ<EFBFBD>ѹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
R8_BAT_DET_CTRL = 0; // disable battery voltage monitoring
|
||||
sys_safe_access_disable();
|
||||
sys_safe_access_enable();
|
||||
R8_XT32K_TUNE = x32Kpw;
|
||||
@@ -292,11 +292,11 @@ void LowPower_Halt(void)
|
||||
* Description : <20><EFBFBD><CDB9><EFBFBD>-Sleepģʽ<C4A3><CABD>
|
||||
ע<><EFBFBD><E2B5B1>ƵΪ80Mʱ<4D><CAB1>˯<EFBFBD><EFBFBD><DFBB><EFBFBD><EFBFBD>жϲ<D0B6><CFB2>ɵ<EFBFBD><C9B5><EFBFBD>flash<73>ڴ<EFBFBD><DAB4>룬<EFBFBD><EBA3AC><EFBFBD>˳<EFBFBD><CBB3>˺<EFBFBD><CBBA><EFBFBD>ǰ<EFBFBD><C7B0>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>30us<75>ӳ١<D3B3>
|
||||
* Input : rm:
|
||||
RB_PWR_RAM2K - 2K retention SRAM <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
RB_PWR_RAM24K - 24K main SRAM <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
RB_PWR_EXTEND - USB <EFBFBD><EFBFBD> BLE <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
RB_PWR_XROM - FlashROM <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
NULL - <09><><EFBFBD>ϵ<EFBFBD>Ԫ<EFBFBD><D4AA><EFBFBD>ϵ<EFBFBD>
|
||||
RB_PWR_RAM2K - 2K retention SRAM is powered
|
||||
RB_PWR_RAM24K - 24K main SRAM is powered
|
||||
RB_PWR_EXTEND - USB & BLE <20><>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
RB_PWR_XROM - FlashROM is powered
|
||||
NULL - All above peripherals are powered off
|
||||
* Return : None
|
||||
*******************************************************************************/
|
||||
__HIGH_CODE
|
||||
@@ -310,11 +310,11 @@ void LowPower_Sleep(uint16_t rm)
|
||||
|
||||
x32Kpw = R8_XT32K_TUNE;
|
||||
x32Mpw = R8_XT32M_TUNE;
|
||||
x32Mpw = (x32Mpw & 0xfc) | 0x03; // 150%<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
x32Kpw = (x32Kpw & 0xfc) | 0x01; // LSE<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
x32Mpw = (x32Mpw & 0xfc) | 0x03; // 150% current
|
||||
x32Kpw = (x32Kpw & 0xfc) | 0x01; // LSE drive current reduced to normal
|
||||
|
||||
sys_safe_access_enable();
|
||||
R8_BAT_DET_CTRL = 0; // <EFBFBD>رյ<EFBFBD>ѹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
R8_BAT_DET_CTRL = 0; // disable battery voltage monitoring
|
||||
sys_safe_access_disable();
|
||||
sys_safe_access_enable();
|
||||
R8_XT32K_TUNE = x32Kpw;
|
||||
@@ -379,11 +379,11 @@ void LowPower_Shutdown(uint16_t rm)
|
||||
FLASH_ROM_SW_RESET();
|
||||
x32Kpw = R8_XT32K_TUNE;
|
||||
x32Mpw = R8_XT32M_TUNE;
|
||||
x32Mpw = (x32Mpw & 0xfc) | 0x03; // 150%<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
x32Kpw = (x32Kpw & 0xfc) | 0x01; // LSE<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
x32Mpw = (x32Mpw & 0xfc) | 0x03; // 150% current
|
||||
x32Kpw = (x32Kpw & 0xfc) | 0x01; // LSE drive current reduced to normal
|
||||
|
||||
sys_safe_access_enable();
|
||||
R8_BAT_DET_CTRL = 0; // <EFBFBD>رյ<EFBFBD>ѹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
R8_BAT_DET_CTRL = 0; // disable battery voltage monitoring
|
||||
sys_safe_access_disable();
|
||||
sys_safe_access_enable();
|
||||
R8_XT32K_TUNE = x32Kpw;
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
/*********************************************************************
|
||||
* @fn SetSysClock
|
||||
*
|
||||
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>
|
||||
* @brief Configure main system clock
|
||||
*
|
||||
* @param sc - ϵͳʱ<EFBFBD><EFBFBD>Դѡ<EFBFBD><EFBFBD> refer to SYS_CLKTypeDef
|
||||
* @param sc - System clock source selection (refer to SYS_CLKTypeDef)
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
@@ -70,7 +70,7 @@ void SetSysClock(SYS_CLKTypeDef sc)
|
||||
/*********************************************************************
|
||||
* @fn GetSysClock
|
||||
*
|
||||
* @brief <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>ǰϵͳʱ<EFBFBD><EFBFBD>
|
||||
* @brief Get main system clock configuration
|
||||
*
|
||||
* @param none
|
||||
*
|
||||
@@ -82,15 +82,15 @@ uint32_t GetSysClock(void)
|
||||
|
||||
rev = R32_CLK_SYS_CFG & 0xff;
|
||||
if((rev & 0x40) == (0 << 6))
|
||||
{ // 32M<EFBFBD><EFBFBD><EFBFBD>з<EFBFBD>Ƶ
|
||||
{ // 32M HSE division
|
||||
return (32000000 / (rev & 0x1f));
|
||||
}
|
||||
else if((rev & RB_CLK_SYS_MOD) == (1 << 6))
|
||||
{ // PLL<EFBFBD><EFBFBD><EFBFBD>з<EFBFBD>Ƶ
|
||||
{ // 480M PLL division
|
||||
return (480000000 / (rev & 0x1f));
|
||||
}
|
||||
else
|
||||
{ // 32K<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ
|
||||
{ // 32KHz
|
||||
return (32000);
|
||||
}
|
||||
}
|
||||
@@ -119,7 +119,7 @@ uint8_t SYS_GetInfoSta(SYS_InfoStaTypeDef i)
|
||||
/*********************************************************************
|
||||
* @fn SYS_ResetExecute
|
||||
*
|
||||
* @brief ִ<EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ
|
||||
* @brief Perform a software reset
|
||||
*
|
||||
* @param none
|
||||
*
|
||||
@@ -137,9 +137,9 @@ void SYS_ResetExecute(void)
|
||||
/*********************************************************************
|
||||
* @fn SYS_DisableAllIrq
|
||||
*
|
||||
* @brief <EFBFBD>ر<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>жϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD>ж<EFBFBD>ֵ
|
||||
* @brief Disable all interrupts, get current interrupt values
|
||||
*
|
||||
* @param pirqv - <EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>ֵ
|
||||
* @param pirqv - Save old interrupt values
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
@@ -153,9 +153,9 @@ void SYS_DisableAllIrq(uint32_t *pirqv)
|
||||
/*********************************************************************
|
||||
* @fn SYS_RecoverIrq
|
||||
*
|
||||
* @brief <EFBFBD>ָ<EFBFBD>֮ǰ<EFBFBD>رյ<EFBFBD><EFBFBD>ж<EFBFBD>ֵ
|
||||
* @brief Restore all interrupts from previously stored values
|
||||
*
|
||||
* @param irq_status - <EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>ֵ
|
||||
* @param irq_status - Old interrupt values to restore
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
@@ -168,11 +168,11 @@ void SYS_RecoverIrq(uint32_t irq_status)
|
||||
/*********************************************************************
|
||||
* @fn SYS_GetSysTickCnt
|
||||
*
|
||||
* @brief <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>ǰϵͳ(SYSTICK)<29><><EFBFBD><EFBFBD>ֵ
|
||||
* @brief Get the current SysTick count
|
||||
*
|
||||
* @param none
|
||||
*
|
||||
* @return <EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
||||
* @return Current SysTick count
|
||||
*/
|
||||
uint32_t SYS_GetSysTickCnt(void)
|
||||
{
|
||||
@@ -255,7 +255,7 @@ void WWDG_ClearFlag(void)
|
||||
/*********************************************************************
|
||||
* @fn HardFault_Handler
|
||||
*
|
||||
* @brief Ӳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>жϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD>и<EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>ϵ縴λ
|
||||
* @brief Resets with a power-on reset on a hardware error
|
||||
*
|
||||
* @param none
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user