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: CircularBufferExample
Homepage
This library provides circular buffers. The main difference with other circular buffer libraries is that it does not use dynamic memory allocation for storing data. Instead, the buffer is allocated statically.
Three types of buffer exist by default :
- SmallCircularBuffer (32 bytes)
- MediumCircularBuffer (128 bytes)
- BigCircularBuffer (512 bytes)
You can also define buffers with specific size :
CircularBuffer<4> buffer; // 4 bytes buffer CircularBuffer<102> buffer2; // 102 bytes buffer
Import programCircularBufferExample
This example shows how to use the CircularBuffer library.