; platformio.ini for unphone meshtastic

[env:unphone]
extends = esp32s3_base
board = unphone
board_build.partitions = partition-table-8MB.csv
upload_speed = 921600
monitor_speed = 115200
monitor_filters = esp32_exception_decoder

build_flags =
  ${esp32s3_base.build_flags}
  -D UNPHONE
  -I variants/esp32s3/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
  -D USE_SX127x
  -D SDCARD_CS=43

build_src_filter =
  ${esp32s3_base.build_src_filter}
  +<../variants/esp32s3/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]
board_level = extra
extends = env:unphone
build_flags =
  ${env:unphone.build_flags}
  -D CONFIG_DISABLE_HAL_LOCKS=1
  -D INPUTDRIVER_BUTTON_TYPE=21
  -D HAS_SCREEN=1
  -D HAS_TFT=1
  -D HAS_SDCARD
  -D SDCARD_CS=43
  -D DISPLAY_SET_RESOLUTION
  -D RAM_SIZE=6144
  -D LV_CACHE_DEF_SIZE=2097152
  -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_SYSMON=0
  -D LV_USE_PROFILER=0
  -D LV_USE_PERF_MONITOR=0
  -D LV_USE_MEM_MONITOR=0
  -D LV_USE_LOG=0
  -D LGFX_SCREEN_WIDTH=320
  -D LGFX_SCREEN_HEIGHT=480
  -D DISPLAY_SIZE=320x480 ; portrait mode
  -D LGFX_DRIVER=LGFX_UNPHONE_V9
  -D GFX_DRIVER_INC=\"graphics/LGFX/LGFX_UNPHONE.h\"
  -D VIEW_320x240
  -D USE_PACKET_API
  -D MAP_FULL_REDRAW

lib_deps =
  ${env:unphone.lib_deps}
  ${device-ui_base.lib_deps}
