You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
d73473b647d76516d15c7c483951afb5cfd1af81 (#9901) on Metro RP2350
Code/REPL
importboard, digitalio, time, usb, usb_hostpwr=digitalio.DigitalInOut(board.USB_HOST_5V_POWER)
port=usb_host.Port(board.USB_HOST_DATA_PLUS, board.USB_HOST_DATA_MINUS)
pwr.switch_to_output(True)
usb.core.find(find_all=True)
print("Here are the devices", list(usb.core.find(find_all=True)))
print("Sleeping 3s")
time.sleep(3)
print("Here are the devices", list(usb.core.find(find_all=True)))
print()
print("busy-waiting 3s")
t=time.monotonic_ns()
e=t+3_000_000_000while (now:=time.monotonic_ns()) <e:
devices=list(usb.core.find(find_all=True))
ifdevices:
print(f"busy-waiting found device after {(now-t)*1e-9}s")
breakpassprint("Here are the devices", list(usb.core.find(find_all=True)))
print()
Behavior
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Here are the devices []
Sleeping 3s
Here are the devices []
busy-waiting 3s
busy-waiting found device after 0.0511474s
Description
Something is failing to happen during time.sleep() that prevents an attached USB device from enumerating. When a busy-loop is used, my particular keyboard enumerates in about 1/20s. But even a long sleep of 3s doesn't work.
Additional information
No response
The text was updated successfully, but these errors were encountered:
CircuitPython version
Code/REPL
Behavior
Description
Something is failing to happen during
time.sleep()
that prevents an attached USB device from enumerating. When a busy-loop is used, my particular keyboard enumerates in about 1/20s. But even a long sleep of 3s doesn't work.Additional information
No response
The text was updated successfully, but these errors were encountered: