Skip to content

Commit 57208bb

Browse files
committed
STM32F7 - Rename RTC_LSI
1 parent a0fd0d3 commit 57208bb

File tree

1 file changed

+8
-8
lines changed
  • hal/targets/hal/TARGET_STM/TARGET_STM32F7

1 file changed

+8
-8
lines changed

hal/targets/hal/TARGET_STM/TARGET_STM32F7/rtc_api.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@
3434

3535
#include "mbed_error.h"
3636

37-
#if DEVICE_RTC_LSI
37+
#if RTC_LSI
3838
static int rtc_inited = 0;
3939
#endif
4040

4141
static RTC_HandleTypeDef RtcHandle;
4242

43-
#if DEVICE_RTC_LSI
43+
#if RTC_LSI
4444
#define RTC_CLOCK LSI_VALUE
4545
#else
4646
#define RTC_CLOCK LSE_VALUE
@@ -63,14 +63,14 @@ void rtc_init(void)
6363
{
6464
RCC_OscInitTypeDef RCC_OscInitStruct;
6565

66-
#if DEVICE_RTC_LSI
66+
#if RTC_LSI
6767
if (rtc_inited) return;
6868
rtc_inited = 1;
6969
#endif
7070

7171
RtcHandle.Instance = RTC;
7272

73-
#if !DEVICE_RTC_LSI
73+
#if !RTC_LSI
7474
// Enable LSE Oscillator
7575
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSE;
7676
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE; // Mandatory, otherwise the PLL is reconfigured!
@@ -122,7 +122,7 @@ void rtc_init(void)
122122
}
123123

124124
#if DEVICE_LOWPOWERTIMER
125-
#if DEVICE_RTC_LSI
125+
#if RTC_LSI
126126
rtc_write(0);
127127
#else
128128
if (!rtc_isenabled()) {
@@ -138,7 +138,7 @@ void rtc_init(void)
138138

139139
void rtc_free(void)
140140
{
141-
#if DEVICE_RTC_LSI
141+
#if RTC_LSI
142142
// Enable Power clock
143143
__PWR_CLK_ENABLE();
144144

@@ -161,14 +161,14 @@ void rtc_free(void)
161161
RCC_OscInitStruct.LSEState = RCC_LSE_OFF;
162162
HAL_RCC_OscConfig(&RCC_OscInitStruct);
163163

164-
#if DEVICE_RTC_LSI
164+
#if RTC_LSI
165165
rtc_inited = 0;
166166
#endif
167167
}
168168

169169
int rtc_isenabled(void)
170170
{
171-
#if DEVICE_RTC_LSI
171+
#if RTC_LSI
172172
return rtc_inited;
173173
#else
174174
if ((RTC->ISR & RTC_ISR_INITS) == RTC_ISR_INITS) {

0 commit comments

Comments
 (0)