A ring/cyclic buffer suitable for ISR-Task communication
A C++ 17, templated and stack allocated ring buffer for continuous i/o.
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.
- libstdc++17
- libpthread
- ninja
- googletest (testing)
user@linux:~$ ninja tests.bin
user@linux:~$ ./tests.bin