Add support for M5Stack CoreMatrix (ESP32-C61) - #242
Merged
Conversation
I2C driver for the Titan Micro TM1680 in 24ROW x 16COM mode, used as a 16x16 monochrome LED matrix. - The frame buffer keeps the Panel_1bitOLED page layout and is converted to the TM1680 RAM layout (row bits A3-A0 in the upper nibble half) when pushed by display(). - The whole frame is only 32 bytes, so display() always sends it in full as a single transaction. - The controller does not respond to I2C reads, so init() skips the read probe used by other 1bit panels. - There is no display-invert command; inversion is applied while packing the buffer. - Brightness maps to the global 16-step PWM duty.
Autodetect probes the M5PM1 and M5IOE1 over software I2C first, then powers the LED matrix rail through M5IOE1 PIN4 before checking for the TM1680: the controller sits on that rail and does not respond on I2C until powered. The TM1680 has no ID register, so presence is confirmed by an address ACK only. The default rotation is 1 with offset_rotation 3, which shows upright with the ABC buttons at the top (verified on hardware).
There was a problem hiding this comment.
Pull request overview
Adds first-class support for the upcoming M5Stack CoreMatrix (ESP32-C61 + TM1680 16×16 LED matrix) by introducing a dedicated TM1680 panel driver and wiring it into ESP-IDF target autodetection and board naming.
Changes:
- Added
Panel_TM1680(I2C, 24ROW×16COM) with framebuffer-to-TM1680 RAM packing ondisplay(). - Implemented ESP32-C61
board_M5CoreMatrixautodetect flow, including powering the LED matrix rail via M5IOE1 before probing TM1680 by address ACK. - Registered
board_M5CoreMatrixin the board title mapping.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/M5GFX.cpp | Adds ESP32-C61-specific autodetect + TM1680 bus/panel setup and board title string. |
| src/lgfx/v1/panel/Panel_TM1680.hpp | Declares the new TM1680 panel driver interface and init command list. |
| src/lgfx/v1/panel/Panel_TM1680.cpp | Implements TM1680 initialization, sleep/brightness control, and buffer packing + push. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for the upcoming M5Stack CoreMatrix (ESP32-C61 + TM1680 16x16 LED matrix).
Panel_TM1680driver (I2C, 24ROW x 16COM mode): the frame buffer keeps thePanel_1bitOLEDpage layout and is converted to the TM1680 RAM layout when pushed bydisplay(). The controller does not respond to I2C reads and has no display-invert command, so the driver probes by address ACK only and applies inversion while packing. Brightness maps to the global 16-step PWM duty.board_M5CoreMatrix: probes the M5PM1 and M5IOE1 over software I2C first, then powers the LED matrix rail through M5IOE1 PIN4 before checking for the TM1680 (the controller sits on that rail and does not respond until powered).offset_rotation3, which shows upright with the ABC buttons at the top.Verified on hardware: autodetect, drawing, 16-step brightness, and
setRotation0-7 including the mirrored modes.A companion M5Unified PR follows.