@@ -58,9 +58,9 @@ tusb_desc_device_t const desc_device = {
58
58
.idProduct = USB_PID ,
59
59
.bcdDevice = 0x0100 ,
60
60
61
- .iManufacturer = 0x01 ,
62
- .iProduct = 0x02 ,
63
- .iSerialNumber = 0x03 ,
61
+ .iManufacturer = USB_DESCRIPTOR_MANUFACTURER ,
62
+ .iProduct = USB_DESCRIPTOR_PRODUCT ,
63
+ .iSerialNumber = USB_DESCRIPTOR_SERIAL ,
64
64
65
65
.bNumConfigurations = 0x01 };
66
66
@@ -69,7 +69,7 @@ tusb_desc_device_t const desc_device = {
69
69
//--------------------------------------------------------------------+
70
70
71
71
// array of pointer to string descriptors
72
- static char const * string_desc_arr [ ] = {
72
+ char const * usb_string_desc_arr [ 6 ] = {
73
73
(const char []){0x09 , 0x04 }, // 0: is supported language is English (0x0409)
74
74
"TinyUSB" , // 1: Manufacturer
75
75
"TinyUSB Device" , // 2: Product
@@ -255,19 +255,19 @@ uint16_t const *tud_descriptor_string_cb(uint8_t index, uint16_t langid) {
255
255
uint8_t chr_count ;
256
256
257
257
if (index == 0 ) {
258
- memcpy (& _desc_str [1 ], string_desc_arr [0 ], 2 );
258
+ memcpy (& _desc_str [1 ], usb_string_desc_arr [0 ], 2 );
259
259
chr_count = 1 ;
260
260
} else {
261
261
//
262
262
// Note: the 0xEE index string is a Microsoft OS 1.0 Descriptors.
263
263
// https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/microsoft-defined-usb-descriptors
264
264
//
265
265
266
- if (!(index < sizeof (string_desc_arr ) / sizeof (string_desc_arr [0 ]))) {
266
+ if (!(index < sizeof (usb_string_desc_arr ) / sizeof (usb_string_desc_arr [0 ]))) {
267
267
return NULL ;
268
268
}
269
269
270
- const char * str = string_desc_arr [index ];
270
+ const char * str = usb_string_desc_arr [index ];
271
271
272
272
//
273
273
// Cap at max char
0 commit comments