From 5af4402cd189e77ed20ffcea6da9aa63ce3598cc Mon Sep 17 00:00:00 2001 From: Peter Lawrence <12226419+majbthrd@users.noreply.github.com> Date: Mon, 15 Feb 2021 20:28:22 -0600 Subject: [PATCH] added product string prefix to better distinguish variants --- bsp/default/unique.h | 1 + bsp/rp2040/unique.h | 1 + bsp/stm32f072disco/unique.h | 1 + usb_descriptors.c | 4 ++-- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bsp/default/unique.h b/bsp/default/unique.h index 57800f8..3125331 100644 --- a/bsp/default/unique.h +++ b/bsp/default/unique.h @@ -16,3 +16,4 @@ static uint8_t get_unique_id(uint16_t *desc_str) return i; } +#define PRODUCT_PREFIX "" diff --git a/bsp/rp2040/unique.h b/bsp/rp2040/unique.h index 6327d53..49d2df9 100644 --- a/bsp/rp2040/unique.h +++ b/bsp/rp2040/unique.h @@ -23,3 +23,4 @@ static uint8_t get_unique_id(uint16_t *desc_str) return chr_count; } +#define PRODUCT_PREFIX "RP2040 " diff --git a/bsp/stm32f072disco/unique.h b/bsp/stm32f072disco/unique.h index 90f5df2..7aa76b3 100644 --- a/bsp/stm32f072disco/unique.h +++ b/bsp/stm32f072disco/unique.h @@ -17,3 +17,4 @@ static uint8_t get_unique_id(uint16_t *desc_str) return chr_count; } +#define PRODUCT_PREFIX "STM32F072 " diff --git a/usb_descriptors.c b/usb_descriptors.c index 5410898..5d7aee9 100644 --- a/usb_descriptors.c +++ b/usb_descriptors.c @@ -60,7 +60,7 @@ tusb_desc_device_t const desc_device = .idVendor = 0xCafe, .idProduct = USB_PID, - .bcdDevice = 0x0100, + .bcdDevice = 0x0101, .iManufacturer = STRID_MANUFACTURER, .iProduct = STRID_PRODUCT, @@ -134,7 +134,7 @@ char const* string_desc_arr [] = { [STRID_LANGID] = (const char[]) { 0x09, 0x04 }, // supported language is English (0x0409) [STRID_MANUFACTURER] = "TinyUSB", // Manufacturer - [STRID_PRODUCT] = "TinyUSB CMSIS-DAP", // Product + [STRID_PRODUCT] = PRODUCT_PREFIX "CMSIS-DAP", // Product }; static uint16_t _desc_str[32];