File tree Expand file tree Collapse file tree 10 files changed +40
-0
lines changed
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 10 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,10 @@ void common_hal_mcu_reset(void) {
84
84
reset ();
85
85
}
86
86
87
+ void common_hal_mcu_sleep (void ) {
88
+ //deep sleep call here
89
+ }
90
+
87
91
// The singleton microcontroller.Processor object, bound to microcontroller.cpu
88
92
// It currently only has properties, and no state.
89
93
const 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) {
81
81
boardctl (BOARDIOC_RESET , 0 );
82
82
}
83
83
84
+ void common_hal_mcu_sleep (void ) {
85
+ //deep sleep call here
86
+ }
87
+
84
88
STATIC const mp_rom_map_elem_t mcu_pin_globals_table [] = {
85
89
{ MP_ROM_QSTR (MP_QSTR_UART2_RXD ), MP_ROM_PTR (& pin_UART2_RXD ) },
86
90
{ 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) {
89
89
while (1 );
90
90
}
91
91
92
+ void common_hal_mcu_sleep (void ) {
93
+ //deep sleep call here
94
+ }
95
+
92
96
// The singleton microcontroller.Processor object, bound to microcontroller.cpu
93
97
// It currently only has properties, and no state.
94
98
const 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) {
86
86
NVIC_SystemReset ();
87
87
}
88
88
89
+ void common_hal_mcu_sleep (void ) {
90
+ //deep sleep call here
91
+ }
92
+
89
93
// The singleton microcontroller.Processor object, bound to microcontroller.cpu
90
94
// It currently only has properties, and no state.
91
95
const 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) {
95
95
reset_cpu ();
96
96
}
97
97
98
+ void common_hal_mcu_sleep (void ) {
99
+ //deep sleep call here
100
+ }
101
+
98
102
// The singleton microcontroller.Processor object, bound to microcontroller.cpu
99
103
// It currently only has properties, and no state.
100
104
const 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) {
81
81
NVIC_SystemReset ();
82
82
}
83
83
84
+ void common_hal_mcu_sleep (void ) {
85
+ //deep sleep call here
86
+ }
87
+
84
88
// The singleton microcontroller.Processor object, bound to microcontroller.cpu
85
89
// It currently only has properties, and no state.
86
90
const mcu_processor_obj_t common_hal_mcu_processor_obj = {
Original file line number Diff line number Diff line change 1
1
#include "shared-bindings/alarm/__init__.h"
2
2
3
+ //| """alarm module
4
+ //|
5
+ //| The `alarm` module implements deep sleep."""
6
+
3
7
STATIC mp_obj_t alarm_get_wake_alarm (void ) {
4
8
return common_hal_alarm_get_wake_alarm ();
5
9
}
Original file line number Diff line number Diff line change 3
3
#include "shared-bindings/alarm_io/__init__.h"
4
4
#include "shared-bindings/microcontroller/Pin.h"
5
5
6
+ //| """alarm_io module
7
+ //|
8
+ //| The `alarm_io` module implements deep sleep."""
9
+
6
10
STATIC mp_obj_t alarm_io_pin_state (size_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
7
11
enum { ARG_level , ARG_pull };
8
12
static const mp_arg_t allowed_args [] = {
Original file line number Diff line number Diff line change 1
1
#include "py/obj.h"
2
2
#include "shared-bindings/alarm_time/__init__.h"
3
3
4
+ //| """alarm_time module
5
+ //|
6
+ //| The `alarm_time` module implements deep sleep."""
7
+
4
8
STATIC mp_obj_t alarm_time_duration (mp_obj_t seconds_o ) {
5
9
#if MICROPY_PY_BUILTINS_FLOAT
6
10
mp_float_t seconds = mp_obj_get_float (seconds_o );
Original file line number Diff line number Diff line change 1
1
#include "py/obj.h"
2
2
#include "shared-bindings/alarm_touch/__init__.h"
3
3
4
+ //| """alarm_touch module
5
+ //|
6
+ //| The `alarm_touch` module implements deep sleep."""
7
+
4
8
STATIC mp_obj_t alarm_touch_disable (void ) {
5
9
common_hal_alarm_touch_disable ();
6
10
return mp_const_none ;
You can’t perform that action at this time.
0 commit comments