This is a simple example based on USB Device HAL and driver. The example emulates a HID mouse.
You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\peripheral\usbd
LED assignments:
Button assignments:
Test the USB Device Example application by performing the following steps: