File tree Expand file tree Collapse file tree 2 files changed +26
-4
lines changed
Expand file tree Collapse file tree 2 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 2222 "name" : " dfu_runtime" ,
2323 "firmware" : " examples/device/dfu_runtime/_build/stm32l412nucleo/dfu_runtime.elf"
2424 },
25+ {
26+ "name" : " hid_boot_interface" ,
27+ "firmware" : " examples/device/hid_boot_interface/_build/stm32l412nucleo/hid_boot_interface.elf"
28+ },
2529 {
2630 "name" : " board_test" ,
2731 "firmware" : " examples/device/board_test/_build/stm32l412nucleo/board_test.elf"
5054 "name" : " dfu_runtime" ,
5155 "firmware" : " examples/device/dfu_runtime/_build/stm32f746disco/dfu_runtime.elf"
5256 },
57+ {
58+ "name" : " hid_boot_interface" ,
59+ "firmware" : " examples/device/hid_boot_interface/_build/stm32f746disco/hid_boot_interface.elf"
60+ },
5361 {
5462 "name" : " board_test" ,
5563 "firmware" : " examples/device/board_test/_build/stm32f746disco/board_test.elf"
Original file line number Diff line number Diff line change @@ -54,8 +54,7 @@ def test_cdc_dual_ports(id):
5454 time .sleep (1 )
5555 timeout = timeout - 1
5656
57- assert os .path .exists (port1 ) and os .path .exists (port2 ), \
58- 'Device not available'
57+ assert timeout , 'Device not available'
5958
6059 # Echo test
6160 ser1 = serial .Serial (port1 )
@@ -89,8 +88,7 @@ def test_cdc_msc(id):
8988 time .sleep (1 )
9089 timeout = timeout - 1
9190
92- assert os .path .exists (port ) and os .path .isfile (file ), \
93- 'Device not available'
91+ assert timeout , 'Device not available'
9492
9593 # Echo test
9694 ser1 = serial .Serial (port )
@@ -170,6 +168,22 @@ def test_dfu_runtime(id):
170168
171169 print ('dfu_runtime test done' )
172170
171+ def test_hid_boot_interface (id ):
172+ kbd = f'/dev/input/by-id/usb-TinyUSB_TinyUSB_Device_{ id } -event-kbd'
173+ mouse1 = f'/dev/input/by-id/usb-TinyUSB_TinyUSB_Device_{ id } -if01-event-mouse'
174+ mouse2 = f'/dev/input/by-id/usb-TinyUSB_TinyUSB_Device_{ id } -if01-mouse'
175+ # Wait device enum
176+ timeout = 10
177+ while timeout :
178+ if os .path .exists (kbd ) and os .path .exists (mouse1 ) and os .path .exists (mouse2 ):
179+ break
180+ time .sleep (1 )
181+ timeout = timeout - 1
182+
183+ assert timeout , 'Device not available'
184+
185+ print ('hid_boot_interface test done' )
186+
173187def test_board_test (id ):
174188 # Dummy test
175189 pass
You can’t perform that action at this time.
0 commit comments