57#include "contiki-conf.h"
90 uint8_t size_power_of_two);
int ringbuf_size(struct ringbuf *r)
Get the size of a ring buffer.
Definition: ringbuf.c:97
int ringbuf_get(struct ringbuf *r)
Get a byte from the ring buffer.
Definition: ringbuf.c:73
int ringbuf_put(struct ringbuf *r, uint8_t c)
Insert a byte into the ring buffer.
Definition: ringbuf.c:53
void ringbuf_init(struct ringbuf *r, uint8_t *a, uint8_t size_power_of_two)
Initialize a ring buffer.
Definition: ringbuf.c:44
int ringbuf_elements(struct ringbuf *r)
Get the number of elements currently in the ring buffer.
Definition: ringbuf.c:103
Structure that holds the state of a ring buffer.
Definition: ringbuf.h:68
uint8_t mask
Definition: ringbuf.h:70
uint8_t put_ptr
Definition: ringbuf.h:73
uint8_t * data
Definition: ringbuf.h:69
uint8_t get_ptr
Definition: ringbuf.h:73