Skip to content
Permalink
Browse files

grainuum: add an 'elements' union for debugging

The 'elements' union can be used to more easily separate packets
when debugging.

Signed-off-by: Sean Cross <sean@xobs.io>
  • Loading branch information...
xobs committed Jun 13, 2017
1 parent 34da145 commit ee11bc5b0e35f0ecfb9bdb0504582fcea058b552
Showing with 4 additions and 1 deletion.
  1. +4 −1 grainuum.h
@@ -267,7 +267,10 @@ struct { \
uint8_t head; \
uint8_t tail; \
uint8_t padding; \
uint8_t buffer[(sz) * GRAINUUM_BUFFER_ELEMENT_SIZE]; \
union { \
uint8_t buffer[(sz) * GRAINUUM_BUFFER_ELEMENT_SIZE]; \
uint8_t elements[sz][GRAINUUM_BUFFER_ELEMENT_SIZE]; \
}; \
} name __attribute__((aligned(4))); \
uint8_t * name ## _head_ptr;
#define GRAINUUM_BUFFER_INIT(name) \

0 comments on commit ee11bc5

Please sign in to comment.
You can’t perform that action at this time.