Whitespace
This commit is contained in:
parent
ed99ad9e63
commit
aef6937a1c
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user