From: Bernard Blackham Date: Mon, 21 Jun 2004 12:10:28 +0000 (+0000) Subject: Beginnings of serial interface X-Git-Tag: ROMW~36 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=b3523cf99eff476642609ad6537e460595f84e72;p=uccvend-snackrom.git Beginnings of serial interface --- 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_ */