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:
- 35:f28acb1be52d
- Parent:
- 17:2d7c4ea7491b
- Child:
- 39:6e94520a3217
- Child:
- 41:81d035fb0b6a
- Child:
- 45:40745c2036cf
diff -r 60682c702c3f -r f28acb1be52d utils/MTSCircularBuffer.cpp --- a/utils/MTSCircularBuffer.cpp Wed Dec 18 23:05:31 2013 +0000 +++ b/utils/MTSCircularBuffer.cpp Thu Dec 19 15:56:05 2013 +0000 @@ -34,7 +34,7 @@ int MTSCircularBuffer::read(char& data) { if (available() == 0) { - return -1; + return 0; } if (readIndex == bufferSize) { readIndex = 0; @@ -47,7 +47,7 @@ int MTSCircularBuffer::write(char* data, int length) { if (length > capacity()) { - return -1; + return 0; } int i = 0; while((i < length) && (available() < bufferSize)) { @@ -63,7 +63,7 @@ int MTSCircularBuffer::write(char data) { if (available() == bufferSize) { - return -1; + return 0; } if(writeIndex == bufferSize) { writeIndex = 0;