From bd194db4e317feaf6498cdece2fe7d893ae03403 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Thu, 18 Apr 2013 20:20:03 +0200 Subject: Use bit_is_clear in HardwareSerial::flush() This is slightly more clear than the previous explicit comparison. --- cores/arduino/HardwareSerial.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cores/arduino/HardwareSerial.cpp') diff --git a/cores/arduino/HardwareSerial.cpp b/cores/arduino/HardwareSerial.cpp index 6bbef7a..806fe5f 100644 --- a/cores/arduino/HardwareSerial.cpp +++ b/cores/arduino/HardwareSerial.cpp @@ -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; } -- cgit v1.2.3-18-g5258