summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-04-07 18:29:30 +0700
committerhathach <[email protected]>2013-04-07 18:29:30 +0700
commitff63a86a4da18a27a434a6ab474be55e18087200 (patch)
tree0b1be970c6f7e17a3ec5225cc55948a61a0b175c /tests
parent058e2a983762afeab5cffc7d81a9ca570140e62a (diff)
add complete isr for hidh mouse
refractor hid_host.c - extract hidh_interface_open from hidh_keyboard_open - extract hidh_interface_close from hidh_keyboard_close -
Diffstat (limited to 'tests')
-rw-r--r--tests/test/host/hid/test_hidh_mouse.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test/host/hid/test_hidh_mouse.c b/tests/test/host/hid/test_hidh_mouse.c
index ab7d1c012..6677bed5c 100644
--- a/tests/test/host/hid/test_hidh_mouse.c
+++ b/tests/test/host/hid/test_hidh_mouse.c
@@ -178,4 +178,13 @@ void test_mouse_get_ok()
TEST_ASSERT_EQUAL(TUSB_INTERFACE_STATUS_BUSY, tusbh_hid_mouse_status(dev_addr, 0));
}
+void test_mouse_isr_event_complete(void)
+{
+ //------------- Code Under TEST -------------//
+ hidh_isr(p_hidh_mouse->pipe_hdl, TUSB_EVENT_XFER_COMPLETE);
+
+ tusbh_device_get_state_IgnoreAndReturn(TUSB_DEVICE_STATE_CONFIGURED);
+ TEST_ASSERT_EQUAL(TUSB_INTERFACE_STATUS_COMPLETE, tusbh_hid_mouse_status(dev_addr, 0));
+}
+