From f99599362f7553039434244632df88c7da9b33c5 Mon Sep 17 00:00:00 2001 From: Rene Date: Mon, 19 Feb 2024 23:57:14 +0100 Subject: [PATCH] Develop into 2.0.6 (#133) * Prepared new version 2.0.4 * Updated boards * Updated platformio.ini * Added extern for touch_calibration_data * New build system for CI * Updated PCLK_HZ * UPdated variables for ST7789 * Update Variables GC9A01 * Updated ILI9341 * LVGL to ^8.3.9 * Typos * DST7262 variables * Typos and ST7701 variables * ST7701_LINE_CONFIG * ST7796 variables * SPI_DMA_CHANNEL * CST816S variables * GT911 variables * XPT2046 variables * Typo * esp_lcd_panel_io_3wire_spi_config_t * Updated boards * Updated boards * BOARD_HAS_ * Update board * rename with interfaces * Added Interface type to boards for LCD/TOUCH * All boards * wip ESP32-24232s022 * Updated 2432S022C * Updated boards Added warning for st7789_i80 * Added 8048S070R * Updated boards * Do not invert colors * Added IPS Setting * rename, include strength * Removed v11 version * Added logging * logging * Removed touch_config flags * Removed not required backlight set * Added strength * GT911, fix for non matching touch resolutions * UPdated boards * Updated boards * GT911 vendorId * updated boards * Update board * Boards to main * Updated boards * UPdate boards * %d->%f * Added logging for vendor config initialization * Two decimals * Updated boards * Data bits are upper D8-D15 * Updated boards * Updated boards * Added PlatformIo badge * Use LVGL pixel buffer size and malloc flags for json (#124) * Updated boards * Added spi_bus_config_t flags, intr flags and max_size * Small changes esp3228S022 * Update version to 2.0.5 * Minor changes to st7789_i80 * BCKL to GPIO_BCKL * Typo miso_io_num * Changed location of tuning off the display when initializing * Updated boards * Updated boards --- src/esp32_smartdisplay.c | 10 +++++----- src/lvgl_gc9a01_spi.c | 2 +- src/lvgl_st7789_i80.c | 8 +++++--- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/esp32_smartdisplay.c b/src/esp32_smartdisplay.c index cdc3e59..506c3bd 100644 --- a/src/esp32_smartdisplay.c +++ b/src/esp32_smartdisplay.c @@ -112,7 +112,7 @@ void smartdisplay_lcd_set_backlight(float duty) if (duty < 0.0) duty = 0.0f; #if ESP_ARDUINO_VERSION_MAJOR >= 3 - ledcWrite(BCKL, duty * PWM_MAX_BCKL); + ledcWrite(GPIO_BCKL, duty * PWM_MAX_BCKL); #else ledcWrite(PWM_CHANNEL_BCKL, duty * PWM_MAX_BCKL); #endif @@ -235,14 +235,14 @@ void smartdisplay_init() lv_init(); // Setup backlight - pinMode(BCKL, OUTPUT); + pinMode(GPIO_BCKL, OUTPUT); + digitalWrite(GPIO_BCKL, LOW); #if ESP_ARDUINO_VERSION_MAJOR >= 3 - ledcAttach(BCKL, PWM_FREQ_BCKL, PWM_BITS_BCKL); + ledcAttach(GPIO_BCKL, PWM_FREQ_BCKL, PWM_BITS_BCKL); #else ledcSetup(PWM_CHANNEL_BCKL, PWM_FREQ_BCKL, PWM_BITS_BCKL); - ledcAttachPin(BCKL, PWM_CHANNEL_BCKL); + ledcAttachPin(GPIO_BCKL, PWM_CHANNEL_BCKL); #endif - digitalWrite(BCKL, LOW); // Setup TFT display lv_disp_drv_init(&disp_drv); disp_drv.hor_res = LCD_WIDTH; diff --git a/src/lvgl_gc9a01_spi.c b/src/lvgl_gc9a01_spi.c index 1dc7823..6fb21ea 100644 --- a/src/lvgl_gc9a01_spi.c +++ b/src/lvgl_gc9a01_spi.c @@ -38,7 +38,7 @@ void lvgl_lcd_init(lv_disp_drv_t *drv) // Create SPI bus const spi_bus_config_t spi_bus_config = { .mosi_io_num = GC9A01_SPI_BUS_MOSI_IO_NUM, - .mosi_io_num = GC9A01_SPI_BUS_MISO_IO_NUM, + .miso_io_num = GC9A01_SPI_BUS_MISO_IO_NUM, .sclk_io_num = GC9A01_SPI_BUS_SCLK_IO_NUM, .quadwp_io_num = GC9A01_SPI_BUS_QUADWP_IO_NUM, .quadhd_io_num = GC9A01_SPI_BUS_QUADHD_IO_NUM, diff --git a/src/lvgl_st7789_i80.c b/src/lvgl_st7789_i80.c index 77f50ea..b6b052c 100644 --- a/src/lvgl_st7789_i80.c +++ b/src/lvgl_st7789_i80.c @@ -1,7 +1,5 @@ #ifdef LCD_ST7789_I80 -#warning Still under development. Will most probably NOT function! - #include #include #include @@ -96,8 +94,12 @@ void lvgl_lcd_init(lv_disp_drv_t *drv) ESP_ERROR_CHECK(esp_lcd_panel_reset(panel_handle)); ESP_ERROR_CHECK(esp_lcd_panel_init(panel_handle)); - // IPS + +#ifdef LCD_IPS + // If LCD is IPS invert the colors ESP_ERROR_CHECK(esp_lcd_panel_invert_color(panel_handle, true)); +#endif + drv->user_data = panel_handle; drv->flush_cb = st7789_lv_flush; }