From cf0cc48d9a8de84fabb44e644dcac6a3f8afc66c Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Thu, 13 Jun 2013 10:26:15 +0200 Subject: Use stopListening() in SoftwareSerial::end() stopListening also disabled the interrupt, if needed, so calling that function makes more sense. Since stopListening only disables the interrupt when the current SoftwareSerial is the active object, and that can only be the case when _rx_delay_stopbit is non-zero, there is no need to separately check _rx_delay_stopbit anymore. --- libraries/SoftwareSerial/SoftwareSerial.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libraries/SoftwareSerial/SoftwareSerial.cpp b/libraries/SoftwareSerial/SoftwareSerial.cpp index b98451f..0e70cb7 100644 --- a/libraries/SoftwareSerial/SoftwareSerial.cpp +++ b/libraries/SoftwareSerial/SoftwareSerial.cpp @@ -442,8 +442,7 @@ void SoftwareSerial::setRxIntMsk(bool enable) void SoftwareSerial::end() { - if (_rx_delay_stopbit) - setRxIntMsk(false); + stopListening(); } -- cgit v1.2.3-18-g5258