Message Integrity Checking
[uccvend-snackrom.git] / ROM2 / sci.h
1 #ifndef _SCI_H_
2 #define _SCI_H_
3
4 #include "vend.h"
5
6 #define BUFFER_LEN 20
7 #define CRLF "\r\n"
8
9 #define SERIAL_TIMEOUT -2
10
11 void sci_init();
12 void msg_clr();
13 void send_buffer(bool crlf);
14 void send_string(char* s);
15 void send_ack();
16 void send_nack();
17 int serial_readchar(u8 timeout);
18 void serial_write(const char *str, int len);
19 #define wait_for_tx_free() do { } while(0)
20
21 extern char sci_tx_buf[BUFFER_LEN];
22 extern volatile char sci_rx_buf[BUFFER_LEN];
23 extern volatile u8 sci_have_packet;
24 extern volatile bool sci_echo;
25 extern bool sci_doing_xmodem;
26
27 #endif /* _SCI_H_ */

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