PSoC 4 Peripheral Driver Library - Alpha

General Description

INTERNAL.

Functions

bool Cy_SysPm_RegisterCallback (cy_stc_syspm_callback_t *handler)
 

Function Documentation

◆ Cy_SysPm_RegisterCallback()

bool Cy_SysPm_RegisterCallback ( cy_stc_syspm_callback_t handler)
Warning
Not supported in Alpha release

Registers a new syspm callback.

A callback is a function called after an event in the driver or middleware module has occurred. The handler callback API will be executed if the specific event occurs. SysPm callbacks are called when changing power modes. See cy_stc_syspm_callback_t.

Note
The registered callbacks are executed in two orders, based on callback mode cy_en_syspm_callback_mode_t. For modes CY_SYSPM_CHECK_READY and CY_SYSPM_BEFORE_TRANSITION, the order is same order as callbacks were registered. For modes CY_SYSPM_AFTER_TRANSITION and CY_SYSPM_CHECK_FAIL, the order is reverse as the order callbacks were registered.
Parameters
handlerThe address of the syspm callback structure. See cy_stc_syspm_callback_t.
Returns
  • True if a callback was registered.
  • False if a callback was not registered.
Note
Do not modify the registered structure in run-time.
Warning
After being registered, the SysPm callback structures must be allocated during power mode transition.