Skip to content

Add ST7123 integrated touch support to M5Stack Tab5#616

Merged
finger563 merged 13 commits into
mainfrom
copilot/fix-tab5-st7123-touch
Jun 25, 2026
Merged

Add ST7123 integrated touch support to M5Stack Tab5#616
finger563 merged 13 commits into
mainfrom
copilot/fix-tab5-st7123-touch

Conversation

Copilot AI commented May 23, 2026

Copy link
Copy Markdown
Contributor
  • Prior session: Created st7123touch component and added touch support to m5stack-tab5
  • Add C++23 TouchDriverConcept + type-erased ITouchDriver/TouchDriverAdapter/make_touch_driver to st7123touch.hpp
  • Replace two typed pointers in m5stack-tab5.hpp with one std::shared_ptr<espp::ITouchDriver>
  • Update touchpad.cpp to use concept-based single pointer (cleaner, no if/else branching)
  • Create st7123touch example (CMakeLists.txt, sdkconfig.defaults, Kconfig.projbuild, README.md, st7123touch_example.cpp)
  • Add example to build.yml (between st25dv and state_machine, target esp32s3)
  • Add example to Doxyfile EXAMPLE_PATH
  • Update doc/en/input/st7123touch.rst with toctree entry and concept description
  • Create doc/en/input/st7123touch_example.md

Validated on newer variant of m5stack tab5 and ensured that the touch works properly.

image

Logs:

I (1189) main_task: Calling app_main()
[M5Stack Tab5 Example/I][1.192]: Starting example!
[M5Stack Tab5 Example/I][1.199]: Running on M5Stack Tab5
[M5Stack Tab5 Example/I][1.203]: Probing internal I2C bus...
[M5Stack Tab5 Example/I][1.235]: Found devices at addresses: [0x10, 0x28, 0x32, 0x36, 0x40, 0x41, 0x43, 0x44, 0x55, 0x68]
[M5Stack Tab5 Example/I][1.236]: Initializing IO expanders...
[M5Stack Tab5 Example/I][1.257]: Initializing lcd...
[M5Stack Tab5 Example/I][1.604]: Initializing display...
[Display/W][1.604]: No rotation callback provided, resolution changed event will not automatically update the display hardware rotation.
[M5Stack Tab5 Example/I][1.612]: Initializing IMU...
E (2430) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
HINT: Please reboot the board and then try again
E (2430) vfs_fat_sdmmc: sdmmc_card_init failed (0x107).
HINT: Please verify if there is an SD card inserted into the SD slot. Then, try rebooting the board.
[M5StackTab5/W][2.431]: Failed to initialize the card (ESP_ERR_TIMEOUT). Make sure SD card is present and lines have pull-up resistors in place.
[M5Stack Tab5 Example/W][2.444]: Failed to initialize uSD card, there may not be a uSD card inserted!
[M5Stack Tab5 Example/I][2.454]: Initializing RTC...
[M5Stack Tab5 Example/I][2.588]: RTC time is already set to a valid value 2024-01-15 16:18:42
[M5Stack Tab5 Example/I][2.588]: Initializing battery management...
[M5Stack Tab5 Example/I][2.599]: Initializing sound...
I (2609) ES8388_DRIVER: init,out:02, in:00
I (2617) ES7210: ES7210 in Slave mode
I (2625) ES7210: Enable ES7210_INPUT_MIC1
I (2627) ES7210: Enable ES7210_INPUT_MIC2
I (2629) ES7210: Enable ES7210_INPUT_MIC3
I (2631) ES7210: Enable ES7210_INPUT_MIC4
I (2641) ES7210: The ES7210_CLOCK_OFF_REG01 value before stop is 0
I (2647) ES7210: Enable ES7210_INPUT_MIC1
I (2649) ES7210: Enable ES7210_INPUT_MIC2
I (2651) ES7210: Enable ES7210_INPUT_MIC3
I (2653) ES7210: Enable ES7210_INPUT_MIC4
[M5Stack Tab5 Example/I][2.656]: Initializing button...
[M5Stack Tab5 Example/I][2.657]: Setting up LVGL UI...
[M5Stack Tab5 Example/I][2.665]: Initializing touch...
[M5Stack Tab5 Example/I][2.741]: Starting LVGL task...
[M5Stack Tab5 Example/I][2.743]: Loaded 35875 bytes of audio
[M5Stack Tab5 Example/I][2.743]: Setting audio sample rate to 44100 Hz
[M5Stack Tab5 Example/I][2.752]: Starting data display task...

Copilot AI linked an issue May 23, 2026 that may be closed by this pull request
2 tasks
Agent-Logs-Url: https://github.com/esp-cpp/espp/sessions/3ad85902-651b-43d5-8f1d-d4c119604286

Co-authored-by: finger563 <213467+finger563@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix touch availability for m5stack tab5 ST7123 Add ST7123 integrated touch support to M5Stack Tab5 May 23, 2026
Copilot AI requested a review from finger563 May 23, 2026 03:50
@github-actions

github-actions Bot commented May 23, 2026

Copy link
Copy Markdown

✅Static analysis result - no issues found! ✅

…er interface

Agent-Logs-Url: https://github.com/esp-cpp/espp/sessions/7358df43-1e1a-4119-bdc3-37852bfec05e

Co-authored-by: finger563 <213467+finger563@users.noreply.github.com>
@finger563

Copy link
Copy Markdown
Contributor

@Shadowtrance LMK if you're able to test the code on this branch on your hardware :)

@finger563 finger563 marked this pull request as ready for review May 28, 2026 03:54
Copilot AI review requested due to automatic review settings May 28, 2026 03:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@finger563 finger563 merged commit f30631a into main Jun 25, 2026
118 checks passed
@finger563 finger563 deleted the copilot/fix-tab5-st7123-touch branch June 25, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

m5stack tab5 ST7123 touch

3 participants