File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -376,15 +376,13 @@ void SoftwareSerial::setRX(uint8_t rx)
376376// Public methods
377377//
378378
379- bool SoftwareSerial::begin (long speed)
379+ void SoftwareSerial::begin (long speed)
380380{
381381 _rx_delay_centering = _rx_delay_intrabit = _rx_delay_stopbit = _tx_delay = 0 ;
382382
383- long baud = 0 ;
384-
385383 for (unsigned i=0 ; i<sizeof (table)/sizeof (table[0 ]); ++i)
386384 {
387- baud = pgm_read_dword (&table[i].baud );
385+ long baud = pgm_read_dword (&table[i].baud );
388386 if (baud == speed)
389387 {
390388 _rx_delay_centering = pgm_read_word (&table[i].rx_delay_centering );
@@ -394,7 +392,6 @@ bool SoftwareSerial::begin(long speed)
394392 break ;
395393 }
396394 }
397- if (baud != speed) return false ;
398395
399396 // Set up RX interrupts, but only if we have a valid RX baud rate
400397 if (_rx_delay_stopbit)
@@ -413,8 +410,6 @@ bool SoftwareSerial::begin(long speed)
413410#endif
414411
415412 listen ();
416-
417- return true ;
418413}
419414
420415void SoftwareSerial::end ()
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ class SoftwareSerial : public Stream
8282 // public methods
8383 SoftwareSerial (uint8_t receivePin, uint8_t transmitPin, bool inverse_logic = false );
8484 ~SoftwareSerial ();
85- bool begin (long speed);
85+ void begin (long speed);
8686 bool listen ();
8787 void end ();
8888 bool isListening () { return this == active_object; }
You can’t perform that action at this time.
0 commit comments