Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RingBuffer

A ring/cyclic buffer suitable for ISR-Task communication

Ring Buffer, Source: Wikipedia

A C++ 17, templated and stack allocated ring buffer for continuous i/o.

Notes

Instead of releasing old data, you handle the buffer overrun. To use with an RTOS, ensure there is a semaphore lock before calling ReadNext until an IRQ that calls WriteNext to the ring buffer occurs and releases the semaphore lock for reading.

Dependencies

  • libstdc++17
  • libpthread
  • ninja
  • googletest (testing)

Running Tests

user@linux:~$ ninja tests.bin
user@linux:~$ ./tests.bin

About

A simple ring buffer for ISR-task communication

Topics

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages