Skip to content

Commit 265afea

Browse files
committed
Use generic composite device descriptor
1 parent a3f65bf commit 265afea

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

hardware/arduino/avr/cores/arduino/USBCore.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ extern const u8 STRING_PRODUCT[] PROGMEM;
3333
extern const u8 STRING_MANUFACTURER[] PROGMEM;
3434
extern const DeviceDescriptor USB_DeviceDescriptor PROGMEM;
3535
extern const DeviceDescriptor USB_DeviceDescriptorA PROGMEM;
36+
extern const DeviceDescriptor USB_DeviceDescriptorB PROGMEM;
3637

3738
const u16 STRING_LANGUAGE[2] = {
3839
(3<<8) | (2+2),
@@ -77,6 +78,9 @@ const DeviceDescriptor USB_DeviceDescriptor =
7778
const DeviceDescriptor USB_DeviceDescriptorA =
7879
D_DEVICE(DEVICE_CLASS,0x00,0x00,64,USB_VID,USB_PID,0x100,IMANUFACTURER,IPRODUCT,0,1);
7980

81+
const DeviceDescriptor USB_DeviceDescriptorB =
82+
D_DEVICE(0xEF,0x02,0x01,64,USB_VID,USB_PID,0x100,IMANUFACTURER,IPRODUCT,0,1);
83+
8084
//==================================================================
8185
//==================================================================
8286

@@ -489,7 +493,7 @@ bool SendDescriptor(Setup& setup)
489493
{
490494
if (setup.wLength == 8)
491495
_cdcComposite = 1;
492-
desc_addr = _cdcComposite ? (const u8*)&USB_DeviceDescriptorA : (const u8*)&USB_DeviceDescriptor;
496+
desc_addr = _cdcComposite ? (const u8*)&USB_DeviceDescriptorB : (const u8*)&USB_DeviceDescriptor;
493497
}
494498
else if (USB_STRING_DESCRIPTOR_TYPE == t)
495499
{

0 commit comments

Comments
 (0)