1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/examples/usbus_minimal/README.md
Leandro Lanzieri 15bd4897c1 usb: Move configuration macros to 'CONFIG_' namespace
Macros that changed:
USB_CONFIG_VID -> CONFIG_USB_VID
USB_CONFIG_PID -> CONFIG_USB_PID
USB_CONFIG_MANUF_STR -> CONFIG_USB_MANUF_STR
USB_CONFIG_PRODUCT_STR -> CONFIG_USB_PRODUCT_STR
USB_CONFIG_CONFIGURATION_STR -> CONFIG_USB_CONFIGURATION_STR
USB_CONFIG_PRODUCT_BCDVERSION -> CONFIG_USB_PRODUCT_BCDVERSION
USB_CONFIG_SPEC_BCDVERSION -> CONFIG_USB_SPEC_BCDVERSION
USB_CONFIG_SELF_POWERED -> CONFIG_USB_SELF_POWERED
USB_CONFIG_MAX_POWER -> CONFIG_USB_MAX_POWER
USB_CONFIG_DEFAULT_LANGID -> CONFIG_USB_DEFAULT_LANGID
2020-01-14 10:34:53 +01:00

651 B

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.