diff --git a/src/host/ehci/ehci.c b/src/host/ehci/ehci.c index 49f43a9a..387de5e8 100644 --- a/src/host/ehci/ehci.c +++ b/src/host/ehci/ehci.c @@ -439,7 +439,6 @@ pipe_handle_t hcd_pipe_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_endpoint TU_ASSERT(p_qhd, null_handle); qhd_init( p_qhd, dev_addr, ep_desc); - p_qhd->class_code = class_code; //------------- Insert to Async List -------------// ehci_link_t * list_head; @@ -649,8 +648,7 @@ static void qhd_xfer_complete_isr(ehci_qhd_t * p_qhd) if (is_ioc) // end of request { // call USBH callback - usbh_xfer_isr( qhd_create_pipe_handle(p_qhd, xfer_type), - p_qhd->class_code, XFER_RESULT_SUCCESS, + usbh_xfer_isr( qhd_create_pipe_handle(p_qhd, xfer_type), XFER_RESULT_SUCCESS, p_qhd->total_xferred_bytes - (xfer_type == TUSB_XFER_CONTROL ? 8 : 0) ); // subtract setup packet size if control, p_qhd->total_xferred_bytes = 0; } @@ -747,9 +745,7 @@ static void qhd_xfer_error_isr(ehci_qhd_t * p_qhd) } // call USBH callback - usbh_xfer_isr( qhd_create_pipe_handle(p_qhd, xfer_type), - p_qhd->class_code, error_event, - p_qhd->total_xferred_bytes); + usbh_xfer_isr( qhd_create_pipe_handle(p_qhd, xfer_type), error_event, p_qhd->total_xferred_bytes); p_qhd->total_xferred_bytes = 0; } diff --git a/src/host/ehci/ehci.h b/src/host/ehci/ehci.h index b06a6f8b..47d00739 100644 --- a/src/host/ehci/ehci.h +++ b/src/host/ehci/ehci.h @@ -192,11 +192,11 @@ typedef struct ATTR_ALIGNED(32) { uint8_t used; uint8_t is_removing; uint8_t pid_non_control; - uint8_t class_code; + uint8_t reserved1; uint16_t total_xferred_bytes; // number of bytes xferred until a qtd with ioc bit set uint8_t interval_ms; // polling interval in frames (or milisecond) - uint8_t reserved; + uint8_t reserved2; ehci_qtd_t * volatile p_qtd_list_head; // head of the scheduled TD list ehci_qtd_t * volatile p_qtd_list_tail; // tail of the scheduled TD list diff --git a/src/host/usbh.c b/src/host/usbh.c index 7be0376c..ff80ee78 100644 --- a/src/host/usbh.c +++ b/src/host/usbh.c @@ -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(pipe_handle_t pipe_hdl, uint8_t class_code, xfer_result_t event, uint32_t xferred_bytes) +void usbh_xfer_isr(pipe_handle_t pipe_hdl, xfer_result_t event, uint32_t xferred_bytes) { usbh_device_t* dev = &_usbh_devices[ pipe_hdl.dev_addr ]; diff --git a/src/host/usbh_hcd.h b/src/host/usbh_hcd.h index 8af454b1..ce446923 100644 --- a/src/host/usbh_hcd.h +++ b/src/host/usbh_hcd.h @@ -96,7 +96,7 @@ extern usbh_device_t _usbh_devices[CFG_TUSB_HOST_DEVICE_MAX+1]; // including zer //--------------------------------------------------------------------+ // callback from HCD ISR //--------------------------------------------------------------------+ -void usbh_xfer_isr(pipe_handle_t pipe_hdl, uint8_t class_code, xfer_result_t event, uint32_t xferred_bytes); +void usbh_xfer_isr(pipe_handle_t pipe_hdl, xfer_result_t event, uint32_t xferred_bytes); #ifdef __cplusplus