MTS_SPI_Slave unfinished
Fork of MTS-Serial by
Diff: MTSBufferedIO.cpp
- Revision:
- 12:e12b79a4ab4f
- Parent:
- 11:4afbbafcd6b3
--- a/MTSBufferedIO.cpp Mon Mar 23 16:41:30 2015 -0500 +++ b/MTSBufferedIO.cpp Thu Mar 23 16:15:14 2017 -0500 @@ -8,6 +8,7 @@ : txBuffer(txBufferSize) , rxBuffer(rxBufferSize) { + } MTSBufferedIO::~MTSBufferedIO() @@ -25,7 +26,7 @@ write(buff, len); va_end(ap); return len; -} +} int MTSBufferedIO::write(const char* data, int length, unsigned int timeoutMillis) { @@ -42,7 +43,7 @@ txBuffer.clear(); bytesWritten += (bytesWrittenSwBuffer - bytesRemainingSwBuffer); } - } while(tmr.read_ms() <= timeoutMillis && bytesWritten < length); + } while((unsigned)tmr.read_ms() <= timeoutMillis && bytesWritten < length); return bytesWritten; } @@ -83,7 +84,7 @@ length = mts_max(0,length); do { bytesRead += rxBuffer.read(&data[bytesRead], length - bytesRead); - } while(tmr.read_ms() <= timeoutMillis && bytesRead < length); + } while((unsigned)tmr.read_ms() <= timeoutMillis && bytesRead < length); return bytesRead; }