PSoC 6 Peripheral Driver Library

General Description

The driver supports SysPm callback for Deep Sleep and Hibernate transition.

Functions

cy_en_syspm_status_t Cy_LPComp_DeepSleepCallback (cy_stc_syspm_callback_params_t *callbackParams, cy_en_syspm_callback_mode_t mode)
 This function checks the current power mode of LPComp and then disables the LPComp block if there is no wake-up source from LPComp in the deep-sleep mode. More...
 
cy_en_syspm_status_t Cy_LPComp_HibernateCallback (cy_stc_syspm_callback_params_t *callbackParams, cy_en_syspm_callback_mode_t mode)
 This function checks the current power mode of LPComp and then disable the LPComp block, if there is no wake-up source from LPComp in the hibernate mode. More...
 

Function Documentation

◆ Cy_LPComp_DeepSleepCallback()

cy_en_syspm_status_t Cy_LPComp_DeepSleepCallback ( cy_stc_syspm_callback_params_t callbackParams,
cy_en_syspm_callback_mode_t  mode 
)

This function checks the current power mode of LPComp and then disables the LPComp block if there is no wake-up source from LPComp in the deep-sleep mode.

It stores the state of the LPComp enable and then disables the LPComp block before going to the low power modes, and recovers the LPComp power state after wake-up using the stored value.

Parameters
*callbackParamsThe cy_stc_syspm_callback_params_t structure with the callback parameters which consists of mode, base and context fields: *base - LPComp register structure pointer; *context - Context for the call-back function; mode CY_SYSPM_CHECK_READY - No action for this state. CY_SYSPM_CHECK_FAIL - No action for this state. CY_SYSPM_BEFORE_TRANSITION - Checks the LPComp interrupt mask and the power mode, and then disables or enables the LPComp block according to the condition. Stores the LPComp state to recover the state after wake up. CY_SYSPM_AFTER_TRANSITION - Enables the LPComp block, if it was disabled before the sleep mode.
modeCallback mode, see cy_en_syspm_callback_mode_t
Returns
cy_en_syspm_status_t

◆ Cy_LPComp_HibernateCallback()

cy_en_syspm_status_t Cy_LPComp_HibernateCallback ( cy_stc_syspm_callback_params_t callbackParams,
cy_en_syspm_callback_mode_t  mode 
)

This function checks the current power mode of LPComp and then disable the LPComp block, if there is no wake-up source from LPComp in the hibernate mode.

Parameters
*callbackParamsThe cy_stc_syspm_callback_params_t structure with the callback parameters which consists of mode, base and context fields: *base - LPComp register structure pointer; *context - Context for the call-back function; mode CY_SYSPM_CHECK_READY - No action for this state. CY_SYSPM_CHECK_FAIL - No action for this state. CY_SYSPM_BEFORE_TRANSITION - Checks the wake-up source from the hibernate mode of the LPComp block, and then disables or enables the LPComp block according to the condition.
modeCallback mode, see cy_en_syspm_callback_mode_t
Returns
cy_en_syspm_status_t