File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
hal/targets/hal/TARGET_STM/TARGET_STM32F7 Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 34
34
35
35
#include "mbed_error.h"
36
36
37
- #if DEVICE_RTC_LSI
37
+ #if RTC_LSI
38
38
static int rtc_inited = 0 ;
39
39
#endif
40
40
41
41
static RTC_HandleTypeDef RtcHandle ;
42
42
43
- #if DEVICE_RTC_LSI
43
+ #if RTC_LSI
44
44
#define RTC_CLOCK LSI_VALUE
45
45
#else
46
46
#define RTC_CLOCK LSE_VALUE
@@ -63,14 +63,14 @@ void rtc_init(void)
63
63
{
64
64
RCC_OscInitTypeDef RCC_OscInitStruct ;
65
65
66
- #if DEVICE_RTC_LSI
66
+ #if RTC_LSI
67
67
if (rtc_inited ) return ;
68
68
rtc_inited = 1 ;
69
69
#endif
70
70
71
71
RtcHandle .Instance = RTC ;
72
72
73
- #if !DEVICE_RTC_LSI
73
+ #if !RTC_LSI
74
74
// Enable LSE Oscillator
75
75
RCC_OscInitStruct .OscillatorType = RCC_OSCILLATORTYPE_LSE ;
76
76
RCC_OscInitStruct .PLL .PLLState = RCC_PLL_NONE ; // Mandatory, otherwise the PLL is reconfigured!
@@ -122,7 +122,7 @@ void rtc_init(void)
122
122
}
123
123
124
124
#if DEVICE_LOWPOWERTIMER
125
- #if DEVICE_RTC_LSI
125
+ #if RTC_LSI
126
126
rtc_write (0 );
127
127
#else
128
128
if (!rtc_isenabled ()) {
@@ -138,7 +138,7 @@ void rtc_init(void)
138
138
139
139
void rtc_free (void )
140
140
{
141
- #if DEVICE_RTC_LSI
141
+ #if RTC_LSI
142
142
// Enable Power clock
143
143
__PWR_CLK_ENABLE ();
144
144
@@ -161,14 +161,14 @@ void rtc_free(void)
161
161
RCC_OscInitStruct .LSEState = RCC_LSE_OFF ;
162
162
HAL_RCC_OscConfig (& RCC_OscInitStruct );
163
163
164
- #if DEVICE_RTC_LSI
164
+ #if RTC_LSI
165
165
rtc_inited = 0 ;
166
166
#endif
167
167
}
168
168
169
169
int rtc_isenabled (void )
170
170
{
171
- #if DEVICE_RTC_LSI
171
+ #if RTC_LSI
172
172
return rtc_inited ;
173
173
#else
174
174
if ((RTC -> ISR & RTC_ISR_INITS ) == RTC_ISR_INITS ) {
You can’t perform that action at this time.
0 commit comments