diff options
| author | Michal Idziorek <m.i@gmx.at> | 2015-05-18 01:31:58 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2015-05-18 01:31:58 +0200 |
| commit | fe79552d9fcfd60d8c2bb828c6b93cf471ef7b75 (patch) | |
| tree | 7bf842857ce4f485101848292405a96f322fe374 /kernel/fifo.h | |
| parent | db22b587966b4a4eaa47536f32ca812532446bcb (diff) | |
fifo interface
Diffstat (limited to 'kernel/fifo.h')
| -rw-r--r-- | kernel/fifo.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/kernel/fifo.h b/kernel/fifo.h new file mode 100644 index 0000000..bae7d57 --- /dev/null +++ b/kernel/fifo.h @@ -0,0 +1,25 @@ +// SIMPLE FIFO DRIVER + + +#ifndef FIFO_H +#define FIFO_H + +#include <stdint.h> +#include <stdbool.h> + +typedef struct fifo_struct +{ + bool (*put)(struct fifo_stuct*,uint8_t); + uint8_t (*get)(struct fifo_struct*); + bool (*has)(struct fifo_struct*); + + void *data; // opaque! can be a vt52 or a ringbuffer.. + +}fifo; + +bool fifo_put(fifo*,uint8_t); +uint8_t fifo_get(fifo*); +bool fifo_has(fifo*); + + +#endif |
