[bsp][acm32]format utf-8

This commit is contained in:
latercomer 2024-04-21 01:16:11 -04:00 committed by Meco Man
parent 3f434feec9
commit 299f6e8ece
4 changed files with 33 additions and 33 deletions

View File

@ -1,4 +1,4 @@
/* /*
****************************************************************************** ******************************************************************************
* @file HAL_RTC.c * @file HAL_RTC.c
* @version V1.0.0 * @version V1.0.0
@ -24,7 +24,7 @@
* Description : Initialize the RTC peripheral * Description : Initialize the RTC peripheral
* Input : * Input :
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
HAL_StatusTypeDef HAL_RTC_Config(RTC_ConfigTypeDef *hrtc) HAL_StatusTypeDef HAL_RTC_Config(RTC_ConfigTypeDef *hrtc)
{ {

View File

@ -18,7 +18,7 @@
* Description : This function handles I2S interrupt request. * Description : This function handles I2S interrupt request.
* Input : * Input :
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
void HAL_I2S_IRQHandler(I2S_HandleTypeDef *hi2s) void HAL_I2S_IRQHandler(I2S_HandleTypeDef *hi2s)
{ {
@ -61,7 +61,7 @@ void HAL_I2S_IRQHandler(I2S_HandleTypeDef *hi2s)
* Description : * Description :
* Input : * Input :
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
__weak void HAL_I2S_MspInit(I2S_HandleTypeDef *hi2s) __weak void HAL_I2S_MspInit(I2S_HandleTypeDef *hi2s)
{ {
@ -101,7 +101,7 @@ __weak void HAL_I2S_MspInit(I2S_HandleTypeDef *hi2s)
* Description : * Description :
* Input : * Input :
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
__weak void HAL_I2S_MspDeInit(I2S_HandleTypeDef *hi2s) __weak void HAL_I2S_MspDeInit(I2S_HandleTypeDef *hi2s)
{ {
@ -133,7 +133,7 @@ __weak void HAL_I2S_MspDeInit(I2S_HandleTypeDef *hi2s)
* Input : hi2s: pointer to a I2S_HandleTypeDef structure that contains * Input : hi2s: pointer to a I2S_HandleTypeDef structure that contains
* the configuration information for I2S module * the configuration information for I2S module
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
HAL_StatusTypeDef HAL_I2S_Init(I2S_HandleTypeDef *hi2s) HAL_StatusTypeDef HAL_I2S_Init(I2S_HandleTypeDef *hi2s)
{ {
@ -155,7 +155,7 @@ HAL_StatusTypeDef HAL_I2S_Init(I2S_HandleTypeDef *hi2s)
hi2s->Instance->CTL = 0x00000000; hi2s->Instance->CTL = 0x00000000;
hi2s->Instance->PSC = 0x00000000; hi2s->Instance->PSC = 0x00000000;
/* Mode、Standard、CPOL、Dataformat */ /* Mode、Standard、CPOL、Dataformat */
hi2s->Instance->CTL = hi2s->Init.u32_Mode | hi2s->Init.u32_Standard | hi2s->Init.u32_CPOL | hi2s->Init.u32_DataFormat; hi2s->Instance->CTL = hi2s->Init.u32_Mode | hi2s->Init.u32_Standard | hi2s->Init.u32_CPOL | hi2s->Init.u32_DataFormat;
/* Frequency */ /* Frequency */
hi2s->Instance->PSC = hi2s->Init.u32_MCLKOutput | hi2s->Init.u32_FreqOF | hi2s->Init.u32_FreqDIV; hi2s->Instance->PSC = hi2s->Init.u32_MCLKOutput | hi2s->Init.u32_FreqOF | hi2s->Init.u32_FreqDIV;
@ -178,7 +178,7 @@ HAL_StatusTypeDef HAL_I2S_Init(I2S_HandleTypeDef *hi2s)
* Input : hi2s: pointer to a I2S_HandleTypeDef structure that contains * Input : hi2s: pointer to a I2S_HandleTypeDef structure that contains
* the configuration information for I2S module * the configuration information for I2S module
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
HAL_StatusTypeDef HAL_I2S_DeInit(I2S_HandleTypeDef *hi2s) HAL_StatusTypeDef HAL_I2S_DeInit(I2S_HandleTypeDef *hi2s)
{ {
@ -205,7 +205,7 @@ HAL_StatusTypeDef HAL_I2S_DeInit(I2S_HandleTypeDef *hi2s)
* Input : Size: number of data sample to be sent * Input : Size: number of data sample to be sent
* Input : fu32_Timeout: Timeout duration * Input : fu32_Timeout: Timeout duration
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
HAL_StatusTypeDef HAL_I2S_Transmit(I2S_HandleTypeDef *hi2s, uint32_t *fp32_Data, uint32_t fu32_Size, uint32_t fu32_Timeout) HAL_StatusTypeDef HAL_I2S_Transmit(I2S_HandleTypeDef *hi2s, uint32_t *fp32_Data, uint32_t fu32_Size, uint32_t fu32_Timeout)
{ {
@ -270,7 +270,7 @@ HAL_StatusTypeDef HAL_I2S_Transmit(I2S_HandleTypeDef *hi2s, uint32_t *fp32_Data,
* Input : Size: number of data sample to be Receive * Input : Size: number of data sample to be Receive
* Input : fu32_Timeout: Timeout duration * Input : fu32_Timeout: Timeout duration
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
HAL_StatusTypeDef HAL_I2S_Receive(I2S_HandleTypeDef *hi2s, uint32_t *fp32_Data, uint32_t fu32_Size, uint32_t fu32_Timeout) HAL_StatusTypeDef HAL_I2S_Receive(I2S_HandleTypeDef *hi2s, uint32_t *fp32_Data, uint32_t fu32_Size, uint32_t fu32_Timeout)
{ {
@ -338,7 +338,7 @@ HAL_StatusTypeDef HAL_I2S_Receive(I2S_HandleTypeDef *hi2s, uint32_t *fp32_Data,
* Input : fp32_Data: a 32-bit pointer to data buffer. * Input : fp32_Data: a 32-bit pointer to data buffer.
* Input : Size: number of data sample to be send * Input : Size: number of data sample to be send
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
HAL_StatusTypeDef HAL_I2S_Transmit_IT(I2S_HandleTypeDef *hi2s, uint32_t *fp32_Data, uint32_t fu32_Size) HAL_StatusTypeDef HAL_I2S_Transmit_IT(I2S_HandleTypeDef *hi2s, uint32_t *fp32_Data, uint32_t fu32_Size)
{ {
@ -373,7 +373,7 @@ HAL_StatusTypeDef HAL_I2S_Transmit_IT(I2S_HandleTypeDef *hi2s, uint32_t *fp32_Da
* Input : fp32_Data: a 32-bit pointer to data buffer. * Input : fp32_Data: a 32-bit pointer to data buffer.
* Input : Size: number of data sample to be Receive * Input : Size: number of data sample to be Receive
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
HAL_StatusTypeDef HAL_I2S_Receive_IT(I2S_HandleTypeDef *hi2s, uint32_t *fp32_Data, uint32_t fu32_Size) HAL_StatusTypeDef HAL_I2S_Receive_IT(I2S_HandleTypeDef *hi2s, uint32_t *fp32_Data, uint32_t fu32_Size)
{ {
@ -419,7 +419,7 @@ HAL_StatusTypeDef HAL_I2S_Receive_IT(I2S_HandleTypeDef *hi2s, uint32_t *fp32_Dat
* Input : fp32_Data: 32-bit pointer to data buffer. * Input : fp32_Data: 32-bit pointer to data buffer.
* Input : Size: number of data sample to be sent * Input : Size: number of data sample to be sent
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
HAL_StatusTypeDef HAL_I2S_Transmit_DMA(I2S_HandleTypeDef *hi2s, uint32_t *fp32_Data, uint32_t fu32_Size) HAL_StatusTypeDef HAL_I2S_Transmit_DMA(I2S_HandleTypeDef *hi2s, uint32_t *fp32_Data, uint32_t fu32_Size)
{ {
@ -458,7 +458,7 @@ HAL_StatusTypeDef HAL_I2S_Transmit_DMA(I2S_HandleTypeDef *hi2s, uint32_t *fp32_D
* Input : fp32_Data: a 32-bit pointer to data buffer. * Input : fp32_Data: a 32-bit pointer to data buffer.
* Input : Size: number of data sample to be Receive * Input : Size: number of data sample to be Receive
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
HAL_StatusTypeDef HAL_I2S_Receive_DMA(I2S_HandleTypeDef *hi2s, uint32_t *fp32_Data, uint32_t fu32_Size) HAL_StatusTypeDef HAL_I2S_Receive_DMA(I2S_HandleTypeDef *hi2s, uint32_t *fp32_Data, uint32_t fu32_Size)
{ {

View File

@ -18,7 +18,7 @@
* Description : LPUART IRQHander * Description : LPUART IRQHander
* Input : * Input :
* Outpu : * Outpu :
* Author : CWT Data : 2020 * Author : CWT Data : 2020
**********************************************************************************/ **********************************************************************************/
void HAL_LPUART_IRQHander(LPUART_HandleTypeDef *hlpuart) void HAL_LPUART_IRQHander(LPUART_HandleTypeDef *hlpuart)
{ {
@ -85,7 +85,7 @@ __weak void HAL_LPUART_MSPInit(LPUART_HandleTypeDef *hlpuart)
* Input : hcan : pointer to a CAN_HandleTypeDef structure that contains * Input : hcan : pointer to a CAN_HandleTypeDef structure that contains
* the configuration information for CAN module * the configuration information for CAN module
* Output : * Output :
* Author : CWT Data : 2020 * Author : CWT Data : 2020
**********************************************************************************/ **********************************************************************************/
void HAL_LPUART_MspDeInit(LPUART_HandleTypeDef *hlpuart) void HAL_LPUART_MspDeInit(LPUART_HandleTypeDef *hlpuart)
{ {
@ -224,7 +224,7 @@ uint8_t HAL_LPUART_Config(LPUART_HandleTypeDef *hlpuart)
* Description : Select the LPUART clock. * Description : Select the LPUART clock.
* Input : lpuart_clk_src:Could be LPUART_CLOCK_SOURCE_RC32K LPUART_CLOCK_SOURCE_XTAL LPUART_CLOCK_SOURCE_PLL_DIV * Input : lpuart_clk_src:Could be LPUART_CLOCK_SOURCE_RC32K LPUART_CLOCK_SOURCE_XTAL LPUART_CLOCK_SOURCE_PLL_DIV
* Outpu : * Outpu :
* Author : CWT Data : 2020 * Author : CWT Data : 2020
**********************************************************************************/ **********************************************************************************/
void LPUART_Clock_Select(uint8_t lpuart_clk_src) void LPUART_Clock_Select(uint8_t lpuart_clk_src)
{ {

View File

@ -24,7 +24,7 @@
* Description : Initialize the RTC peripheral * Description : Initialize the RTC peripheral
* Input : * Input :
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
HAL_StatusTypeDef HAL_RTC_Config(RTC_ConfigTypeDef *hrtc) HAL_StatusTypeDef HAL_RTC_Config(RTC_ConfigTypeDef *hrtc)
{ {
@ -75,7 +75,7 @@ HAL_StatusTypeDef HAL_RTC_Config(RTC_ConfigTypeDef *hrtc)
* Description : Set RTC current time. * Description : Set RTC current time.
* Input : fp_Time Pointer to Time structure. * Input : fp_Time Pointer to Time structure.
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
void HAL_RTC_SetTime(RTC_TimeTypeDef *fp_Time) void HAL_RTC_SetTime(RTC_TimeTypeDef *fp_Time)
{ {
@ -102,7 +102,7 @@ void HAL_RTC_SetTime(RTC_TimeTypeDef *fp_Time)
* Description : Get RTC current time. * Description : Get RTC current time.
* Input : fp_Time Pointer to Time structure. * Input : fp_Time Pointer to Time structure.
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
void HAL_RTC_GetTime(RTC_TimeTypeDef *fp_Time) void HAL_RTC_GetTime(RTC_TimeTypeDef *fp_Time)
{ {
@ -116,7 +116,7 @@ void HAL_RTC_GetTime(RTC_TimeTypeDef *fp_Time)
* Description : Set RTC current Date. * Description : Set RTC current Date.
* Input : fp_Date Pointer to Date structure. * Input : fp_Date Pointer to Date structure.
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
void HAL_RTC_SetDate(RTC_DateTypeDef *fp_Date) void HAL_RTC_SetDate(RTC_DateTypeDef *fp_Date)
{ {
@ -145,7 +145,7 @@ void HAL_RTC_SetDate(RTC_DateTypeDef *fp_Date)
* Description : Get RTC current Date. * Description : Get RTC current Date.
* Input : fp_Date Pointer to Date structure. * Input : fp_Date Pointer to Date structure.
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
void HAL_RTC_GetDate(RTC_DateTypeDef *fp_Date) void HAL_RTC_GetDate(RTC_DateTypeDef *fp_Date)
{ {
@ -160,7 +160,7 @@ void HAL_RTC_GetDate(RTC_DateTypeDef *fp_Date)
* Description : Alarm Config * Description : Alarm Config
* Input : fp_Alarm Pointer to ALarm structure. * Input : fp_Alarm Pointer to ALarm structure.
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
void HAL_RTC_AlarmConfig(RTC_AlarmTypeDef *fp_Alarm) void HAL_RTC_AlarmConfig(RTC_AlarmTypeDef *fp_Alarm)
{ {
@ -197,7 +197,7 @@ void HAL_RTC_AlarmConfig(RTC_AlarmTypeDef *fp_Alarm)
lu32_WeekDay = fp_Alarm->u32_AlarmDay; lu32_WeekDay = fp_Alarm->u32_AlarmDay;
} }
/* Coinfig Week/Day、Hour、Min、Sec */ /* Coinfig Week/Day、Hour、Min、Sec */
RTC->ALM = fp_Alarm->u32_AlarmMode | lu32_WeekDay | fp_Alarm->u32_Hours << 16 | fp_Alarm->u32_Minutes << 8 | fp_Alarm->u32_Seconds; RTC->ALM = fp_Alarm->u32_AlarmMode | lu32_WeekDay | fp_Alarm->u32_Hours << 16 | fp_Alarm->u32_Minutes << 8 | fp_Alarm->u32_Seconds;
/* Interrupt Enable */ /* Interrupt Enable */
@ -218,7 +218,7 @@ void HAL_RTC_AlarmConfig(RTC_AlarmTypeDef *fp_Alarm)
* Description : Alarm Enable * Description : Alarm Enable
* Input : * Input :
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
void HAL_RTC_AlarmEnable(void) void HAL_RTC_AlarmEnable(void)
{ {
@ -230,7 +230,7 @@ void HAL_RTC_AlarmEnable(void)
* Description : Alarm Disable * Description : Alarm Disable
* Input : * Input :
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
void HAL_RTC_AlarmDisable(void) void HAL_RTC_AlarmDisable(void)
{ {
@ -239,10 +239,10 @@ void HAL_RTC_AlarmDisable(void)
/********************************************************************************* /*********************************************************************************
* Function : HAL_RTC_Tamper * Function : HAL_RTC_Tamper
* Description : Temper1 use PC13Temper2 use PA0 * Description : Temper1 use PC13Temper2 use PA0
* Input : * Input :
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
void HAL_RTC_Tamper(enum_Temper_t fe_Temper, RTC_TemperTypeDef *fp_Temper) void HAL_RTC_Tamper(enum_Temper_t fe_Temper, RTC_TemperTypeDef *fp_Temper)
{ {
@ -342,7 +342,7 @@ void HAL_RTC_Tamper(enum_Temper_t fe_Temper, RTC_TemperTypeDef *fp_Temper)
* Description : * Description :
* Input : * Input :
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
void HAL_RTC_TamperEnable(enum_Temper_t fe_Temper) void HAL_RTC_TamperEnable(enum_Temper_t fe_Temper)
{ {
@ -361,7 +361,7 @@ void HAL_RTC_TamperEnable(enum_Temper_t fe_Temper)
* Description : * Description :
* Input : * Input :
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
**********************************************************************************/ **********************************************************************************/
void HAL_RTC_TamperDisable(enum_Temper_t fe_Temper) void HAL_RTC_TamperDisable(enum_Temper_t fe_Temper)
{ {
@ -382,7 +382,7 @@ void HAL_RTC_TamperDisable(enum_Temper_t fe_Temper)
* 1: Falling edge * 1: Falling edge
* fe_Wakeup : wakeup source select, STANDBY_WAKEUP_RISING, STANDBY_WAKEUP_FALLING * fe_Wakeup : wakeup source select, STANDBY_WAKEUP_RISING, STANDBY_WAKEUP_FALLING
* Outpu : * Outpu :
* Author : Chris_Kyle Data : 2020 * Author : Chris_Kyle Data : 2020
*******************************************************************************************************/ *******************************************************************************************************/
void HAL_RTC_Standby_Wakeup(enum_WKUP_t fe_Wakeup, uint32_t fu32_Edge) void HAL_RTC_Standby_Wakeup(enum_WKUP_t fe_Wakeup, uint32_t fu32_Edge)
{ {
@ -395,7 +395,7 @@ void HAL_RTC_Standby_Wakeup(enum_WKUP_t fe_Wakeup, uint32_t fu32_Edge)
case RTC_WAKEUP_WKUP5: case RTC_WAKEUP_WKUP5:
case RTC_WAKEUP_WKUP6: case RTC_WAKEUP_WKUP6:
{ {
/* Clear flags、Standby Enable */ /* Clear flags、Standby Enable */
PMU->CR1 |= RPMU_CR_STB_EN | RPMU_CR_CWUF | RPMU_CR_CSBF; PMU->CR1 |= RPMU_CR_STB_EN | RPMU_CR_CWUF | RPMU_CR_CSBF;
/* Wakeup IO Filter Enable */ /* Wakeup IO Filter Enable */
@ -430,7 +430,7 @@ void HAL_RTC_Standby_Wakeup(enum_WKUP_t fe_Wakeup, uint32_t fu32_Edge)
case RTC_WAKEUP_HOUR: case RTC_WAKEUP_HOUR:
case RTC_WAKEUP_DATE: case RTC_WAKEUP_DATE:
{ {
/* Clear flags、Standby Enable */ /* Clear flags、Standby Enable */
PMU->CR1 |= RPMU_CR_STB_EN | RPMU_CR_CWUF | RPMU_CR_CSBF; PMU->CR1 |= RPMU_CR_STB_EN | RPMU_CR_CWUF | RPMU_CR_CSBF;
RTC->SR |= fe_Wakeup; RTC->SR |= fe_Wakeup;