#ifndef __RINGBSML_H
#define __RINGBSML_H

#include <stdint.h>

typedef struct {
    char* startptr;
    uint8_t size;
    uint8_t readpos;
    uint8_t writepos;
} ringbuf_t;


void ringbuf_init(ringbuf_t* rb, char* buf, int size);
uint8_t ringbuf_put(ringbuf_t *rb, uint8_t value);
int16_t ringbuf_get(ringbuf_t *rb);

#endif
