Skip to content

Commit 2a875d9

Browse files
authored
Merge pull request #192 from fdlamotte/prevent-errors-when-built-against-XiaoNrf52Board-by-error
compiles xiao_nrf52 board files only if we compile for xiao_nrf52
2 parents 5848080 + b4330e3 commit 2a875d9

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/helpers/nrf52/XiaoNrf52Board.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#ifdef XIAO_NRF52
2+
13
#include <Arduino.h>
24
#include "XiaoNrf52Board.h"
35

@@ -89,3 +91,5 @@ bool XiaoNrf52Board::startOTAUpdate(const char* id, char reply[]) {
8991

9092
return false;
9193
}
94+
95+
#endif

src/helpers/nrf52/XiaoNrf52Board.h

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

6+
#ifdef XIAO_NRF52
7+
68
// LoRa radio module pins for Seeed Xiao-nrf52
79
#ifdef SX1262_XIAO_S3_VARIANT
810
#define P_LORA_DIO_1 D0
@@ -73,3 +75,5 @@ class XiaoNrf52Board : public mesh::MainBoard {
7375

7476
bool startOTAUpdate(const char* id, char reply[]) override;
7577
};
78+
79+
#endif

0 commit comments

Comments
 (0)