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