#ifndef RING_BUFFER_H #define RING_BUFFER_H #define RING_BUFFER_SIZE 32 #include struct ring_buffer { uint8_t buffer[RING_BUFFER_SIZE]; uint8_t read; uint8_t write; }; uint8_t read_entry(struct ring_buffer *buf); void write_entry(struct ring_buffer *buf, uint8_t entry); #endif /* !RING_BUFFER_H */