#include "fd.h" bool fd_write(fd* f,uint8_t c) { return f->write(f->data,c); } uint8_t fd_read(fd* f) { return f->read(f->data); } bool fd_has(fd* f) { return f->has(f->data); } bool fd_close(fd* f) { return f->close(f->data); } fd fd_from_fifo(fifo* fif) { fd f; f.data=fif; f.read=fd_read; f.write=fd_write; f.close=fd_close; f.has=fd_has; return f; }