Skip to content

Commit e359389

Browse files
microdev1tannewt
authored andcommitted
Add description of alarm modules
1 parent 59df1a1 commit e359389

File tree

10 files changed

+40
-0
lines changed

10 files changed

+40
-0
lines changed

ports/atmel-samd/common-hal/microcontroller/__init__.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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.
8993
const mcu_processor_obj_t common_hal_mcu_processor_obj = {

ports/cxd56/common-hal/microcontroller/__init__.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
8488
STATIC 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) },

ports/litex/common-hal/microcontroller/__init__.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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.
9498
const mcu_processor_obj_t common_hal_mcu_processor_obj = {

ports/mimxrt10xx/common-hal/microcontroller/__init__.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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.
9195
const mcu_processor_obj_t common_hal_mcu_processor_obj = {

ports/nrf/common-hal/microcontroller/__init__.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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.
100104
const mcu_processor_obj_t common_hal_mcu_processor_obj = {

ports/stm/common-hal/microcontroller/__init__.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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.
8690
const mcu_processor_obj_t common_hal_mcu_processor_obj = {

shared-bindings/alarm/__init__.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#include "shared-bindings/alarm/__init__.h"
22

3+
//| """alarm module
4+
//|
5+
//| The `alarm` module implements deep sleep."""
6+
37
STATIC mp_obj_t alarm_get_wake_alarm(void) {
48
return common_hal_alarm_get_wake_alarm();
59
}

shared-bindings/alarm_io/__init__.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
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+
610
STATIC 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[] = {

shared-bindings/alarm_time/__init__.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
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+
48
STATIC 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);

shared-bindings/alarm_touch/__init__.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
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+
48
STATIC mp_obj_t alarm_touch_disable(void) {
59
common_hal_alarm_touch_disable();
610
return mp_const_none;

0 commit comments

Comments
 (0)