Deep Sleep Manager HAL 0.2.0
 
Loading...
Searching...
No Matches
Collaboration diagram for Deep Sleep Manager Header:

Files

file  deepSleepMgr.h
 Deep Sleep Manager HAL Public API.
 

Data Structures

struct  _IARM_Bus_DeepSleepMgr_SetDeepSleepTimer_Param_t
 Structure which holds the HAL timeout in seconds. More...
 
struct  _IARM_Bus_DeepSleepMgr_WakeupKeyCode_Param_t
 Struct for handling the wake up key code. More...
 

Macros

#define IARM_BUS_DEEPSLEEPMGR_NAME   "DEEPSLEEPMgr"
 
#define IARM_BUS_DEEPSLEEPMGR_API_SetDeepSleepTimer   "SetDeepSleepTimer"
 
#define IARM_BUS_DEEPSLEEPMGR_API_GetLastWakeupReason   "GetLastWakeupReason"
 
#define IARM_BUS_DEEPSLEEPMGR_API_GetLastWakeupKeyCode   "GetLastWakeupKeycode"
 

Typedefs

typedef enum _DeepSleepStatus_t DeepSleepStatus_t
 
typedef struct _IARM_Bus_DeepSleepMgr_SetDeepSleepTimer_Param_t IARM_Bus_DeepSleepMgr_SetDeepSleepTimer_Param_t
 Structure which holds the HAL timeout in seconds.
 
typedef enum _DeepSleep_WakeupReason_t DeepSleep_WakeupReason_t
 Enum for all possible Wakeup Reasons from DeepSleep State.
 
typedef struct _IARM_Bus_DeepSleepMgr_WakeupKeyCode_Param_t IARM_Bus_DeepSleepMgr_WakeupKeyCode_Param_t
 Struct for handling the wake up key code.
 

Enumerations

enum  _DeepSleepStatus_t { DeepSleepStatus_Failed = -1 , DeepSleepStatus_NotStarted = 0 , DeepSleepStatus_InProgress , DeepSleepStatus_Completed }
 
enum  _DeepSleep_WakeupReason_t {
  DEEPSLEEP_WAKEUPREASON_IR = 0 , DEEPSLEEP_WAKEUPREASON_RCU_BT , DEEPSLEEP_WAKEUPREASON_RCU_RF4CE , DEEPSLEEP_WAKEUPREASON_GPIO ,
  DEEPSLEEP_WAKEUPREASON_LAN , DEEPSLEEP_WAKEUPREASON_WLAN , DEEPSLEEP_WAKEUPREASON_TIMER , DEEPSLEEP_WAKEUPREASON_FRONT_PANEL ,
  DEEPSLEEP_WAKEUPREASON_WATCHDOG , DEEPSLEEP_WAKEUPREASON_SOFTWARE_RESET , DEEPSLEEP_WAKEUPREASON_THERMAL_RESET , DEEPSLEEP_WAKEUPREASON_WARM_RESET ,
  DEEPSLEEP_WAKEUPREASON_COLDBOOT , DEEPSLEEP_WAKEUPREASON_STR_AUTH_FAILURE , DEEPSLEEP_WAKEUPREASON_CEC , DEEPSLEEP_WAKEUPREASON_PRESENCE ,
  DEEPSLEEP_WAKEUPREASON_VOICE , DEEPSLEEP_WAKEUPREASON_UNKNOWN
}
 Enum for all possible Wakeup Reasons from DeepSleep State. More...
 

Functions

int PLAT_DS_INIT (void)
 Initializes the underlying Deep Sleep Management module.
 
int PLAT_DS_SetDeepSleep (uint32_t deep_sleep_timeout, bool *isGPIOWakeup)
 Sets the CPE's Power State to Deep Sleep.
 
void PLAT_DS_DeepSleepWakeup (void)
 Sets or configures the platform status after deepsleep wake-up.
 
