mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
Use bit_is_clear in HardwareSerial::flush()
This is slightly more clear than the previous explicit comparison.
This commit is contained in:
parent
03fac844a8
commit
722675bd1f
@ -332,7 +332,7 @@ int HardwareSerial::read(void)
|
||||
void HardwareSerial::flush()
|
||||
{
|
||||
// UDR is kept full while the buffer is not empty, so TXC triggers when EMPTY && SENT
|
||||
while (transmitting && ! (*_ucsra & _BV(TXC0)));
|
||||
while (transmitting && bit_is_clear(*_ucsra, TXC0));
|
||||
transmitting = false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user