diff options
Diffstat (limited to 'tinyusb')
| -rw-r--r-- | tinyusb/class/cdc_host.c | 7 | ||||
| -rw-r--r-- | tinyusb/class/msc_device.c | 8 | ||||
| -rw-r--r-- | tinyusb/host/ehci/ehci.c | 12 |
3 files changed, 12 insertions, 15 deletions
diff --git a/tinyusb/class/cdc_host.c b/tinyusb/class/cdc_host.c index fc93fe565..7bfa30371 100644 --- a/tinyusb/class/cdc_host.c +++ b/tinyusb/class/cdc_host.c @@ -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);
diff --git a/tinyusb/class/msc_device.c b/tinyusb/class/msc_device.c index 77ce2edc8..265051606 100644 --- a/tinyusb/class/msc_device.c +++ b/tinyusb/class/msc_device.c @@ -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);
}
diff --git a/tinyusb/host/ehci/ehci.c b/tinyusb/host/ehci/ehci.c index c20112d73..213876f3e 100644 --- a/tinyusb/host/ehci/ehci.c +++ b/tinyusb/host/ehci/ehci.c @@ -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);
|
