handle USB_DESCRIPTOR_TYPE_OTHER_SPEED

[usbd_get_descriptor]: handle USB_DESCRIPTOR_TYPE_OTHER_SPEED.
This commit is contained in:
liuhy-2020
2022-06-17 16:26:13 +08:00
committed by sakumisu
parent 12f74971eb
commit 22ad2d471c

View File

@@ -311,7 +311,7 @@ static bool usbd_get_descriptor(uint16_t type_index, uint8_t **data, uint32_t *l
*data = p;
/* get length from structure */
if (type == USB_DESCRIPTOR_TYPE_CONFIGURATION) {
if ((type == USB_DESCRIPTOR_TYPE_CONFIGURATION)||((type == USB_DESCRIPTOR_TYPE_OTHER_SPEED))){
/* configuration descriptor is an
* exception, length is at offset
* 2 and 3