Skip to content

Commit fdd4d8a

Browse files
authored
Merge pull request #2989 from rgregg/fix-nrf52-ethernet-build
Fix nRF52 builds broken by unconditional RAK Ethernet include
2 parents 8c987c8 + cc22133 commit fdd4d8a

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/helpers/nrf52/SerialEthernetInterface.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#ifdef ETHERNET_ENABLED
2+
13
#include "SerialEthernetInterface.h"
24
#include "EthernetMac.h"
35
#include <SPI.h>
@@ -262,3 +264,5 @@ bool SerialEthernetInterface::isConnected() const {
262264
void SerialEthernetInterface::loop() {
263265
Ethernet.maintain();
264266
}
267+
268+
#endif // ETHERNET_ENABLED

src/helpers/nrf52/SerialEthernetInterface.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#pragma once
22

3+
#ifdef ETHERNET_ENABLED
4+
35
#include "helpers/BaseSerialInterface.h"
46
#include <SPI.h>
57
#include <RAK13800_W5100S.h>
@@ -76,3 +78,5 @@ class SerialEthernetInterface : public BaseSerialInterface {
7678
#define ETHERNET_DEBUG_PRINTLN(...) {}
7779
#define ETHERNET_DEBUG_PRINT_IP(...) {}
7880
#endif
81+
82+
#endif // ETHERNET_ENABLED

0 commit comments

Comments
 (0)