This information applies to the nRF52840 SoC only.
This is a simple example based on USB Device HAL and driver. The example emulates a HID mouse.
Setup
You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\peripheral\usbd
LED assignments:
- LED 1 shows the USB connection status. The state changes on every USB start of frame event (SOF).
Button assignments:
- Button 1 moves the HID mouse cursor.
Testing
Test the USB Device Example application by performing the following steps:
- Compile and program the application.
- Connect the development kit to the host computer.
- Press Button 1 and observe that the mouse cursor moves.
- Note
- An "Unknown descriptor requested" error might appear on the console when a non-handled descriptor appears.