summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavePutz <dwputz@gmail.com>2020-05-11 12:03:44 -0500
committerGitHub <noreply@github.com>2020-05-11 12:03:44 -0500
commit407938bf3a7d194a3ac4e0888037ca7025185c2f (patch)
tree94f4a3b05cf74e4a71fe665e1760a18461d86b15
parent2ddfab315ca8709a5a18aa8411abdc899b71b44f (diff)
Added a check for platforms supporting RTC before calling rtc_reset()
Added an #if CIRCUITPY_RTC check for platforms supporting RTC
-rw-r--r--ports/atmel-samd/supervisor/port.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c
index f232572e4..04e2c9191 100644
--- a/ports/atmel-samd/supervisor/port.c
+++ b/ports/atmel-samd/supervisor/port.c
@@ -174,7 +174,10 @@ static void rtc_init(void) {
#endif
NVIC_ClearPendingIRQ(RTC_IRQn);
NVIC_EnableIRQ(RTC_IRQn);
+#if CIRCUITPY_RTC
rtc_reset();
+#endif
+
}
safe_mode_t port_init(void) {