more hcd_pipe to hcd_edpt rename

This commit is contained in:
hathach
2018-12-11 13:15:05 +07:00
parent 0d04e6eb96
commit dbc560658a
8 changed files with 29 additions and 27 deletions

View File

@@ -187,7 +187,7 @@ void test_keyboard_get_device_not_ready(void)
void test_keyboard_get_report_xfer_failed()
{
tusbh_device_get_state_IgnoreAndReturn(TUSB_DEVICE_STATE_CONFIGURED);
hcd_pipe_is_busy_ExpectAndReturn(p_hidh_kbd->pipe_hdl, false);
hcd_edpt_busy_ExpectAndReturn(p_hidh_kbd->pipe_hdl, false);
hcd_pipe_xfer_ExpectAndReturn(p_hidh_kbd->pipe_hdl, (uint8_t*) &report, p_hidh_kbd->report_size, true, TUSB_ERROR_INVALID_PARA);
//------------- Code Under TEST -------------//
@@ -197,7 +197,7 @@ void test_keyboard_get_report_xfer_failed()
void test_keyboard_get_report_xfer_failed_busy()
{
tusbh_device_get_state_IgnoreAndReturn(TUSB_DEVICE_STATE_CONFIGURED);
hcd_pipe_is_busy_ExpectAndReturn(p_hidh_kbd->pipe_hdl, true);
hcd_edpt_busy_ExpectAndReturn(p_hidh_kbd->pipe_hdl, true);
TEST_ASSERT_EQUAL(TUSB_ERROR_INTERFACE_IS_BUSY, tusbh_hid_keyboard_get_report(dev_addr, &report));
}
@@ -206,7 +206,7 @@ void test_keyboard_get_ok()
{
tusbh_device_get_state_IgnoreAndReturn(TUSB_DEVICE_STATE_CONFIGURED);
// TEST_ASSERT_EQUAL(TUSB_INTERFACE_STATUS_READY, tusbh_hid_keyboard_status(dev_addr));
hcd_pipe_is_busy_ExpectAndReturn(p_hidh_kbd->pipe_hdl, false);
hcd_edpt_busy_ExpectAndReturn(p_hidh_kbd->pipe_hdl, false);
hcd_pipe_xfer_ExpectAndReturn(p_hidh_kbd->pipe_hdl, (uint8_t*) &report, p_hidh_kbd->report_size, true, TUSB_ERROR_NONE);
//------------- Code Under TEST -------------//

View File

@@ -159,7 +159,7 @@ void test_mouse_get_device_not_ready(void)
void test_mouse_get_report_xfer_failed()
{
tusbh_device_get_state_IgnoreAndReturn(TUSB_DEVICE_STATE_CONFIGURED);
hcd_pipe_is_busy_ExpectAndReturn(p_hidh_mouse->pipe_hdl, false);
hcd_edpt_busy_ExpectAndReturn(p_hidh_mouse->pipe_hdl, false);
hcd_pipe_xfer_ExpectAndReturn(p_hidh_mouse->pipe_hdl, (uint8_t*) &report, p_hidh_mouse->report_size, true, TUSB_ERROR_INVALID_PARA);
//------------- Code Under TEST -------------//
@@ -169,7 +169,7 @@ void test_mouse_get_report_xfer_failed()
void test_mouse_get_report_xfer_failed_busy()
{
tusbh_device_get_state_IgnoreAndReturn(TUSB_DEVICE_STATE_CONFIGURED);
hcd_pipe_is_busy_ExpectAndReturn(p_hidh_mouse->pipe_hdl, true);
hcd_edpt_busy_ExpectAndReturn(p_hidh_mouse->pipe_hdl, true);
TEST_ASSERT_EQUAL(TUSB_ERROR_INTERFACE_IS_BUSY, tusbh_hid_mouse_get_report(dev_addr, &report));
}
@@ -178,7 +178,7 @@ void test_mouse_get_ok()
{
tusbh_device_get_state_IgnoreAndReturn(TUSB_DEVICE_STATE_CONFIGURED);
// TEST_ASSERT_EQUAL(TUSB_INTERFACE_STATUS_READY, tusbh_hid_mouse_status(dev_addr));
hcd_pipe_is_busy_ExpectAndReturn(p_hidh_mouse->pipe_hdl, false);
hcd_edpt_busy_ExpectAndReturn(p_hidh_mouse->pipe_hdl, false);
hcd_pipe_xfer_ExpectAndReturn(p_hidh_mouse->pipe_hdl, (uint8_t*) &report, p_hidh_mouse->report_size, true, TUSB_ERROR_NONE);
//------------- Code Under TEST -------------//