aboutsummaryrefslogtreecommitdiff
path: root/bootloaders/caterina/src/USBCore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bootloaders/caterina/src/USBCore.cpp')
-rw-r--r--bootloaders/caterina/src/USBCore.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/bootloaders/caterina/src/USBCore.cpp b/bootloaders/caterina/src/USBCore.cpp
index ac5d081..0eecacc 100644
--- a/bootloaders/caterina/src/USBCore.cpp
+++ b/bootloaders/caterina/src/USBCore.cpp
@@ -363,7 +363,9 @@ bool SendDescriptor()
#endif
} else if (USB_DEVICE_DESCRIPTOR_TYPE == t)
{
- desc_addr = (const uint8_t*)&USB_DeviceDescriptor;
+ if (setup.wLength == 8)
+ _cdcComposite = 1;
+ desc_addr = _cdcComposite ? (const uint8_t*)&USB_DeviceDescriptorA : (const uint8_t*)&USB_DeviceDescriptor;
}
else if (USB_CONFIGURATION_DESCRIPTOR_TYPE == t)
{