From 4784789474114697f07be33f5fe31dc32178ad12 Mon Sep 17 00:00:00 2001 From: nucho Date: Sun, 13 May 2012 17:49:43 +0900 Subject: added inverse logic mode --- src/core/SoftwareSerial.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/SoftwareSerial.cpp b/src/core/SoftwareSerial.cpp index a49dc4b..e69c459 100755 --- a/src/core/SoftwareSerial.cpp +++ b/src/core/SoftwareSerial.cpp @@ -186,10 +186,11 @@ void SoftwareSerial::setTX(uint8_t tx) { void SoftwareSerial::setRX(uint8_t rx) { if (rx >= 0) { + pinMode(rx, INPUT); if (!_inverse_logic) { - //TODO:pin pullup + digitalWrite(rx, HIGH);//rx pin is pull up } else { - //TODO:pin pulldown + digitalWrite(rx, LOW);//rx pin is inactive } } _receivePin = rx; -- cgit v1.2.3