diff --git a/ports/atmel-samd/common-hal/microcontroller/__init__.c b/ports/atmel-samd/common-hal/microcontroller/__init__.c index 50a1ec038e..b3ff06b62f 100644 --- a/ports/atmel-samd/common-hal/microcontroller/__init__.c +++ b/ports/atmel-samd/common-hal/microcontroller/__init__.c @@ -84,6 +84,10 @@ void common_hal_mcu_reset(void) { reset(); } +void common_hal_mcu_sleep(void) { + //deep sleep call here +} + // The singleton microcontroller.Processor object, bound to microcontroller.cpu // It currently only has properties, and no state. const mcu_processor_obj_t common_hal_mcu_processor_obj = { diff --git a/ports/cxd56/common-hal/microcontroller/__init__.c b/ports/cxd56/common-hal/microcontroller/__init__.c index 7aa3b839d7..4379f9be66 100644 --- a/ports/cxd56/common-hal/microcontroller/__init__.c +++ b/ports/cxd56/common-hal/microcontroller/__init__.c @@ -81,6 +81,10 @@ void common_hal_mcu_reset(void) { boardctl(BOARDIOC_RESET, 0); } +void common_hal_mcu_sleep(void) { + //deep sleep call here +} + STATIC const mp_rom_map_elem_t mcu_pin_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_UART2_RXD), MP_ROM_PTR(&pin_UART2_RXD) }, { MP_ROM_QSTR(MP_QSTR_UART2_TXD), MP_ROM_PTR(&pin_UART2_TXD) }, diff --git a/ports/litex/common-hal/microcontroller/__init__.c b/ports/litex/common-hal/microcontroller/__init__.c index 3c91661144..3b1628c39a 100644 --- a/ports/litex/common-hal/microcontroller/__init__.c +++ b/ports/litex/common-hal/microcontroller/__init__.c @@ -89,6 +89,10 @@ void common_hal_mcu_reset(void) { while(1); } +void common_hal_mcu_sleep(void) { + //deep sleep call here +} + // The singleton microcontroller.Processor object, bound to microcontroller.cpu // It currently only has properties, and no state. const mcu_processor_obj_t common_hal_mcu_processor_obj = { diff --git a/ports/mimxrt10xx/common-hal/microcontroller/__init__.c b/ports/mimxrt10xx/common-hal/microcontroller/__init__.c index 6a8537e2da..c7bc7eb9e8 100644 --- a/ports/mimxrt10xx/common-hal/microcontroller/__init__.c +++ b/ports/mimxrt10xx/common-hal/microcontroller/__init__.c @@ -86,6 +86,10 @@ void common_hal_mcu_reset(void) { NVIC_SystemReset(); } +void common_hal_mcu_sleep(void) { + //deep sleep call here +} + // The singleton microcontroller.Processor object, bound to microcontroller.cpu // It currently only has properties, and no state. const mcu_processor_obj_t common_hal_mcu_processor_obj = { diff --git a/ports/nrf/common-hal/microcontroller/__init__.c b/ports/nrf/common-hal/microcontroller/__init__.c index 06aac9409d..ff6c658b8b 100644 --- a/ports/nrf/common-hal/microcontroller/__init__.c +++ b/ports/nrf/common-hal/microcontroller/__init__.c @@ -95,6 +95,10 @@ void common_hal_mcu_reset(void) { reset_cpu(); } +void common_hal_mcu_sleep(void) { + //deep sleep call here +} + // The singleton microcontroller.Processor object, bound to microcontroller.cpu // It currently only has properties, and no state. const mcu_processor_obj_t common_hal_mcu_processor_obj = { diff --git a/ports/stm/common-hal/microcontroller/__init__.c b/ports/stm/common-hal/microcontroller/__init__.c index a827399ccb..2a60c53426 100644 --- a/ports/stm/common-hal/microcontroller/__init__.c +++ b/ports/stm/common-hal/microcontroller/__init__.c @@ -81,6 +81,10 @@ void common_hal_mcu_reset(void) { NVIC_SystemReset(); } +void common_hal_mcu_sleep(void) { + //deep sleep call here +} + // The singleton microcontroller.Processor object, bound to microcontroller.cpu // It currently only has properties, and no state. const mcu_processor_obj_t common_hal_mcu_processor_obj = { diff --git a/shared-bindings/alarm/__init__.c b/shared-bindings/alarm/__init__.c index 37462d88cc..88c4bc8878 100644 --- a/shared-bindings/alarm/__init__.c +++ b/shared-bindings/alarm/__init__.c @@ -1,5 +1,9 @@ #include "shared-bindings/alarm/__init__.h" +//| """alarm module +//| +//| The `alarm` module implements deep sleep.""" + STATIC mp_obj_t alarm_get_wake_alarm(void) { return common_hal_alarm_get_wake_alarm(); } diff --git a/shared-bindings/alarm_io/__init__.c b/shared-bindings/alarm_io/__init__.c index dbe4671763..4e42f9a2e1 100644 --- a/shared-bindings/alarm_io/__init__.c +++ b/shared-bindings/alarm_io/__init__.c @@ -3,6 +3,10 @@ #include "shared-bindings/alarm_io/__init__.h" #include "shared-bindings/microcontroller/Pin.h" +//| """alarm_io module +//| +//| The `alarm_io` module implements deep sleep.""" + STATIC mp_obj_t alarm_io_pin_state(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_level, ARG_pull }; static const mp_arg_t allowed_args[] = { diff --git a/shared-bindings/alarm_time/__init__.c b/shared-bindings/alarm_time/__init__.c index 218ac68575..1707f7488f 100644 --- a/shared-bindings/alarm_time/__init__.c +++ b/shared-bindings/alarm_time/__init__.c @@ -1,6 +1,10 @@ #include "py/obj.h" #include "shared-bindings/alarm_time/__init__.h" +//| """alarm_time module +//| +//| The `alarm_time` module implements deep sleep.""" + STATIC mp_obj_t alarm_time_duration(mp_obj_t seconds_o) { #if MICROPY_PY_BUILTINS_FLOAT mp_float_t seconds = mp_obj_get_float(seconds_o); diff --git a/shared-bindings/alarm_touch/__init__.c b/shared-bindings/alarm_touch/__init__.c index e36fa73cb8..5f5a156d80 100644 --- a/shared-bindings/alarm_touch/__init__.c +++ b/shared-bindings/alarm_touch/__init__.c @@ -1,6 +1,10 @@ #include "py/obj.h" #include "shared-bindings/alarm_touch/__init__.h" +//| """alarm_touch module +//| +//| The `alarm_touch` module implements deep sleep.""" + STATIC mp_obj_t alarm_touch_disable(void) { common_hal_alarm_touch_disable(); return mp_const_none;