3 This file is part of the AVR-uart_ni.
4 Copyright (C) 2006-2015 Daniel Otte (bg@nerilex.org)
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 * \email bg@nerilex.org
24 * \license GPLv3 or later
26 * \brief declaration for non-interrupt uart
38 * \brief initialize uart0.
39 * This function initializes the first uart according to the parameter specified
42 void uart0_init(void);
45 * \brief send data through uart0.
46 * This function sends data through the first uart
47 * (the data size is defined in config.h).
48 * \param c data to send
50 void uart0_putc(uint16_t c);
53 * \brief read data from uart0.
54 * This function reads data from the first uart
55 * (the data size is defined in config.h).
56 * \return data received by uart0
58 uint16_t uart0_getc(void);
61 * \brief checks if data is available.
63 * This function checks the state of the input buffer of uart0 and
64 * returns if data is available or not.
65 * \return zero if no data is available else a value different from zero is returned
67 uint8_t uart0_dataavail(void);
75 * \brief initialize uart1.
76 * This function initializes the second uart according to the parameter specifyed
79 void uart1_init(void);
82 * \brief send data through uart1.
83 * This function sends data through the second uart
84 * (the data size is defined in config.h).
85 * \param c data to send
87 void uart1_putc(uint16_t c);
90 * \brief read data from uart1.
91 * This function reads data from the second uart
92 * (the data size is defined in config.h).
93 * \return data received by uart1
95 uint16_t uart1_getc(void);
98 * \brief checks if data is available.
99 * This function checks the state of the input buffer of uart1 and
100 * returns if data is available or not.
101 * \return zero if no data is available else a value different from zero is returned
103 uint8_t uart1_dataavail(void);
105 #define uart1_flush()
107 #endif /* UART1_NI */
109 #endif /* UART_NI_H_ */