编码转换: GBK -> UTF-8,所有.c/.h源文件中文注释统一UTF-8编码

This commit is contained in:
wangfq
2026-07-20 09:07:46 +08:00
parent b1637a13be
commit 8157ce41bd
62 changed files with 1969 additions and 1969 deletions
+43 -43
View File
@@ -15,9 +15,9 @@
/*********************************************************************
* @fn PWR_DCDCCfg
*
* @brief 启用内部DC/DC电源,用于节约系统功耗
* @brief 启用内部DC/DC电源,用于节约系统功耗
*
* @param s - 是否打开DCDC电源
* @param s - 是否打开DCDC电源
*
* @return none
*/
@@ -30,7 +30,7 @@ void PWR_DCDCCfg(FunctionalState s)
{
adj &= ~RB_DCDC_CHARGE;
plan &= ~(RB_PWR_DCDC_EN | RB_PWR_DCDC_PRE); // 旁路 DC/DC
plan &= ~(RB_PWR_DCDC_EN | RB_PWR_DCDC_PRE); // 旁路 DC/DC
sys_safe_access_enable();
R16_AUX_POWER_ADJ = adj;
R16_POWER_PLAN = plan;
@@ -60,9 +60,9 @@ void PWR_DCDCCfg(FunctionalState s)
/*********************************************************************
* @fn PWR_UnitModCfg
*
* @brief 可控单元模块的电源控制
* @brief 可控单元模块的电源控制
*
* @param s - 是否打开电源
* @param s - 是否打开电源
* @param unit - please refer to unit of controllable power supply
*
* @return none
@@ -71,11 +71,11 @@ void PWR_UnitModCfg(FunctionalState s, uint8_t unit)
{
uint8_t ck32k_cfg = R8_CK32K_CONFIG;
if(s == DISABLE) //关闭
if(s == DISABLE) //关闭
{
ck32k_cfg &= ~(unit & 0x03);
}
else //打开
else //打开
{
ck32k_cfg |= (unit & 0x03);
}
@@ -88,9 +88,9 @@ void PWR_UnitModCfg(FunctionalState s, uint8_t unit)
/*********************************************************************
* @fn PWR_PeriphClkCfg
*
* @brief 外设时钟控制位
* @brief 外设时钟控制位
*
* @param s - 是否打开对应外设时钟
* @param s - 是否打开对应外设时钟
* @param perph - please refer to Peripher CLK control bit define
*
* @return none
@@ -116,14 +116,14 @@ void PWR_PeriphClkCfg(FunctionalState s, uint16_t perph)
/*********************************************************************
* @fn PWR_PeriphWakeUpCfg
*
* @brief 睡眠唤醒源配置
* @brief 睡眠唤醒源配置
*
* @param s - 是否打开此外设睡眠唤醒功能
* @param perph - 需要设置的唤醒源
* RB_SLP_USB_WAKE - USB 为唤醒源
* RB_SLP_RTC_WAKE - RTC 为唤醒源
* RB_SLP_GPIO_WAKE - GPIO 为唤醒源
* RB_SLP_BAT_WAKE - BAT 为唤醒源
* @param s - 是否打开此外设睡眠唤醒功能
* @param perph - 需要设置的唤醒源
* RB_SLP_USB_WAKE - USB 为唤醒源
* RB_SLP_RTC_WAKE - RTC 为唤醒源
* RB_SLP_GPIO_WAKE - GPIO 为唤醒源
* RB_SLP_BAT_WAKE - BAT 为唤醒源
* @param mode - refer to WakeUP_ModeypeDef
*
* @return none
@@ -170,9 +170,9 @@ void PWR_PeriphWakeUpCfg(FunctionalState s, uint8_t perph, WakeUP_ModeypeDef mod
/*********************************************************************
* @fn PowerMonitor
*
* @brief 电源监控
* @brief 电源监控
*
* @param s - 是否打开此功能
* @param s - 是否打开此功能
* @param vl - refer to VolM_LevelypeDef
*
* @return none
@@ -216,7 +216,7 @@ void PowerMonitor(FunctionalState s, VolM_LevelypeDef vl)
/*********************************************************************
* @fn LowPower_Idle
*
* @brief 低功耗-Idle模式
* @brief 低功耗-Idle模式
*
* @param none
*
@@ -226,7 +226,7 @@ __HIGH_CODE
void LowPower_Idle(void)
{
FLASH_ROM_SW_RESET();
R8_FLASH_CTRL = 0x04; //flash关闭
R8_FLASH_CTRL = 0x04; //flash关闭
PFIC->SCTLR &= ~(1 << 2); // sleep
__WFI();
@@ -237,7 +237,7 @@ void LowPower_Idle(void)
/*********************************************************************
* @fn LowPower_Halt
*
* @brief 低功耗-Halt模式,此低功耗切到HSI/5时钟运行,唤醒后需要用户自己重新选择系统时钟源
* @brief 低功耗-Halt模式,此低功耗切到HSI/5时钟运行,唤醒后需要用户自己重新选择系统时钟源
*
* @param none
*
@@ -249,14 +249,14 @@ void LowPower_Halt(void)
uint8_t x32Kpw, x32Mpw;
FLASH_ROM_SW_RESET();
R8_FLASH_CTRL = 0x04; //flash关闭
R8_FLASH_CTRL = 0x04; //flash关闭
x32Kpw = R8_XT32K_TUNE;
x32Mpw = R8_XT32M_TUNE;
x32Mpw = (x32Mpw & 0xfc) | 0x03; // 150%额定电流
x32Kpw = (x32Kpw & 0xfc) | 0x01; // LSE驱动电流降低到额定电流
x32Mpw = (x32Mpw & 0xfc) | 0x03; // 150%额定电流
x32Kpw = (x32Kpw & 0xfc) | 0x01; // LSE驱动电流降低到额定电流
sys_safe_access_enable();
R8_BAT_DET_CTRL = 0; // 关闭电压监控
R8_BAT_DET_CTRL = 0; // 关闭电压监控
sys_safe_access_disable();
sys_safe_access_enable();
R8_XT32K_TUNE = x32Kpw;
@@ -277,14 +277,14 @@ void LowPower_Halt(void)
/*******************************************************************************
* Function Name : LowPower_Sleep
* Description : 低功耗-Sleep模式。
注意当主频为80M时,睡眠唤醒中断不可调用flash内代码,且退出此函数前需要加上30us延迟。
* Description : 低功耗-Sleep模式。
注意当主频为80M时,睡眠唤醒中断不可调用flash内代码,且退出此函数前需要加上30us延迟。
* Input : rm:
RB_PWR_RAM2K - 2K retention SRAM 供电
RB_PWR_RAM24K - 24K main SRAM 供电
RB_PWR_EXTEND - USB 和 BLE 单元保留区域供电
RB_PWR_XROM - FlashROM 供电
NULL - 以上单元都断电
RB_PWR_RAM2K - 2K retention SRAM 供电
RB_PWR_RAM24K - 24K main SRAM 供电
RB_PWR_EXTEND - USB 和 BLE 单元保留区域供电
RB_PWR_XROM - FlashROM 供电
NULL - 以上单元都断电
* Return : None
*******************************************************************************/
__HIGH_CODE
@@ -297,10 +297,10 @@ void LowPower_Sleep(uint16_t rm)
GetMACAddress(MacAddr);
x32Mpw = R8_XT32M_TUNE;
x32Mpw = (x32Mpw & 0xfc) | 0x03; // 150%额定电流
x32Mpw = (x32Mpw & 0xfc) | 0x03; // 150%额定电流
sys_safe_access_enable();
R8_BAT_DET_CTRL = 0; // 关闭电压监控
R8_BAT_DET_CTRL = 0; // 关闭电压监控
sys_safe_access_disable();
sys_safe_access_enable();
R8_XT32M_TUNE = x32Mpw;
@@ -350,13 +350,13 @@ void LowPower_Sleep(uint16_t rm)
/*********************************************************************
* @fn LowPower_Shutdown
*
* @brief 低功耗-Shutdown模式,此低功耗切到HSI/5时钟运行,唤醒后需要用户自己重新选择系统时钟源
* @note 注意调用此函数,DCDC功能强制关闭,唤醒后可以手动再次打开
* @brief 低功耗-Shutdown模式,此低功耗切到HSI/5时钟运行,唤醒后需要用户自己重新选择系统时钟源
* @note 注意调用此函数,DCDC功能强制关闭,唤醒后可以手动再次打开
*
* @param rm - 供电模块选择
* RB_PWR_RAM2K - 2K retention SRAM 供电
* RB_PWR_RAM16K - 16K main SRAM 供电
* NULL - 以上单元都断电
* @param rm - 供电模块选择
* RB_PWR_RAM2K - 2K retention SRAM 供电
* RB_PWR_RAM16K - 16K main SRAM 供电
* NULL - 以上单元都断电
*
* @return none
*/
@@ -368,11 +368,11 @@ void LowPower_Shutdown(uint16_t rm)
FLASH_ROM_SW_RESET();
x32Kpw = R8_XT32K_TUNE;
x32Mpw = R8_XT32M_TUNE;
x32Mpw = (x32Mpw & 0xfc) | 0x03; // 150%额定电流
x32Kpw = (x32Kpw & 0xfc) | 0x01; // LSE驱动电流降低到额定电流
x32Mpw = (x32Mpw & 0xfc) | 0x03; // 150%额定电流
x32Kpw = (x32Kpw & 0xfc) | 0x01; // LSE驱动电流降低到额定电流
sys_safe_access_enable();
R8_BAT_DET_CTRL = 0; // 关闭电压监控
R8_BAT_DET_CTRL = 0; // 关闭电压监控
sys_safe_access_disable();
sys_safe_access_enable();
R8_XT32K_TUNE = x32Kpw;