@@ -66,8 +66,8 @@ const uint8_t STRING_MANUFACTURER[] = USB_MANUFACTURER;
6666
6767
6868// DEVICE DESCRIPTOR
69- const DeviceDescriptor USB_DeviceDescriptorB = D_DEVICE(0xEF , 0x02 , 0x01 , 64 , USB_VID, USB_PID, 0x100 , IMANUFACTURER, IPRODUCT, 0 , 1 );
70- const DeviceDescriptor USB_DeviceDescriptor = D_DEVICE(0x00 , 0x00 , 0x00 , 64 , USB_VID, USB_PID, 0x100 , IMANUFACTURER, IPRODUCT, 0 , 1 );
69+ const DeviceDescriptor USB_DeviceDescriptorB = D_DEVICE(0xEF , 0x02 , 0x01 , 64 , USB_VID, USB_PID, 0x100 , IMANUFACTURER, IPRODUCT, ISERIAL , 1 );
70+ const DeviceDescriptor USB_DeviceDescriptor = D_DEVICE(0x00 , 0x00 , 0x00 , 64 , USB_VID, USB_PID, 0x100 , IMANUFACTURER, IPRODUCT, ISERIAL , 1 );
7171
7272// ==================================================================
7373
@@ -208,6 +208,13 @@ bool USBDeviceClass::sendDescriptor(USBSetup &setup)
208208 else if (setup.wValueL == IMANUFACTURER) {
209209 return sendStringDescriptor (STRING_MANUFACTURER, setup.wLength );
210210 }
211+ else if (setup.wValueL == ISERIAL) {
212+ #ifdef PLUGGABLE_USB_ENABLED
213+ char name[ISERIAL_MAX_LEN];
214+ PluggableUSB ().getShortName (name);
215+ return sendStringDescriptor ((uint8_t *)name, setup.wLength );
216+ #endif
217+ }
211218 else {
212219 return false ;
213220 }
0 commit comments