mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
examples/spi_lcd_touch: Fixed colors on ILI9341.
This commit is contained in:
parent
766dc3eead
commit
0ea1317983
@ -203,20 +203,17 @@ void app_main(void)
|
||||
// Attach the LCD to the SPI bus
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_spi((esp_lcd_spi_bus_handle_t)LCD_HOST, &io_config, &io_handle));
|
||||
|
||||
ESP_LOGI(TAG, "Install GC9A01 panel driver");
|
||||
esp_lcd_panel_handle_t panel_handle = NULL;
|
||||
esp_lcd_panel_dev_config_t panel_config = {
|
||||
.reset_gpio_num = EXAMPLE_PIN_NUM_LCD_RST,
|
||||
#if CONFIG_EXAMPLE_LCD_CONTROLLER_ILI9341
|
||||
.rgb_endian = LCD_RGB_ENDIAN_RGB,
|
||||
#elif CONFIG_EXAMPLE_LCD_CONTROLLER_GC9A01
|
||||
.rgb_endian = LCD_RGB_ENDIAN_BGR,
|
||||
#endif
|
||||
.bits_per_pixel = 16,
|
||||
};
|
||||
#if CONFIG_EXAMPLE_LCD_CONTROLLER_ILI9341
|
||||
ESP_LOGI(TAG, "Install ILI9341 panel driver");
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_ili9341(io_handle, &panel_config, &panel_handle));
|
||||
#elif CONFIG_EXAMPLE_LCD_CONTROLLER_GC9A01
|
||||
ESP_LOGI(TAG, "Install GC9A01 panel driver");
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_gc9a01(io_handle, &panel_config, &panel_handle));
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user