Subversion Repositories Code-Repo

Rev

Blame | Last modification | View Log | RSS feed

#ifndef __circular_buffer_h
#define __circular_buffer_h

#define BUFFER_OK       0
#define BUFFER_FULL     -1

typedef struct __BUFFER_DATA {
    unsigned char read_ind;
    unsigned char read_block;

    unsigned char write_ind;
    unsigned char write_block;
} BUFFER_DATA;

void buffer_init(BUFFER_DATA *);
char buffer_insert(unsigned char length, unsigned char *msg);

#endif