Skip to content

Commit 722675b

Browse files
matthijskooijmancmaglie
authored andcommitted
Use bit_is_clear in HardwareSerial::flush()
This is slightly more clear than the previous explicit comparison.
1 parent 03fac84 commit 722675b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hardware/arduino/avr/cores/arduino/HardwareSerial.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ int HardwareSerial::read(void)
332332
void HardwareSerial::flush()
333333
{
334334
// UDR is kept full while the buffer is not empty, so TXC triggers when EMPTY && SENT
335-
while (transmitting && ! (*_ucsra & _BV(TXC0)));
335+
while (transmitting && bit_is_clear(*_ucsra, TXC0));
336336
transmitting = false;
337337
}
338338

0 commit comments

Comments
 (0)