- add ASSERT_
- rename edpt_equal
-
This commit is contained in:
hathach
2018-03-08 11:42:28 +07:00
parent d28e7e3966
commit 817f23e5e0
7 changed files with 36 additions and 5 deletions

View File

@@ -150,14 +150,14 @@ tusb_error_t mscd_xfer_cb(endpoint_handle_t edpt_hdl, tusb_event_t event, uint32
msc_cmd_block_wrapper_t * const p_cbw = &p_msc->cbw;
msc_cmd_status_wrapper_t * const p_csw = &p_msc->csw;
VERIFY(endpointhandle_is_equal(edpt_hdl, p_msc->edpt_out) || endpointhandle_is_equal(edpt_hdl, p_msc->edpt_in), TUSB_ERROR_INVALID_PARA);
VERIFY(edpt_equal(edpt_hdl, p_msc->edpt_out) || edpt_equal(edpt_hdl, p_msc->edpt_in), TUSB_ERROR_INVALID_PARA);
//------------- new CBW received -------------//
if ( !is_waiting_read10_write10 )
{
// if ( endpointhandle_is_equal(p_msc->edpt_in, edpt_hdl) ) return TUSB_ERROR_NONE; // bulk in interrupt for dcd to clean up
// if ( edpt_equal(p_msc->edpt_in, edpt_hdl) ) return TUSB_ERROR_NONE; // bulk in interrupt for dcd to clean up
ASSERT( endpointhandle_is_equal(p_msc->edpt_out, edpt_hdl) &&
ASSERT( edpt_equal(p_msc->edpt_out, edpt_hdl) &&
xferred_bytes == sizeof(msc_cmd_block_wrapper_t) &&
event == TUSB_EVENT_XFER_COMPLETE &&
p_cbw->signature == MSC_CBW_SIGNATURE, TUSB_ERROR_INVALID_PARA );