diff options
Diffstat (limited to 'fw/fe310/eos/dev/pwr.c')
-rw-r--r-- | fw/fe310/eos/dev/pwr.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/fw/fe310/eos/dev/pwr.c b/fw/fe310/eos/dev/pwr.c new file mode 100644 index 0000000..c6537cb --- /dev/null +++ b/fw/fe310/eos/dev/pwr.c @@ -0,0 +1,48 @@ +#include <stdlib.h> +#include <stdint.h> + +#include "eos.h" +#include "soc/pwr.h" +#include "eve/eve.h" +#include "eve/eve_touch_engine.h" + +#include "eve.h" +#include "lcd.h" +#include "ctp.h" +#include "net.h" +#include "flash.h" +#include "aon.h" + +#include "pwr.h" + +#ifdef EOS_DEBUG +#include <stdio.h> +#endif + +void eos_pwr_sys_sleep(void) { + int rv; + + rv = eos_lcd_sleep(); +#ifdef EOS_DEBUG + if (rv) printf("PWR SLEEP: LCD SLEEP ERR:%d\n", rv); +#endif + + rv = eos_ctp_sleep(); +#ifdef EOS_DEBUG + if (rv) printf("PWR SLEEP: CTP SLEEP ERR:%d\n", rv); +#endif + + rv = eos_eve_sleep(); +#ifdef EOS_DEBUG + if (rv) printf("PWR SLEEP: EVE SLEEP ERR:%d\n", rv); +#endif + + rv = eos_net_sleep(1000); +#ifdef EOS_DEBUG + if (rv) printf("PWR SLEEP: NET SLEEP ERR:%d\n", rv); +#endif + + eos_flash_norm(); + + eos_pwr_sleep(); +} |