From 74eb20d8c4810b7757d85f7066359a566621a661 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Thu, 29 Oct 2015 14:25:57 +0100 Subject: kfs: added the serial print * 38400 bauds * 1 stop bit * no parity check * 8 bits words Signed-off-by: Olivier Gayot --- src/uart_16550.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/uart_16550.h (limited to 'src/uart_16550.h') 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 */ -- cgit v1.2.3