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.
Dependents: M2X_dev axeda_wrapper_dev MTS_M2x_Example1 MTS_Cellular_Connect_Example ... more
Diff: utils/MTSCircularBuffer.cpp
- Revision:
- 17:2d7c4ea7491b
- Parent:
- 2:8d3ea0dfce39
- Child:
- 35:f28acb1be52d
--- a/utils/MTSCircularBuffer.cpp Fri Dec 13 23:02:50 2013 +0000 +++ b/utils/MTSCircularBuffer.cpp Mon Dec 16 20:00:20 2013 +0000 @@ -31,7 +31,7 @@ return i; } -int MTSCircularBuffer::read() +int MTSCircularBuffer::read(char& data) { if (available() == 0) { return -1; @@ -39,9 +39,9 @@ if (readIndex == bufferSize) { readIndex = 0; } - int tmp = buffer[readIndex++]; + data = buffer[readIndex++]; checkThreshold(); - return tmp; + return 1; } int MTSCircularBuffer::write(char* data, int length)