File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 69
69
HID_PROTOCOL_MOUSE = 2
70
70
71
71
# Greentea message keys used for callbacks
72
- MSG_KEY_DEVICE_READY = 'ready'
72
+ MSG_KEY_DEVICE_READY = 'dev_ready'
73
+ MSG_KEY_HOST_READY = 'host_ready'
73
74
MSG_KEY_SERIAL_NUMBER = 'usb_dev_sn'
74
75
MSG_KEY_TEST_GET_DESCRIPTOR_HID = 'test_get_desc_hid'
75
76
MSG_KEY_TEST_GET_DESCRIPTOR_CFG = 'test_get_desc_cfg'
@@ -495,6 +496,8 @@ def raw_loopback(self, report_size):
495
496
except RetryError as exc :
496
497
self .notify_error (exc )
497
498
return
499
+ # Notify the device it can send reports now.
500
+ self .send_kv (MSG_KEY_HOST_READY , MSG_VALUE_DUMMY )
498
501
try :
499
502
for _ in range (RAW_IO_REPS ):
500
503
# There are no Report ID tags in the Report descriptor.
Original file line number Diff line number Diff line change 38
38
#define MSG_VALUE_LEN 24
39
39
#define MSG_KEY_LEN 24
40
40
#define MSG_KEY_DEVICE_READY " ready"
41
+ #define MSG_KEY_DEVICE_READY " dev_ready"
42
+ #define MSG_KEY_HOST_READY " host_ready"
41
43
#define MSG_KEY_SERIAL_NUMBER " usb_dev_sn"
42
44
#define MSG_KEY_TEST_GET_DESCRIPTOR_HID " test_get_desc_hid"
43
45
#define MSG_KEY_TEST_GET_DESCRIPTOR_CFG " test_get_desc_cfg"
@@ -307,6 +309,12 @@ void test_generic_raw_io()
307
309
greentea_send_kv (MSG_KEY_TEST_RAW_IO, REPORT_SIZE);
308
310
usb_hid.wait_ready ();
309
311
312
+ // Wait for the host HID driver to complete setup.
313
+ char key[MSG_KEY_LEN + 1 ] = { };
314
+ char value[MSG_VALUE_LEN + 1 ] = { };
315
+ greentea_parse_kv (key, value, MSG_KEY_LEN, MSG_VALUE_LEN);
316
+ TEST_ASSERT_EQUAL_STRING (MSG_KEY_HOST_READY, key);
317
+
310
318
// Report ID omitted here. There are no Report ID tags in the Report descriptor.
311
319
HID_REPORT input_report = {};
312
320
HID_REPORT output_report = {};
You can’t perform that action at this time.
0 commit comments