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.
Diff: MTS-Lora/vendor/multitech/MTS-Utils/MTSCircularBuffer.h
- Revision:
- 64:64982192a2af
- Parent:
- 16:b630e18103e5
- Child:
- 68:5f787643e7d7
--- a/MTS-Lora/vendor/multitech/MTS-Utils/MTSCircularBuffer.h Tue Jun 19 13:13:52 2018 -0500 +++ b/MTS-Lora/vendor/multitech/MTS-Utils/MTSCircularBuffer.h Thu Aug 23 14:18:55 2018 -0500 @@ -1,6 +1,8 @@ #ifndef MTSCIRCULARBUFFER_H #define MTSCIRCULARBUFFER_H +#include <Callback.h> + #include "Utils.h" namespace mts @@ -99,7 +101,7 @@ void attach(void(*fptr)(void), int threshold, RelationalOperator op) { _threshold = threshold; _op = op; - notify.attach(fptr); + notify = fptr; } /** This method returns the size of the storage space currently allocated for @@ -147,7 +149,7 @@ int readIndex; // read index for circular buffer int writeIndex; // write index for circular buffer int bytes; // available data - FunctionPointer notify; // function pointer used for the internal callback notification + Callback<void()> notify; // Internal callback notification int _threshold; // threshold for the notification RelationalOperator _op; // operator that determines the direction of the threshold void checkThreshold(); // private function that checks thresholds and processes notifications