Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Nov 29, 2023

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.

@dhalbert dhalbert requested a review from a team November 29, 2023 19:57
Copy link
Contributor

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, motivation seems sensible.

@dhalbert dhalbert merged commit bfb75a1 into adafruit:main Nov 29, 2023
@dhalbert dhalbert deleted the ble-device-no-wait branch November 29, 2023 21:48
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Nov 30, 2023
Updating https://github.com/adafruit/Adafruit_CircuitPython_HID to 6.0.2 from 6.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_HID#122 from dhalbert/ble-device-no-wait

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BLE Keyboard Functionality Issue
2 participants