summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-12-10 23:15:53 +0700
committerhathach <[email protected]>2018-12-10 23:15:53 +0700
commite863c99a6fd50aee7cea2bcf3b86ce0cda14cf95 (patch)
tree5a80cc1d833e7325e5eda59676091852de394277 /src
parent212deaf2f8102208099279562b0c6ce04cb60515 (diff)
fix msc host
Diffstat (limited to 'src')
-rw-r--r--src/class/msc/msc_host.c2
-rw-r--r--src/host/ehci/ehci.c6
-rw-r--r--src/host/usbh.c50
3 files changed, 29 insertions, 29 deletions
diff --git a/src/class/msc/msc_host.c b/src/class/msc/msc_host.c
index b61256805..72f4afa27 100644
--- a/src/class/msc/msc_host.c
+++ b/src/class/msc/msc_host.c
@@ -310,7 +310,7 @@ bool msch_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *it
pipe_handle_t * p_pipe_hdl = ( ep_desc->bEndpointAddress & TUSB_DIR_IN_MASK ) ?
&p_msc->bulk_in : &p_msc->bulk_out;
- (*p_pipe_hdl) = hcd_pipe_open(dev_addr, ep_desc, TUSB_CLASS_MSC);
+ (*p_pipe_hdl) = hcd_pipe_open(rhport, dev_addr, ep_desc);
TU_ASSERT( pipehandle_is_valid(*p_pipe_hdl) );
if ( edpt_dir(ep_desc->bEndpointAddress) == TUSB_DIR_IN )
diff --git a/src/host/ehci/ehci.c b/src/host/ehci/ehci.c
index bfdc4e4f7..fbc110b83 100644
--- a/src/host/ehci/ehci.c
+++ b/src/host/ehci/ehci.c
@@ -829,13 +829,13 @@ static inline ehci_qtd_t* get_control_qtds(uint8_t dev_addr)
static inline ehci_qhd_t* qhd_find_free (uint8_t dev_addr)
{
- uint8_t relative_address = dev_addr-1;
+ uint8_t relative_addr = dev_addr-1;
uint8_t index=0;
- while( index<HCD_MAX_ENDPOINT && ehci_data.device[relative_address].qhd[index].used )
+ while( index<HCD_MAX_ENDPOINT && ehci_data.device[relative_addr].qhd[index].used )
{
index++;
}
- return (index < HCD_MAX_ENDPOINT) ? &ehci_data.device[relative_address].qhd[index] : NULL;
+ return (index < HCD_MAX_ENDPOINT) ? &ehci_data.device[relative_addr].qhd[index] : NULL;
}
static inline uint8_t qhd_get_index(ehci_qhd_t const * p_qhd)
diff --git a/src/host/usbh.c b/src/host/usbh.c
index 127d0f8fd..e1c0600d5 100644
--- a/src/host/usbh.c
+++ b/src/host/usbh.c
@@ -69,51 +69,51 @@ static host_class_driver_t const usbh_class_drivers[] =
{
#if CFG_TUH_CDC
{
- .class_code = TUSB_CLASS_CDC,
- .init = cdch_init,
- .open = cdch_open,
- .isr = cdch_isr,
- .close = cdch_close
+ .class_code = TUSB_CLASS_CDC,
+ .init = cdch_init,
+ .open = cdch_open,
+ .isr = cdch_isr,
+ .close = cdch_close
},
#endif
#if CFG_TUH_MSC
{
- .class_code = TUSB_CLASS_MSC,
- .init = msch_init,
- .open = msch_open,
- .isr = msch_isr,
- .close = msch_close
+ .class_code = TUSB_CLASS_MSC,
+ .init = msch_init,
+ .open = msch_open,
+ .isr = msch_isr,
+ .close = msch_close
},
#endif
#if HOST_CLASS_HID
{
- .class_code = TUSB_CLASS_HID,
- .init = hidh_init,
- .open = hidh_open_subtask,
- .isr = hidh_isr,
- .close = hidh_close
+ .class_code = TUSB_CLASS_HID,
+ .init = hidh_init,
+ .open = hidh_open_subtask,
+ .isr = hidh_isr,
+ .close = hidh_close
},
#endif
#if CFG_TUH_HUB
{
- .class_code = TUSB_CLASS_HUB,
- .init = hub_init,
- .open = hub_open,
- .isr = hub_isr,
- .close = hub_close
+ .class_code = TUSB_CLASS_HUB,
+ .init = hub_init,
+ .open = hub_open,
+ .isr = hub_isr,
+ .close = hub_close
},
#endif
#if CFG_TUSB_HOST_CUSTOM_CLASS
{
- .class_code = TUSB_CLASS_VENDOR_SPECIFIC,
- .init = cush_init,
- .open = cush_open_subtask,
- .isr = cush_isr,
- .close = cush_close
+ .class_code = TUSB_CLASS_VENDOR_SPECIFIC,
+ .init = cush_init,
+ .open = cush_open_subtask,
+ .isr = cush_isr,
+ .close = cush_close
}
#endif
};