mirror of
https://github.com/thelsing/knx.git
synced 2025-04-23 01:16:29 +02:00
fix: only set pinMode of Prog button pin when pin is >= 0 and isr function is defined
otherwise it is useless anyway and causes warnings.
This commit is contained in:
parent
e69f63611a
commit
12fb67cc63
@ -286,10 +286,10 @@ template <class P, class B> class KnxFacade : private SaveRestore
|
|||||||
pinMode(ledPin(), OUTPUT);
|
pinMode(ledPin(), OUTPUT);
|
||||||
|
|
||||||
progLedOff();
|
progLedOff();
|
||||||
pinMode(buttonPin(), INPUT_PULLUP);
|
|
||||||
|
|
||||||
if (_progButtonISRFuncPtr && _buttonPin >= 0)
|
if (_progButtonISRFuncPtr && _buttonPin >= 0)
|
||||||
{
|
{
|
||||||
|
pinMode(buttonPin(), INPUT_PULLUP);
|
||||||
// Workaround for https://github.com/arduino/ArduinoCore-samd/issues/587
|
// Workaround for https://github.com/arduino/ArduinoCore-samd/issues/587
|
||||||
#if (ARDUINO_API_VERSION >= 10200)
|
#if (ARDUINO_API_VERSION >= 10200)
|
||||||
attachInterrupt(_buttonPin, _progButtonISRFuncPtr, (PinStatus)CHANGE);
|
attachInterrupt(_buttonPin, _progButtonISRFuncPtr, (PinStatus)CHANGE);
|
||||||
|
Loading…
Reference in New Issue
Block a user