8 bit parallel fix for ESP-IDF (#2430)

* Add missing define

* Simplify menu. Add ESP32-S3 pin ranges
This commit is contained in:
Dracir
2023-02-21 01:15:09 +01:00
committed by GitHub
parent 34850973a0
commit e75407e60d
2 changed files with 20 additions and 7 deletions

23
Kconfig
View File

@@ -150,12 +150,16 @@ menu "TFT_eSPI"
endchoice endchoice
config TFT_PARALLEL_8_BIT choice TFT_INTERFACE
bool "Enable 8-bit parallel mode (otherwise SPI is assumed)" prompt "LCD Interface"
default "n" default TFT_SPI
depends on IDF_TARGET_ESP32
help help
Use 8-bit parallel bus to send data to the LCD. If not set SPI will be used. Communication interface between the microcontroller and the LCD.
config TFT_SPI
bool "SPI"
config TFT_PARALLEL_8_BIT
bool "Parallel (8 bit)"
endchoice
menu "Display Data pins" menu "Display Data pins"
depends on TFT_PARALLEL_8_BIT depends on TFT_PARALLEL_8_BIT
@@ -211,7 +215,7 @@ menu "TFT_eSPI"
endmenu endmenu
menu "Display SPI config" menu "Display SPI config"
depends on !TFT_PARALLEL_8_BIT depends on TFT_SPI
choice TFT_SPI_PORT choice TFT_SPI_PORT
prompt "SPI port" prompt "SPI port"
@@ -232,6 +236,7 @@ menu "TFT_eSPI"
default -1 default -1
range -1 32 if IDF_TARGET_ESP32 range -1 32 if IDF_TARGET_ESP32
range -1 45 if IDF_TARGET_ESP32S2 range -1 45 if IDF_TARGET_ESP32S2
range -1 48 if IDF_TARGET_ESP32S2
help help
Master In Slave Out pin. Master In Slave Out pin.
Can be labelled as SDO in some displays Can be labelled as SDO in some displays
@@ -241,6 +246,7 @@ menu "TFT_eSPI"
default -1 default -1
range -1 32 if IDF_TARGET_ESP32 range -1 32 if IDF_TARGET_ESP32
range -1 45 if IDF_TARGET_ESP32S2 range -1 45 if IDF_TARGET_ESP32S2
range -1 48 if IDF_TARGET_ESP32S2
help help
Master Out Slave In pin. Master Out Slave In pin.
Can be labelled as SDA or SDI in some displays Can be labelled as SDA or SDI in some displays
@@ -250,6 +256,7 @@ menu "TFT_eSPI"
default -1 default -1
range -1 32 if IDF_TARGET_ESP32 range -1 32 if IDF_TARGET_ESP32
range -1 45 if IDF_TARGET_ESP32S2 range -1 45 if IDF_TARGET_ESP32S2
range -1 48 if IDF_TARGET_ESP32S2
help help
Labelled in some displays as WR Labelled in some displays as WR
@@ -287,6 +294,7 @@ menu "TFT_eSPI"
default -1 default -1
range -1 33 if IDF_TARGET_ESP32 range -1 33 if IDF_TARGET_ESP32
range -1 45 if IDF_TARGET_ESP32S2 range -1 45 if IDF_TARGET_ESP32S2
range -1 48 if IDF_TARGET_ESP32S2
config TFT_DC config TFT_DC
int "TFT Data/Command pin" int "TFT Data/Command pin"
@@ -300,6 +308,7 @@ menu "TFT_eSPI"
default -1 default -1
range -1 33 if IDF_TARGET_ESP32 range -1 33 if IDF_TARGET_ESP32
range -1 45 if IDF_TARGET_ESP32S2 range -1 45 if IDF_TARGET_ESP32S2
range -1 48 if IDF_TARGET_ESP32S2
config ENABLE_BL config ENABLE_BL
bool "Enable backlight control" bool "Enable backlight control"
@@ -311,6 +320,7 @@ menu "TFT_eSPI"
default -1 default -1
range -1 33 if IDF_TARGET_ESP32 range -1 33 if IDF_TARGET_ESP32
range -1 45 if IDF_TARGET_ESP32S2 range -1 45 if IDF_TARGET_ESP32S2
range -1 48 if IDF_TARGET_ESP32S2
help help
Pin for the backlight control signal Pin for the backlight control signal
@@ -379,6 +389,7 @@ menu "TFT_eSPI"
default -1 default -1
range -1 33 if IDF_TARGET_ESP32 range -1 33 if IDF_TARGET_ESP32
range -1 45 if IDF_TARGET_ESP32S2 range -1 45 if IDF_TARGET_ESP32S2
range -1 48 if IDF_TARGET_ESP32S2
config SPI_TOUCH_FREQUENCY config SPI_TOUCH_FREQUENCY
int "SPI frequency for XPT2046 chip (Hz)" int "SPI frequency for XPT2046 chip (Hz)"

View File

@@ -12,7 +12,7 @@
* @author Ricard Bitriá Ribes (https://github.com/dracir9) * @author Ricard Bitriá Ribes (https://github.com/dracir9)
* Created Date: 22-01-2022 * Created Date: 22-01-2022
* ----- * -----
* Last Modified: 14-04-2022 * Last Modified: 20-02-2023
* Modified By: Ricard Bitriá Ribes * Modified By: Ricard Bitriá Ribes
* ----- * -----
* @copyright (c) 2022 Ricard Bitriá Ribes * @copyright (c) 2022 Ricard Bitriá Ribes
@@ -161,6 +161,8 @@
// 8 BIT PARALLEL BUS // 8 BIT PARALLEL BUS
#ifdef CONFIG_TFT_PARALLEL_8_BIT #ifdef CONFIG_TFT_PARALLEL_8_BIT
#define TFT_PARALLEL_8_BIT
#if CONFIG_TFT_D0 == -1 #if CONFIG_TFT_D0 == -1
#error "Invalid Data 0 pin. Check TFT_eSPI configuration" #error "Invalid Data 0 pin. Check TFT_eSPI configuration"
#else #else