Whitespace

This commit is contained in:
Lynn Ochs 2021-02-19 21:31:06 +01:00
parent ed99ad9e63
commit aef6937a1c

View File

@ -12,13 +12,13 @@ typedef struct {
uint8_t data[];
} ringbuffer;
#define RINGBUFFER_STORAGE(NAME, SIZE) \
#define RINGBUFFER_STORAGE(NAME, SIZE) \
uint8_t buf_##NAME##__LINE__[sizeof(ringbuffer) + SIZE]; \
ringbuffer *NAME = (ringbuffer *)buf_##NAME##__LINE__;
#define RINGBUFFER_INIT(NAME, SIZE) \
#define RINGBUFFER_INIT(NAME, SIZE) \
NAME->head = NAME->tail = 0; \
NAME->size = SIZE;
#define RINGBUFFER(NAME, SIZE) \
#define RINGBUFFER(NAME, SIZE) \
RINGBUFFER_STORAGE(NAME, SIZE); \
RINGBUFFER_INIT(NAME, SIZE);