diff options
author | danicampora <danicampora@gmail.com> | 2015-03-14 09:59:47 +0100 |
---|---|---|
committer | danicampora <danicampora@gmail.com> | 2015-03-14 10:08:47 +0100 |
commit | 2c103d5200ec513dc0e5ffb9925a345a5ffaad06 (patch) | |
tree | aeae3f1d9524cc875df53f06924ff4ce2f5e2dff /cc3200/mods/pybsleep.h | |
parent | d432bcb9acb7105274c10c6b4bee3736a1a690b5 (diff) | |
download | micropython-2c103d5200ec513dc0e5ffb9925a345a5ffaad06.tar.gz micropython-2c103d5200ec513dc0e5ffb9925a345a5ffaad06.zip |
cc3200: Rewrite the PRCM RTC functionality methods.
This allows to use the On-Chip retention registers for both the
RTC and to share notification flags between the bootloader and the
application. The two flags being shared right now are the "safe boot"
request and the WDT reset cause. we still have 2 more bits free for
future use.
Diffstat (limited to 'cc3200/mods/pybsleep.h')
-rw-r--r-- | cc3200/mods/pybsleep.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/cc3200/mods/pybsleep.h b/cc3200/mods/pybsleep.h index 5abb49be80..17833669b1 100644 --- a/cc3200/mods/pybsleep.h +++ b/cc3200/mods/pybsleep.h @@ -37,6 +37,22 @@ /****************************************************************************** DEFINE TYPES ******************************************************************************/ +typedef enum { + PYB_SLP_PWRON_RESET = 0, + PYB_SLP_HARD_RESET, + PYB_SLP_WDT_RESET, + PYB_SLP_HIB_RESET, + PYB_SLP_SOFT_RESET, + +} pybsleep_reset_cause_t; + +typedef enum { + PYB_SLP_WAKED_BY_WLAN, + PYB_SLP_WAKED_BY_PIN, + PYB_SLP_WAKED_BY_RTC + +} pybsleep_wake_reason_t; + typedef void (*WakeUpCB_t)(const mp_obj_t self); /****************************************************************************** @@ -47,7 +63,9 @@ extern const mp_obj_base_t pyb_sleep_obj; /****************************************************************************** DECLARE FUNCTIONS ******************************************************************************/ -void pyblsleep_init0 (void); +void pybsleep_pre_init (void); +void pybsleep_init0 (void); +void pybsleep_signal_soft_reset (void); void pybsleep_add (const mp_obj_t obj, WakeUpCB_t wakeup); void pybsleep_remove (const mp_obj_t obj); void pybsleep_set_wlan_lpds_callback (mp_obj_t cb_obj); |