Update some triface preset.
[bertos.git] / boards / triface / benchmark / triface_context_switch / cfg / cfg_ser.h
1 /**
2  * \file
3  * <!--
4  * This file is part of BeRTOS.
5  *
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.
10  *
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.
15  *
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
19  *
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.
28  *
29  * Copyright 2008 Develer S.r.l. (http://www.develer.com/)
30  * All Rights Reserved.
31  * -->
32  *
33  * \brief Configuration file for serial module.
34  *
35  * \author Daniele Basile <asterix@develer.com>
36  */
37
38 #ifndef CFG_SER_H
39 #define CFG_SER_H
40
41 /**
42  * Example of setting for serial port and
43  * spi port.
44  * Edit these define for your project.
45  */
46
47 /**
48  * Enable port 0
49  * $WIZ$ type = "boolean"
50  * $WIZ$ supports = "xmega"
51  */
52 #define CONFIG_UART0_ENABLED 1
53
54 /**
55  * Size of the outbound FIFO buffer for port 0 [bytes].
56  * $WIZ$ type = "int"
57  * $WIZ$ min = 2
58  */
59 #define CONFIG_UART0_TXBUFSIZE  32
60
61 /**
62  * Size of the inbound FIFO buffer for port 0 [bytes].
63  * $WIZ$ type = "int"
64  * $WIZ$ min = 2
65  */
66 #define CONFIG_UART0_RXBUFSIZE  32
67
68 /**
69  * Enable port 1
70  * $WIZ$ type = "boolean"
71  * $WIZ$ supports = "xmega"
72  */
73 #define CONFIG_UART1_ENABLED 1
74
75 /**
76  * Size of the outbound FIFO buffer for port 1 [bytes].
77  * $WIZ$ type = "int"
78  * $WIZ$ min = 2
79  * $WIZ$ supports = "lm3s or lpc2 or xmega or (at91 and not atmega8 and not atmega168 and not atmega32)"
80  */
81 #define CONFIG_UART1_TXBUFSIZE  32
82
83 /**
84  * Size of the inbound FIFO buffer for port 1 [bytes].
85  * $WIZ$ type = "int"
86  * $WIZ$ min = 2
87  * $WIZ$ supports = "lm3s or lpc2 or xmega or (at91 and not atmega8 and not atmega168 and not atmega32)"
88  */
89 #define CONFIG_UART1_RXBUFSIZE  32
90
91 /**
92  * Enable port 2
93  * $WIZ$ type = "boolean"
94  * $WIZ$ supports = "xmega and (not xmegad4)"
95  */
96 #define CONFIG_UART2_ENABLED 1
97
98 /**
99  * Size of the outbound FIFO buffer for port 2 [bytes].
100  * $WIZ$ type = "int"
101  * $WIZ$ min = 2
102  * $WIZ$ supports = "lm3s or lpc2 or (xmega and not xmegad4)"
103  */
104 #define CONFIG_UART2_TXBUFSIZE  32
105
106 /**
107  * Size of the inbound FIFO buffer for port 2 [bytes].
108  * $WIZ$ type = "int"
109  * $WIZ$ min = 2
110  * $WIZ$ supports = "lm3s or lpc2 or (xmega and not xmegad4)"
111  */
112 #define CONFIG_UART2_RXBUFSIZE  32
113
114 /**
115  * Enable port 3
116  * $WIZ$ type = "boolean"
117  * $WIZ$ supports = "xmega and not xmegad4"
118  */
119 #define CONFIG_UART3_ENABLED 1
120
121 /**
122  * Size of the outbound FIFO buffer for port 3 [bytes].
123  * $WIZ$ type = "int"
124  * $WIZ$ min = 2
125  * $WIZ$ supports = "lpc2 or xmega and not xmegad4"
126  */
127 #define CONFIG_UART3_TXBUFSIZE  32
128
129 /**
130  * Size of the inbound FIFO buffer for port 3 [bytes].
131  * $WIZ$ type = "int"
132  * $WIZ$ min = 2
133  * $WIZ$ supports = "lpc2 or xmega and not xmegad4"
134  */
135 #define CONFIG_UART3_RXBUFSIZE  32
136
137 /**
138  * Enable port 4
139  * $WIZ$ type = "boolean"
140  * $WIZ$ supports = "xmega and not xmegad4"
141  */
142 #define CONFIG_UART4_ENABLED 1
143
144 /**
145  * Size of the outbound FIFO buffer for port 4 [bytes].
146  * $WIZ$ type = "int"
147  * $WIZ$ min = 2
148  * $WIZ$ supports = "xmega and not xmegad4"
149  */
150 #define CONFIG_UART4_TXBUFSIZE  32
151
152 /**
153  * Size of the inbound FIFO buffer for port 4 [bytes].
154  * $WIZ$ type = "int"
155  * $WIZ$ min = 2
156  * $WIZ$ supports = "xmega and not xmegad4"
157  */
158 #define CONFIG_UART4_RXBUFSIZE  32
159
160 /**
161  * Enable port 5
162  * $WIZ$ type = "boolean"
163  * $WIZ$ supports = "xmegaa1 or xmegaa3"
164  */
165 #define CONFIG_UART5_ENABLED 1
166
167 /**
168  * Size of the outbound FIFO buffer for port 5 [bytes].
169  * $WIZ$ type = "int"
170  * $WIZ$ min = 2
171  * $WIZ$ supports = "xmegaa1 or xmegaa3"
172  */
173 #define CONFIG_UART5_TXBUFSIZE  32
174
175 /**
176  * Size of the inbound FIFO buffer for port 5 [bytes].
177  * $WIZ$ type = "int"
178  * $WIZ$ min = 2
179  * $WIZ$ supports = "xmegaa1 or xmegaa3"
180  */
181 #define CONFIG_UART5_RXBUFSIZE  32
182
183 /**
184  * Enable port 6
185  * $WIZ$ type = "boolean"
186  * $WIZ$ supports = "xmegaa1 or xmegaa3"
187  */
188 #define CONFIG_UART6_ENABLED 1
189
190 /**
191  * Size of the outbound FIFO buffer for port 6 [bytes].
192  * $WIZ$ type = "int"
193  * $WIZ$ min = 2
194  * $WIZ$ supports = "xmegaa1 or xmegaa3"
195  */
196 #define CONFIG_UART6_TXBUFSIZE  32
197
198 /**
199  * Size of the inbound FIFO buffer for port 6 [bytes].
200  * $WIZ$ type = "int"
201  * $WIZ$ min = 2
202  * $WIZ$ supports = "xmegaa1 or xmegaa3"
203  */
204 #define CONFIG_UART6_RXBUFSIZE  32
205
206 /**
207  * Enable port 7
208  * $WIZ$ type = "boolean"
209  * $WIZ$ supports = "xmegaa1"
210  */
211 #define CONFIG_UART7_ENABLED 1
212
213 /**
214  * Size of the outbound FIFO buffer for port 7 [bytes].
215  * $WIZ$ type = "int"
216  * $WIZ$ min = 2
217  * $WIZ$ supports = "xmegaa1"
218  */
219 #define CONFIG_UART7_TXBUFSIZE  32
220
221 /**
222  * Size of the inbound FIFO buffer for port 7 [bytes].
223  * $WIZ$ type = "int"
224  * $WIZ$ min = 2
225  * $WIZ$ supports = "xmegaa1"
226  */
227 #define CONFIG_UART7_RXBUFSIZE  32
228
229 /**
230  * Size of the outbound FIFO buffer for SPI port [bytes].
231  * $WIZ$ type = "int"
232  * $WIZ$ min = 2
233  * $WIZ$ supports = "avr and not xmega"
234  */
235 #define CONFIG_SPI_TXBUFSIZE    32
236
237 /**
238  * Size of the inbound FIFO buffer for SPI port [bytes].
239  * $WIZ$ type = "int"
240  * $WIZ$ min = 2
241  * $WIZ$ supports = "avr and not xmega"
242  */
243 #define CONFIG_SPI_RXBUFSIZE    32
244
245 /**
246  * Size of the outbound FIFO buffer for SPI port 0 [bytes].
247  * $WIZ$ type = "int"
248  * $WIZ$ min = 2
249  * $WIZ$ supports = "at91"
250  */
251 #define CONFIG_SPI0_TXBUFSIZE   32
252
253 /**
254  * Size of the inbound FIFO buffer for SPI port 0 [bytes].
255  * $WIZ$ type = "int"
256  * $WIZ$ min = 2
257  * $WIZ$ supports = "at91"
258  */
259 #define CONFIG_SPI0_RXBUFSIZE   32
260
261 /**
262  * Size of the outbound FIFO buffer for SPI port 1 [bytes].
263  * $WIZ$ type = "int"
264  * $WIZ$ min = 2
265  * $WIZ$ supports = "at91"
266  */
267 #define CONFIG_SPI1_TXBUFSIZE   32
268
269 /**
270  * Size of the inbound FIFO buffer for SPI port 1 [bytes].
271  * $WIZ$ type = "int"
272  * $WIZ$ min = 2
273  * $WIZ$ supports = "at91"
274  */
275 #define CONFIG_SPI1_RXBUFSIZE   32
276
277 /**
278  * SPI data order.
279  *
280  * $WIZ$ type = "enum"
281  * $WIZ$ value_list = "ser_order_bit"
282  * $WIZ$ supports = "avr and not xmega"
283  */
284 #define CONFIG_SPI_DATA_ORDER   SER_MSB_FIRST
285
286 /**
287  * SPI clock division factor.
288  * $WIZ$ type = "int"
289  * $WIZ$ supports = "avr and not xmega"
290  */
291 #define CONFIG_SPI_CLOCK_DIV    16
292
293 /**
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"
298  */
299 #define CONFIG_SPI_CLOCK_POL        SPI_NORMAL_LOW
300
301 /**
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"
307  */
308 #define CONFIG_SPI_CLOCK_PHASE      SPI_SAMPLE_ON_FIRST_EDGE
309
310 /**
311  * Default transmit timeout (ms). Set to -1 to disable timeout support.
312  * $WIZ$ type = "int"
313  * $WIZ$ min = -1
314  */
315 #define CONFIG_SER_TXTIMEOUT    -1
316
317 /**
318  * Default receive timeout (ms). Set to -1 to disable timeout support.
319  * $WIZ$ type = "int"
320  * $WIZ$ min = -1
321  */
322 #define CONFIG_SER_RXTIMEOUT    -1
323
324 /**
325  * Use RTS/CTS handshake.
326  * $WIZ$ type = "boolean"
327  * $WIZ$ supports = "False"
328  */
329 #define CONFIG_SER_HWHANDSHAKE   0
330
331 /**
332  * Default baudrate for all serial ports (set to 0 to disable).
333  * $WIZ$ type = "int"
334  * $WIZ$ min = 0
335  */
336 #define CONFIG_SER_DEFBAUDRATE   0UL
337
338 /// Enable strobe pin for debugging serial interrupt. $WIZ$ type = "boolean"
339 #define CONFIG_SER_STROBE        0
340
341 #endif /* CFG_SER_H */