From 3cd084d39069c92be34c724cb28b452cb476162e Mon Sep 17 00:00:00 2001 From: liuhy Date: Tue, 14 Jun 2022 19:48:47 +0800 Subject: [PATCH] [usbd_get_descriptor]: handle USB_DESCRIPTOR_TYPE_OTHER_SPEED. --- core/usbd_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/usbd_core.c b/core/usbd_core.c index dca22910..602ea9d6 100644 --- a/core/usbd_core.c +++ b/core/usbd_core.c @@ -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 -- Gitee