remove legacy code of msc_device.c read10 & write10

clean up some warnings
This commit is contained in:
hathach
2014-03-13 18:25:20 +07:00
parent f1692c93ac
commit 6fbca0ea87
4 changed files with 19 additions and 26 deletions
+3 -4
View File
@@ -155,8 +155,6 @@ void cdch_init(void)
tusb_error_t cdch_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t const *p_interface_desc, uint16_t *p_length)
{
tusb_error_t error;
OSAL_SUBTASK_BEGIN
if ( CDC_COMM_SUBCLASS_ABSTRACT_CONTROL_MODEL != p_interface_desc->bInterfaceSubClass) return TUSB_ERROR_CDC_UNSUPPORTED_SUBCLASS;
@@ -226,6 +224,8 @@ tusb_error_t cdch_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t con
//------------- RNDIS -------------//
if ( 0xff == cdch_data[dev_addr-1].interface_protocol && pipehandle_is_valid(cdch_data[dev_addr-1].pipe_notification) )
{
tusb_error_t error;
cdch_data[dev_addr-1].is_rndis = true; // set as true at first
OSAL_SUBTASK_INVOKED_AND_WAIT( rndish_open_subtask(dev_addr, &cdch_data[dev_addr-1]), error );
@@ -248,9 +248,8 @@ tusb_error_t cdch_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t con
void cdch_isr(pipe_handle_t pipe_hdl, tusb_event_t event, uint32_t xferred_bytes)
{
cdch_data_t *p_cdc = &cdch_data[pipe_hdl.dev_addr - 1];
#if TUSB_CFG_HOST_CDC_RNDIS
cdch_data_t *p_cdc = &cdch_data[pipe_hdl.dev_addr - 1];
if ( p_cdc->is_rndis )
{
rndish_xfer_isr(p_cdc, pipe_hdl, event, xferred_bytes);
+4 -4
View File
@@ -199,10 +199,10 @@ tusb_error_t mscd_xfer_cb(endpoint_handle_t edpt_hdl, tusb_event_t event, uint32
//------------- Data Phase For READ10 & WRITE10 (can be executed several times) -------------//
if ( (SCSI_CMD_READ_10 == p_cbw->command[0]) || (SCSI_CMD_WRITE_10 == p_cbw->command[0]) )
{
if (is_waiting_read10_write10)
{ // continue with read10, write10 data transfer, interrupt must come from endpoint IN
ASSERT( endpointhandle_is_equal(p_msc->edpt_in, edpt_hdl) && event == TUSB_EVENT_XFER_COMPLETE, TUSB_ERROR_INVALID_PARA);
}
// if (is_waiting_read10_write10)
// { // continue with read10, write10 data transfer, interrupt must come from endpoint IN
// ASSERT( endpointhandle_is_equal(p_msc->edpt_in, edpt_hdl) && event == TUSB_EVENT_XFER_COMPLETE, TUSB_ERROR_INVALID_PARA);
// }
is_waiting_read10_write10 = !read10_write10_data_xfer(p_msc);
}
+5 -7
View File
@@ -621,12 +621,11 @@ static void period_list_xfer_complete_isr(uint8_t hostid, uint8_t interval_ms)
}
break;
case EHCI_QUEUE_ELEMENT_ITD:
case EHCI_QUEUE_ELEMENT_ITD: // TODO support hs/fs ISO
case EHCI_QUEUE_ELEMENT_SITD:
case EHCI_QUEUE_ELEMENT_FSTN:
default:
ASSERT (false, VOID_RETURN); // TODO support hs/fs ISO
break;
default: break;
}
next_item = *list_next(&next_item);
@@ -717,12 +716,11 @@ static void xfer_error_isr(uint8_t hostid)
}
break;
// TODO support hs/fs ISO
case EHCI_QUEUE_ELEMENT_ITD:
case EHCI_QUEUE_ELEMENT_SITD:
case EHCI_QUEUE_ELEMENT_FSTN:
default:
ASSERT (false, VOID_RETURN); // TODO support hs/fs ISO
break;
default: break;
}
next_item = *list_next(&next_item);