[env:pico2_w5500_e22]
extends = rp2350_base
board = rpipico2
board_level = community
upload_protocol = picotool

build_flags =
  ${rp2350_base.build_flags}
  -ULED_BUILTIN                   # avoid "LED_BUILTIN redefined" warnings from framework common.h
  -I variants/rp2350/diy/pico2_w5500_e22
  -D HW_SPI1_DEVICE
  -D EBYTE_E22_900M30S            # selects the EBYTE E22-900M30S module config, including TCXO voltage support and TX gain / max power settings

# Re-enable Ethernet and API source paths excluded in rp2350_base
build_src_filter = ${rp2350_base.build_src_filter} +<mesh/eth/> +<mesh/api/> +<mqtt/>

lib_deps =
  ${rp2350_base.lib_deps}
  ${networking_base.lib_deps}
  ${networking_extra.lib_deps}
  # Standard WIZnet Ethernet library — supports W5100/W5200/W5500 auto-detect
  arduino-libraries/Ethernet@^2.0.2

debug_build_flags = ${rp2350_base.build_flags}, -g
debug_tool = cmsis-dap
