From b3523cf99eff476642609ad6537e460595f84e72 Mon Sep 17 00:00:00 2001 From: Bernard Blackham Date: Mon, 21 Jun 2004 12:10:28 +0000 Subject: [PATCH] Beginnings of serial interface --- ROM2/sci.c | 11 +++++++++++ ROM2/sci.h | 6 ++++++ 2 files changed, 17 insertions(+) create mode 100644 ROM2/sci.c create mode 100644 ROM2/sci.h diff --git a/ROM2/sci.c b/ROM2/sci.c new file mode 100644 index 0000000..39006bc --- /dev/null +++ b/ROM2/sci.c @@ -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 index 0000000..80ac024 --- /dev/null +++ b/ROM2/sci.h @@ -0,0 +1,6 @@ +#ifndef _SCI_H_ +#define _SCI_H_ + +#include "vend.h" + +#endif /* _SCI_H_ */ -- 2.20.1