;***************************************************;
;    Adafruit ESP32-S2 with Featherwing TFT 3.5" V2 ;
;               - ESP32-S2 w/ 2 MB PSRAM board      ;
;               - HX8357D TFT Featherwing 3.5" V2   ;
;               - TSC2007 touch controller          ;
;***************************************************;

[env:esp32s2-featherwing-24-v2]
extends = esp32s2_4mb_v2
board = esp32s2

build_flags =
    ${env.build_flags}
    ${esp32s2.build_flags}
    ${esp32.ps_ram}
    -D HASP_MODEL="Adafruit ESP32-S2 Featherwing 3.5 V2"
    -D USE_HSPI_PORT

;region -- TFT_eSPI build options ------------------------
    ${lcd.featherwing-35-v2}
    -D LGFX_USE_V1=1
    -D TFT_MISO=19
    -D TFT_MOSI=18
    -D TFT_SCLK=5
    -D TFT_DC=10
    -D TFT_CS=9
    -D TFT_RST=-1  ; RST
    -D TFT_BCKL=21 ; Solder the LITE pad to a PWM enabled pin of the ESP, like GPIO 21
;endregion

lib_deps =
    ${env.lib_deps}
    ${esp32s2.lib_deps}
    ${tsc2007.lib_deps}
    ${lovyangfx.lib_deps}

lib_ignore =
    ${env.lib_ignore}
    ${esp32s2.lib_ignore}
    TFT_eSPI
