Skip to content
Snippets Groups Projects
Commit 2e98bf59 authored by Bernard Blackham's avatar Bernard Blackham
Browse files

Get rid of ack/nack code.

Convert stuff to uppercase.
parent 78faadd7
No related merge requests found
...@@ -146,7 +146,7 @@ void give_change() { ...@@ -146,7 +146,7 @@ void give_change() {
(sci_rx_buf[3] < '0') || (sci_rx_buf[3] > '9') || (sci_rx_buf[3] < '0') || (sci_rx_buf[3] > '9') ||
(sci_rx_buf[4] < '0') || (sci_rx_buf[4] > '9') || (sci_rx_buf[4] < '0') || (sci_rx_buf[4] > '9') ||
(sci_rx_buf[5] < '0') || (sci_rx_buf[5] > '9')) { (sci_rx_buf[5] < '0') || (sci_rx_buf[5] > '9')) {
send_nack(); //send_nack();
} }
cost = sci_rx_buf[1] - '0'; cost = sci_rx_buf[1] - '0';
cost *= 10; cost = sci_rx_buf[2] - '0'; cost *= 10; cost = sci_rx_buf[2] - '0';
...@@ -155,7 +155,7 @@ void give_change() { ...@@ -155,7 +155,7 @@ void give_change() {
cost *= 10; cost = sci_rx_buf[5] - '0'; cost *= 10; cost = sci_rx_buf[5] - '0';
coin_cost(cost); coin_cost(cost);
send_ack(); //send_ack();
} }
void send_keypress(u8 key) { void send_keypress(u8 key) {
......
...@@ -50,6 +50,11 @@ void send_string(char* c) { ...@@ -50,6 +50,11 @@ void send_string(char* c) {
} }
} }
char toupper(char c) {
if (c >= 'a' && c <= 'z') c -= 'a'-'A';
return c;
}
void sci_rx_int() { void sci_rx_int() {
char buf = _io_ports[M6811_SCDR]; char buf = _io_ports[M6811_SCDR];
if (sci_doing_xmodem) { if (sci_doing_xmodem) {
...@@ -72,7 +77,8 @@ void sci_rx_int() { ...@@ -72,7 +77,8 @@ void sci_rx_int() {
/* overrun :( */ /* overrun :( */
return; return;
} }
sci_rx_buf[sci_rx_buf_ptr] = buf; /* we upper case because no commands care that things aren't */
sci_rx_buf[sci_rx_buf_ptr] = toupper(buf);
if (buf == '\n' || buf == '\r') { if (buf == '\n' || buf == '\r') {
sci_rx_buf[sci_rx_buf_ptr] = '\0'; sci_rx_buf[sci_rx_buf_ptr] = '\0';
...@@ -98,14 +104,6 @@ void msg_clr() { ...@@ -98,14 +104,6 @@ void msg_clr() {
sci_rx_buf_ptr = 0; sci_rx_buf_ptr = 0;
} }
void send_ack() {
send_string("!" CRLF);
}
void send_nack() {
send_string("?" CRLF);
}
u16 sci_timer; u16 sci_timer;
void serial_rti() { /* called every 6.6 ms */ void serial_rti() { /* called every 6.6 ms */
if (sci_timer) sci_timer--; if (sci_timer) sci_timer--;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment