/* * fifo.h * * Created on: 25.10.2015 * Author: bernd */ #ifndef INC_FIFO_H_ #define INC_FIFO_H_ #include #include #include typedef struct { volatile uint8_t * buffer; volatile size_t size; volatile size_t put; volatile size_t get; }fifo_t; void fifo_init(fifo_t *self, uint8_t * buffer, size_t size); bool fifo_put(fifo_t *self, uint8_t data); bool fifo_get(fifo_t *self, uint8_t * data); bool fifo_is_empty(fifo_t *self); #endif /* INC_FIFO_H_ */