4 * This file is part of BeRTOS.
6 * Bertos 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 2 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, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 * As a special exception, you may use this file as part of a free software
21 * library without restriction. Specifically, if other files instantiate
22 * templates or use macros or inline functions from this file, or you compile
23 * this file and link it with other files to produce an executable, this
24 * file does not by itself cause the resulting executable to be covered by
25 * the GNU General Public License. This exception does not however
26 * invalidate any other reasons why the executable file might be covered by
27 * the GNU General Public License.
29 * Copyright 2008 Develer S.r.l. (http://www.develer.com/)
30 * All Rights Reserved.
33 * \brief Configuration file for serial module.
35 * \author Daniele Basile <asterix@develer.com>
42 * Example of setting for serial port and
44 * Edit these define for your project.
49 * $WIZ$ type = "boolean"
50 * $WIZ$ supports = "xmega"
52 #define CONFIG_UART0_ENABLED 1
55 * Size of the outbound FIFO buffer for port 0 [bytes].
59 #define CONFIG_UART0_TXBUFSIZE 32
62 * Size of the inbound FIFO buffer for port 0 [bytes].
66 #define CONFIG_UART0_RXBUFSIZE 32
70 * $WIZ$ type = "boolean"
71 * $WIZ$ supports = "xmega"
73 #define CONFIG_UART1_ENABLED 1
76 * Size of the outbound FIFO buffer for port 1 [bytes].
79 * $WIZ$ supports = "lm3s or lpc2 or xmega or (at91 and not atmega8 and not atmega168 and not atmega32)"
81 #define CONFIG_UART1_TXBUFSIZE 32
84 * Size of the inbound FIFO buffer for port 1 [bytes].
87 * $WIZ$ supports = "lm3s or lpc2 or xmega or (at91 and not atmega8 and not atmega168 and not atmega32)"
89 #define CONFIG_UART1_RXBUFSIZE 32
93 * $WIZ$ type = "boolean"
94 * $WIZ$ supports = "xmega and (not xmegad4)"
96 #define CONFIG_UART2_ENABLED 1
99 * Size of the outbound FIFO buffer for port 2 [bytes].
102 * $WIZ$ supports = "lm3s or lpc2 or (xmega and not xmegad4)"
104 #define CONFIG_UART2_TXBUFSIZE 32
107 * Size of the inbound FIFO buffer for port 2 [bytes].
110 * $WIZ$ supports = "lm3s or lpc2 or (xmega and not xmegad4)"
112 #define CONFIG_UART2_RXBUFSIZE 32
116 * $WIZ$ type = "boolean"
117 * $WIZ$ supports = "xmega and not xmegad4"
119 #define CONFIG_UART3_ENABLED 1
122 * Size of the outbound FIFO buffer for port 3 [bytes].
125 * $WIZ$ supports = "lpc2 or xmega and not xmegad4"
127 #define CONFIG_UART3_TXBUFSIZE 32
130 * Size of the inbound FIFO buffer for port 3 [bytes].
133 * $WIZ$ supports = "lpc2 or xmega and not xmegad4"
135 #define CONFIG_UART3_RXBUFSIZE 32
139 * $WIZ$ type = "boolean"
140 * $WIZ$ supports = "xmega and not xmegad4"
142 #define CONFIG_UART4_ENABLED 1
145 * Size of the outbound FIFO buffer for port 4 [bytes].
148 * $WIZ$ supports = "xmega and not xmegad4"
150 #define CONFIG_UART4_TXBUFSIZE 32
153 * Size of the inbound FIFO buffer for port 4 [bytes].
156 * $WIZ$ supports = "xmega and not xmegad4"
158 #define CONFIG_UART4_RXBUFSIZE 32
162 * $WIZ$ type = "boolean"
163 * $WIZ$ supports = "xmegaa1 or xmegaa3"
165 #define CONFIG_UART5_ENABLED 1
168 * Size of the outbound FIFO buffer for port 5 [bytes].
171 * $WIZ$ supports = "xmegaa1 or xmegaa3"
173 #define CONFIG_UART5_TXBUFSIZE 32
176 * Size of the inbound FIFO buffer for port 5 [bytes].
179 * $WIZ$ supports = "xmegaa1 or xmegaa3"
181 #define CONFIG_UART5_RXBUFSIZE 32
185 * $WIZ$ type = "boolean"
186 * $WIZ$ supports = "xmegaa1 or xmegaa3"
188 #define CONFIG_UART6_ENABLED 1
191 * Size of the outbound FIFO buffer for port 6 [bytes].
194 * $WIZ$ supports = "xmegaa1 or xmegaa3"
196 #define CONFIG_UART6_TXBUFSIZE 32
199 * Size of the inbound FIFO buffer for port 6 [bytes].
202 * $WIZ$ supports = "xmegaa1 or xmegaa3"
204 #define CONFIG_UART6_RXBUFSIZE 32
208 * $WIZ$ type = "boolean"
209 * $WIZ$ supports = "xmegaa1"
211 #define CONFIG_UART7_ENABLED 1
214 * Size of the outbound FIFO buffer for port 7 [bytes].
217 * $WIZ$ supports = "xmegaa1"
219 #define CONFIG_UART7_TXBUFSIZE 32
222 * Size of the inbound FIFO buffer for port 7 [bytes].
225 * $WIZ$ supports = "xmegaa1"
227 #define CONFIG_UART7_RXBUFSIZE 32
230 * Size of the outbound FIFO buffer for SPI port [bytes].
233 * $WIZ$ supports = "avr and not xmega"
235 #define CONFIG_SPI_TXBUFSIZE 32
238 * Size of the inbound FIFO buffer for SPI port [bytes].
241 * $WIZ$ supports = "avr and not xmega"
243 #define CONFIG_SPI_RXBUFSIZE 32
246 * Size of the outbound FIFO buffer for SPI port 0 [bytes].
249 * $WIZ$ supports = "at91"
251 #define CONFIG_SPI0_TXBUFSIZE 32
254 * Size of the inbound FIFO buffer for SPI port 0 [bytes].
257 * $WIZ$ supports = "at91"
259 #define CONFIG_SPI0_RXBUFSIZE 32
262 * Size of the outbound FIFO buffer for SPI port 1 [bytes].
265 * $WIZ$ supports = "at91"
267 #define CONFIG_SPI1_TXBUFSIZE 32
270 * Size of the inbound FIFO buffer for SPI port 1 [bytes].
273 * $WIZ$ supports = "at91"
275 #define CONFIG_SPI1_RXBUFSIZE 32
280 * $WIZ$ type = "enum"
281 * $WIZ$ value_list = "ser_order_bit"
282 * $WIZ$ supports = "avr and not xmega"
284 #define CONFIG_SPI_DATA_ORDER SER_MSB_FIRST
287 * SPI clock division factor.
289 * $WIZ$ supports = "avr and not xmega"
291 #define CONFIG_SPI_CLOCK_DIV 16
294 * SPI clock polarity: normal low or normal high.
295 * $WIZ$ type = "enum"
296 * $WIZ$ value_list = "ser_spi_pol"
297 * $WIZ$ supports = "avr and not xmega"
299 #define CONFIG_SPI_CLOCK_POL SPI_NORMAL_LOW
302 * SPI clock phase you can choose sample on first edge or
303 * sample on second clock edge.
304 * $WIZ$ type = "enum"
305 * $WIZ$ value_list = "ser_spi_phase"
306 * $WIZ$ supports = "avr and not xmega"
308 #define CONFIG_SPI_CLOCK_PHASE SPI_SAMPLE_ON_FIRST_EDGE
311 * Default transmit timeout (ms). Set to -1 to disable timeout support.
315 #define CONFIG_SER_TXTIMEOUT -1
318 * Default receive timeout (ms). Set to -1 to disable timeout support.
322 #define CONFIG_SER_RXTIMEOUT -1
325 * Use RTS/CTS handshake.
326 * $WIZ$ type = "boolean"
327 * $WIZ$ supports = "False"
329 #define CONFIG_SER_HWHANDSHAKE 0
332 * Default baudrate for all serial ports (set to 0 to disable).
336 #define CONFIG_SER_DEFBAUDRATE 0UL
338 /// Enable strobe pin for debugging serial interrupt. $WIZ$ type = "boolean"
339 #define CONFIG_SER_STROBE 0
341 #endif /* CFG_SER_H */