mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
250f6fdfa3
This * renames DEFAULT_xID to USB_xID_TESTING as it is not really a default (if anyting, the 7D00 is, and it's not that) * moves the check into Makefile * generalizes the check to all test PID/VID pairs * in doing so, fixes the "or" (which would have ruled out warning-free use of an allocated pid.codes number), and compares to the actual testing PID rather than the RIOT-peripheral PID * removes all occurrences of duplicated checks in examples or tests, leaving definitions only where they are needed * moves the Kconfig defaults of the usbus_minimal example into the main Kconfig, as these are good defaults for all cases when USB is enabled manually Closes: https://github.com/RIOT-OS/RIOT/issues/12273 |
||
---|---|---|
.. | ||
main.c | ||
Makefile | ||
README.md |
usbus_minimal example
This is a minimalistic example for RIOT's USB stack. The application will initialize and start the USB stack. The stack is started without any USB handlers, it should show up as an empty USB device on the host.
RIOT doesn't own any USB vendor and product ID. To compile this example, add your own vendor and product ID to the makefile:
CFLAGS += -DCONFIG_USB_VID=0xYOURVID -DCONFIG_USB_PID=0xYOURPID
The example demonstrates basic USB communication between a host and a RIOT
based USB peripheral. Tools such as lsusb
should display the device and
detailed information about the device such as descriptor strings.