Cypress USB Device Middleware Library 2.0
cy_stc_usb_dev_class_t Struct Reference

Description

Class support definition - each class must provide this structure.

Data Fields

cy_cb_usb_dev_bus_reset_t busReset
 Called after bus reset is serviced. More...
 
cy_cb_usb_dev_set_config_t setConfiguration
 Called after Set Configuration request is received. More...
 
cy_cb_usb_dev_set_interface_t setInterface
 Called after Set Interface request is received. More...
 
cy_cb_usb_dev_request_received_t requestReceived
 This function is called when a setup packet was received from the USB Host but was not recognized. More...
 
cy_cb_usb_dev_request_cmplt_t requestCompleted
 This function is called when the USB Device received data from the USB Host as part of current request processing. More...
 

Field Documentation

◆ busReset

cy_cb_usb_dev_bus_reset_t cy_stc_usb_dev_class_t::busReset

Called after bus reset is serviced.

Initialize Class here

◆ setConfiguration

cy_cb_usb_dev_set_config_t cy_stc_usb_dev_class_t::setConfiguration

Called after Set Configuration request is received.

The endpoint available for this configuration must be configured here. Returns status of the event processing.

◆ setInterface

cy_cb_usb_dev_set_interface_t cy_stc_usb_dev_class_t::setInterface

Called after Set Interface request is received.

Probably the endpoint configuration requires correction here. Returns status of the event processing.

◆ requestReceived

cy_cb_usb_dev_request_received_t cy_stc_usb_dev_class_t::requestReceived

This function is called when a setup packet was received from the USB Host but was not recognized.

Therefore, it might require the user to do the class processing.

◆ requestCompleted

cy_cb_usb_dev_request_cmplt_t cy_stc_usb_dev_class_t::requestCompleted

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.