Content originally posted in LPCWare by starblue on Wed Oct 28 01:56:54 MST 2015
Quote: pat180269
There is a bug in ring_buffer.c
No, it is not a bug.
The documentation in ring_buffer.h specifies that count must be a power of two. Then % and & are equivalent, but & is much faster.
Though it would be nice if the init routine checked that count is indeed a power of two.