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:
- 46:b30547bf07d5
- Parent:
- 45:40745c2036cf
- Parent:
- 43:3cacf019ed7d
- Child:
- 60:ee9c7a700330
- Child:
- 64:0ca9c7123ffc
diff -r 40745c2036cf -r b30547bf07d5 utils/MTSCircularBuffer.cpp --- a/utils/MTSCircularBuffer.cpp Thu Dec 19 21:38:01 2013 +0000 +++ b/utils/MTSCircularBuffer.cpp Thu Dec 19 21:48:32 2013 +0000 @@ -3,6 +3,8 @@ #include "MTSCircularBuffer.h" +using namespace mts; + MTSCircularBuffer::MTSCircularBuffer(int bufferSize) : bufferSize(bufferSize), readIndex(0), writeIndex(0), _threshold(-1), _op(Vars::GREATER) { buffer = new char[bufferSize]; @@ -44,7 +46,7 @@ return 1; } -int MTSCircularBuffer::write(char* data, int length) +int MTSCircularBuffer::write(const char* data, int length) { int i = 0; while((i < length) && (available() < bufferSize)) {