From 492245e03919ac4b7c3c5e8f665acd0b9fbd0adc Mon Sep 17 00:00:00 2001 From: YunHorn Technology <dp.s@yunhorn.com> Date: Thu, 14 Mar 2024 11:15:00 +0800 Subject: [PATCH] remove unused code --- Core/Src/rtc.c | 7 ++++++- Core/Src/stm32wlxx_it.c | 7 +++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Core/Src/rtc.c b/Core/Src/rtc.c index 7c2121f..5b18b22 100644 --- a/Core/Src/rtc.c +++ b/Core/Src/rtc.c @@ -60,13 +60,15 @@ void MX_RTC_Init(void) /* USER CODE BEGIN Check_RTC_BKUP */ /* USER CODE END Check_RTC_BKUP */ - +#if 1 /** Initialize RTC and set the Time and Date */ if (HAL_RTCEx_SetSSRU_IT(&hrtc) != HAL_OK) { Error_Handler(); } +#endif + #if 0 /** Enable the Alarm A */ @@ -110,10 +112,13 @@ void HAL_RTC_MspInit(RTC_HandleTypeDef* rtcHandle) __HAL_RCC_RTCAPB_CLK_ENABLE(); /* RTC interrupt Init */ + HAL_NVIC_SetPriority(TAMP_STAMP_LSECSS_SSRU_IRQn, 0, 0); HAL_NVIC_EnableIRQ(TAMP_STAMP_LSECSS_SSRU_IRQn); + HAL_NVIC_SetPriority(RTC_Alarm_IRQn, 0, 0); HAL_NVIC_EnableIRQ(RTC_Alarm_IRQn); + /* USER CODE BEGIN RTC_MspInit 1 */ /* USER CODE END RTC_MspInit 1 */ diff --git a/Core/Src/stm32wlxx_it.c b/Core/Src/stm32wlxx_it.c index 05b659b..cbfcd3b 100644 --- a/Core/Src/stm32wlxx_it.c +++ b/Core/Src/stm32wlxx_it.c @@ -392,7 +392,6 @@ void EXTI9_5_IRQHandler(void) /* USER CODE END EXTI9_5_IRQn 1 */ } -#if 0 /** * @brief This function handles EXTI Lines [9:5] Interrupt. */ @@ -408,7 +407,7 @@ void EXTI15_10_IRQHandler(void) /* USER CODE END EXTI15_10_IRQn 1 */ } -#endif + /** @@ -424,7 +423,7 @@ void USART2_IRQHandler(void) /* USER CODE END USART2_IRQn 1 */ } -#if 0 + /** * @brief This function handles RTC Alarms (A and B) Interrupt. */ @@ -440,7 +439,7 @@ void RTC_Alarm_IRQHandler(void) /* USER CODE END RTC_Alarm_IRQn 1 */ } -#endif + /** * @brief This function handles SUBGHZ Radio Interrupt. */