Skip to content

Commit 377db73

Browse files
mprsebulislaw
authored andcommitted
K64F: adapt RTC drivers to the new standards (free function)
rtc_free() does not stop the RTC from counting. Only disables clock gate since processor no longer needs to read RTC registers.
1 parent 4fc3d07 commit 377db73

File tree

1 file changed

+4
-1
lines changed
  • targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/api

1 file changed

+4
-1
lines changed

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/api/rtc_api.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ void rtc_init(void)
3737

3838
void rtc_free(void)
3939
{
40-
RTC_Deinit(RTC);
40+
#if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
41+
/* Gate the module clock */
42+
CLOCK_DisableClock(kCLOCK_Rtc0);
43+
#endif /* FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL */
4144
}
4245

4346
/*

0 commit comments

Comments
 (0)