update hid open()

This commit is contained in:
hathach
2020-05-28 11:19:12 +07:00
parent 7a15d2e0d2
commit 89a3d1f6d1
3 changed files with 18 additions and 17 deletions

View File

@@ -165,7 +165,7 @@ uint16_t mscd_open(uint8_t rhport, tusb_desc_interface_t const * itf_desc, uint1
enum { _MSC_DRIVER_LEN = sizeof(tusb_desc_interface_t) + 2*sizeof(tusb_desc_endpoint_t) };
// Max length mus be at least 1 interface + 2 endpoints
TU_VERIFY(max_len >= _MSC_DRIVER_LEN, 0);
TU_ASSERT(max_len >= _MSC_DRIVER_LEN, 0);
mscd_interface_t * p_msc = &_mscd_itf;
p_msc->itf_num = itf_desc->bInterfaceNumber;