1
0
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:
Matthijs Kooijman 2013-04-18 20:20:03 +02:00 committed by Cristian Maglie
parent 03fac844a8
commit 722675bd1f

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