aboutsummaryrefslogtreecommitdiffstats
path: root/wirish/comm
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2010-07-15 23:34:23 -0400
committerbnewbold <bnewbold@robocracy.org>2010-07-19 00:38:00 -0400
commit432cf91f7d61b3d0642609a33c683388de626e32 (patch)
treef2e496e82d57a9f5fc3323386910f1942e0e5f4e /wirish/comm
parenta852f8d6a62d5e94afd7092c64c242ab4d5a1c60 (diff)
downloadlibrambutan-432cf91f7d61b3d0642609a33c683388de626e32.tar.gz
librambutan-432cf91f7d61b3d0642609a33c683388de626e32.zip
added Serial.flush()
Diffstat (limited to 'wirish/comm')
-rw-r--r--wirish/comm/HardwareSerial.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/wirish/comm/HardwareSerial.cpp b/wirish/comm/HardwareSerial.cpp
index 93cf909..fc0d01e 100644
--- a/wirish/comm/HardwareSerial.cpp
+++ b/wirish/comm/HardwareSerial.cpp
@@ -101,6 +101,10 @@ void HardwareSerial::end(void) {
usart_disable(usartNum);
}
+void HardwareSerial::flush(void) {
+ usart_clear_buffer(usartNum);
+}
+
HardwareSerial Serial1(1);
HardwareSerial Serial2(2);
HardwareSerial Serial3(3);