Add description of alarm modules
This commit is contained in:
parent
59df1a11ad
commit
e35938971a
@ -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 = {
|
||||
|
@ -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) },
|
||||
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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[] = {
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user