RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
bsps
arm
imx
include
arm
freescale
imx
imx_uartreg.h
1
/* SPDX-License-Identifier: BSD-2-Clause */
2
3
/*
4
* Copyright (c) 2017 embedded brains GmbH & Co. KG
5
*
6
* Redistribution and use in source and binary forms, with or without
7
* modification, are permitted provided that the following conditions
8
* are met:
9
* 1. Redistributions of source code must retain the above copyright
10
* notice, this list of conditions and the following disclaimer.
11
* 2. Redistributions in binary form must reproduce the above copyright
12
* notice, this list of conditions and the following disclaimer in the
13
* documentation and/or other materials provided with the distribution.
14
*
15
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25
* POSSIBILITY OF SUCH DAMAGE.
26
*/
27
28
#ifndef IMX_UARTREG_H
29
#define IMX_UARTREG_H
30
31
#include <
bsp/utility.h
>
32
33
typedef
struct
{
34
uint32_t urxd;
35
#define IMX_UART_URXD_CHARRDY BSP_BIT32(15)
36
#define IMX_UART_URXD_ERR BSP_BIT32(14)
37
#define IMX_UART_URXD_OVRRUN BSP_BIT32(13)
38
#define IMX_UART_URXD_FRMERR BSP_BIT32(12)
39
#define IMX_UART_URXD_BRK BSP_BIT32(11)
40
#define IMX_UART_URXD_PRERR BSP_BIT32(10)
41
#define IMX_UART_URXD_RX_DATA(val) BSP_FLD32(val, 0, 7)
42
#define IMX_UART_URXD_RX_DATA_GET(reg) BSP_FLD32GET(reg, 0, 7)
43
#define IMX_UART_URXD_RX_DATA_SET(reg, val) BSP_FLD32SET(reg, val, 0, 7)
44
uint32_t reserved_04[15];
45
uint32_t utxd;
46
#define IMX_UART_UTXD_TX_DATA(val) BSP_FLD32(val, 0, 7)
47
#define IMX_UART_UTXD_TX_DATA_GET(reg) BSP_FLD32GET(reg, 0, 7)
48
#define IMX_UART_UTXD_TX_DATA_SET(reg, val) BSP_FLD32SET(reg, val, 0, 7)
49
uint32_t reserved_44[15];
50
uint32_t ucr1;
51
#define IMX_UART_UCR1_ADEN BSP_BIT32(15)
52
#define IMX_UART_UCR1_ADBR BSP_BIT32(14)
53
#define IMX_UART_UCR1_TRDYEN BSP_BIT32(13)
54
#define IMX_UART_UCR1_IDEN BSP_BIT32(12)
55
#define IMX_UART_UCR1_ICD(val) BSP_FLD32(val, 10, 11)
56
#define IMX_UART_UCR1_ICD_GET(reg) BSP_FLD32GET(reg, 10, 11)
57
#define IMX_UART_UCR1_ICD_SET(reg, val) BSP_FLD32SET(reg, val, 10, 11)
58
#define IMX_UART_UCR1_RRDYEN BSP_BIT32(9)
59
#define IMX_UART_UCR1_RXDMAEN BSP_BIT32(8)
60
#define IMX_UART_UCR1_IREN BSP_BIT32(7)
61
#define IMX_UART_UCR1_TXMPTYEN BSP_BIT32(6)
62
#define IMX_UART_UCR1_RTSDEN BSP_BIT32(5)
63
#define IMX_UART_UCR1_SNDBRK BSP_BIT32(4)
64
#define IMX_UART_UCR1_TXDMAEN BSP_BIT32(3)
65
#define IMX_UART_UCR1_ATDMAEN BSP_BIT32(2)
66
#define IMX_UART_UCR1_DOZE BSP_BIT32(1)
67
#define IMX_UART_UCR1_UARTEN BSP_BIT32(0)
68
uint32_t ucr2;
69
#define IMX_UART_UCR2_ESCI BSP_BIT32(15)
70
#define IMX_UART_UCR2_IRTS BSP_BIT32(14)
71
#define IMX_UART_UCR2_CTSC BSP_BIT32(13)
72
#define IMX_UART_UCR2_CTS BSP_BIT32(12)
73
#define IMX_UART_UCR2_ESCEN BSP_BIT32(11)
74
#define IMX_UART_UCR2_RTEC(val) BSP_FLD32(val, 9, 10)
75
#define IMX_UART_UCR2_RTEC_GET(reg) BSP_FLD32GET(reg, 9, 10)
76
#define IMX_UART_UCR2_RTEC_SET(reg, val) BSP_FLD32SET(reg, val, 9, 10)
77
#define IMX_UART_UCR2_PREN BSP_BIT32(8)
78
#define IMX_UART_UCR2_PROE BSP_BIT32(7)
79
#define IMX_UART_UCR2_STPB BSP_BIT32(6)
80
#define IMX_UART_UCR2_WS BSP_BIT32(5)
81
#define IMX_UART_UCR2_RTSEN BSP_BIT32(4)
82
#define IMX_UART_UCR2_ATEN BSP_BIT32(3)
83
#define IMX_UART_UCR2_TXEN BSP_BIT32(2)
84
#define IMX_UART_UCR2_RXEN BSP_BIT32(1)
85
#define IMX_UART_UCR2_SRST BSP_BIT32(0)
86
uint32_t ucr3;
87
#define IMX_UART_UCR3_DPEC(val) BSP_FLD32(val, 14, 15)
88
#define IMX_UART_UCR3_DPEC_GET(reg) BSP_FLD32GET(reg, 14, 15)
89
#define IMX_UART_UCR3_DPEC_SET(reg, val) BSP_FLD32SET(reg, val, 14, 15)
90
#define IMX_UART_UCR3_DTREN BSP_BIT32(13)
91
#define IMX_UART_UCR3_PARERREN BSP_BIT32(12)
92
#define IMX_UART_UCR3_FRAERREN BSP_BIT32(11)
93
#define IMX_UART_UCR3_DSR BSP_BIT32(10)
94
#define IMX_UART_UCR3_DCD BSP_BIT32(9)
95
#define IMX_UART_UCR3_RI BSP_BIT32(8)
96
#define IMX_UART_UCR3_ADNIMP BSP_BIT32(7)
97
#define IMX_UART_UCR3_RXDSEN BSP_BIT32(6)
98
#define IMX_UART_UCR3_AIRINTEN BSP_BIT32(5)
99
#define IMX_UART_UCR3_AWAKEN BSP_BIT32(4)
100
#define IMX_UART_UCR3_DTRDEN BSP_BIT32(3)
101
#define IMX_UART_UCR3_RXDMUXSEL BSP_BIT32(2)
102
#define IMX_UART_UCR3_INVT BSP_BIT32(1)
103
#define IMX_UART_UCR3_ACIEN BSP_BIT32(0)
104
uint32_t ucr4;
105
#define IMX_UART_UCR4_CTSTL(val) BSP_FLD32(val, 10, 15)
106
#define IMX_UART_UCR4_CTSTL_GET(reg) BSP_FLD32GET(reg, 10, 15)
107
#define IMX_UART_UCR4_CTSTL_SET(reg, val) BSP_FLD32SET(reg, val, 10, 15)
108
#define IMX_UART_UCR4_INVR BSP_BIT32(9)
109
#define IMX_UART_UCR4_ENIRI BSP_BIT32(8)
110
#define IMX_UART_UCR4_WKEN BSP_BIT32(7)
111
#define IMX_UART_UCR4_IDDMAEN BSP_BIT32(6)
112
#define IMX_UART_UCR4_IRSC BSP_BIT32(5)
113
#define IMX_UART_UCR4_LPBYP BSP_BIT32(4)
114
#define IMX_UART_UCR4_TCEN BSP_BIT32(3)
115
#define IMX_UART_UCR4_BKEN BSP_BIT32(2)
116
#define IMX_UART_UCR4_OREN BSP_BIT32(1)
117
#define IMX_UART_UCR4_DREN BSP_BIT32(0)
118
uint32_t ufcr;
119
#define IMX_UART_UFCR_TXTL(val) BSP_FLD32(val, 10, 15)
120
#define IMX_UART_UFCR_TXTL_GET(reg) BSP_FLD32GET(reg, 10, 15)
121
#define IMX_UART_UFCR_TXTL_SET(reg, val) BSP_FLD32SET(reg, val, 10, 15)
122
#define IMX_UART_UFCR_RFDIV(val) BSP_FLD32(val, 7, 9)
123
#define IMX_UART_UFCR_RFDIV_GET(reg) BSP_FLD32GET(reg, 7, 9)
124
#define IMX_UART_UFCR_RFDIV_SET(reg, val) BSP_FLD32SET(reg, val, 7, 9)
125
#define IMX_UART_UFCR_DCEDTE BSP_BIT32(6)
126
#define IMX_UART_UFCR_RXTL(val) BSP_FLD32(val, 0, 5)
127
#define IMX_UART_UFCR_RXTL_GET(reg) BSP_FLD32GET(reg, 0, 5)
128
#define IMX_UART_UFCR_RXTL_SET(reg, val) BSP_FLD32SET(reg, val, 0, 5)
129
uint32_t usr1;
130
#define IMX_UART_USR1_PARITYERR BSP_BIT32(15)
131
#define IMX_UART_USR1_RTSS BSP_BIT32(14)
132
#define IMX_UART_USR1_TRDY BSP_BIT32(13)
133
#define IMX_UART_USR1_RTSD BSP_BIT32(12)
134
#define IMX_UART_USR1_ESCF BSP_BIT32(11)
135
#define IMX_UART_USR1_FRAMERR BSP_BIT32(10)
136
#define IMX_UART_USR1_RRDY BSP_BIT32(9)
137
#define IMX_UART_USR1_AGTIM BSP_BIT32(8)
138
#define IMX_UART_USR1_DTRD BSP_BIT32(7)
139
#define IMX_UART_USR1_RXDS BSP_BIT32(6)
140
#define IMX_UART_USR1_AIRINT BSP_BIT32(5)
141
#define IMX_UART_USR1_AWAKE BSP_BIT32(4)
142
#define IMX_UART_USR1_SAD BSP_BIT32(3)
143
uint32_t usr2;
144
#define IMX_UART_USR2_ADET BSP_BIT32(15)
145
#define IMX_UART_USR2_TXFE BSP_BIT32(14)
146
#define IMX_UART_USR2_DTRF BSP_BIT32(13)
147
#define IMX_UART_USR2_IDLE BSP_BIT32(12)
148
#define IMX_UART_USR2_ACST BSP_BIT32(11)
149
#define IMX_UART_USR2_RIDELT BSP_BIT32(10)
150
#define IMX_UART_USR2_RIIN BSP_BIT32(9)
151
#define IMX_UART_USR2_IRINT BSP_BIT32(8)
152
#define IMX_UART_USR2_WAKE BSP_BIT32(7)
153
#define IMX_UART_USR2_DCDDELT BSP_BIT32(6)
154
#define IMX_UART_USR2_DCDIN BSP_BIT32(5)
155
#define IMX_UART_USR2_RTSF BSP_BIT32(4)
156
#define IMX_UART_USR2_TXDC BSP_BIT32(3)
157
#define IMX_UART_USR2_BRCD BSP_BIT32(2)
158
#define IMX_UART_USR2_ORE BSP_BIT32(1)
159
#define IMX_UART_USR2_RDR BSP_BIT32(0)
160
uint32_t uesc;
161
uint32_t utim;
162
uint32_t ubir;
163
uint32_t ubmr;
164
uint32_t ubrc;
165
uint32_t onems;
166
uint32_t uts;
167
#define IMX_UART_UTS_FRCPERR BSP_BIT32(13)
168
#define IMX_UART_UTS_LOOP BSP_BIT32(12)
169
#define IMX_UART_UTS_DBGEN BSP_BIT32(11)
170
#define IMX_UART_UTS_LOOPIR BSP_BIT32(10)
171
#define IMX_UART_UTS_RXDBG BSP_BIT32(9)
172
#define IMX_UART_UTS_TXEMPTY BSP_BIT32(6)
173
#define IMX_UART_UTS_RXEMPTY BSP_BIT32(5)
174
#define IMX_UART_UTS_TXFULL BSP_BIT32(4)
175
#define IMX_UART_UTS_RXFULL BSP_BIT32(3)
176
#define IMX_UART_UTS_SOFTRST BSP_BIT32(0)
177
uint32_t umcr;
178
#define IMX_UART_UMCR_SLADDR(val) BSP_FLD32(val, 8, 15)
179
#define IMX_UART_UMCR_SLADDR_GET(reg) BSP_FLD32GET(reg, 8, 15)
180
#define IMX_UART_UMCR_SLADDR_SET(reg, val) BSP_FLD32SET(reg, val, 8, 15)
181
#define IMX_UART_UMCR_SADEN BSP_BIT32(3)
182
#define IMX_UART_UMCR_TXB8 BSP_BIT32(2)
183
#define IMX_UART_UMCR_SLAM BSP_BIT32(1)
184
#define IMX_UART_UMCR_MDEN BSP_BIT32(0)
185
}
imx_uart
;
186
187
#endif
/* IMX_UARTREG_H */
utility.h
This header file provides utility macros for BSPs.
imx_uart
Definition
imx_uartreg.h:33
Generated by
1.18.0