Skip to content

Commit 605210d

Browse files
authored
Merge pull request #726 from recrof/xiao_rp2040_refactor
tidy up xiao rp2040 variant
2 parents 5b8c8b0 + c9e6ae9 commit 605210d

File tree

4 files changed

+12
-22
lines changed

4 files changed

+12
-22
lines changed
File renamed without changes.

src/helpers/rp2040/XiaoRP2040Board.h renamed to variants/xiao_rp2040/XiaoRP2040Board.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,6 @@
33
#include <Arduino.h>
44
#include <MeshCore.h>
55

6-
// LoRa radio module pins for the Xiao RP2040
7-
// https://wiki.seeedstudio.com/XIAO-RP2040/
8-
9-
#define P_LORA_DIO_1 27 // D1
10-
#define P_LORA_NSS 6 // D4
11-
#define P_LORA_RESET 28 // D2
12-
#define P_LORA_BUSY 29 // D3
13-
#define P_LORA_TX_LED 17
14-
15-
#define SX126X_RXEN 7 // D5
16-
#define SX126X_TXEN -1
17-
18-
#define SX126X_DIO2_AS_RF_SWITCH true
19-
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
20-
216
/*
227
* This board has no built-in way to read battery voltage.
238
* Nevertheless it's very easy to make it work, you only require two 1% resistors.

variants/xiao_rp2040/platformio.ini

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
[Xiao_rp2040]
22
extends = rp2040_base
3-
43
board = seeed_xiao_rp2040
54
board_build.filesystem_size = 0.5m
6-
75
build_flags = ${rp2040_base.build_flags}
86
-I variants/xiao_rp2040
97
-D SX126X_CURRENT_LIMIT=140
108
-D RADIO_CLASS=CustomSX1262
119
-D WRAPPER_CLASS=CustomSX1262Wrapper
12-
-D LORA_TX_POWER=22
10+
-D P_LORA_DIO_1=27 ; D1
11+
-D P_LORA_NSS=6 ; D4
12+
-D P_LORA_RESET=28 ; D2
13+
-D P_LORA_BUSY=29 ; D3
14+
-D P_LORA_TX_LED=17
15+
-D SX126X_RXEN=7 ; D5
16+
-D SX126X_TXEN=RADIOLIB_NC
17+
-D SX126X_DIO2_AS_RF_SWITCH=true
18+
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
1319
-D SX126X_RX_BOOSTED_GAIN=1
20+
-D LORA_TX_POWER=22
1421
; Debug options
1522
; -D DEBUG_RP2040_WIRE=1
1623
; -D DEBUG_RP2040_SPI=1
1724
; -D DEBUG_RP2040_CORE=1
1825
; -D RADIOLIB_DEBUG_SPI=1
1926
; -D DEBUG_RP2040_PORT=Serial
20-
2127
build_src_filter = ${rp2040_base.build_src_filter}
22-
+<helpers/rp2040/XiaoRP2040Board.cpp>
28+
+<XiaoRP2040Board.cpp>
2329
+<../variants/xiao_rp2040>
24-
2530
lib_deps = ${rp2040_base.lib_deps}
2631

2732
[env:Xiao_rp2040_Repeater]

variants/xiao_rp2040/target.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <helpers/radiolib/CustomSX1262Wrapper.h>
88
#include <helpers/radiolib/RadioLibWrappers.h>
99
#include <helpers/SensorManager.h>
10-
#include <helpers/rp2040/XiaoRP2040Board.h>
10+
#include <XiaoRP2040Board.h>
1111

1212
extern XiaoRP2040Board board;
1313
extern WRAPPER_CLASS radio_driver;

0 commit comments

Comments
 (0)