Skip to content

Commit

Permalink
fixup! USBUS: add minimal working example
Browse files Browse the repository at this point in the history
  • Loading branch information
bergzand committed Jun 5, 2019
1 parent 87055e4 commit dd2f09c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions examples/usbus_minimal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,18 @@ DEVELHELP ?= 1

USEMODULE += usbus

# USB device vendor and product ID
USB_VID ?= 1209
USB_PID ?= 0001

# Change this to 0 show compiler invocation lines by default:
QUIET ?= 1

CFLAGS += -DUSB_CONFIG_VID=0x$(USB_PID) -DUSB_CONFIG_PID=0x$(USB_VID)

include $(RIOTBASE)/Makefile.include

ifeq ($(USB_VID):$(USB_PID), 1209:0001)
$(shell $(COLOR_ECHO) "$(COLOR_RED)Private testing pid.codes USB VID/PID used!, do not use it outside of test environments!$(COLOR_RESET)" 1>&2)
$(shell $(COLOR_ECHO) "$(COLOR_RED)MUST NOT be used on any device redistributed, sold or manufactured, VID/PID is not unique!$(COLOR_RESET)" 1>&2)
endif
2 changes: 1 addition & 1 deletion examples/usbus_minimal/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 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
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
Expand Down

0 comments on commit dd2f09c

Please sign in to comment.