blob: c6537cb407e40292d81e137991b7607f95200ff3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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();
}
|