Working esp32-2432s024r_4MB support

The original configuration displayed only part
of the screen. The needed modification was to
switch width and height and integrate more
flags already used by the capacitive version of
this board.
This commit is contained in:
Grzegorz Grasza 2025-02-13 17:20:21 +01:00
parent 7c7c65acc4
commit 1ebd9e29fe

View File

@ -14,10 +14,11 @@ build_flags =
;region -- TFT_eSPI build options ------------------------ ;region -- TFT_eSPI build options ------------------------
${esp32.hspi} ; Use HSPI hardware SPI bus ${esp32.hspi} ; Use HSPI hardware SPI bus
-D LGFX_USE_V1=1
-D HASP_USE_LGFX_TOUCH=1
-D ILI9341_DRIVER=1 -D ILI9341_DRIVER=1
-D TFT_ROTATION=0 ; 0=0, 1=90, 2=180 or 3=270 degree -D TFT_WIDTH=320
-D TFT_WIDTH=240 -D TFT_HEIGHT=240
-D TFT_HEIGHT=320
-D TFT_CS=15 ;// Chip select control pin -D TFT_CS=15 ;// Chip select control pin
-D TFT_DC=2 ;// Data Command control pin -D TFT_DC=2 ;// Data Command control pin
-D TFT_RST=-1 ;// Reset pin (could connect to RST pin) -D TFT_RST=-1 ;// Reset pin (could connect to RST pin)
@ -25,32 +26,47 @@ build_flags =
-D SUPPORT_TRANSACTIONS -D SUPPORT_TRANSACTIONS
-D SPI_FREQUENCY=65000000 -D SPI_FREQUENCY=65000000
-D SPI_READ_FREQUENCY=20000000 -D SPI_READ_FREQUENCY=20000000
-D SPI_TOUCH_FREQUENCY=2500000
;endregion ;endregion
; -- Debugging options ----------------------------- ; -- Debugging options -----------------------------
; -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG ; -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
lib_deps =
${arduino_esp32_v2.lib_deps}
${lovyangfx.lib_deps}
[env:esp32-2432s024r_4MB] [env:esp32-2432s024r_4MB]
upload_port = /dev/ttyUSB0
extends = sunton-esp32-2432s024, flash_4mb extends = sunton-esp32-2432s024, flash_4mb
board = esp32dev
build_flags = build_flags =
${sunton-esp32-2432s024.build_flags} ${sunton-esp32-2432s024.build_flags}
-D USER_SETUP_LOADED=1 ${esp32.no_ps_ram}
;region -- TFT_eSPI build options ------------------------
${esp32.hspi} ; Use HSPI hardware SPI bus
;-D USER_SETUP_LOADED=1
-D TFT_RGB_ORDER=1 ; Colour order Red-Green-Blue
-D TFT_ROTATION=5 ; 0=0, 1=90, 2=180 or 3=270 degree
-D TOUCH_CS=33 -D TOUCH_CS=33
-D TOUCH_SCLK=14
-D TOUCH_MOSI=13
-D TOUCH_MISO=12
-D TOUCH_DRIVER=0x2046 ; XPT2606 Resistive touch panel driver -D TOUCH_DRIVER=0x2046 ; XPT2606 Resistive touch panel driver
-D HASP_USE_LGFX_TOUCH=1
-D TOUCH_SDA=-1 -D TOUCH_SDA=-1
-D TOUCH_SCL=-1 -D TOUCH_SCL=-1
-D TOUCH_IRQ=-1 -D TOUCH_IRQ=-1
-D I2C_TOUCH_PORT=0 -D I2C_TOUCH_PORT=0
-D I2C_TOUCH_ADDRESS=0 -D I2C_TOUCH_ADDRESS=0
-D I2C_TOUCH_FREQUENCY=0 -D I2C_TOUCH_FREQUENCY=0
-D SPI_TOUCH_FREQUENCY=2500000 -D TOUCH_OFFSET_ROTATION=0 ;touch rotation
;endregion
lib_deps = ; -- Debugging options -----------------------------
${sunton-esp32-2432s024.lib_deps} ; -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
${tft_espi.lib_deps}
;${lovyangfx.lib_deps}
[env:esp32-2432s024c_4MB] [env:esp32-2432s024c_4MB]
@ -65,37 +81,18 @@ build_flags =
;region -- TFT_eSPI build options ------------------------ ;region -- TFT_eSPI build options ------------------------
${esp32.hspi} ; Use HSPI hardware SPI bus ${esp32.hspi} ; Use HSPI hardware SPI bus
;-D USER_SETUP_LOADED=1 ;-D USER_SETUP_LOADED=1
-D LGFX_USE_V1=1 -D TFT_ROTATION=4 ; 0=0, 1=90, 2=180 or 3=270 degree
-D ILI9341_DRIVER=1
-D TOUCH_DRIVER=0x0820 ; CST820 Capacitive I2C touch panel driver -D TOUCH_DRIVER=0x0820 ; CST820 Capacitive I2C touch panel driver
-D HASP_USE_LGFX_TOUCH=1
-D TFT_ROTATION=2 ; 0=0, 1=90, 2=180 or 3=270 degree
-D TFT_WIDTH=240
-D TFT_HEIGHT=320
-D TFT_CS=15 ;// Chip select control pin
-D TFT_DC=2 ;// Data Command control pin
-D TFT_RST=-1 ;// Reset pin (could connect to RST pin)
-D TFT_BCKL=27 ;None, configurable via web UI (e.g. 2 for D4)
-D SUPPORT_TRANSACTIONS
-D TOUCH_SDA=33 -D TOUCH_SDA=33
-D TOUCH_SCL=32 -D TOUCH_SCL=32
-D TOUCH_IRQ=21 -D TOUCH_IRQ=21
-D TOUCH_OFFSET_ROTATION=2 ;touch rotation
;-D TOUCH_IRQ=-1 ;-D TOUCH_IRQ=-1
-D TOUCH_RST=25 -D TOUCH_RST=25
-D I2C_TOUCH_FREQUENCY=400000 -D I2C_TOUCH_FREQUENCY=400000
-D I2C_TOUCH_PORT=1 -D I2C_TOUCH_PORT=1
-D I2C_TOUCH_ADDRESS=0x15 ; or 0x14 -D I2C_TOUCH_ADDRESS=0x15 ; or 0x14
-D SPI_FREQUENCY=65000000 -D TOUCH_OFFSET_ROTATION=2 ;touch rotation
-D SPI_TOUCH_FREQUENCY=2500000
-D SPI_READ_FREQUENCY=20000000
;endregion ;endregion
; -- Debugging options ----------------------------- ; -- Debugging options -----------------------------
; -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG ; -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
lib_deps =
${sunton-esp32-2432s024.lib_deps}
;${tft_espi.lib_deps}
${lovyangfx.lib_deps}
;${goodix.lib_deps}