Skip to content

Commit

Permalink
Update macro conditions for ESP8266 and ESP32 ####
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
virtual-maker committed Jan 2, 2025
1 parent a2c0c46 commit 72cdb70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MySensors.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@
#define _BV(x) (1<<(x)) //!< _BV
#endif

#if !defined(min) && !defined(__linux__)
#if !defined(min) && !defined(__linux__) && !defined(ARDUINO_ARCH_ESP8266) && !defined(ARDUINO_ARCH_ESP32)
#define min(a,b) ((a)<(b)?(a):(b)) //!< min
#endif

#if !defined(max) && !defined(__linux__)
#if !defined(max) && !defined(__linux__) && !defined(ARDUINO_ARCH_ESP8266) && !defined(ARDUINO_ARCH_ESP32)
#define max(a,b) ((a)>(b)?(a):(b)) //!< max
#endif

Expand Down

0 comments on commit 72cdb70

Please sign in to comment.