mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
clean up xiao nrf52
move variant specific code out of src/helpers redefine RXEN for alternate radio pinout
This commit is contained in:
parent
eb978f1b50
commit
90656e7d06
4 changed files with 5 additions and 7 deletions
|
|
@ -5,20 +5,19 @@
|
||||||
|
|
||||||
#ifdef XIAO_NRF52
|
#ifdef XIAO_NRF52
|
||||||
|
|
||||||
// LoRa radio module pins for Seeed Xiao-nrf52
|
// redefine lora pins if using the S3 variant of SX1262 board
|
||||||
#ifdef SX1262_XIAO_S3_VARIANT
|
#ifdef SX1262_XIAO_S3_VARIANT
|
||||||
#undef P_LORA_DIO_1
|
#undef P_LORA_DIO_1
|
||||||
#undef P_LORA_BUSY
|
#undef P_LORA_BUSY
|
||||||
#undef P_LORA_RESET
|
#undef P_LORA_RESET
|
||||||
#undef P_LORA_NSS
|
#undef P_LORA_NSS
|
||||||
|
#undef SX126X_RXEN
|
||||||
#define P_LORA_DIO_1 D0
|
#define P_LORA_DIO_1 D0
|
||||||
#define P_LORA_BUSY D1
|
#define P_LORA_BUSY D1
|
||||||
#define P_LORA_RESET D2
|
#define P_LORA_RESET D2
|
||||||
#define P_LORA_NSS D3
|
#define P_LORA_NSS D3
|
||||||
|
#define SX126X_RXEN D4
|
||||||
#endif
|
#endif
|
||||||
//#define SX126X_POWER_EN 37
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class XiaoNrf52Board : public mesh::MainBoard {
|
class XiaoNrf52Board : public mesh::MainBoard {
|
||||||
protected:
|
protected:
|
||||||
|
|
@ -50,8 +50,7 @@ build_flags = ${nrf52840_xiao.build_flags}
|
||||||
-D ENV_INCLUDE_INA219=1
|
-D ENV_INCLUDE_INA219=1
|
||||||
build_src_filter = ${nrf52840_xiao.build_src_filter}
|
build_src_filter = ${nrf52840_xiao.build_src_filter}
|
||||||
+<helpers/*.cpp>
|
+<helpers/*.cpp>
|
||||||
+<helpers/sensors>
|
+<helpers/sensors>
|
||||||
+<helpers/nrf52/XiaoNrf52Board.cpp>
|
|
||||||
+<../variants/xiao_nrf52>
|
+<../variants/xiao_nrf52>
|
||||||
debug_tool = jlink
|
debug_tool = jlink
|
||||||
upload_protocol = nrfutil
|
upload_protocol = nrfutil
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
#define RADIOLIB_STATIC_ONLY 1
|
#define RADIOLIB_STATIC_ONLY 1
|
||||||
#include <RadioLib.h>
|
#include <RadioLib.h>
|
||||||
#include <helpers/RadioLibWrappers.h>
|
#include <helpers/RadioLibWrappers.h>
|
||||||
#include <helpers/nrf52/XiaoNrf52Board.h>
|
#include <XiaoNrf52Board.h>
|
||||||
#include <helpers/CustomSX1262Wrapper.h>
|
#include <helpers/CustomSX1262Wrapper.h>
|
||||||
#include <helpers/AutoDiscoverRTCClock.h>
|
#include <helpers/AutoDiscoverRTCClock.h>
|
||||||
#include <helpers/ArduinoHelpers.h>
|
#include <helpers/ArduinoHelpers.h>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue