Cypress USB Device Middleware Library 2.0
Vendor Request Support Functions

General Description


__STATIC_INLINE void Cy_USB_Dev_RegisterVendorCallbacks (cy_cb_usb_dev_request_received_t requestReceivedHandle, cy_cb_usb_dev_request_cmplt_t requestCompletedHandle, cy_stc_usb_dev_context_t *context)
 Registering user callback to handle Vendor-Specific requests. More...

Function Documentation

◆ Cy_USB_Dev_RegisterVendorCallbacks()

__STATIC_INLINE void Cy_USB_Dev_RegisterVendorCallbacks ( cy_cb_usb_dev_request_received_t  requestReceivedHandle,
cy_cb_usb_dev_request_cmplt_t  requestCompletedHandle,
cy_stc_usb_dev_context_t context 

Registering user callback to handle Vendor-Specific requests.

requestReceivedHandleThe pointer to a callback function. This function is called when setup packet was received from USB Host but was not recognized. Therefore this might require manual 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 CDC request processing requires a data stage. To remove callback function pass NULL as function pointer.
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
The callbacks registered by this function does not overrides processing of MS OS String vendor-specific request to retrieve an OS Feature Descriptor.