Remove Alarm from small boards
This commit is contained in:
parent
436e33e7ec
commit
a1dc423569
@ -7,6 +7,7 @@ MCU_CHIP = nrf52833
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
|
||||
CIRCUITPY_ALARM = 0
|
||||
CIRCUITPY_AUDIOMP3 = 0
|
||||
CIRCUITPY_BITBANGIO = 0
|
||||
CIRCUITPY_BITMAPTOOLS = 0
|
||||
|
@ -10,6 +10,7 @@ MCU_CHIP = nrf52833
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
|
||||
CIRCUITPY_ALARM = 0
|
||||
CIRCUITPY_AESIO = 1
|
||||
CIRCUITPY_AUDIOMP3 = 0
|
||||
CIRCUITPY_BITMAPTOOLS = 0
|
||||
|
@ -47,7 +47,7 @@ CIRCUITPY_COUNTIO = 0
|
||||
CIRCUITPY_WATCHDOG ?= 1
|
||||
|
||||
# Sleep and Wakeup
|
||||
CIRCUITPY_ALARM = 1
|
||||
CIRCUITPY_ALARM ?= 1
|
||||
|
||||
# nRF52840-specific
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user