;***************************************************;
;     Wireless-Tag WT32-SC01 dev board & display    ;
;               - Custom ESP32 V3.2 revision board  ;
;               - ST7796S TFT                       ;
;               - FT6336U touch controller          ;
;***************************************************;

[wt32-sc01]
board = esp32dev

build_flags =
    ${env.build_flags}
    ${esp32.build_flags}
    ${esp32.ps_ram}

    ;-D HASP_USE_MDNS=0  ; saves 32 KiB flash
    ;-D HASP_USE_OTA=0   ; No ArduinoOTA on port 3232
    
;region -- TFT_eSPI build options ------------------------
    ${lcd.wt32-sc01}
    -D WT32SC01
    -D TFT_RST=22
    -D TFT_SCLK=14
    -D TFT_DC=21
    -D TFT_CS=15
    -D TFT_MOSI=13
    -D TFT_MISO=-1
    -D TFT_BCKL=23
    -D TOUCH_DRIVER=0x6336
    -D TOUCH_SDA=18
    -D TOUCH_SCL=19
    -D TOUCH_IRQ=-1   ; not connected
    -D TOUCH_RST=-1   ; not used, connected to 3.3V
    -D I2C_TOUCH_FREQUENCY=400000
    -D I2C_TOUCH_ADDRESS=0x38
    -D LV_MEM_SIZE=60416U
;endregion

;region -- Library options -------------------------------
lib_deps =
    ${env.lib_deps}
    ${esp32.lib_deps}
    ${arduino_esp32_v2.lib_deps}
    ${tft_espi.lib_deps}
    ; ${lovyangfx.lib_deps}
    ${ft6336.lib_deps}

lib_ignore =
    ${env.lib_ignore}
    ${esp32.lib_ignore}
    ${arduino_esp32_v2.lib_ignore}
;endregion

[env:wt32-sc01_4MB]
extends = wt32-sc01, esp32s2_4mb_v2

[env:wt32-sc01_16MB]
extends = wt32-sc01, esp32s2_16mb_v2
