58 uint8_t * currentStaticCallback,
81 uint8_t configsNumber,
83 uint8_t callbacksNumber)
96 if (callbacksPtr != NULL)
122 gPowerManagerState.
configs = NULL;
235 uint8_t * currentStaticCallback,
238 uint8_t callbacksNumber;
260 callbacksNumber = *currentStaticCallback;
267 callbacksNumber = 0U;
273 for ((*currentStaticCallback) = 0U; (*currentStaticCallback) < callbacksNumber; (*currentStaticCallback)++)
279 if (callbackConfig != NULL)
289 returnCode = errorCode;
344 bool successfulSwitch;
345 uint8_t currentStaticCallback = 0U;
356 configPtr = (*gPowerManagerState.
configs)[powerModeIndex];
365 notifyStruct.
policy = policy;
385 successfulSwitch =
false;
388 if (successfulSwitch)
status_t POWER_SYS_GetLastMode(uint8_t *powerModeIndexPtr)
This function returns the last successfully set power mode.
status_t POWER_SYS_SetMode(uint8_t powerModeIndex, power_manager_policy_t policy)
This function configures the power mode.
status_t POWER_SYS_Deinit(void)
This function deinitializes the Power manager.
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.
power_manager_policy_t
Power manager policies.
power_manager_callback_user_config_t *(* staticCallbacks)[]
uint8_t errorCallbackIndex
uint8_t POWER_SYS_GetErrorCallbackIndex(void)
This function returns the last failed notification callback.
power_manager_notify_t notifyType
static status_t POWER_SYS_CallbacksManagement(power_manager_notify_struct_t *notifyStruct, uint8_t *currentStaticCallback, power_manager_policy_t policy)
uint8_t staticCallbacksNumber
uint8_t targetPowerConfigIndex
power_manager_callback_type_t
The callback type indicates when a callback will be invoked.
power_manager_callback_user_config_t * POWER_SYS_GetErrorCallback(void)
This function returns the callback configuration structure for the last failed notification.
status_t POWER_SYS_DoDeinit(void)
This function implementation-specific de-initialization of power manager.
power_manager_callback_t callbackFunction
status_t POWER_SYS_DoInit(void)
This function implementation-specific configuration of power modes.
callback configuration structure
power_manager_user_config_t * targetPowerConfigPtr
status_t
Status return codes. Common error codes will be a unified enumeration (C enum) that will contain all ...
power_manager_callback_data_t * callbackData
power_manager_state_t gPowerManagerState
Power manager internal structure.
power_manager_user_config_t *(* configs)[]
Power mode user configuration structure.
Power mode user configuration structure.
Power manager internal state structure.
power_manager_policy_t policy
power_manager_callback_type_t callbackType
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...
status_t POWER_SYS_DoSetMode(const power_manager_user_config_t *const configPtr)
This function configures the power mode.