void PLAT_DS_TERM (void)
 Terminates the CPE Deep Sleep Management module.
 
int PLAT_DS_GetLastWakeupReason (DeepSleep_WakeupReason_t *wakeupReason)
 Gets the CPE's Last wakeup reason.
 
int PLAT_DS_GetLastWakeupKeyCode (IARM_Bus_DeepSleepMgr_WakeupKeyCode_Param_t *wakeupKeyCode)
 Gets the CPE's Last wakeup key code.
 

Detailed Description

Macro Definition Documentation

◆ IARM_BUS_DEEPSLEEPMGR_API_GetLastWakeupKeyCode

#define IARM_BUS_DEEPSLEEPMGR_API_GetLastWakeupKeyCode   "GetLastWakeupKeycode"

◆ IARM_BUS_DEEPSLEEPMGR_API_GetLastWakeupReason

#define IARM_BUS_DEEPSLEEPMGR_API_GetLastWakeupReason   "GetLastWakeupReason"

◆ IARM_BUS_DEEPSLEEPMGR_API_SetDeepSleepTimer

#define IARM_BUS_DEEPSLEEPMGR_API_SetDeepSleepTimer   "SetDeepSleepTimer"

Sets the timer for deep sleep ,timer is set explicitly by client of deep sleep manager, then the STB will accept the timer value, and go to sleep when sleep timer is expired.

◆ IARM_BUS_DEEPSLEEPMGR_NAME

#define IARM_BUS_DEEPSLEEPMGR_NAME   "DEEPSLEEPMgr"

Power manager IARM bus name

Typedef Documentation

◆ DeepSleep_WakeupReason_t

Enum for all possible Wakeup Reasons from DeepSleep State.

◆ DeepSleepStatus_t

◆ IARM_Bus_DeepSleepMgr_SetDeepSleepTimer_Param_t

Structure which holds the HAL timeout in seconds.

◆ IARM_Bus_DeepSleepMgr_WakeupKeyCode_Param_t

Struct for handling the wake up key code.

The wake up key code is used to identify the wakeup reason.

Enumeration Type Documentation

◆ _DeepSleep_WakeupReason_t

Enum for all possible Wakeup Reasons from DeepSleep State.

Enumerator
DEEPSLEEP_WAKEUPREASON_IR 

Deepsleep Wakeup Reason is IR Remote event

DEEPSLEEP_WAKEUPREASON_RCU_BT 

Deepsleep Wakeup Reason is RCU Bluetooth Remote event

DEEPSLEEP_WAKEUPREASON_RCU_RF4CE 

Deepsleep Wakeup Reason is RCU RF4CE Remote event

DEEPSLEEP_WAKEUPREASON_GPIO 

Deepsleep Wakeup Reason is GPIO event

DEEPSLEEP_WAKEUPREASON_LAN 

Deepsleep Wakeup Reason is LAN event

DEEPSLEEP_WAKEUPREASON_WLAN 

Deepsleep Wakeup Reason is Wireless LAN event

DEEPSLEEP_WAKEUPREASON_TIMER 

Deepsleep Wakeup Reason is Clock Timer event

DEEPSLEEP_WAKEUPREASON_FRONT_PANEL 

Deepsleep Wakeup Reason is Front Panel Button event

DEEPSLEEP_WAKEUPREASON_WATCHDOG 

Deepsleep Wakeup Reason is Watchdog Timer event

DEEPSLEEP_WAKEUPREASON_SOFTWARE_RESET 

Deepsleep Wakeup Reason is S/W Reset

DEEPSLEEP_WAKEUPREASON_THERMAL_RESET 

Deepsleep Wakeup Reason is Thermal Reset event

DEEPSLEEP_WAKEUPREASON_WARM_RESET 

Deepsleep Wakeup Reason is Warm Temperature Reset event

DEEPSLEEP_WAKEUPREASON_COLDBOOT 

Deepsleep Wakeup Reason is Cold Boot event

