diff options
| author | hathach <[email protected]> | 2021-09-14 21:30:38 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2021-09-14 21:30:38 +0700 |
| commit | b4745222457d2a2c6c6e6a0747dd6082557c4c8e (patch) | |
| tree | 7d7074ea9d40eff2e01a47f61539565c86e8810d /src/host | |
| parent | 25ea8f9c9e65d1617382a7896df07afd0dc90ce3 (diff) | |
make vendor driver more flexible
- skip additional custom descriptor between interface and endpoints
- can have up to 2 bulk endpoint ( 1 in & 1 out)
Diffstat (limited to 'src/host')
| -rw-r--r-- | src/host/usbh.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |
