From 0c5e0ef0f37b88990c995de465792d0e50eb8cda Mon Sep 17 00:00:00 2001 From: hathach Date: Sat, 23 Mar 2013 18:36:43 +0700 Subject: - add control_pipe_status for usbh_device_info_t to reflect the status transfer of control pipe - fix bug with hcd_port_reset + remove regs->portsc_bit.port_enable in the wait loop as device unplugged can cause this to always fails - correct the timeout for hcd_controll_stop/reset 16 uframes ~ 2 ms - potentially fix bugs device unplugged when new address is not assigned --- tests/test/host/test_hid_host_keyboard.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/test') diff --git a/tests/test/host/test_hid_host_keyboard.c b/tests/test/host/test_hid_host_keyboard.c index 70034266e..ac690a8f9 100644 --- a/tests/test/host/test_hid_host_keyboard.c +++ b/tests/test/host/test_hid_host_keyboard.c @@ -131,7 +131,7 @@ pipe_status_t pipe_status_get_stub(pipe_handle_t pipe_hdl, int num_call) break; case 1: - return PIPE_STATUS_AVAILABLE; + return PIPE_STATUS_READY; break; case 2: @@ -144,7 +144,7 @@ pipe_status_t pipe_status_get_stub(pipe_handle_t pipe_hdl, int num_call) break; default: - return PIPE_STATUS_AVAILABLE; + return PIPE_STATUS_READY; } } @@ -174,7 +174,7 @@ void test_keyboard_get_report_not_available() TEST_ASSERT_EQUAL(TUSB_ERROR_CLASS_DATA_NOT_AVAILABLE, tusbh_hid_keyboard_get(device_hdl, instance_num, &report)); tusbh_device_status_get_IgnoreAndReturn(TUSB_DEVICE_STATE_CONFIGURED); - usbh_pipe_status_get_IgnoreAndReturn(PIPE_STATUS_AVAILABLE); + usbh_pipe_status_get_IgnoreAndReturn(PIPE_STATUS_READY); TEST_ASSERT_EQUAL(TUSB_ERROR_CLASS_DATA_NOT_AVAILABLE, tusbh_hid_keyboard_get(device_hdl, instance_num, &report)); } -- cgit v1.3.1