![]() |
Synergy Software Package User's Manual
|
Power Profiles Framework. More...
Macros | |
| #define | SF_POWER_PROFILES_V2_CODE_VERSION_MAJOR (2U) |
Functions | |
| ssp_err_t | SF_POWER_PROFILES_V2_Open (sf_power_profiles_v2_ctrl_t *const p_ctrl, sf_power_profiles_v2_cfg_t const *const p_cfg) |
| Configures the Power Profiles framework and opens any required HAL layer drivers that will be used. More... | |
| ssp_err_t | SF_POWER_PROFILES_V2_RunApply (sf_power_profiles_v2_ctrl_t *const p_ctrl, sf_power_profiles_v2_run_cfg_t const *const p_cfg) |
| Applies a Run profile. More... | |
| ssp_err_t | SF_POWER_PROFILES_V2_LowPowerApply (sf_power_profiles_v2_ctrl_t *const p_ctrl, sf_power_profiles_v2_low_power_cfg_t const *const p_cfg) |
| Applies a Low Power profile. More... | |
| ssp_err_t | SF_POWER_PROFILES_V2_Close (sf_power_profiles_v2_ctrl_t *const p_ctrl) |
| Closes the framework. More... | |
| ssp_err_t | SF_POWER_PROFILES_V2_VersionGet (ssp_version_t *const p_version) |
| Gets version and stores it in provided pointer p_version. More... | |
Power Profiles Framework.
| #define SF_POWER_PROFILES_V2_CODE_VERSION_MAJOR (2U) |
Version of code that implements the API defined in this file
| ssp_err_t SF_POWER_PROFILES_V2_Close | ( | sf_power_profiles_v2_ctrl_t *const | p_ctrl | ) |
Closes the framework.
| SSP_SUCCESS | Successful close. |
| SSP_ERR_ASSERTION | p_ctrl is NULL. |
| SSP_ERR_NOT_OPEN | Power profiles framework is not open. |
| SSP_ERR_IN_USE | Unable to obtain mutex. |
| SSP_ERR_INTERNAL | Unable to release mutex. |
Clear information from control block so other functions know this block is closed.
| ssp_err_t SF_POWER_PROFILES_V2_LowPowerApply | ( | sf_power_profiles_v2_ctrl_t *const | p_ctrl, |
| sf_power_profiles_v2_low_power_cfg_t const *const | p_cfg | ||
| ) |
Applies a Low Power profile.
The SF_POWER_PROFILES_V2_LowPowerApply function will:
| SSP_SUCCESS | Entered and exited low power mode successfully. |
| SSP_ERR_ASSERTION | p_ctrl or p_ctrl->p_api is NULL. |
| SSP_ERR_NOT_OPEN | Power profiles framework is not open. |
| SSP_ERR_UNSUPPORTED | This function is not supported by one of the HAL drivers, r_lpmv2, r_ioport. |
| SSP_ERR_INVALID_MODE | r_lpmv2 mode is not LPMV2_LOW_POWER_MODE_SLEEP but r_lmv2 p_extend is NULL. |
| SSP_ERR_IN_USE | Unable to obtain mutex. |
| SSP_ERR_INTERNAL | Unable to release mutex. |
Apply the LPM configuration.
Apply the pre-low power IOPORT configuration.
Notify application.
Enter low power mode.
Apply the post-low power IOPORT configuration.
Notify application.
| ssp_err_t SF_POWER_PROFILES_V2_Open | ( | sf_power_profiles_v2_ctrl_t *const | p_ctrl, |
| sf_power_profiles_v2_cfg_t const *const | p_cfg | ||
| ) |
Configures the Power Profiles framework and opens any required HAL layer drivers that will be used.
The SF_POWER_PROFILES_V2_Open function initializes the critical data structures and variables.
| SSP_SUCCESS | Initialization was successful. |
| SSP_ERR_ASSERTION | One of the following parameters may be NULL: p_ctrl, p_api, or p_cfg. See HAL driver for other possible causes. |
| SSP_ERR_IN_USE | Power profiles framework is already open. |
| SSP_ERR_INTERNAL | Unable to obtain mutex. Unable to release mutex. |
Initialize the LPM HAL driver.
Mark control block open so other tasks know it is valid.
| ssp_err_t SF_POWER_PROFILES_V2_RunApply | ( | sf_power_profiles_v2_ctrl_t *const | p_ctrl, |
| sf_power_profiles_v2_run_cfg_t const *const | p_cfg | ||
| ) |
Applies a Run profile.
The SF_POWER_PROFILES_V2_RunApply function will:
| SSP_SUCCESS | Initialization was successful. |
| SSP_ERR_ASSERTION | One of the following parameters may be NULL: p_ctrl, p_api, or p_cfg. See HAL driver for other possible causes. |
| SSP_ERR_INVALID_ARGUMENT | Clock configuration is invalid. |
| SSP_ERR_NOT_OPEN | Power profiles framework is not open. |
| SSP_ERR_IN_USE | Unable to obtain mutex. |
| SSP_ERR_INTERNAL | Unable to release mutex. |
| SSP_ERR_INVALID_HW_CONDITION | Incompatible system clock configuration. |
Apply the ioport configuration.
Set the clock config, this also sets the operating mode based on the clock speed.
| ssp_err_t SF_POWER_PROFILES_V2_VersionGet | ( | ssp_version_t *const | p_version | ) |
Gets version and stores it in provided pointer p_version.
| SSP_SUCCESS | Version returned successfully. |
| SSP_ERR_ASSERTION | Parameter p_version was null. |