mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
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.
This commit is contained in:
parent
f3aa5f23c4
commit
6685aa999c
@ -442,8 +442,7 @@ void SoftwareSerial::setRxIntMsk(bool enable)
|
|||||||
|
|
||||||
void SoftwareSerial::end()
|
void SoftwareSerial::end()
|
||||||
{
|
{
|
||||||
if (_rx_delay_stopbit)
|
stopListening();
|
||||||
setRxIntMsk(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user