diff options
| author | hathach <[email protected]> | 2019-05-01 19:29:56 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-05-01 19:29:56 +0700 |
| commit | c006f3dbce7820bbdc2c1736ba0cb4a4e629f0b6 (patch) | |
| tree | 4f17a56b9e93a95bbad997f7ac59199c4a9ecbfd /src/class/msc | |
| parent | 90fdae94f8f0f86af5e7be3b14561baae1abb2fd (diff) | |
adding optional ep out for hid
refactor usbd_open_edpt_pair
Diffstat (limited to 'src/class/msc')
| -rw-r--r-- | src/class/msc/msc_device.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/class/msc/msc_device.c b/src/class/msc/msc_device.c index 360503d9b..1d5a3fc26 100644 --- a/src/class/msc/msc_device.c +++ b/src/class/msc/msc_device.c @@ -135,9 +135,8 @@ bool mscd_open(uint8_t rhport, tusb_desc_interface_t const * itf_desc, uint16_t mscd_interface_t * p_msc = &_mscd_itf;
- // Open endpoint pair with usbd helper
- tusb_desc_endpoint_t const *p_desc_ep = (tusb_desc_endpoint_t const *) tu_desc_next( itf_desc );
- TU_ASSERT( usbd_open_edpt_pair(rhport, p_desc_ep, TUSB_XFER_BULK, &p_msc->ep_out, &p_msc->ep_in) );
+ // Open endpoint pair
+ TU_ASSERT( usbd_open_edpt_pair(rhport, tu_desc_next(itf_desc), 2, TUSB_XFER_BULK, &p_msc->ep_out, &p_msc->ep_in) );
p_msc->itf_num = itf_desc->bInterfaceNumber;
(*p_len) = sizeof(tusb_desc_interface_t) + 2*sizeof(tusb_desc_endpoint_t);
|
