File tree Expand file tree Collapse file tree
atmel-samd/common-hal/microcontroller
cxd56/common-hal/microcontroller
litex/common-hal/microcontroller
mimxrt10xx/common-hal/microcontroller
nrf/common-hal/microcontroller
stm/common-hal/microcontroller Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ void common_hal_mcu_reset(void) {
8484 reset ();
8585}
8686
87- void common_hal_mcu_sleep (void ) {
87+ void common_hal_mcu_deep_sleep (void ) {
8888 //deep sleep call here
8989}
9090
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ void common_hal_mcu_reset(void) {
8181 boardctl (BOARDIOC_RESET , 0 );
8282}
8383
84- void common_hal_mcu_sleep (void ) {
84+ void common_hal_mcu_deep_sleep (void ) {
8585 //deep sleep call here
8686}
8787
Original file line number Diff line number Diff line change 3131
3232#include "esp_sleep.h"
3333
34+ void common_hal_alarm_disable_all (void ) {
35+ esp_sleep_disable_wakeup_source (ESP_SLEEP_WAKEUP_ALL );
36+ }
37+
3438mp_obj_t common_hal_alarm_get_wake_alarm (void ) {
3539 switch (esp_sleep_get_wakeup_cause ()) {
3640 case ESP_SLEEP_WAKEUP_TIMER : ;
Original file line number Diff line number Diff line change @@ -8,6 +8,14 @@ mp_obj_t common_hal_alarm_io_pin_state (alarm_io_obj_t *self_in) {
88 mp_raise_ValueError (translate ("io must be rtc io" ));
99 }
1010
11+ if (self_in -> pull && !self_in -> level ) {
12+ for (uint8_t i = 0 ; i <=4 ; i += 2 ) {
13+ if (self_in -> gpio == i ) {
14+ mp_raise_ValueError (translate ("IOs 0, 2 & 4 do not support internal pullup in sleep" ));
15+ }
16+ }
17+ }
18+
1119 switch (esp_sleep_enable_ext0_wakeup (self_in -> gpio , self_in -> level )) {
1220 case ESP_ERR_INVALID_ARG :
1321 mp_raise_ValueError (translate ("trigger level must be 0 or 1" ));
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ void common_hal_mcu_reset(void) {
7979 while (1 );
8080}
8181
82- void common_hal_mcu_sleep (void ) {
82+ void common_hal_mcu_deep_sleep (void ) {
8383 esp_deep_sleep_start ();
8484}
8585
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ void common_hal_mcu_reset(void) {
8989 while (1 );
9090}
9191
92- void common_hal_mcu_sleep (void ) {
92+ void common_hal_mcu_deep_sleep (void ) {
9393 //deep sleep call here
9494}
9595
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ void common_hal_mcu_reset(void) {
8686 NVIC_SystemReset ();
8787}
8888
89- void common_hal_mcu_sleep (void ) {
89+ void common_hal_mcu_deep_sleep (void ) {
9090 //deep sleep call here
9191}
9292
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ void common_hal_mcu_reset(void) {
9595 reset_cpu ();
9696}
9797
98- void common_hal_mcu_sleep (void ) {
98+ void common_hal_mcu_deep_sleep (void ) {
9999 //deep sleep call here
100100}
101101
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ void common_hal_mcu_reset(void) {
8181 NVIC_SystemReset ();
8282}
8383
84- void common_hal_mcu_sleep (void ) {
84+ void common_hal_mcu_deep_sleep (void ) {
8585 //deep sleep call here
8686}
8787
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ endif
108108ifeq ($(CIRCUITPY_ALARM_TIME ) ,1)
109109SRC_PATTERNS += alarm_time/%
110110endif
111- ifeq ($(CIRCUITPY_ALARM_TIME ) ,1)
111+ ifeq ($(CIRCUITPY_ALARM_TOUCH ) ,1)
112112SRC_PATTERNS += alarm_touch/%
113113endif
114114ifeq ($(CIRCUITPY_ANALOGIO ) ,1)
You can’t perform that action at this time.
0 commit comments