Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Arduino library implementing a circular buffer with multiple readers
branch: master

Adding peek() and skip() functions, bug fix for write().

MultiReadCircBuffer::write(): Ensure correct length is returned
for case when data is overwritten (total bytes written, not bytes
to read).

MultiReadCircBuffer::interruptsEnabled(): Use SREG_I instad of
hard-coded value for portability with different microcontrollers.
latest commit 23898b405e
Steve Marple authored
Failed to load latest commit information.
test Adding read() method to copy data using Print.write().
MultiReadCircBuffer.cpp Adding peek() and skip() functions, bug fix for write().
MultiReadCircBuffer.h Indiating that ARduino 1.0 is required



MultiReadCircBuffer is an Arduino library implementing a multiple-reader circular buffer. The library allows a single writer to insert data, with multiple readers extracting data from the same shared buffer. The implementation does not use malloc(), instead the caller must provide the buffer space and length when creating the MultiReadCircBuffer object. If more than one reader is required then the caller must also supply arrays for the size and read pointer arrays. The caller can determine whether data should be overwritten or not if it is inserted faster than the slowest reader is removing it. Any buffer size between 1 and max int -1 is valid.

Current status

Compiles under Arduino 1.0. Behaviour (excluding enable/disable interrupt code) tested under g++. Regression testing under g++.

Something went wrong with that request. Please try again.