aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/HardwareSerial.cpp
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@arduino.cc>2015-08-14 13:37:00 +0200
committerCristian Maglie <c.maglie@arduino.cc>2015-08-14 13:37:00 +0200
commit621580d83bcd60c8858e199095d2ca014e2123b2 (patch)
treec2de4c4155502abf611cc64cf1778527ab57cc34 /cores/arduino/HardwareSerial.cpp
parentb3197c6ef83253d712f4b7b30a0763f18f6d3ddc (diff)
parent3baff3b4114f28cd6ae0bfbb25d4efeb6f03278b (diff)
Merge branch 'cdc-settings' of https://github.com/matthijskooijman/Arduino
Diffstat (limited to 'cores/arduino/HardwareSerial.cpp')
-rw-r--r--cores/arduino/HardwareSerial.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/cores/arduino/HardwareSerial.cpp b/cores/arduino/HardwareSerial.cpp
index a2029a8..5cd89e5 100644
--- a/cores/arduino/HardwareSerial.cpp
+++ b/cores/arduino/HardwareSerial.cpp
@@ -138,8 +138,7 @@ void HardwareSerial::begin(unsigned long baud, byte config)
void HardwareSerial::end()
{
// wait for transmission of outgoing data
- while (_tx_buffer_head != _tx_buffer_tail)
- ;
+ flush();
cbi(*_ucsrb, RXEN0);
cbi(*_ucsrb, TXEN0);