call touchalarm funcs as well as pin/timealarm.

This commit is contained in:
jun2sak 2021-02-26 08:11:50 +09:00
parent 2aa5aec0d5
commit 277a67d876
2 changed files with 4 additions and 4 deletions

View File

@ -59,7 +59,7 @@ void alarm_reset(void) {
alarm_sleep_memory_reset();
alarm_pin_pinalarm_reset();
alarm_time_timealarm_reset();
//alarm_touch_touchalarm_reset();
alarm_touch_touchalarm_reset();
}
extern uint32_t reset_reason_saved;
@ -119,7 +119,7 @@ STATIC mp_obj_t _get_wake_alarm(size_t n_alarms, const mp_obj_t *alarms) {
return alarm_time_timealarm_get_wakeup_alarm(n_alarms, alarms);
}
case NRF_SLEEP_WAKEUP_TOUCHPAD: {
return mp_const_none;
return alarm_touch_touchalarm_get_wakeup_alarm(n_alarms, alarms);
}
case NRF_SLEEP_WAKEUP_GPIO: {
return alarm_pin_pinalarm_get_wakeup_alarm(n_alarms, alarms);
@ -199,7 +199,7 @@ extern void set_memory_retention(void);
void NORETURN alarm_enter_deep_sleep(void) {
alarm_pin_pinalarm_prepare_for_deep_sleep();
//alarm_touch_touchalarm_prepare_for_deep_sleep();
alarm_touch_touchalarm_prepare_for_deep_sleep();
uint8_t sd_enabled;
sd_softdevice_is_enabled(&sd_enabled);

View File

@ -28,7 +28,7 @@
#include "shared-bindings/alarm/touch/TouchAlarm.h"
#include "shared-bindings/microcontroller/__init__.h"
static volatile bool woke_up = false;
//static volatile bool woke_up = false;
void common_hal_alarm_touch_touchalarm_construct(alarm_touch_touchalarm_obj_t *self, const mcu_pin_obj_t *pin) {
mp_raise_NotImplementedError(NULL);