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).
This commit is contained in:
parent
b3b1f8e9d0
commit
25b7c2e448
|
@ -418,7 +418,7 @@ void SoftwareSerial::begin(long speed)
|
||||||
|
|
||||||
void SoftwareSerial::end()
|
void SoftwareSerial::end()
|
||||||
{
|
{
|
||||||
if (digitalPinToPCMSK(_receivePin))
|
if (_rx_delay_stopbit)
|
||||||
*digitalPinToPCMSK(_receivePin) &= ~_BV(digitalPinToPCMSKbit(_receivePin));
|
*digitalPinToPCMSK(_receivePin) &= ~_BV(digitalPinToPCMSKbit(_receivePin));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue