add prototype for hcd_pipe(control)_close

- update test code for enum task respectively
This commit is contained in:
hathach
2013-03-06 22:41:14 +07:00
parent 5c3bd1f8dc
commit ef08654e73
4 changed files with 15 additions and 9 deletions

View File

@@ -186,6 +186,7 @@ void test_enum_failed_get_full_dev_desc(void)
{
osal_semaphore_wait_StubWithCallback(semaphore_wait_timeout_stub(2));
hcd_pipe_control_close_ExpectAndReturn(0, TUSB_ERROR_NONE);
hcd_pipe_control_open_ExpectAndReturn(1, desc_device.bMaxPacketSize0, TUSB_ERROR_NONE);
tusbh_device_mount_failed_cb_Expect(TUSB_ERROR_USBH_MOUNT_DEVICE_NOT_RESPOND, NULL);
@@ -202,6 +203,7 @@ void test_enum_failed_get_9byte_config_desc(void)
{
osal_semaphore_wait_StubWithCallback(semaphore_wait_timeout_stub(3));
hcd_pipe_control_close_ExpectAndReturn(0, TUSB_ERROR_NONE);
hcd_pipe_control_open_ExpectAndReturn(1, desc_device.bMaxPacketSize0, TUSB_ERROR_NONE);
tusbh_device_attached_cb_ExpectAndReturn((tusb_descriptor_device_t*) enum_data_buffer, 1);
tusbh_device_mount_failed_cb_Expect(TUSB_ERROR_USBH_MOUNT_DEVICE_NOT_RESPOND, NULL);
@@ -216,6 +218,7 @@ void test_enum_failed_get_9byte_config_desc(void)
void test_enum_failed_get_full_config_desc(void)
{
osal_semaphore_wait_StubWithCallback(semaphore_wait_timeout_stub(4));
hcd_pipe_control_close_ExpectAndReturn(0, TUSB_ERROR_NONE);
hcd_pipe_control_open_ExpectAndReturn(1, desc_device.bMaxPacketSize0, TUSB_ERROR_NONE);
tusbh_device_attached_cb_ExpectAndReturn((tusb_descriptor_device_t*) enum_data_buffer, 1);
tusbh_device_mount_failed_cb_Expect(TUSB_ERROR_USBH_MOUNT_DEVICE_NOT_RESPOND, NULL);
@@ -231,6 +234,7 @@ void class_install_expect(void)
void test_enum_parse_config_desc(void)
{
osal_semaphore_wait_StubWithCallback(semaphore_wait_timeout_stub(5));
hcd_pipe_control_close_ExpectAndReturn(0, TUSB_ERROR_NONE);
hcd_pipe_control_open_ExpectAndReturn(1, desc_device.bMaxPacketSize0, TUSB_ERROR_NONE);
tusbh_device_attached_cb_ExpectAndReturn((tusb_descriptor_device_t*) enum_data_buffer, 1);
@@ -245,6 +249,7 @@ void test_enum_parse_config_desc(void)
void test_enum_set_configure(void)
{
osal_semaphore_wait_StubWithCallback(semaphore_wait_timeout_stub(6));
hcd_pipe_control_close_ExpectAndReturn(0, TUSB_ERROR_NONE);
hcd_pipe_control_open_ExpectAndReturn(1, desc_device.bMaxPacketSize0, TUSB_ERROR_NONE);
tusbh_device_attached_cb_ExpectAndReturn((tusb_descriptor_device_t*) enum_data_buffer, 1);
class_install_expect();