add code & test for hidh_isr (set status for keyboard)
This commit is contained in:
@@ -72,7 +72,6 @@ void test_hidh_open_ok(void)
|
||||
{
|
||||
uint16_t length=0;
|
||||
|
||||
|
||||
// TODO expect get HID report descriptor
|
||||
hcd_pipe_open_IgnoreAndReturn( pipe_hdl );
|
||||
|
||||
@@ -95,10 +94,3 @@ void test_hidh_close(void)
|
||||
|
||||
TEST_ASSERT_MEM_ZERO(&keyboard_data[dev_addr-1], sizeof(hidh_keyboard_info_t));
|
||||
}
|
||||
|
||||
void test_hihd_isr(void)
|
||||
{
|
||||
TEST_IGNORE();
|
||||
//------------- Code Under TEST -------------//
|
||||
// hidh_isr()
|
||||
}
|
||||
|
||||
@@ -187,3 +187,12 @@ void test_keyboard_get_ok()
|
||||
tusbh_device_get_state_IgnoreAndReturn(TUSB_DEVICE_STATE_CONFIGURED);
|
||||
TEST_ASSERT_EQUAL(TUSB_INTERFACE_STATUS_BUSY, tusbh_hid_keyboard_status(dev_addr, 0));
|
||||
}
|
||||
|
||||
void test_keyboard_isr_event_complete(void)
|
||||
{
|
||||
//------------- Code Under TEST -------------//
|
||||
hidh_isr(p_hidh_kbd->pipe_hdl, BUS_EVENT_XFER_COMPLETE);
|
||||
|
||||
tusbh_device_get_state_IgnoreAndReturn(TUSB_DEVICE_STATE_CONFIGURED);
|
||||
TEST_ASSERT_EQUAL(TUSB_INTERFACE_STATUS_COMPLETE, tusbh_hid_keyboard_status(dev_addr, 0));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user