diff options
| author | hathach <[email protected]> | 2013-03-04 16:21:41 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-03-04 16:21:41 +0700 |
| commit | 94c004724ccbe2b74af74fc1753184f6b3ccb9cf (patch) | |
| tree | b526a427c2bf16e46d7a20d1a5a54324922d9947 /tests | |
| parent | 656da2992ded914c70da849f9f7a1571dd2b91f4 (diff) | |
allow configure host/device by controller basic
- make changes to adapt
add mcu_capacity.h
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test/host/ehci/test_ehci_init.c | 10 | ||||
| -rw-r--r-- | tests/test/host/ehci/test_ehci_structure.c | 2 | ||||
| -rw-r--r-- | tests/test/support/tusb_config.h | 9 | ||||
| -rw-r--r-- | tests/test/test_project_settings.c | 5 |
4 files changed, 13 insertions, 13 deletions
diff --git a/tests/test/host/ehci/test_ehci_init.c b/tests/test/host/ehci/test_ehci_init.c index f83d5f979..ab4e8d219 100644 --- a/tests/test/host/ehci/test_ehci_init.c +++ b/tests/test/host/ehci/test_ehci_init.c @@ -81,7 +81,7 @@ void test_hcd_init_usbint(void) { hcd_init(); - for(uint32_t i=0; i<TUSB_CFG_HOST_CONTROLLER_NUM; i++) + for(uint32_t i=0; i<CONTROLLER_HOST_NUMBER; i++) { ehci_registers_t* const regs = get_operational_register(i+TUSB_CFG_HOST_CONTROLLER_START_INDEX); @@ -105,7 +105,7 @@ void test_hcd_init_async_list(void) { hcd_init(); - for(uint32_t i=0; i<TUSB_CFG_HOST_CONTROLLER_NUM; i++) + for(uint32_t i=0; i<CONTROLLER_HOST_NUMBER; i++) { uint8_t hostid = i+TUSB_CFG_HOST_CONTROLLER_START_INDEX; @@ -130,7 +130,7 @@ void test_hcd_init_period_list(void) #if EHCI_PERIODIC_LIST hcd_init(); - for(uint32_t i=0; i<TUSB_CFG_HOST_CONTROLLER_NUM; i++) + for(uint32_t i=0; i<CONTROLLER_HOST_NUMBER; i++) { uint8_t const hostid = i+TUSB_CFG_HOST_CONTROLLER_START_INDEX; ehci_registers_t* const regs = get_operational_register(hostid); @@ -158,7 +158,7 @@ void test_hcd_init_tt_control(void) { hcd_init(); - for(uint32_t i=0; i<TUSB_CFG_HOST_CONTROLLER_NUM; i++) + for(uint32_t i=0; i<CONTROLLER_HOST_NUMBER; i++) { uint8_t const hostid = i+TUSB_CFG_HOST_CONTROLLER_START_INDEX; ehci_registers_t* const regs = get_operational_register(hostid); @@ -171,7 +171,7 @@ void test_hcd_init_usbcmd(void) { hcd_init(); - for(uint32_t i=0; i<TUSB_CFG_HOST_CONTROLLER_NUM; i++) + for(uint32_t i=0; i<CONTROLLER_HOST_NUMBER; i++) { uint8_t const hostid = i+TUSB_CFG_HOST_CONTROLLER_START_INDEX; ehci_registers_t* const regs = get_operational_register(hostid); diff --git a/tests/test/host/ehci/test_ehci_structure.c b/tests/test/host/ehci/test_ehci_structure.c index 81917edbf..7a5ff85d5 100644 --- a/tests/test/host/ehci/test_ehci_structure.c +++ b/tests/test/host/ehci/test_ehci_structure.c @@ -303,7 +303,7 @@ void test_register_portsc(void) //--------------------------------------------------------------------+ void test_ehci_data(void) { - for(uint32_t i=0; i<TUSB_CFG_HOST_CONTROLLER_NUM; i++) + for(uint32_t i=0; i<CONTROLLER_HOST_NUMBER; i++) { uint8_t hostid = i+TUSB_CFG_HOST_CONTROLLER_START_INDEX; TEST_ASSERT_BITS_LOW(4096-1, (uint32_t)get_period_frame_list(hostid) ); diff --git a/tests/test/support/tusb_config.h b/tests/test/support/tusb_config.h index d7be7931a..cf0566133 100644 --- a/tests/test/support/tusb_config.h +++ b/tests/test/support/tusb_config.h @@ -56,13 +56,18 @@ #endif //--------------------------------------------------------------------+ +// CONTROLLER CONFIGURATION +//--------------------------------------------------------------------+ +#define TUSB_CFG_CONTROLLER0_MODE TUSB_MODE_HOST +#define TUSB_CFG_CONTROLLER1_MODE TUSB_MODE_HOST + +//--------------------------------------------------------------------+ // HOST CONFIGURATION //--------------------------------------------------------------------+ #define TUSB_CFG_HOST -//------------- CORE/CONTROLLER -------------// +//------------- CORE -------------// #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 diff --git a/tests/test/test_project_settings.c b/tests/test/test_project_settings.c index fdc0162da..8977a9b95 100644 --- a/tests/test/test_project_settings.c +++ b/tests/test/test_project_settings.c @@ -50,11 +50,6 @@ void tearDown(void) { } -void test_memory_usage(void) -{ - TEST_IGNORE_MESSAGE("Try to keep project total memory usage up-to-date"); -} - void test_latest_version(void) { TEST_ASSERT_EQUAL_STRING(LATEST_VERSION, TUSB_VERSION); |
