From 706523ebff31ab1cbc0494bf331e8d9c5577a6c7 Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 13 May 2013 22:57:54 +0700 Subject: [PATCH] refractor test code using host_helper --- tests/test/host/ehci/test_ehci_init.c | 9 --------- tests/test/host/ehci/test_pipe_bulk_open.c | 14 ++++++-------- tests/test/host/ehci/test_pipe_bulk_xfer.c | 15 +++++---------- tests/test/host/ehci/test_pipe_control_open.c | 13 +++---------- tests/test/host/ehci/test_pipe_control_xfer.c | 15 ++++----------- tests/test/host/ehci/test_pipe_interrupt_open.c | 7 ++----- tests/test/host/ehci/test_pipe_interrupt_xfer.c | 7 ++----- tests/test/host/ehci/test_pipe_isochronous_open.c | 11 +++-------- tests/test/host/hid/test_hidh_mouse.c | 1 + 9 files changed, 26 insertions(+), 66 deletions(-) diff --git a/tests/test/host/ehci/test_ehci_init.c b/tests/test/host/ehci/test_ehci_init.c index e311c7c7..09e7e7f1 100644 --- a/tests/test/host/ehci/test_ehci_init.c +++ b/tests/test/host/ehci/test_ehci_init.c @@ -53,7 +53,6 @@ usbh_device_info_t usbh_devices[TUSB_CFG_HOST_DEVICE_MAX+1]; -static uint8_t dev_addr; static uint8_t hostid; //--------------------------------------------------------------------+ @@ -64,15 +63,7 @@ void setUp(void) ehci_controller_init(); TEST_ASSERT_EQUAL( TUSB_ERROR_NONE, hcd_init()); - dev_addr = 1; hostid = RANDOM(CONTROLLER_HOST_NUMBER) + TEST_CONTROLLER_HOST_START_INDEX; - for (uint8_t i=0; i