diff options
Diffstat (limited to 'ports/stm32/rtc.c')
| -rw-r--r-- | ports/stm32/rtc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/stm32/rtc.c b/ports/stm32/rtc.c index 92b669dfc..9891981b9 100644 --- a/ports/stm32/rtc.c +++ b/ports/stm32/rtc.c @@ -383,7 +383,7 @@ STATIC HAL_StatusTypeDef PYB_RTC_MspInit_Finalise(RTC_HandleTypeDef *hrtc) { #endif uint32_t tickstart = rtc_startup_tick; while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET) { - if ((HAL_GetTick() - tickstart ) > timeout) { + if ((HAL_GetTick() - tickstart) > timeout) { return HAL_TIMEOUT; } } @@ -391,7 +391,7 @@ STATIC HAL_StatusTypeDef PYB_RTC_MspInit_Finalise(RTC_HandleTypeDef *hrtc) { // we now have to wait for LSI ready or timeout uint32_t tickstart = rtc_startup_tick; while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == RESET) { - if ((HAL_GetTick() - tickstart ) > MICROPY_HW_RTC_LSI_TIMEOUT_MS) { + if ((HAL_GetTick() - tickstart) > MICROPY_HW_RTC_LSI_TIMEOUT_MS) { return HAL_TIMEOUT; } } |
