File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed
Metro/Metro_RP2350_Memory/memory_game Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -299,20 +299,18 @@ def update_score_text():
299299 print (f"{ device .idVendor :04x} :{ device .idProduct :04x} " )
300300 print (device .manufacturer , device .product )
301301 print (device .serial_number )
302-
303- config_descriptor = adafruit_usb_host_descriptors .get_configuration_descriptor (
304- device , 0
305- )
306-
307- _possible_interface_index , _possible_endpoint_address = (
302+ mouse_interface_index , mouse_endpoint_address = (
308303 adafruit_usb_host_descriptors .find_boot_mouse_endpoint (device ))
309304
310- if _possible_interface_index is not None and _possible_endpoint_address is not None :
305+ if mouse_interface_index is not None and mouse_endpoint_address is not None :
311306 mouse = device
312- mouse_interface_index = _possible_interface_index
313- mouse_endpoint_address = _possible_endpoint_address
314- print (f"mouse interface: { mouse_interface_index } " , end = "" )
315- print (f"endpoint_address: { hex (mouse_endpoint_address )} " )
307+ print (
308+ f"mouse interface: { mouse_interface_index } "
309+ + f"endpoint_address: { hex (mouse_endpoint_address )} "
310+ )
311+
312+ break
313+
316314
317315mouse_was_attached = None
318316if mouse is not None :
@@ -326,7 +324,6 @@ def update_score_text():
326324 # set configuration on the mouse so we can use it
327325 mouse .set_configuration ()
328326
329-
330327def atexit_callback ():
331328 """
332329 re-attach USB devices to kernel if needed.
You can’t perform that action at this time.
0 commit comments