From 4676154dccc6d3ec31d132c8886db5ca860aaada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E4=BF=8A=E6=BA=90?= Date: Fri, 4 Jul 2025 10:16:48 +0800 Subject: [PATCH] fix(lcd): correct conditional compilation logic for ST7701 driver 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. --- src/drivers/lcd/esp_panel_lcd_st7701.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/drivers/lcd/esp_panel_lcd_st7701.cpp b/src/drivers/lcd/esp_panel_lcd_st7701.cpp index 0c07c499..c999b920 100644 --- a/src/drivers/lcd/esp_panel_lcd_st7701.cpp +++ b/src/drivers/lcd/esp_panel_lcd_st7701.cpp @@ -61,7 +61,7 @@ bool LCD_ST7701::init() // Process the device on initialization ESP_UTILS_CHECK_FALSE_RETURN(processDeviceOnInit(_bus_specifications), false, "Process device on init failed"); -#if ESP_PANEL_DRIVERS_BUS_ENABLE_RGB +#if ESP_PANEL_DRIVERS_BUS_ENABLE_RGB || ESP_PANEL_DRIVERS_BUS_ENABLE_MIPI_DSI // Create refresh panel ESP_UTILS_CHECK_ERROR_RETURN( esp_lcd_new_panel_st7701( @@ -70,8 +70,8 @@ bool LCD_ST7701::init() ); ESP_UTILS_LOGD("Create refresh panel(@%p)", refresh_panel); #else - ESP_UTILS_CHECK_FALSE_RETURN(false, false, "MIPI-DSI is not supported"); -#endif // ESP_PANEL_DRIVERS_BUS_ENABLE_RGB + ESP_UTILS_CHECK_FALSE_RETURN(false, false, "Neither RGB nor MIPI-DSI is supported"); +#endif // ESP_PANEL_DRIVERS_BUS_ENABLE_RGB || ESP_PANEL_DRIVERS_BUS_ENABLE_MIPI_DSI /* Disable control panel if enable `auto_del_panel_io/enable_io_multiplex` flag */ if (getConfig().getVendorFullConfig()->flags.auto_del_panel_io) {