add bootloader
[fpv.git] / bootloader / uart_config.h
1 /*
2  *  Copyright Droids Corporation, Microb Technology, Eirbot (2005)
3  *
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; either version 2 of the License, or
7  *  (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  *
18  *  Revision : $Id: uart_config.h,v 1.3 2009-05-27 20:04:06 zer0 Exp $
19  *
20  */
21
22 /* Droids-corp 2004 - Zer0
23  * config for uart module
24  */
25
26 #ifndef UART_CONFIG_H
27 #define UART_CONFIG_H
28
29 #if UART_NUM == 0
30
31 /* compile uart0 fonctions, undefine it to pass compilation */
32 #define UART0_COMPILE
33
34 /* enable uart0 if == 1, disable if == 0 */
35 #define UART0_ENABLED  1
36
37 /* enable uart0 interrupts if == 1, disable if == 0 */
38 #define UART0_INTERRUPT_ENABLED  1
39
40 #define UART0_BAUDRATE 57600
41
42 #define UART0_USE_DOUBLE_SPEED 0
43
44 #define UART0_RX_FIFO_SIZE 64
45 #define UART0_TX_FIFO_SIZE 16
46
47 #define UART0_NBITS 8
48 #define UART0_PARITY UART_PARTITY_NONE
49 #define UART0_STOP_BIT UART_STOP_BITS_1
50
51 #elif UART_NUM == 1
52
53 /* compile uart1 fonctions, undefine it to pass compilation */
54 #define UART1_COMPILE
55
56 /* enable uart1 if == 1, disable if == 0 */
57 #define UART1_ENABLED  1
58
59 /* enable uart1 interrupts if == 1, disable if == 0 */
60 #define UART1_INTERRUPT_ENABLED  1
61
62 #define UART1_BAUDRATE 57600
63
64 #define UART1_USE_DOUBLE_SPEED 0
65
66 #define UART1_RX_FIFO_SIZE 32
67 #define UART1_TX_FIFO_SIZE 4
68
69 #define UART1_NBITS 8
70 #define UART1_PARITY UART_PARTITY_NONE
71 #define UART1_STOP_BIT UART_STOP_BITS_1
72
73 #elif UART_NUM == 2
74
75 /* compile uart2 fonctions, undefine it to pass compilation */
76 #define UART2_COMPILE
77
78 /* enable uart2 if == 1, disable if == 0 */
79 #define UART2_ENABLED  1
80
81 /* enable uart2 interrupts if == 1, disable if == 0 */
82 #define UART2_INTERRUPT_ENABLED  1
83
84 #define UART2_BAUDRATE 57600
85
86 #define UART2_USE_DOUBLE_SPEED 0
87
88 #define UART2_RX_FIFO_SIZE 32
89 #define UART2_TX_FIFO_SIZE 4
90
91 #define UART2_NBITS 8
92 #define UART2_PARITY UART_PARTITY_NONE
93 #define UART2_STOP_BIT UART_STOP_BITS_1
94
95 #elif UART_NUM == 3
96
97 /* compile uart3 fonctions, undefine it to pass compilation */
98 #define UART3_COMPILE
99
100 /* enable uart3 if == 1, disable if == 0 */
101 #define UART3_ENABLED  1
102
103 /* enable uart3 interrupts if == 1, disable if == 0 */
104 #define UART3_INTERRUPT_ENABLED  1
105
106 #define UART3_BAUDRATE 57600
107
108 #define UART3_USE_DOUBLE_SPEED 0
109
110 #define UART3_RX_FIFO_SIZE 32
111 #define UART3_TX_FIFO_SIZE 4
112
113 #define UART3_NBITS 8
114 #define UART3_PARITY UART_PARTITY_NONE
115 #define UART3_STOP_BIT UART_STOP_BITS_1
116
117 #endif /* uart num */
118
119 #endif
120