[env:tlora-t3s3-epaper]
custom_meshtastic_hw_model = 16
custom_meshtastic_hw_model_slug = TLORA_T3_S3
custom_meshtastic_architecture = esp32-s3
custom_meshtastic_actively_supported = true
custom_meshtastic_support_level = 1
custom_meshtastic_display_name = LILYGO T-LoRa T3-S3 E-Ink
custom_meshtastic_images = tlora-t3s3-epaper.svg
custom_meshtastic_tags = LilyGo
custom_meshtastic_requires_dfu = true
custom_meshtastic_has_ink_hud = true

extends = esp32s3_base
board = tlora-t3s3-v1
board_check = true
upload_protocol = esptool

build_flags = 
  ${esp32s3_base.build_flags}
  -D TLORA_T3S3_EPAPER
  -I variants/esp32s3/tlora_t3s3_epaper
  -DUSE_EINK
  -DEINK_DISPLAY_MODEL=GxEPD2_213_BN
  -DEINK_WIDTH=250
  -DEINK_HEIGHT=122
  -DUSE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk
  -DEINK_LIMIT_FASTREFRESH=20          ; How many consecutive fast-refreshes are permitted    //20
  -DEINK_LIMIT_RATE_BACKGROUND_SEC=30  ; Minimum interval between BACKGROUND updates          //30
  -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1   ; Minimum interval between RESPONSIVE updates
  -DEINK_BACKGROUND_USES_FAST          ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.

lib_deps =
  ${esp32s3_base.lib_deps}
  # renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
  https://github.com/meshtastic/GxEPD2/archive/c7eb4c3c167cf396ef4f541cc5d4c6aa42f3c46b.zip

[env:tlora-t3s3-epaper-inkhud]
extends = esp32s3_base, inkhud
board = tlora-t3s3-v1
board_check = true
upload_protocol = esptool
build_src_filter =
  ${esp32s3_base.build_src_filter}
  ${inkhud.build_src_filter}
build_flags =
  ${esp32s3_base.build_flags}
  ${inkhud.build_flags}
  -I variants/esp32s3/tlora_t3s3_epaper
  -D TLORA_T3S3_EPAPER
lib_deps =
  ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX
  ${esp32s3_base.lib_deps}
