OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [devs/] [serial/] [coldfire/] [mcf5272/] [current/] [src/] [mcf5272_serial.h] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
#ifndef CYGONCE_MCF5272_SERIAL_H
2
#define CYGONCE_MCF5272_SERIAL_H
3
 
4
//==========================================================================
5
//
6
//      devs/serial/coldfire/mcf5272/mcf5272_serial.h
7
//
8
//      ColdFire MCF5272 serial I/O module definitions.
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, 2006 Free Software Foundation, 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      
19
// version.                                                                 
20
//
21
// eCos is distributed in the hope that it will be useful, but WITHOUT      
22
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or    
23
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License    
24
// for more details.                                                        
25
//
26
// You should have received a copy of the GNU General Public License        
27
// along with eCos; if not, write to the Free Software Foundation, Inc.,    
28
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.            
29
//
30
// As a special exception, if other files instantiate templates or use      
31
// macros or inline functions from this file, or you compile this file      
32
// and link it with other works to produce a work based on this file,       
33
// this file does not by itself cause the resulting work to be covered by   
34
// the GNU General Public License. However the source code for this file    
35
// must still be made available in accordance with section (3) of the GNU   
36
// General Public License v2.                                               
37
//
38
// This exception does not invalidate any other reasons why a work based    
39
// on this file might be covered by the GNU General Public License.         
40
// -------------------------------------------                              
41
// ####ECOSGPLCOPYRIGHTEND####                                              
42
//==========================================================================
43
//#####DESCRIPTIONBEGIN####
44
//
45
// Author(s):    Enrico Piria, Wade Jensen
46
// Contributors: 
47
// Date:         2005-06-25
48
// Purpose:      MCF5272 serial I/O module definitions.
49
// Description: 
50
//
51
//####DESCRIPTIONEND####
52
//==========================================================================
53
 
54
 
55
#include <pkgconf/io_serial_coldfire_mcf5272.h>
56
 
57
// Bit level definitions and macros
58
#define MCF5272_UART_UMR1_RXRTS         (0x80)
59
#define MCF5272_UART_UMR1_RXIRQ         (0x40)
60
#define MCF5272_UART_UMR1_ERR           (0x20)
61
#define MCF5272_UART_UMR1_PM_MULTI_ADDR (0x1C)
62
#define MCF5272_UART_UMR1_PM_MULTI_DATA (0x18)
63
#define MCF5272_UART_UMR1_PM_NONE       (0x10)
64
#define MCF5272_UART_UMR1_PM_FORCE_HI   (0x0C)
65
#define MCF5272_UART_UMR1_PM_FORCE_LO   (0x08)
66
#define MCF5272_UART_UMR1_PM_ODD        (0x04)
67
#define MCF5272_UART_UMR1_PM_EVEN       (0x00)
68
#define MCF5272_UART_UMR1_BC_5          (0x00)
69
#define MCF5272_UART_UMR1_BC_6          (0x01)
70
#define MCF5272_UART_UMR1_BC_7          (0x02)
71
#define MCF5272_UART_UMR1_BC_8          (0x03)
72
 
73
#define MCF5272_UART_UMR2_CM_NORMAL     (0x00)
74
#define MCF5272_UART_UMR2_CM_ECHO       (0x40)
75
#define MCF5272_UART_UMR2_CM_LOCAL_LOOP (0x80)
76
#define MCF5272_UART_UMR2_CM_REMOTE_LOO (0xC0)
77
#define MCF5272_UART_UMR2_TXRTS         (0x20)
78
#define MCF5272_UART_UMR2_TXCTS         (0x10)
79
#define MCF5272_UART_UMR2_STOP_BITS_1   (0x07)
80
#define MCF5272_UART_UMR2_STOP_BITS_15  (0x08)
81
#define MCF5272_UART_UMR2_STOP_BITS_2   (0x0F)
82
// Stop Bit Length
83
#define MCF5272_UART_UMR2_STOP_BITS(a)  ((a)&0x0f)
84
 
85
#define MCF5272_UART_USR_RB             (0x80)
86
#define MCF5272_UART_USR_FE             (0x40)
87
#define MCF5272_UART_USR_PE             (0x20)
88
#define MCF5272_UART_USR_OE             (0x10)
89
#define MCF5272_UART_USR_TXEMP          (0x08)
90
#define MCF5272_UART_USR_TXRDY          (0x04)
91
#define MCF5272_UART_USR_FFULL          (0x02)
92
#define MCF5272_UART_USR_RXRDY          (0x01)
93
 
94
// Rx Clk Select
95
#define MCF5272_UART_UCSR_RCS(a)        (((a) & 0x0f) << 4)
96
// Tx Clk Select
97
#define MCF5272_UART_UCSR_TCS(a)        ((a) & 0x0f)
98
 
99
 
100
#define MCF5272_UART_UCR_NONE           (0x00)
101
#define MCF5272_UART_UCR_ENAB           (0x80)
102
#define MCF5272_UART_UCR_STOP_BREAK     (0x70)
103
#define MCF5272_UART_UCR_START_BREAK    (0x60)
104
#define MCF5272_UART_UCR_RESET_BKCHGINT (0x50)
105
#define MCF5272_UART_UCR_RESET_ERROR    (0x40)
106
#define MCF5272_UART_UCR_RESET_TX       (0x30)
107
#define MCF5272_UART_UCR_RESET_RX       (0x20)
108
#define MCF5272_UART_UCR_RESET_MR       (0x10)
109
#define MCF5272_UART_UCR_TX_DISABLED    (0x08)
110
#define MCF5272_UART_UCR_TX_ENABLED     (0x04)
111
#define MCF5272_UART_UCR_RX_DISABLED    (0x02)
112
#define MCF5272_UART_UCR_RX_ENABLED     (0x01)
113
 
114
#define MCF5272_UART_UCR_TXRXEN \
115
        (MCF5272_UART_UCR_TX_ENABLED | MCF5272_UART_UCR_RX_ENABLED)
116
 
117
#define MCF5272_UART_UCCR_COS           (0x10)
118
#define MCF5272_UART_UCCR_CTS           (0x01)
119
 
120
#define MCF5272_UART_UACR_BRG           (0x80)
121
#define MCF5272_UART_UACR_CTMS_TIMER    (0x60)
122
#define MCF5272_UART_UACR_IEC           (0x01)
123
 
124
#define MCF5272_UART_UISR_COS           (0x80)
125
#define MCF5272_UART_UISR_ABC           (0x40)
126
#define MCF5272_UART_UISR_DB            (0x04)
127
#define MCF5272_UART_UISR_RXRDY         (0x02)
128
#define MCF5272_UART_UISR_TXRDY         (0x01)
129
 
130
#define MCF5272_UART_UIMR_COS           (0x80)
131
#define MCF5272_UART_UIMR_ABC           (0x40)
132
#define MCF5272_UART_UIMR_DB            (0x04)
133
#define MCF5272_UART_UIMR_FFULL_RXRDY   (0x02)
134
#define MCF5272_UART_UIMR_TXRDY         (0x01)
135
 
136
#define MCF5272_UART_UOP0_RTS           (0x01)
137
#define MCF5272_UART_UOP1_RTS           (0x01)
138
 
139
// ---------------------------------------------------------------------------
140
// End of mcf5272_serial.h
141
#endif // CYGONCE_MCF5272_SERIAL_H

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.