[env:seeed_wio_tracker_L1_eink]
board = seeed_wio_tracker_L1
extends = nrf52840_base
;board_level = extra
build_flags = ${nrf52840_base.build_flags}
  -I variants/nrf52840/seeed_wio_tracker_L1_eink
  -D SEEED_WIO_TRACKER_L1_EINK
  -D SEEED_WIO_TRACKER_L1
  -I src/platform/nrf52/softdevice
  -I src/platform/nrf52/softdevice/nrf52
  -DUSE_EINK
  -DEINK_DISPLAY_MODEL=GxEPD2_213_B74
  -DEINK_WIDTH=250
  -DEINK_HEIGHT=122
  -DUSE_EINK_DYNAMICDISPLAY            ; Enable Dynamic EInk
  -DEINK_LIMIT_FASTREFRESH=10          ; How many consecutive fast-refreshes are permitted
  -DEINK_LIMIT_RATE_BACKGROUND_SEC=30  ; Minimum interval between BACKGROUND updates
  -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1   ; Minimum interval between RESPONSIVE updates
;   -D EINK_LIMIT_GHOSTING_PX=2000      ; (Optional) How much image ghosting is tolerated
  -DEINK_BACKGROUND_USES_FAST          ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.
  -DEINK_HASQUIRK_GHOSTING             ; Display model is identified as "prone to ghosting"
  -DEINK_HASQUIRK_WEAKFASTREFRESH      ; Pixels set with fast-refresh are easy to clear, disrupted by sunlight
board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld
build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/seeed_wio_tracker_L1_eink>
lib_deps =
  ${nrf52840_base.lib_deps}
  https://github.com/meshtastic/GxEPD2#b202ebfec6a4821e098cf7a625ba0f6f2400292d
debug_tool = jlink

[env:seeed_wio_tracker_L1_eink-inkhud]
board = seeed_wio_tracker_L1
extends = nrf52840_base, inkhud
build_flags = 
  ${nrf52840_base.build_flags}
  ${inkhud.build_flags}
  -I variants/nrf52840/seeed_wio_tracker_L1_eink
  -D SEEED_WIO_TRACKER_L1
  -D BUTTON_PIN=D13
board_build.ldscript = src/platform/nrf52/nrf52840_s140_v7.ld
build_src_filter = 
  ${nrf52_base.build_src_filter}
  ${inkhud.build_src_filter}
  +<../variants/nrf52840/seeed_wio_tracker_L1_eink>
lib_deps =
  ${inkhud.lib_deps} ; Before base libs_deps, so we use ZinggJM/GFXRoot instead of AdafruitGFX (saves space)
  ${nrf52840_base.lib_deps}
debug_tool = jlink