File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
targets/TARGET_Silicon_Labs/TARGET_EFM32 Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -52,19 +52,24 @@ void rtc_init(void)
52
52
53
53
/* Set up the RTCC and let it run, Forrest, run */
54
54
55
- // Save time if it has been set.
55
+ /* Save time if it has been set */
56
56
time_t t = 0 ;
57
- if (RTCC -> RET [1 ].REG == 0 ) t = rtc_read ();
57
+ if (RTCC -> RET [1 ].REG == 0 ) {
58
+ t = rtc_read ();
59
+ }
58
60
59
61
RTCC_Reset ();
60
62
RTCC_Init_TypeDef rtcc_init = RTCC_INIT_DEFAULT ;
61
63
rtcc_init .presc = rtccCntPresc_32768 ;
62
64
RTCC_Init (& rtcc_init );
63
65
RTCC_Enable (true);
64
66
65
- //Update time
66
- if (RTCC -> RET [1 ].REG == 0 ) rtc_write (t );
67
- else RTCC -> RET [0 ].REG = 0 ;
67
+ /* Update time */
68
+ if (RTCC -> RET [1 ].REG == 0 ) {
69
+ rtc_write (t );
70
+ } else {
71
+ RTCC -> RET [0 ].REG = 0 ;
72
+ }
68
73
}
69
74
70
75
void rtc_free (void )
@@ -87,7 +92,8 @@ void rtc_write(time_t t)
87
92
{
88
93
core_util_critical_section_enter ();
89
94
RTCC -> RET [0 ].REG = t - RTCC_CounterGet ();
90
- //Record that the time has been set
95
+
96
+ /* Record that the time has been set */
91
97
RTCC -> RET [1 ].REG = 0 ;
92
98
core_util_critical_section_exit ();
93
99
}
You can’t perform that action at this time.
0 commit comments