RTEMS 6.1-rc4
Loading...
Searching...
No Matches
apbuart-regs.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
11/*
12 * Copyright (C) 2021 embedded brains GmbH & Co. KG
13 *
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions
16 * are met:
17 * 1. Redistributions of source code must retain the above copyright
18 * notice, this list of conditions and the following disclaimer.
19 * 2. Redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in the
21 * documentation and/or other materials provided with the distribution.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 * POSSIBILITY OF SUCH DAMAGE.
34 */
35
36/*
37 * This file is part of the RTEMS quality process and was automatically
38 * generated. If you find something that needs to be fixed or
39 * worded better please post a report or patch to an RTEMS mailing list
40 * or raise a bug report:
41 *
42 * https://www.rtems.org/bugs.html
43 *
44 * For information on updating and regenerating please refer to the How-To
45 * section in the Software Requirements Engineering chapter of the
46 * RTEMS Software Engineering manual. The manual is provided as a part of
47 * a release. For development sources please refer to the online
48 * documentation at:
49 *
50 * https://docs.rtems.org
51 */
52
53/* Generated from spec:/dev/grlib/if/apbuart-header */
54
55#ifndef _GRLIB_APBUART_REGS_H
56#define _GRLIB_APBUART_REGS_H
57
58#include <stdint.h>
59
60#ifdef __cplusplus
61extern "C" {
62#endif
63
64/* Generated from spec:/dev/grlib/if/apbuart */
65
84#define APBUART_DATA_DATA_SHIFT 0
85#define APBUART_DATA_DATA_MASK 0xffU
86#define APBUART_DATA_DATA_GET( _reg ) \
87 ( ( ( _reg ) & APBUART_DATA_DATA_MASK ) >> \
88 APBUART_DATA_DATA_SHIFT )
89#define APBUART_DATA_DATA_SET( _reg, _val ) \
90 ( ( ( _reg ) & ~APBUART_DATA_DATA_MASK ) | \
91 ( ( ( _val ) << APBUART_DATA_DATA_SHIFT ) & \
92 APBUART_DATA_DATA_MASK ) )
93#define APBUART_DATA_DATA( _val ) \
94 ( ( ( _val ) << APBUART_DATA_DATA_SHIFT ) & \
95 APBUART_DATA_DATA_MASK )
96
107#define APBUART_STATUS_RCNT_SHIFT 26
108#define APBUART_STATUS_RCNT_MASK 0xfc000000U
109#define APBUART_STATUS_RCNT_GET( _reg ) \
110 ( ( ( _reg ) & APBUART_STATUS_RCNT_MASK ) >> \
111 APBUART_STATUS_RCNT_SHIFT )
112#define APBUART_STATUS_RCNT_SET( _reg, _val ) \
113 ( ( ( _reg ) & ~APBUART_STATUS_RCNT_MASK ) | \
114 ( ( ( _val ) << APBUART_STATUS_RCNT_SHIFT ) & \
115 APBUART_STATUS_RCNT_MASK ) )
116#define APBUART_STATUS_RCNT( _val ) \
117 ( ( ( _val ) << APBUART_STATUS_RCNT_SHIFT ) & \
118 APBUART_STATUS_RCNT_MASK )
119
120#define APBUART_STATUS_TCNT_SHIFT 20
121#define APBUART_STATUS_TCNT_MASK 0x3f00000U
122#define APBUART_STATUS_TCNT_GET( _reg ) \
123 ( ( ( _reg ) & APBUART_STATUS_TCNT_MASK ) >> \
124 APBUART_STATUS_TCNT_SHIFT )
125#define APBUART_STATUS_TCNT_SET( _reg, _val ) \
126 ( ( ( _reg ) & ~APBUART_STATUS_TCNT_MASK ) | \
127 ( ( ( _val ) << APBUART_STATUS_TCNT_SHIFT ) & \
128 APBUART_STATUS_TCNT_MASK ) )
129#define APBUART_STATUS_TCNT( _val ) \
130 ( ( ( _val ) << APBUART_STATUS_TCNT_SHIFT ) & \
131 APBUART_STATUS_TCNT_MASK )
132
133#define APBUART_STATUS_RF 0x400U
134
135#define APBUART_STATUS_TF 0x200U
136
137#define APBUART_STATUS_RH 0x100U
138
139#define APBUART_STATUS_TH 0x80U
140
141#define APBUART_STATUS_FE 0x40U
142
143#define APBUART_STATUS_PE 0x20U
144
145#define APBUART_STATUS_OV 0x10U
146
147#define APBUART_STATUS_BR 0x8U
148
149#define APBUART_STATUS_TE 0x4U
150
151#define APBUART_STATUS_TS 0x2U
152
153#define APBUART_STATUS_DR 0x1U
154
165#define APBUART_CTRL_FA 0x80000000U
166
167#define APBUART_CTRL_SI 0x4000U
168
169#define APBUART_CTRL_DI 0x2000U
170
171#define APBUART_CTRL_BI 0x1000U
172
173#define APBUART_CTRL_DB 0x800U
174
175#define APBUART_CTRL_RF 0x400U
176
177#define APBUART_CTRL_TF 0x200U
178
179#define APBUART_CTRL_EC 0x100U
180
181#define APBUART_CTRL_LB 0x80U
182
183#define APBUART_CTRL_FL 0x40U
184
185#define APBUART_CTRL_PE 0x20U
186
187#define APBUART_CTRL_PS 0x10U
188
189#define APBUART_CTRL_TI 0x8U
190
191#define APBUART_CTRL_RI 0x4U
192
193#define APBUART_CTRL_TE 0x2U
194
195#define APBUART_CTRL_RE 0x1U
196
207#define APBUART_SCALER_SCALER_RELOAD_VALUE_SHIFT 0
208#define APBUART_SCALER_SCALER_RELOAD_VALUE_MASK 0xfffffU
209#define APBUART_SCALER_SCALER_RELOAD_VALUE_GET( _reg ) \
210 ( ( ( _reg ) & APBUART_SCALER_SCALER_RELOAD_VALUE_MASK ) >> \
211 APBUART_SCALER_SCALER_RELOAD_VALUE_SHIFT )
212#define APBUART_SCALER_SCALER_RELOAD_VALUE_SET( _reg, _val ) \
213 ( ( ( _reg ) & ~APBUART_SCALER_SCALER_RELOAD_VALUE_MASK ) | \
214 ( ( ( _val ) << APBUART_SCALER_SCALER_RELOAD_VALUE_SHIFT ) & \
215 APBUART_SCALER_SCALER_RELOAD_VALUE_MASK ) )
216#define APBUART_SCALER_SCALER_RELOAD_VALUE( _val ) \
217 ( ( ( _val ) << APBUART_SCALER_SCALER_RELOAD_VALUE_SHIFT ) & \
218 APBUART_SCALER_SCALER_RELOAD_VALUE_MASK )
219
230#define APBUART_FIFO_DATA_SHIFT 0
231#define APBUART_FIFO_DATA_MASK 0xffU
232#define APBUART_FIFO_DATA_GET( _reg ) \
233 ( ( ( _reg ) & APBUART_FIFO_DATA_MASK ) >> \
234 APBUART_FIFO_DATA_SHIFT )
235#define APBUART_FIFO_DATA_SET( _reg, _val ) \
236 ( ( ( _reg ) & ~APBUART_FIFO_DATA_MASK ) | \
237 ( ( ( _val ) << APBUART_FIFO_DATA_SHIFT ) & \
238 APBUART_FIFO_DATA_MASK ) )
239#define APBUART_FIFO_DATA( _val ) \
240 ( ( ( _val ) << APBUART_FIFO_DATA_SHIFT ) & \
241 APBUART_FIFO_DATA_MASK )
242
248typedef struct apbuart {
252 uint32_t data;
253
257 uint32_t status;
258
262 uint32_t ctrl;
263
267 uint32_t scaler;
268
272 uint32_t fifo;
274
277#ifdef __cplusplus
278}
279#endif
280
281#endif /* _GRLIB_APBUART_REGS_H */
This structure defines the APBUART register block memory map.
Definition: apbuart-regs.h:248
uint32_t scaler
See UART scaler reload register (SCALER).
Definition: apbuart-regs.h:267
uint32_t status
See UART status register (STATUS).
Definition: apbuart-regs.h:257
uint32_t fifo
See UART FIFO debug register (FIFO).
Definition: apbuart-regs.h:272
uint32_t data
See UART data register (DATA).
Definition: apbuart-regs.h:252
uint32_t ctrl
See UART control register (CTRL).
Definition: apbuart-regs.h:262