...
The uC/OS BSP can easily turn a Zynq system into a USB device using the uC/USB-Device module.
Configuration
To enable the usb device function the ucos_usbd library should be added to the project as seen in figure Figure - USBD library configuration.
Anchor | ||||
---|---|---|---|---|
|
Figure - USBD library configuration
The uC/OS BSP can configure a USB port automatically as a device. To do so select it in the ucos configuration panel specifying that the port should be used a device instead of a host.
Figure - USBD interface configuration
Initialization
Since the function of a USB must be defined before enumeration the uC/OS BSP startup code will only configure and interface but won't start it. Once fully configured a USB interface can be started by calling USBD_DevStart().