summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-12-12 11:32:46 +0700
committerhathach <[email protected]>2018-12-12 11:34:09 +0700
commite3514b80543ac2514a80d886255bd8e33b325750 (patch)
tree255981542b7eabdc7b9c78a430ad57982a46d7ae
parentc88e16bd116a826ebd2d9fb348fd3704f6b1f14d (diff)
rename hcd_device_remove to hcd_device_close
-rw-r--r--src/host/ehci/ehci.c2
-rw-r--r--src/host/hcd.h4
-rw-r--r--src/host/ohci/ohci.c2
-rw-r--r--src/host/usbh.c4
-rw-r--r--src/portable/nxp/lpc18_43/hcd_lpc18_43.c5
5 files changed, 7 insertions, 10 deletions
diff --git a/src/host/ehci/ehci.c b/src/host/ehci/ehci.c
index 146ab0615..ef5510a6d 100644
--- a/src/host/ehci/ehci.c
+++ b/src/host/ehci/ehci.c
@@ -181,7 +181,7 @@ static void list_remove_qhd_by_addr(ehci_link_t* list_head, uint8_t dev_addr)
}
// Close all opened endpoint belong to this device
-void hcd_device_remove(uint8_t rhport, uint8_t dev_addr)
+void hcd_device_close(uint8_t rhport, uint8_t dev_addr)
{
// skip dev0
if (dev_addr == 0) return;
diff --git a/src/host/hcd.h b/src/host/hcd.h
index 1496d462a..f93cbd2c6 100644
--- a/src/host/hcd.h
+++ b/src/host/hcd.h
@@ -108,8 +108,8 @@ bool hcd_port_connect_status(uint8_t hostid);
void hcd_port_reset(uint8_t hostid);
tusb_speed_t hcd_port_speed_get(uint8_t hostid);
-// HCD closs all opened endpoints belong to this device
-void hcd_device_remove(uint8_t rhport, uint8_t dev_addr);
+// HCD closes all opened endpoints belong to this device
+void hcd_device_close(uint8_t rhport, uint8_t dev_addr);
//--------------------------------------------------------------------+
// Event function
diff --git a/src/host/ohci/ohci.c b/src/host/ohci/ohci.c
index 669aa2a15..c35eaa77b 100644
--- a/src/host/ohci/ohci.c
+++ b/src/host/ohci/ohci.c
@@ -216,7 +216,7 @@ tusb_speed_t hcd_port_speed_get(uint8_t hostid)
// endpoints are tied to an address, which only reclaim after a long delay when enumerating
// thus there is no need to make sure ED is not in HC's cahed as it will not for sure
-void hcd_device_remove(uint8_t rhport, uint8_t dev_addr)
+void hcd_device_close(uint8_t rhport, uint8_t dev_addr)
{
// TODO OHCI
(void) rhport;
diff --git a/src/host/usbh.c b/src/host/usbh.c
index 31024f1f7..962dc04dc 100644
--- a/src/host/usbh.c
+++ b/src/host/usbh.c
@@ -334,7 +334,7 @@ static void usbh_device_unplugged(uint8_t rhport, uint8_t hub_addr, uint8_t hub_
memset(dev->itf2drv, 0xff, sizeof(dev->itf2drv)); // invalid mapping
memset(dev->ep2drv , 0xff, sizeof(dev->ep2drv )); // invalid mapping
- hcd_device_remove(rhport, dev_addr);
+ hcd_device_close(rhport, dev_addr);
dev->state = TUSB_DEVICE_STATE_UNPLUG;
}
@@ -495,7 +495,7 @@ bool enum_task(hcd_event_t* event)
new_dev->speed = dev0->speed;
new_dev->state = TUSB_DEVICE_STATE_ADDRESSED;
- hcd_device_remove(dev0->rhport, 0); // close device 0
+ hcd_device_close(dev0->rhport, 0); // close device 0
dev0->state = TUSB_DEVICE_STATE_UNPLUG;
// open control pipe for new address
diff --git a/src/portable/nxp/lpc18_43/hcd_lpc18_43.c b/src/portable/nxp/lpc18_43/hcd_lpc18_43.c
index 141a77656..efdf8fea4 100644
--- a/src/portable/nxp/lpc18_43/hcd_lpc18_43.c
+++ b/src/portable/nxp/lpc18_43/hcd_lpc18_43.c
@@ -42,10 +42,6 @@
#include "chip.h"
-//--------------------------------------------------------------------+
-// MACRO TYPEDEF CONSTANT ENUM DECLARATION
-//--------------------------------------------------------------------+
-
void hcd_int_enable(uint8_t rhport)
{
NVIC_EnableIRQ(rhport ? USB1_IRQn : USB0_IRQn);
@@ -55,4 +51,5 @@ void hcd_int_disable(uint8_t rhport)
{
NVIC_DisableIRQ(rhport ? USB1_IRQn : USB0_IRQn);
}
+
#endif