summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-12-08 20:51:48 +0700
committerhathach <[email protected]>2018-12-08 20:51:48 +0700
commitd3ac4c14a3204c585bdeba8e8f27c8257d1ac826 (patch)
tree1ca2e1d1c88c4e6cfd4b10227241baea6788b02b /tests
parent607658d047a3c27a096b9f6a25ea0a76f3d8735d (diff)
refactor hcd api
Diffstat (limited to 'tests')
-rw-r--r--tests/lpc18xx_43xx/test/host/ehci/test_ehci_isr.c8
-rw-r--r--tests/lpc18xx_43xx/test/host/usbh/test_usbh.c10
2 files changed, 9 insertions, 9 deletions
diff --git a/tests/lpc18xx_43xx/test/host/ehci/test_ehci_isr.c b/tests/lpc18xx_43xx/test/host/ehci/test_ehci_isr.c
index 58b8f9002..df830512e 100644
--- a/tests/lpc18xx_43xx/test/host/ehci/test_ehci_isr.c
+++ b/tests/lpc18xx_43xx/test/host/ehci/test_ehci_isr.c
@@ -70,7 +70,7 @@ void tearDown(void)
void test_isr_device_connect_highspeed(void)
{
- usbh_hcd_rhport_plugged_isr_Expect(hostid);
+ hcd_event_device_attach_Expect(hostid);
//------------- Code Under Test -------------//
ehci_controller_device_plug(hostid, TUSB_SPEED_HIGH);
@@ -78,7 +78,7 @@ void test_isr_device_connect_highspeed(void)
void test_isr_device_connect_fullspeed(void)
{
- usbh_hcd_rhport_plugged_isr_Expect(hostid);
+ hcd_event_device_attach_Expect(hostid);
//------------- Code Under Test -------------//
ehci_controller_device_plug(hostid, TUSB_SPEED_FULL);
@@ -86,7 +86,7 @@ void test_isr_device_connect_fullspeed(void)
void test_isr_device_connect_slowspeed(void)
{
- usbh_hcd_rhport_plugged_isr_Expect(hostid);
+ hcd_event_device_attach_Expect(hostid);
//------------- Code Under Test -------------//
ehci_controller_device_plug(hostid, TUSB_SPEED_LOW);
@@ -94,7 +94,7 @@ void test_isr_device_connect_slowspeed(void)
void test_isr_device_disconnect(void)
{
- usbh_hcd_rhport_unplugged_isr_Expect(hostid);
+ hcd_event_device_remove_Expect(hostid);
//------------- Code Under Test -------------//
ehci_controller_device_unplug(hostid);
diff --git a/tests/lpc18xx_43xx/test/host/usbh/test_usbh.c b/tests/lpc18xx_43xx/test/host/usbh/test_usbh.c
index dde629cf0..db5382e48 100644
--- a/tests/lpc18xx_43xx/test/host/usbh/test_usbh.c
+++ b/tests/lpc18xx_43xx/test/host/usbh/test_usbh.c
@@ -142,7 +142,7 @@ void test_usbh_init_ok(void)
#if 0 // TODO TEST enable this
// device is not mounted before, even the control pipe is not open, do nothing
-void test_usbh_hcd_rhport_unplugged_isr_device_not_previously_mounted(void)
+void test_hcd_event_device_remove_device_not_previously_mounted(void)
{
uint8_t dev_addr = 1;
@@ -151,10 +151,10 @@ void test_usbh_hcd_rhport_unplugged_isr_device_not_previously_mounted(void)
_usbh_devices[dev_addr].hub_addr = 0;
_usbh_devices[dev_addr].hub_port = 0;
- usbh_hcd_rhport_unplugged_isr(0);
+ hcd_event_device_remove(0);
}
-void test_usbh_hcd_rhport_unplugged_isr(void)
+void test_hcd_event_device_remove(void)
{
uint8_t dev_addr = 1;
@@ -168,7 +168,7 @@ void test_usbh_hcd_rhport_unplugged_isr(void)
hcd_pipe_control_close_ExpectAndReturn(dev_addr, TUSB_ERROR_NONE);
//------------- Code Under Test -------------//
- usbh_hcd_rhport_unplugged_isr(0);
+ hcd_event_device_remove(0);
TEST_ASSERT_EQUAL(TUSB_DEVICE_STATE_REMOVING, _usbh_devices[dev_addr].state);
}
@@ -190,7 +190,7 @@ void test_usbh_device_unplugged_multple_class(void)
hcd_pipe_control_close_ExpectAndReturn(dev_addr, TUSB_ERROR_NONE);
//------------- Code Under Test -------------//
- usbh_hcd_rhport_unplugged_isr(0);
+ hcd_event_device_remove(0);
TEST_ASSERT_EQUAL(TUSB_DEVICE_STATE_REMOVING, _usbh_devices[dev_addr].state);