Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
Figure - USBD library configuration

 Image Added

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.

 Image Added

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().