MOS Source Code
Loading...
Searching...
No Matches
ring_buffer.h File Reference
#include <mos/moslib_global.h>
#include <mos/types.h>
+ Include dependency graph for ring_buffer.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ring_buffer_pos_t
 
struct  ring_buffer_t
 

Functions

MOSAPI ring_buffer_tring_buffer_create (size_t capacity)
 
MOSAPI ring_buffer_tring_buffer_create_at (void *data, size_t capacity)
 
MOSAPI void ring_buffer_pos_init (ring_buffer_pos_t *pos, size_t capacity)
 
MOSAPI void ring_buffer_destroy (ring_buffer_t *buffer)
 
MOSAPI bool ring_buffer_resize (ring_buffer_t *buffer, size_t new_capacity)
 
MOSAPI size_t ring_buffer_pos_push_back (u8 *buffer, ring_buffer_pos_t *pos, const u8 *data, size_t size)
 
MOSAPI size_t ring_buffer_pos_pop_back (u8 *buffer, ring_buffer_pos_t *pos, u8 *buf, size_t size)
 
MOSAPI size_t ring_buffer_pos_push_front (u8 *buffer, ring_buffer_pos_t *pos, const u8 *data, size_t size)
 
MOSAPI size_t ring_buffer_pos_pop_front (u8 *buffer, ring_buffer_pos_t *pos, u8 *buf, size_t size)
 
should_inline u8 ring_buffer_pos_pop_back_byte (u8 *buffer, ring_buffer_pos_t *pos)
 
should_inline u8 ring_buffer_pos_pop_front_byte (u8 *buffer, ring_buffer_pos_t *pos)
 
should_inline bool ring_buffer_pos_is_full (ring_buffer_pos_t *pos)
 
should_inline bool ring_buffer_pos_is_empty (ring_buffer_pos_t *pos)
 
should_inline size_t ring_buffer_pos_push_back_byte (u8 *buffer, ring_buffer_pos_t *pos, u8 data)
 
should_inline size_t ring_buffer_pos_push_front_byte (u8 *buffer, ring_buffer_pos_t *pos, u8 data)
 
should_inline bool ring_buffer_is_full (ring_buffer_t *buffer)
 
should_inline bool ring_buffer_is_empty (ring_buffer_t *buffer)
 
should_inline size_t ring_buffer_push_back (ring_buffer_t *buffer, const u8 *data, size_t size)
 
should_inline size_t ring_buffer_pop_back (ring_buffer_t *buffer, u8 *buf, size_t size)
 
should_inline size_t ring_buffer_push_front (ring_buffer_t *buffer, const u8 *data, size_t size)
 
should_inline size_t ring_buffer_pop_front (ring_buffer_t *buffer, u8 *buf, size_t size)
 
should_inline size_t ring_buffer_push_front_byte (ring_buffer_t *buffer, u8 byte)
 
should_inline size_t ring_buffer_push_back_byte (ring_buffer_t *buffer, u8 byte)
 
should_inline u8 ring_buffer_pop_back_byte (ring_buffer_t *buffer)
 
should_inline u8 ring_buffer_pop_front_byte (ring_buffer_t *buffer)