diff --git a/src/helpers/rp2040/WaveshareBoard.cpp b/variants/waveshare_rp2040_lora/WaveshareBoard.cpp similarity index 100% rename from src/helpers/rp2040/WaveshareBoard.cpp rename to variants/waveshare_rp2040_lora/WaveshareBoard.cpp diff --git a/src/helpers/rp2040/WaveshareBoard.h b/variants/waveshare_rp2040_lora/WaveshareBoard.h similarity index 81% rename from src/helpers/rp2040/WaveshareBoard.h rename to variants/waveshare_rp2040_lora/WaveshareBoard.h index c2b5aff52..694b8bd12 100644 --- a/src/helpers/rp2040/WaveshareBoard.h +++ b/variants/waveshare_rp2040_lora/WaveshareBoard.h @@ -6,18 +6,6 @@ // LoRa radio module pins for Waveshare RP2040-LoRa-HF/LF // https://files.waveshare.com/wiki/RP2040-LoRa/Rp2040-lora-sch.pdf -#define P_LORA_DIO_1 16 -#define P_LORA_NSS 13 // CS -#define P_LORA_RESET 23 -#define P_LORA_BUSY 18 -#define P_LORA_SCLK 14 -#define P_LORA_MISO 24 -#define P_LORA_MOSI 15 -#define P_LORA_TX_LED 25 - -#define SX126X_DIO2_AS_RF_SWITCH true -#define SX126X_DIO3_TCXO_VOLTAGE 0 - /* * This board has no built-in way to read battery voltage. * Nevertheless it's very easy to make it work, you only require two 1% resistors. diff --git a/variants/waveshare_rp2040_lora/platformio.ini b/variants/waveshare_rp2040_lora/platformio.ini index 933c76615..e3c812b6f 100644 --- a/variants/waveshare_rp2040_lora/platformio.ini +++ b/variants/waveshare_rp2040_lora/platformio.ini @@ -3,28 +3,34 @@ [waveshare_rp2040_lora] extends = rp2040_base - board = pico board_build.filesystem_size = 0.5m - build_flags = ${rp2040_base.build_flags} -I variants/waveshare_rp2040_lora -D SX126X_CURRENT_LIMIT=140 -D RADIO_CLASS=CustomSX1262 -D WRAPPER_CLASS=CustomSX1262Wrapper - -D LORA_TX_POWER=22 + -D P_LORA_DIO_1=16 + -D P_LORA_NSS=13 ; CS + -D P_LORA_RESET=23 + -D P_LORA_BUSY=18 + -D P_LORA_SCLK=14 + -D P_LORA_MISO=24 + -D P_LORA_MOSI=15 + -D P_LORA_TX_LED=25 + -D SX126X_DIO2_AS_RF_SWITCH=true + -D SX126X_DIO3_TCXO_VOLTAGE=0 -D SX126X_RX_BOOSTED_GAIN=1 + -D LORA_TX_POWER=22 ; Debug options ; -D DEBUG_RP2040_WIRE=1 ; -D DEBUG_RP2040_SPI=1 ; -D DEBUG_RP2040_CORE=1 ; -D RADIOLIB_DEBUG_SPI=1 ; -D DEBUG_RP2040_PORT=Serial - build_src_filter = ${rp2040_base.build_src_filter} - + + + +<../variants/waveshare_rp2040_lora> - lib_deps = ${rp2040_base.lib_deps} [env:waveshare_rp2040_lora_Repeater] diff --git a/variants/waveshare_rp2040_lora/target.h b/variants/waveshare_rp2040_lora/target.h index 149b9469f..aed558939 100644 --- a/variants/waveshare_rp2040_lora/target.h +++ b/variants/waveshare_rp2040_lora/target.h @@ -7,7 +7,7 @@ #include #include #include -#include +#include extern WaveshareBoard board; extern WRAPPER_CLASS radio_driver;