Add support for Yoto Mini and Yoto Player V3#10783
Conversation
There were a bunch of changes to enable the boards:
* Add web workflow for sdioio cards. Adds the "native" access.
* Introduce `i2cioexpander` for native I2C expander support.
* Introduce DigitalInOut protocol so that IOPins can be used
where DigitalInOut would be traditionally.
* Add mp_errno_t for clarifying what APIs return errno.
* DigitalInOut protocol uses it to pass through I2C issues.
* Switch `bitbangio` and `fourwire` to DigitalInOutProtocol.
* Support the Mini's GC9306 display with CS and DC over IOPin.
* DigitalInOutProtocol can fall back to Python-level access if
not natively supported.
* Make board.I2C() speed configurable to speed up IOExpander access.
* Update codespell to work with Python 3.14.
* Make static web workflow responses cachable by the browser for 1 day.
dhalbert
left a comment
There was a problem hiding this comment.
I suggested some minor file changes.
I thought about Union[microcontroller.Pin, digitalio.DigitalInOutProtocol] a bit, but didn't come to any conclusions. In the long run we might remove passing a Pin, perhaps. A long time ago I proposed a Pin.Configuration type in #9845, and that is a bit related to this kind of change
I tried some smoke tests on boards with fourwire displays, since there were significant changes there. Some worked; most did not. So there's some debugging to do on the display changes.
- PyPortal Titano - worked
- Monster M4MSK - didn't work, no CIRCUITPY, no REPL. Did work with 10.1.0-beta.1
- FunHouse - didn't work, no CIRCUITPY, no REPL. Did work with 10.1.0-beta.1.
- Feather TFT ESP32-S2 - didn't work, no CIRCUITPY, no REPL. Did work with 10.0.3.
- Pybadge - didn't work, no CIRCUITPY, no REPL. Did work with 10.0.3.
|
I've fixed FunHouse and I suspect montermask had the same issue. PyBadge was broken for the same reason but needed an additional fix due to #10699 which removed the pin reset for the port reset. That's ok for after the vm runs but it is needed in port_init to get things into a good initial state. Feather S2 TFT may have the same issue but I'm out of time to test today and wanted to get these fixes out. |
dhalbert
left a comment
There was a problem hiding this comment.
On MONSTERM4MSK, the display shows the REPL, but I am getting a safe mode Hard fault: memory access or instruction error., and when running a sample program, I get this error (works in previous versions):
Traceback (most recent call last):
File "code.py", line 54, in <module>
File "adafruit_monsterm4sk.py", line 129, in __init__
ValueError: RIGHT_TFT_SCK in use
Other boards are working and code changes look fine.
|
I get the right_spi = busio.SPI(board.RIGHT_TFT_SCK, MOSI=board.RIGHT_TFT_MOSI)previous interesting lines: # Left screen spi bus
left_spi = busio.SPI(board.LEFT_TFT_SCK, MOSI=board.LEFT_TFT_MOSI)
left_tft_cs = board.LEFT_TFT_CS
left_tft_dc = board.LEFT_TFT_DC
left_display_bus = fourwire.FourWire(
left_spi,
command=left_tft_dc,
chip_select=left_tft_cs, # Reset on Seesaw
)
self.left_display = ST7789(left_display_bus, width=240, height=240, rowstart=80)
# right backlight on board
self.right_backlight = pwmio.PWMOut(board.RIGHT_TFT_LITE, frequency=5000, duty_cycle=0)
# full brightness
self.right_backlight.duty_cycle = 65535
# right display spi bus
right_spi = busio.SPI(board.RIGHT_TFT_SCK, MOSI=board.RIGHT_TFT_MOSI) |
|
I get the safe mode happening on main as well. It doesn't on 10.0.x. |
|
Monster mask and other two display boards are crashing. We have existing issues for it here: #7472 I'd like to get this in as-is. I think we need to do a proper multi-display fix instead. |
dhalbert
left a comment
There was a problem hiding this comment.
thanks for all this work!
|
#10794, the |
There were a bunch of changes to enable the boards:
i2cioexpanderfor native I2C expander support.bitbangioandfourwireto DigitalInOutProtocol.