We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ece0e83 commit cd2120bCopy full SHA for cd2120b
src/libmodbus/modbus.h
@@ -59,12 +59,14 @@ MODBUS_BEGIN_DECLS
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
+#ifndef RS485_SER_CONF_TYPE
+ #if defined(ESP8266)
+ #define RS485_SER_CONF_TYPE SerialConfig
+ #elif defined(ESP32)
+ #define RS485_SER_CONF_TYPE uint32_t
+ #else
68
+ #define RS485_SER_CONF_TYPE uint16_t
69
+ #endif
70
71
72
/* Modbus function codes */
0 commit comments