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,6 +84,10 @@ void common_hal_mcu_reset(void) {
8484 reset ();
8585}
8686
87+ void common_hal_mcu_sleep (void ) {
88+ //deep sleep call here
89+ }
90+
8791// The singleton microcontroller.Processor object, bound to microcontroller.cpu
8892// It currently only has properties, and no state.
8993const mcu_processor_obj_t common_hal_mcu_processor_obj = {
Original file line number Diff line number Diff line change @@ -81,6 +81,10 @@ void common_hal_mcu_reset(void) {
8181 boardctl (BOARDIOC_RESET , 0 );
8282}
8383
84+ void common_hal_mcu_sleep (void ) {
85+ //deep sleep call here
86+ }
87+
8488STATIC const mp_rom_map_elem_t mcu_pin_globals_table [] = {
8589 { MP_ROM_QSTR (MP_QSTR_UART2_RXD ), MP_ROM_PTR (& pin_UART2_RXD ) },
8690 { MP_ROM_QSTR (MP_QSTR_UART2_TXD ), MP_ROM_PTR (& pin_UART2_TXD ) },
Original file line number Diff line number Diff line change @@ -89,6 +89,10 @@ void common_hal_mcu_reset(void) {
8989 while (1 );
9090}
9191
92+ void common_hal_mcu_sleep (void ) {
93+ //deep sleep call here
94+ }
95+
9296// The singleton microcontroller.Processor object, bound to microcontroller.cpu
9397// It currently only has properties, and no state.
9498const mcu_processor_obj_t common_hal_mcu_processor_obj = {
Original file line number Diff line number Diff line change @@ -86,6 +86,10 @@ void common_hal_mcu_reset(void) {
8686 NVIC_SystemReset ();
8787}
8888
89+ void common_hal_mcu_sleep (void ) {
90+ //deep sleep call here
91+ }
92+
8993// The singleton microcontroller.Processor object, bound to microcontroller.cpu
9094// It currently only has properties, and no state.
9195const mcu_processor_obj_t common_hal_mcu_processor_obj = {
Original file line number Diff line number Diff line change @@ -95,6 +95,10 @@ void common_hal_mcu_reset(void) {
9595 reset_cpu ();
9696}
9797
98+ void common_hal_mcu_sleep (void ) {
99+ //deep sleep call here
100+ }
101+
98102// The singleton microcontroller.Processor object, bound to microcontroller.cpu
99103// It currently only has properties, and no state.
100104const mcu_processor_obj_t common_hal_mcu_processor_obj = {
Original file line number Diff line number Diff line change @@ -81,6 +81,10 @@ void common_hal_mcu_reset(void) {
8181 NVIC_SystemReset ();
8282}
8383
84+ void common_hal_mcu_sleep (void ) {
85+ //deep sleep call here
86+ }
87+
8488// The singleton microcontroller.Processor object, bound to microcontroller.cpu
8589// It currently only has properties, and no state.
8690const mcu_processor_obj_t common_hal_mcu_processor_obj = {
Original file line number Diff line number Diff line change 11#include "shared-bindings/alarm/__init__.h"
22
3+ //| """alarm module
4+ //|
5+ //| The `alarm` module implements deep sleep."""
6+
37STATIC mp_obj_t alarm_get_wake_alarm (void ) {
48 return common_hal_alarm_get_wake_alarm ();
59}
Original file line number Diff line number Diff line change 33#include "shared-bindings/alarm_io/__init__.h"
44#include "shared-bindings/microcontroller/Pin.h"
55
6+ //| """alarm_io module
7+ //|
8+ //| The `alarm_io` module implements deep sleep."""
9+
610STATIC mp_obj_t alarm_io_pin_state (size_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
711 enum { ARG_level , ARG_pull };
812 static const mp_arg_t allowed_args [] = {
Original file line number Diff line number Diff line change 11#include "py/obj.h"
22#include "shared-bindings/alarm_time/__init__.h"
33
4+ //| """alarm_time module
5+ //|
6+ //| The `alarm_time` module implements deep sleep."""
7+
48STATIC mp_obj_t alarm_time_duration (mp_obj_t seconds_o ) {
59 #if MICROPY_PY_BUILTINS_FLOAT
610 mp_float_t seconds = mp_obj_get_float (seconds_o );
Original file line number Diff line number Diff line change 11#include "py/obj.h"
22#include "shared-bindings/alarm_touch/__init__.h"
33
4+ //| """alarm_touch module
5+ //|
6+ //| The `alarm_touch` module implements deep sleep."""
7+
48STATIC mp_obj_t alarm_touch_disable (void ) {
59 common_hal_alarm_touch_disable ();
610 return mp_const_none ;
You can’t perform that action at this time.
0 commit comments