Skip to content

Commit eabceb9

Browse files
committed
Fix builds without alarm
1 parent a8dd881 commit eabceb9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ports/nrf/common-hal/microcontroller/Processor.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,14 @@ mcu_reset_reason_t common_hal_mcu_processor_get_reset_reason(void) {
138138
r = RESET_REASON_WATCHDOG;
139139
} else if (reset_reason_saved & POWER_RESETREAS_SREQ_Msk) {
140140
r = RESET_REASON_SOFTWARE;
141+
#if CIRCUITPY_ALARM
141142
// Our "deep sleep" is still actually light sleep followed by a software
142143
// reset. Adding this check here ensures we treat it as-if we're waking
143144
// from deep sleep.
144145
if (sleepmem_wakeup_event != SLEEPMEM_WAKEUP_BY_NONE) {
145146
r = RESET_REASON_DEEP_SLEEP_ALARM;
146147
}
148+
#endif
147149
} else if ((reset_reason_saved & POWER_RESETREAS_OFF_Msk) ||
148150
(reset_reason_saved & POWER_RESETREAS_LPCOMP_Msk) ||
149151
(reset_reason_saved & POWER_RESETREAS_NFC_Msk) ||

0 commit comments

Comments
 (0)