[t5s3_epaper_base]
extends = esp32s3_base
board = t5-epaper-s3
board_build.partition = default_16MB.csv
board_check = true
upload_protocol = esptool
build_flags = -fno-strict-aliasing
  ${esp32_base.build_flags} 
  -I variants/esp32s3/t5s3_epaper
  -D T5_S3_EPAPER_PRO
  -D USE_EINK
  -D USE_EINK_PARALLELDISPLAY
  -D PRIVATE_HW
  -D TOUCH_THRESHOLD_X=60
  -D TOUCH_THRESHOLD_Y=40
  -D TIME_LONG_PRESS=500
;  -D EINK_LIMIT_GHOSTING_PX=5000
  -D EPD_FULLSLOW_PERIOD=100
  -D FAST_EPD_PARTIAL_UPDATE_BUG ; use rect area update instead of partial

build_src_filter = 
  ${esp32s3_base.build_src_filter}
  +<../variants/esp32s3/t5s3_epaper>
lib_deps =
  ${esp32s3_base.lib_deps}
  # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
  lewisxhe/SensorLib@0.3.4
  https://github.com/mverch67/BQ27220/archive/07d92be846abd8a0258a50c23198dac0858b22ed.zip
  https://github.com/mverch67/FastEPD/archive/0df1bff329b6fc782e062f611758880762340647.zip

[env:t5s3_epaper_inkhud]
extends = t5s3_epaper_base, inkhud
board_level = extra # inkhud port is incomplete
board_check = false
build_flags =
  ${t5s3_epaper_base.build_flags}
  ${inkhud.build_flags}
  -D SDCARD_USE_SPI1
  -D T5_S3_EPAPER_PRO_V2
build_src_filter =
  ${t5s3_epaper_base.build_src_filter}
  ${inkhud.build_src_filter}
lib_deps =
  ${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX
  ${t5s3_epaper_base.lib_deps}


[env:t5s3-epaper-v1] ; H752
extends = t5s3_epaper_base
build_flags =
  ${t5s3_epaper_base.build_flags}
  -D T5_S3_EPAPER_PRO_V1
  -D GPS_DEFAULT_NOT_PRESENT=1

[env:t5s3-epaper-v2] ; H752-01
extends = t5s3_epaper_base
build_flags =
  ${t5s3_epaper_base.build_flags}
  -D T5_S3_EPAPER_PRO_V2
  -D SDCARD_USE_SPI1
  -D GPS_POWER_TOGGLE
