diff options
| author | hathach <[email protected]> | 2013-09-22 18:44:55 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-09-22 18:44:55 +0700 |
| commit | cc91a73cdc8c6f46adfcae38e4c36d819a49ab01 (patch) | |
| tree | 829f83c189fd25b2eb28374ec4392a1860f2d8ca /tests | |
| parent | 57088638598ccd0ea185debb8ca0fc7cbb404587 (diff) | |
fix pingstate for highspeed bulk out transfer
temp implementation of msc host --> can issue inquiry command
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/lpc18xx_43xx/test/host/ehci/test_pipe_bulk_open.c | 22 | ||||
| -rw-r--r-- | tests/lpc18xx_43xx/test/host/ehci/test_pipe_bulk_xfer.c | 1 |
2 files changed, 22 insertions, 1 deletions
diff --git a/tests/lpc18xx_43xx/test/host/ehci/test_pipe_bulk_open.c b/tests/lpc18xx_43xx/test/host/ehci/test_pipe_bulk_open.c index 4ddc519aa..9a3d0a36b 100644 --- a/tests/lpc18xx_43xx/test/host/ehci/test_pipe_bulk_open.c +++ b/tests/lpc18xx_43xx/test/host/ehci/test_pipe_bulk_open.c @@ -117,6 +117,16 @@ tusb_descriptor_endpoint_t const desc_ept_bulk_in = .bInterval = 0 }; +tusb_descriptor_endpoint_t const desc_ept_bulk_out = +{ + .bLength = sizeof(tusb_descriptor_endpoint_t), + .bDescriptorType = TUSB_DESC_TYPE_ENDPOINT, + .bEndpointAddress = 0x01, + .bmAttributes = { .xfer = TUSB_XFER_BULK }, + .wMaxPacketSize = 512, + .bInterval = 0 +}; + void verify_bulk_open_qhd(ehci_qhd_t *p_qhd, tusb_descriptor_endpoint_t const * desc_endpoint, uint8_t class_code) { verify_open_qhd(p_qhd, desc_endpoint->bEndpointAddress, desc_endpoint->wMaxPacketSize.size); @@ -159,6 +169,18 @@ void test_open_bulk_qhd_data(void) TEST_ASSERT_EQUAL(EHCI_QUEUE_ELEMENT_QHD, async_head->next.type); } +void test_open_bulk_hs_out_pingstate(void) +{ + ehci_qhd_t *p_qhd; + pipe_handle_t pipe_hdl; + + //------------- Code Under TEST -------------// + pipe_hdl = hcd_pipe_open(dev_addr, &desc_ept_bulk_out, TUSB_CLASS_MSC); + + p_qhd = &ehci_data.device[ pipe_hdl.dev_addr-1 ].qhd[ pipe_hdl.index ]; + TEST_ASSERT(p_qhd->qtd_overlay.pingstate_err); +} + //--------------------------------------------------------------------+ // PIPE CLOSE //--------------------------------------------------------------------+ diff --git a/tests/lpc18xx_43xx/test/host/ehci/test_pipe_bulk_xfer.c b/tests/lpc18xx_43xx/test/host/ehci/test_pipe_bulk_xfer.c index babee4482..221fe0ee2 100644 --- a/tests/lpc18xx_43xx/test/host/ehci/test_pipe_bulk_xfer.c +++ b/tests/lpc18xx_43xx/test/host/ehci/test_pipe_bulk_xfer.c @@ -155,7 +155,6 @@ void test_bulk_xfer_hs_ping_out(void) TEST_ASSERT_STATUS( hcd_pipe_xfer(pipe_hdl, xfer_data, sizeof(xfer_data), true) ); ehci_qtd_t* p_qtd = p_qhd->p_qtd_list_head; - TEST_ASSERT(p_qtd->pingstate_err); } void test_bulk_xfer(void) |
