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 #else
DccProcState.ExtIntMask = 1; DccProcState.ExtIntMask = 1;
#endif #endif
pinMode( ExtIntPinNum, INPUT ); pinMode( ExtIntPinNum, EnablePullup ? INPUT_PULLUP : INPUT );
if( EnablePullup )
digitalWrite(ExtIntPinNum, HIGH);
} }
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////

View File

@@ -57,7 +57,7 @@
#ifndef NMRADCC_IS_IN #ifndef NMRADCC_IS_IN
#define NMRADCC_IS_IN #define NMRADCC_IS_IN
#define NMRADCC_VERSION 205 // Version 2.0.5 #define NMRADCC_VERSION 206 // Version 2.0.6
#define MAX_DCC_MESSAGE_LEN 6 // including XOR-Byte #define MAX_DCC_MESSAGE_LEN 6 // including XOR-Byte

View File

@@ -1,5 +1,5 @@
name=NmraDcc name=NmraDcc
version=2.0.5 version=2.0.6
author=Alex Shepherd, Wolfgang Kuffer, Geoff Bunza, Martin Pischky, Franz-Peter Müller, Sven (littleyoda), Hans Tanner author=Alex Shepherd, Wolfgang Kuffer, Geoff Bunza, Martin Pischky, Franz-Peter Müller, Sven (littleyoda), Hans Tanner
maintainer=Alex Shepherd <kiwi64ajs@gmail.com> maintainer=Alex Shepherd <kiwi64ajs@gmail.com>
sentence=Enables NMRA DCC Communication sentence=Enables NMRA DCC Communication