From 77029676d1fea63259a15a7cc49a50c8f895d97d Mon Sep 17 00:00:00 2001 From: Hello1024 Date: Sun, 4 Feb 2024 01:16:57 +0000 Subject: [PATCH] fix(rgb_lcd): remove validation of pins for LCD output There are a bunch of cases you might want some pins not exposed. Eg. * Reading say 8 bit data and outputting the top 5 bits, discarding the rest by not mapping those data pins to output pins * Not using hsync/vsync because sync data is embedded within the data bits for more timing flexibility (eg. interlacing). * Using the LCD module as a high speed parallel data output bus, with no need for sync/control pins. Removing this validation makes these cases work. Merges https://github.com/espressif/esp-idf/pull/13103 --- components/esp_lcd/rgb/esp_lcd_panel_rgb.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/components/esp_lcd/rgb/esp_lcd_panel_rgb.c b/components/esp_lcd/rgb/esp_lcd_panel_rgb.c index cadaedd4cc..40110ca4a0 100644 --- a/components/esp_lcd/rgb/esp_lcd_panel_rgb.c +++ b/components/esp_lcd/rgb/esp_lcd_panel_rgb.c @@ -832,15 +832,6 @@ static esp_err_t rgb_panel_disp_on_off(esp_lcd_panel_t *panel, bool on_off) static esp_err_t lcd_rgb_panel_configure_gpio(esp_rgb_panel_t *panel, const esp_lcd_rgb_panel_config_t *panel_config) { int panel_id = panel->panel_id; - // check validation of GPIO number - bool valid_gpio = true; - if (panel_config->de_gpio_num < 0) { - // Hsync and Vsync are required in HV mode - valid_gpio = valid_gpio && (panel_config->hsync_gpio_num >= 0) && (panel_config->vsync_gpio_num >= 0); - } - if (!valid_gpio) { - return ESP_ERR_INVALID_ARG; - } // Set the number of output data lines lcd_ll_set_data_wire_width(panel->hal.dev, panel_config->data_width); // connect peripheral signals via GPIO matrix