MIP_SDK  v3.0.0
MicroStrain Communications Library for embedded systems
Classes | Typedefs | Functions
byte_ring.h File Reference
#include <stdint.h>
#include <stddef.h>

Go to the source code of this file.

Classes

struct  byte_ring_state
 

Typedefs

typedef struct byte_ring_state byte_ring_state
 

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 **bytes, size_t *count)
 
size_t byte_ring_get_write_ptr (byte_ring_state *state, uint8_t **ptr_out)
 
void byte_ring_notify_written (byte_ring_state *state, size_t count)
 

Typedef Documentation

◆ byte_ring_state

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 **  bytes,
size_t *  count 
)

◆ 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 **  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 
)