Use bit_is_clear in HardwareSerial::flush()
This is slightly more clear than the previous explicit comparison.
This commit is contained in:
parent
fd83a310c2
commit
9b35339953
|
@ -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…
Reference in New Issue