Skip to content

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants