MTS_SPI_Slave unfinished
Fork of MTS-Serial by
Diff: MTSSerialFlowControl.cpp
- Revision:
- 12:e12b79a4ab4f
- Parent:
- 10:b18a1064dfc6
--- 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;