45 #ifndef _IARM_BUS_DEEPSLEEPMGR_H
46 #define _IARM_BUS_DEEPSLEEPMGR_H
49 #include "libIBusDaemon.h"
61 #define IARM_BUS_DEEPSLEEPMGR_NAME "DEEPSLEEPMgr"
73 #ifdef ENABLE_DEEP_SLEEP
81 int PLAT_DS_INIT(
void);
92 int PLAT_DS_SetDeepSleep(uint32_t deep_sleep_timeout,
bool *isGPIOWakeup,
bool networkStandby);
97 void PLAT_DS_DeepSleepWakeup(
void);
106 void PLAT_DS_TERM(
void);
111 #define IARM_BUS_DEEPSLEEPMGR_API_SetDeepSleepTimer "SetDeepSleepTimer"
112 #define IARM_BUS_DEEPSLEEPMGR_API_GetLastWakeupReason "GetLastWakeupReason"
113 #define IARM_BUS_DEEPSLEEPMGR_API_GetLastWakeupKeyCode "GetLastWakeupKeycode"
117 typedef struct _IARM_Bus_DeepSleepMgr_SetDeepSleepTimer_Param_t {
118 unsigned int timeout;
119 } IARM_Bus_DeepSleepMgr_SetDeepSleepTimer_Param_t;
121 typedef enum _DeepSleep_WakeupReason_t
123 DEEPSLEEP_WAKEUPREASON_IR = 0,
124 DEEPSLEEP_WAKEUPREASON_RCU_BT,
125 DEEPSLEEP_WAKEUPREASON_RCU_RF4CE,
126 DEEPSLEEP_WAKEUPREASON_GPIO,
127 DEEPSLEEP_WAKEUPREASON_LAN,
128 DEEPSLEEP_WAKEUPREASON_WLAN,
129 DEEPSLEEP_WAKEUPREASON_TIMER,
130 DEEPSLEEP_WAKEUPREASON_FRONT_PANEL,
131 DEEPSLEEP_WAKEUPREASON_WATCHDOG,
132 DEEPSLEEP_WAKEUPREASON_SOFTWARE_RESET,
133 DEEPSLEEP_WAKEUPREASON_THERMAL_RESET,
134 DEEPSLEEP_WAKEUPREASON_WARM_RESET,
135 DEEPSLEEP_WAKEUPREASON_COLDBOOT,
136 DEEPSLEEP_WAKEUPREASON_STR_AUTH_FAILURE,
137 DEEPSLEEP_WAKEUPREASON_CEC,
138 DEEPSLEEP_WAKEUPREASON_PRESENCE,
139 DEEPSLEEP_WAKEUPREASON_VOICE,
140 DEEPSLEEP_WAKEUPREASON_UNKNOWN
141 }DeepSleep_WakeupReason_t;
143 typedef struct _IARM_Bus_DeepSleepMgr_WakeupKeyCode_Param_t {
144 unsigned int keyCode;
145 } IARM_Bus_DeepSleepMgr_WakeupKeyCode_Param_t;
147 int PLAT_DS_GetLastWakeupReason(DeepSleep_WakeupReason_t *wakeupReason);
148 int PLAT_DS_GetLastWakeupKeyCode(IARM_Bus_DeepSleepMgr_WakeupKeyCode_Param_t *wakeupKeyCode);