DEEPSLEEP_WAKEUPREASON_STR_AUTH_FAILURE 

Deepsleep Wakeup Reason is STR Authentication Failure event

DEEPSLEEP_WAKEUPREASON_CEC 

Deepsleep Wakeup Reason is HDMI CEC Failure event

DEEPSLEEP_WAKEUPREASON_PRESENCE 

Deepsleep Wakeup Reason is Motion Detection event

DEEPSLEEP_WAKEUPREASON_VOICE 

Deepsleep Wakeup Reason is User Voice event

DEEPSLEEP_WAKEUPREASON_UNKNOWN 

Deepsleep Wakeup Reason is Unknown Reason event

◆ _DeepSleepStatus_t

Enumerator
DeepSleepStatus_Failed 

Deepsleep operation failed

DeepSleepStatus_NotStarted 

Deepsleep operation not started

DeepSleepStatus_InProgress 

Deepsleep operation in progress

DeepSleepStatus_Completed 

Deepsleep operation completed

Function Documentation

◆ PLAT_DS_DeepSleepWakeup()

void PLAT_DS_DeepSleepWakeup ( void )

Sets or configures the platform status after deepsleep wake-up.

Precondition
PLAT_DS_INIT() must be called before calling this API
Note
Calling this API before PLAT_DS_SetDeepSleep() should not result in any unexpected behavior
Warning
This API is Not thread safe

◆ PLAT_DS_GetLastWakeupKeyCode()

int PLAT_DS_GetLastWakeupKeyCode ( IARM_Bus_DeepSleepMgr_WakeupKeyCode_Param_t * wakeupKeyCode)

Gets the CPE's Last wakeup key code.

Parameters
[out]wakeupKeyCode- The user wakeup code
Returns
Returns the status of the operation.
Return values
0if successful, -1 if failure.
Precondition
PLAT_DS_INIT() must be called before calling this API
Warning
This API is Not thread safe
Note
Caller is responsible for validating the returned keycode
See also
PLAT_DS_GetLastWakeupReason(), DeepSleepMgr_WakeupKeyCode_Param_t

◆ PLAT_DS_GetLastWakeupReason()

int PLAT_DS_GetLastWakeupReason ( DeepSleep_WakeupReason_t * wakeupReason)

Gets the CPE's Last wakeup reason.

Parameters
[out]wakeupReason- Reason for CPE's last wake up
Returns
Returns the status of the operation.
Return values
0if successful, -1 if failure.
Precondition
PLAT_DS_INIT() must be called before calling this API
Warning
This API is Not thread safe
See also
PLAT_DS_GetLastWakeupKeyCode(), DeepSleep_WakeupReason_t

◆ PLAT_DS_INIT()

int PLAT_DS_INIT ( void )

Initializes the underlying Deep Sleep Management module.

Returns
Returns the status of the operation.
Return values
0if successful, -1 if failure.

◆ PLAT_DS_SetDeepSleep()

int PLAT_DS_SetDeepSleep ( uint32_t deep_sleep_timeout,
bool * isGPIOWakeup )

Sets the CPE's Power State to Deep Sleep.

Parameters
[in]deep_sleep_timeout- The deep sleep wakeup timeout. Min value 0
[out]isGPIOWakeup- Wakeup reason. TRUE for user related wake up, false for not
Returns
Returns the status of the operation.
Return values
0if successful, -1 if failure.
Note
if deep_sleep_timeout is set 0, external intervention to wake up is required.
See also
DeepSleep_WakeupReason_t
Precondition
PLAT_DS_INIT() must be called before calling this API
Postcondition
PLAT_DS_DeepSleepWakeup() must be called after calling this API
Warning
This API is Not thread safe

◆ PLAT_DS_TERM()

void PLAT_DS_TERM ( void )

Terminates the CPE Deep Sleep Management module.

All data structures used within Deep Sleep Management module must be reset and any Deep Sleep Management specific handles and resources must be released