File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
ports/atmel-samd/supervisor Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 65
65
#include "common-hal/pwmio/PWMOut.h"
66
66
#include "common-hal/ps2io/Ps2.h"
67
67
#include "common-hal/rtc/RTC.h"
68
+
69
+ #if CIRCUITPY_ALARM
68
70
#include "common-hal/alarm/__init__.h"
69
71
#include "common-hal/alarm/time/TimeAlarm.h"
70
72
#include "common-hal/alarm/pin/PinAlarm.h"
73
+ #endif
71
74
72
75
#if CIRCUITPY_TOUCHIO_USE_NATIVE
73
76
#include "common-hal/touchio/TouchIn.h"
@@ -194,8 +197,10 @@ static void rtc_init(void) {
194
197
#endif
195
198
#ifdef SAM_D5X_E5X
196
199
hri_mclk_set_APBAMASK_RTC_bit (MCLK );
200
+ #if CIRCUITPY_ALARM
197
201
// Cache TAMPID for wake up cause
198
202
(void )alarm_get_wakeup_cause ();
203
+ #endif
199
204
RTC -> MODE0 .CTRLA .bit .SWRST = true;
200
205
while (RTC -> MODE0 .SYNCBUSY .bit .SWRST != 0 ) {
201
206
}
@@ -493,6 +498,7 @@ void RTC_Handler(void) {
493
498
// Do things common to all ports when the tick occurs
494
499
supervisor_tick ();
495
500
}
501
+ #if CIRCUITPY_ALARM
496
502
if (intflag & RTC_MODE0_INTFLAG_CMP1 ) {
497
503
// Likely TimeAlarm fake sleep wake
498
504
time_alarm_callback ();
@@ -504,6 +510,7 @@ void RTC_Handler(void) {
504
510
RTC -> MODE0 .INTFLAG .reg = RTC_MODE0_INTFLAG_TAMPER ;
505
511
}
506
512
#endif
513
+ #endif
507
514
if (intflag & RTC_MODE0_INTFLAG_CMP0 ) {
508
515
// Clear the interrupt because we may have hit a sleep
509
516
RTC -> MODE0 .INTFLAG .reg = RTC_MODE0_INTFLAG_CMP0 ;
You can’t perform that action at this time.
0 commit comments