]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/devs/serial/arm/aaed2000/v2_0/src/aaed2000_serial.h
Initial revision
[karo-tx-redboot.git] / packages / devs / serial / arm / aaed2000 / v2_0 / src / aaed2000_serial.h
1 #ifndef CYGONCE_ARM_AAED2000_SERIAL_H
2 #define CYGONCE_ARM_AAED2000_SERIAL_H
3
4 // ====================================================================
5 //
6 //      aaed2000_serial.h
7 //
8 //      Device I/O - Description of Agilent AAED2000 serial hardware
9 //
10 // ====================================================================
11 //####ECOSGPLCOPYRIGHTBEGIN####
12 // -------------------------------------------
13 // This file is part of eCos, the Embedded Configurable Operating System.
14 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
15 //
16 // eCos is free software; you can redistribute it and/or modify it under
17 // the terms of the GNU General Public License as published by the Free
18 // Software Foundation; either version 2 or (at your option) any later version.
19 //
20 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
21 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
22 // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
23 // for more details.
24 //
25 // You should have received a copy of the GNU General Public License along
26 // with eCos; if not, write to the Free Software Foundation, Inc.,
27 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
28 //
29 // As a special exception, if other files instantiate templates or use macros
30 // or inline functions from this file, or you compile this file and link it
31 // with other works to produce a work based on this file, this file does not
32 // by itself cause the resulting work to be covered by the GNU General Public
33 // License. However the source code for this file must still be made available
34 // in accordance with section (3) of the GNU General Public License.
35 //
36 // This exception does not invalidate any other reasons why a work based on
37 // this file might be covered by the GNU General Public License.
38 //
39 // Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
40 // at http://sources.redhat.com/ecos/ecos-license/
41 // -------------------------------------------
42 //####ECOSGPLCOPYRIGHTEND####
43 // ====================================================================
44 //#####DESCRIPTIONBEGIN####
45 //
46 // Author(s):   gthomas, jskov
47 // Contributors:gthomas, jskov
48 // Date:        2001-11-12
49 // Purpose:     Internal interfaces for serial I/O drivers
50 // Description:
51 //
52 //####DESCRIPTIONEND####
53 //
54 // ====================================================================
55
56 static unsigned char select_word_length[] = {
57     AAEC_UART_LCR_WL5,    // 5 bits / word (char)
58     AAEC_UART_LCR_WL6,
59     AAEC_UART_LCR_WL7,
60     AAEC_UART_LCR_WL8
61 };
62
63 static unsigned char select_stop_bits[] = {
64     0,
65     0,    // 1 stop bit
66     AAEC_UART_LCR_S2,  // 1.5 stop bit (I think)
67     AAEC_UART_LCR_S2     // 2 stop bits
68 };
69
70 static unsigned char select_parity[] = {
71     0,     // No parity
72     AAEC_UART_LCR_PEN|AAEC_UART_LCR_EP,     // Even parity
73     AAEC_UART_LCR_PEN,     // Odd parity
74     0,     // Mark parity
75     0,     // Space parity
76 };
77
78 // Baud rate values, based on 7.3728MHz clock
79 // #define BAUD_RATE(_n_) ((7372800/((_n_)*16))-1)
80
81 static unsigned short select_baud[] = {
82            0,  // Unused
83       0x23ff,  // 50
84       0x17ff,  // 75
85       0x105c,  // 110
86       0x0d60,  // 134.5
87       0x0bff,  // 150
88       0x08ff,  // 200
89       0x05ff,  // 300
90       0x02ff,  // 600
91       0x017f,  // 1200
92       0x00ff,  // 1800
93       0x00bf,  // 2400
94       0x007f,  // 3600
95       0x005f,  // 4800
96       0x003f,  // 7200
97       0x002f,  // 9600
98       0x001f,  // 14400
99       0x0017,  // 19200
100       0x000b,  // 38400
101       0x0007,  // 57600
102       0x0003,  // 115200
103       0x0001,  // 230400
104 };
105
106 #endif // CYGONCE_ARM_AAED2000_SERIAL_H