Updated ring buffer
Updated ring buffer to match use case, one write head with negative read index
This commit is contained in:
1 parent
e549ed9038
commit
e7e436affa
3 files changed
+4
-15
No files matched your search
@@ -6,9 +6,8 @@
|
||||
typedef struct ring_buffer_t {
|
||||
uint32_t buffer[256];
|
||||
uint8_t w_head;
|
||||
uint8_t r_head;
|
||||
} ring_buffer_t;
|
||||
|
||||
inline void ringBufferPush(ring_buffer_t *rb, uint32_t value);
|
||||
|
||||
inline int ringBufferPop(ring_buffer_t *rb, uint32_t *output);
|
||||
inline uint32_t ringBufferRead(ring_buffer_t *rb, uint8_t idx);
|
||||
Reference in new issue
Block a user