;***************************************************;
;          Lolin D32 Pro with Lolin TFT 2.4"        ;
;               - lolin_d32_pro board               ;
;               - ili9341 TFT                       ;
;               - xpt2046 touch controller          ;
;***************************************************;

; !! This board already defines TFT_CS, TFT_DC and TFT_RST !!

[env:lolin-d32-pro_ili9341]
extends = arduino_esp32_v2, flash_16mb
board = lolin_d32_pro

build_flags =
    -D HASP_MODEL="Lolin D32 Pro"
    ${arduino_esp32_v2.build_flags}
    ${esp32.ps_ram}

;region -- TFT_eSPI build options ------------------------
    ${lcd.ili9341}
    ${touch.xpt2046}
    ${esp32.vspi}        ; Use VSPI hardware SPI bus
    ; The board already defines the macros for the TFT connector:
    ;-D TFT_DC=27   ; 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_BCKL=32  ; Configurable via web UI (default 32)
    -D TOUCH_CS=12  ; Default for TFT connector
;endregion
    
lib_deps =
    ${arduino_esp32_v2.lib_deps}
    ${tft_espi.lib_deps}

