diff options
author | Uros Majstorovic <majstor@majstor.org> | 2021-11-28 23:53:05 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2021-11-28 23:53:05 +0100 |
commit | acce7d8e05ac38776d6340342f6a7868df4f7f28 (patch) | |
tree | c0e2f3934b82967e4c2aff4a3dfcc5802bc94232 /fw/fe310/eos/power.h | |
parent | 0b0972ce96a59fb9b59c0b166e0174ba4d8dd198 (diff) |
lcd driver added; fixed startup code;
Diffstat (limited to 'fw/fe310/eos/power.h')
-rw-r--r-- | fw/fe310/eos/power.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fw/fe310/eos/power.h b/fw/fe310/eos/power.h index 9f6729c..241ee07 100644 --- a/fw/fe310/eos/power.h +++ b/fw/fe310/eos/power.h @@ -8,15 +8,20 @@ #define EOS_PWR_WAKE_RST 0 #define EOS_PWR_WAKE_RTC 1 #define EOS_PWR_WAKE_BTN 2 +#define EOS_PWR_INIT 0x80 #define EOS_PWR_RST_PWRON 0 #define EOS_PWR_RST_EXT 1 #define EOS_PWR_RST_WDOG 2 -void eos_power_init(uint8_t wakeup_cause); +#define EOS_INIT_RST (EOS_PWR_WAKE_RST | EOS_PWR_INIT) +#define EOS_INIT_RTC (EOS_PWR_WAKE_RTC | EOS_PWR_INIT) +#define EOS_INIT_BTN (EOS_PWR_WAKE_BTN | EOS_PWR_INIT) + +int eos_power_init(uint8_t wakeup_cause); uint8_t eos_power_wakeup_cause(void); uint8_t eos_power_reset_cause(void); -void eos_power_sleep(void); +int eos_power_sleep(void); void eos_power_wake_at(uint32_t msec); void eos_power_wake_disable(void); void eos_power_set_handler(unsigned char mtype, eos_evt_handler_t handler); |