Skip to content

Commit cd2120b

Browse files
committed
better define
1 parent ece0e83 commit cd2120b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/libmodbus/modbus.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,14 @@ MODBUS_BEGIN_DECLS
5959
#endif
6060

6161
/* 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
62+
#ifndef RS485_SER_CONF_TYPE
63+
#if defined(ESP8266)
64+
#define RS485_SER_CONF_TYPE SerialConfig
65+
#elif defined(ESP32)
66+
#define RS485_SER_CONF_TYPE uint32_t
67+
#else
68+
#define RS485_SER_CONF_TYPE uint16_t
69+
#endif
6870
#endif
6971

7072
/* Modbus function codes */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy