Hi,
I am struggling to implement a Ring Buffer. I have searched through many examples and they all start at a high level and pointers are not my strongest asset. I have been working through the below link:
http://embedjournal.com/implemen...
The parts I do not understand:
How do they generate this macro?
#define CIRCBUF_DEF(x,y) uint8_t x##_space[y]; circBuf_t x = { x##_space,0,0,y} // How do they generate this?
Also is buffer supposed to be my Array of Rx data?
typedef struct { uint8_t * const buffer; int head; int tail; const int maxLen; }circBuf_t;
Do you have any simpler examples that I can get started with.
Cheers,