Skip to content
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

Add timeout parameter, add Feather RP2040 with USB Type A Host example #2

Merged
merged 10 commits into from
May 20, 2024

Conversation

todbot
Copy link
Contributor

@todbot todbot commented May 16, 2024

Adds a timeout property on the constructor that is used when doing usb.core.Device.read()s, so devices can be read in a non-blocking fashion. Also adds an example for use on the Feather RP2040 with USB Type A Host.

@tannewt
Copy link
Member

tannewt commented May 17, 2024

Looks like I hadn't done lint over the library. Would you mind doing it? pre-commit can help: https://learn.adafruit.com/improve-your-code-with-pylint

@todbot
Copy link
Contributor Author

todbot commented May 17, 2024

One of the remaining problems is Sphinx is failing with

autodoc: failed to import module 'adafruit_usb_host_midi'; the following exception was raised:
No module named 'usb'

I had to add import usb.core to get usb.core.USBTimeoutError. And Adafruit-Blinka doesn't have a fakey usb module I guess?

@todbot
Copy link
Contributor Author

todbot commented May 17, 2024

Hmm, okay well I added two dependencies to requirements.txt:

adafruit-circuitpython-usb-host-descriptors
pyusb

I assume requirements.txt is only used in CPython and not circup?

@tannewt
Copy link
Member

tannewt commented May 20, 2024

I assume requirements.txt is only used in CPython and not circup?

I'm not sure exactly how it'll interact with circup. I think this is right for CPython.

Thanks for fixing everything up!

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Thank you!

@tannewt tannewt merged commit 74fd7f9 into adafruit:main May 20, 2024
1 check passed
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.

2 participants