Skip to content

slightlynybbled/circular_buffer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

travisci status

Purpose

The purpose of this repository is to replicate the work of Elliot from 'Embed with Elliot' in a more portable and generic format that would be useful beyond Arduino.

One minor improvement in functionality is that this buffer will use the entire buffer whereas the original library used one less buffer.

Have a look at the original repository along with the accompanying article.

Additional information specific to this library and the differences between it and Elliot's original work may be found at forembed

Status

Library is 100% tested using TravisCI tools. Thanks, guys!

Using this library

Copy the *.h and *.c file into your project. Compile and enjoy.

An example 'basic_example.c' is contained in the 'examples' directory.

How it works

Assuming an 8-element circular buffer:

circular buffer

Future

Currently, arrays of different widths have their own functions such as BUF_read8() and BUF_write8() for each width. I would like to remove this necessity in future iterations of the library.