From b4745222457d2a2c6c6e6a0747dd6082557c4c8e Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 14 Sep 2021 21:30:38 +0700 Subject: make vendor driver more flexible - skip additional custom descriptor between interface and endpoints - can have up to 2 bulk endpoint ( 1 in & 1 out) --- src/host/usbh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/host') diff --git a/src/host/usbh.c b/src/host/usbh.c index 14e71379b..100a17aa4 100644 --- a/src/host/usbh.c +++ b/src/host/usbh.c @@ -1016,7 +1016,7 @@ static bool parse_configuration_descriptor(uint8_t dev_addr, tusb_desc_configura #endif uint16_t const drv_len = tu_desc_get_interface_total_len(desc_itf, assoc_itf_count, desc_end-p_desc); - TU_ASSERT(drv_len); + TU_ASSERT(drv_len >= sizeof(tusb_desc_interface_t)); if (desc_itf->bInterfaceClass == TUSB_CLASS_HUB && dev->hub_addr != 0) { -- cgit v1.3.1