- fix bug when unplugged unmounted-already device (mostly plugged when power on)
- add hal_debugger_is_attached & hal_debugger_breakpoint - assert will suspend (place breakpoint) if the condition is failed and debugger is attached. Otherwise, a message to uart is printed - fix get control qhd function when dev_addr is not zero (shifted 1) - fix wrong logic for unsupported class
This commit is contained in:
@@ -78,6 +78,7 @@ void setUp(void)
|
||||
usbh_device_info_pool[i].hub_addr = hub_addr;
|
||||
usbh_device_info_pool[i].hub_port = hub_port;
|
||||
usbh_device_info_pool[i].speed = TUSB_SPEED_HIGH;
|
||||
usbh_device_info_pool[i].status = TUSB_DEVICE_STATUS_READY;
|
||||
}
|
||||
|
||||
regs = get_operational_register(hostid);
|
||||
@@ -178,3 +179,17 @@ void test_bulk_pipe_close(void)
|
||||
TEST_ASSERT_FALSE(p_qtd_head->used);
|
||||
TEST_ASSERT_FALSE(p_qtd_tail->used);
|
||||
}
|
||||
|
||||
void test_device_unplugged_status(void)
|
||||
{
|
||||
ehci_controller_device_unplug(hostid);
|
||||
hcd_isr(hostid);
|
||||
|
||||
regs->usb_sts_bit.async_advance = 1;
|
||||
hcd_isr(hostid); // async advance
|
||||
|
||||
//------------- Code Under Test -------------//
|
||||
|
||||
TEST_ASSERT_EQUAL(TUSB_DEVICE_STATUS_REMOVING, usbh_device_info_pool[dev_addr].status);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user