diff options
author | Matthijs Kooijman <matthijs@stdin.nl> | 2013-06-04 11:19:58 +0200 |
---|---|---|
committer | Matthijs Kooijman <matthijs@stdin.nl> | 2015-01-26 17:03:24 +0100 |
commit | 51b8ed26752caacecb23c75a11c1e1f1b26dea5a (patch) | |
tree | 80e56281f431dae20bb2e1b5b862b2882387a18e | |
parent | 9b291b876868c84d05da2deeb47b03d5e6dd2c2f (diff) |
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).
-rw-r--r-- | libraries/SoftwareSerial/SoftwareSerial.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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));
}
|