Use bit_is_clear in HardwareSerial::flush()

This is slightly more clear than the previous explicit comparison.
This commit is contained in:
Matthijs Kooijman 2013-04-18 20:20:03 +02:00 committed by Cristian Maglie
parent 80d6af6273
commit bd194db4e3
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}