#include <nds.h>

#ifndef CIRCBUF_H_
    #define CIRCBUF_H_

    typedef struct {
        u8 mem[256];
        u8 front;      // start of buffer, read from here until back
        u8 back;       // end of buffer, write past here until front
    } CircBuf;

    u8 cb_read_byte(CircBuf *buf);
    void cb_write_byte(CircBuf *buf, u8 byte);
    void cb_clear(CircBuf *buf);

#endif