mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-02 22:21:03 +00:00
fix issue with weird msc device with 3 endpoints
This commit is contained in:
parent
58d3e8c08b
commit
268dcc8d20
@ -366,7 +366,7 @@ uint16_t msch_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const
|
|||||||
MSC_PROTOCOL_BOT == desc_itf->bInterfaceProtocol);
|
MSC_PROTOCOL_BOT == desc_itf->bInterfaceProtocol);
|
||||||
|
|
||||||
// msc driver length is fixed
|
// msc driver length is fixed
|
||||||
uint16_t const drv_len = sizeof(tusb_desc_interface_t) + 2*sizeof(tusb_desc_endpoint_t);
|
uint16_t const drv_len = sizeof(tusb_desc_interface_t) + desc_itf->bNumEndpoints*sizeof(tusb_desc_endpoint_t);
|
||||||
TU_ASSERT(drv_len <= max_len, 0);
|
TU_ASSERT(drv_len <= max_len, 0);
|
||||||
|
|
||||||
msch_interface_t* p_msc = get_itf(dev_addr);
|
msch_interface_t* p_msc = get_itf(dev_addr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user