mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-01 01:20:14 +00:00
fix msc host
This commit is contained in:
parent
212deaf2f8
commit
e863c99a6f
src
@ -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 ) ?
|
pipe_handle_t * p_pipe_hdl = ( ep_desc->bEndpointAddress & TUSB_DIR_IN_MASK ) ?
|
||||||
&p_msc->bulk_in : &p_msc->bulk_out;
|
&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) );
|
TU_ASSERT( pipehandle_is_valid(*p_pipe_hdl) );
|
||||||
|
|
||||||
if ( edpt_dir(ep_desc->bEndpointAddress) == TUSB_DIR_IN )
|
if ( edpt_dir(ep_desc->bEndpointAddress) == TUSB_DIR_IN )
|
||||||
|
@ -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)
|
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;
|
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++;
|
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)
|
static inline uint8_t qhd_get_index(ehci_qhd_t const * p_qhd)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user