Couple of bugs:
- queue.c doesn't
#include <string.h>
. - Casting the pointer parameters passed to
memset
andmemcpy
isn't necessary, but can hide bugs. - Your macros do non-standard pointer arithmetic on void pointers. Don't do that, there's no need to use such pointless non-standard extensions and they are very unlikey to be supported by embedded systems compilers. Use
uint8_t*
instead.
Overall, make sure you are compiling with a standard C compiler and not a non-standard C++ compiler.