4 #define RINGBUFFER_LEN 100
5 #define RINGBUFFER_MAX_NUM 1
7 typedef struct ringbuffer {
8 char read[RINGBUFFER_LEN];
11 char write[RINGBUFFER_LEN];
20 ringbuffer_t *ringbuffers[RINGBUFFER_MAX_NUM];
21 uint8_t num_ringbuffers;
23 void ringbuffer_setup(FILE *stream, ringbuffer_t *buffer);
24 void ringbuffer_setup_in_as_out(FILE *stream, ringbuffer_t *buffer);
25 void init_ringbuffers(void);
26 void stream_setup(FILE *uart_stream);
27 void stream_setup_out_only(FILE *stream);
28 void stream_setup_in_as_out(FILE *stream, int ringbuffer_putchar_sound(char, FILE*));
29 uint8_t ringbuffer_busy(void);
30 void ringbuffer_set_read_noblock(FILE *stream);
31 void ringbuffer_set_read_block(FILE *stream, char c);