From e2a99dc7caa88a88a903f1428e08b527d9b40767 Mon Sep 17 00:00:00 2001 From: Rene Zeldenthuis Date: Wed, 13 Dec 2023 19:38:42 +0100 Subject: [PATCH] Rename RGB interface TFT_RGB_CONFIG_COLOR_16_SWAP --- boards/ESP32-4827S043C.json | 6 +++--- boards/ESP32-4827S043N.json | 6 +++--- boards/ESP32-4827S043R.json | 6 +++--- boards/ESP32-8048S043C.json | 6 +++--- boards/ESP32-8048S043N.json | 6 +++--- boards/ESP32-8048S043R.json | 6 +++--- boards/ESP32-8048S050C.json | 6 +++--- boards/ESP32-8048S050N.json | 6 +++--- boards/ESP32-8048S050R.json | 6 +++--- boards/ESP32-8048S070C.json | 6 +++--- boards/ESP32-8048S070N.json | 6 +++--- include/esp32_smartdisplay.h | 8 ++++---- src/smartdisplay_rgb.c | 4 ++-- 13 files changed, 39 insertions(+), 39 deletions(-) diff --git a/boards/ESP32-4827S043C.json b/boards/ESP32-4827S043C.json index 135c2de..75ba86e 100644 --- a/boards/ESP32-4827S043C.json +++ b/boards/ESP32-4827S043C.json @@ -17,9 +17,9 @@ "-DTFT_WIDTH=480", "-DTFT_HEIGHT=272", "-DPIN_BCKL=2", - "-DUSES_LCD_RGB", - "-DTFT_RGB_GPIO=(LV_COLOR_16_SWAP!=0?{15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7}:{8,3,46,9,1,5,6,7,15,16,4,45,48,47,21,14})", - "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.flags={.fb_in_psram=1}}", + "-DUSES_PARALLEL_16", + "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={8,3,46,9,1,5,6,7,15,16,4,45,48,47,21,14},.flags={.fb_in_psram=1}}", + "-DTFT_RGB_CONFIG_COLOR_16_SWAP={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7},.flags={.fb_in_psram=1}}", "-DUSES_GT911", "-DGT911_I2C_HOST=0", "-DGT911_I2C_CONFIG={.mode=I2C_MODE_MASTER,.sda_io_num=19,.scl_io_num=20,.sda_pullup_en=GPIO_PULLUP_ENABLE,.scl_pullup_en=GPIO_PULLUP_ENABLE,.master={.clk_speed=400000}}", diff --git a/boards/ESP32-4827S043N.json b/boards/ESP32-4827S043N.json index 7e578bf..979433e 100644 --- a/boards/ESP32-4827S043N.json +++ b/boards/ESP32-4827S043N.json @@ -17,9 +17,9 @@ "-DTFT_WIDTH=480", "-DTFT_HEIGHT=272", "-DPIN_BCKL=2", - "-DUSES_LCD_RGB", - "-DTFT_RGB_GPIO=(LV_COLOR_16_SWAP!=0?{15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7}:{8,3,46,9,1,5,6,7,15,16,4,45,48,47,21,14})", - "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.flags={.fb_in_psram=1}}", + "-DUSES_PARALLEL_16", + "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={8,3,46,9,1,5,6,7,15,16,4,45,48,47,21,14},.flags={.fb_in_psram=1}}", + "-DTFT_RGB_CONFIG_COLOR_16_SWAP={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7},.flags={.fb_in_psram=1}}", "-DBUTTON_BOOT=0", "-DHAS_TF", "-DTF_CS=5", diff --git a/boards/ESP32-4827S043R.json b/boards/ESP32-4827S043R.json index 9245f2c..91cec87 100644 --- a/boards/ESP32-4827S043R.json +++ b/boards/ESP32-4827S043R.json @@ -17,9 +17,9 @@ "-DTFT_WIDTH=480", "-DTFT_HEIGHT=272", "-DPIN_BCKL=2", - "-DUSES_LCD_RGB", - "-DTFT_RGB_GPIO=(LV_COLOR_16_SWAP!=0?{15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7}:{8,3,46,9,1,5,6,7,15,16,4,45,48,47,21,14})", - "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.flags={.fb_in_psram=1}}", + "-DUSES_PARALLEL_16", + "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={8,3,46,9,1,5,6,7,15,16,4,45,48,47,21,14},.flags={.fb_in_psram=1}}", + "-DTFT_RGB_CONFIG_COLOR_16_SWAP={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7},.flags={.fb_in_psram=1}}", "-DUSES_XPT2046", "-DXPT2046_SPI_HOST=SPI2_HOST", "-DXPT2046_SPI_BUS_CONFIG={.mosi_io_num=11,.miso_io_num=13,.sclk_io_num=12,.quadwp_io_num=-1,.quadhd_io_num=-1}", diff --git a/boards/ESP32-8048S043C.json b/boards/ESP32-8048S043C.json index 5da0571..15a3bfc 100644 --- a/boards/ESP32-8048S043C.json +++ b/boards/ESP32-8048S043C.json @@ -17,9 +17,9 @@ "-DTFT_WIDTH=800", "-DTFT_HEIGHT=480", "-DPIN_BCKL=2", - "-DUSES_LCD_RGB", - "-DTFT_RGB_GPIO=(LV_COLOR_16_SWAP!=0?{15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7}:{8,3,46,9,1,5,6,7,15,16,4,45,48,47,21,14})", - "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=8,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=8,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.flags={.fb_in_psram=1}}", + "-DUSES_PARALLEL_16", + "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={8,3,46,9,1,5,6,7,15,16,4,45,48,47,21,14},.flags={.fb_in_psram=1}}", + "-DTFT_RGB_CONFIG_COLOR_16_SWAP={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7},.flags={.fb_in_psram=1}}", "-DUSES_GT911", "-DGT911_I2C_HOST=0", "-DGT911_I2C_CONFIG={.mode=I2C_MODE_MASTER,.sda_io_num=19,.scl_io_num=20,.sda_pullup_en=GPIO_PULLUP_ENABLE,.scl_pullup_en=GPIO_PULLUP_ENABLE,.master={.clk_speed=400000}}", diff --git a/boards/ESP32-8048S043N.json b/boards/ESP32-8048S043N.json index 540fa73..82bed5d 100644 --- a/boards/ESP32-8048S043N.json +++ b/boards/ESP32-8048S043N.json @@ -17,9 +17,9 @@ "-DTFT_WIDTH=800", "-DTFT_HEIGHT=480", "-DPIN_BCKL=2", - "-DUSES_LCD_RGB", - "-DTFT_RGB_GPIO=(LV_COLOR_16_SWAP!=0?{15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7}:{8,3,46,9,1,5,6,7,15,16,4,45,48,47,21,14})", - "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=8,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=8,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.flags={.fb_in_psram=1}}", + "-DUSES_PARALLEL_16", + "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={8,3,46,9,1,5,6,7,15,16,4,45,48,47,21,14},.flags={.fb_in_psram=1}}", + "-DTFT_RGB_CONFIG_COLOR_16_SWAP={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7},.flags={.fb_in_psram=1}}", "-DBUTTON_BOOT=0", "-DHAS_TF", "-DTF_CS=5", diff --git a/boards/ESP32-8048S043R.json b/boards/ESP32-8048S043R.json index 1318577..2e90927 100644 --- a/boards/ESP32-8048S043R.json +++ b/boards/ESP32-8048S043R.json @@ -17,9 +17,9 @@ "-DTFT_WIDTH=800", "-DTFT_HEIGHT=480", "-DPIN_BCKL=2", - "-DUSES_LCD_RGB", - "-DTFT_RGB_GPIO=(LV_COLOR_16_SWAP!=0?{15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7}:{8,3,46,9,1,5,6,7,15,16,4,45,48,47,21,14})", - "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=8,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=8,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.flags={.fb_in_psram=1}}", + "-DUSES_PARALLEL_16", + "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={8,3,46,9,1,5,6,7,15,16,4,45,48,47,21,14},.flags={.fb_in_psram=1}}", + "-DTFT_RGB_CONFIG_COLOR_16_SWAP={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7},.flags={.fb_in_psram=1}}", "-DUSES_XPT2046", "-DXPT2046_SPI_HOST=SPI2_HOST", "-DXPT2046_SPI_BUS_CONFIG={.mosi_io_num=11,.miso_io_num=13,.sclk_io_num=12,.quadwp_io_num=-1,.quadhd_io_num=-1}", diff --git a/boards/ESP32-8048S050C.json b/boards/ESP32-8048S050C.json index 43172d3..531450e 100644 --- a/boards/ESP32-8048S050C.json +++ b/boards/ESP32-8048S050C.json @@ -17,9 +17,9 @@ "-DTFT_WIDTH=800", "-DTFT_HEIGHT=480", "-DPIN_BCKL=2", - "-DUSES_LCD_RGB", - "-DTFT_RGB_GPIO=(LV_COLOR_16_SWAP!=0?{15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7}?{8,3,46,9,1,5,6,7,15,16,4,45,48,47,21,14})", - "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=8,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=8,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1,}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.flags={.fb_in_psram=1}}", + "-DUSES_PARALLEL_16", + "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={8,3,46,9,1,5,6,7,15,16,4,45,48,47,21,14},.flags={.fb_in_psram=1}}", + "-DTFT_RGB_CONFIG_COLOR_16_SWAP={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7},.flags={.fb_in_psram=1}}", "-DUSES_GT911", "-DGT911_I2C_HOST=0", "-DGT911_I2C_CONFIG={.mode=I2C_MODE_MASTER,.sda_io_num=19,.scl_io_num=20,.sda_pullup_en=GPIO_PULLUP_ENABLE,.scl_pullup_en=GPIO_PULLUP_ENABLE,.master={.clk_speed=400000}}", diff --git a/boards/ESP32-8048S050N.json b/boards/ESP32-8048S050N.json index ef3746d..c91f5ff 100644 --- a/boards/ESP32-8048S050N.json +++ b/boards/ESP32-8048S050N.json @@ -17,9 +17,9 @@ "-DTFT_WIDTH=800", "-DTFT_HEIGHT=480", "-DPIN_BCKL=2", - "-DUSES_LCD_RGB", - "-DTFT_RGB_GPIO=(LV_COLOR_16_SWAP!=0?{15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7}?{8,3,46,9,1,5,6,7,15,16,4,45,48,47,21,14})", - "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=8,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=8,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1,}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.flags={.fb_in_psram=1}}", + "-DUSES_PARALLEL_16", + "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={8,3,46,9,1,5,6,7,15,16,4,45,48,47,21,14},.flags={.fb_in_psram=1}}", + "-DTFT_RGB_CONFIG_COLOR_16_SWAP={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7},.flags={.fb_in_psram=1}}", "-DBUTTON_BOOT=0", "-DHAS_TF", "-DTF_CS=5", diff --git a/boards/ESP32-8048S050R.json b/boards/ESP32-8048S050R.json index 7f24c8b..ae7bc32 100644 --- a/boards/ESP32-8048S050R.json +++ b/boards/ESP32-8048S050R.json @@ -17,9 +17,9 @@ "-DTFT_WIDTH=800", "-DTFT_HEIGHT=480", "-DPIN_BCKL=2", - "-DUSES_LCD_RGB", - "-DTFT_RGB_GPIO=(LV_COLOR_16_SWAP!=0?{15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7}?{8,3,46,9,1,5,6,7,15,16,4,45,48,47,21,14})", - "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=8,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=8,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1,}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.flags={.fb_in_psram=1}}", + "-DUSES_PARALLEL_16", + "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={8,3,46,9,1,5,6,7,15,16,4,45,48,47,21,14},.flags={.fb_in_psram=1}}", + "-DTFT_RGB_CONFIG_COLOR_16_SWAP={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=4,.hsync_back_porch=43,.hsync_front_porch=8,.vsync_pulse_width=4,.vsync_back_porch=12,.vsync_front_porch=8,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=41,.de_gpio_num=40,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7},.flags={.fb_in_psram=1}}", "-DUSES_XPT2046", "-DXPT2046_SPI_HOST=SPI2_HOST", "-DXPT2046_SPI_BUS_CONFIG={.mosi_io_num=11,.miso_io_num=13,.sclk_io_num=12,.quadwp_io_num=-1,.quadhd_io_num=-1}", diff --git a/boards/ESP32-8048S070C.json b/boards/ESP32-8048S070C.json index d421a58..d984280 100644 --- a/boards/ESP32-8048S070C.json +++ b/boards/ESP32-8048S070C.json @@ -17,9 +17,9 @@ "-DTFT_WIDTH=800", "-DTFT_HEIGHT=480", "-DPIN_BCKL=2", - "-DUSES_LCD_RGB", - "-DTFT_RGB_GPIO=(LV_COLOR_16_SWAP!=0?{15,7,6,5,4,9,46,3,8,16,1,14,21,47,48,45}:{8,16,1,14,21,47,48,45,15,7,6,5,4,9,46,3})", - "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=30,.hsync_back_porch=16,.hsync_front_porch=210,.vsync_pulse_width=13,.vsync_back_porch=10,.vsync_front_porch=22,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1,}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=40,.de_gpio_num=41,.pclk_gpio_num=42,.disp_gpio_num=-1,.flags={.fb_in_psram=1}}", + "-DUSES_PARALLEL_16", + "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=30,.hsync_back_porch=16,.hsync_front_porch=210,.vsync_pulse_width=13,.vsync_back_porch=10,.vsync_front_porch=22,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1,}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=40,.de_gpio_num=41,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={8,16,1,14,21,47,48,45,15,7,6,5,4,9,46,3},.flags={.fb_in_psram=1}}", + "-DTFT_RGB_CONFIG_COLOR_16_SWAP={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=30,.hsync_back_porch=16,.hsync_front_porch=210,.vsync_pulse_width=13,.vsync_back_porch=10,.vsync_front_porch=22,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1,}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=40,.de_gpio_num=41,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={15,7,6,5,4,9,46,3,8,16,1,14,21,47,48,45},.flags={.fb_in_psram=1}}", "-DUSES_XPT2046", "-DXPT2046_SPI_HOST=SPI2_HOST", "-DXPT2046_SPI_BUS_CONFIG={.mosi_io_num=11,.miso_io_num=13,.sclk_io_num=12,.quadwp_io_num=-1,.quadhd_io_num=-1}", diff --git a/boards/ESP32-8048S070N.json b/boards/ESP32-8048S070N.json index 250e6e0..4764baa 100644 --- a/boards/ESP32-8048S070N.json +++ b/boards/ESP32-8048S070N.json @@ -17,9 +17,9 @@ "-DTFT_WIDTH=800", "-DTFT_HEIGHT=480", "-DPIN_BCKL=2", - "-DUSES_LCD_RGB", - "-DTFT_RGB_GPIO=(LV_COLOR_16_SWAP!=0?{15,7,6,5,4,9,46,3,8,16,1,14,21,47,48,45}:{8,16,1,14,21,47,48,45,15,7,6,5,4,9,46,3})", - "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=30,.hsync_back_porch=16,.hsync_front_porch=210,.vsync_pulse_width=13,.vsync_back_porch=10,.vsync_front_porch=22,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1,}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=40,.de_gpio_num=41,.pclk_gpio_num=42,.disp_gpio_num=-1,.flags={.fb_in_psram=1}}", + "-DUSES_PARALLEL_16", + "-DTFT_RGB_CONFIG={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=30,.hsync_back_porch=16,.hsync_front_porch=210,.vsync_pulse_width=13,.vsync_back_porch=10,.vsync_front_porch=22,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1,}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=40,.de_gpio_num=41,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={8,16,1,14,21,47,48,45,15,7,6,5,4,9,46,3},.flags={.fb_in_psram=1}}", + "-DTFT_RGB_CONFIG_COLOR_16_SWAP={.clk_src=LCD_CLK_SRC_PLL160M,.timings={.pclk_hz=16000000,.h_res=TFT_WIDTH,.v_res=TFT_HEIGHT,.hsync_pulse_width=30,.hsync_back_porch=16,.hsync_front_porch=210,.vsync_pulse_width=13,.vsync_back_porch=10,.vsync_front_porch=22,.flags={.hsync_idle_low=1,.vsync_idle_low=1,.pclk_active_neg=1,}},.data_width=16,.psram_trans_align=64,.hsync_gpio_num=39,.vsync_gpio_num=40,.de_gpio_num=41,.pclk_gpio_num=42,.disp_gpio_num=-1,.data_gpio_nums={15,7,6,5,4,9,46,3,8,16,1,14,21,47,48,45},.flags={.fb_in_psram=1}}", "-DBUTTON_BOOT=0", "-DHAS_TF", "-DTF_CS=5", diff --git a/include/esp32_smartdisplay.h b/include/esp32_smartdisplay.h index 06c52a4..74ea152 100644 --- a/include/esp32_smartdisplay.h +++ b/include/esp32_smartdisplay.h @@ -287,7 +287,7 @@ // Backlight #define PIN_BCKL 2 // LCD ILI6485 480x272 -#define USES_LCD_RGB +#define USES_PARALLEL_16 #if LV_COLOR_16_SWAP != 0 #define TFT_RGB_GPIO {15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7} #else @@ -326,7 +326,7 @@ // Backlight #define PIN_BCKL 2 // LCD 800x480 -#define USES_LCD_RGB +#define USES_PARALLEL_16 #if LV_COLOR_16_SWAP != 0 #define TFT_RGB_GPIO {15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7} #else @@ -366,7 +366,7 @@ // Backlight #define PIN_BCKL 2 // LCD 800x480 -#define USES_LCD_RGB +#define USES_PARALLEL_16 #if LV_COLOR_16_SWAP != 0 #define TFT_RGB_GPIO {15,16,4,45,48,47,21,14,8,3,46,9,1,5,6,7} #else @@ -405,7 +405,7 @@ // Backlight #define PIN_BCKL 2 // LCD 800x480 -#define USES_LCD_RGB +#define USES_PARALLEL_16 #if LV_COLOR_16_SWAP != 0 #define TFT_RGB_GPIO {15,7,6,5,4,9,46,3,8,16,1,14,21,47,48,45} #else diff --git a/src/smartdisplay_rgb.c b/src/smartdisplay_rgb.c index 0378786..b11c26b 100644 --- a/src/smartdisplay_rgb.c +++ b/src/smartdisplay_rgb.c @@ -1,6 +1,6 @@ #include -#ifdef USES_LCD_RGB +#ifdef USES_PARALLEL_16 #include #include @@ -27,7 +27,7 @@ void lvgl_tft_init(lv_disp_drv_t *drv) // Create direct_io panel handle esp_lcd_rgb_panel_config_t tft_panel_config = TFT_RGB_CONFIG; - tft_panel_config.data_gpio_nums = TFT_RGB_GPIO; + tft_panel_config.data_gpio_nums = LV_COLOR_16_SWAP != 0 ? TFT_RGB_CONFIG_COLOR_16_SWAP : TFT_RGB_CONFIG; tft_panel_config.on_frame_trans_done = direct_io_frame_trans_done; tft_panel_config.user_ctx = drv;