; platformio.ini for unphone meshtastic

[env:unphone]

extends = esp32s3_base
board = unphone9
upload_speed = 921600
monitor_speed = 115200
monitor_filters = esp32_exception_decoder

build_unflags =
  ${esp32s3_base.build_unflags}
  -D ARDUINO_USB_MODE

build_flags = ${esp32_base.build_flags}
  -D UNPHONE
  -I variants/unphone
  -D ARDUINO_USB_MODE=0
  -D UNPHONE_ACCEL=0
  -D UNPHONE_TOUCHS=0
  -D UNPHONE_SDCARD=0
  -D UNPHONE_UI0=0
  -D UNPHONE_LORA=0
  -D UNPHONE_FACTORY_MODE=0

build_src_filter = ${esp32_base.build_src_filter} +<../variants/unphone>

lib_deps = ${esp32s3_base.lib_deps}
  lovyan03/LovyanGFX@ 1.2.0
  https://gitlab.com/hamishcunningham/unphonelibrary#meshtastic@9.0.0
  adafruit/Adafruit NeoPixel @ ^1.12.0


[env:unphone-tft]
extends = esp32s3_base
board_level = extra
board = unphone
board_build.partitions = default_8MB.csv
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
build_flags = ${esp32_base.build_flags}
  -D UNPHONE
  -D UNPHONE_ACCEL=0
  -D UNPHONE_TOUCHS=0
  -D UNPHONE_SDCARD=0
  -D UNPHONE_UI0=0
  -D UNPHONE_LORA=0
  -D UNPHONE_FACTORY_MODE=0
  -D MAX_THREADS=40
  -D HAS_SCREEN=0
  -D HAS_TFT=1
  -D RAM_SIZE=512
	-D LV_LVGL_H_INCLUDE_SIMPLE
	-D LV_CONF_INCLUDE_SIMPLE
	-D LV_COMP_CONF_INCLUDE_SIMPLE
  -D LV_BUILD_TEST=0
  -D LV_USE_PERF_MONITOR=0
  -D LV_USE_MEM_MONITOR=0
  -D USE_LOG_DEBUG
  -D LOG_DEBUG_INC=\"DebugConfiguration.h\"
;  -D CALIBRATE_TOUCH=0
  -D LGFX_DRIVER=LGFX_UNPHONE_V9
  -D VIEW_320x240
;	-D USE_DOUBLE_BUFFER
  -D USE_PACKET_API
	-I lib/device-ui/generated/ui_320x240
  -I variants/unphone

build_src_filter = ${esp32_base.build_src_filter} +<../variants/unphone>
  +<../lib/device-ui/generated/ui_320x240>
  +<../lib/device-ui/resources>
  +<../lib/device-ui/source>

lib_deps = ${esp32s3_base.lib_deps}
  lovyan03/LovyanGFX@^1.2.0
  https://gitlab.com/hamishcunningham/unphonelibrary#meshtastic@9.0.0
  adafruit/Adafruit NeoPixel@1.12.0
