enhance some tests

add test for usbh_isr error invoke
fix bug if device unplugged before is set to new address
- clean up & close control addr0 in usbh_device_unplugged_isr
This commit is contained in:
hathach
2013-03-23 17:31:51 +07:00
parent 4adfc6a6d8
commit 44e09cc397
12 changed files with 102 additions and 34 deletions

View File

@@ -68,7 +68,7 @@ void setUp(void)
dev_addr = 1;
hostid = RANDOM(CONTROLLER_HOST_NUMBER) + TEST_CONTROLLER_HOST_START_INDEX;
for (uint8_t i=0; i<TUSB_CFG_HOST_DEVICE_MAX; i++)
for (uint8_t i=0; i<TUSB_CFG_HOST_DEVICE_MAX+1; i++)
{
usbh_device_info_pool[i].core_id = hostid;
usbh_device_info_pool[i].hub_addr = hub_addr;