mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-03-30 12:45:45 +00:00
Merge pull request #726 from recrof/xiao_rp2040_refactor
tidy up xiao rp2040 variant
This commit is contained in:
@@ -3,21 +3,6 @@
|
||||
#include <Arduino.h>
|
||||
#include <MeshCore.h>
|
||||
|
||||
// LoRa radio module pins for the Xiao RP2040
|
||||
// https://wiki.seeedstudio.com/XIAO-RP2040/
|
||||
|
||||
#define P_LORA_DIO_1 27 // D1
|
||||
#define P_LORA_NSS 6 // D4
|
||||
#define P_LORA_RESET 28 // D2
|
||||
#define P_LORA_BUSY 29 // D3
|
||||
#define P_LORA_TX_LED 17
|
||||
|
||||
#define SX126X_RXEN 7 // D5
|
||||
#define SX126X_TXEN -1
|
||||
|
||||
#define SX126X_DIO2_AS_RF_SWITCH true
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
|
||||
/*
|
||||
* 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.
|
||||
@@ -1,27 +1,32 @@
|
||||
[Xiao_rp2040]
|
||||
extends = rp2040_base
|
||||
|
||||
board = seeed_xiao_rp2040
|
||||
board_build.filesystem_size = 0.5m
|
||||
|
||||
build_flags = ${rp2040_base.build_flags}
|
||||
-I variants/xiao_rp2040
|
||||
-D SX126X_CURRENT_LIMIT=140
|
||||
-D RADIO_CLASS=CustomSX1262
|
||||
-D WRAPPER_CLASS=CustomSX1262Wrapper
|
||||
-D LORA_TX_POWER=22
|
||||
-D P_LORA_DIO_1=27 ; D1
|
||||
-D P_LORA_NSS=6 ; D4
|
||||
-D P_LORA_RESET=28 ; D2
|
||||
-D P_LORA_BUSY=29 ; D3
|
||||
-D P_LORA_TX_LED=17
|
||||
-D SX126X_RXEN=7 ; D5
|
||||
-D SX126X_TXEN=RADIOLIB_NC
|
||||
-D SX126X_DIO2_AS_RF_SWITCH=true
|
||||
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
|
||||
-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}
|
||||
+<helpers/rp2040/XiaoRP2040Board.cpp>
|
||||
+<XiaoRP2040Board.cpp>
|
||||
+<../variants/xiao_rp2040>
|
||||
|
||||
lib_deps = ${rp2040_base.lib_deps}
|
||||
|
||||
[env:Xiao_rp2040_Repeater]
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <helpers/radiolib/CustomSX1262Wrapper.h>
|
||||
#include <helpers/radiolib/RadioLibWrappers.h>
|
||||
#include <helpers/SensorManager.h>
|
||||
#include <helpers/rp2040/XiaoRP2040Board.h>
|
||||
#include <XiaoRP2040Board.h>
|
||||
|
||||
extern XiaoRP2040Board board;
|
||||
extern WRAPPER_CLASS radio_driver;
|
||||
|
||||
Reference in New Issue
Block a user