summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/soc/pwr.h
blob: 1a0d17a05d90045181aad38343347a19a5869a05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdint.h>

#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

int eos_pwr_init(uint8_t wakeup_cause);
uint8_t eos_pwr_wakeup_cause(void);
uint8_t eos_pwr_reset_cause(void);
int eos_pwr_sleep(void);
void eos_pwr_wake_at(uint32_t msec);
void eos_pwr_wake_disable(void);