enhance
- add ASSERT_ - rename edpt_equal -
This commit is contained in:
		| @@ -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 ); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 hathach
					hathach