summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormicroDev <70126934+microDev1@users.noreply.github.com>2020-09-25 03:32:31 +0530
committerScott Shawcroft <scott@tannewt.org>2020-10-27 16:16:55 -0700
commite35938971a4e9c0177e68163e1baab3b25c17ca8 (patch)
tree4b6a64d759e64b92d166706909766ac6300f3b23
parent59df1a11ade4a39d079c9f418740b45b4d6121ce (diff)
Add description of alarm modules
-rw-r--r--ports/atmel-samd/common-hal/microcontroller/__init__.c4
-rw-r--r--ports/cxd56/common-hal/microcontroller/__init__.c4
-rw-r--r--ports/litex/common-hal/microcontroller/__init__.c4
-rw-r--r--ports/mimxrt10xx/common-hal/microcontroller/__init__.c4
-rw-r--r--ports/nrf/common-hal/microcontroller/__init__.c4
-rw-r--r--ports/stm/common-hal/microcontroller/__init__.c4
-rw-r--r--shared-bindings/alarm/__init__.c4
-rw-r--r--shared-bindings/alarm_io/__init__.c4
-rw-r--r--shared-bindings/alarm_time/__init__.c4
-rw-r--r--shared-bindings/alarm_touch/__init__.c4
10 files changed, 40 insertions, 0 deletions
diff --git a/ports/atmel-samd/common-hal/microcontroller/__init__.c b/ports/atmel-samd/common-hal/microcontroller/__init__.c
index 50a1ec038..b3ff06b62 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 7aa3b839d..4379f9be6 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 3c9166114..3b1628c39 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 6a8537e2d..c7bc7eb9e 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 06aac9409..ff6c658b8 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 a827399cc..2a60c5342 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 37462d88c..88c4bc887 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 dbe467176..4e42f9a2e 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 218ac6857..1707f7488 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 e36fa73cb..5f5a156d8 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;