Serial library for MTS Socket Modem Arduino Shield devices from Multi-Tech Systems
Dependents: mDot_AT_firmware mtsas mtsas MTDOT-EVB-LinkCheck-AL ... more
Diff: MTSSerialFlowControl.cpp
- Revision:
- 12:e12b79a4ab4f
- Parent:
- 10:b18a1064dfc6
- Child:
- 13:643ad09fc0e0
--- 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;