git.ucc.asn.au
/
uccvend-snackrom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More things to hopefully make this work.
[uccvend-snackrom.git]
/
ROM2
/
sci.c
diff --git
a/ROM2/sci.c
b/ROM2/sci.c
index
4ce0d36
..
2346b28
100644
(file)
--- a/
ROM2/sci.c
+++ b/
ROM2/sci.c
@@
-1,4
+1,5
@@
#include "vend.h"
#include "vend.h"
+#include "chime.h"
#include "sci.h"
char sci_tx_buf[BUFFER_LEN];
#include "sci.h"
char sci_tx_buf[BUFFER_LEN];
@@
-32,6
+33,7
@@
void send_packet() {
}
void sci_rx_int() {
}
void sci_rx_int() {
+ /* XXX FIXME we should do something about errors. nack? */
if (sci_have_packet) {
/* overrun :( */
_io_ports[M6811_SCDR]; /* read it anyway */
if (sci_have_packet) {
/* overrun :( */
_io_ports[M6811_SCDR]; /* read it anyway */
@@
-52,7
+54,12
@@
void sci_rx_int() {
}
void sci_interrupt_serial() {
}
void sci_interrupt_serial() {
+ chime_start();
+
if (_io_ports[M6811_SCSR] & M6811_RDRF) sci_rx_int();
if (_io_ports[M6811_SCSR] & M6811_RDRF) sci_rx_int();
+
+ if (_io_ports[M6811_SCSR] & M6811_OR)
+ _io_ports[M6811_SCDR]; /* declare it a lost cause */
}
void msg_clr() {
}
void msg_clr() {
UCC
git Repository :: git.ucc.asn.au