-
Notifications
You must be signed in to change notification settings - Fork 0
/
uart16550.h
48 lines (33 loc) · 954 Bytes
/
uart16550.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef _UART16550_H
#define _UART16550_H
#define OPTION_COM1 1
#define OPTION_COM2 2
#define OPTION_BOTH 3
#define UART16550_COM1_SELECTED 0x01
#define UART16550_COM2_SELECTED 0x02
#define MAX_NUMBER_DEVICES 2
#ifndef _UART16550_REGS_H
#define UART16550_BAUD_1200 96
#define UART16550_BAUD_2400 48
#define UART16550_BAUD_4800 24
#define UART16550_BAUD_9600 12
#define UART16550_BAUD_19200 6
#define UART16550_BAUD_38400 3
#define UART16550_BAUD_56000 2
#define UART16550_BAUD_115200 1
#define UART16550_LEN_5 0x00
#define UART16550_LEN_6 0x01
#define UART16550_LEN_7 0x02
#define UART16550_LEN_8 0x03
#define UART16550_STOP_1 0x00
#define UART16550_STOP_2 0x04
#define UART16550_PAR_NONE 0x00
#define UART16550_PAR_ODD 0x08
#define UART16550_PAR_EVEN 0x18
#define UART16550_PAR_STICK 0x20
#endif
#define UART16550_IOCTL_SET_LINE 1
struct uart16550_line_info {
unsigned char baud, len, par, stop;
};
#endif