From 57965589037902fc9053305d1115d11a299c2fd7 Mon Sep 17 00:00:00 2001 From: redstonee <1516235445@qq.com> Date: Sat, 22 Mar 2025 19:56:57 +0800 Subject: [PATCH 1/3] Fix some warinings --- AIR001xx_HAL_Driver/Src/air001xx_ll_utils.c | 2 +- CMSIS/Include/cmsis_gcc.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AIR001xx_HAL_Driver/Src/air001xx_ll_utils.c b/AIR001xx_HAL_Driver/Src/air001xx_ll_utils.c index 11d8356..a95a482 100644 --- a/AIR001xx_HAL_Driver/Src/air001xx_ll_utils.c +++ b/AIR001xx_HAL_Driver/Src/air001xx_ll_utils.c @@ -353,7 +353,7 @@ ErrorStatus LL_SetFlashLatency(uint32_t HCLKFrequency) /* Frequency cannot be equal to 0 or greater than max clock */ if ((HCLKFrequency == 0U) || (HCLKFrequency > UTILS_SCALE1_LATENCY2_FREQ)) { - status = ERROR; + return ERROR; } else { diff --git a/CMSIS/Include/cmsis_gcc.h b/CMSIS/Include/cmsis_gcc.h index bb89fbb..baea031 100644 --- a/CMSIS/Include/cmsis_gcc.h +++ b/CMSIS/Include/cmsis_gcc.h @@ -147,7 +147,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_xPSR(void) */ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_PSP(void) { - register uint32_t result; + uint32_t result; __ASM volatile ("MRS %0, psp\n" : "=r" (result) ); return(result); @@ -172,7 +172,7 @@ __attribute__( ( always_inline ) ) __STATIC_INLINE void __set_PSP(uint32_t topOf */ __attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_MSP(void) { - register uint32_t result; + uint32_t result; __ASM volatile ("MRS %0, msp\n" : "=r" (result) ); return(result); From 501f8dcc01e97c867a4eaae5667fe6fc2bbfd2b9 Mon Sep 17 00:00:00 2001 From: redstonee <1516235445@qq.com> Date: Tue, 6 May 2025 10:40:17 +0800 Subject: [PATCH 2/3] Remove the `register` shit --- AIR001xx_HAL_Driver/Inc/air001xx_ll_usart.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AIR001xx_HAL_Driver/Inc/air001xx_ll_usart.h b/AIR001xx_HAL_Driver/Inc/air001xx_ll_usart.h index 3cab55d..78f97f5 100644 --- a/AIR001xx_HAL_Driver/Inc/air001xx_ll_usart.h +++ b/AIR001xx_HAL_Driver/Inc/air001xx_ll_usart.h @@ -998,8 +998,8 @@ __STATIC_INLINE void LL_USART_SetBaudRate(USART_TypeDef *USARTx, uint32_t Periph */ __STATIC_INLINE uint32_t LL_USART_GetBaudRate(USART_TypeDef *USARTx, uint32_t PeriphClk, uint32_t OverSampling) { - register uint32_t usartdiv = 0x0U; - register uint32_t brrresult = 0x0U; + uint32_t usartdiv = 0x0U; + uint32_t brrresult = 0x0U; usartdiv = USARTx->BRR; From e92dc5145401d190b0f55dcb817db06ddd2d1471 Mon Sep 17 00:00:00 2001 From: redstonee <1516235445@qq.com> Date: Thu, 29 May 2025 17:25:51 +0800 Subject: [PATCH 3/3] Fix a fuck-up --- AIR001xx_HAL_Driver/Inc/air001xx_hal_i2c.h | 1 + 1 file changed, 1 insertion(+) diff --git a/AIR001xx_HAL_Driver/Inc/air001xx_hal_i2c.h b/AIR001xx_HAL_Driver/Inc/air001xx_hal_i2c.h index 58e9f6d..8e8cef2 100644 --- a/AIR001xx_HAL_Driver/Inc/air001xx_hal_i2c.h +++ b/AIR001xx_HAL_Driver/Inc/air001xx_hal_i2c.h @@ -30,6 +30,7 @@ extern "C" { /* Includes ------------------------------------------------------------------*/ #include "air001xx_hal_def.h" +#include "air001xx_hal_dma.h" /** @addtogroup AIRF1xx_HAL_Driver * @{