16 lines
550 B
C
16 lines
550 B
C
#pragma once
|
|
|
|
#include "stdarg.h"
|
|
|
|
typedef struct ringbuffer_instance_t* ringbuffer_t;
|
|
|
|
ringbuffer_t ringbufferCreate(uint32_t capacity);
|
|
uint32_t ringbufferCapacity(ringbuffer_t instance);
|
|
uint32_t ringbufferUsed(ringbuffer_t instance);
|
|
bool_t ringbufferEnqueue(ringbuffer_t instance, uint8_t item);
|
|
bool_t ringbufferDequeue(ringbuffer_t instance, uint8_t* item);
|
|
void ringbufferDestroy(ringbuffer_t instance);
|
|
void ringbufferDebug(ringbuffer_t instance);
|
|
bool_t ringbufferEmpty(ringbuffer_t instance);
|
|
bool_t ringbufferFull(ringbuffer_t instance);
|