mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-19 13:54:23 +01:00
Let SoftwareSerial::listen() fail on invalid rx baud rates
In this case, SoftwareSerial::begin will not have enabled the interrupts, so better not allow the SoftwareSerial instance to enter the listening state either.
This commit is contained in:
parent
937cc51c69
commit
b1c7a3d05f
@ -178,6 +178,9 @@ inline void SoftwareSerial::tunedDelay(uint16_t delay) {
|
||||
// one and returns true if it replaces another
|
||||
bool SoftwareSerial::listen()
|
||||
{
|
||||
if (!_rx_delay_stopbit)
|
||||
return false;
|
||||
|
||||
if (active_object != this)
|
||||
{
|
||||
_buffer_overflow = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user