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.
Fork of MTS-Serial by
Diff: MTSSerialFlowControl.cpp
- Revision:
- 12:e12b79a4ab4f
- Parent:
- 10:b18a1064dfc6
diff -r 4afbbafcd6b3 -r e12b79a4ab4f MTSSerialFlowControl.cpp
--- a/MTSSerialFlowControl.cpp Mon Mar 23 16:41:30 2015 -0500
+++ b/MTSSerialFlowControl.cpp Thu Mar 23 16:15:14 2017 -0500
@@ -52,7 +52,7 @@
void MTSSerialFlowControl::handleRead()
{
- char byte = serial.getc();
+ char byte = _serial->getc();
if(rxBuffer.write(byte) != 1) {
logError("Serial Rx Byte Dropped [%c][0x%02X]", byte, byte);
}
@@ -64,12 +64,12 @@
void MTSSerialFlowControl::handleWrite()
{
while(txBuffer.size() != 0) {
- if (serial.writeable() && cts.read() == 0) {
+ if (_serial->writeable() && cts.read() == 0) {
char byte;
if(txBuffer.read(byte) == 1) {
- serial.attach(NULL, Serial::RxIrq);
- serial.putc(byte);
- serial.attach(this, &MTSSerialFlowControl::handleRead, Serial::RxIrq);
+ _serial->attach(NULL, Serial::RxIrq);
+ _serial->putc(byte);
+ _serial->attach(this, &MTSSerialFlowControl::handleRead, Serial::RxIrq);
}
} else {
return;
