USB Device Middleware Library 2.10
Functions

General Description

Functions

cy_en_usb_dev_status_t Cy_USB_Dev_Audio_Init (void const *config, cy_stc_usb_dev_audio_context_t *context, cy_stc_usb_dev_context_t *devContext)
 Initializes the Audio class. More...
 
__STATIC_INLINE void Cy_USB_Dev_Audio_RegisterUserCallback (cy_cb_usb_dev_request_received_t requestReceivedHandle, cy_cb_usb_dev_request_cmplt_t requestCompletedHandle, cy_stc_usb_dev_audio_context_t *context)
 Registers the user callbacks to handle Audio class requests. More...
 
__STATIC_INLINE cy_stc_usb_dev_class_tCy_USB_Dev_Audio_GetClass (cy_stc_usb_dev_audio_context_t *context)
 Returns pointer to the class structure for Audio class. More...
 

Function Documentation

◆ Cy_USB_Dev_Audio_Init()

cy_en_usb_dev_status_t Cy_USB_Dev_Audio_Init ( void const *  config,
cy_stc_usb_dev_audio_context_t context,
cy_stc_usb_dev_context_t devContext 
)

Initializes the Audio class.

This function must be called to enable USB Device Audio functionality.

Parameters
configPass NULL as an argument (left for future purposes).
contextThe pointer to the context structure cy_stc_usb_dev_audio_context_t allocated by the user. The structure is used during the Audio Class operation for internal configuration and data retention. The user must not modify anything in this structure.
devContextThe pointer to the USB Device context structure cy_stc_usb_dev_context_t.
Returns
Status code of the function execution cy_en_usb_dev_status_t.

◆ Cy_USB_Dev_Audio_RegisterUserCallback()

__STATIC_INLINE void Cy_USB_Dev_Audio_RegisterUserCallback ( cy_cb_usb_dev_request_received_t  requestReceivedHandle,
cy_cb_usb_dev_request_cmplt_t  requestCompletedHandle,
cy_stc_usb_dev_audio_context_t context 
)

Registers the user callbacks to handle Audio class requests.

Parameters
requestReceivedHandleThe pointer to a callback function. This function is called when setup packet was received from the USB Host but was not recognized. Therefore this might require Audio class processing. To remove the callback function, pass a NULL as the function pointer.
requestCompletedHandleThe pointer to a callback function. This function is called when the USB Device received data from the USB Host as part of current request processing. The requestReceivedHandle function must enable notification to trigger this event. This makes sense only when class request processing requires a data stage. To remove the callback function, pass a NULL as the function pointer.
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the Audio Class operation for internal configuration and data retention. The user must not modify anything in this structure.

◆ Cy_USB_Dev_Audio_GetClass()

__STATIC_INLINE cy_stc_usb_dev_class_t * Cy_USB_Dev_Audio_GetClass ( cy_stc_usb_dev_audio_context_t context)

Returns pointer to the class structure for Audio class.

Parameters
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the Audio Class operation for internal configuration and data retention. The user must not modify anything in this structure.
Returns
Status pointer to the class cy_stc_usb_dev_class_t.