Skip to end of metadata
Go to start of metadata

This section describes the examples that are related to the core component of Micrium OS USB Device.

Simple Initialization Example

This is a generic example for the USB device module. It accomplishes the following tasks:

  • Initialize the USB device core module
  • Add one USB device controller
  • Add a Full-Speed configuration to the device
  • Add a High-Speed configuration to the device (only if the device is High-Speed capable)
  • Initialize all the available class application example(s)
  • Start the device

This example is mandatory if you add any class application examples.

By default, this example will assume the presence of a USB controller named "usb0" and will attempt to add it. If this device is not present on your platform or you prefer to use another one, modify the define EX_USBD_CTRLR_NAME accordingly.


The example implementation is located in /examples/usb/device/ex_usbd.h and /examples/usb/device/all/ex_usbd_all.c.


This application offers two API functions named Ex_USBD_Init() and Ex_USBD_Start(). The function Ex_USBD_Init() must be called by your application first. Once your application is ready to connect to the USB host, you can then call the function Ex_USBD_Start().