We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cffd690 commit ece0e83Copy full SHA for ece0e83
library.properties
@@ -8,4 +8,4 @@ category=Communication
8
url=https://www.arduino.cc/en/ArduinoModbus/ArduinoModbus
9
architectures=*
10
includes=ArduinoModbus.h
11
-depends=mostafahk/ArduinoRS485
+depends=ArduinoRS485
src/libmodbus/modbus.h
@@ -58,6 +58,15 @@ MODBUS_BEGIN_DECLS
58
#define ON 1
59
#endif
60
61
+/* ESP8266 / ESP32 compatibility */
62
+#if defined(ESP8266)
63
+#define RS485_SER_CONF_TYPE SerialConfig
64
+#elif defined(ESP32)
65
+#define RS485_SER_CONF_TYPE uint32_t
66
+#else
67
+#define RS485_SER_CONF_TYPE uint16_t
68
+#endif
69
+
70
/* Modbus function codes */
71
#define MODBUS_FC_READ_COILS 0x01
72
#define MODBUS_FC_READ_DISCRETE_INPUTS 0x02
0 commit comments