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/device/usbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/device') diff --git a/src/device/usbd.c b/src/device/usbd.c index 2874dc5eb..f23d3048d 100644 --- a/src/device/usbd.c +++ b/src/device/usbd.c @@ -922,7 +922,7 @@ static bool process_set_config(uint8_t rhport, uint8_t cfg_num) #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)); // Find driver for this interface uint8_t drv_id; -- cgit v1.3.1