amiro-os / boards / PowerManagement / wakeup.h @ ff7ad65b
History | View | Annotate | Download (1.288 KB)
1 | 58fe0e0b | Thomas Schöpping | #ifndef WAKEUP_H_
|
---|---|---|---|
2 | #define WAKEUP_H_
|
||
3 | |||
4 | enum wakeup_mode {
|
||
5 | |||
6 | /**
|
||
7 | * Wakeup POR.
|
||
8 | */
|
||
9 | WAKE_MODE_POR, |
||
10 | /**
|
||
11 | * Wakeup from stop mode.
|
||
12 | */
|
||
13 | WAKE_MODE_STOP, |
||
14 | /**
|
||
15 | * Wakeup from standby mode.
|
||
16 | */
|
||
17 | WAKE_MODE_STDBY, |
||
18 | |||
19 | }; |
||
20 | |||
21 | enum wakeup_source {
|
||
22 | |||
23 | /**
|
||
24 | * Wakeup source unknown.
|
||
25 | */
|
||
26 | WAKE_SRC_UNKN = 0x00000000u,
|
||
27 | /**
|
||
28 | * Wakeup source wakeup pin.
|
||
29 | */
|
||
30 | WAKE_SRC_WKUP = 0x00000001u,
|
||
31 | /**
|
||
32 | * Wakeup source DC jack connected.
|
||
33 | */
|
||
34 | WAKE_SRC_PATHDC_CONNECT = 0x00000002u,
|
||
35 | /**
|
||
36 | * Wakeup source DC jack disconnected.
|
||
37 | */
|
||
38 | WAKE_SRC_PATHDC_DISCONNECT = 0x00000004u,
|
||
39 | /**
|
||
40 | * Wakeup source touch button interrupt.
|
||
41 | */
|
||
42 | WAKE_SRC_TOUCH_INT = 0x00000008u,
|
||
43 | /**
|
||
44 | * Wakeup source other board.
|
||
45 | */
|
||
46 | WAKE_SRC_SYS_PD_N = 0x00000010u,
|
||
47 | /**
|
||
48 | * Wakeup source any RTC event.
|
||
49 | */
|
||
50 | WAKE_SRC_RTC = 0x00000060u,
|
||
51 | /**
|
||
52 | * Wakeup source RTC Tamper/Timestamp event.
|
||
53 | */
|
||
54 | WAKE_SRC_RTC_TAMPER_TIMESTAMP = 0x00000020u,
|
||
55 | /**
|
||
56 | * Wakeup source RTC Wakeup.
|
||
57 | */
|
||
58 | WAKE_SRC_RTC_WAKEUP = 0x00000040u,
|
||
59 | |||
60 | }; |
||
61 | |||
62 | extern enum wakeup_mode wakeup_mode; |
||
63 | extern enum wakeup_source wakeup_source; |
||
64 | |||
65 | #ifdef __cplusplus
|
||
66 | extern "C" { |
||
67 | #endif
|
||
68 | void standby_wakeup_source(void); |
||
69 | #ifdef __cplusplus
|
||
70 | } |
||
71 | #endif
|
||
72 | |||
73 | #endif /* WAKEUP_H_ */ |