Update SPI bus and TFT_BCKL

This commit is contained in:
fvanroie 2020-12-20 22:12:54 +01:00
parent f2a08d87cd
commit a0013ce9f9
9 changed files with 28 additions and 29 deletions

View File

@ -55,9 +55,10 @@ build_flags =
${flags.esp32_flags} ${flags.esp32_flags}
; -- TFT_eSPI build options ------------------------ ; -- TFT_eSPI build options ------------------------
${lcd.raspberrypi} ${lcd.raspberrypi}
${pins.vspi32} ${esp32.vspi} ; Use VSPI hardware SPI bus
-D TFT_CS=15 -D TFT_CS=15
-D TFT_DC=4 -D TFT_DC=4
-D TFT_RST=32 -D TFT_RST=32
-D TFT_BCKL=-1 ; None
-D TOUCH_CS=22 -D TOUCH_CS=22
``` ```

View File

@ -58,9 +58,10 @@ build_flags =
${flags.esp32_flags} ${flags.esp32_flags}
; -- TFT_eSPI build options ------------------------ ; -- TFT_eSPI build options ------------------------
${lcd.raspberrypi} ${lcd.raspberrypi}
${pins.vspi32} ${esp32.vspi} ; Use VSPI hardware SPI bus
-D TFT_CS=15 -D TFT_CS=15
-D TFT_DC=4 -D TFT_DC=4
-D TFT_RST=32 -D TFT_RST=32
-D TFT_BCKL=-1 ; None, configurable via web UI (e.g. 21)
-D TOUCH_CS=22 -D TOUCH_CS=22
``` ```

View File

@ -122,6 +122,15 @@ lib_deps = LittleFS_esp32
extra_scripts = extra_scripts =
tools/copy_partitions.py tools/copy_partitions.py
; -- The ESP32 has 2 SPI Hardware Busses available to use:
vspi =
-D TFT_MISO=19
-D TFT_MOSI=23
-D TFT_SCLK=18
hspi =
-D TFT_MISO=12
-D TFT_MOSI=13
-D TFT_SCLK=14
[esp8266] [esp8266]
build_flags= build_flags=
@ -165,20 +174,6 @@ lib_deps =
stm32duino/STM32duino LwIP @ ^2.1.2 stm32duino/STM32duino LwIP @ ^2.1.2
;https://github.com/stm32duino/LwIP.git ;https://github.com/stm32duino/LwIP.git
;***************************************************
; Hardware options
;***************************************************
; -- The SPI Hardware Busses available to use
[pins]
vspi32 =
-D TFT_MISO=19
-D TFT_MOSI=23
-D TFT_SCLK=18
hspi32 =
-D TFT_MISO=12
-D TFT_MOSI=13
-D TFT_SCLK=14
;*************************************************** ;***************************************************
; Native build ; Native build

View File

@ -74,10 +74,11 @@ build_flags =
${esp32.build_flags} ${esp32.build_flags}
;region -- TFT_eSPI build options ----------------------------------- ;region -- TFT_eSPI build options -----------------------------------
${lcd.raspberrypi} ${lcd.raspberrypi}
${pins.vspi32} ${esp32.vspi}
-D TFT_CS=5 -D TFT_CS=5
-D TFT_DC=4 -D TFT_DC=4
-D TFT_RST=32 -D TFT_RST=32
-D TFT_BCKL=-1 ; None, configurable via web UI (e.g. 21)
-D TOUCH_CS=22 -D TOUCH_CS=22
;endregion ;endregion

View File

@ -21,12 +21,12 @@ build_flags =
;region -- TFT_eSPI build options ------------------------ ;region -- TFT_eSPI build options ------------------------
${lcd.lolin24} ${lcd.lolin24}
${pins.vspi32} ${esp32.vspi} ; Use VSPI hardware SPI bus
-D TFT_DC=5 -D TFT_DC=5
-D TFT_CS=26 -D TFT_CS=26
-D TFT_RST=-1 ; RST -D TFT_RST=-1 ; RST
-D TFT_BCKL=-1 ; None, configurable via web UI (e.g. 21) -D TFT_BCKL=-1 ; None, configurable via web UI (e.g. 21)
-D TOUCH_CS=17 ; (can also be 22 or 16) -D TOUCH_CS=17 ; (can also be 22 or 16)
;endregion ;endregion
;region -- Library options ------------------------------- ;region -- Library options -------------------------------

View File

@ -24,7 +24,7 @@ build_flags =
-D TFT_ROTATION=${lcd.TFT_ROTATION} -D TFT_ROTATION=${lcd.TFT_ROTATION}
-D TFT_WIDTH=320 -D TFT_WIDTH=320
-D TFT_HEIGHT=480 -D TFT_HEIGHT=480
${pins.vspi32} ${esp32.vspi} ; Use VSPI hardware SPI bus
-D TFT_BCKL=-1 ;None, configurable via web UI (e.g. 2 for D4) -D TFT_BCKL=-1 ;None, configurable via web UI (e.g. 2 for D4)
-D TFT_CS=33 ; Chip select control pin -D TFT_CS=33 ; Chip select control pin
-D TFT_DC=15 ; Data Command control pin - must use a pin in the range 0-31 -D TFT_DC=15 ; Data Command control pin - must use a pin in the range 0-31

View File

@ -31,12 +31,12 @@ build_flags =
;region -- TFT_eSPI build options ------------------------ ;region -- TFT_eSPI build options ------------------------
${lcd.raspberrypi} ${lcd.raspberrypi}
-D USE_HSPI_PORT -D USE_HSPI_PORT
${pins.hspi32} ${esp32.hspi} ; Use HSPI hardware SPI bus
-D TFT_CS=15 -D TFT_CS=15
-D TFT_DC=2 -D TFT_DC=2
-D TFT_RST=-1 ; 3.3v -D TFT_RST=-1 ; 3.3v
-D TOUCH_CS=0 ; 3 ; RX -D TFT_BCKL=-1 ; None, configurable via web UI (e.g. 21)
-D TFT_BCKL=-1 -D TOUCH_CS=0
;endregion ;endregion
; -- Debugging options ----------------------------- ; -- Debugging options -----------------------------

View File

@ -25,8 +25,8 @@ build_flags =
;region -- TFT_eSPI build options ------------------------ ;region -- TFT_eSPI build options ------------------------
${lcd.lolin24} ${lcd.lolin24}
${pins.vspi32} ${esp32.vspi} ; Use VSPI hardware SPI bus
; The board already defines the macros for the TFT connector ; The board already defines the macros for the TFT connector:
;-D TFT_DC=27 ; Defined by board, don't redefine !! ;-D TFT_DC=27 ; Defined by board, don't redefine !!
;-D TFT_CS=14 ; Defined by board, don't redefine !! ;-D TFT_CS=14 ; Defined by board, don't redefine !!
;-D TFT_RST=33 ; Defined by board, don't redefine !! ;-D TFT_RST=33 ; Defined by board, don't redefine !!

View File

@ -21,10 +21,11 @@ build_flags =
;region -- TFT_eSPI build options ------------------------ ;region -- TFT_eSPI build options ------------------------
${lcd.raspberrypi} ${lcd.raspberrypi}
${pins.vspi32} ${esp32.vspi} ; Use VSPI hardware SPI bus
-D TFT_CS=15 -D TFT_CS=15
-D TFT_DC=4 -D TFT_DC=4
-D TFT_RST=32 -D TFT_RST=32
-D TFT_BCKL=-1 ; None, configurable via web UI (e.g. 21)
-D TOUCH_CS=22 -D TOUCH_CS=22
;endregion ;endregion