File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -487,6 +487,11 @@ int HardwareSerial::availableForWrite(void)
487
487
return tail - head - 1 ;
488
488
}
489
489
490
+ void HardwareSerial::flush ()
491
+ {
492
+ flush (0 );
493
+ }
494
+
490
495
void HardwareSerial::flush (uint32_t timeout)
491
496
{
492
497
// If we have never written a byte, no need to flush. This special
@@ -642,7 +647,7 @@ void HardwareSerial::enableHalfDuplexRx(void)
642
647
if (isHalfDuplex ()) {
643
648
// In half-duplex mode we have to wait for all TX characters to
644
649
// be transmitted before we can receive data.
645
- flush ();
650
+ flush (0 );
646
651
if (!_rx_enabled) {
647
652
_rx_enabled = true ;
648
653
uart_enable_rx (&_serial);
Original file line number Diff line number Diff line change @@ -125,7 +125,8 @@ class HardwareSerial : public Stream {
125
125
virtual int peek (void );
126
126
virtual int read (void );
127
127
int availableForWrite (void );
128
- virtual void flush (uint32_t timeout = 0 );
128
+ virtual void flush ();
129
+ void flush (uint32_t timeout = 0 );
129
130
virtual size_t write (uint8_t );
130
131
inline size_t write (unsigned long n)
131
132
{
You can’t perform that action at this time.
0 commit comments