diff options
Diffstat (limited to 'lib/usb/usb_standard.c')
-rw-r--r-- | lib/usb/usb_standard.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/usb/usb_standard.c b/lib/usb/usb_standard.c index 42458722..bc4710ff 100644 --- a/lib/usb/usb_standard.c +++ b/lib/usb/usb_standard.c @@ -110,6 +110,15 @@ static uint16_t build_config_descriptor(usbd_device *usbd_dev, len -= count; total += count; totallen += ep->bLength; + /* Copy extra bytes (class specific). */ + if (ep->extra) { + memcpy(buf, ep->extra, + count = MIN(len, ep->extralen)); + buf += count; + len -= count; + total += count; + totallen += ep->extralen; + } } } } |