Skip to content

Fix ST7701 conditional compilation logic for MIPI-DSI support #223

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SinKy-Yan
Copy link

🛠️ Summary

Fix conditional compilation logic in the ST7701 LCD driver that incorrectly rejected MIPI-DSI interface configurations.

Changes

  • Adjusted conditional check to include ESP_PANEL_DRIVERS_BUS_ENABLE_MIPI_DSI along with RGB support.
  • Updated error message to accurately reflect support for both RGB and MIPI-DSI interfaces.
  • Corrected #endif comment to match the revised conditional logic.

Problem

The init() method of the ST7701 driver previously only checked for ESP_PANEL_DRIVERS_BUS_ENABLE_RGB, which resulted in MIPI-DSI configurations being incorrectly rejected with the misleading error:

MIPI-DSI is not supported

Despite this, the underlying function esp_lcd_new_panel_st7701() and the driver implementation do in fact support both RGB and MIPI-DSI interfaces.

Solution

The fix ensures that when either ESP_PANEL_DRIVERS_BUS_ENABLE_RGB or ESP_PANEL_DRIVERS_BUS_ENABLE_MIPI_DSI is defined, the driver will initialize properly. This allows the ST7701 driver to work with MIPI-DSI interfaces, particularly on ESP32-P4 platforms.

Testing

  • Code compiles successfully
  • Runtime tested on ESP32-P4 with MIPI-DSI interface

fix(lcd): correct conditional compilation logic for ST7701 driver

  - Fix conditional check to include MIPI-DSI alongside RGB support
  - Update error message to accurately reflect supported interfaces
  - Resolve incorrect rejection of MIPI-DSI interface configuration

  The conditional compilation was missing MIPI-DSI check, causing the
  driver to incorrectly reject valid MIPI-DSI configurations despite
  the underlying implementation supporting both RGB and MIPI-DSI.
@Lzw655
Copy link
Collaborator

Lzw655 commented Jul 7, 2025

Hi @SinKy-Yan,

Sorry for the late. Thank you for pointing out this issue! I will cherry-pick your commit in another PR.

Lzw655 pushed a commit that referenced this pull request Jul 7, 2025
  - Fix conditional check to include MIPI-DSI alongside RGB support
  - Update error message to accurately reflect supported interfaces
  - Resolve incorrect rejection of MIPI-DSI interface configuration

  The conditional compilation was missing MIPI-DSI check, causing the
  driver to incorrectly reject valid MIPI-DSI configurations despite
  the underlying implementation supporting both RGB and MIPI-DSI.

Closes #223
Lzw655 pushed a commit that referenced this pull request Jul 7, 2025
  - Fix conditional check to include MIPI-DSI alongside RGB support
  - Update error message to accurately reflect supported interfaces
  - Resolve incorrect rejection of MIPI-DSI interface configuration

  The conditional compilation was missing MIPI-DSI check, causing the
  driver to incorrectly reject valid MIPI-DSI configurations despite
  the underlying implementation supporting both RGB and MIPI-DSI.

Closes #223
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.

2 participants