Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: BufferSerial.cpp
- Revision:
- 7:0bc2bc07f2fe
- Parent:
- 6:17e3a28338dc
--- a/BufferSerial.cpp Sat Nov 28 07:48:16 2020 +0000
+++ b/BufferSerial.cpp Wed Dec 02 08:06:45 2020 +0000
@@ -1,7 +1,5 @@
#include "BufferSerial.h"
-Serial pc(USBTX, USBRX);
-
BufferSerial::BufferSerial(PinName tx, PinName rx,int baud,int timeout)
:RawSerial(tx,rx,baud)
{
@@ -36,9 +34,7 @@
size_t index = 0;
while (index < length) {
int c = timedRead();
- //pc.printf("debug_c: %x\n\r",c);
if (c < 0 || c == charactor){
- //pc.printf("break index:%d \n\r",index);
break;
}
*buffer++ = (char)c;
@@ -55,7 +51,6 @@
if (i != _rx_buffer_tail) {
_rx_buffer[_rx_buffer_head] = c;
_rx_buffer_head = i;
- //pc.printf("%x\n\r",c);
}
}
}
@@ -67,7 +62,6 @@
_startMillis = timer.read_ms();
do {
c = read();
- pc.printf("tr: %x \n\r",c);
if (c >= 0) return c;
} while(timer.read_ms() - _startMillis < _timeout);
return -1; // -1 indicates timeout