more hcd_pipe to hcd_edpt rename
This commit is contained in:
@@ -420,19 +420,19 @@ bool hcd_pipe_close(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool hcd_pipe_is_busy(uint8_t dev_addr, uint8_t ep_addr)
|
||||
bool hcd_edpt_busy(uint8_t dev_addr, uint8_t ep_addr)
|
||||
{
|
||||
ehci_qhd_t *p_qhd = qhd_get_from_addr(dev_addr, ep_addr);
|
||||
return !p_qhd->qtd_overlay.halted && (p_qhd->p_qtd_list_head != NULL);
|
||||
}
|
||||
|
||||
bool hcd_pipe_is_stalled(uint8_t dev_addr, uint8_t ep_addr)
|
||||
bool hcd_edpt_stalled(uint8_t dev_addr, uint8_t ep_addr)
|
||||
{
|
||||
ehci_qhd_t *p_qhd = qhd_get_from_addr(dev_addr, ep_addr);
|
||||
return p_qhd->qtd_overlay.halted && !qhd_has_xact_error(p_qhd);
|
||||
}
|
||||
|
||||
bool hcd_pipe_clear_stall(uint8_t dev_addr, uint8_t ep_addr)
|
||||
bool hcd_edpt_clear_stall(uint8_t dev_addr, uint8_t ep_addr)
|
||||
{
|
||||
ehci_qhd_t *p_qhd = qhd_get_from_addr(dev_addr, ep_addr);
|
||||
p_qhd->qtd_overlay.halted = 0;
|
||||
|
||||
@@ -131,8 +131,14 @@ void hcd_event_xfer_complete(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t ev
|
||||
bool hcd_setup_send(uint8_t rhport, uint8_t dev_addr, uint8_t const setup_packet[8]);
|
||||
bool hcd_edpt_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_endpoint_t const * ep_desc);
|
||||
|
||||
bool hcd_edpt_busy(uint8_t dev_addr, uint8_t ep_addr);
|
||||
bool hcd_edpt_stalled(uint8_t dev_addr, uint8_t ep_addr);
|
||||
bool hcd_edpt_clear_stall(uint8_t dev_addr, uint8_t ep_addr);
|
||||
|
||||
// TODO remove
|
||||
bool hcd_edpt_close(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr);
|
||||
bool hcd_edpt_xfer(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr, uint8_t * buffer, uint16_t buflen);
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// PIPE API
|
||||
//--------------------------------------------------------------------+
|
||||
@@ -141,10 +147,6 @@ bool hcd_pipe_queue_xfer(uint8_t dev_addr, uint8_t ep_addr, uint8_t buffer[], ui
|
||||
bool hcd_pipe_xfer(uint8_t dev_addr, uint8_t ep_addr, uint8_t buffer[], uint16_t total_bytes, bool int_on_complete);
|
||||
bool hcd_pipe_close(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr); // TODO remove
|
||||
|
||||
bool hcd_pipe_is_busy(uint8_t dev_addr, uint8_t ep_addr);
|
||||
bool hcd_pipe_is_stalled(uint8_t dev_addr, uint8_t ep_addr); // stalled also counted as error
|
||||
bool hcd_pipe_clear_stall(uint8_t dev_addr, uint8_t ep_addr);
|
||||
|
||||
#if 0
|
||||
tusb_error_t hcd_pipe_cancel()ATTR_WARN_UNUSED_RESULT;
|
||||
#endif
|
||||
|
||||
@@ -583,19 +583,19 @@ tusb_error_t hcd_pipe_close(pipe_handle_t pipe_hdl)
|
||||
return TUSB_ERROR_FAILED;
|
||||
}
|
||||
|
||||
bool hcd_pipe_is_busy(pipe_handle_t pipe_hdl)
|
||||
bool hcd_edpt_busy(pipe_handle_t pipe_hdl)
|
||||
{
|
||||
ohci_ed_t const * const p_ed = ed_from_pipe_handle(pipe_hdl);
|
||||
return tu_align16(p_ed->td_head.address) != tu_align16(p_ed->td_tail.address);
|
||||
}
|
||||
|
||||
bool hcd_pipe_is_stalled(pipe_handle_t pipe_hdl)
|
||||
bool hcd_edpt_stalled(pipe_handle_t pipe_hdl)
|
||||
{
|
||||
ohci_ed_t const * const p_ed = ed_from_pipe_handle(pipe_hdl);
|
||||
return p_ed->td_head.halted && p_ed->is_stalled;
|
||||
}
|
||||
|
||||
tusb_error_t hcd_pipe_clear_stall(pipe_handle_t pipe_hdl)
|
||||
tusb_error_t hcd_edpt_clear_stall(pipe_handle_t pipe_hdl)
|
||||
{
|
||||
ohci_ed_t * const p_ed = ed_from_pipe_handle(pipe_hdl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user