From 51b8ed26752caacecb23c75a11c1e1f1b26dea5a Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Tue, 4 Jun 2013 11:19:58 +0200 Subject: 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(-) (limited to 'libraries') 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)); } -- cgit v1.2.3-18-g5258