diff options
author | Olivier Gayot <duskcoder@gmail.com> | 2015-10-29 14:25:57 +0100 |
---|---|---|
committer | Olivier Gayot <duskcoder@gmail.com> | 2015-10-29 14:25:57 +0100 |
commit | 74eb20d8c4810b7757d85f7066359a566621a661 (patch) | |
tree | f511c21ad6d4f2b45ad2c42f689758ea294f2541 /src/uart_16550.h | |
parent | e7edce9f232e1359097793b2610e04b16dab7f7e (diff) |
kfs: added the serial print
* 38400 bauds
* 1 stop bit
* no parity check
* 8 bits words
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'src/uart_16550.h')
-rw-r--r-- | src/uart_16550.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/uart_16550.h b/src/uart_16550.h new file mode 100644 index 0000000..2e20eff --- /dev/null +++ b/src/uart_16550.h @@ -0,0 +1,24 @@ +#ifndef UART_16550_H +#define UART_16550_H + +#define DATA_WORD_LEN_5 0b00 +#define DATA_WORD_LEN_6 0b01 +#define DATA_WORD_LEN_7 0b10 +#define DATA_WORD_LEN_8 0b11 + +#define STOP_BIT_1 0b000 +#define STOP_BIT_2 0b100 /* 1.5 stop bits for 5 bits words */ + +#define PARITY_NONE 0b000000 +#define PARITY_ODD 0b001000 +#define PARITY_EVEN 0b011000 +#define PARITY_HIGH 0b101000 +#define PARITY_LOW 0b111000 + +#define BREAK_SIGNAL_DISABLED 0b0000000 +#define BREAK_SIGNAL_ENABLED 0b1000000 + +#define DLAB_ACCESSIBLE_RBR_THR_IER 0b00000000 +#define DLAB_ACCESSIBLE_DLL_DLM 0b10000000 + +#endif /* UART_16550_H */ |