2 * Copyright © 2012 Keith Packard <keithp@keithp.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
21 #define AO_SERIAL_SPEED_4800 0
22 #define AO_SERIAL_SPEED_9600 1
23 #define AO_SERIAL_SPEED_19200 2
24 #define AO_SERIAL_SPEED_57600 3
25 #define AO_SERIAL_SPEED_115200 4
28 extern volatile __xdata struct ao_fifo ao_serial0_rx_fifo;
29 extern volatile __xdata struct ao_fifo ao_serial0_tx_fifo;
32 ao_serial0_getchar(void);
35 _ao_serial0_pollchar(void);
38 ao_serial0_putchar(char c);
41 ao_serial0_drain(void);
44 ao_serial0_set_speed(uint8_t speed);
48 extern volatile __xdata struct ao_fifo ao_serial1_rx_fifo;
49 extern volatile __xdata struct ao_fifo ao_serial1_tx_fifo;
52 ao_serial1_getchar(void);
55 _ao_serial1_pollchar(void);
58 ao_serial1_putchar(char c);
61 ao_serial1_drain(void);
64 ao_serial1_set_speed(uint8_t speed);
68 extern volatile __xdata struct ao_fifo ao_serial2_rx_fifo;
69 extern volatile __xdata struct ao_fifo ao_serial2_tx_fifo;
72 ao_serial2_getchar(void);
75 _ao_serial2_pollchar(void);
78 ao_serial2_putchar(char c);
81 ao_serial2_drain(void);
84 ao_serial2_set_speed(uint8_t speed);
88 extern volatile __xdata struct ao_fifo ao_serial3_rx_fifo;
89 extern volatile __xdata struct ao_fifo ao_serial3_tx_fifo;
92 ao_serial3_getchar(void);
95 _ao_serial3_pollchar(void);
98 ao_serial3_putchar(char c);
101 ao_serial3_drain(void);
104 ao_serial3_set_speed(uint8_t speed);
108 ao_serial_init(void);
110 #endif /* _AO_SERIAL_H_ */