55#ifndef _GRLIB_APBUART_REGS_H
56#define _GRLIB_APBUART_REGS_H
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 )
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 )
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 )
133#define APBUART_STATUS_RF 0x400U
135#define APBUART_STATUS_TF 0x200U
137#define APBUART_STATUS_RH 0x100U
139#define APBUART_STATUS_TH 0x80U
141#define APBUART_STATUS_FE 0x40U
143#define APBUART_STATUS_PE 0x20U
145#define APBUART_STATUS_OV 0x10U
147#define APBUART_STATUS_BR 0x8U
149#define APBUART_STATUS_TE 0x4U
151#define APBUART_STATUS_TS 0x2U
153#define APBUART_STATUS_DR 0x1U
165#define APBUART_CTRL_FA 0x80000000U
167#define APBUART_CTRL_SI 0x4000U
169#define APBUART_CTRL_DI 0x2000U
171#define APBUART_CTRL_BI 0x1000U
173#define APBUART_CTRL_DB 0x800U
175#define APBUART_CTRL_RF 0x400U
177#define APBUART_CTRL_TF 0x200U
179#define APBUART_CTRL_EC 0x100U
181#define APBUART_CTRL_LB 0x80U
183#define APBUART_CTRL_FL 0x40U
185#define APBUART_CTRL_PE 0x20U
187#define APBUART_CTRL_PS 0x10U
189#define APBUART_CTRL_TI 0x8U
191#define APBUART_CTRL_RI 0x4U
193#define APBUART_CTRL_TE 0x2U
195#define APBUART_CTRL_RE 0x1U
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 )
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 )
struct apbuart apbuart
This structure defines the APBUART register block memory map.
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