Changed how INPUT_PULLUP is done to be compatibile with ESP32

Bumped version to 2.0.6
This commit is contained in:
Alex Shepherd
2020-10-20 09:42:00 +13:00
parent a09c6b1002
commit 7e3b3e3469
3 changed files with 3 additions and 5 deletions

View File

@@ -1530,9 +1530,7 @@ void NmraDcc::pin( uint8_t ExtIntNum, uint8_t ExtIntPinNum, uint8_t EnablePullup
#else
DccProcState.ExtIntMask = 1;
#endif
pinMode( ExtIntPinNum, INPUT );
if( EnablePullup )
digitalWrite(ExtIntPinNum, HIGH);
pinMode( ExtIntPinNum, EnablePullup ? INPUT_PULLUP : INPUT );
}
////////////////////////////////////////////////////////////////////////