diff options
| author | hathach <[email protected]> | 2021-06-17 13:05:12 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2021-06-28 17:39:57 +0700 |
| commit | 268dcc8d20da15e64ba7198f0412f758f6b8a911 (patch) | |
| tree | 63ea54a198ec60a18cf91df6a8d0b91729cc2622 | |
| parent | 58d3e8c08b05ac00bd2510c04f7679b5f7503404 (diff) | |
fix issue with weird msc device with 3 endpoints
| -rw-r--r-- | src/class/msc/msc_host.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/class/msc/msc_host.c b/src/class/msc/msc_host.c index 83cbe7c89..2c027deff 100644 --- a/src/class/msc/msc_host.c +++ b/src/class/msc/msc_host.c @@ -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 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); msch_interface_t* p_msc = get_itf(dev_addr); |
