fix: Allow callers to request access to the underlying display controller, and add back write_lcd_lines APIs to the components by finger563 · Pull Request #631 · esp-cpp/espp · GitHub
Skip to content

fix: Allow callers to request access to the underlying display controller, and add back write_lcd_lines APIs to the components#631

Merged
finger563 merged 4 commits into
mainfrom
fix/bsp-display-apis
Jun 6, 2026
Merged

fix: Allow callers to request access to the underlying display controller, and add back write_lcd_lines APIs to the components#631
finger563 merged 4 commits into
mainfrom
fix/bsp-display-apis

Conversation

@finger563

@finger563 finger563 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Description

  • Allow all BSP components which have a display to return a shared pointer to the display controller for application code to directly access it
  • Add a method to all BSP components which have a display write_lcd_lines to update just a portion of the display, rather than a full frame.

Motivation and Context

These APIs are useful, and are currently used in the esp-cpp/camera-display example to efficiently update the screen with decoded image data from an RTSP stream without needing to have larger / additional buffers.

How has this been tested?

Build and run the esp-box example.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

…ller, and add back write_lcd_lines APIs to the components
Copilot AI review requested due to automatic review settings June 5, 2026 16:23
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

Comment thread components/matouch-rotary-display/src/matouch-rotary-display.cpp Fixed
Comment thread components/wrover-kit/src/wrover-kit.cpp Fixed

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.

Pull request overview

This PR updates multiple display-capable BSP components to expose access to the underlying display controller object and reintroduces a legacy write_lcd_lines(...) API for scanline/region-oriented LCD writes.

Changes:

  • Switch BSP-held display controller ownership from std::unique_ptr to std::shared_ptr so callers can obtain a handle via a new display_driver() accessor.
  • Add/restore write_lcd_lines(...) helper APIs across several BSPs for partial-region LCD writes.
  • Add minor supporting includes/aliases where needed to support the new APIs.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
components/ws-s3-touch/src/video.cpp Switch display driver to shared_ptr; add write_lcd_lines(...) implementation.
components/ws-s3-touch/include/ws-s3-touch.hpp Add display_driver() accessor; add write_lcd_lines(...) declaration; switch member to shared_ptr.
components/ws-s3-lcd-1-47/src/ws-s3-lcd-1-47.cpp Switch display driver to shared_ptr; add write_lcd_lines(...) implementation; include <array>.
components/ws-s3-lcd-1-47/include/ws-s3-lcd-1-47.hpp Add DisplayDriver alias; add display_driver() accessor; add write_lcd_lines(...) declaration; switch member to shared_ptr.
components/ws-s3-geek/src/ws-s3-geek.cpp Switch display driver to shared_ptr; add write_lcd_lines(...) implementation; include <array>.
components/ws-s3-geek/include/ws-s3-geek.hpp Add DisplayDriver alias; add display_driver() accessor; add write_lcd_lines(...) declaration; switch member to shared_ptr.
components/wrover-kit/src/wrover-kit.cpp Switch display driver to shared_ptr; add write_lcd_lines(...) implementation; include <array>.
components/wrover-kit/include/wrover-kit.hpp Add DisplayDriver alias; add display_driver() accessor; add write_lcd_lines(...) declaration; switch member to shared_ptr.
components/t-dongle-s3/src/t-dongle-s3.cpp Switch display driver to shared_ptr; add write_lcd_lines(...) implementation.
components/t-dongle-s3/include/t-dongle-s3.hpp Add DisplayDriver alias; add display_driver() accessor; add write_lcd_lines(...) declaration; switch member to shared_ptr.
components/t-deck/src/t-deck.cpp Switch display driver to shared_ptr.
components/t-deck/include/t-deck.hpp Add display_driver() accessor; switch member to shared_ptr.
components/smartpanlee-sc01-plus/src/smartpanlee-sc01-plus.cpp Switch display driver to shared_ptr.
components/smartpanlee-sc01-plus/include/smartpanlee-sc01-plus.hpp Add display_driver() accessor; expose write_lcd_lines(...) publicly; switch member to shared_ptr.
components/seeed-studio-round-display/src/seeed-studio-round-display.cpp Switch display driver to shared_ptr; add write_lcd_lines(...) implementation; include <array>.
components/seeed-studio-round-display/include/seeed-studio-round-display.hpp Add display_driver() accessor; add write_lcd_lines(...) declaration; switch member to shared_ptr.
components/matouch-rotary-display/src/matouch-rotary-display.cpp Switch display driver to shared_ptr; add write_lcd_lines(...) implementation; include <array>.
components/matouch-rotary-display/include/matouch-rotary-display.hpp Add display_driver() accessor; add write_lcd_lines(...) declaration; switch member to shared_ptr.
components/m5stack-tab5/src/video.cpp Switch concrete controller allocation to shared_ptr; add a write_lcd_lines(...) implementation.
components/m5stack-tab5/include/m5stack-tab5.hpp Add DisplayDriver alias; add display_driver() accessor; add write_lcd_lines(...) declaration; switch member to shared_ptr.
components/esp-box/src/video.cpp Switch display driver to shared_ptr; add write_lcd_lines(...) implementation.
components/esp-box/include/esp-box.hpp Add display_driver() accessor; add write_lcd_lines(...) declaration; switch member to shared_ptr.
components/byte90/src/display.cpp Switch display driver to shared_ptr; add write_lcd_lines(...) implementation; include <array>.
components/byte90/include/byte90.hpp Add display_driver() accessor; add write_lcd_lines(...) declaration; switch member to shared_ptr.

Comment thread components/ws-s3-touch/src/video.cpp
Comment thread components/esp-box/src/video.cpp
Comment thread components/ws-s3-lcd-1-47/src/ws-s3-lcd-1-47.cpp
Comment thread components/ws-s3-geek/src/ws-s3-geek.cpp
Comment thread components/wrover-kit/src/wrover-kit.cpp
Comment thread components/matouch-rotary-display/src/matouch-rotary-display.cpp
Comment thread components/byte90/src/display.cpp
Comment thread components/t-dongle-s3/src/t-dongle-s3.cpp
Comment thread components/smartpanlee-sc01-plus/include/smartpanlee-sc01-plus.hpp
@finger563 finger563 self-assigned this Jun 5, 2026

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.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 12 comments.

Comment thread components/ws-s3-touch/include/ws-s3-touch.hpp
Comment thread components/ws-s3-lcd-1-47/include/ws-s3-lcd-1-47.hpp
Comment thread components/ws-s3-geek/include/ws-s3-geek.hpp
Comment thread components/wrover-kit/include/wrover-kit.hpp
Comment thread components/t-dongle-s3/include/t-dongle-s3.hpp
Comment thread components/m5stack-tab5/include/m5stack-tab5.hpp
Comment thread components/smartpanlee-sc01-plus/include/smartpanlee-sc01-plus.hpp
Comment thread components/m5stack-tab5/src/video.cpp Outdated

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.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.

Comment thread components/ws-s3-touch/src/video.cpp
Comment thread components/esp-box/src/video.cpp
@finger563 finger563 merged commit 195dac5 into main Jun 6, 2026
104 of 108 checks passed
@finger563 finger563 deleted the fix/bsp-display-apis branch June 6, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants