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
displayio.I2CDisplay raises TypeError when called with TCA9548A I2C port #9172
Comments
@tannewt is it possible to use duck-typing here? |
Not in the short term. Generally native modules need native implementations because they call functions on the other native object directly. Displays are extra difficult currently because we assume they all can run without a VM. Python-implemented APIs won't work in this case. There is a future I can see where we do allow Python I2C busses but that requires us to use the Python function lookup instead of direct calls and it requires us to allow VM-only displays. |
Unfamiliar with the history and architecture here, can you explain how/why |
|
Are there any native modules which do use the Python function lookup in the way that would be required? And, are there |
There are only two currently: |
Why does it need to be able to do that? |
We automatically show errors on the display after the VM finishes. It shows the CircuitPython terminal. We have plans to make this behavior more explicit but it won't happen soon. |
Ah, great background, thanks |
CircuitPython version
Code/REPL
Behavior
Description
Looks like I2CDisplay is not tolerant of the I2C abstraction returned by the driver for the TCA9548A I2C multiplexer.
Additional information
Guessing this is due to type checking added in b799b2e
The text was updated successfully, but these errors were encountered: