mbed library sources. Supersedes mbed-src.
Fork of mbed by
Diff: targets/hal/TARGET_STM/TARGET_STM32L4/rtc_api.c
- Revision:
- 34:bb6061527455
- Parent:
- 0:9b334a45a8ff
- Child:
- 48:b854a29e778d
diff -r 7b49ef75af0b -r bb6061527455 targets/hal/TARGET_STM/TARGET_STM32L4/rtc_api.c --- a/targets/hal/TARGET_STM/TARGET_STM32L4/rtc_api.c Thu Dec 03 15:15:11 2015 +0000 +++ b/targets/hal/TARGET_STM/TARGET_STM32L4/rtc_api.c Mon Dec 07 08:00:11 2015 +0000 @@ -48,6 +48,9 @@ RtcHandle.Instance = RTC; + // Check if RTC is already initialized + if ((RTC->ISR & RTC_ISR_INITS) == RTC_ISR_INITS) return; + // Enable Power clock __HAL_RCC_PWR_CLK_ENABLE();