S32 SDK
power_manager.h File Reference
#include "device_registers.h"
#include "smc_hal.h"

Go to the source code of this file.

Data Structures

struct  power_manager_notify_struct_t
 Power mode user configuration structure. More...
 
struct  power_manager_callback_user_config_t
 callback configuration structure More...
 
struct  power_manager_state_t
 Power manager internal state structure. More...
 

Typedefs

typedef void power_manager_callback_data_t
 Callback-specific data. More...
 
typedef status_t(* power_manager_callback_t) (power_manager_notify_struct_t *notify, power_manager_callback_data_t *dataPtr)
 Callback prototype. More...
 

Enumerations

enum  power_manager_policy_t { POWER_MANAGER_POLICY_AGREEMENT, POWER_MANAGER_POLICY_FORCIBLE }
 Power manager policies. More...
 
enum  power_manager_notify_t { POWER_MANAGER_NOTIFY_RECOVER = 0x00U, POWER_MANAGER_NOTIFY_BEFORE = 0x01U, POWER_MANAGER_NOTIFY_AFTER = 0x02U }
 The PM notification type. Used to notify registered callbacks. Callback notifications can be invoked in following situations: More...
 
enum  power_manager_callback_type_t { POWER_MANAGER_CALLBACK_BEFORE = 0x01U, POWER_MANAGER_CALLBACK_AFTER = 0x02U, POWER_MANAGER_CALLBACK_BEFORE_AFTER = 0x03U }
 The callback type indicates when a callback will be invoked. More...
 

Functions

status_t POWER_SYS_Init (power_manager_user_config_t *(*powerConfigsPtr)[], uint8_t configsNumber, power_manager_callback_user_config_t *(*callbacksPtr)[], uint8_t callbacksNumber)
 Power manager initialization for operation. More...
 
status_t POWER_SYS_Deinit (void)
 This function deinitializes the Power manager. More...
 
status_t POWER_SYS_SetMode (uint8_t powerModeIndex, power_manager_policy_t policy)
 This function configures the power mode. More...
 
status_t POWER_SYS_GetLastMode (uint8_t *powerModeIndexPtr)
 This function returns the last successfully set power mode. More...
 
status_t POWER_SYS_GetLastModeConfig (power_manager_user_config_t **powerModePtr)
 This function returns the user configuration structure of the last successfully set power mode. More...
 
power_manager_modes_t POWER_SYS_GetCurrentMode (void)
 This function returns currently running power mode. More...
 
uint8_t POWER_SYS_GetErrorCallbackIndex (void)
 This function returns the last failed notification callback. More...
 
power_manager_callback_user_config_tPOWER_SYS_GetErrorCallback (void)
 This function returns the callback configuration structure for the last failed notification. More...