File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
hal/targets/hal/TARGET_STM/TARGET_STM32F2 Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 33
33
34
34
#include "mbed_error.h"
35
35
36
- #if DEVICE_RTC_LSI
36
+ #if RTC_LSI
37
37
static int rtc_inited = 0 ;
38
38
#endif
39
39
@@ -44,13 +44,13 @@ void rtc_init(void)
44
44
RCC_OscInitTypeDef RCC_OscInitStruct ;
45
45
uint32_t rtc_freq = 0 ;
46
46
47
- #if DEVICE_RTC_LSI
47
+ #if RTC_LSI
48
48
rtc_inited = 1 ;
49
49
#endif
50
50
51
51
RtcHandle .Instance = RTC ;
52
52
53
- #if !DEVICE_RTC_LSI
53
+ #if !RTC_LSI
54
54
// Enable LSE Oscillator
55
55
RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_LSE ;
56
56
RCC_OscInitStruct .PLL .PLLState = RCC_PLL_NONE ; /* Mandatory, otherwise the PLL is reconfigured! */
@@ -106,7 +106,7 @@ void rtc_init(void)
106
106
107
107
void rtc_free (void )
108
108
{
109
- #if DEVICE_RTC_LSI
109
+ #if RTC_LSI
110
110
// Enable Power clock
111
111
__PWR_CLK_ENABLE ();
112
112
@@ -128,14 +128,14 @@ void rtc_free(void)
128
128
RCC_OscInitStruct .LSIState = RCC_LSI_OFF ;
129
129
RCC_OscInitStruct .LSEState = RCC_LSE_OFF ;
130
130
HAL_RCC_OscConfig (& RCC_OscInitStruct );
131
- #if DEVICE_RTC_LSI
131
+ #if RTC_LSI
132
132
rtc_inited = 0 ;
133
133
#endif
134
134
}
135
135
136
136
int rtc_isenabled (void )
137
137
{
138
- #if DEVICE_RTC_LSI
138
+ #if RTC_LSI
139
139
return rtc_inited ;
140
140
#else
141
141
if ((RTC -> ISR & RTC_ISR_INITS ) == RTC_ISR_INITS ) {
You can’t perform that action at this time.
0 commit comments