So I got the circular buffer implement in C exact copy as the template from embeddedartistry: https://github.com/embeddedartistry/embedded-resources/tree/master/examples/c/circu