From 25b7c2e448199d8d39c52ce598450c3ff00601be 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). --- libraries/SoftwareSerial/SoftwareSerial.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/SoftwareSerial/SoftwareSerial.cpp b/libraries/SoftwareSerial/SoftwareSerial.cpp index 605c788..ac9e30b 100644 --- a/libraries/SoftwareSerial/SoftwareSerial.cpp +++ b/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)); }