Beginnings of serial interface
authorBernard Blackham <[email protected]>
Mon, 21 Jun 2004 12:10:28 +0000 (12:10 +0000)
committerBernard Blackham <[email protected]>
Mon, 21 Jun 2004 12:10:28 +0000 (12:10 +0000)
ROM2/sci.c [new file with mode: 0644]
ROM2/sci.h [new file with mode: 0644]

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;
+}
diff --git a/ROM2/sci.h b/ROM2/sci.h
new file mode 100644 (file)
index 0000000..80ac024
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _SCI_H_
+#define _SCI_H_
+
+#include "vend.h"
+
+#endif /* _SCI_H_ */

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