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.
Dependencies: mbed 4DGL-uLCD-SE mbed-rtos nRF24L01P
CircularBuf.h
- Committer:
- Nurchu
- Date:
- 2018-04-20
- Revision:
- 14:4637a9f02919
- Child:
- 16:d0d3bb2fc3ce
File content as of revision 14:4637a9f02919:
template <T> class CircularBuff { public: CircularBuff(unsigned int size); ~CircularBuff(); // Pushes data onto the buffer // Arguement: // data, The array of data to push // size, The amount of data in the array void push(T* data, unsigned int size); // Pops data from the buffer // Arguement: // data, The array of data popped // size, The amount of data to pop // Return: // Amount of data actually popped unsigned int pop(T* data, unsigned int size); // Amount of data in the buffer unsigned int size(); // Clears the buffer completely void clear(); private: T* _data; unsigned int _size; unsigned int _start; unsigned int _end; };