mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-19 09:16:41 +00:00
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:
parent
7c7c65acc4
commit
1ebd9e29fe
@ -14,10 +14,11 @@ build_flags =
|
||||
|
||||
;region -- TFT_eSPI build options ------------------------
|
||||
${esp32.hspi} ; Use HSPI hardware SPI bus
|
||||
-D LGFX_USE_V1=1
|
||||
-D HASP_USE_LGFX_TOUCH=1
|
||||
-D ILI9341_DRIVER=1
|
||||
-D TFT_ROTATION=0 ; 0=0, 1=90, 2=180 or 3=270 degree
|
||||
-D TFT_WIDTH=240
|
||||
-D TFT_HEIGHT=320
|
||||
-D TFT_WIDTH=320
|
||||
-D TFT_HEIGHT=240
|
||||
-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)
|
||||
@ -25,33 +26,48 @@ build_flags =
|
||||
-D SUPPORT_TRANSACTIONS
|
||||
-D SPI_FREQUENCY=65000000
|
||||
-D SPI_READ_FREQUENCY=20000000
|
||||
-D SPI_TOUCH_FREQUENCY=2500000
|
||||
;endregion
|
||||
|
||||
; -- Debugging options -----------------------------
|
||||
; -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
||||
|
||||
lib_deps =
|
||||
${arduino_esp32_v2.lib_deps}
|
||||
${lovyangfx.lib_deps}
|
||||
|
||||
|
||||
[env:esp32-2432s024r_4MB]
|
||||
upload_port = /dev/ttyUSB0
|
||||
extends = sunton-esp32-2432s024, flash_4mb
|
||||
board = esp32dev
|
||||
|
||||
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_SCLK=14
|
||||
-D TOUCH_MOSI=13
|
||||
-D TOUCH_MISO=12
|
||||
-D TOUCH_DRIVER=0x2046 ; XPT2606 Resistive touch panel driver
|
||||
-D HASP_USE_LGFX_TOUCH=1
|
||||
-D TOUCH_SDA=-1
|
||||
-D TOUCH_SCL=-1
|
||||
-D TOUCH_IRQ=-1
|
||||
-D I2C_TOUCH_PORT=0
|
||||
-D I2C_TOUCH_ADDRESS=0
|
||||
-D I2C_TOUCH_FREQUENCY=0
|
||||
-D SPI_TOUCH_FREQUENCY=2500000
|
||||
-D TOUCH_OFFSET_ROTATION=0 ;touch rotation
|
||||
;endregion
|
||||
|
||||
; -- Debugging options -----------------------------
|
||||
; -D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
|
||||
|
||||
lib_deps =
|
||||
${sunton-esp32-2432s024.lib_deps}
|
||||
${tft_espi.lib_deps}
|
||||
;${lovyangfx.lib_deps}
|
||||
|
||||
|
||||
[env:esp32-2432s024c_4MB]
|
||||
upload_port = /dev/ttyUSB0
|
||||
@ -65,37 +81,18 @@ build_flags =
|
||||
;region -- TFT_eSPI build options ------------------------
|
||||
${esp32.hspi} ; Use HSPI hardware SPI bus
|
||||
;-D USER_SETUP_LOADED=1
|
||||
-D LGFX_USE_V1=1
|
||||
-D ILI9341_DRIVER=1
|
||||
-D TFT_ROTATION=4 ; 0=0, 1=90, 2=180 or 3=270 degree
|
||||
-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_SCL=32
|
||||
-D TOUCH_IRQ=21
|
||||
-D TOUCH_OFFSET_ROTATION=2 ;touch rotation
|
||||
;-D TOUCH_IRQ=-1
|
||||
-D TOUCH_RST=25
|
||||
-D I2C_TOUCH_FREQUENCY=400000
|
||||
-D I2C_TOUCH_PORT=1
|
||||
-D I2C_TOUCH_ADDRESS=0x15 ; or 0x14
|
||||
-D SPI_FREQUENCY=65000000
|
||||
-D SPI_TOUCH_FREQUENCY=2500000
|
||||
-D SPI_READ_FREQUENCY=20000000
|
||||
-D TOUCH_OFFSET_ROTATION=2 ;touch rotation
|
||||
;endregion
|
||||
|
||||
; -- Debugging options -----------------------------
|
||||
; -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user