Skip to content

Commit 574e7b7

Browse files
committed
STM32F2 - Rename RTC_LSI
1 parent a4db938 commit 574e7b7

File tree

1 file changed

+6
-6
lines changed
  • hal/targets/hal/TARGET_STM/TARGET_STM32F2

1 file changed

+6
-6
lines changed

hal/targets/hal/TARGET_STM/TARGET_STM32F2/rtc_api.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
#include "mbed_error.h"
3535

36-
#if DEVICE_RTC_LSI
36+
#if RTC_LSI
3737
static int rtc_inited = 0;
3838
#endif
3939

@@ -44,13 +44,13 @@ void rtc_init(void)
4444
RCC_OscInitTypeDef RCC_OscInitStruct;
4545
uint32_t rtc_freq = 0;
4646

47-
#if DEVICE_RTC_LSI
47+
#if RTC_LSI
4848
rtc_inited = 1;
4949
#endif
5050

5151
RtcHandle.Instance = RTC;
5252

53-
#if !DEVICE_RTC_LSI
53+
#if !RTC_LSI
5454
// Enable LSE Oscillator
5555
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSE;
5656
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE; /* Mandatory, otherwise the PLL is reconfigured! */
@@ -106,7 +106,7 @@ void rtc_init(void)
106106

107107
void rtc_free(void)
108108
{
109-
#if DEVICE_RTC_LSI
109+
#if RTC_LSI
110110
// Enable Power clock
111111
__PWR_CLK_ENABLE();
112112

@@ -128,14 +128,14 @@ void rtc_free(void)
128128
RCC_OscInitStruct.LSIState = RCC_LSI_OFF;
129129
RCC_OscInitStruct.LSEState = RCC_LSE_OFF;
130130
HAL_RCC_OscConfig(&RCC_OscInitStruct);
131-
#if DEVICE_RTC_LSI
131+
#if RTC_LSI
132132
rtc_inited = 0;
133133
#endif
134134
}
135135

136136
int rtc_isenabled(void)
137137
{
138-
#if DEVICE_RTC_LSI
138+
#if RTC_LSI
139139
return rtc_inited;
140140
#else
141141
if ((RTC->ISR & RTC_ISR_INITS) == RTC_ISR_INITS) {

0 commit comments

Comments
 (0)