Skip to content

Commit 5ca2591

Browse files
committed
ModbusEthernet: ESP32 fix
1 parent 99e2145 commit 5ca2591

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ModbusEthernet.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
#if defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_X8)
1414
#define MODBUS_ETH_WRAP_ACCEPT
1515
#undef MODBUS_ETH_WRAP_BEGIN
16+
#elif defined(ESP32)
17+
#undef MODBUS_ETH_WRAP_ACCEPT
18+
#define MODBUS_ETH_WRAP_BEGIN
1619
#else
1720
#undef MODBUS_ETH_WRAP_ACCEPT
1821
#undef MODBUS_ETH_WRAP_BEGIN
@@ -25,7 +28,7 @@ class EthernetServerWrapper : public EthernetServer {
2528
}
2629
#if defined(MODBUS_ETH_WRAP_BEGIN)
2730
void begin(uint16_t port=0) {
28-
31+
EthernetServer::begin();
2932
}
3033
#endif
3134
#if defined(MODBUS_ETH_WRAP_ACCEPT)

0 commit comments

Comments
 (0)