summaryrefslogtreecommitdiff
path: root/com32/libupload/serial.h
blob: 356f2cef49458e4b248c68f061758b65abbdd8f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef SERIAL_H
#define SERIAL_H

#include <stddef.h>

struct serial_if {
    uint16_t port;
    bool console;
    struct {
	uint8_t dll, dlm, ier, iir, lcr, mcr;
    } old;
};

int serial_init(struct serial_if *sif, const char *argv[]);
void serial_read(struct serial_if *sif, void *data, size_t n);
void serial_write(struct serial_if *sif, const void *data, size_t n);
void serial_cleanup(struct serial_if *sif);

#endif /* SERIAL_H */