Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
include ModbusIP_ESP8266 only if board is ESP32 or ESP8266
  • Loading branch information
brainelectronics committed Apr 26, 2020
commit 2e4c68572f8079ded1e2f32a061c60350c2ecbb2
6 changes: 5 additions & 1 deletion src/ModbusIP_ESP8266.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
Copyright (C) 2014 Andr� Sarmento Barbosa
2017-2019 Alexander Emelianov ([email protected])
*/
#if defined(ESP32) || defined(ESP8266)

#include "ModbusIP_ESP8266.h"

ModbusIP::ModbusIP() {
Expand Down Expand Up @@ -423,4 +425,6 @@ ModbusIP::~ModbusIP() {
delete client[i];
client[i] = nullptr;
}
}
}

#endif
6 changes: 5 additions & 1 deletion src/ModbusIP_ESP8266.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*/
#pragma once

#if defined(ESP32) || defined(ESP8266)

#include <Modbus.h>
#ifdef ESP8266
#include <ESP8266WiFi.h>
Expand Down Expand Up @@ -123,4 +125,6 @@ class ModbusIP : public Modbus {
uint16_t writeOffset, uint16_t* value, uint16_t numregs = 1,
cbTransaction cb = nullptr, uint8_t unit = MODBUSIP_UNIT);
*/
};
};

#endif