summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-03-03 12:37:44 +0700
committerhathach <[email protected]>2013-03-03 12:37:44 +0700
commit72b42054e582cbd402bc72498463dd7150d45ecc (patch)
tree88a7be07083b910ac8b854e9795f3c0108132c16
parent356c32992236dd4f090f2cda0f95bfe79704cc2d (diff)
refractor
-rw-r--r--tests/test/host/ehci/test_ehci.c10
-rw-r--r--tests/test/support/tusb_config.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/test/host/ehci/test_ehci.c b/tests/test/host/ehci/test_ehci.c
index 6b6f5abdb..35e068d73 100644
--- a/tests/test/host/ehci/test_ehci.c
+++ b/tests/test/host/ehci/test_ehci.c
@@ -45,8 +45,6 @@
#include "ehci.h"
extern ehci_data_t ehci_data;
-extern ehci_link_t period_frame_list0[EHCI_FRAMELIST_SIZE];
-extern ehci_link_t period_frame_list1[EHCI_FRAMELIST_SIZE];
LPC_USB0_Type lpc_usb0;
LPC_USB1_Type lpc_usb1;
@@ -307,9 +305,11 @@ void test_register_portsc(void)
//--------------------------------------------------------------------+
void test_ehci_data(void)
{
- // period fram list alignment
- TEST_ASSERT_BITS_LOW(4096-1, (uint32_t)period_frame_list0 );
- TEST_ASSERT_BITS_LOW(4096-1, (uint32_t)period_frame_list1 );
+ for(uint32_t i=0; i<TUSB_CFG_HOST_CONTROLLER_NUM; i++)
+ {
+ uint8_t hostid = i+TUSB_CFG_HOST_CONTROLLER_START_INDEX;
+ TEST_ASSERT_BITS_LOW(4096-1, (uint32_t)get_period_frame_list(hostid) );
+ }
TEST_IGNORE();
}
diff --git a/tests/test/support/tusb_config.h b/tests/test/support/tusb_config.h
index 8b83c4367..d7be7931a 100644
--- a/tests/test/support/tusb_config.h
+++ b/tests/test/support/tusb_config.h
@@ -61,8 +61,8 @@
#define TUSB_CFG_HOST
//------------- CORE/CONTROLLER -------------//
-#define TUSB_CFG_HOST_CONTROLLER_NUM 2
#define TUSB_CFG_HOST_CONTROLLER_START_INDEX 0
+#define TUSB_CFG_HOST_CONTROLLER_NUM (2 - TUSB_CFG_HOST_CONTROLLER_START_INDEX)
#define TUSB_CFG_HOST_DEVICE_MAX 2
#define TUSB_CFG_CONFIGURATION_MAX 2