diff options
| author | hathach <[email protected]> | 2018-11-23 15:14:47 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-11-23 15:14:47 +0700 |
| commit | cb8782e5f28b4897e73520c91296d1ac7d71da81 (patch) | |
| tree | d8d7554f4ba2c1020eb28e961e11539632d192da /src/host | |
| parent | e61e9d8b1b9f8e551b4560c61f707bbaeac1fc9a (diff) | |
rename tusb_event_t to xfer_result_t
Diffstat (limited to 'src/host')
| -rw-r--r-- | src/host/ehci/ehci.c | 2 | ||||
| -rw-r--r-- | src/host/hub.c | 2 | ||||
| -rw-r--r-- | src/host/hub.h | 2 | ||||
| -rw-r--r-- | src/host/ohci/ohci.c | 2 | ||||
| -rw-r--r-- | src/host/usbh.c | 2 | ||||
| -rw-r--r-- | src/host/usbh.h | 2 | ||||
| -rw-r--r-- | src/host/usbh_hcd.h | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/src/host/ehci/ehci.c b/src/host/ehci/ehci.c index b3d897537..2fc99ffcd 100644 --- a/src/host/ehci/ehci.c +++ b/src/host/ehci/ehci.c @@ -638,7 +638,7 @@ static void qhd_xfer_error_isr(ehci_qhd_t * p_qhd) qhd_has_xact_error(p_qhd) )
{ // current qhd has error in transaction
tusb_xfer_type_t const xfer_type = qhd_get_xfer_type(p_qhd);
- tusb_event_t error_event;
+ xfer_result_t error_event;
// no error bits are set, endpoint is halted due to STALL
error_event = qhd_has_xact_error(p_qhd) ? TUSB_EVENT_XFER_ERROR : TUSB_EVENT_XFER_STALLED;
diff --git a/src/host/hub.c b/src/host/hub.c index e4c08c9d1..9635bcc0b 100644 --- a/src/host/hub.c +++ b/src/host/hub.c @@ -209,7 +209,7 @@ tusb_error_t hub_open_subtask(uint8_t dev_addr, tusb_desc_interface_t const *p_i }
// is the response of interrupt endpoint polling
-void hub_isr(pipe_handle_t pipe_hdl, tusb_event_t event, uint32_t xferred_bytes)
+void hub_isr(pipe_handle_t pipe_hdl, xfer_result_t event, uint32_t xferred_bytes)
{
(void) xferred_bytes; // TODO can be more than 1 for hub with lots of ports
diff --git a/src/host/hub.h b/src/host/hub.h index 67c02f2e3..9376a2698 100644 --- a/src/host/hub.h +++ b/src/host/hub.h @@ -196,7 +196,7 @@ tusb_error_t hub_status_pipe_queue(uint8_t dev_addr); void hub_init(void);
tusb_error_t hub_open_subtask(uint8_t dev_addr, tusb_desc_interface_t const *p_interface_desc, uint16_t *p_length) ATTR_WARN_UNUSED_RESULT;
-void hub_isr(pipe_handle_t pipe_hdl, tusb_event_t event, uint32_t xferred_bytes);
+void hub_isr(pipe_handle_t pipe_hdl, xfer_result_t event, uint32_t xferred_bytes);
void hub_close(uint8_t dev_addr);
#endif
diff --git a/src/host/ohci/ohci.c b/src/host/ohci/ohci.c index f058f8348..58738a236 100644 --- a/src/host/ohci/ohci.c +++ b/src/host/ohci/ohci.c @@ -617,7 +617,7 @@ static void done_queue_isr(uint8_t hostid) // TODO check if td_head is iso td
//------------- Non ISO transfer -------------//
ohci_gtd_t * const p_qtd = (ohci_gtd_t *) td_head;
- tusb_event_t const event = (p_qtd->condition_code == OHCI_CCODE_NO_ERROR) ? TUSB_EVENT_XFER_COMPLETE :
+ xfer_result_t const event = (p_qtd->condition_code == OHCI_CCODE_NO_ERROR) ? TUSB_EVENT_XFER_COMPLETE :
(p_qtd->condition_code == OHCI_CCODE_STALL) ? TUSB_EVENT_XFER_STALLED : TUSB_EVENT_XFER_ERROR;
p_qtd->used = 0; // free TD
diff --git a/src/host/usbh.c b/src/host/usbh.c index 196a45ee7..ed21bf3da 100644 --- a/src/host/usbh.c +++ b/src/host/usbh.c @@ -256,7 +256,7 @@ static inline uint8_t std_class_code_to_index(uint8_t std_class_code) // 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, tusb_event_t event, uint32_t xferred_bytes)
+void usbh_xfer_isr(pipe_handle_t pipe_hdl, uint8_t class_code, xfer_result_t event, uint32_t xferred_bytes)
{
uint8_t class_index = std_class_code_to_index(class_code);
if (TUSB_XFER_CONTROL == pipe_hdl.xfer_type)
diff --git a/src/host/usbh.h b/src/host/usbh.h index 5aaeb4186..22fdef162 100644 --- a/src/host/usbh.h +++ b/src/host/usbh.h @@ -66,7 +66,7 @@ typedef enum tusb_interface_status_{ typedef struct { void (* const init) (void); tusb_error_t (* const open_subtask)(uint8_t, tusb_desc_interface_t const *, uint16_t*); - void (* const isr) (pipe_handle_t, tusb_event_t, uint32_t); + void (* const isr) (pipe_handle_t, xfer_result_t, uint32_t); void (* const close) (uint8_t); } host_class_driver_t; //--------------------------------------------------------------------+ diff --git a/src/host/usbh_hcd.h b/src/host/usbh_hcd.h index 1c2c4ad0b..f6b72273a 100644 --- a/src/host/usbh_hcd.h +++ b/src/host/usbh_hcd.h @@ -101,7 +101,7 @@ extern usbh_device_info_t usbh_devices[CFG_TUSB_HOST_DEVICE_MAX+1]; // including //--------------------------------------------------------------------+ // callback from HCD ISR //--------------------------------------------------------------------+ -void usbh_xfer_isr(pipe_handle_t pipe_hdl, uint8_t class_code, tusb_event_t event, uint32_t xferred_bytes); +void usbh_xfer_isr(pipe_handle_t pipe_hdl, uint8_t class_code, xfer_result_t event, uint32_t xferred_bytes); void usbh_hcd_rhport_plugged_isr(uint8_t hostid); void usbh_hcd_rhport_unplugged_isr(uint8_t hostid); |
