Final workings
[uccvend-snackrom.git] / ROM2 / comm.c
index 09ad2a1..ad0a11a 100644 (file)
@@ -143,6 +143,28 @@ void uart_interrupt() {
  * End of interrupt handler
  */
 
+void send_ack() {
+       wait_for_tx_free();
+       tx_buffer[0] = '!';
+       tx_buffer[1] = '\n';
+       tx_buffer[2] = 0;
+       lock();
+       tx_int();
+       unlock();
+       send_packet();
+}
+
+void send_nack() {
+       wait_for_tx_free();
+       tx_buffer[0] = '?';
+       tx_buffer[1] = '\n';
+       tx_buffer[2] = 0;
+       lock();
+       tx_int();
+       unlock();
+       send_packet();
+}
+
 /* sends the packet in tx_buffer and doesn't return until it's been sent */
 void send_packet() {
        bset((void*)&tx_queue_state, 0x01);

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