[lora_e5]
extends = stm32_base
board = lora_e5_dev_board
board_upload.maximum_size = 229376 ; 32kb for FS
build_flags = ${stm32_base.build_flags}
  -D RADIO_CLASS=CustomSTM32WLx
  -D WRAPPER_CLASS=CustomSTM32WLxWrapper
  -D LORA_TX_POWER=22
  -D SX126X_CURRENT_LIMIT=140
  -D SPI_INTERFACES_COUNT=0
  -D RX_BOOSTED_GAIN=true
  -D PIN_SERIAL_RX=PB7
  -D PIN_SERIAL_TX=PB6
  -I variants/wio-e5-dev
build_src_filter = ${stm32_base.build_src_filter}
  +<../variants/wio-e5-dev>

[env:wio-e5_repeater]
extends = lora_e5
build_flags = ${lora_e5.build_flags}
  -D LORA_TX_POWER=22
  -D ADVERT_NAME='"WIO-E5 Repeater"'
  -D ADMIN_PASSWORD='"password"'
  -D MAX_NEIGHBOURS=50
build_src_filter = ${lora_e5.build_src_filter}
  +<../examples/simple_repeater/*.cpp>

[env:wio-e5-repeater_bridge_rs232]
extends = lora_e5
build_flags = ${lora_e5.build_flags}
  -D LORA_TX_POWER=22
  -D ADVERT_NAME='"WIO-E5 Repeater"'
  -D ADMIN_PASSWORD='"password"'
  -D MAX_NEIGHBOURS=50
  -D ENABLE_HWSERIAL2
  -D WITH_RS232_BRIDGE=Serial2
  -D WITH_RS232_BRIDGE_RX=PA3
  -D WITH_RS232_BRIDGE_TX=PA2
build_src_filter = ${lora_e5.build_src_filter}
  +<helpers/bridges/RS232Bridge.cpp>
  +<../examples/simple_repeater/*.cpp>

[env:wio-e5_companion_radio_usb]
extends = lora_e5
build_flags = ${lora_e5.build_flags}
  -D LORA_TX_POWER=22
  -D MAX_CONTACTS=100
  -D MAX_GROUP_CHANNELS=8
  -D ENABLE_USB_INTERFACE
build_src_filter = ${lora_e5.build_src_filter}
  +<../examples/companion_radio/*.cpp>
lib_deps = ${lora_e5.lib_deps}
  densaugeo/base64 @ ~1.4.0

[env:wio-e5_kiss_modem]
extends = lora_e5
build_src_filter = ${lora_e5.build_src_filter}
  +<../examples/kiss_modem/>
