Blame | Last modification | View Log | RSS feed
#ifndef __circular_buffer_h
#define __circular_buffer_h
#define BUFFER_OK 0
#define BUFFER_ERROR -1
#define BUFFER_SIZE 256
typedef struct __BUFFER_DATA {
unsigned char index_read;
unsigned char index_write;
unsigned char stored_length;
} BUFFER_DATA;
void buffer_init(BUFFER_DATA *);
char buffer_insert(unsigned char length, unsigned char *msg);
char buffer_read(unsigned char length, unsigned char *dest);
#endif