initial transfer failed in open() shouldn't cause the driver open to fail.
This commit is contained in:
@@ -174,7 +174,11 @@ uint16_t mscd_open(uint8_t rhport, tusb_desc_interface_t const * itf_desc, uint1
|
||||
TU_ASSERT( usbd_open_edpt_pair(rhport, tu_desc_next(itf_desc), 2, TUSB_XFER_BULK, &p_msc->ep_out, &p_msc->ep_in), 0 );
|
||||
|
||||
// Prepare for Command Block Wrapper
|
||||
TU_ASSERT( usbd_edpt_xfer(rhport, p_msc->ep_out, (uint8_t*) &p_msc->cbw, sizeof(msc_cbw_t)), 0 );
|
||||
if ( !usbd_edpt_xfer(rhport, p_msc->ep_out, (uint8_t*) &p_msc->cbw, sizeof(msc_cbw_t)) )
|
||||
{
|
||||
TU_LOG1_FAILED();
|
||||
TU_BREAKPOINT();
|
||||
}
|
||||
|
||||
return _MSC_DRIVER_LEN;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user