Beginnings of 16550 code
[uccvend-snackrom.git] / ROM2 / 16550.h
diff --git a/ROM2/16550.h b/ROM2/16550.h
new file mode 100644 (file)
index 0000000..e7e0263
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef _16550_H_
+#define _16550_H_
+
+#include "vend.h"
+
+/* Must be accessed with DLAB low */
+#define UART_RX_BUF       0x00 /* read  */
+#define UART_TX_BUF       0x00 /* write */
+#define UART_INT_ENABLE   0x01
+#define UART_INT_IDENT    0x02 /* read  */
+#define UART_FIFO_CTL     0x02 /* write */
+#define UART_LINE_CTL     0x03
+#define UART_MODEM_CTL    0x04
+#define UART_LINE_STATUS  0x05
+#define UART_MODEM_STATUS 0x06
+#define UART_SCRATCH      0x07
+
+/* Same addresses as above, but accessed with DLAB high */
+#define UART_DLAB_LSB     0x00
+#define UART_DLAB_MSB     0x01
+
+extern volatile u8 _uart_regs[]; /* UART registers - fixed at link time */
+
+#endif /* _16550_H_ */

UCC git Repository :: git.ucc.asn.au