Skip to content

Commit 8405d1f

Browse files
authored
Adding std::function support for SAMD (#113)
1 parent f3751b6 commit 8405d1f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/knx/bits.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,12 @@ enum ParameterFloatEncodings
9898
Float_Enc_DPT9 = 0, // 2 Byte. See Chapter 3.7.2 section 3.10 (Datapoint Types 2-Octet Float Value)
9999
Float_Enc_IEEE754Single = 1, // 4 Byte. C++ float
100100
Float_Enc_IEEE754Double = 2, // 8 Byte. C++ double
101-
};
101+
};
102+
103+
104+
#if defined(ARDUINO_ARCH_SAMD)
105+
// temporary undef until framework-arduino-samd > 1.8.9 is released. See https://github.com/arduino/ArduinoCore-samd/pull/399 for a PR should will probably address this
106+
#undef max
107+
#undef min
108+
// end of temporary undef
109+
#endif

src/knx/group_object.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ enum ComFlag
2020
class GroupObject;
2121

2222
#ifndef HAS_FUNCTIONAL
23-
# if defined(__linux__) || defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_STM32)
23+
# if defined(__linux__) || defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_STM32) || defined (ARDUINO_ARCH_SAMD)
2424
# define HAS_FUNCTIONAL 1
2525
# else
2626
# define HAS_FUNCTIONAL 0

0 commit comments

Comments
 (0)