add int_on_complete parameter to hcd_pipe_xfer for TD chain class request

fix control transfer request: remove get_control_request_ptr()
This commit is contained in:
hathach
2013-03-09 14:19:40 +07:00
parent b1db85dedf
commit 2364b09f80
5 changed files with 12 additions and 23 deletions

View File

@@ -146,7 +146,7 @@ void test_bulk_xfer(void)
{
//------------- Code Under Test -------------//
hcd_pipe_xfer(pipe_hdl_bulk, xfer_data, sizeof(xfer_data));
hcd_pipe_xfer(pipe_hdl_bulk, xfer_data, sizeof(xfer_data), true);
ehci_qtd_t* p_qtd = p_qhd_bulk->p_qtd_list_head;
TEST_ASSERT_NOT_NULL(p_qtd);
@@ -162,8 +162,8 @@ void test_bulk_xfer_double(void)
{
//------------- Code Under Test -------------//
hcd_pipe_xfer(pipe_hdl_bulk, xfer_data, sizeof(xfer_data));
hcd_pipe_xfer(pipe_hdl_bulk, data2, sizeof(data2));
hcd_pipe_xfer(pipe_hdl_bulk, xfer_data, sizeof(xfer_data), false);
hcd_pipe_xfer(pipe_hdl_bulk, data2, sizeof(data2), true);
ehci_qtd_t* p_head = p_qhd_bulk->p_qtd_list_head;
ehci_qtd_t* p_tail = p_qhd_bulk->p_qtd_list_head;

View File

@@ -162,7 +162,7 @@ void test_control_addr0_xfer_get_check_qhd_qtd_mapping(void)
TEST_ASSERT_EQUAL_HEX( p_status , p_data->next.address );
TEST_ASSERT_TRUE( p_status->next.terminate );
verify_qtd(p_setup, &usbh_device_info_pool[0].control_request, 8);
verify_qtd(p_setup, &request_get_dev_desc, 8);
}
@@ -181,10 +181,7 @@ void test_control_xfer_get(void)
TEST_ASSERT_TRUE( p_status->next.terminate );
//------------- SETUP -------------//
uint8_t* p_request = (uint8_t *) &usbh_device_info_pool[dev_addr].control_request;
verify_qtd(p_setup, p_request, 8);
TEST_ASSERT_EQUAL_MEMORY(&request_get_dev_desc, p_request, sizeof(tusb_std_request_t));
verify_qtd(p_setup, &request_get_dev_desc, 8);
TEST_ASSERT_FALSE(p_setup->int_on_complete);
TEST_ASSERT_FALSE(p_setup->data_toggle);