Skip to content

Commit 51b8ed2

Browse files
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).
1 parent 9b291b8 commit 51b8ed2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/SoftwareSerial/SoftwareSerial.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ void SoftwareSerial::begin(long speed)
418418

419419
void SoftwareSerial::end()
420420
{
421-
if (digitalPinToPCMSK(_receivePin))
421+
if (_rx_delay_stopbit)
422422
*digitalPinToPCMSK(_receivePin) &= ~_BV(digitalPinToPCMSKbit(_receivePin));
423423
}
424424

0 commit comments

Comments
 (0)