rename usbh_xfer_isr to hcd_event_xfer_complete
This commit is contained in:
@@ -647,7 +647,7 @@ static void qhd_xfer_complete_isr(ehci_qhd_t * p_qhd)
|
||||
{
|
||||
// end of request
|
||||
// call USBH callback
|
||||
usbh_xfer_isr(p_qhd->device_address, edpt_addr(p_qhd->endpoint_number, p_qhd->pid_non_control == EHCI_PID_IN ? 1 : 0), XFER_RESULT_SUCCESS, p_qhd->total_xferred_bytes);
|
||||
hcd_event_xfer_complete(p_qhd->device_address, edpt_addr(p_qhd->endpoint_number, p_qhd->pid_non_control == EHCI_PID_IN ? 1 : 0), XFER_RESULT_SUCCESS, p_qhd->total_xferred_bytes);
|
||||
p_qhd->total_xferred_bytes = 0;
|
||||
}
|
||||
|
||||
@@ -741,7 +741,7 @@ static void qhd_xfer_error_isr(ehci_qhd_t * p_qhd)
|
||||
}
|
||||
|
||||
// call USBH callback
|
||||
usbh_xfer_isr(p_qhd->device_address, edpt_addr(p_qhd->endpoint_number, p_qhd->pid_non_control == EHCI_PID_IN ? 1 : 0), error_event, p_qhd->total_xferred_bytes);
|
||||
hcd_event_xfer_complete(p_qhd->device_address, edpt_addr(p_qhd->endpoint_number, p_qhd->pid_non_control == EHCI_PID_IN ? 1 : 0), error_event, p_qhd->total_xferred_bytes);
|
||||
|
||||
p_qhd->total_xferred_bytes = 0;
|
||||
}
|
||||
|
||||
@@ -127,6 +127,9 @@ void hcd_event_device_attach(uint8_t rhport);
|
||||
// Helper to send device removal event
|
||||
void hcd_event_device_remove(uint8_t hostid);
|
||||
|
||||
// Helper to send USB transfer event
|
||||
void hcd_event_xfer_complete(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes);
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Endpoints API
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
@@ -717,7 +717,7 @@ static void done_queue_isr(uint8_t hostid)
|
||||
|
||||
if ( pipe_hdl.xfer_type != TUSB_XFER_CONTROL) pipe_hdl.index = ed_get_index(p_ed);
|
||||
|
||||
usbh_xfer_isr(pipe_hdl, p_ed->td_tail.class_code, event, xferred_bytes);
|
||||
hcd_event_xfer_complete(pipe_hdl, p_ed->td_tail.class_code, event, xferred_bytes);
|
||||
}
|
||||
|
||||
td_head = (ohci_td_item_t*) td_head->next_td;
|
||||
|
||||
@@ -256,7 +256,7 @@ static inline tusb_error_t usbh_pipe_control_close(uint8_t dev_addr)
|
||||
// USBH-HCD ISR/Callback API
|
||||
//--------------------------------------------------------------------+
|
||||
// interrupt caused by a TD (with IOC=1) in pipe of class class_code
|
||||
void usbh_xfer_isr(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes)
|
||||
void hcd_event_xfer_complete(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes)
|
||||
{
|
||||
usbh_device_t* dev = &_usbh_devices[ dev_addr ];
|
||||
|
||||
|
||||
@@ -72,7 +72,6 @@ typedef struct {
|
||||
|
||||
//------------- device -------------//
|
||||
volatile uint8_t state; // device state, value from enum tusbh_device_state_t
|
||||
uint32_t flag_supported_class; // a bitmap of supported class
|
||||
|
||||
//------------- control pipe -------------//
|
||||
struct {
|
||||
@@ -96,7 +95,7 @@ extern usbh_device_t _usbh_devices[CFG_TUSB_HOST_DEVICE_MAX+1]; // including zer
|
||||
//--------------------------------------------------------------------+
|
||||
// callback from HCD ISR
|
||||
//--------------------------------------------------------------------+
|
||||
void usbh_xfer_isr(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user