File tree 2 files changed +3
-8
lines changed 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)
376
376
// Public methods
377
377
//
378
378
379
- bool SoftwareSerial::begin (long speed)
379
+ void SoftwareSerial::begin (long speed)
380
380
{
381
381
_rx_delay_centering = _rx_delay_intrabit = _rx_delay_stopbit = _tx_delay = 0 ;
382
382
383
- long baud = 0 ;
384
-
385
383
for (unsigned i=0 ; i<sizeof (table)/sizeof (table[0 ]); ++i)
386
384
{
387
- baud = pgm_read_dword (&table[i].baud );
385
+ long baud = pgm_read_dword (&table[i].baud );
388
386
if (baud == speed)
389
387
{
390
388
_rx_delay_centering = pgm_read_word (&table[i].rx_delay_centering );
@@ -394,7 +392,6 @@ bool SoftwareSerial::begin(long speed)
394
392
break ;
395
393
}
396
394
}
397
- if (baud != speed) return false ;
398
395
399
396
// Set up RX interrupts, but only if we have a valid RX baud rate
400
397
if (_rx_delay_stopbit)
@@ -413,8 +410,6 @@ bool SoftwareSerial::begin(long speed)
413
410
#endif
414
411
415
412
listen ();
416
-
417
- return true ;
418
413
}
419
414
420
415
void SoftwareSerial::end ()
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ class SoftwareSerial : public Stream
82
82
// public methods
83
83
SoftwareSerial (uint8_t receivePin, uint8_t transmitPin, bool inverse_logic = false );
84
84
~SoftwareSerial ();
85
- bool begin (long speed);
85
+ void begin (long speed);
86
86
bool listen ();
87
87
void end ();
88
88
bool isListening () { return this == active_object; }
You can’t perform that action at this time.
0 commit comments