2019-09-17 22:10:29 +02:00
|
|
|
include ../Makefile.tests_common
|
|
|
|
USEMODULE += embunit
|
|
|
|
USEMODULE += usbus
|
|
|
|
FEATURES_PROVIDED += periph_usbdev
|
|
|
|
|
2020-03-26 15:56:17 +01:00
|
|
|
DISABLE_MODULE += auto_init_usbus
|
|
|
|
|
2019-09-17 22:10:29 +02:00
|
|
|
# USB device vendor and product ID
|
|
|
|
DEFAULT_VID = 1209
|
2020-01-14 11:27:12 +01:00
|
|
|
DEFAULT_PID = 7D00
|
2019-09-17 22:10:29 +02:00
|
|
|
USB_VID ?= $(DEFAULT_VID)
|
|
|
|
USB_PID ?= $(DEFAULT_PID)
|
|
|
|
|
2019-12-05 13:17:30 +01:00
|
|
|
CFLAGS += -DCONFIG_USB_VID=0x$(USB_VID) -DCONFIG_USB_PID=0x$(USB_PID)
|
2019-09-17 22:10:29 +02:00
|
|
|
|
|
|
|
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
|