From 7f134c6c74213203fae1337b13aed0304af85154 Mon Sep 17 00:00:00 2001 From: MrKevinWeiss Date: Thu, 6 Apr 2023 09:18:29 +0200 Subject: [PATCH] sys/usb: Add PID/VID check in macro --- sys/include/usb.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/include/usb.h b/sys/include/usb.h index da96abac4c..2706d2ec35 100644 --- a/sys/include/usb.h +++ b/sys/include/usb.h @@ -53,7 +53,15 @@ extern "C" { #error Please configure your vendor and product IDs. For development, you may \ set USB_VID=${USB_VID_TESTING} USB_PID=${USB_PID_TESTING}. #endif +#else +#if CONFIG_USB_VID == INTERNAL_PERIPHERAL_VID && \ + CONFIG_USB_PID == INTERNAL_PERIPHERAL_PID +#error Please configure your vendor and product IDs differently than the \ + INTERNAL_PERIPHERAL_* settings. For development, you may set \ + USB_VID=${USB_VID_TESTING} \ + USB_PID=${USB_PID_TESTING}. #endif +#endif /* !(defined(CONFIG_USB_VID) && defined(CONFIG_USB_PID)) */ /** * @brief USB peripheral device vendor ID