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
4d3ccb4118
commit
9b291b8768
|
@ -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…
Reference in New Issue