Initial import of onewire-to-usb bridge
[onewire] / serial.h
CommitLineData
bba33fe1
JM
1/*
2 * File: serial.h
3 * Author: justin
4 *
5 * Created on 17 June 2013, 16:08
6 */
7
8#ifndef SERIAL_H
9#define SERIAL_H
10
11extern char outbuff[];
12char inbuff[];
13
14void serial_init(void);
15
16bool msg_empty(void);
17void msg_write(const char *msg);
18void msg_writebyte(const char msg);
19void msg_sendnext(void);
20
21void msg_recvnext(void);
22bool msg_recvready(void);
23char msg_recv(void);
24void putch(char);
25
26/* TODO Connect serial interupt handlers
27 *
28 * if (PIE1bits.TXIE && PIR1bits.TXIF)
29 * msg_sendnext();
30 *
31 * if (PIE1bits.RCIE && PIR1bits.RCIF)
32 * msg_recvnext();
33 *
34 */
35
36#endif /* SERIAL_H */
37