MIP_SDK  v3.0.0
MicroStrain Communications Library for embedded systems
Functions
byte_ring.c File Reference
#include "byte_ring.h"
#include <assert.h>

Functions

void byte_ring_init (byte_ring_state *state, uint8_t *buffer, size_t size)
 
void byte_ring_clear (byte_ring_state *state)
 
size_t byte_ring_capacity (const byte_ring_state *state)
 
size_t byte_ring_count (const byte_ring_state *state)
 
size_t byte_ring_free_space (const byte_ring_state *state)
 
uint8_t byte_ring_at (const byte_ring_state *state, size_t index)
 
size_t byte_ring_pop (byte_ring_state *state, size_t count)
 
size_t byte_ring_copy_to (const byte_ring_state *state, uint8_t *buffer, size_t count)
 
size_t byte_ring_copy_from_and_update (byte_ring_state *state, const uint8_t **const bytes, size_t *available)
 
size_t byte_ring_get_write_ptr (byte_ring_state *state, uint8_t **const ptr_out)
 
void byte_ring_notify_written (byte_ring_state *state, size_t count)
 

Function Documentation

◆ byte_ring_at()

uint8_t byte_ring_at ( const byte_ring_state state,
size_t  index 
)

◆ byte_ring_capacity()

size_t byte_ring_capacity ( const byte_ring_state state)

◆ byte_ring_clear()

void byte_ring_clear ( byte_ring_state state)

◆ byte_ring_copy_from_and_update()

size_t byte_ring_copy_from_and_update ( byte_ring_state state,
const uint8_t **const  bytes,
size_t *  available 
)

◆ byte_ring_copy_to()

size_t byte_ring_copy_to ( const byte_ring_state state,
uint8_t *  buffer,
size_t  count 
)

◆ byte_ring_count()

size_t byte_ring_count ( const byte_ring_state state)

◆ byte_ring_free_space()

size_t byte_ring_free_space ( const byte_ring_state state)

◆ byte_ring_get_write_ptr()

size_t byte_ring_get_write_ptr ( byte_ring_state state,
uint8_t **const  ptr_out 
)

◆ byte_ring_init()

void byte_ring_init ( byte_ring_state state,
uint8_t *  buffer,
size_t  size 
)

◆ byte_ring_notify_written()

void byte_ring_notify_written ( byte_ring_state state,
size_t  count 
)

◆ byte_ring_pop()

size_t byte_ring_pop ( byte_ring_state state,
size_t  count 
)