diff options
author | Matthijs Kooijman <matthijs@stdin.nl> | 2013-04-18 20:20:03 +0200 |
---|---|---|
committer | Cristian Maglie <c.maglie@bug.st> | 2014-01-22 09:37:44 +0100 |
commit | bd194db4e317feaf6498cdece2fe7d893ae03403 (patch) | |
tree | a7b55ef47751cc3d4eb1a92a85ca8a5530774c1b /cores/arduino | |
parent | 80d6af62730f11f9f23ec7a14d69bc6cfa01dd03 (diff) |
Use bit_is_clear in HardwareSerial::flush()
This is slightly more clear than the previous explicit comparison.
Diffstat (limited to 'cores/arduino')
-rw-r--r-- | cores/arduino/HardwareSerial.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |