PSOC E8XXGP Device Support Library

| PSOC E8XXGP Device Support Library

Functions
Low Power Callback
PDL API Reference » LPComp (Low Power Comparator) » Functions

## General Description

The driver supports the 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 low-power comparator power mode and disables the low-power comparator block, if there is no wake-up source from the low-power comparator in 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 low-power comparator power mode and disables the low-power comparator block, if there is no wake-up source from the low-power comparator in 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 low-power comparator power mode and disables the low-power comparator block, if there is no wake-up source from the low-power comparator in Deep-Sleep mode.

This function stores the state of the low-power comparator "Enable", disables the low-power comparator block before going to low power modes and then recovers the low-power comparator power "after a wake-up" state using the stored value.

Parameters

  *callbackParams | A cy_stc_syspm_callback_params_t structure with callback parameters that consists of mode, base and context fields: *base - a low-power comparator 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 low-power comparator interrupt mask and power mode and then disables or enables the low-power comparator block per condition. Stores the low-power comparator state to recover the state after a wake up. CY_SYSPM_AFTER_TRANSITION - enables the low-power comparator block if it was disabled before Sleep mode.
  mode | Callback 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 low-power comparator power mode and disables the low-power comparator block, if there is no wake-up source from the low-power comparator in Hibernate mode.

Parameters

  *callbackParams | A cy_stc_syspm_callback_params_t structure with callback parameters that consists of mode, base and context fields: *base - a low-power comparator 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 Hibernate mode of the low-power comparator block, and then disables or enables the low-power comparator block per condition.
  mode | Callback mode, see cy_en_syspm_callback_mode_t

Returns
  cy_en_syspm_status_t