--- /dev/null
+#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_ */
# muchly stolen from m68hc1x's example.tar.gz's Makefile
OBJS = \
- motors.o keypad.o display_basic.o coinmech.o chime.o helpers.o server.o main_basic.o \
+ motors.o keypad.o display_basic.o coinmech.o chime.o \
+ helpers.o server.o 16550.o main_basic.o \
vectors.o
INCLUDES = vend.h keypad.h chime.h asm.h display_basic.h ports.h types.h
-Wl,-defsym,_misc_input=0x2000 \
-Wl,-defsym,_home_sensors=0x2800 \
-Wl,-defsym,_changer_output=0x3000 \
- -Wl,-defsym,_misc_output=0x3800
+ -Wl,-defsym,_misc_output=0x3800 \
+ -Wl,-defsym,_uart_regs=0x4000
OBJCOPY_FLAGS=--only-section=.text \
--only-section=.rodata \