Universal Serial Bus OTG Controller
UG0331 User Guide Revision 15.0
306
The USB OTG controller device driver framework is made flexible to the application/class specific driver
implementations by providing the callback functions. These call back functions are to be implemented by
the class driver which will have class specific commands and responses.
The following table shows the call back function prototype and refer to the example projects provided to
know how to use these call back functions in more details.
Table 195 •
Device Mode Class Driver APIs (LDL)
API
Description
MSS_USB_device_set_desc_cb_handler() Provides the call-back functions for USB descriptors to this driver.
MSS_USB_device_set_class_cb_handler() Provides the call-back functions for USB class implementation to this
driver.
MSS_USB_device_init()
Initializes the MSS USB to operate in Device mode at desired USB
speed.
MSS_USB_device_cep_configure()
Configures the Control EP. Parameters for Control EP such as
max_pkt_size, FIFO address, and FIFO size in the MSS core are fixed.
MSS_USB_device_cep_read_prepare()
Prepares the Control EP for receiving control transfer packet.
MSS_USB_device_cep_write()
Transmits data on Control EP.
MSS_USB_device_cep_error()
Stalls the CEP when there is a error in data exchange or when the USB
request is not supported.
MSS_USB_device_cep_clr_error()
Clears the stall condition on previously stalled control endpoint.
MSS_USB_device_tx_ep_configure()
Configures the transmit EP (USB IN Transfers) as per the provided
parameters.
MSS_USB_device_rx_ep_configure()
Configures the receive EP (USB OUT Transfers) as per the provided
parameters.
MSS_USB_device_rx_ep_read_prepare()
Prepares receive EP for receiving data packets. (USB OUT Transfers).
MSS_USB_device_tx_ep_write()
Transmits data on transmit endpoint (USB IN Transfers).
MSS_USB_device_tx_ep_error()
Stalls transmit endpoint when there is error in data exchange.
MSS_USB_device_rx_ep_error()
Stalls receive endpoint when there is error in data exchange.
MSS_USB_device_tx_ep_clr_error()
Clears the stall condition on previously stalled transmit endpoint.
MSS_USB_device_rx_ep_clr_error()
Clears the stall condition on previously stalled receive endpoint.
Table 196 •
Functional Descriptions of Callback APIs
Callback API
Description
uint8_t (*usb_class_init)
(uint8_t cfgidx);
This function is called when USB device receives
SET_CONFIGURATION request from USB host with a non-zero cfgidx
number. The parameter cfgidx indicates the configuration number that
should be set by the USB device.
uint8_t (*usb_class_deinit)
(uint8_t cfgidx);
This function is called when USB device receives
SET_CONFIGURATION request from the USB host with a cfgidx = 0. The
parameter cfgidx indicates the configuration number that should be set by
the USB device. USB device goes into the
MSS_USB_ADDRESS_STATE on receiving this command.
Содержание SmartFusion2 MSS
Страница 1: ...UG0331 User Guide SmartFusion2 Microcontroller Subsystem ...
Страница 166: ...Cortex M3 Processor Reference Material UG0331 User Guide Revision 15 0 132 ...
Страница 200: ...Embedded NVM eNVM Controllers UG0331 User Guide Revision 15 0 166 Figure 87 System Builder Window ...
Страница 407: ...Universal Serial Bus OTG Controller UG0331 User Guide Revision 15 0 373 ...
Страница 806: ...Fabric Interface Controller UG0331 User Guide Revision 15 0 772 Figure 345 FIC Master AHB Lite Subsystem ...