[env:picomputer-s3]
extends = esp32s3_base
board = bpi_picow_esp32_s3
board_check = true
board_build.partitions = default_8MB.csv
;OpenOCD flash method
;upload_protocol = esp-builtin
;Normal method
upload_protocol = esptool

build_flags = 
  ${esp32s3_base.build_flags}
  -DPICOMPUTER_S3
  -I variants/picomputer-s3

lib_deps = 
  ${esp32s3_base.lib_deps}
  lovyan03/LovyanGFX@^1.2.0

build_src_filter =
  ${esp32s3_base.build_src_filter}


[env:picomputer-s3-tft]
extends = env:picomputer-s3

build_flags =
  ${env:picomputer-s3.build_flags}
  -D INPUTDRIVER_MATRIX_TYPE=1
  -D USE_PIN_BUZZER=PIN_BUZZER
  -D USE_SX127x
  -D HAS_SCREEN=1
  -D HAS_TFT=1
  -D RAM_SIZE=1560
  -D LV_LVGL_H_INCLUDE_SIMPLE
  -D LV_CONF_INCLUDE_SIMPLE
  -D LV_COMP_CONF_INCLUDE_SIMPLE
  -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 USE_LOG_DEBUG
  -D LOG_DEBUG_INC=\"DebugConfiguration.h\"
  -D LGFX_SCREEN_WIDTH=240
  -D LGFX_SCREEN_HEIGHT=320
  -D DISPLAY_SIZE=320x240 ; landscape mode
  -D LGFX_DRIVER=LGFX_PICOMPUTER_S3
  -D GFX_DRIVER_INC=\"graphics/LGFX/LGFX_PICOMPUTER_S3.h\"
  -D VIEW_320x240
;  -D USE_DOUBLE_BUFFER
  -D USE_PACKET_API

lib_deps =
  ${env:picomputer-s3.lib_deps}
  ${device-ui_base.lib_deps}
