From 1704e7e820c78f38153e55b9ea3cc991095e9a57 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Tue, 4 Jun 2013 11:19:58 +0200 Subject: [PATCH] Let SoftwareSerial::end also check against _rx_delay_stopbit The current check is still always false when the old check was, but additionally it will not disable the interrupts when they were never enabled (which shouldn't matter much, but this is more consistent). --- .../arduino/avr/libraries/SoftwareSerial/SoftwareSerial.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware/arduino/avr/libraries/SoftwareSerial/SoftwareSerial.cpp b/hardware/arduino/avr/libraries/SoftwareSerial/SoftwareSerial.cpp index 605c78840..ac9e30b8f 100644 --- a/hardware/arduino/avr/libraries/SoftwareSerial/SoftwareSerial.cpp +++ b/hardware/arduino/avr/libraries/SoftwareSerial/SoftwareSerial.cpp @@ -418,7 +418,7 @@ void SoftwareSerial::begin(long speed) void SoftwareSerial::end() { - if (digitalPinToPCMSK(_receivePin)) + if (_rx_delay_stopbit) *digitalPinToPCMSK(_receivePin) &= ~_BV(digitalPinToPCMSKbit(_receivePin)); }