Remove Alarm from small boards

This commit is contained in:
Lucian Copeland 2021-04-20 17:20:53 -04:00
parent 436e33e7ec
commit a1dc423569
4 changed files with 7 additions and 1 deletions

View File

@ -7,6 +7,7 @@ MCU_CHIP = nrf52833
INTERNAL_FLASH_FILESYSTEM = 1
CIRCUITPY_ALARM = 0
CIRCUITPY_AUDIOMP3 = 0
CIRCUITPY_BITBANGIO = 0
CIRCUITPY_BITMAPTOOLS = 0

View File

@ -10,6 +10,7 @@ MCU_CHIP = nrf52833
INTERNAL_FLASH_FILESYSTEM = 1
CIRCUITPY_ALARM = 0
CIRCUITPY_AESIO = 1
CIRCUITPY_AUDIOMP3 = 0
CIRCUITPY_BITMAPTOOLS = 0

View File

@ -47,7 +47,7 @@ CIRCUITPY_COUNTIO = 0
CIRCUITPY_WATCHDOG ?= 1
# Sleep and Wakeup
CIRCUITPY_ALARM = 1
CIRCUITPY_ALARM ?= 1
# nRF52840-specific

View File

@ -108,7 +108,9 @@ void rtc_handler(nrfx_rtc_int_type_t int_type) {
nrfx_rtc_cc_set(&rtc_instance, 0, 0, false);
} else if (int_type == NRFX_RTC_INT_COMPARE1) {
// used in light sleep
#if CIRCUITPY_ALARM
sleepmem_wakeup_event = SLEEPMEM_WAKEUP_BY_TIMER;
#endif
nrfx_rtc_cc_set(&rtc_instance, 1, 0, false);
}
}
@ -184,7 +186,9 @@ safe_mode_t port_init(void) {
NRF_POWER->RESETREAS = reset_reason_saved;
// clear wakeup event/pin when reset by reset-pin
if (reset_reason_saved & NRF_POWER_RESETREAS_RESETPIN_MASK) {
#if CIRCUITPY_ALARM
sleepmem_wakeup_event = SLEEPMEM_WAKEUP_BY_NONE;
#endif
}
// If the board was reset by the WatchDogTimer, we may