31#ifndef _IOT_HAL_POWER_H_
32#define _IOT_HAL_POWER_H_
45#define IOT_POWER_SUCCESS ( 0 )
46#define IOT_POWER_INVALID_VALUE ( 1 )
47#define IOT_POWER_NOT_INITIALIZED ( 2 )
48#define IOT_POWER_GET_FAILED ( 3 )
49#define IOT_POWER_SET_FAILED ( 4 )
50#define IOT_POWER_FUNCTION_NOT_SUPPORTED ( 5 )
55struct IotPowerDescriptor;
94typedef struct IotPowerWakeupSources
104typedef enum IotPowerIoctlRequest
146 void * pvUserContext );
229 void * pvUserContext );
250 void *
const pvBuffer );
void(* IotPowerCallback_t)(bool bIdleState, void *pvUserContext)
This callback type is used to set a callback for idle enter and exit notification callback type....
Definition: iot_power.h:145
int32_t iot_power_ioctl(IotPowerHandle_t const pxPowerHandle, IotPowerIoctlRequest_t xRequest, void *const pvBuffer)
iot_power_ioctl is used to set power configuration and power properties like Wakeup time thresholds....
IotPowerIdleMode_t
Different Idle mode mappings to the threshold values set using the IOCTLs.
Definition: iot_power.h:81
int32_t iot_power_set_mode(IotPowerHandle_t const pxPowerHandle, IotPowerMode_t xMode)
iot_power_set_mode is used to set or change the power mode to a specific mode. The actual changes mad...
IotPowerMode_t
Power modes supported by the driver. These power modes may perform different actions on different pla...
Definition: iot_power.h:70
int32_t iot_power_reset_mode(IotPowerHandle_t const pxPowerHandle)
iot_power_reset_mode is used to reset the mode (i,e remove the vote to set mode). When reset mode is ...
struct IotPowerDescriptor * IotPowerHandle_t
IotPowerHandle_t type is the power handle returned by calling iot_power_open() this is initialized in...
Definition: iot_power.h:62
int32_t iot_power_close(IotPowerHandle_t const pxPowerHandle)
iot_power_close is used to de-initialize power driver.
int32_t iot_power_get_mode(IotPowerHandle_t const pxPowerHandle, IotPowerMode_t *xMode)
iot_power_get_mode is used to get the current power mode the target is in.
IotPowerHandle_t iot_power_open(void)
iot_power_open is used to Initialize the CPU power management driver. power_open sets up the default ...
void iot_power_set_callback(IotPowerHandle_t const pxPowerHandle, IotPowerCallback_t xCallback, void *pvUserContext)
iot_power_set_callback is used to set the callback to be called when the target is entering low power...
IotPowerIoctlRequest_t
Ioctl request types.
Definition: iot_power.h:105
@ eIdleClkSrcOffModeMode
Definition: iot_power.h:85
@ eIdlePCMode
Definition: iot_power.h:83
@ eIdleVddOffMode
Definition: iot_power.h:87
@ eIdleNoneMode
Definition: iot_power.h:82
@ eNormalPowerPerfMode
Definition: iot_power.h:72
@ eHighPowerPerfMode
Definition: iot_power.h:71
@ eLowPowerPerfMode
Definition: iot_power.h:73
@ eUnknownPowerMode
Definition: iot_power.h:74
@ eSetPCWakeThreshold
Definition: iot_power.h:106
@ eGetVddOffWakeThreshold
Definition: iot_power.h:122
@ eGetLastIdleMode
Definition: iot_power.h:129
@ eSetVddOffWakeThreshold
Definition: iot_power.h:118
@ eGetClkSrcOffWakeThreshold
Definition: iot_power.h:117
@ eGetPCWakeThreshold
Definition: iot_power.h:111
@ eSetClkSrcOffWakeThreshold
Definition: iot_power.h:112
@ eGetWakeupSources
Definition: iot_power.h:127
@ eSetWakeupSources
Definition: iot_power.h:124
Wakeup source information.
Definition: iot_power.h:95
uint16_t usLength
Definition: iot_power.h:98
uint8_t * pucWakeupSources
Definition: iot_power.h:96