blob: 305f8bff273c55cc36dec520ec4800d598ec308e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#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
|