Beginnings of serial interface
[uccvend-snackrom.git] / ROM2 / sci.c
diff --git a/ROM2/sci.c b/ROM2/sci.c
new file mode 100644 (file)
index 0000000..39006bc
--- /dev/null
@@ -0,0 +1,11 @@
+#include "vend.h"
+#include "sci.h"
+
+void sci_init() {
+       _io_ports[M6811_BAUD] = M6811_DEF_BAUD;
+       /* Setup character format 1 start, 8-bits, 1 stop.  */
+       _io_ports[M6811_SCCR1] = 0;
+
+       /* Enable reciever and transmitter.  */
+       _io_ports[M6811_SCCR2] = 0xc;
+}

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