more hcd_pipe to hcd_edpt rename
This commit is contained in:
@@ -80,13 +80,13 @@ bool tuh_cdc_is_busy(uint8_t dev_addr, cdc_pipeid_t pipeid)
|
||||
switch (pipeid)
|
||||
{
|
||||
case CDC_PIPE_NOTIFICATION:
|
||||
return hcd_pipe_is_busy(dev_addr, p_cdc->ep_notif );
|
||||
return hcd_edpt_busy(dev_addr, p_cdc->ep_notif );
|
||||
|
||||
case CDC_PIPE_DATA_IN:
|
||||
return hcd_pipe_is_busy(dev_addr, p_cdc->ep_in );
|
||||
return hcd_edpt_busy(dev_addr, p_cdc->ep_in );
|
||||
|
||||
case CDC_PIPE_DATA_OUT:
|
||||
return hcd_pipe_is_busy(dev_addr, p_cdc->ep_out );
|
||||
return hcd_edpt_busy(dev_addr, p_cdc->ep_out );
|
||||
|
||||
default:
|
||||
return false;
|
||||
@@ -110,7 +110,7 @@ bool tuh_cdc_send(uint8_t dev_addr, void const * p_data, uint32_t length, bool i
|
||||
TU_VERIFY( p_data != NULL && length, TUSB_ERROR_INVALID_PARA);
|
||||
|
||||
uint8_t const ep_out = cdch_data[dev_addr-1].ep_out;
|
||||
if ( hcd_pipe_is_busy(dev_addr, ep_out) ) return false;
|
||||
if ( hcd_edpt_busy(dev_addr, ep_out) ) return false;
|
||||
|
||||
return hcd_pipe_xfer(dev_addr, ep_out, (void *) p_data, length, is_notify);
|
||||
}
|
||||
@@ -121,7 +121,7 @@ bool tuh_cdc_receive(uint8_t dev_addr, void * p_buffer, uint32_t length, bool is
|
||||
TU_VERIFY( p_buffer != NULL && length, TUSB_ERROR_INVALID_PARA);
|
||||
|
||||
uint8_t const ep_in = cdch_data[dev_addr-1].ep_in;
|
||||
if ( hcd_pipe_is_busy(dev_addr, ep_in) ) return false;
|
||||
if ( hcd_edpt_busy(dev_addr, ep_in) ) return false;
|
||||
|
||||
return hcd_pipe_xfer(dev_addr, ep_in, p_buffer, length, is_notify);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ tusb_error_t hidh_interface_get_report(uint8_t dev_addr, void * report, hidh_int
|
||||
// TODO change to use is configured function
|
||||
TU_ASSERT (TUSB_DEVICE_STATE_CONFIGURED == tuh_device_get_state(dev_addr), TUSB_ERROR_DEVICE_NOT_READY);
|
||||
TU_VERIFY (report, TUSB_ERROR_INVALID_PARA);
|
||||
TU_ASSERT (!hcd_pipe_is_busy(p_hid->pipe_hdl), TUSB_ERROR_INTERFACE_IS_BUSY);
|
||||
TU_ASSERT (!hcd_edpt_busy(p_hid->pipe_hdl), TUSB_ERROR_INTERFACE_IS_BUSY);
|
||||
|
||||
TU_ASSERT_ERR( hcd_pipe_xfer(p_hid->pipe_hdl, report, p_hid->report_size, true) ) ;
|
||||
|
||||
@@ -118,7 +118,7 @@ tusb_error_t tuh_hid_keyboard_get_report(uint8_t dev_addr, void* p_report)
|
||||
bool tuh_hid_keyboard_is_busy(uint8_t dev_addr)
|
||||
{
|
||||
return tuh_hid_keyboard_is_mounted(dev_addr) &&
|
||||
hcd_pipe_is_busy( keyboardh_data[dev_addr-1].pipe_hdl );
|
||||
hcd_edpt_busy( keyboardh_data[dev_addr-1].pipe_hdl );
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -139,7 +139,7 @@ bool tuh_hid_mouse_is_mounted(uint8_t dev_addr)
|
||||
bool tuh_hid_mouse_is_busy(uint8_t dev_addr)
|
||||
{
|
||||
return tuh_hid_mouse_is_mounted(dev_addr) &&
|
||||
hcd_pipe_is_busy( mouseh_data[dev_addr-1].pipe_hdl );
|
||||
hcd_edpt_busy( mouseh_data[dev_addr-1].pipe_hdl );
|
||||
}
|
||||
|
||||
tusb_error_t tuh_hid_mouse_get_report(uint8_t dev_addr, void * report)
|
||||
|
||||
@@ -76,7 +76,7 @@ bool tuh_msc_is_mounted(uint8_t dev_addr)
|
||||
bool tuh_msc_is_busy(uint8_t dev_addr)
|
||||
{
|
||||
return msch_data[dev_addr-1].is_initialized &&
|
||||
hcd_pipe_is_busy(dev_addr, msch_data[dev_addr-1].ep_in);
|
||||
hcd_edpt_busy(dev_addr, msch_data[dev_addr-1].ep_in);
|
||||
}
|
||||
|
||||
uint8_t const* tuh_msc_get_vendor_name(uint8_t dev_addr)
|
||||
@@ -361,7 +361,7 @@ bool msch_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *it
|
||||
|
||||
// NOTE: my toshiba thumb-drive stall the first Read Capacity and require the sequence
|
||||
// Read Capacity --> Stalled --> Clear Stall --> Request Sense --> Read Capacity (2) to work
|
||||
if ( hcd_pipe_is_stalled(dev_addr, p_msc->ep_in) )
|
||||
if ( hcd_edpt_stalled(dev_addr, p_msc->ep_in) )
|
||||
{
|
||||
// clear stall TODO abstract clear stall function
|
||||
request = (tusb_control_request_t) {
|
||||
@@ -374,7 +374,7 @@ bool msch_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *it
|
||||
|
||||
TU_ASSERT(usbh_control_xfer( dev_addr, &request, NULL ));
|
||||
|
||||
hcd_pipe_clear_stall(dev_addr, p_msc->ep_in);
|
||||
hcd_edpt_clear_stall(dev_addr, p_msc->ep_in);
|
||||
TU_ASSERT( osal_semaphore_wait(msch_sem_hdl, SCSI_XFER_TIMEOUT) ); // wait for SCSI status
|
||||
|
||||
//------------- SCSI Request Sense -------------//
|
||||
|
||||
Reference in New Issue
Block a user