refractor
- rename usbh_device_info_t.status to state - rename enum TUSB_DEVICE_STATUS_* to TUSB_DEVICE_STATE_*
This commit is contained in:
@@ -78,7 +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;
|
||||
usbh_device_info_pool[i].state = TUSB_DEVICE_STATE_READY;
|
||||
}
|
||||
|
||||
regs = get_operational_register(hostid);
|
||||
@@ -184,10 +184,10 @@ void test_device_unplugged_status(void)
|
||||
{
|
||||
ehci_controller_device_unplug(hostid);
|
||||
hcd_isr(hostid);
|
||||
TEST_ASSERT_EQUAL(TUSB_DEVICE_STATUS_REMOVING, usbh_device_info_pool[dev_addr].status);
|
||||
TEST_ASSERT_EQUAL(TUSB_DEVICE_STATE_REMOVING, usbh_device_info_pool[dev_addr].state);
|
||||
|
||||
regs->usb_sts_bit.async_advance = 1;
|
||||
hcd_isr(hostid); // async advance
|
||||
|
||||
TEST_ASSERT_EQUAL(TUSB_DEVICE_STATUS_UNPLUG, usbh_device_info_pool[dev_addr].status);
|
||||
TEST_ASSERT_EQUAL(TUSB_DEVICE_STATE_UNPLUG, usbh_device_info_pool[dev_addr].state);
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ void verify_open_qhd(ehci_qhd_t *p_qhd, uint8_t endpoint_addr, uint16_t max_pack
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// INTERRUPT PIPE
|
||||
// PIPE OPEN
|
||||
//--------------------------------------------------------------------+
|
||||
tusb_descriptor_endpoint_t const desc_ept_interrupt_out =
|
||||
{
|
||||
@@ -176,3 +176,25 @@ void test_open_interrupt_qhd_non_hs(void)
|
||||
TEST_ASSERT_EQUAL(1, p_qhd->interrupt_smask);
|
||||
TEST_ASSERT_EQUAL(0x1c, p_qhd->non_hs_interrupt_cmask);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// PIPE CLOSE
|
||||
//--------------------------------------------------------------------+
|
||||
void test_interrupt_close(void)
|
||||
{
|
||||
ehci_qhd_t *p_qhd;
|
||||
pipe_handle_t pipe_hdl;
|
||||
|
||||
pipe_hdl = hcd_pipe_open(dev_addr, &desc_ept_interrupt_out, TUSB_CLASS_HID);
|
||||
p_qhd = qhd_get_from_pipe_handle(pipe_hdl);
|
||||
|
||||
//------------- Code Under TEST -------------//
|
||||
hcd_pipe_close(pipe_hdl);
|
||||
|
||||
TEST_IGNORE(); // check operation removing interrupt head
|
||||
|
||||
// TEST_ASSERT(p_qhd->is_removing);
|
||||
// TEST_ASSERT( align32(period_head) != (uint32_t) p_qhd );
|
||||
// TEST_ASSERT_EQUAL_HEX( (uint32_t) get_async_head(hostid), align32(p_qhd->next.address ) );
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user