mirror of
https://github.com/thelsing/knx.git
synced 2025-01-21 00:05:43 +01:00
Add support for lambda for more platforms (#74)
* Fix Stm32 Eeprom handler Fix missing parenthesis Fix some type consistencies * Fix #73 Add ability to override config.h with define NO_KNX_CONFIG * change tabs to space * coding style * Allow lambda on platforms which support it, can be forced with HAS_FUNCTIONAL 0/1 * remove automatic detection of functional due to breakage with some platforms: In file included from /home/travis/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/char_traits.h:39:0, from /home/travis/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/string:40, from /home/travis/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/stdexcept:39, from /home/travis/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/array:39, from /home/travis/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/tuple:39, from /home/travis/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/functional:54, from /home/travis/arduino_ide/libraries/Adafruit_Test_Library/src/knx/group_object.h:37, from /home/travis/arduino_ide/libraries/Adafruit_Test_Library/src/knx/group_object_table_object.h:4, from /home/travis/arduino_ide/libraries/Adafruit_Test_Library/src/knx/bau_systemB.h:8, from /home/travis/arduino_ide/libraries/Adafruit_Test_Library/src/knx/bau07B0.h:4, from /home/travis/arduino_ide/libraries/Adafruit_Test_Library/src/knx_facade.h:12, from /home/travis/arduino_ide/libraries/Adafruit_Test_Library/src/knx.h:86, from /home/travis/build/thelsing/knx/examples/knx-bme680/knx-bme680.ino:4: /home/travis/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2 min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /home/travis/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/c++/7.2.1/bits/stl_algobase.h:265:56: error: macro "max" passed 3 arguments, but takes just 2 max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ To be investigated... Co-authored-by: etrinh <etrinh@zdionline.net>
This commit is contained in:
parent
f880114da5
commit
fda8e64425
@ -19,7 +19,15 @@ enum ComFlag
|
||||
|
||||
class GroupObject;
|
||||
|
||||
#ifdef __linux__
|
||||
#ifndef HAS_FUNCTIONAL
|
||||
# if defined(__linux__) || defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_STM32)
|
||||
# define HAS_FUNCTIONAL 1
|
||||
# else
|
||||
# define HAS_FUNCTIONAL 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if HAS_FUNCTIONAL
|
||||
#include <functional>
|
||||
typedef std::function<void(GroupObject&)> GroupObjectUpdatedHandler;
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user