adafruit / Adafruit_CircuitPython_HID

USB Human Interface Device drivers.
MIT License
377 stars 105 forks source link

Do not wait for USB for non-USB HID devices #122

Closed dhalbert closed 12 months ago

dhalbert commented 12 months ago

Fixes #121.

find_device() was waiting for USB to be connected even if the device was not a USB device. Wait only if a USB device was found.

In the long run, maybe the dependency on USB should be decoupled from find_device(). In that case, there should be some other way, maybe explicit or implicit, of waiting for the HID transport channel to be ready.

Also there could be an addition to circuitpython_typing for duck-typing an HID device.

I tested this on a CLUE.