- 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:
@@ -162,6 +162,19 @@ void class_close_expect(void)
|
||||
hidh_close_Expect(1);
|
||||
}
|
||||
|
||||
// device is not mounted before, even the control pipe is not open, do nothing
|
||||
void test_usbh_device_unplugged_isr_device_not_previously_mounted(void)
|
||||
{
|
||||
uint8_t dev_addr = 1;
|
||||
|
||||
usbh_device_info_pool[dev_addr].status = TUSB_DEVICE_STATUS_UNPLUG;
|
||||
usbh_device_info_pool[dev_addr].core_id = 0;
|
||||
usbh_device_info_pool[dev_addr].hub_addr = 0;
|
||||
usbh_device_info_pool[dev_addr].hub_port = 0;
|
||||
|
||||
usbh_device_unplugged_isr(0);
|
||||
}
|
||||
|
||||
void test_usbh_device_unplugged_isr(void)
|
||||
{
|
||||
uint8_t dev_addr = 1;
|
||||
|
||||
Reference in New Issue
Block a user