diff options
author | Matthijs Kooijman <matthijs@stdin.nl> | 2013-06-13 10:26:15 +0200 |
---|---|---|
committer | Matthijs Kooijman <matthijs@stdin.nl> | 2015-01-26 17:03:25 +0100 |
commit | cf0cc48d9a8de84fabb44e644dcac6a3f8afc66c (patch) | |
tree | 8e06494cdc88138c332d99c479e46bbbfa1257cf /libraries/SoftwareSerial | |
parent | 11ade32f20ce2779d99981947eac6b5c4e52f408 (diff) |
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.
Diffstat (limited to 'libraries/SoftwareSerial')
-rw-r--r-- | libraries/SoftwareSerial/SoftwareSerial.cpp | 3 |
1 files changed, 1 insertions, 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();
}
|