X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=ROM2%2Fcomm.h;fp=ROM2%2Fcomm.h;h=9bff8bdf45bb9dac90767eef78c19965daf3fc7e;hb=293827a53b325c2faffddcba380b6f0c19da802a;hp=69f8d004e60faef59b04e55d2dca1f07d81b9f5d;hpb=3d8e5e4e1024a34885544acf3acec80e1b1e732b;p=uccvend-snackrom.git diff --git a/ROM2/comm.h b/ROM2/comm.h index 69f8d00..9bff8bd 100644 --- a/ROM2/comm.h +++ b/ROM2/comm.h @@ -23,7 +23,7 @@ * */ -#define TX_BUFFER_LEN 6 /* maximum 13 due to the way tx_int works with the FIFO */ +#define TX_BUFFER_LEN 6 /* maximum 12 due to the way tx_int works with the FIFO */ extern char tx_buffer[TX_BUFFER_LEN+2]; /* \n + null terminated */ #define RX_BUFFER_LEN 11 extern volatile char rx_buffer[RX_BUFFER_LEN+1]; /* null terminated */ @@ -42,8 +42,13 @@ extern volatile u8 rx_queue_state; */ extern volatile u8 tx_queue_state; +extern inline void wait_for_tx_free() { while (tx_queue_state & 0x01); } + void comm_init(); void msg_clr(); +void send_packet(); +void send_ack(); +void send_nack(); /*************************************/ /*** 16550 UART specific #defines ***/