;***************************************************;
;   AZ-Touch MOD PCB with ESP32 with 2.4" or 2.8"   ;
;               - ESP32-WROOM or WROVER DevKitC     ;
;               - ili9341 TFT                       ;
;               - xpt2046 touch controller          ;
;***************************************************;

[az-touch-mod-esp32_ili9341]
extends = arduino_esp32_v2
board = esp32dev

build_flags =
    -D HASP_MODEL="AZ-Touch MOD ESP32 DevKitC"
    ${arduino_esp32_v2.build_flags}
    ${esp32.ps_ram}

;region -- TFT_eSPI build options ------------------------
    ${lcd.ili9341}
    ${touch.xpt2046}
    ${esp32.vspi}        ; Use VSPI hardware SPI bus
    -D TFT_DC=4
    -D TFT_CS=5
    -D TFT_RST=22        ; RST
    -D TFT_BCKL=15
    -D TOUCH_CS=14
    -D TFT_BACKLIGHT_ON=LOW
;endregion

;region -- Library options -------------------------------
lib_deps =
    ${arduino_esp32_v2.lib_deps}
    ${tft_espi.lib_deps}
;endregion

[env:az-touch-mod-esp32_ili9341_4MB]
extends = az-touch-mod-esp32_ili9341, flash_4mb

[env:az-touch-mod-esp32_ili9341_8MB]
extends = az-touch-mod-esp32_ili9341, flash_8mb