Skip to content

Commit 8ee9c9b

Browse files
SinKy-YanLzw655
authored andcommitted
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. Closes #223
1 parent 480b1bb commit 8ee9c9b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
* fix(examples): lvgl_port_v8 only poll touch screen if interrupt happened @hegdi (#209)
1414
* fix(examples): update lv_conf.h for Arduino IDE @davetheghost (#219)
15+
* fix(lcd): correct conditional compilation logic for ST7701 driver @SinKy-Yan (#223)
1516

1617
## v1.0.2 - 2025-04-23
1718

src/drivers/lcd/esp_panel_lcd_st7701.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ bool LCD_ST7701::init()
6161
// Process the device on initialization
6262
ESP_UTILS_CHECK_FALSE_RETURN(processDeviceOnInit(_bus_specifications), false, "Process device on init failed");
6363

64-
#if ESP_PANEL_DRIVERS_BUS_ENABLE_RGB
64+
#if ESP_PANEL_DRIVERS_BUS_ENABLE_RGB || ESP_PANEL_DRIVERS_BUS_ENABLE_MIPI_DSI
6565
// Create refresh panel
6666
ESP_UTILS_CHECK_ERROR_RETURN(
6767
esp_lcd_new_panel_st7701(
@@ -70,8 +70,8 @@ bool LCD_ST7701::init()
7070
);
7171
ESP_UTILS_LOGD("Create refresh panel(@%p)", refresh_panel);
7272
#else
73-
ESP_UTILS_CHECK_FALSE_RETURN(false, false, "MIPI-DSI is not supported");
74-
#endif // ESP_PANEL_DRIVERS_BUS_ENABLE_RGB
73+
ESP_UTILS_CHECK_FALSE_RETURN(false, false, "Neither RGB nor MIPI-DSI is supported");
74+
#endif // ESP_PANEL_DRIVERS_BUS_ENABLE_RGB || ESP_PANEL_DRIVERS_BUS_ENABLE_MIPI_DSI
7575

7676
/* Disable control panel if enable `auto_del_panel_io/enable_io_multiplex` flag */
7777
if (getConfig().getVendorFullConfig()->flags.auto_del_panel_io) {

0 commit comments

Comments
 (0)