Skip to content

Commit 72cdb70

Browse files
committed
Update macro conditions for ESP8266 and ESP32 ####
Modify `min` and `max` macro definitions in `MySensors.h` to exclude ESP8266 and ESP32 architectures. This change prevents potential redefinition errors or conflicts when compiling for these specific architectures.
1 parent a2c0c46 commit 72cdb70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

MySensors.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@
9696
#define _BV(x) (1<<(x)) //!< _BV
9797
#endif
9898

99-
#if !defined(min) && !defined(__linux__)
99+
#if !defined(min) && !defined(__linux__) && !defined(ARDUINO_ARCH_ESP8266) && !defined(ARDUINO_ARCH_ESP32)
100100
#define min(a,b) ((a)<(b)?(a):(b)) //!< min
101101
#endif
102102

103-
#if !defined(max) && !defined(__linux__)
103+
#if !defined(max) && !defined(__linux__) && !defined(ARDUINO_ARCH_ESP8266) && !defined(ARDUINO_ARCH_ESP32)
104104
#define max(a,b) ((a)>(b)?(a):(b)) //!< max
105105
#endif
106106

0 commit comments

Comments
 (0)