mirror of
				https://github.com/thelsing/knx.git
				synced 2025-10-26 10:26:25 +01: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); | ||||
| 
 | ||||
|         progLedOff(); | ||||
|         pinMode(buttonPin(), INPUT_PULLUP); | ||||
| 
 | ||||
|          | ||||
|         if (_progButtonISRFuncPtr && _buttonPin >= 0) | ||||
|         { | ||||
|             pinMode(buttonPin(), INPUT_PULLUP); | ||||
|             // Workaround for https://github.com/arduino/ArduinoCore-samd/issues/587
 | ||||
|             #if (ARDUINO_API_VERSION >= 10200) | ||||
|                 attachInterrupt(_buttonPin, _progButtonISRFuncPtr, (PinStatus)CHANGE); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user