a-super-light-weight-circular-buffer-for-MCUs details here: https://dannyelectronics.wordpress.com/2022/11/15/a-super-light-weight-circular-buffer/