mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
15bd4897c1
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
24 lines
771 B
Makefile
24 lines
771 B
Makefile
include ../Makefile.tests_common
|
|
USEMODULE += embunit
|
|
USEMODULE += usbus
|
|
FEATURES_PROVIDED += periph_usbdev
|
|
|
|
# USB device vendor and product ID
|
|
DEFAULT_VID = 1209
|
|
DEFAULT_PID = 0001
|
|
USB_VID ?= $(DEFAULT_VID)
|
|
USB_PID ?= $(DEFAULT_PID)
|
|
|
|
CFLAGS += -DCONFIG_USB_VID=0x$(USB_VID) -DCONFIG_USB_PID=0x$(USB_PID)
|
|
|
|
include $(RIOTBASE)/Makefile.include
|
|
|
|
.PHONY: usb_id_check
|
|
usb_id_check:
|
|
@if [ $(USB_VID) = $(DEFAULT_VID) ] || [ $(USB_PID) = $(DEFAULT_PID) ] ; then \
|
|
$(COLOR_ECHO) "$(COLOR_RED)Private testing pid.codes USB VID/PID used!, do not use it outside of test environments!$(COLOR_RESET)" 1>&2 ; \
|
|
$(COLOR_ECHO) "$(COLOR_RED)MUST NOT be used on any device redistributed, sold or manufactured, VID/PID is not unique!$(COLOR_RESET)" 1>&2 ; \
|
|
fi
|
|
|
|
all: | usb_id_check
|