diff options
author | Uros Majstorovic <majstor@majstor.org> | 2020-08-05 03:39:22 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2020-08-05 03:39:22 +0200 |
commit | cf7c06297d04bade9cd04c056f9ed510e64dd7bd (patch) | |
tree | a3b8cc23574b98e10874b51d33c9fe1bfc012663 /fw/fe310/eos/power.h | |
parent | 5cd610a07468137066ea4daa5176c3e7045113b0 (diff) |
code -> fw
Diffstat (limited to 'fw/fe310/eos/power.h')
-rw-r--r-- | fw/fe310/eos/power.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/fw/fe310/eos/power.h b/fw/fe310/eos/power.h new file mode 100644 index 0000000..466573f --- /dev/null +++ b/fw/fe310/eos/power.h @@ -0,0 +1,22 @@ +#include <stdint.h> +#include "event.h" + +#define EOS_PWR_MTYPE_BUTTON 0 + +#define EOS_PWR_MAX_MTYPE 2 + +#define EOS_PWR_WAKE_RST 0 +#define EOS_PWR_WAKE_RTC 1 +#define EOS_PWR_WAKE_BTN 2 + +#define EOS_PWR_RST_PWRON 0 +#define EOS_PWR_RST_EXT 1 +#define EOS_PWR_RST_WDOG 2 + +void eos_power_init(void); +uint8_t eos_power_wakeup_cause(void); +uint8_t eos_power_reset_cause(void); +void 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);
\ No newline at end of file |