Fix with size of descriptor in single interface mode.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2022-12-20 23:51:14 +01:00
parent 6faebdf309
commit e99757ed52
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -74,7 +74,14 @@ tusb_desc_configuration_t const desc_config =
{
.bLength = sizeof(tusb_desc_configuration_t),
.bDescriptorType = TUSB_DESC_CONFIGURATION,
.wTotalLength = (sizeof(tusb_desc_configuration_t) + sizeof(tusb_desc_interface_t) + sizeof(struct ccid_class_descriptor) + 2*sizeof(tusb_desc_endpoint_t)) + TUD_HID_INOUT_DESC_LEN,
.wTotalLength = (sizeof(tusb_desc_configuration_t)
#ifdef USB_ITF_CCID
+ sizeof(tusb_desc_interface_t) + sizeof(struct ccid_class_descriptor) + 2*sizeof(tusb_desc_endpoint_t)
#endif
#ifdef USB_ITF_HID
+ TUD_HID_INOUT_DESC_LEN
#endif
),
.bNumInterfaces = ITF_TOTAL,
.bConfigurationValue = 1,
.iConfiguration = 4,