BufferedSerial for NUCLEO-F446RE forked from Veysel KARADAG and Sam Grove

Dependencies:   Buffer

Dependents:   Lab05_buffered_serial Lab05_Xbee_receive

Revision:
11:ea5ad8e00c99
Parent:
10:9ee15ae3d1a3
diff -r 9ee15ae3d1a3 -r ea5ad8e00c99 BufferedSerial.cpp
--- a/BufferedSerial.cpp	Wed Jan 07 18:37:11 2015 +0000
+++ b/BufferedSerial.cpp	Wed Feb 18 13:40:14 2015 +0000
@@ -71,7 +71,7 @@
         while(*(ptr) != 0) {
             _txbuf = *(ptr++);
         }
-        _txbuf = '\n';  // done per puts definition
+       // _txbuf = '\n';  // done per puts definition
         BufferedSerial::prime();
     
         return (ptr - s) + 1;
@@ -117,6 +117,13 @@
 }
 
 
+void BufferedSerial::clear(void)
+{
+    _rxbuf.clear();  // note: look if things are in the buffer
+}
+
+
+
 void BufferedSerial::rxIrq(void)
 {
     // read from the peripheral and make sure something is available