summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-03-06 00:29:10 +0700
committerhathach <[email protected]>2013-03-06 00:29:10 +0700
commit5b401cc517450ada6e4b26fcd7b3f0bf8dfea052 (patch)
treefa3d9cada192af713cf5c06c420f702e871b1699 /tests
parentb3775b631bf60c15c1d4917cba6a35e1f421bebd (diff)
refractor hcd_open
Diffstat (limited to 'tests')
-rw-r--r--tests/test/host/ehci/test_ehci_pipe.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/test/host/ehci/test_ehci_pipe.c b/tests/test/host/ehci/test_ehci_pipe.c
index 812634294..a1c2a3c7b 100644
--- a/tests/test/host/ehci/test_ehci_pipe.c
+++ b/tests/test/host/ehci/test_ehci_pipe.c
@@ -67,7 +67,7 @@ tusb_descriptor_endpoint_t const desc_ept_bulk_in =
.bDescriptorType = TUSB_DESC_ENDPOINT,
.bEndpointAddress = 0x81,
.bmAttributes = { .xfer = TUSB_XFER_BULK },
- .wMaxPacketSize = 64,
+ .wMaxPacketSize = 512,
.bInterval = 0
};
@@ -80,6 +80,7 @@ void setUp(void)
memclr_(&lpc_usb1, sizeof(LPC_USB1_Type));
memclr_(usbh_device_info_pool, sizeof(usbh_device_info_t)*(TUSB_CFG_HOST_DEVICE_MAX+1));
+ memclr_(&ehci_data, sizeof(ehci_data_t));
hcd_init();
@@ -133,6 +134,9 @@ void verify_bulk_open_qhd(ehci_qhd_t *p_qhd, tusb_descriptor_endpoint_t const *
TEST_ASSERT_EQUAL(0, p_qhd->data_toggle_control);
TEST_ASSERT_EQUAL(0, p_qhd->smask);
TEST_ASSERT_EQUAL(0, p_qhd->cmask);
+ TEST_ASSERT_FALSE(p_qhd->non_hs_control_endpoint);
+ TEST_ASSERT_EQUAL(usbh_device_info_pool[dev_addr].speed, p_qhd->endpoint_speed);
+
// TEST_ASSERT_EQUAL(desc_endpoint->bInterval); TEST highspeed bulk/control OUT
TEST_ASSERT_EQUAL(desc_endpoint->bEndpointAddress & 0x80 ? EHCI_PID_IN : EHCI_PID_OUT, p_qhd->pid_non_control);
@@ -208,11 +212,11 @@ void test_control_open_non_highspeed(void)
//--------------------------------------------------------------------+
// BULK PIPE
//--------------------------------------------------------------------+
-void test_open_bulk_in_qhd_data(void)
+void test_open_bulk_qhd_data(void)
{
ehci_qhd_t *p_qhd;
- tusb_descriptor_endpoint_t const * desc_endpoint = &desc_ept_bulk_in;
pipe_handle_t pipe_hdl;
+ tusb_descriptor_endpoint_t const * desc_endpoint = &desc_ept_bulk_in;
pipe_hdl = hcd_pipe_open(dev_addr, desc_endpoint);