Vendor Request Support Functions

group group_usb_dev_functions_vendor_support


__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.


The callbacks registered by this function does not overrides processing of MS OS String vendor-specific request to retrieve an OS Feature Descriptor.

  • requestReceivedHandle: The 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.

  • requestCompletedHandle: The 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.

  • context: The 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.