Skip to content

Commit 1704e7e

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 b1c7a3d commit 1704e7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hardware/arduino/avr/libraries/SoftwareSerial/SoftwareSerial.cpp

Lines changed: 1 addition & 1 deletion
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)