Use bit_is_clear in HardwareSerial::flush()
This is slightly more clear than the previous explicit comparison.
This commit is contained in:
parent
80d6af6273
commit
bd194db4e3
|
@ -332,7 +332,7 @@ int HardwareSerial::read(void)
|
||||||
void HardwareSerial::flush()
|
void HardwareSerial::flush()
|
||||||
{
|
{
|
||||||
// UDR is kept full while the buffer is not empty, so TXC triggers when EMPTY && SENT
|
// 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;
|
transmitting = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue