1 #ifndef SERIAL_H 2 #define SERIAL_H 3 4 #include <stddef.h> 5 6 struct serial_if { 7 uint16_t port; 8 bool console; 9 struct { 10 uint8_t dll, dlm, ier, iir, lcr, mcr; 11 } old; 12 }; 13 14 int serial_init(struct serial_if *sif, const char *argv[]); 15 void serial_read(struct serial_if *sif, void *data, size_t n); 16 void serial_write(struct serial_if *sif, const void *data, size_t n); 17 void serial_cleanup(struct serial_if *sif); 18 19 #endif /* SERIAL_H */ 20