Fix ambiguous call to attachInterrupt (#118)

* Fix ambiguous call to attachInterrupt
in new SAMD arduino core

* select attachInterrupt
signature based on Arduino version
This commit is contained in:
rueckix 2021-01-08 14:06:13 +01:00 committed by GitHub
parent 73df7fd28c
commit d46b51fd4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -222,7 +222,12 @@ template <class P, class B> class KnxFacade : private SaveRestore
pinMode(_buttonPin, INPUT_PULLUP);
attachInterrupt(_buttonPin, buttonUp, _buttonPinInterruptOn);
// Workaround for https://github.com/arduino/ArduinoCore-samd/issues/587
#if (ARDUINO_API_VERSION >= 10200)
attachInterrupt(_buttonPin, buttonUp, (PinStatus)_buttonPinInterruptOn);
#else
attachInterrupt(_buttonPin, buttonUp, _buttonPinInterruptOn);
#endif
enabled(true);
}