diff --git a/components/lcd/esp_lcd_gc9503/esp_lcd_gc9503.c b/components/lcd/esp_lcd_gc9503/esp_lcd_gc9503.c index 26a94d342..23c01a5fc 100644 --- a/components/lcd/esp_lcd_gc9503/esp_lcd_gc9503.c +++ b/components/lcd/esp_lcd_gc9503/esp_lcd_gc9503.c @@ -75,9 +75,10 @@ esp_err_t esp_lcd_new_panel_gc9503(const esp_lcd_panel_io_handle_t io, const esp ESP_GOTO_ON_ERROR(gpio_config(&io_conf), err, TAG, "configure GPIO for RST line failed"); } + gc9503->madctl_val = GC9503_CMD_MADCTL_DEFAULT; switch (panel_dev_config->rgb_ele_order) { case LCD_RGB_ELEMENT_ORDER_RGB: - gc9503->madctl_val = 0; + gc9503->madctl_val &= ~GC9503_CMD_BGR_BIT; break; case LCD_RGB_ELEMENT_ORDER_BGR: gc9503->madctl_val |= GC9503_CMD_BGR_BIT;