enhance
- add ASSERT_ - rename edpt_equal -
This commit is contained in:
		| @@ -308,7 +308,7 @@ tusb_error_t hidd_xfer_cb(endpoint_handle_t edpt_hdl, tusb_event_t event, uint32 | ||||
|   for(uint8_t i=0; i<HIDD_NUMBER_OF_SUBCLASS; i++) | ||||
|   { | ||||
|     hidd_interface_t * const p_interface = hidd_class_driver[i].p_interface; | ||||
|     if ( (p_interface != NULL) && endpointhandle_is_equal(edpt_hdl, p_interface->ept_handle) ) | ||||
|     if ( (p_interface != NULL) && edpt_equal(edpt_hdl, p_interface->ept_handle) ) | ||||
|     { | ||||
|       hidd_class_driver[i].xfer_cb(edpt_hdl.coreid, event, xferred_bytes); | ||||
|     } | ||||
|   | ||||
| @@ -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