Skip to content

Commit 90656e7

Browse files
committed
clean up xiao nrf52
move variant specific code out of src/helpers redefine RXEN for alternate radio pinout
1 parent eb978f1 commit 90656e7

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,19 @@
55

66
#ifdef XIAO_NRF52
77

8-
// LoRa radio module pins for Seeed Xiao-nrf52
8+
// redefine lora pins if using the S3 variant of SX1262 board
99
#ifdef SX1262_XIAO_S3_VARIANT
1010
#undef P_LORA_DIO_1
1111
#undef P_LORA_BUSY
1212
#undef P_LORA_RESET
1313
#undef P_LORA_NSS
14+
#undef SX126X_RXEN
1415
#define P_LORA_DIO_1 D0
1516
#define P_LORA_BUSY D1
1617
#define P_LORA_RESET D2
1718
#define P_LORA_NSS D3
19+
#define SX126X_RXEN D4
1820
#endif
19-
//#define SX126X_POWER_EN 37
20-
21-
2221

2322
class XiaoNrf52Board : public mesh::MainBoard {
2423
protected:

variants/xiao_nrf52/platformio.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ build_flags = ${nrf52840_xiao.build_flags}
5050
-D ENV_INCLUDE_INA219=1
5151
build_src_filter = ${nrf52840_xiao.build_src_filter}
5252
+<helpers/*.cpp>
53-
+<helpers/sensors>
54-
+<helpers/nrf52/XiaoNrf52Board.cpp>
53+
+<helpers/sensors>
5554
+<../variants/xiao_nrf52>
5655
debug_tool = jlink
5756
upload_protocol = nrfutil

variants/xiao_nrf52/target.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#define RADIOLIB_STATIC_ONLY 1
44
#include <RadioLib.h>
55
#include <helpers/RadioLibWrappers.h>
6-
#include <helpers/nrf52/XiaoNrf52Board.h>
6+
#include <XiaoNrf52Board.h>
77
#include <helpers/CustomSX1262Wrapper.h>
88
#include <helpers/AutoDiscoverRTCClock.h>
99
#include <helpers/ArduinoHelpers.h>

0 commit comments

Comments
 (0)