MTB CAT1 Peripheral driver library

General Description

The Low-power functions provide an API to implement Low-power callback at the application level.

Functions

__STATIC_INLINE bool Cy_USBFS_Dev_Drv_CheckActivity (USBFS_Type *base)
 Returns the activity status of the bus. More...
 
__STATIC_INLINE void Cy_USBFS_Dev_Drv_Force (USBFS_Type *base, cy_en_usbfs_dev_drv_force_bus_state_t state)
 Forces a USB J, K, or SE0 state on the USB lines. More...
 
void Cy_USBFS_Dev_Drv_Suspend (USBFS_Type *base, cy_stc_usbfs_dev_drv_context_t *context)
 Prepares the USBFS component to enter Deep Sleep mode. More...
 
void Cy_USBFS_Dev_Drv_Resume (USBFS_Type *base, cy_stc_usbfs_dev_drv_context_t *context)
 Prepares the USBFS component for operation after exiting Deep Sleep mode. More...
 

Function Documentation

◆ Cy_USBFS_Dev_Drv_CheckActivity()

__STATIC_INLINE bool Cy_USBFS_Dev_Drv_CheckActivity ( USBFS_Type *  base)

Returns the activity status of the bus.

It clears the hardware status to provide an updated status on the next call of this function. This function is useful to determine whether there is any USB bus activity between function calls. A typical use case is to determine whether the USB suspend conditions are met.

Parameters
baseThe pointer to the USBFS instance.
Returns
The bus activity since the last call.

◆ Cy_USBFS_Dev_Drv_Force()

__STATIC_INLINE void Cy_USBFS_Dev_Drv_Force ( USBFS_Type *  base,
cy_en_usbfs_dev_drv_force_bus_state_t  state 
)

Forces a USB J, K, or SE0 state on the USB lines.

A typical use case is to signal a Remote Wakeup condition on the USB bus.

Parameters
baseThe pointer to the USBFS instance.
stateThe desired bus state. See cy_en_usbfs_dev_drv_force_bus_state_t for the set of constants.

◆ Cy_USBFS_Dev_Drv_Suspend()

void Cy_USBFS_Dev_Drv_Suspend ( USBFS_Type *  base,
cy_stc_usbfs_dev_drv_context_t context 
)

Prepares the USBFS component to enter Deep Sleep mode.

Parameters
baseThe pointer to the USBFS instance.
contextThe pointer to the context structure cy_stc_usbfs_dev_drv_context_t allocated by the user. The structure is used during the USBFS Device operation for internal configuration and data retention. The user must not modify anything in this structure.
Note
After entering low-power mode, the data that is left in the IN or OUT endpoint buffers is not restored after a wakeup, and is lost. Therefore, it should be stored in the SRAM for OUT endpoint or read by the host for the IN endpoint before entering low-power mode.

◆ Cy_USBFS_Dev_Drv_Resume()

void Cy_USBFS_Dev_Drv_Resume ( USBFS_Type *  base,
cy_stc_usbfs_dev_drv_context_t context 
)

Prepares the USBFS component for operation after exiting Deep Sleep mode.

Parameters
baseThe pointer to the USBFS instance.
contextThe pointer to the context structure cy_stc_usbfs_dev_drv_context_t allocated by the user. The structure is used during the USBFS Device operation for internal configuration and data retention. The user must not modify anything in this structure.