]> git.donarmstrong.com Git - qmk_firmware.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K22F/device/MK22F51212/MK22F51212_lpuart.h
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[qmk_firmware.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / hal / TARGET_Freescale / TARGET_KPSDK_MCUS / TARGET_K22F / device / MK22F51212 / MK22F51212_lpuart.h
1 /*
2 ** ###################################################################
3 **     Compilers:           Keil ARM C/C++ Compiler
4 **                          Freescale C/C++ for Embedded ARM
5 **                          GNU C Compiler
6 **                          IAR ANSI C/C++ Compiler for ARM
7 **
8 **     Reference manual:    K22P121M120SF7RM, Rev. 1, March 24, 2014
9 **     Version:             rev. 2.5, 2014-05-06
10 **     Build:               b140604
11 **
12 **     Abstract:
13 **         Extension to the CMSIS register access layer header.
14 **
15 **     Copyright (c) 2014 Freescale Semiconductor, Inc.
16 **     All rights reserved.
17 **
18 **     Redistribution and use in source and binary forms, with or without modification,
19 **     are permitted provided that the following conditions are met:
20 **
21 **     o Redistributions of source code must retain the above copyright notice, this list
22 **       of conditions and the following disclaimer.
23 **
24 **     o Redistributions in binary form must reproduce the above copyright notice, this
25 **       list of conditions and the following disclaimer in the documentation and/or
26 **       other materials provided with the distribution.
27 **
28 **     o Neither the name of Freescale Semiconductor, Inc. nor the names of its
29 **       contributors may be used to endorse or promote products derived from this
30 **       software without specific prior written permission.
31 **
32 **     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
33 **     ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
34 **     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
35 **     DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
36 **     ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
37 **     (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
38 **     LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
39 **     ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
40 **     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
41 **     SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 **
43 **     http:                 www.freescale.com
44 **     mail:                 support@freescale.com
45 **
46 **     Revisions:
47 **     - rev. 1.0 (2013-07-23)
48 **         Initial version.
49 **     - rev. 1.1 (2013-09-17)
50 **         RM rev. 0.4 update.
51 **     - rev. 2.0 (2013-10-29)
52 **         Register accessor macros added to the memory map.
53 **         Symbols for Processor Expert memory map compatibility added to the memory map.
54 **         Startup file for gcc has been updated according to CMSIS 3.2.
55 **         System initialization updated.
56 **     - rev. 2.1 (2013-10-30)
57 **         Definition of BITBAND macros updated to support peripherals with 32-bit acces disabled.
58 **     - rev. 2.2 (2013-12-20)
59 **         Update according to reference manual rev. 0.6,
60 **     - rev. 2.3 (2014-01-13)
61 **         Update according to reference manual rev. 0.61,
62 **     - rev. 2.4 (2014-02-10)
63 **         The declaration of clock configurations has been moved to separate header file system_MK22F51212.h
64 **     - rev. 2.5 (2014-05-06)
65 **         Update according to reference manual rev. 1.0,
66 **         Update of system and startup files.
67 **         Module access macro module_BASES replaced by module_BASE_PTRS.
68 **
69 ** ###################################################################
70 */
71
72 /*
73  * WARNING! DO NOT EDIT THIS FILE DIRECTLY!
74  *
75  * This file was generated automatically and any changes may be lost.
76  */
77 #ifndef __HW_LPUART_REGISTERS_H__
78 #define __HW_LPUART_REGISTERS_H__
79
80 #include "MK22F51212.h"
81 #include "fsl_bitaccess.h"
82
83 /*
84  * MK22F51212 LPUART
85  *
86  * Universal Asynchronous Receiver/Transmitter
87  *
88  * Registers defined in this header file:
89  * - HW_LPUART_BAUD - LPUART Baud Rate Register
90  * - HW_LPUART_STAT - LPUART Status Register
91  * - HW_LPUART_CTRL - LPUART Control Register
92  * - HW_LPUART_DATA - LPUART Data Register
93  * - HW_LPUART_MATCH - LPUART Match Address Register
94  * - HW_LPUART_MODIR - LPUART Modem IrDA Register
95  *
96  * - hw_lpuart_t - Struct containing all module registers.
97  */
98
99 #define HW_LPUART_INSTANCE_COUNT (1U) /*!< Number of instances of the LPUART module. */
100
101 /*******************************************************************************
102  * HW_LPUART_BAUD - LPUART Baud Rate Register
103  ******************************************************************************/
104
105 /*!
106  * @brief HW_LPUART_BAUD - LPUART Baud Rate Register (RW)
107  *
108  * Reset value: 0x0F000004U
109  */
110 typedef union _hw_lpuart_baud
111 {
112     uint32_t U;
113     struct _hw_lpuart_baud_bitfields
114     {
115         uint32_t SBR : 13;             /*!< [12:0] Baud Rate Modulo Divisor. */
116         uint32_t SBNS : 1;             /*!< [13] Stop Bit Number Select */
117         uint32_t RXEDGIE : 1;          /*!< [14] RX Input Active Edge Interrupt Enable
118                                         * */
119         uint32_t LBKDIE : 1;           /*!< [15] LIN Break Detect Interrupt Enable */
120         uint32_t RESYNCDIS : 1;        /*!< [16] Resynchronization Disable */
121         uint32_t BOTHEDGE : 1;         /*!< [17] Both Edge Sampling */
122         uint32_t MATCFG : 2;           /*!< [19:18] Match Configuration */
123         uint32_t RESERVED0 : 1;        /*!< [20]  */
124         uint32_t RDMAE : 1;            /*!< [21] Receiver Full DMA Enable */
125         uint32_t RESERVED1 : 1;        /*!< [22]  */
126         uint32_t TDMAE : 1;            /*!< [23] Transmitter DMA Enable */
127         uint32_t OSR : 5;              /*!< [28:24] Over Sampling Ratio */
128         uint32_t M10 : 1;              /*!< [29] 10-bit Mode select */
129         uint32_t MAEN2 : 1;            /*!< [30] Match Address Mode Enable 2 */
130         uint32_t MAEN1 : 1;            /*!< [31] Match Address Mode Enable 1 */
131     } B;
132 } hw_lpuart_baud_t;
133
134 /*!
135  * @name Constants and macros for entire LPUART_BAUD register
136  */
137 /*@{*/
138 #define HW_LPUART_BAUD_ADDR(x)   ((x) + 0x0U)
139
140 #define HW_LPUART_BAUD(x)        (*(__IO hw_lpuart_baud_t *) HW_LPUART_BAUD_ADDR(x))
141 #define HW_LPUART_BAUD_RD(x)     (HW_LPUART_BAUD(x).U)
142 #define HW_LPUART_BAUD_WR(x, v)  (HW_LPUART_BAUD(x).U = (v))
143 #define HW_LPUART_BAUD_SET(x, v) (HW_LPUART_BAUD_WR(x, HW_LPUART_BAUD_RD(x) |  (v)))
144 #define HW_LPUART_BAUD_CLR(x, v) (HW_LPUART_BAUD_WR(x, HW_LPUART_BAUD_RD(x) & ~(v)))
145 #define HW_LPUART_BAUD_TOG(x, v) (HW_LPUART_BAUD_WR(x, HW_LPUART_BAUD_RD(x) ^  (v)))
146 /*@}*/
147
148 /*
149  * Constants & macros for individual LPUART_BAUD bitfields
150  */
151
152 /*!
153  * @name Register LPUART_BAUD, field SBR[12:0] (RW)
154  *
155  * The 13 bits in SBR[12:0] set the modulo divide rate for the baud rate
156  * generator. When SBR is 1 - 8191, the baud rate equals "baud clock / ((OSR+1) * SBR)".
157  * The 13-bit baud rate setting [SBR12:SBR0] must only be updated when the
158  * transmitter and receiver are both disabled (LPUART_CTRL[RE] and LPUART_CTRL[TE] are
159  * both 0).
160  */
161 /*@{*/
162 #define BP_LPUART_BAUD_SBR   (0U)          /*!< Bit position for LPUART_BAUD_SBR. */
163 #define BM_LPUART_BAUD_SBR   (0x00001FFFU) /*!< Bit mask for LPUART_BAUD_SBR. */
164 #define BS_LPUART_BAUD_SBR   (13U)         /*!< Bit field size in bits for LPUART_BAUD_SBR. */
165
166 /*! @brief Read current value of the LPUART_BAUD_SBR field. */
167 #define BR_LPUART_BAUD_SBR(x) (HW_LPUART_BAUD(x).B.SBR)
168
169 /*! @brief Format value for bitfield LPUART_BAUD_SBR. */
170 #define BF_LPUART_BAUD_SBR(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_BAUD_SBR) & BM_LPUART_BAUD_SBR)
171
172 /*! @brief Set the SBR field to a new value. */
173 #define BW_LPUART_BAUD_SBR(x, v) (HW_LPUART_BAUD_WR(x, (HW_LPUART_BAUD_RD(x) & ~BM_LPUART_BAUD_SBR) | BF_LPUART_BAUD_SBR(v)))
174 /*@}*/
175
176 /*!
177  * @name Register LPUART_BAUD, field SBNS[13] (RW)
178  *
179  * SBNS determines whether data characters are one or two stop bits. This bit
180  * should only be changed when the transmitter and receiver are both disabled.
181  *
182  * Values:
183  * - 0 - One stop bit.
184  * - 1 - Two stop bits.
185  */
186 /*@{*/
187 #define BP_LPUART_BAUD_SBNS  (13U)         /*!< Bit position for LPUART_BAUD_SBNS. */
188 #define BM_LPUART_BAUD_SBNS  (0x00002000U) /*!< Bit mask for LPUART_BAUD_SBNS. */
189 #define BS_LPUART_BAUD_SBNS  (1U)          /*!< Bit field size in bits for LPUART_BAUD_SBNS. */
190
191 /*! @brief Read current value of the LPUART_BAUD_SBNS field. */
192 #define BR_LPUART_BAUD_SBNS(x) (BITBAND_ACCESS32(HW_LPUART_BAUD_ADDR(x), BP_LPUART_BAUD_SBNS))
193
194 /*! @brief Format value for bitfield LPUART_BAUD_SBNS. */
195 #define BF_LPUART_BAUD_SBNS(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_BAUD_SBNS) & BM_LPUART_BAUD_SBNS)
196
197 /*! @brief Set the SBNS field to a new value. */
198 #define BW_LPUART_BAUD_SBNS(x, v) (BITBAND_ACCESS32(HW_LPUART_BAUD_ADDR(x), BP_LPUART_BAUD_SBNS) = (v))
199 /*@}*/
200
201 /*!
202  * @name Register LPUART_BAUD, field RXEDGIE[14] (RW)
203  *
204  * Enables the receive input active edge, RXEDGIF, to generate interrupt
205  * requests. Changing CTRL[LOOP] or CTRL[RSRC] when RXEDGIE is set can cause the RXEDGIF
206  * to set.
207  *
208  * Values:
209  * - 0 - Hardware interrupts from LPUART_STAT[RXEDGIF] disabled (use polling).
210  * - 1 - Hardware interrupt requested when LPUART_STAT[RXEDGIF] flag is 1.
211  */
212 /*@{*/
213 #define BP_LPUART_BAUD_RXEDGIE (14U)       /*!< Bit position for LPUART_BAUD_RXEDGIE. */
214 #define BM_LPUART_BAUD_RXEDGIE (0x00004000U) /*!< Bit mask for LPUART_BAUD_RXEDGIE. */
215 #define BS_LPUART_BAUD_RXEDGIE (1U)        /*!< Bit field size in bits for LPUART_BAUD_RXEDGIE. */
216
217 /*! @brief Read current value of the LPUART_BAUD_RXEDGIE field. */
218 #define BR_LPUART_BAUD_RXEDGIE(x) (BITBAND_ACCESS32(HW_LPUART_BAUD_ADDR(x), BP_LPUART_BAUD_RXEDGIE))
219
220 /*! @brief Format value for bitfield LPUART_BAUD_RXEDGIE. */
221 #define BF_LPUART_BAUD_RXEDGIE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_BAUD_RXEDGIE) & BM_LPUART_BAUD_RXEDGIE)
222
223 /*! @brief Set the RXEDGIE field to a new value. */
224 #define BW_LPUART_BAUD_RXEDGIE(x, v) (BITBAND_ACCESS32(HW_LPUART_BAUD_ADDR(x), BP_LPUART_BAUD_RXEDGIE) = (v))
225 /*@}*/
226
227 /*!
228  * @name Register LPUART_BAUD, field LBKDIE[15] (RW)
229  *
230  * LBKDIE enables the LIN break detect flag, LBKDIF, to generate interrupt
231  * requests.
232  *
233  * Values:
234  * - 0 - Hardware interrupts from LPUART_STAT[LBKDIF] disabled (use polling).
235  * - 1 - Hardware interrupt requested when LPUART_STAT[LBKDIF] flag is 1.
236  */
237 /*@{*/
238 #define BP_LPUART_BAUD_LBKDIE (15U)        /*!< Bit position for LPUART_BAUD_LBKDIE. */
239 #define BM_LPUART_BAUD_LBKDIE (0x00008000U) /*!< Bit mask for LPUART_BAUD_LBKDIE. */
240 #define BS_LPUART_BAUD_LBKDIE (1U)         /*!< Bit field size in bits for LPUART_BAUD_LBKDIE. */
241
242 /*! @brief Read current value of the LPUART_BAUD_LBKDIE field. */
243 #define BR_LPUART_BAUD_LBKDIE(x) (BITBAND_ACCESS32(HW_LPUART_BAUD_ADDR(x), BP_LPUART_BAUD_LBKDIE))
244
245 /*! @brief Format value for bitfield LPUART_BAUD_LBKDIE. */
246 #define BF_LPUART_BAUD_LBKDIE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_BAUD_LBKDIE) & BM_LPUART_BAUD_LBKDIE)
247
248 /*! @brief Set the LBKDIE field to a new value. */
249 #define BW_LPUART_BAUD_LBKDIE(x, v) (BITBAND_ACCESS32(HW_LPUART_BAUD_ADDR(x), BP_LPUART_BAUD_LBKDIE) = (v))
250 /*@}*/
251
252 /*!
253  * @name Register LPUART_BAUD, field RESYNCDIS[16] (RW)
254  *
255  * When set, disables the resynchronization of the received data word when a
256  * data one followed by data zero transition is detected. This bit should only be
257  * changed when the receiver is disabled.
258  *
259  * Values:
260  * - 0 - Resynchronization during received data word is supported
261  * - 1 - Resynchronization during received data word is disabled
262  */
263 /*@{*/
264 #define BP_LPUART_BAUD_RESYNCDIS (16U)     /*!< Bit position for LPUART_BAUD_RESYNCDIS. */
265 #define BM_LPUART_BAUD_RESYNCDIS (0x00010000U) /*!< Bit mask for LPUART_BAUD_RESYNCDIS. */
266 #define BS_LPUART_BAUD_RESYNCDIS (1U)      /*!< Bit field size in bits for LPUART_BAUD_RESYNCDIS. */
267
268 /*! @brief Read current value of the LPUART_BAUD_RESYNCDIS field. */
269 #define BR_LPUART_BAUD_RESYNCDIS(x) (BITBAND_ACCESS32(HW_LPUART_BAUD_ADDR(x), BP_LPUART_BAUD_RESYNCDIS))
270
271 /*! @brief Format value for bitfield LPUART_BAUD_RESYNCDIS. */
272 #define BF_LPUART_BAUD_RESYNCDIS(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_BAUD_RESYNCDIS) & BM_LPUART_BAUD_RESYNCDIS)
273
274 /*! @brief Set the RESYNCDIS field to a new value. */
275 #define BW_LPUART_BAUD_RESYNCDIS(x, v) (BITBAND_ACCESS32(HW_LPUART_BAUD_ADDR(x), BP_LPUART_BAUD_RESYNCDIS) = (v))
276 /*@}*/
277
278 /*!
279  * @name Register LPUART_BAUD, field BOTHEDGE[17] (RW)
280  *
281  * Enables sampling of the received data on both edges of the baud rate clock,
282  * effectively doubling the number of times the receiver samples the input data
283  * for a given oversampling ratio. This bit must be set for oversampling ratios
284  * between x4 and x7 and is optional for higher oversampling ratios. This bit should
285  * only be changed when the receiver is disabled.
286  *
287  * Values:
288  * - 0 - Receiver samples input data using the rising edge of the baud rate
289  *     clock.
290  * - 1 - Receiver samples input data using the rising and falling edge of the
291  *     baud rate clock.
292  */
293 /*@{*/
294 #define BP_LPUART_BAUD_BOTHEDGE (17U)      /*!< Bit position for LPUART_BAUD_BOTHEDGE. */
295 #define BM_LPUART_BAUD_BOTHEDGE (0x00020000U) /*!< Bit mask for LPUART_BAUD_BOTHEDGE. */
296 #define BS_LPUART_BAUD_BOTHEDGE (1U)       /*!< Bit field size in bits for LPUART_BAUD_BOTHEDGE. */
297
298 /*! @brief Read current value of the LPUART_BAUD_BOTHEDGE field. */
299 #define BR_LPUART_BAUD_BOTHEDGE(x) (BITBAND_ACCESS32(HW_LPUART_BAUD_ADDR(x), BP_LPUART_BAUD_BOTHEDGE))
300
301 /*! @brief Format value for bitfield LPUART_BAUD_BOTHEDGE. */
302 #define BF_LPUART_BAUD_BOTHEDGE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_BAUD_BOTHEDGE) & BM_LPUART_BAUD_BOTHEDGE)
303
304 /*! @brief Set the BOTHEDGE field to a new value. */
305 #define BW_LPUART_BAUD_BOTHEDGE(x, v) (BITBAND_ACCESS32(HW_LPUART_BAUD_ADDR(x), BP_LPUART_BAUD_BOTHEDGE) = (v))
306 /*@}*/
307
308 /*!
309  * @name Register LPUART_BAUD, field MATCFG[19:18] (RW)
310  *
311  * Configures the match addressing mode used.
312  *
313  * Values:
314  * - 00 - Address Match Wakeup
315  * - 01 - Idle Match Wakeup
316  * - 10 - Match On and Match Off
317  * - 11 - Enables RWU on Data Match and Match On/Off for transmitter CTS input
318  */
319 /*@{*/
320 #define BP_LPUART_BAUD_MATCFG (18U)        /*!< Bit position for LPUART_BAUD_MATCFG. */
321 #define BM_LPUART_BAUD_MATCFG (0x000C0000U) /*!< Bit mask for LPUART_BAUD_MATCFG. */
322 #define BS_LPUART_BAUD_MATCFG (2U)         /*!< Bit field size in bits for LPUART_BAUD_MATCFG. */
323
324 /*! @brief Read current value of the LPUART_BAUD_MATCFG field. */
325 #define BR_LPUART_BAUD_MATCFG(x) (HW_LPUART_BAUD(x).B.MATCFG)
326
327 /*! @brief Format value for bitfield LPUART_BAUD_MATCFG. */
328 #define BF_LPUART_BAUD_MATCFG(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_BAUD_MATCFG) & BM_LPUART_BAUD_MATCFG)
329
330 /*! @brief Set the MATCFG field to a new value. */
331 #define BW_LPUART_BAUD_MATCFG(x, v) (HW_LPUART_BAUD_WR(x, (HW_LPUART_BAUD_RD(x) & ~BM_LPUART_BAUD_MATCFG) | BF_LPUART_BAUD_MATCFG(v)))
332 /*@}*/
333
334 /*!
335  * @name Register LPUART_BAUD, field RDMAE[21] (RW)
336  *
337  * RDMAE configures the receiver data register full flag, LPUART_STAT[RDRF], to
338  * generate a DMA request.
339  *
340  * Values:
341  * - 0 - DMA request disabled.
342  * - 1 - DMA request enabled.
343  */
344 /*@{*/
345 #define BP_LPUART_BAUD_RDMAE (21U)         /*!< Bit position for LPUART_BAUD_RDMAE. */
346 #define BM_LPUART_BAUD_RDMAE (0x00200000U) /*!< Bit mask for LPUART_BAUD_RDMAE. */
347 #define BS_LPUART_BAUD_RDMAE (1U)          /*!< Bit field size in bits for LPUART_BAUD_RDMAE. */
348
349 /*! @brief Read current value of the LPUART_BAUD_RDMAE field. */
350 #define BR_LPUART_BAUD_RDMAE(x) (BITBAND_ACCESS32(HW_LPUART_BAUD_ADDR(x), BP_LPUART_BAUD_RDMAE))
351
352 /*! @brief Format value for bitfield LPUART_BAUD_RDMAE. */
353 #define BF_LPUART_BAUD_RDMAE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_BAUD_RDMAE) & BM_LPUART_BAUD_RDMAE)
354
355 /*! @brief Set the RDMAE field to a new value. */
356 #define BW_LPUART_BAUD_RDMAE(x, v) (BITBAND_ACCESS32(HW_LPUART_BAUD_ADDR(x), BP_LPUART_BAUD_RDMAE) = (v))
357 /*@}*/
358
359 /*!
360  * @name Register LPUART_BAUD, field TDMAE[23] (RW)
361  *
362  * TDMAE configures the transmit data register empty flag, LPUART_STAT[TDRE], to
363  * generate a DMA request.
364  *
365  * Values:
366  * - 0 - DMA request disabled.
367  * - 1 - DMA request enabled.
368  */
369 /*@{*/
370 #define BP_LPUART_BAUD_TDMAE (23U)         /*!< Bit position for LPUART_BAUD_TDMAE. */
371 #define BM_LPUART_BAUD_TDMAE (0x00800000U) /*!< Bit mask for LPUART_BAUD_TDMAE. */
372 #define BS_LPUART_BAUD_TDMAE (1U)          /*!< Bit field size in bits for LPUART_BAUD_TDMAE. */
373
374 /*! @brief Read current value of the LPUART_BAUD_TDMAE field. */
375 #define BR_LPUART_BAUD_TDMAE(x) (BITBAND_ACCESS32(HW_LPUART_BAUD_ADDR(x), BP_LPUART_BAUD_TDMAE))
376
377 /*! @brief Format value for bitfield LPUART_BAUD_TDMAE. */
378 #define BF_LPUART_BAUD_TDMAE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_BAUD_TDMAE) & BM_LPUART_BAUD_TDMAE)
379
380 /*! @brief Set the TDMAE field to a new value. */
381 #define BW_LPUART_BAUD_TDMAE(x, v) (BITBAND_ACCESS32(HW_LPUART_BAUD_ADDR(x), BP_LPUART_BAUD_TDMAE) = (v))
382 /*@}*/
383
384 /*!
385  * @name Register LPUART_BAUD, field OSR[28:24] (RW)
386  *
387  * This field configures the oversampling ratio for the receiver between 4x
388  * (00011) and 32x (11111). Writing an invalid oversampling ratio will default to an
389  * oversampling ratio of 16 (01111). This field should only be changed when the
390  * transmitter and receiver are both disabled.
391  */
392 /*@{*/
393 #define BP_LPUART_BAUD_OSR   (24U)         /*!< Bit position for LPUART_BAUD_OSR. */
394 #define BM_LPUART_BAUD_OSR   (0x1F000000U) /*!< Bit mask for LPUART_BAUD_OSR. */
395 #define BS_LPUART_BAUD_OSR   (5U)          /*!< Bit field size in bits for LPUART_BAUD_OSR. */
396
397 /*! @brief Read current value of the LPUART_BAUD_OSR field. */
398 #define BR_LPUART_BAUD_OSR(x) (HW_LPUART_BAUD(x).B.OSR)
399
400 /*! @brief Format value for bitfield LPUART_BAUD_OSR. */
401 #define BF_LPUART_BAUD_OSR(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_BAUD_OSR) & BM_LPUART_BAUD_OSR)
402
403 /*! @brief Set the OSR field to a new value. */
404 #define BW_LPUART_BAUD_OSR(x, v) (HW_LPUART_BAUD_WR(x, (HW_LPUART_BAUD_RD(x) & ~BM_LPUART_BAUD_OSR) | BF_LPUART_BAUD_OSR(v)))
405 /*@}*/
406
407 /*!
408  * @name Register LPUART_BAUD, field M10[29] (RW)
409  *
410  * The M10 bit causes a tenth bit to be part of the serial transmission. This
411  * bit should only be changed when the transmitter and receiver are both disabled.
412  *
413  * Values:
414  * - 0 - Receiver and transmitter use 8-bit or 9-bit data characters.
415  * - 1 - Receiver and transmitter use 10-bit data characters.
416  */
417 /*@{*/
418 #define BP_LPUART_BAUD_M10   (29U)         /*!< Bit position for LPUART_BAUD_M10. */
419 #define BM_LPUART_BAUD_M10   (0x20000000U) /*!< Bit mask for LPUART_BAUD_M10. */
420 #define BS_LPUART_BAUD_M10   (1U)          /*!< Bit field size in bits for LPUART_BAUD_M10. */
421
422 /*! @brief Read current value of the LPUART_BAUD_M10 field. */
423 #define BR_LPUART_BAUD_M10(x) (BITBAND_ACCESS32(HW_LPUART_BAUD_ADDR(x), BP_LPUART_BAUD_M10))
424
425 /*! @brief Format value for bitfield LPUART_BAUD_M10. */
426 #define BF_LPUART_BAUD_M10(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_BAUD_M10) & BM_LPUART_BAUD_M10)
427
428 /*! @brief Set the M10 field to a new value. */
429 #define BW_LPUART_BAUD_M10(x, v) (BITBAND_ACCESS32(HW_LPUART_BAUD_ADDR(x), BP_LPUART_BAUD_M10) = (v))
430 /*@}*/
431
432 /*!
433  * @name Register LPUART_BAUD, field MAEN2[30] (RW)
434  *
435  * Values:
436  * - 0 - Normal operation.
437  * - 1 - Enables automatic address matching or data matching mode for MATCH[MA2].
438  */
439 /*@{*/
440 #define BP_LPUART_BAUD_MAEN2 (30U)         /*!< Bit position for LPUART_BAUD_MAEN2. */
441 #define BM_LPUART_BAUD_MAEN2 (0x40000000U) /*!< Bit mask for LPUART_BAUD_MAEN2. */
442 #define BS_LPUART_BAUD_MAEN2 (1U)          /*!< Bit field size in bits for LPUART_BAUD_MAEN2. */
443
444 /*! @brief Read current value of the LPUART_BAUD_MAEN2 field. */
445 #define BR_LPUART_BAUD_MAEN2(x) (BITBAND_ACCESS32(HW_LPUART_BAUD_ADDR(x), BP_LPUART_BAUD_MAEN2))
446
447 /*! @brief Format value for bitfield LPUART_BAUD_MAEN2. */
448 #define BF_LPUART_BAUD_MAEN2(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_BAUD_MAEN2) & BM_LPUART_BAUD_MAEN2)
449
450 /*! @brief Set the MAEN2 field to a new value. */
451 #define BW_LPUART_BAUD_MAEN2(x, v) (BITBAND_ACCESS32(HW_LPUART_BAUD_ADDR(x), BP_LPUART_BAUD_MAEN2) = (v))
452 /*@}*/
453
454 /*!
455  * @name Register LPUART_BAUD, field MAEN1[31] (RW)
456  *
457  * Values:
458  * - 0 - Normal operation.
459  * - 1 - Enables automatic address matching or data matching mode for MATCH[MA1].
460  */
461 /*@{*/
462 #define BP_LPUART_BAUD_MAEN1 (31U)         /*!< Bit position for LPUART_BAUD_MAEN1. */
463 #define BM_LPUART_BAUD_MAEN1 (0x80000000U) /*!< Bit mask for LPUART_BAUD_MAEN1. */
464 #define BS_LPUART_BAUD_MAEN1 (1U)          /*!< Bit field size in bits for LPUART_BAUD_MAEN1. */
465
466 /*! @brief Read current value of the LPUART_BAUD_MAEN1 field. */
467 #define BR_LPUART_BAUD_MAEN1(x) (BITBAND_ACCESS32(HW_LPUART_BAUD_ADDR(x), BP_LPUART_BAUD_MAEN1))
468
469 /*! @brief Format value for bitfield LPUART_BAUD_MAEN1. */
470 #define BF_LPUART_BAUD_MAEN1(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_BAUD_MAEN1) & BM_LPUART_BAUD_MAEN1)
471
472 /*! @brief Set the MAEN1 field to a new value. */
473 #define BW_LPUART_BAUD_MAEN1(x, v) (BITBAND_ACCESS32(HW_LPUART_BAUD_ADDR(x), BP_LPUART_BAUD_MAEN1) = (v))
474 /*@}*/
475
476 /*******************************************************************************
477  * HW_LPUART_STAT - LPUART Status Register
478  ******************************************************************************/
479
480 /*!
481  * @brief HW_LPUART_STAT - LPUART Status Register (RW)
482  *
483  * Reset value: 0x00C00000U
484  */
485 typedef union _hw_lpuart_stat
486 {
487     uint32_t U;
488     struct _hw_lpuart_stat_bitfields
489     {
490         uint32_t RESERVED0 : 14;       /*!< [13:0]  */
491         uint32_t MA2F : 1;             /*!< [14] Match 2 Flag */
492         uint32_t MA1F : 1;             /*!< [15] Match 1 Flag */
493         uint32_t PF : 1;               /*!< [16] Parity Error Flag */
494         uint32_t FE : 1;               /*!< [17] Framing Error Flag */
495         uint32_t NF : 1;               /*!< [18] Noise Flag */
496         uint32_t OR : 1;               /*!< [19] Receiver Overrun Flag */
497         uint32_t IDLE : 1;             /*!< [20] Idle Line Flag */
498         uint32_t RDRF : 1;             /*!< [21] Receive Data Register Full Flag */
499         uint32_t TC : 1;               /*!< [22] Transmission Complete Flag */
500         uint32_t TDRE : 1;             /*!< [23] Transmit Data Register Empty Flag */
501         uint32_t RAF : 1;              /*!< [24] Receiver Active Flag */
502         uint32_t LBKDE : 1;            /*!< [25] LIN Break Detection Enable */
503         uint32_t BRK13 : 1;            /*!< [26] Break Character Generation Length */
504         uint32_t RWUID : 1;            /*!< [27] Receive Wake Up Idle Detect */
505         uint32_t RXINV : 1;            /*!< [28] Receive Data Inversion */
506         uint32_t MSBF : 1;             /*!< [29] MSB First */
507         uint32_t RXEDGIF : 1;          /*!< [30] LPUART_RX Pin Active Edge Interrupt
508                                         * Flag */
509         uint32_t LBKDIF : 1;           /*!< [31] LIN Break Detect Interrupt Flag */
510     } B;
511 } hw_lpuart_stat_t;
512
513 /*!
514  * @name Constants and macros for entire LPUART_STAT register
515  */
516 /*@{*/
517 #define HW_LPUART_STAT_ADDR(x)   ((x) + 0x4U)
518
519 #define HW_LPUART_STAT(x)        (*(__IO hw_lpuart_stat_t *) HW_LPUART_STAT_ADDR(x))
520 #define HW_LPUART_STAT_RD(x)     (HW_LPUART_STAT(x).U)
521 #define HW_LPUART_STAT_WR(x, v)  (HW_LPUART_STAT(x).U = (v))
522 #define HW_LPUART_STAT_SET(x, v) (HW_LPUART_STAT_WR(x, HW_LPUART_STAT_RD(x) |  (v)))
523 #define HW_LPUART_STAT_CLR(x, v) (HW_LPUART_STAT_WR(x, HW_LPUART_STAT_RD(x) & ~(v)))
524 #define HW_LPUART_STAT_TOG(x, v) (HW_LPUART_STAT_WR(x, HW_LPUART_STAT_RD(x) ^  (v)))
525 /*@}*/
526
527 /*
528  * Constants & macros for individual LPUART_STAT bitfields
529  */
530
531 /*!
532  * @name Register LPUART_STAT, field MA2F[14] (W1C)
533  *
534  * MA2F is set whenever the next character to be read from LPUART_DATA matches
535  * MA2. To clear MA2F, write a logic one to the MA2F.
536  *
537  * Values:
538  * - 0 - Received data is not equal to MA2
539  * - 1 - Received data is equal to MA2
540  */
541 /*@{*/
542 #define BP_LPUART_STAT_MA2F  (14U)         /*!< Bit position for LPUART_STAT_MA2F. */
543 #define BM_LPUART_STAT_MA2F  (0x00004000U) /*!< Bit mask for LPUART_STAT_MA2F. */
544 #define BS_LPUART_STAT_MA2F  (1U)          /*!< Bit field size in bits for LPUART_STAT_MA2F. */
545
546 /*! @brief Read current value of the LPUART_STAT_MA2F field. */
547 #define BR_LPUART_STAT_MA2F(x) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_MA2F))
548
549 /*! @brief Format value for bitfield LPUART_STAT_MA2F. */
550 #define BF_LPUART_STAT_MA2F(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_STAT_MA2F) & BM_LPUART_STAT_MA2F)
551
552 /*! @brief Set the MA2F field to a new value. */
553 #define BW_LPUART_STAT_MA2F(x, v) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_MA2F) = (v))
554 /*@}*/
555
556 /*!
557  * @name Register LPUART_STAT, field MA1F[15] (W1C)
558  *
559  * MA1F is set whenever the next character to be read from LPUART_DATA matches
560  * MA1. To clear MA1F, write a logic one to the MA1F.
561  *
562  * Values:
563  * - 0 - Received data is not equal to MA1
564  * - 1 - Received data is equal to MA1
565  */
566 /*@{*/
567 #define BP_LPUART_STAT_MA1F  (15U)         /*!< Bit position for LPUART_STAT_MA1F. */
568 #define BM_LPUART_STAT_MA1F  (0x00008000U) /*!< Bit mask for LPUART_STAT_MA1F. */
569 #define BS_LPUART_STAT_MA1F  (1U)          /*!< Bit field size in bits for LPUART_STAT_MA1F. */
570
571 /*! @brief Read current value of the LPUART_STAT_MA1F field. */
572 #define BR_LPUART_STAT_MA1F(x) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_MA1F))
573
574 /*! @brief Format value for bitfield LPUART_STAT_MA1F. */
575 #define BF_LPUART_STAT_MA1F(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_STAT_MA1F) & BM_LPUART_STAT_MA1F)
576
577 /*! @brief Set the MA1F field to a new value. */
578 #define BW_LPUART_STAT_MA1F(x, v) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_MA1F) = (v))
579 /*@}*/
580
581 /*!
582  * @name Register LPUART_STAT, field PF[16] (W1C)
583  *
584  * PF is set whenever the next character to be read from LPUART_DATA was
585  * received when parity is enabled (PE = 1) and the parity bit in the received character
586  * does not agree with the expected parity value. To clear PF, write a logic one
587  * to the PF.
588  *
589  * Values:
590  * - 0 - No parity error.
591  * - 1 - Parity error.
592  */
593 /*@{*/
594 #define BP_LPUART_STAT_PF    (16U)         /*!< Bit position for LPUART_STAT_PF. */
595 #define BM_LPUART_STAT_PF    (0x00010000U) /*!< Bit mask for LPUART_STAT_PF. */
596 #define BS_LPUART_STAT_PF    (1U)          /*!< Bit field size in bits for LPUART_STAT_PF. */
597
598 /*! @brief Read current value of the LPUART_STAT_PF field. */
599 #define BR_LPUART_STAT_PF(x) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_PF))
600
601 /*! @brief Format value for bitfield LPUART_STAT_PF. */
602 #define BF_LPUART_STAT_PF(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_STAT_PF) & BM_LPUART_STAT_PF)
603
604 /*! @brief Set the PF field to a new value. */
605 #define BW_LPUART_STAT_PF(x, v) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_PF) = (v))
606 /*@}*/
607
608 /*!
609  * @name Register LPUART_STAT, field FE[17] (W1C)
610  *
611  * FE is set whenever the next character to be read from LPUART_DATA was
612  * received with logic 0 detected where a stop bit was expected. To clear NF, write
613  * logic one to the NF.
614  *
615  * Values:
616  * - 0 - No framing error detected. This does not guarantee the framing is
617  *     correct.
618  * - 1 - Framing error.
619  */
620 /*@{*/
621 #define BP_LPUART_STAT_FE    (17U)         /*!< Bit position for LPUART_STAT_FE. */
622 #define BM_LPUART_STAT_FE    (0x00020000U) /*!< Bit mask for LPUART_STAT_FE. */
623 #define BS_LPUART_STAT_FE    (1U)          /*!< Bit field size in bits for LPUART_STAT_FE. */
624
625 /*! @brief Read current value of the LPUART_STAT_FE field. */
626 #define BR_LPUART_STAT_FE(x) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_FE))
627
628 /*! @brief Format value for bitfield LPUART_STAT_FE. */
629 #define BF_LPUART_STAT_FE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_STAT_FE) & BM_LPUART_STAT_FE)
630
631 /*! @brief Set the FE field to a new value. */
632 #define BW_LPUART_STAT_FE(x, v) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_FE) = (v))
633 /*@}*/
634
635 /*!
636  * @name Register LPUART_STAT, field NF[18] (W1C)
637  *
638  * The advanced sampling technique used in the receiver takes three samples in
639  * each of the received bits. If any of these samples disagrees with the rest of
640  * the samples within any bit time in the frame then noise is detected for that
641  * character. NF is set whenever the next character to be read from LPUART_DATA was
642  * received with noise detected within the character. To clear NF, write logic
643  * one to the NF.
644  *
645  * Values:
646  * - 0 - No noise detected.
647  * - 1 - Noise detected in the received character in LPUART_DATA.
648  */
649 /*@{*/
650 #define BP_LPUART_STAT_NF    (18U)         /*!< Bit position for LPUART_STAT_NF. */
651 #define BM_LPUART_STAT_NF    (0x00040000U) /*!< Bit mask for LPUART_STAT_NF. */
652 #define BS_LPUART_STAT_NF    (1U)          /*!< Bit field size in bits for LPUART_STAT_NF. */
653
654 /*! @brief Read current value of the LPUART_STAT_NF field. */
655 #define BR_LPUART_STAT_NF(x) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_NF))
656
657 /*! @brief Format value for bitfield LPUART_STAT_NF. */
658 #define BF_LPUART_STAT_NF(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_STAT_NF) & BM_LPUART_STAT_NF)
659
660 /*! @brief Set the NF field to a new value. */
661 #define BW_LPUART_STAT_NF(x, v) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_NF) = (v))
662 /*@}*/
663
664 /*!
665  * @name Register LPUART_STAT, field OR[19] (W1C)
666  *
667  * OR is set when software fails to prevent the receive data register from
668  * overflowing with data. The OR bit is set immediately after the stop bit has been
669  * completely received for the dataword that overflows the buffer and all the other
670  * error flags (FE, NF, and PF) are prevented from setting. The data in the
671  * shift register is lost, but the data already in the LPUART data registers is not
672  * affected. If LBKDE is enabled and a LIN Break is detected, the OR field asserts
673  * if LBKDIF is not cleared before the next data character is received. While
674  * the OR flag is set, no additional data is stored in the data buffer even if
675  * sufficient room exists. To clear OR, write logic 1 to the OR flag.
676  *
677  * Values:
678  * - 0 - No overrun.
679  * - 1 - Receive overrun (new LPUART data lost).
680  */
681 /*@{*/
682 #define BP_LPUART_STAT_OR    (19U)         /*!< Bit position for LPUART_STAT_OR. */
683 #define BM_LPUART_STAT_OR    (0x00080000U) /*!< Bit mask for LPUART_STAT_OR. */
684 #define BS_LPUART_STAT_OR    (1U)          /*!< Bit field size in bits for LPUART_STAT_OR. */
685
686 /*! @brief Read current value of the LPUART_STAT_OR field. */
687 #define BR_LPUART_STAT_OR(x) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_OR))
688
689 /*! @brief Format value for bitfield LPUART_STAT_OR. */
690 #define BF_LPUART_STAT_OR(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_STAT_OR) & BM_LPUART_STAT_OR)
691
692 /*! @brief Set the OR field to a new value. */
693 #define BW_LPUART_STAT_OR(x, v) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_OR) = (v))
694 /*@}*/
695
696 /*!
697  * @name Register LPUART_STAT, field IDLE[20] (W1C)
698  *
699  * IDLE is set when the LPUART receive line becomes idle for a full character
700  * time after a period of activity. When ILT is cleared, the receiver starts
701  * counting idle bit times after the start bit. If the receive character is all 1s,
702  * these bit times and the stop bits time count toward the full character time of
703  * logic high, 10 to 13 bit times, needed for the receiver to detect an idle line.
704  * When ILT is set, the receiver doesn't start counting idle bit times until
705  * after the stop bits. The stop bits and any logic high bit times at the end of the
706  * previous character do not count toward the full character time of logic high
707  * needed for the receiver to detect an idle line. To clear IDLE, write logic 1 to
708  * the IDLE flag. After IDLE has been cleared, it cannot become set again until
709  * after a new character has been stored in the receive buffer or a LIN break
710  * character has set the LBKDIF flag . IDLE is set only once even if the receive
711  * line remains idle for an extended period.
712  *
713  * Values:
714  * - 0 - No idle line detected.
715  * - 1 - Idle line was detected.
716  */
717 /*@{*/
718 #define BP_LPUART_STAT_IDLE  (20U)         /*!< Bit position for LPUART_STAT_IDLE. */
719 #define BM_LPUART_STAT_IDLE  (0x00100000U) /*!< Bit mask for LPUART_STAT_IDLE. */
720 #define BS_LPUART_STAT_IDLE  (1U)          /*!< Bit field size in bits for LPUART_STAT_IDLE. */
721
722 /*! @brief Read current value of the LPUART_STAT_IDLE field. */
723 #define BR_LPUART_STAT_IDLE(x) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_IDLE))
724
725 /*! @brief Format value for bitfield LPUART_STAT_IDLE. */
726 #define BF_LPUART_STAT_IDLE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_STAT_IDLE) & BM_LPUART_STAT_IDLE)
727
728 /*! @brief Set the IDLE field to a new value. */
729 #define BW_LPUART_STAT_IDLE(x, v) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_IDLE) = (v))
730 /*@}*/
731
732 /*!
733  * @name Register LPUART_STAT, field RDRF[21] (RO)
734  *
735  * RDRF is set when the receive buffer (LPUART_DATA) is full. To clear RDRF,
736  * read the LPUART_DATA register. A character that is in the process of being
737  * received does not cause a change in RDRF until the entire character is received.
738  * Even if RDRF is set, the character will continue to be received until an overrun
739  * condition occurs once the entire character is received.
740  *
741  * Values:
742  * - 0 - Receive data buffer empty.
743  * - 1 - Receive data buffer full.
744  */
745 /*@{*/
746 #define BP_LPUART_STAT_RDRF  (21U)         /*!< Bit position for LPUART_STAT_RDRF. */
747 #define BM_LPUART_STAT_RDRF  (0x00200000U) /*!< Bit mask for LPUART_STAT_RDRF. */
748 #define BS_LPUART_STAT_RDRF  (1U)          /*!< Bit field size in bits for LPUART_STAT_RDRF. */
749
750 /*! @brief Read current value of the LPUART_STAT_RDRF field. */
751 #define BR_LPUART_STAT_RDRF(x) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_RDRF))
752 /*@}*/
753
754 /*!
755  * @name Register LPUART_STAT, field TC[22] (RO)
756  *
757  * TC is cleared when there is a transmission in progress or when a preamble or
758  * break character is loaded. TC is set when the transmit buffer is empty and no
759  * data, preamble, or break character is being transmitted. When TC is set, the
760  * transmit data output signal becomes idle (logic 1). TC is cleared by writing to
761  * LPUART_DATA to transmit new data, queuing a preamble by clearing and then
762  * setting LPUART_CTRL[TE], queuing a break character by writing 1 to
763  * LPUART_CTRL[SBK].
764  *
765  * Values:
766  * - 0 - Transmitter active (sending data, a preamble, or a break).
767  * - 1 - Transmitter idle (transmission activity complete).
768  */
769 /*@{*/
770 #define BP_LPUART_STAT_TC    (22U)         /*!< Bit position for LPUART_STAT_TC. */
771 #define BM_LPUART_STAT_TC    (0x00400000U) /*!< Bit mask for LPUART_STAT_TC. */
772 #define BS_LPUART_STAT_TC    (1U)          /*!< Bit field size in bits for LPUART_STAT_TC. */
773
774 /*! @brief Read current value of the LPUART_STAT_TC field. */
775 #define BR_LPUART_STAT_TC(x) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_TC))
776 /*@}*/
777
778 /*!
779  * @name Register LPUART_STAT, field TDRE[23] (RO)
780  *
781  * TDRE will set when the transmit data register (LPUART_DATA) is empty. To
782  * clear TDRE, write to the LPUART data register (LPUART_DATA). TDRE is not affected
783  * by a character that is in the process of being transmitted, it is updated at
784  * the start of each transmitted character.
785  *
786  * Values:
787  * - 0 - Transmit data buffer full.
788  * - 1 - Transmit data buffer empty.
789  */
790 /*@{*/
791 #define BP_LPUART_STAT_TDRE  (23U)         /*!< Bit position for LPUART_STAT_TDRE. */
792 #define BM_LPUART_STAT_TDRE  (0x00800000U) /*!< Bit mask for LPUART_STAT_TDRE. */
793 #define BS_LPUART_STAT_TDRE  (1U)          /*!< Bit field size in bits for LPUART_STAT_TDRE. */
794
795 /*! @brief Read current value of the LPUART_STAT_TDRE field. */
796 #define BR_LPUART_STAT_TDRE(x) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_TDRE))
797 /*@}*/
798
799 /*!
800  * @name Register LPUART_STAT, field RAF[24] (RO)
801  *
802  * RAF is set when the receiver detects the beginning of a valid start bit, and
803  * RAF is cleared automatically when the receiver detects an idle line.
804  *
805  * Values:
806  * - 0 - LPUART receiver idle waiting for a start bit.
807  * - 1 - LPUART receiver active (LPUART_RX input not idle).
808  */
809 /*@{*/
810 #define BP_LPUART_STAT_RAF   (24U)         /*!< Bit position for LPUART_STAT_RAF. */
811 #define BM_LPUART_STAT_RAF   (0x01000000U) /*!< Bit mask for LPUART_STAT_RAF. */
812 #define BS_LPUART_STAT_RAF   (1U)          /*!< Bit field size in bits for LPUART_STAT_RAF. */
813
814 /*! @brief Read current value of the LPUART_STAT_RAF field. */
815 #define BR_LPUART_STAT_RAF(x) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_RAF))
816 /*@}*/
817
818 /*!
819  * @name Register LPUART_STAT, field LBKDE[25] (RW)
820  *
821  * LBKDE selects a longer break character detection length. While LBKDE is set,
822  * receive data is not stored in the receive data buffer.
823  *
824  * Values:
825  * - 0 - Break character is detected at length 10 bit times (if M = 0, SBNS = 0)
826  *     or 11 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 12 (if M = 1, SBNS = 1
827  *     or M10 = 1, SNBS = 0) or 13 (if M10 = 1, SNBS = 1).
828  * - 1 - Break character is detected at length of 11 bit times (if M = 0, SBNS =
829  *     0) or 12 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 14 (if M = 1, SBNS =
830  *     1 or M10 = 1, SNBS = 0) or 15 (if M10 = 1, SNBS = 1).
831  */
832 /*@{*/
833 #define BP_LPUART_STAT_LBKDE (25U)         /*!< Bit position for LPUART_STAT_LBKDE. */
834 #define BM_LPUART_STAT_LBKDE (0x02000000U) /*!< Bit mask for LPUART_STAT_LBKDE. */
835 #define BS_LPUART_STAT_LBKDE (1U)          /*!< Bit field size in bits for LPUART_STAT_LBKDE. */
836
837 /*! @brief Read current value of the LPUART_STAT_LBKDE field. */
838 #define BR_LPUART_STAT_LBKDE(x) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_LBKDE))
839
840 /*! @brief Format value for bitfield LPUART_STAT_LBKDE. */
841 #define BF_LPUART_STAT_LBKDE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_STAT_LBKDE) & BM_LPUART_STAT_LBKDE)
842
843 /*! @brief Set the LBKDE field to a new value. */
844 #define BW_LPUART_STAT_LBKDE(x, v) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_LBKDE) = (v))
845 /*@}*/
846
847 /*!
848  * @name Register LPUART_STAT, field BRK13[26] (RW)
849  *
850  * BRK13 selects a longer transmitted break character length. Detection of a
851  * framing error is not affected by the state of this bit. This bit should only be
852  * changed when the transmitter is disabled.
853  *
854  * Values:
855  * - 0 - Break character is transmitted with length of 10 bit times (if M = 0,
856  *     SBNS = 0) or 11 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 12 (if M = 1,
857  *     SBNS = 1 or M10 = 1, SNBS = 0) or 13 (if M10 = 1, SNBS = 1).
858  * - 1 - Break character is transmitted with length of 13 bit times (if M = 0,
859  *     SBNS = 0) or 14 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 15 (if M = 1,
860  *     SBNS = 1 or M10 = 1, SNBS = 0) or 16 (if M10 = 1, SNBS = 1).
861  */
862 /*@{*/
863 #define BP_LPUART_STAT_BRK13 (26U)         /*!< Bit position for LPUART_STAT_BRK13. */
864 #define BM_LPUART_STAT_BRK13 (0x04000000U) /*!< Bit mask for LPUART_STAT_BRK13. */
865 #define BS_LPUART_STAT_BRK13 (1U)          /*!< Bit field size in bits for LPUART_STAT_BRK13. */
866
867 /*! @brief Read current value of the LPUART_STAT_BRK13 field. */
868 #define BR_LPUART_STAT_BRK13(x) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_BRK13))
869
870 /*! @brief Format value for bitfield LPUART_STAT_BRK13. */
871 #define BF_LPUART_STAT_BRK13(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_STAT_BRK13) & BM_LPUART_STAT_BRK13)
872
873 /*! @brief Set the BRK13 field to a new value. */
874 #define BW_LPUART_STAT_BRK13(x, v) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_BRK13) = (v))
875 /*@}*/
876
877 /*!
878  * @name Register LPUART_STAT, field RWUID[27] (RW)
879  *
880  * For RWU on idle character, RWUID controls whether the idle character that
881  * wakes up the receiver sets the IDLE bit. For address match wakeup, RWUID controls
882  * if the IDLE bit is set when the address does not match. This bit should only
883  * be changed when the receiver is disabled.
884  *
885  * Values:
886  * - 0 - During receive standby state (RWU = 1), the IDLE bit does not get set
887  *     upon detection of an idle character. During address match wakeup, the IDLE
888  *     bit does not get set when an address does not match.
889  * - 1 - During receive standby state (RWU = 1), the IDLE bit gets set upon
890  *     detection of an idle character. During address match wakeup, the IDLE bit does
891  *     get set when an address does not match.
892  */
893 /*@{*/
894 #define BP_LPUART_STAT_RWUID (27U)         /*!< Bit position for LPUART_STAT_RWUID. */
895 #define BM_LPUART_STAT_RWUID (0x08000000U) /*!< Bit mask for LPUART_STAT_RWUID. */
896 #define BS_LPUART_STAT_RWUID (1U)          /*!< Bit field size in bits for LPUART_STAT_RWUID. */
897
898 /*! @brief Read current value of the LPUART_STAT_RWUID field. */
899 #define BR_LPUART_STAT_RWUID(x) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_RWUID))
900
901 /*! @brief Format value for bitfield LPUART_STAT_RWUID. */
902 #define BF_LPUART_STAT_RWUID(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_STAT_RWUID) & BM_LPUART_STAT_RWUID)
903
904 /*! @brief Set the RWUID field to a new value. */
905 #define BW_LPUART_STAT_RWUID(x, v) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_RWUID) = (v))
906 /*@}*/
907
908 /*!
909  * @name Register LPUART_STAT, field RXINV[28] (RW)
910  *
911  * Setting this bit reverses the polarity of the received data input. Setting
912  * RXINV inverts the LPUART_RX input for all cases: data bits, start and stop bits,
913  * break, and idle.
914  *
915  * Values:
916  * - 0 - Receive data not inverted.
917  * - 1 - Receive data inverted.
918  */
919 /*@{*/
920 #define BP_LPUART_STAT_RXINV (28U)         /*!< Bit position for LPUART_STAT_RXINV. */
921 #define BM_LPUART_STAT_RXINV (0x10000000U) /*!< Bit mask for LPUART_STAT_RXINV. */
922 #define BS_LPUART_STAT_RXINV (1U)          /*!< Bit field size in bits for LPUART_STAT_RXINV. */
923
924 /*! @brief Read current value of the LPUART_STAT_RXINV field. */
925 #define BR_LPUART_STAT_RXINV(x) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_RXINV))
926
927 /*! @brief Format value for bitfield LPUART_STAT_RXINV. */
928 #define BF_LPUART_STAT_RXINV(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_STAT_RXINV) & BM_LPUART_STAT_RXINV)
929
930 /*! @brief Set the RXINV field to a new value. */
931 #define BW_LPUART_STAT_RXINV(x, v) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_RXINV) = (v))
932 /*@}*/
933
934 /*!
935  * @name Register LPUART_STAT, field MSBF[29] (RW)
936  *
937  * Setting this bit reverses the order of the bits that are transmitted and
938  * received on the wire. This bit does not affect the polarity of the bits, the
939  * location of the parity bit or the location of the start or stop bits. This bit
940  * should only be changed when the transmitter and receiver are both disabled.
941  *
942  * Values:
943  * - 0 - LSB (bit0) is the first bit that is transmitted following the start
944  *     bit. Further, the first bit received after the start bit is identified as
945  *     bit0.
946  * - 1 - MSB (bit9, bit8, bit7 or bit6) is the first bit that is transmitted
947  *     following the start bit depending on the setting of CTRL[M], CTRL[PE] and
948  *     BAUD[M10]. Further, the first bit received after the start bit is identified
949  *     as bit9, bit8, bit7 or bit6 depending on the setting of CTRL[M] and
950  *     CTRL[PE].
951  */
952 /*@{*/
953 #define BP_LPUART_STAT_MSBF  (29U)         /*!< Bit position for LPUART_STAT_MSBF. */
954 #define BM_LPUART_STAT_MSBF  (0x20000000U) /*!< Bit mask for LPUART_STAT_MSBF. */
955 #define BS_LPUART_STAT_MSBF  (1U)          /*!< Bit field size in bits for LPUART_STAT_MSBF. */
956
957 /*! @brief Read current value of the LPUART_STAT_MSBF field. */
958 #define BR_LPUART_STAT_MSBF(x) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_MSBF))
959
960 /*! @brief Format value for bitfield LPUART_STAT_MSBF. */
961 #define BF_LPUART_STAT_MSBF(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_STAT_MSBF) & BM_LPUART_STAT_MSBF)
962
963 /*! @brief Set the MSBF field to a new value. */
964 #define BW_LPUART_STAT_MSBF(x, v) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_MSBF) = (v))
965 /*@}*/
966
967 /*!
968  * @name Register LPUART_STAT, field RXEDGIF[30] (W1C)
969  *
970  * RXEDGIF is set when an active edge, falling if RXINV = 0, rising if RXINV=1,
971  * on the LPUART_RX pin occurs. RXEDGIF is cleared by writing a 1 to it.
972  *
973  * Values:
974  * - 0 - No active edge on the receive pin has occurred.
975  * - 1 - An active edge on the receive pin has occurred.
976  */
977 /*@{*/
978 #define BP_LPUART_STAT_RXEDGIF (30U)       /*!< Bit position for LPUART_STAT_RXEDGIF. */
979 #define BM_LPUART_STAT_RXEDGIF (0x40000000U) /*!< Bit mask for LPUART_STAT_RXEDGIF. */
980 #define BS_LPUART_STAT_RXEDGIF (1U)        /*!< Bit field size in bits for LPUART_STAT_RXEDGIF. */
981
982 /*! @brief Read current value of the LPUART_STAT_RXEDGIF field. */
983 #define BR_LPUART_STAT_RXEDGIF(x) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_RXEDGIF))
984
985 /*! @brief Format value for bitfield LPUART_STAT_RXEDGIF. */
986 #define BF_LPUART_STAT_RXEDGIF(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_STAT_RXEDGIF) & BM_LPUART_STAT_RXEDGIF)
987
988 /*! @brief Set the RXEDGIF field to a new value. */
989 #define BW_LPUART_STAT_RXEDGIF(x, v) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_RXEDGIF) = (v))
990 /*@}*/
991
992 /*!
993  * @name Register LPUART_STAT, field LBKDIF[31] (W1C)
994  *
995  * LBKDIF is set when the LIN break detect circuitry is enabled and a LIN break
996  * character is detected. LBKDIF is cleared by writing a 1 to it.
997  *
998  * Values:
999  * - 0 - No LIN break character has been detected.
1000  * - 1 - LIN break character has been detected.
1001  */
1002 /*@{*/
1003 #define BP_LPUART_STAT_LBKDIF (31U)        /*!< Bit position for LPUART_STAT_LBKDIF. */
1004 #define BM_LPUART_STAT_LBKDIF (0x80000000U) /*!< Bit mask for LPUART_STAT_LBKDIF. */
1005 #define BS_LPUART_STAT_LBKDIF (1U)         /*!< Bit field size in bits for LPUART_STAT_LBKDIF. */
1006
1007 /*! @brief Read current value of the LPUART_STAT_LBKDIF field. */
1008 #define BR_LPUART_STAT_LBKDIF(x) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_LBKDIF))
1009
1010 /*! @brief Format value for bitfield LPUART_STAT_LBKDIF. */
1011 #define BF_LPUART_STAT_LBKDIF(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_STAT_LBKDIF) & BM_LPUART_STAT_LBKDIF)
1012
1013 /*! @brief Set the LBKDIF field to a new value. */
1014 #define BW_LPUART_STAT_LBKDIF(x, v) (BITBAND_ACCESS32(HW_LPUART_STAT_ADDR(x), BP_LPUART_STAT_LBKDIF) = (v))
1015 /*@}*/
1016
1017 /*******************************************************************************
1018  * HW_LPUART_CTRL - LPUART Control Register
1019  ******************************************************************************/
1020
1021 /*!
1022  * @brief HW_LPUART_CTRL - LPUART Control Register (RW)
1023  *
1024  * Reset value: 0x00000000U
1025  *
1026  * This read/write register controls various optional features of the LPUART
1027  * system. This register should only be altered when the transmitter and receiver
1028  * are both disabled.
1029  */
1030 typedef union _hw_lpuart_ctrl
1031 {
1032     uint32_t U;
1033     struct _hw_lpuart_ctrl_bitfields
1034     {
1035         uint32_t PT : 1;               /*!< [0] Parity Type */
1036         uint32_t PE : 1;               /*!< [1] Parity Enable */
1037         uint32_t ILT : 1;              /*!< [2] Idle Line Type Select */
1038         uint32_t WAKE : 1;             /*!< [3] Receiver Wakeup Method Select */
1039         uint32_t M : 1;                /*!< [4] 9-Bit or 8-Bit Mode Select */
1040         uint32_t RSRC : 1;             /*!< [5] Receiver Source Select */
1041         uint32_t DOZEEN : 1;           /*!< [6] Doze Enable */
1042         uint32_t LOOPS : 1;            /*!< [7] Loop Mode Select */
1043         uint32_t IDLECFG : 3;          /*!< [10:8] Idle Configuration */
1044         uint32_t RESERVED0 : 3;        /*!< [13:11]  */
1045         uint32_t MA2IE : 1;            /*!< [14] Match 2 Interrupt Enable */
1046         uint32_t MA1IE : 1;            /*!< [15] Match 1 Interrupt Enable */
1047         uint32_t SBK : 1;              /*!< [16] Send Break */
1048         uint32_t RWU : 1;              /*!< [17] Receiver Wakeup Control */
1049         uint32_t RE : 1;               /*!< [18] Receiver Enable */
1050         uint32_t TE : 1;               /*!< [19] Transmitter Enable */
1051         uint32_t ILIE : 1;             /*!< [20] Idle Line Interrupt Enable */
1052         uint32_t RIE : 1;              /*!< [21] Receiver Interrupt Enable */
1053         uint32_t TCIE : 1;             /*!< [22] Transmission Complete Interrupt Enable
1054                                         * for */
1055         uint32_t TIE : 1;              /*!< [23] Transmit Interrupt Enable */
1056         uint32_t PEIE : 1;             /*!< [24] Parity Error Interrupt Enable */
1057         uint32_t FEIE : 1;             /*!< [25] Framing Error Interrupt Enable */
1058         uint32_t NEIE : 1;             /*!< [26] Noise Error Interrupt Enable */
1059         uint32_t ORIE : 1;             /*!< [27] Overrun Interrupt Enable */
1060         uint32_t TXINV : 1;            /*!< [28] Transmit Data Inversion */
1061         uint32_t TXDIR : 1;            /*!< [29] LPUART_TX Pin Direction in Single-Wire
1062                                         * Mode */
1063         uint32_t R9T8 : 1;             /*!< [30] Receive Bit 9 / Transmit Bit 8 */
1064         uint32_t R8T9 : 1;             /*!< [31] Receive Bit 8 / Transmit Bit 9 */
1065     } B;
1066 } hw_lpuart_ctrl_t;
1067
1068 /*!
1069  * @name Constants and macros for entire LPUART_CTRL register
1070  */
1071 /*@{*/
1072 #define HW_LPUART_CTRL_ADDR(x)   ((x) + 0x8U)
1073
1074 #define HW_LPUART_CTRL(x)        (*(__IO hw_lpuart_ctrl_t *) HW_LPUART_CTRL_ADDR(x))
1075 #define HW_LPUART_CTRL_RD(x)     (HW_LPUART_CTRL(x).U)
1076 #define HW_LPUART_CTRL_WR(x, v)  (HW_LPUART_CTRL(x).U = (v))
1077 #define HW_LPUART_CTRL_SET(x, v) (HW_LPUART_CTRL_WR(x, HW_LPUART_CTRL_RD(x) |  (v)))
1078 #define HW_LPUART_CTRL_CLR(x, v) (HW_LPUART_CTRL_WR(x, HW_LPUART_CTRL_RD(x) & ~(v)))
1079 #define HW_LPUART_CTRL_TOG(x, v) (HW_LPUART_CTRL_WR(x, HW_LPUART_CTRL_RD(x) ^  (v)))
1080 /*@}*/
1081
1082 /*
1083  * Constants & macros for individual LPUART_CTRL bitfields
1084  */
1085
1086 /*!
1087  * @name Register LPUART_CTRL, field PT[0] (RW)
1088  *
1089  * Provided parity is enabled (PE = 1), this bit selects even or odd parity. Odd
1090  * parity means the total number of 1s in the data character, including the
1091  * parity bit, is odd. Even parity means the total number of 1s in the data
1092  * character, including the parity bit, is even.
1093  *
1094  * Values:
1095  * - 0 - Even parity.
1096  * - 1 - Odd parity.
1097  */
1098 /*@{*/
1099 #define BP_LPUART_CTRL_PT    (0U)          /*!< Bit position for LPUART_CTRL_PT. */
1100 #define BM_LPUART_CTRL_PT    (0x00000001U) /*!< Bit mask for LPUART_CTRL_PT. */
1101 #define BS_LPUART_CTRL_PT    (1U)          /*!< Bit field size in bits for LPUART_CTRL_PT. */
1102
1103 /*! @brief Read current value of the LPUART_CTRL_PT field. */
1104 #define BR_LPUART_CTRL_PT(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_PT))
1105
1106 /*! @brief Format value for bitfield LPUART_CTRL_PT. */
1107 #define BF_LPUART_CTRL_PT(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_PT) & BM_LPUART_CTRL_PT)
1108
1109 /*! @brief Set the PT field to a new value. */
1110 #define BW_LPUART_CTRL_PT(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_PT) = (v))
1111 /*@}*/
1112
1113 /*!
1114  * @name Register LPUART_CTRL, field PE[1] (RW)
1115  *
1116  * Enables hardware parity generation and checking. When parity is enabled, the
1117  * bit immediately before the stop bit is treated as the parity bit.
1118  *
1119  * Values:
1120  * - 0 - No hardware parity generation or checking.
1121  * - 1 - Parity enabled.
1122  */
1123 /*@{*/
1124 #define BP_LPUART_CTRL_PE    (1U)          /*!< Bit position for LPUART_CTRL_PE. */
1125 #define BM_LPUART_CTRL_PE    (0x00000002U) /*!< Bit mask for LPUART_CTRL_PE. */
1126 #define BS_LPUART_CTRL_PE    (1U)          /*!< Bit field size in bits for LPUART_CTRL_PE. */
1127
1128 /*! @brief Read current value of the LPUART_CTRL_PE field. */
1129 #define BR_LPUART_CTRL_PE(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_PE))
1130
1131 /*! @brief Format value for bitfield LPUART_CTRL_PE. */
1132 #define BF_LPUART_CTRL_PE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_PE) & BM_LPUART_CTRL_PE)
1133
1134 /*! @brief Set the PE field to a new value. */
1135 #define BW_LPUART_CTRL_PE(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_PE) = (v))
1136 /*@}*/
1137
1138 /*!
1139  * @name Register LPUART_CTRL, field ILT[2] (RW)
1140  *
1141  * Determines when the receiver starts counting logic 1s as idle character bits.
1142  * The count begins either after a valid start bit or after the stop bit. If the
1143  * count begins after the start bit, then a string of logic 1s preceding the
1144  * stop bit can cause false recognition of an idle character. Beginning the count
1145  * after the stop bit avoids false idle character recognition, but requires
1146  * properly synchronized transmissions. In case the LPUART is programmed with ILT = 1, a
1147  * logic 0 is automatically shifted after a received stop bit, therefore
1148  * resetting the idle count.
1149  *
1150  * Values:
1151  * - 0 - Idle character bit count starts after start bit.
1152  * - 1 - Idle character bit count starts after stop bit.
1153  */
1154 /*@{*/
1155 #define BP_LPUART_CTRL_ILT   (2U)          /*!< Bit position for LPUART_CTRL_ILT. */
1156 #define BM_LPUART_CTRL_ILT   (0x00000004U) /*!< Bit mask for LPUART_CTRL_ILT. */
1157 #define BS_LPUART_CTRL_ILT   (1U)          /*!< Bit field size in bits for LPUART_CTRL_ILT. */
1158
1159 /*! @brief Read current value of the LPUART_CTRL_ILT field. */
1160 #define BR_LPUART_CTRL_ILT(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_ILT))
1161
1162 /*! @brief Format value for bitfield LPUART_CTRL_ILT. */
1163 #define BF_LPUART_CTRL_ILT(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_ILT) & BM_LPUART_CTRL_ILT)
1164
1165 /*! @brief Set the ILT field to a new value. */
1166 #define BW_LPUART_CTRL_ILT(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_ILT) = (v))
1167 /*@}*/
1168
1169 /*!
1170  * @name Register LPUART_CTRL, field WAKE[3] (RW)
1171  *
1172  * Determines which condition wakes the LPUART when RWU=1: Address mark in the
1173  * most significant bit position of a received data character, or An idle
1174  * condition on the receive pin input signal.
1175  *
1176  * Values:
1177  * - 0 - Configures RWU for idle-line wakeup.
1178  * - 1 - Configures RWU with address-mark wakeup.
1179  */
1180 /*@{*/
1181 #define BP_LPUART_CTRL_WAKE  (3U)          /*!< Bit position for LPUART_CTRL_WAKE. */
1182 #define BM_LPUART_CTRL_WAKE  (0x00000008U) /*!< Bit mask for LPUART_CTRL_WAKE. */
1183 #define BS_LPUART_CTRL_WAKE  (1U)          /*!< Bit field size in bits for LPUART_CTRL_WAKE. */
1184
1185 /*! @brief Read current value of the LPUART_CTRL_WAKE field. */
1186 #define BR_LPUART_CTRL_WAKE(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_WAKE))
1187
1188 /*! @brief Format value for bitfield LPUART_CTRL_WAKE. */
1189 #define BF_LPUART_CTRL_WAKE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_WAKE) & BM_LPUART_CTRL_WAKE)
1190
1191 /*! @brief Set the WAKE field to a new value. */
1192 #define BW_LPUART_CTRL_WAKE(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_WAKE) = (v))
1193 /*@}*/
1194
1195 /*!
1196  * @name Register LPUART_CTRL, field M[4] (RW)
1197  *
1198  * Values:
1199  * - 0 - Receiver and transmitter use 8-bit data characters.
1200  * - 1 - Receiver and transmitter use 9-bit data characters.
1201  */
1202 /*@{*/
1203 #define BP_LPUART_CTRL_M     (4U)          /*!< Bit position for LPUART_CTRL_M. */
1204 #define BM_LPUART_CTRL_M     (0x00000010U) /*!< Bit mask for LPUART_CTRL_M. */
1205 #define BS_LPUART_CTRL_M     (1U)          /*!< Bit field size in bits for LPUART_CTRL_M. */
1206
1207 /*! @brief Read current value of the LPUART_CTRL_M field. */
1208 #define BR_LPUART_CTRL_M(x)  (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_M))
1209
1210 /*! @brief Format value for bitfield LPUART_CTRL_M. */
1211 #define BF_LPUART_CTRL_M(v)  ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_M) & BM_LPUART_CTRL_M)
1212
1213 /*! @brief Set the M field to a new value. */
1214 #define BW_LPUART_CTRL_M(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_M) = (v))
1215 /*@}*/
1216
1217 /*!
1218  * @name Register LPUART_CTRL, field RSRC[5] (RW)
1219  *
1220  * This field has no meaning or effect unless the LOOPS field is set. When LOOPS
1221  * is set, the RSRC field determines the source for the receiver shift register
1222  * input.
1223  *
1224  * Values:
1225  * - 0 - Provided LOOPS is set, RSRC is cleared, selects internal loop back mode
1226  *     and the LPUART does not use the LPUART_RX pin.
1227  * - 1 - Single-wire LPUART mode where the LPUART_TX pin is connected to the
1228  *     transmitter output and receiver input.
1229  */
1230 /*@{*/
1231 #define BP_LPUART_CTRL_RSRC  (5U)          /*!< Bit position for LPUART_CTRL_RSRC. */
1232 #define BM_LPUART_CTRL_RSRC  (0x00000020U) /*!< Bit mask for LPUART_CTRL_RSRC. */
1233 #define BS_LPUART_CTRL_RSRC  (1U)          /*!< Bit field size in bits for LPUART_CTRL_RSRC. */
1234
1235 /*! @brief Read current value of the LPUART_CTRL_RSRC field. */
1236 #define BR_LPUART_CTRL_RSRC(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_RSRC))
1237
1238 /*! @brief Format value for bitfield LPUART_CTRL_RSRC. */
1239 #define BF_LPUART_CTRL_RSRC(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_RSRC) & BM_LPUART_CTRL_RSRC)
1240
1241 /*! @brief Set the RSRC field to a new value. */
1242 #define BW_LPUART_CTRL_RSRC(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_RSRC) = (v))
1243 /*@}*/
1244
1245 /*!
1246  * @name Register LPUART_CTRL, field DOZEEN[6] (RW)
1247  *
1248  * Values:
1249  * - 0 - LPUART is enabled in Doze mode.
1250  * - 1 - LPUART is disabled in Doze mode.
1251  */
1252 /*@{*/
1253 #define BP_LPUART_CTRL_DOZEEN (6U)         /*!< Bit position for LPUART_CTRL_DOZEEN. */
1254 #define BM_LPUART_CTRL_DOZEEN (0x00000040U) /*!< Bit mask for LPUART_CTRL_DOZEEN. */
1255 #define BS_LPUART_CTRL_DOZEEN (1U)         /*!< Bit field size in bits for LPUART_CTRL_DOZEEN. */
1256
1257 /*! @brief Read current value of the LPUART_CTRL_DOZEEN field. */
1258 #define BR_LPUART_CTRL_DOZEEN(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_DOZEEN))
1259
1260 /*! @brief Format value for bitfield LPUART_CTRL_DOZEEN. */
1261 #define BF_LPUART_CTRL_DOZEEN(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_DOZEEN) & BM_LPUART_CTRL_DOZEEN)
1262
1263 /*! @brief Set the DOZEEN field to a new value. */
1264 #define BW_LPUART_CTRL_DOZEEN(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_DOZEEN) = (v))
1265 /*@}*/
1266
1267 /*!
1268  * @name Register LPUART_CTRL, field LOOPS[7] (RW)
1269  *
1270  * When LOOPS is set, the LPUART_RX pin is disconnected from the LPUART and the
1271  * transmitter output is internally connected to the receiver input. The
1272  * transmitter and the receiver must be enabled to use the loop function.
1273  *
1274  * Values:
1275  * - 0 - Normal operation - LPUART_RX and LPUART_TX use separate pins.
1276  * - 1 - Loop mode or single-wire mode where transmitter outputs are internally
1277  *     connected to receiver input (see RSRC bit).
1278  */
1279 /*@{*/
1280 #define BP_LPUART_CTRL_LOOPS (7U)          /*!< Bit position for LPUART_CTRL_LOOPS. */
1281 #define BM_LPUART_CTRL_LOOPS (0x00000080U) /*!< Bit mask for LPUART_CTRL_LOOPS. */
1282 #define BS_LPUART_CTRL_LOOPS (1U)          /*!< Bit field size in bits for LPUART_CTRL_LOOPS. */
1283
1284 /*! @brief Read current value of the LPUART_CTRL_LOOPS field. */
1285 #define BR_LPUART_CTRL_LOOPS(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_LOOPS))
1286
1287 /*! @brief Format value for bitfield LPUART_CTRL_LOOPS. */
1288 #define BF_LPUART_CTRL_LOOPS(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_LOOPS) & BM_LPUART_CTRL_LOOPS)
1289
1290 /*! @brief Set the LOOPS field to a new value. */
1291 #define BW_LPUART_CTRL_LOOPS(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_LOOPS) = (v))
1292 /*@}*/
1293
1294 /*!
1295  * @name Register LPUART_CTRL, field IDLECFG[10:8] (RW)
1296  *
1297  * Configures the number of idle characters that must be received before the
1298  * IDLE flag is set.
1299  *
1300  * Values:
1301  * - 000 - 1 idle character
1302  * - 001 - 2 idle characters
1303  * - 010 - 4 idle characters
1304  * - 011 - 8 idle characters
1305  * - 100 - 16 idle characters
1306  * - 101 - 32 idle characters
1307  * - 110 - 64 idle characters
1308  * - 111 - 128 idle characters
1309  */
1310 /*@{*/
1311 #define BP_LPUART_CTRL_IDLECFG (8U)        /*!< Bit position for LPUART_CTRL_IDLECFG. */
1312 #define BM_LPUART_CTRL_IDLECFG (0x00000700U) /*!< Bit mask for LPUART_CTRL_IDLECFG. */
1313 #define BS_LPUART_CTRL_IDLECFG (3U)        /*!< Bit field size in bits for LPUART_CTRL_IDLECFG. */
1314
1315 /*! @brief Read current value of the LPUART_CTRL_IDLECFG field. */
1316 #define BR_LPUART_CTRL_IDLECFG(x) (HW_LPUART_CTRL(x).B.IDLECFG)
1317
1318 /*! @brief Format value for bitfield LPUART_CTRL_IDLECFG. */
1319 #define BF_LPUART_CTRL_IDLECFG(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_IDLECFG) & BM_LPUART_CTRL_IDLECFG)
1320
1321 /*! @brief Set the IDLECFG field to a new value. */
1322 #define BW_LPUART_CTRL_IDLECFG(x, v) (HW_LPUART_CTRL_WR(x, (HW_LPUART_CTRL_RD(x) & ~BM_LPUART_CTRL_IDLECFG) | BF_LPUART_CTRL_IDLECFG(v)))
1323 /*@}*/
1324
1325 /*!
1326  * @name Register LPUART_CTRL, field MA2IE[14] (RW)
1327  *
1328  * Values:
1329  * - 0 - MA2F interrupt disabled
1330  * - 1 - MA2F interrupt enabled
1331  */
1332 /*@{*/
1333 #define BP_LPUART_CTRL_MA2IE (14U)         /*!< Bit position for LPUART_CTRL_MA2IE. */
1334 #define BM_LPUART_CTRL_MA2IE (0x00004000U) /*!< Bit mask for LPUART_CTRL_MA2IE. */
1335 #define BS_LPUART_CTRL_MA2IE (1U)          /*!< Bit field size in bits for LPUART_CTRL_MA2IE. */
1336
1337 /*! @brief Read current value of the LPUART_CTRL_MA2IE field. */
1338 #define BR_LPUART_CTRL_MA2IE(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_MA2IE))
1339
1340 /*! @brief Format value for bitfield LPUART_CTRL_MA2IE. */
1341 #define BF_LPUART_CTRL_MA2IE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_MA2IE) & BM_LPUART_CTRL_MA2IE)
1342
1343 /*! @brief Set the MA2IE field to a new value. */
1344 #define BW_LPUART_CTRL_MA2IE(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_MA2IE) = (v))
1345 /*@}*/
1346
1347 /*!
1348  * @name Register LPUART_CTRL, field MA1IE[15] (RW)
1349  *
1350  * Values:
1351  * - 0 - MA1F interrupt disabled
1352  * - 1 - MA1F interrupt enabled
1353  */
1354 /*@{*/
1355 #define BP_LPUART_CTRL_MA1IE (15U)         /*!< Bit position for LPUART_CTRL_MA1IE. */
1356 #define BM_LPUART_CTRL_MA1IE (0x00008000U) /*!< Bit mask for LPUART_CTRL_MA1IE. */
1357 #define BS_LPUART_CTRL_MA1IE (1U)          /*!< Bit field size in bits for LPUART_CTRL_MA1IE. */
1358
1359 /*! @brief Read current value of the LPUART_CTRL_MA1IE field. */
1360 #define BR_LPUART_CTRL_MA1IE(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_MA1IE))
1361
1362 /*! @brief Format value for bitfield LPUART_CTRL_MA1IE. */
1363 #define BF_LPUART_CTRL_MA1IE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_MA1IE) & BM_LPUART_CTRL_MA1IE)
1364
1365 /*! @brief Set the MA1IE field to a new value. */
1366 #define BW_LPUART_CTRL_MA1IE(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_MA1IE) = (v))
1367 /*@}*/
1368
1369 /*!
1370  * @name Register LPUART_CTRL, field SBK[16] (RW)
1371  *
1372  * Writing a 1 and then a 0 to SBK queues a break character in the transmit data
1373  * stream. Additional break characters of 10 to 13, or 13 to 16 if
1374  * LPUART_STATBRK13] is set, bit times of logic 0 are queued as long as SBK is set. Depending
1375  * on the timing of the set and clear of SBK relative to the information
1376  * currently being transmitted, a second break character may be queued before software
1377  * clears SBK.
1378  *
1379  * Values:
1380  * - 0 - Normal transmitter operation.
1381  * - 1 - Queue break character(s) to be sent.
1382  */
1383 /*@{*/
1384 #define BP_LPUART_CTRL_SBK   (16U)         /*!< Bit position for LPUART_CTRL_SBK. */
1385 #define BM_LPUART_CTRL_SBK   (0x00010000U) /*!< Bit mask for LPUART_CTRL_SBK. */
1386 #define BS_LPUART_CTRL_SBK   (1U)          /*!< Bit field size in bits for LPUART_CTRL_SBK. */
1387
1388 /*! @brief Read current value of the LPUART_CTRL_SBK field. */
1389 #define BR_LPUART_CTRL_SBK(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_SBK))
1390
1391 /*! @brief Format value for bitfield LPUART_CTRL_SBK. */
1392 #define BF_LPUART_CTRL_SBK(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_SBK) & BM_LPUART_CTRL_SBK)
1393
1394 /*! @brief Set the SBK field to a new value. */
1395 #define BW_LPUART_CTRL_SBK(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_SBK) = (v))
1396 /*@}*/
1397
1398 /*!
1399  * @name Register LPUART_CTRL, field RWU[17] (RW)
1400  *
1401  * This field can be set to place the LPUART receiver in a standby state. RWU
1402  * automatically clears when an RWU event occurs, that is, an IDLE event when
1403  * CTRL[WAKE] is clear or an address match when CTRL[WAKE] is set with STAT[RWUID] is
1404  * clear. RWU must be set only with CTRL[WAKE] = 0 (wakeup on idle) if the
1405  * channel is currently not idle. This can be determined by STAT[RAF]. If the flag is
1406  * set to wake up an IDLE event and the channel is already idle, it is possible
1407  * that the LPUART will discard data. This is because the data must be received or
1408  * a LIN break detected after an IDLE is detected before IDLE is allowed to
1409  * reasserted.
1410  *
1411  * Values:
1412  * - 0 - Normal receiver operation.
1413  * - 1 - LPUART receiver in standby waiting for wakeup condition.
1414  */
1415 /*@{*/
1416 #define BP_LPUART_CTRL_RWU   (17U)         /*!< Bit position for LPUART_CTRL_RWU. */
1417 #define BM_LPUART_CTRL_RWU   (0x00020000U) /*!< Bit mask for LPUART_CTRL_RWU. */
1418 #define BS_LPUART_CTRL_RWU   (1U)          /*!< Bit field size in bits for LPUART_CTRL_RWU. */
1419
1420 /*! @brief Read current value of the LPUART_CTRL_RWU field. */
1421 #define BR_LPUART_CTRL_RWU(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_RWU))
1422
1423 /*! @brief Format value for bitfield LPUART_CTRL_RWU. */
1424 #define BF_LPUART_CTRL_RWU(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_RWU) & BM_LPUART_CTRL_RWU)
1425
1426 /*! @brief Set the RWU field to a new value. */
1427 #define BW_LPUART_CTRL_RWU(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_RWU) = (v))
1428 /*@}*/
1429
1430 /*!
1431  * @name Register LPUART_CTRL, field RE[18] (RW)
1432  *
1433  * Enables the LPUART receiver. When RE is written to 0, this register bit will
1434  * read as 1 until the receiver finishes receiving the current character (if any).
1435  *
1436  * Values:
1437  * - 0 - Receiver disabled.
1438  * - 1 - Receiver enabled.
1439  */
1440 /*@{*/
1441 #define BP_LPUART_CTRL_RE    (18U)         /*!< Bit position for LPUART_CTRL_RE. */
1442 #define BM_LPUART_CTRL_RE    (0x00040000U) /*!< Bit mask for LPUART_CTRL_RE. */
1443 #define BS_LPUART_CTRL_RE    (1U)          /*!< Bit field size in bits for LPUART_CTRL_RE. */
1444
1445 /*! @brief Read current value of the LPUART_CTRL_RE field. */
1446 #define BR_LPUART_CTRL_RE(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_RE))
1447
1448 /*! @brief Format value for bitfield LPUART_CTRL_RE. */
1449 #define BF_LPUART_CTRL_RE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_RE) & BM_LPUART_CTRL_RE)
1450
1451 /*! @brief Set the RE field to a new value. */
1452 #define BW_LPUART_CTRL_RE(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_RE) = (v))
1453 /*@}*/
1454
1455 /*!
1456  * @name Register LPUART_CTRL, field TE[19] (RW)
1457  *
1458  * Enables the LPUART transmitter. TE can also be used to queue an idle preamble
1459  * by clearing and then setting TE. When TE is cleared, this register bit will
1460  * read as 1 until the transmitter has completed the current character and the
1461  * LPUART_TX pin is tristated.
1462  *
1463  * Values:
1464  * - 0 - Transmitter disabled.
1465  * - 1 - Transmitter enabled.
1466  */
1467 /*@{*/
1468 #define BP_LPUART_CTRL_TE    (19U)         /*!< Bit position for LPUART_CTRL_TE. */
1469 #define BM_LPUART_CTRL_TE    (0x00080000U) /*!< Bit mask for LPUART_CTRL_TE. */
1470 #define BS_LPUART_CTRL_TE    (1U)          /*!< Bit field size in bits for LPUART_CTRL_TE. */
1471
1472 /*! @brief Read current value of the LPUART_CTRL_TE field. */
1473 #define BR_LPUART_CTRL_TE(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_TE))
1474
1475 /*! @brief Format value for bitfield LPUART_CTRL_TE. */
1476 #define BF_LPUART_CTRL_TE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_TE) & BM_LPUART_CTRL_TE)
1477
1478 /*! @brief Set the TE field to a new value. */
1479 #define BW_LPUART_CTRL_TE(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_TE) = (v))
1480 /*@}*/
1481
1482 /*!
1483  * @name Register LPUART_CTRL, field ILIE[20] (RW)
1484  *
1485  * ILIE enables the idle line flag, STAT[IDLE], to generate interrupt requests.
1486  *
1487  * Values:
1488  * - 0 - Hardware interrupts from IDLE disabled; use polling.
1489  * - 1 - Hardware interrupt requested when IDLE flag is 1.
1490  */
1491 /*@{*/
1492 #define BP_LPUART_CTRL_ILIE  (20U)         /*!< Bit position for LPUART_CTRL_ILIE. */
1493 #define BM_LPUART_CTRL_ILIE  (0x00100000U) /*!< Bit mask for LPUART_CTRL_ILIE. */
1494 #define BS_LPUART_CTRL_ILIE  (1U)          /*!< Bit field size in bits for LPUART_CTRL_ILIE. */
1495
1496 /*! @brief Read current value of the LPUART_CTRL_ILIE field. */
1497 #define BR_LPUART_CTRL_ILIE(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_ILIE))
1498
1499 /*! @brief Format value for bitfield LPUART_CTRL_ILIE. */
1500 #define BF_LPUART_CTRL_ILIE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_ILIE) & BM_LPUART_CTRL_ILIE)
1501
1502 /*! @brief Set the ILIE field to a new value. */
1503 #define BW_LPUART_CTRL_ILIE(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_ILIE) = (v))
1504 /*@}*/
1505
1506 /*!
1507  * @name Register LPUART_CTRL, field RIE[21] (RW)
1508  *
1509  * Enables STAT[RDRF] to generate interrupt requests.
1510  *
1511  * Values:
1512  * - 0 - Hardware interrupts from RDRF disabled; use polling.
1513  * - 1 - Hardware interrupt requested when RDRF flag is 1.
1514  */
1515 /*@{*/
1516 #define BP_LPUART_CTRL_RIE   (21U)         /*!< Bit position for LPUART_CTRL_RIE. */
1517 #define BM_LPUART_CTRL_RIE   (0x00200000U) /*!< Bit mask for LPUART_CTRL_RIE. */
1518 #define BS_LPUART_CTRL_RIE   (1U)          /*!< Bit field size in bits for LPUART_CTRL_RIE. */
1519
1520 /*! @brief Read current value of the LPUART_CTRL_RIE field. */
1521 #define BR_LPUART_CTRL_RIE(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_RIE))
1522
1523 /*! @brief Format value for bitfield LPUART_CTRL_RIE. */
1524 #define BF_LPUART_CTRL_RIE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_RIE) & BM_LPUART_CTRL_RIE)
1525
1526 /*! @brief Set the RIE field to a new value. */
1527 #define BW_LPUART_CTRL_RIE(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_RIE) = (v))
1528 /*@}*/
1529
1530 /*!
1531  * @name Register LPUART_CTRL, field TCIE[22] (RW)
1532  *
1533  * TCIE enables the transmission complete flag, TC, to generate interrupt
1534  * requests.
1535  *
1536  * Values:
1537  * - 0 - Hardware interrupts from TC disabled; use polling.
1538  * - 1 - Hardware interrupt requested when TC flag is 1.
1539  */
1540 /*@{*/
1541 #define BP_LPUART_CTRL_TCIE  (22U)         /*!< Bit position for LPUART_CTRL_TCIE. */
1542 #define BM_LPUART_CTRL_TCIE  (0x00400000U) /*!< Bit mask for LPUART_CTRL_TCIE. */
1543 #define BS_LPUART_CTRL_TCIE  (1U)          /*!< Bit field size in bits for LPUART_CTRL_TCIE. */
1544
1545 /*! @brief Read current value of the LPUART_CTRL_TCIE field. */
1546 #define BR_LPUART_CTRL_TCIE(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_TCIE))
1547
1548 /*! @brief Format value for bitfield LPUART_CTRL_TCIE. */
1549 #define BF_LPUART_CTRL_TCIE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_TCIE) & BM_LPUART_CTRL_TCIE)
1550
1551 /*! @brief Set the TCIE field to a new value. */
1552 #define BW_LPUART_CTRL_TCIE(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_TCIE) = (v))
1553 /*@}*/
1554
1555 /*!
1556  * @name Register LPUART_CTRL, field TIE[23] (RW)
1557  *
1558  * Enables STAT[TDRE] to generate interrupt requests.
1559  *
1560  * Values:
1561  * - 0 - Hardware interrupts from TDRE disabled; use polling.
1562  * - 1 - Hardware interrupt requested when TDRE flag is 1.
1563  */
1564 /*@{*/
1565 #define BP_LPUART_CTRL_TIE   (23U)         /*!< Bit position for LPUART_CTRL_TIE. */
1566 #define BM_LPUART_CTRL_TIE   (0x00800000U) /*!< Bit mask for LPUART_CTRL_TIE. */
1567 #define BS_LPUART_CTRL_TIE   (1U)          /*!< Bit field size in bits for LPUART_CTRL_TIE. */
1568
1569 /*! @brief Read current value of the LPUART_CTRL_TIE field. */
1570 #define BR_LPUART_CTRL_TIE(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_TIE))
1571
1572 /*! @brief Format value for bitfield LPUART_CTRL_TIE. */
1573 #define BF_LPUART_CTRL_TIE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_TIE) & BM_LPUART_CTRL_TIE)
1574
1575 /*! @brief Set the TIE field to a new value. */
1576 #define BW_LPUART_CTRL_TIE(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_TIE) = (v))
1577 /*@}*/
1578
1579 /*!
1580  * @name Register LPUART_CTRL, field PEIE[24] (RW)
1581  *
1582  * This bit enables the parity error flag (PF) to generate hardware interrupt
1583  * requests.
1584  *
1585  * Values:
1586  * - 0 - PF interrupts disabled; use polling).
1587  * - 1 - Hardware interrupt requested when PF is set.
1588  */
1589 /*@{*/
1590 #define BP_LPUART_CTRL_PEIE  (24U)         /*!< Bit position for LPUART_CTRL_PEIE. */
1591 #define BM_LPUART_CTRL_PEIE  (0x01000000U) /*!< Bit mask for LPUART_CTRL_PEIE. */
1592 #define BS_LPUART_CTRL_PEIE  (1U)          /*!< Bit field size in bits for LPUART_CTRL_PEIE. */
1593
1594 /*! @brief Read current value of the LPUART_CTRL_PEIE field. */
1595 #define BR_LPUART_CTRL_PEIE(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_PEIE))
1596
1597 /*! @brief Format value for bitfield LPUART_CTRL_PEIE. */
1598 #define BF_LPUART_CTRL_PEIE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_PEIE) & BM_LPUART_CTRL_PEIE)
1599
1600 /*! @brief Set the PEIE field to a new value. */
1601 #define BW_LPUART_CTRL_PEIE(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_PEIE) = (v))
1602 /*@}*/
1603
1604 /*!
1605  * @name Register LPUART_CTRL, field FEIE[25] (RW)
1606  *
1607  * This bit enables the framing error flag (FE) to generate hardware interrupt
1608  * requests.
1609  *
1610  * Values:
1611  * - 0 - FE interrupts disabled; use polling.
1612  * - 1 - Hardware interrupt requested when FE is set.
1613  */
1614 /*@{*/
1615 #define BP_LPUART_CTRL_FEIE  (25U)         /*!< Bit position for LPUART_CTRL_FEIE. */
1616 #define BM_LPUART_CTRL_FEIE  (0x02000000U) /*!< Bit mask for LPUART_CTRL_FEIE. */
1617 #define BS_LPUART_CTRL_FEIE  (1U)          /*!< Bit field size in bits for LPUART_CTRL_FEIE. */
1618
1619 /*! @brief Read current value of the LPUART_CTRL_FEIE field. */
1620 #define BR_LPUART_CTRL_FEIE(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_FEIE))
1621
1622 /*! @brief Format value for bitfield LPUART_CTRL_FEIE. */
1623 #define BF_LPUART_CTRL_FEIE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_FEIE) & BM_LPUART_CTRL_FEIE)
1624
1625 /*! @brief Set the FEIE field to a new value. */
1626 #define BW_LPUART_CTRL_FEIE(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_FEIE) = (v))
1627 /*@}*/
1628
1629 /*!
1630  * @name Register LPUART_CTRL, field NEIE[26] (RW)
1631  *
1632  * This bit enables the noise flag (NF) to generate hardware interrupt requests.
1633  *
1634  * Values:
1635  * - 0 - NF interrupts disabled; use polling.
1636  * - 1 - Hardware interrupt requested when NF is set.
1637  */
1638 /*@{*/
1639 #define BP_LPUART_CTRL_NEIE  (26U)         /*!< Bit position for LPUART_CTRL_NEIE. */
1640 #define BM_LPUART_CTRL_NEIE  (0x04000000U) /*!< Bit mask for LPUART_CTRL_NEIE. */
1641 #define BS_LPUART_CTRL_NEIE  (1U)          /*!< Bit field size in bits for LPUART_CTRL_NEIE. */
1642
1643 /*! @brief Read current value of the LPUART_CTRL_NEIE field. */
1644 #define BR_LPUART_CTRL_NEIE(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_NEIE))
1645
1646 /*! @brief Format value for bitfield LPUART_CTRL_NEIE. */
1647 #define BF_LPUART_CTRL_NEIE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_NEIE) & BM_LPUART_CTRL_NEIE)
1648
1649 /*! @brief Set the NEIE field to a new value. */
1650 #define BW_LPUART_CTRL_NEIE(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_NEIE) = (v))
1651 /*@}*/
1652
1653 /*!
1654  * @name Register LPUART_CTRL, field ORIE[27] (RW)
1655  *
1656  * This bit enables the overrun flag (OR) to generate hardware interrupt
1657  * requests.
1658  *
1659  * Values:
1660  * - 0 - OR interrupts disabled; use polling.
1661  * - 1 - Hardware interrupt requested when OR is set.
1662  */
1663 /*@{*/
1664 #define BP_LPUART_CTRL_ORIE  (27U)         /*!< Bit position for LPUART_CTRL_ORIE. */
1665 #define BM_LPUART_CTRL_ORIE  (0x08000000U) /*!< Bit mask for LPUART_CTRL_ORIE. */
1666 #define BS_LPUART_CTRL_ORIE  (1U)          /*!< Bit field size in bits for LPUART_CTRL_ORIE. */
1667
1668 /*! @brief Read current value of the LPUART_CTRL_ORIE field. */
1669 #define BR_LPUART_CTRL_ORIE(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_ORIE))
1670
1671 /*! @brief Format value for bitfield LPUART_CTRL_ORIE. */
1672 #define BF_LPUART_CTRL_ORIE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_ORIE) & BM_LPUART_CTRL_ORIE)
1673
1674 /*! @brief Set the ORIE field to a new value. */
1675 #define BW_LPUART_CTRL_ORIE(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_ORIE) = (v))
1676 /*@}*/
1677
1678 /*!
1679  * @name Register LPUART_CTRL, field TXINV[28] (RW)
1680  *
1681  * Setting this bit reverses the polarity of the transmitted data output.
1682  * Setting TXINV inverts the LPUART_TX output for all cases: data bits, start and stop
1683  * bits, break, and idle.
1684  *
1685  * Values:
1686  * - 0 - Transmit data not inverted.
1687  * - 1 - Transmit data inverted.
1688  */
1689 /*@{*/
1690 #define BP_LPUART_CTRL_TXINV (28U)         /*!< Bit position for LPUART_CTRL_TXINV. */
1691 #define BM_LPUART_CTRL_TXINV (0x10000000U) /*!< Bit mask for LPUART_CTRL_TXINV. */
1692 #define BS_LPUART_CTRL_TXINV (1U)          /*!< Bit field size in bits for LPUART_CTRL_TXINV. */
1693
1694 /*! @brief Read current value of the LPUART_CTRL_TXINV field. */
1695 #define BR_LPUART_CTRL_TXINV(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_TXINV))
1696
1697 /*! @brief Format value for bitfield LPUART_CTRL_TXINV. */
1698 #define BF_LPUART_CTRL_TXINV(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_TXINV) & BM_LPUART_CTRL_TXINV)
1699
1700 /*! @brief Set the TXINV field to a new value. */
1701 #define BW_LPUART_CTRL_TXINV(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_TXINV) = (v))
1702 /*@}*/
1703
1704 /*!
1705  * @name Register LPUART_CTRL, field TXDIR[29] (RW)
1706  *
1707  * When the LPUART is configured for single-wire half-duplex operation (LOOPS =
1708  * RSRC = 1), this bit determines the direction of data at the LPUART_TX pin.
1709  * When clearing TXDIR, the transmitter will finish receiving the current character
1710  * (if any) before the receiver starts receiving data from the LPUART_TX pin.
1711  *
1712  * Values:
1713  * - 0 - LPUART_TX pin is an input in single-wire mode.
1714  * - 1 - LPUART_TX pin is an output in single-wire mode.
1715  */
1716 /*@{*/
1717 #define BP_LPUART_CTRL_TXDIR (29U)         /*!< Bit position for LPUART_CTRL_TXDIR. */
1718 #define BM_LPUART_CTRL_TXDIR (0x20000000U) /*!< Bit mask for LPUART_CTRL_TXDIR. */
1719 #define BS_LPUART_CTRL_TXDIR (1U)          /*!< Bit field size in bits for LPUART_CTRL_TXDIR. */
1720
1721 /*! @brief Read current value of the LPUART_CTRL_TXDIR field. */
1722 #define BR_LPUART_CTRL_TXDIR(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_TXDIR))
1723
1724 /*! @brief Format value for bitfield LPUART_CTRL_TXDIR. */
1725 #define BF_LPUART_CTRL_TXDIR(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_TXDIR) & BM_LPUART_CTRL_TXDIR)
1726
1727 /*! @brief Set the TXDIR field to a new value. */
1728 #define BW_LPUART_CTRL_TXDIR(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_TXDIR) = (v))
1729 /*@}*/
1730
1731 /*!
1732  * @name Register LPUART_CTRL, field R9T8[30] (RW)
1733  *
1734  * R9 is the tenth data bit received when the LPUART is configured for 10-bit
1735  * data formats. When reading 10-bit data, read R9 before reading LPUART_DATA T8 is
1736  * the ninth data bit received when the LPUART is configured for 9-bit or 10-bit
1737  * data formats. When writing 9-bit or 10-bit data, write T8 before writing
1738  * LPUART_DATA. If T8 does not need to change from its previous value, such as when
1739  * it is used to generate address mark or parity, they it need not be written each
1740  * time LPUART_DATA is written.
1741  */
1742 /*@{*/
1743 #define BP_LPUART_CTRL_R9T8  (30U)         /*!< Bit position for LPUART_CTRL_R9T8. */
1744 #define BM_LPUART_CTRL_R9T8  (0x40000000U) /*!< Bit mask for LPUART_CTRL_R9T8. */
1745 #define BS_LPUART_CTRL_R9T8  (1U)          /*!< Bit field size in bits for LPUART_CTRL_R9T8. */
1746
1747 /*! @brief Read current value of the LPUART_CTRL_R9T8 field. */
1748 #define BR_LPUART_CTRL_R9T8(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_R9T8))
1749
1750 /*! @brief Format value for bitfield LPUART_CTRL_R9T8. */
1751 #define BF_LPUART_CTRL_R9T8(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_R9T8) & BM_LPUART_CTRL_R9T8)
1752
1753 /*! @brief Set the R9T8 field to a new value. */
1754 #define BW_LPUART_CTRL_R9T8(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_R9T8) = (v))
1755 /*@}*/
1756
1757 /*!
1758  * @name Register LPUART_CTRL, field R8T9[31] (RW)
1759  *
1760  * R8 is the ninth data bit received when the LPUART is configured for 9-bit or
1761  * 10-bit data formats. When reading 9-bit or 10-bit data, read R8 before reading
1762  * LPUART_DATA. T9 is the tenth data bit received when the LPUART is configured
1763  * for 10-bit data formats. When writing 10-bit data, write T9 before writing
1764  * LPUART_DATA. If T9 does not need to change from its previous value, such as when
1765  * it is used to generate address mark or parity, they it need not be written
1766  * each time LPUART_DATA is written.
1767  */
1768 /*@{*/
1769 #define BP_LPUART_CTRL_R8T9  (31U)         /*!< Bit position for LPUART_CTRL_R8T9. */
1770 #define BM_LPUART_CTRL_R8T9  (0x80000000U) /*!< Bit mask for LPUART_CTRL_R8T9. */
1771 #define BS_LPUART_CTRL_R8T9  (1U)          /*!< Bit field size in bits for LPUART_CTRL_R8T9. */
1772
1773 /*! @brief Read current value of the LPUART_CTRL_R8T9 field. */
1774 #define BR_LPUART_CTRL_R8T9(x) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_R8T9))
1775
1776 /*! @brief Format value for bitfield LPUART_CTRL_R8T9. */
1777 #define BF_LPUART_CTRL_R8T9(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_CTRL_R8T9) & BM_LPUART_CTRL_R8T9)
1778
1779 /*! @brief Set the R8T9 field to a new value. */
1780 #define BW_LPUART_CTRL_R8T9(x, v) (BITBAND_ACCESS32(HW_LPUART_CTRL_ADDR(x), BP_LPUART_CTRL_R8T9) = (v))
1781 /*@}*/
1782
1783 /*******************************************************************************
1784  * HW_LPUART_DATA - LPUART Data Register
1785  ******************************************************************************/
1786
1787 /*!
1788  * @brief HW_LPUART_DATA - LPUART Data Register (RW)
1789  *
1790  * Reset value: 0x00001000U
1791  *
1792  * This register is actually two separate registers. Reads return the contents
1793  * of the read-only receive data buffer and writes go to the write-only transmit
1794  * data buffer. Reads and writes of this register are also involved in the
1795  * automatic flag clearing mechanisms for some of the LPUART status flags.
1796  */
1797 typedef union _hw_lpuart_data
1798 {
1799     uint32_t U;
1800     struct _hw_lpuart_data_bitfields
1801     {
1802         uint32_t R0T0 : 1;             /*!< [0]  */
1803         uint32_t R1T1 : 1;             /*!< [1]  */
1804         uint32_t R2T2 : 1;             /*!< [2]  */
1805         uint32_t R3T3 : 1;             /*!< [3]  */
1806         uint32_t R4T4 : 1;             /*!< [4]  */
1807         uint32_t R5T5 : 1;             /*!< [5]  */
1808         uint32_t R6T6 : 1;             /*!< [6]  */
1809         uint32_t R7T7 : 1;             /*!< [7]  */
1810         uint32_t R8T8 : 1;             /*!< [8]  */
1811         uint32_t R9T9 : 1;             /*!< [9]  */
1812         uint32_t RESERVED0 : 1;        /*!< [10]  */
1813         uint32_t IDLINE : 1;           /*!< [11] Idle Line */
1814         uint32_t RXEMPT : 1;           /*!< [12] Receive Buffer Empty */
1815         uint32_t FRETSC : 1;           /*!< [13] Frame Error / Transmit Special
1816                                         * Character */
1817         uint32_t PARITYE : 1;          /*!< [14]  */
1818         uint32_t NOISY : 1;            /*!< [15]  */
1819         uint32_t RESERVED1 : 16;       /*!< [31:16]  */
1820     } B;
1821 } hw_lpuart_data_t;
1822
1823 /*!
1824  * @name Constants and macros for entire LPUART_DATA register
1825  */
1826 /*@{*/
1827 #define HW_LPUART_DATA_ADDR(x)   ((x) + 0xCU)
1828
1829 #define HW_LPUART_DATA(x)        (*(__IO hw_lpuart_data_t *) HW_LPUART_DATA_ADDR(x))
1830 #define HW_LPUART_DATA_RD(x)     (HW_LPUART_DATA(x).U)
1831 #define HW_LPUART_DATA_WR(x, v)  (HW_LPUART_DATA(x).U = (v))
1832 #define HW_LPUART_DATA_SET(x, v) (HW_LPUART_DATA_WR(x, HW_LPUART_DATA_RD(x) |  (v)))
1833 #define HW_LPUART_DATA_CLR(x, v) (HW_LPUART_DATA_WR(x, HW_LPUART_DATA_RD(x) & ~(v)))
1834 #define HW_LPUART_DATA_TOG(x, v) (HW_LPUART_DATA_WR(x, HW_LPUART_DATA_RD(x) ^  (v)))
1835 /*@}*/
1836
1837 /*
1838  * Constants & macros for individual LPUART_DATA bitfields
1839  */
1840
1841 /*!
1842  * @name Register LPUART_DATA, field R0T0[0] (RW)
1843  *
1844  * Read receive data buffer 0 or write transmit data buffer 0.
1845  */
1846 /*@{*/
1847 #define BP_LPUART_DATA_R0T0  (0U)          /*!< Bit position for LPUART_DATA_R0T0. */
1848 #define BM_LPUART_DATA_R0T0  (0x00000001U) /*!< Bit mask for LPUART_DATA_R0T0. */
1849 #define BS_LPUART_DATA_R0T0  (1U)          /*!< Bit field size in bits for LPUART_DATA_R0T0. */
1850
1851 /*! @brief Read current value of the LPUART_DATA_R0T0 field. */
1852 #define BR_LPUART_DATA_R0T0(x) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_R0T0))
1853
1854 /*! @brief Format value for bitfield LPUART_DATA_R0T0. */
1855 #define BF_LPUART_DATA_R0T0(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_DATA_R0T0) & BM_LPUART_DATA_R0T0)
1856
1857 /*! @brief Set the R0T0 field to a new value. */
1858 #define BW_LPUART_DATA_R0T0(x, v) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_R0T0) = (v))
1859 /*@}*/
1860
1861 /*!
1862  * @name Register LPUART_DATA, field R1T1[1] (RW)
1863  *
1864  * Read receive data buffer 1 or write transmit data buffer 1.
1865  */
1866 /*@{*/
1867 #define BP_LPUART_DATA_R1T1  (1U)          /*!< Bit position for LPUART_DATA_R1T1. */
1868 #define BM_LPUART_DATA_R1T1  (0x00000002U) /*!< Bit mask for LPUART_DATA_R1T1. */
1869 #define BS_LPUART_DATA_R1T1  (1U)          /*!< Bit field size in bits for LPUART_DATA_R1T1. */
1870
1871 /*! @brief Read current value of the LPUART_DATA_R1T1 field. */
1872 #define BR_LPUART_DATA_R1T1(x) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_R1T1))
1873
1874 /*! @brief Format value for bitfield LPUART_DATA_R1T1. */
1875 #define BF_LPUART_DATA_R1T1(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_DATA_R1T1) & BM_LPUART_DATA_R1T1)
1876
1877 /*! @brief Set the R1T1 field to a new value. */
1878 #define BW_LPUART_DATA_R1T1(x, v) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_R1T1) = (v))
1879 /*@}*/
1880
1881 /*!
1882  * @name Register LPUART_DATA, field R2T2[2] (RW)
1883  *
1884  * Read receive data buffer 2 or write transmit data buffer 2.
1885  */
1886 /*@{*/
1887 #define BP_LPUART_DATA_R2T2  (2U)          /*!< Bit position for LPUART_DATA_R2T2. */
1888 #define BM_LPUART_DATA_R2T2  (0x00000004U) /*!< Bit mask for LPUART_DATA_R2T2. */
1889 #define BS_LPUART_DATA_R2T2  (1U)          /*!< Bit field size in bits for LPUART_DATA_R2T2. */
1890
1891 /*! @brief Read current value of the LPUART_DATA_R2T2 field. */
1892 #define BR_LPUART_DATA_R2T2(x) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_R2T2))
1893
1894 /*! @brief Format value for bitfield LPUART_DATA_R2T2. */
1895 #define BF_LPUART_DATA_R2T2(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_DATA_R2T2) & BM_LPUART_DATA_R2T2)
1896
1897 /*! @brief Set the R2T2 field to a new value. */
1898 #define BW_LPUART_DATA_R2T2(x, v) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_R2T2) = (v))
1899 /*@}*/
1900
1901 /*!
1902  * @name Register LPUART_DATA, field R3T3[3] (RW)
1903  *
1904  * Read receive data buffer 3 or write transmit data buffer 3.
1905  */
1906 /*@{*/
1907 #define BP_LPUART_DATA_R3T3  (3U)          /*!< Bit position for LPUART_DATA_R3T3. */
1908 #define BM_LPUART_DATA_R3T3  (0x00000008U) /*!< Bit mask for LPUART_DATA_R3T3. */
1909 #define BS_LPUART_DATA_R3T3  (1U)          /*!< Bit field size in bits for LPUART_DATA_R3T3. */
1910
1911 /*! @brief Read current value of the LPUART_DATA_R3T3 field. */
1912 #define BR_LPUART_DATA_R3T3(x) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_R3T3))
1913
1914 /*! @brief Format value for bitfield LPUART_DATA_R3T3. */
1915 #define BF_LPUART_DATA_R3T3(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_DATA_R3T3) & BM_LPUART_DATA_R3T3)
1916
1917 /*! @brief Set the R3T3 field to a new value. */
1918 #define BW_LPUART_DATA_R3T3(x, v) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_R3T3) = (v))
1919 /*@}*/
1920
1921 /*!
1922  * @name Register LPUART_DATA, field R4T4[4] (RW)
1923  *
1924  * Read receive data buffer 4 or write transmit data buffer 4.
1925  */
1926 /*@{*/
1927 #define BP_LPUART_DATA_R4T4  (4U)          /*!< Bit position for LPUART_DATA_R4T4. */
1928 #define BM_LPUART_DATA_R4T4  (0x00000010U) /*!< Bit mask for LPUART_DATA_R4T4. */
1929 #define BS_LPUART_DATA_R4T4  (1U)          /*!< Bit field size in bits for LPUART_DATA_R4T4. */
1930
1931 /*! @brief Read current value of the LPUART_DATA_R4T4 field. */
1932 #define BR_LPUART_DATA_R4T4(x) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_R4T4))
1933
1934 /*! @brief Format value for bitfield LPUART_DATA_R4T4. */
1935 #define BF_LPUART_DATA_R4T4(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_DATA_R4T4) & BM_LPUART_DATA_R4T4)
1936
1937 /*! @brief Set the R4T4 field to a new value. */
1938 #define BW_LPUART_DATA_R4T4(x, v) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_R4T4) = (v))
1939 /*@}*/
1940
1941 /*!
1942  * @name Register LPUART_DATA, field R5T5[5] (RW)
1943  *
1944  * Read receive data buffer 5 or write transmit data buffer 5.
1945  */
1946 /*@{*/
1947 #define BP_LPUART_DATA_R5T5  (5U)          /*!< Bit position for LPUART_DATA_R5T5. */
1948 #define BM_LPUART_DATA_R5T5  (0x00000020U) /*!< Bit mask for LPUART_DATA_R5T5. */
1949 #define BS_LPUART_DATA_R5T5  (1U)          /*!< Bit field size in bits for LPUART_DATA_R5T5. */
1950
1951 /*! @brief Read current value of the LPUART_DATA_R5T5 field. */
1952 #define BR_LPUART_DATA_R5T5(x) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_R5T5))
1953
1954 /*! @brief Format value for bitfield LPUART_DATA_R5T5. */
1955 #define BF_LPUART_DATA_R5T5(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_DATA_R5T5) & BM_LPUART_DATA_R5T5)
1956
1957 /*! @brief Set the R5T5 field to a new value. */
1958 #define BW_LPUART_DATA_R5T5(x, v) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_R5T5) = (v))
1959 /*@}*/
1960
1961 /*!
1962  * @name Register LPUART_DATA, field R6T6[6] (RW)
1963  *
1964  * Read receive data buffer 6 or write transmit data buffer 6.
1965  */
1966 /*@{*/
1967 #define BP_LPUART_DATA_R6T6  (6U)          /*!< Bit position for LPUART_DATA_R6T6. */
1968 #define BM_LPUART_DATA_R6T6  (0x00000040U) /*!< Bit mask for LPUART_DATA_R6T6. */
1969 #define BS_LPUART_DATA_R6T6  (1U)          /*!< Bit field size in bits for LPUART_DATA_R6T6. */
1970
1971 /*! @brief Read current value of the LPUART_DATA_R6T6 field. */
1972 #define BR_LPUART_DATA_R6T6(x) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_R6T6))
1973
1974 /*! @brief Format value for bitfield LPUART_DATA_R6T6. */
1975 #define BF_LPUART_DATA_R6T6(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_DATA_R6T6) & BM_LPUART_DATA_R6T6)
1976
1977 /*! @brief Set the R6T6 field to a new value. */
1978 #define BW_LPUART_DATA_R6T6(x, v) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_R6T6) = (v))
1979 /*@}*/
1980
1981 /*!
1982  * @name Register LPUART_DATA, field R7T7[7] (RW)
1983  *
1984  * Read receive data buffer 7 or write transmit data buffer 7.
1985  */
1986 /*@{*/
1987 #define BP_LPUART_DATA_R7T7  (7U)          /*!< Bit position for LPUART_DATA_R7T7. */
1988 #define BM_LPUART_DATA_R7T7  (0x00000080U) /*!< Bit mask for LPUART_DATA_R7T7. */
1989 #define BS_LPUART_DATA_R7T7  (1U)          /*!< Bit field size in bits for LPUART_DATA_R7T7. */
1990
1991 /*! @brief Read current value of the LPUART_DATA_R7T7 field. */
1992 #define BR_LPUART_DATA_R7T7(x) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_R7T7))
1993
1994 /*! @brief Format value for bitfield LPUART_DATA_R7T7. */
1995 #define BF_LPUART_DATA_R7T7(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_DATA_R7T7) & BM_LPUART_DATA_R7T7)
1996
1997 /*! @brief Set the R7T7 field to a new value. */
1998 #define BW_LPUART_DATA_R7T7(x, v) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_R7T7) = (v))
1999 /*@}*/
2000
2001 /*!
2002  * @name Register LPUART_DATA, field R8T8[8] (RW)
2003  *
2004  * Read receive data buffer 8 or write transmit data buffer 8.
2005  */
2006 /*@{*/
2007 #define BP_LPUART_DATA_R8T8  (8U)          /*!< Bit position for LPUART_DATA_R8T8. */
2008 #define BM_LPUART_DATA_R8T8  (0x00000100U) /*!< Bit mask for LPUART_DATA_R8T8. */
2009 #define BS_LPUART_DATA_R8T8  (1U)          /*!< Bit field size in bits for LPUART_DATA_R8T8. */
2010
2011 /*! @brief Read current value of the LPUART_DATA_R8T8 field. */
2012 #define BR_LPUART_DATA_R8T8(x) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_R8T8))
2013
2014 /*! @brief Format value for bitfield LPUART_DATA_R8T8. */
2015 #define BF_LPUART_DATA_R8T8(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_DATA_R8T8) & BM_LPUART_DATA_R8T8)
2016
2017 /*! @brief Set the R8T8 field to a new value. */
2018 #define BW_LPUART_DATA_R8T8(x, v) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_R8T8) = (v))
2019 /*@}*/
2020
2021 /*!
2022  * @name Register LPUART_DATA, field R9T9[9] (RW)
2023  *
2024  * Read receive data buffer 9 or write transmit data buffer 9.
2025  */
2026 /*@{*/
2027 #define BP_LPUART_DATA_R9T9  (9U)          /*!< Bit position for LPUART_DATA_R9T9. */
2028 #define BM_LPUART_DATA_R9T9  (0x00000200U) /*!< Bit mask for LPUART_DATA_R9T9. */
2029 #define BS_LPUART_DATA_R9T9  (1U)          /*!< Bit field size in bits for LPUART_DATA_R9T9. */
2030
2031 /*! @brief Read current value of the LPUART_DATA_R9T9 field. */
2032 #define BR_LPUART_DATA_R9T9(x) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_R9T9))
2033
2034 /*! @brief Format value for bitfield LPUART_DATA_R9T9. */
2035 #define BF_LPUART_DATA_R9T9(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_DATA_R9T9) & BM_LPUART_DATA_R9T9)
2036
2037 /*! @brief Set the R9T9 field to a new value. */
2038 #define BW_LPUART_DATA_R9T9(x, v) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_R9T9) = (v))
2039 /*@}*/
2040
2041 /*!
2042  * @name Register LPUART_DATA, field IDLINE[11] (RO)
2043  *
2044  * Indicates the receiver line was idle before receiving the character in
2045  * DATA[9:0]. Unlike the IDLE flag, this bit can set for the first character received
2046  * when the receiver is first enabled.
2047  *
2048  * Values:
2049  * - 0 - Receiver was not idle before receiving this character.
2050  * - 1 - Receiver was idle before receiving this character.
2051  */
2052 /*@{*/
2053 #define BP_LPUART_DATA_IDLINE (11U)        /*!< Bit position for LPUART_DATA_IDLINE. */
2054 #define BM_LPUART_DATA_IDLINE (0x00000800U) /*!< Bit mask for LPUART_DATA_IDLINE. */
2055 #define BS_LPUART_DATA_IDLINE (1U)         /*!< Bit field size in bits for LPUART_DATA_IDLINE. */
2056
2057 /*! @brief Read current value of the LPUART_DATA_IDLINE field. */
2058 #define BR_LPUART_DATA_IDLINE(x) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_IDLINE))
2059 /*@}*/
2060
2061 /*!
2062  * @name Register LPUART_DATA, field RXEMPT[12] (RO)
2063  *
2064  * Asserts when there is no data in the receive buffer. This field does not take
2065  * into account data that is in the receive shift register.
2066  *
2067  * Values:
2068  * - 0 - Receive buffer contains valid data.
2069  * - 1 - Receive buffer is empty, data returned on read is not valid.
2070  */
2071 /*@{*/
2072 #define BP_LPUART_DATA_RXEMPT (12U)        /*!< Bit position for LPUART_DATA_RXEMPT. */
2073 #define BM_LPUART_DATA_RXEMPT (0x00001000U) /*!< Bit mask for LPUART_DATA_RXEMPT. */
2074 #define BS_LPUART_DATA_RXEMPT (1U)         /*!< Bit field size in bits for LPUART_DATA_RXEMPT. */
2075
2076 /*! @brief Read current value of the LPUART_DATA_RXEMPT field. */
2077 #define BR_LPUART_DATA_RXEMPT(x) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_RXEMPT))
2078 /*@}*/
2079
2080 /*!
2081  * @name Register LPUART_DATA, field FRETSC[13] (RW)
2082  *
2083  * For reads, indicates the current received dataword contained in DATA[R9:R0]
2084  * was received with a frame error. For writes, indicates a break or idle
2085  * character is to be transmitted instead of the contents in DATA[T9:T0]. T9 is used to
2086  * indicate a break character when 0 and a idle character when 1, he contents of
2087  * DATA[T8:T0] should be zero.
2088  *
2089  * Values:
2090  * - 0 - The dataword was received without a frame error on read, transmit a
2091  *     normal character on write.
2092  * - 1 - The dataword was received with a frame error, transmit an idle or break
2093  *     character on transmit.
2094  */
2095 /*@{*/
2096 #define BP_LPUART_DATA_FRETSC (13U)        /*!< Bit position for LPUART_DATA_FRETSC. */
2097 #define BM_LPUART_DATA_FRETSC (0x00002000U) /*!< Bit mask for LPUART_DATA_FRETSC. */
2098 #define BS_LPUART_DATA_FRETSC (1U)         /*!< Bit field size in bits for LPUART_DATA_FRETSC. */
2099
2100 /*! @brief Read current value of the LPUART_DATA_FRETSC field. */
2101 #define BR_LPUART_DATA_FRETSC(x) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_FRETSC))
2102
2103 /*! @brief Format value for bitfield LPUART_DATA_FRETSC. */
2104 #define BF_LPUART_DATA_FRETSC(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_DATA_FRETSC) & BM_LPUART_DATA_FRETSC)
2105
2106 /*! @brief Set the FRETSC field to a new value. */
2107 #define BW_LPUART_DATA_FRETSC(x, v) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_FRETSC) = (v))
2108 /*@}*/
2109
2110 /*!
2111  * @name Register LPUART_DATA, field PARITYE[14] (RO)
2112  *
2113  * The current received dataword contained in DATA[R9:R0] was received with a
2114  * parity error.
2115  *
2116  * Values:
2117  * - 0 - The dataword was received without a parity error.
2118  * - 1 - The dataword was received with a parity error.
2119  */
2120 /*@{*/
2121 #define BP_LPUART_DATA_PARITYE (14U)       /*!< Bit position for LPUART_DATA_PARITYE. */
2122 #define BM_LPUART_DATA_PARITYE (0x00004000U) /*!< Bit mask for LPUART_DATA_PARITYE. */
2123 #define BS_LPUART_DATA_PARITYE (1U)        /*!< Bit field size in bits for LPUART_DATA_PARITYE. */
2124
2125 /*! @brief Read current value of the LPUART_DATA_PARITYE field. */
2126 #define BR_LPUART_DATA_PARITYE(x) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_PARITYE))
2127 /*@}*/
2128
2129 /*!
2130  * @name Register LPUART_DATA, field NOISY[15] (RO)
2131  *
2132  * The current received dataword contained in DATA[R9:R0] was received with
2133  * noise.
2134  *
2135  * Values:
2136  * - 0 - The dataword was received without noise.
2137  * - 1 - The data was received with noise.
2138  */
2139 /*@{*/
2140 #define BP_LPUART_DATA_NOISY (15U)         /*!< Bit position for LPUART_DATA_NOISY. */
2141 #define BM_LPUART_DATA_NOISY (0x00008000U) /*!< Bit mask for LPUART_DATA_NOISY. */
2142 #define BS_LPUART_DATA_NOISY (1U)          /*!< Bit field size in bits for LPUART_DATA_NOISY. */
2143
2144 /*! @brief Read current value of the LPUART_DATA_NOISY field. */
2145 #define BR_LPUART_DATA_NOISY(x) (BITBAND_ACCESS32(HW_LPUART_DATA_ADDR(x), BP_LPUART_DATA_NOISY))
2146 /*@}*/
2147
2148 /*******************************************************************************
2149  * HW_LPUART_MATCH - LPUART Match Address Register
2150  ******************************************************************************/
2151
2152 /*!
2153  * @brief HW_LPUART_MATCH - LPUART Match Address Register (RW)
2154  *
2155  * Reset value: 0x00000000U
2156  */
2157 typedef union _hw_lpuart_match
2158 {
2159     uint32_t U;
2160     struct _hw_lpuart_match_bitfields
2161     {
2162         uint32_t MA1 : 10;             /*!< [9:0] Match Address 1 */
2163         uint32_t RESERVED0 : 6;        /*!< [15:10]  */
2164         uint32_t MA2 : 10;             /*!< [25:16] Match Address 2 */
2165         uint32_t RESERVED1 : 6;        /*!< [31:26]  */
2166     } B;
2167 } hw_lpuart_match_t;
2168
2169 /*!
2170  * @name Constants and macros for entire LPUART_MATCH register
2171  */
2172 /*@{*/
2173 #define HW_LPUART_MATCH_ADDR(x)  ((x) + 0x10U)
2174
2175 #define HW_LPUART_MATCH(x)       (*(__IO hw_lpuart_match_t *) HW_LPUART_MATCH_ADDR(x))
2176 #define HW_LPUART_MATCH_RD(x)    (HW_LPUART_MATCH(x).U)
2177 #define HW_LPUART_MATCH_WR(x, v) (HW_LPUART_MATCH(x).U = (v))
2178 #define HW_LPUART_MATCH_SET(x, v) (HW_LPUART_MATCH_WR(x, HW_LPUART_MATCH_RD(x) |  (v)))
2179 #define HW_LPUART_MATCH_CLR(x, v) (HW_LPUART_MATCH_WR(x, HW_LPUART_MATCH_RD(x) & ~(v)))
2180 #define HW_LPUART_MATCH_TOG(x, v) (HW_LPUART_MATCH_WR(x, HW_LPUART_MATCH_RD(x) ^  (v)))
2181 /*@}*/
2182
2183 /*
2184  * Constants & macros for individual LPUART_MATCH bitfields
2185  */
2186
2187 /*!
2188  * @name Register LPUART_MATCH, field MA1[9:0] (RW)
2189  *
2190  * The MA1 and MA2 registers are compared to input data addresses when the most
2191  * significant bit is set and the associated BAUD[MAEN] bit is set. If a match
2192  * occurs, the following data is transferred to the data register. If a match
2193  * fails, the following data is discarded. Software should only write a MA register
2194  * when the associated BAUD[MAEN] bit is clear.
2195  */
2196 /*@{*/
2197 #define BP_LPUART_MATCH_MA1  (0U)          /*!< Bit position for LPUART_MATCH_MA1. */
2198 #define BM_LPUART_MATCH_MA1  (0x000003FFU) /*!< Bit mask for LPUART_MATCH_MA1. */
2199 #define BS_LPUART_MATCH_MA1  (10U)         /*!< Bit field size in bits for LPUART_MATCH_MA1. */
2200
2201 /*! @brief Read current value of the LPUART_MATCH_MA1 field. */
2202 #define BR_LPUART_MATCH_MA1(x) (HW_LPUART_MATCH(x).B.MA1)
2203
2204 /*! @brief Format value for bitfield LPUART_MATCH_MA1. */
2205 #define BF_LPUART_MATCH_MA1(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_MATCH_MA1) & BM_LPUART_MATCH_MA1)
2206
2207 /*! @brief Set the MA1 field to a new value. */
2208 #define BW_LPUART_MATCH_MA1(x, v) (HW_LPUART_MATCH_WR(x, (HW_LPUART_MATCH_RD(x) & ~BM_LPUART_MATCH_MA1) | BF_LPUART_MATCH_MA1(v)))
2209 /*@}*/
2210
2211 /*!
2212  * @name Register LPUART_MATCH, field MA2[25:16] (RW)
2213  *
2214  * The MA1 and MA2 registers are compared to input data addresses when the most
2215  * significant bit is set and the associated BAUD[MAEN] bit is set. If a match
2216  * occurs, the following data is transferred to the data register. If a match
2217  * fails, the following data is discarded. Software should only write a MA register
2218  * when the associated BAUD[MAEN] bit is clear.
2219  */
2220 /*@{*/
2221 #define BP_LPUART_MATCH_MA2  (16U)         /*!< Bit position for LPUART_MATCH_MA2. */
2222 #define BM_LPUART_MATCH_MA2  (0x03FF0000U) /*!< Bit mask for LPUART_MATCH_MA2. */
2223 #define BS_LPUART_MATCH_MA2  (10U)         /*!< Bit field size in bits for LPUART_MATCH_MA2. */
2224
2225 /*! @brief Read current value of the LPUART_MATCH_MA2 field. */
2226 #define BR_LPUART_MATCH_MA2(x) (HW_LPUART_MATCH(x).B.MA2)
2227
2228 /*! @brief Format value for bitfield LPUART_MATCH_MA2. */
2229 #define BF_LPUART_MATCH_MA2(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_MATCH_MA2) & BM_LPUART_MATCH_MA2)
2230
2231 /*! @brief Set the MA2 field to a new value. */
2232 #define BW_LPUART_MATCH_MA2(x, v) (HW_LPUART_MATCH_WR(x, (HW_LPUART_MATCH_RD(x) & ~BM_LPUART_MATCH_MA2) | BF_LPUART_MATCH_MA2(v)))
2233 /*@}*/
2234
2235 /*******************************************************************************
2236  * HW_LPUART_MODIR - LPUART Modem IrDA Register
2237  ******************************************************************************/
2238
2239 /*!
2240  * @brief HW_LPUART_MODIR - LPUART Modem IrDA Register (RW)
2241  *
2242  * Reset value: 0x00000000U
2243  *
2244  * The MODEM register controls options for setting the modem configuration.
2245  */
2246 typedef union _hw_lpuart_modir
2247 {
2248     uint32_t U;
2249     struct _hw_lpuart_modir_bitfields
2250     {
2251         uint32_t TXCTSE : 1;           /*!< [0] Transmitter clear-to-send enable */
2252         uint32_t TXRTSE : 1;           /*!< [1] Transmitter request-to-send enable */
2253         uint32_t TXRTSPOL : 1;         /*!< [2] Transmitter request-to-send polarity
2254                                         * */
2255         uint32_t RXRTSE : 1;           /*!< [3] Receiver request-to-send enable */
2256         uint32_t TXCTSC : 1;           /*!< [4] Transmit CTS Configuration */
2257         uint32_t TXCTSSRC : 1;         /*!< [5] Transmit CTS Source */
2258         uint32_t RESERVED0 : 10;       /*!< [15:6]  */
2259         uint32_t TNP : 2;              /*!< [17:16] Transmitter narrow pulse */
2260         uint32_t IREN : 1;             /*!< [18] Infrared enable */
2261         uint32_t RESERVED1 : 13;       /*!< [31:19]  */
2262     } B;
2263 } hw_lpuart_modir_t;
2264
2265 /*!
2266  * @name Constants and macros for entire LPUART_MODIR register
2267  */
2268 /*@{*/
2269 #define HW_LPUART_MODIR_ADDR(x)  ((x) + 0x14U)
2270
2271 #define HW_LPUART_MODIR(x)       (*(__IO hw_lpuart_modir_t *) HW_LPUART_MODIR_ADDR(x))
2272 #define HW_LPUART_MODIR_RD(x)    (HW_LPUART_MODIR(x).U)
2273 #define HW_LPUART_MODIR_WR(x, v) (HW_LPUART_MODIR(x).U = (v))
2274 #define HW_LPUART_MODIR_SET(x, v) (HW_LPUART_MODIR_WR(x, HW_LPUART_MODIR_RD(x) |  (v)))
2275 #define HW_LPUART_MODIR_CLR(x, v) (HW_LPUART_MODIR_WR(x, HW_LPUART_MODIR_RD(x) & ~(v)))
2276 #define HW_LPUART_MODIR_TOG(x, v) (HW_LPUART_MODIR_WR(x, HW_LPUART_MODIR_RD(x) ^  (v)))
2277 /*@}*/
2278
2279 /*
2280  * Constants & macros for individual LPUART_MODIR bitfields
2281  */
2282
2283 /*!
2284  * @name Register LPUART_MODIR, field TXCTSE[0] (RW)
2285  *
2286  * TXCTSE controls the operation of the transmitter. TXCTSE can be set
2287  * independently from the state of TXRTSE and RXRTSE.
2288  *
2289  * Values:
2290  * - 0 - CTS has no effect on the transmitter.
2291  * - 1 - Enables clear-to-send operation. The transmitter checks the state of
2292  *     CTS each time it is ready to send a character. If CTS is asserted, the
2293  *     character is sent. If CTS is deasserted, the signal TXD remains in the mark
2294  *     state and transmission is delayed until CTS is asserted. Changes in CTS as a
2295  *     character is being sent do not affect its transmission.
2296  */
2297 /*@{*/
2298 #define BP_LPUART_MODIR_TXCTSE (0U)        /*!< Bit position for LPUART_MODIR_TXCTSE. */
2299 #define BM_LPUART_MODIR_TXCTSE (0x00000001U) /*!< Bit mask for LPUART_MODIR_TXCTSE. */
2300 #define BS_LPUART_MODIR_TXCTSE (1U)        /*!< Bit field size in bits for LPUART_MODIR_TXCTSE. */
2301
2302 /*! @brief Read current value of the LPUART_MODIR_TXCTSE field. */
2303 #define BR_LPUART_MODIR_TXCTSE(x) (BITBAND_ACCESS32(HW_LPUART_MODIR_ADDR(x), BP_LPUART_MODIR_TXCTSE))
2304
2305 /*! @brief Format value for bitfield LPUART_MODIR_TXCTSE. */
2306 #define BF_LPUART_MODIR_TXCTSE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_MODIR_TXCTSE) & BM_LPUART_MODIR_TXCTSE)
2307
2308 /*! @brief Set the TXCTSE field to a new value. */
2309 #define BW_LPUART_MODIR_TXCTSE(x, v) (BITBAND_ACCESS32(HW_LPUART_MODIR_ADDR(x), BP_LPUART_MODIR_TXCTSE) = (v))
2310 /*@}*/
2311
2312 /*!
2313  * @name Register LPUART_MODIR, field TXRTSE[1] (RW)
2314  *
2315  * Controls RTS before and after a transmission.
2316  *
2317  * Values:
2318  * - 0 - The transmitter has no effect on RTS.
2319  * - 1 - When a character is placed into an empty transmitter data buffer , RTS
2320  *     asserts one bit time before the start bit is transmitted. RTS deasserts
2321  *     one bit time after all characters in the transmitter data buffer and shift
2322  *     register are completely sent, including the last stop bit.
2323  */
2324 /*@{*/
2325 #define BP_LPUART_MODIR_TXRTSE (1U)        /*!< Bit position for LPUART_MODIR_TXRTSE. */
2326 #define BM_LPUART_MODIR_TXRTSE (0x00000002U) /*!< Bit mask for LPUART_MODIR_TXRTSE. */
2327 #define BS_LPUART_MODIR_TXRTSE (1U)        /*!< Bit field size in bits for LPUART_MODIR_TXRTSE. */
2328
2329 /*! @brief Read current value of the LPUART_MODIR_TXRTSE field. */
2330 #define BR_LPUART_MODIR_TXRTSE(x) (BITBAND_ACCESS32(HW_LPUART_MODIR_ADDR(x), BP_LPUART_MODIR_TXRTSE))
2331
2332 /*! @brief Format value for bitfield LPUART_MODIR_TXRTSE. */
2333 #define BF_LPUART_MODIR_TXRTSE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_MODIR_TXRTSE) & BM_LPUART_MODIR_TXRTSE)
2334
2335 /*! @brief Set the TXRTSE field to a new value. */
2336 #define BW_LPUART_MODIR_TXRTSE(x, v) (BITBAND_ACCESS32(HW_LPUART_MODIR_ADDR(x), BP_LPUART_MODIR_TXRTSE) = (v))
2337 /*@}*/
2338
2339 /*!
2340  * @name Register LPUART_MODIR, field TXRTSPOL[2] (RW)
2341  *
2342  * Controls the polarity of the transmitter RTS. TXRTSPOL does not affect the
2343  * polarity of the receiver RTS. RTS will remain negated in the active low state
2344  * unless TXRTSE is set.
2345  *
2346  * Values:
2347  * - 0 - Transmitter RTS is active low.
2348  * - 1 - Transmitter RTS is active high.
2349  */
2350 /*@{*/
2351 #define BP_LPUART_MODIR_TXRTSPOL (2U)      /*!< Bit position for LPUART_MODIR_TXRTSPOL. */
2352 #define BM_LPUART_MODIR_TXRTSPOL (0x00000004U) /*!< Bit mask for LPUART_MODIR_TXRTSPOL. */
2353 #define BS_LPUART_MODIR_TXRTSPOL (1U)      /*!< Bit field size in bits for LPUART_MODIR_TXRTSPOL. */
2354
2355 /*! @brief Read current value of the LPUART_MODIR_TXRTSPOL field. */
2356 #define BR_LPUART_MODIR_TXRTSPOL(x) (BITBAND_ACCESS32(HW_LPUART_MODIR_ADDR(x), BP_LPUART_MODIR_TXRTSPOL))
2357
2358 /*! @brief Format value for bitfield LPUART_MODIR_TXRTSPOL. */
2359 #define BF_LPUART_MODIR_TXRTSPOL(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_MODIR_TXRTSPOL) & BM_LPUART_MODIR_TXRTSPOL)
2360
2361 /*! @brief Set the TXRTSPOL field to a new value. */
2362 #define BW_LPUART_MODIR_TXRTSPOL(x, v) (BITBAND_ACCESS32(HW_LPUART_MODIR_ADDR(x), BP_LPUART_MODIR_TXRTSPOL) = (v))
2363 /*@}*/
2364
2365 /*!
2366  * @name Register LPUART_MODIR, field RXRTSE[3] (RW)
2367  *
2368  * Allows the RTS output to control the CTS input of the transmitting device to
2369  * prevent receiver overrun. Do not set both RXRTSE and TXRTSE.
2370  *
2371  * Values:
2372  * - 0 - The receiver has no effect on RTS.
2373  * - 1 - RTS is deasserted if the receiver data register is full or a start bit
2374  *     has been detected that would cause the receiver data register to become
2375  *     full. RTS is asserted if the receiver data register is not full and has not
2376  *     detected a start bit that would cause the receiver data register to become
2377  *     full.
2378  */
2379 /*@{*/
2380 #define BP_LPUART_MODIR_RXRTSE (3U)        /*!< Bit position for LPUART_MODIR_RXRTSE. */
2381 #define BM_LPUART_MODIR_RXRTSE (0x00000008U) /*!< Bit mask for LPUART_MODIR_RXRTSE. */
2382 #define BS_LPUART_MODIR_RXRTSE (1U)        /*!< Bit field size in bits for LPUART_MODIR_RXRTSE. */
2383
2384 /*! @brief Read current value of the LPUART_MODIR_RXRTSE field. */
2385 #define BR_LPUART_MODIR_RXRTSE(x) (BITBAND_ACCESS32(HW_LPUART_MODIR_ADDR(x), BP_LPUART_MODIR_RXRTSE))
2386
2387 /*! @brief Format value for bitfield LPUART_MODIR_RXRTSE. */
2388 #define BF_LPUART_MODIR_RXRTSE(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_MODIR_RXRTSE) & BM_LPUART_MODIR_RXRTSE)
2389
2390 /*! @brief Set the RXRTSE field to a new value. */
2391 #define BW_LPUART_MODIR_RXRTSE(x, v) (BITBAND_ACCESS32(HW_LPUART_MODIR_ADDR(x), BP_LPUART_MODIR_RXRTSE) = (v))
2392 /*@}*/
2393
2394 /*!
2395  * @name Register LPUART_MODIR, field TXCTSC[4] (RW)
2396  *
2397  * Configures if the CTS state is checked at the start of each character or only
2398  * when the transmitter is idle.
2399  *
2400  * Values:
2401  * - 0 - CTS input is sampled at the start of each character.
2402  * - 1 - CTS input is sampled when the transmitter is idle.
2403  */
2404 /*@{*/
2405 #define BP_LPUART_MODIR_TXCTSC (4U)        /*!< Bit position for LPUART_MODIR_TXCTSC. */
2406 #define BM_LPUART_MODIR_TXCTSC (0x00000010U) /*!< Bit mask for LPUART_MODIR_TXCTSC. */
2407 #define BS_LPUART_MODIR_TXCTSC (1U)        /*!< Bit field size in bits for LPUART_MODIR_TXCTSC. */
2408
2409 /*! @brief Read current value of the LPUART_MODIR_TXCTSC field. */
2410 #define BR_LPUART_MODIR_TXCTSC(x) (BITBAND_ACCESS32(HW_LPUART_MODIR_ADDR(x), BP_LPUART_MODIR_TXCTSC))
2411
2412 /*! @brief Format value for bitfield LPUART_MODIR_TXCTSC. */
2413 #define BF_LPUART_MODIR_TXCTSC(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_MODIR_TXCTSC) & BM_LPUART_MODIR_TXCTSC)
2414
2415 /*! @brief Set the TXCTSC field to a new value. */
2416 #define BW_LPUART_MODIR_TXCTSC(x, v) (BITBAND_ACCESS32(HW_LPUART_MODIR_ADDR(x), BP_LPUART_MODIR_TXCTSC) = (v))
2417 /*@}*/
2418
2419 /*!
2420  * @name Register LPUART_MODIR, field TXCTSSRC[5] (RW)
2421  *
2422  * Configures the source of the CTS input.
2423  *
2424  * Values:
2425  * - 0 - CTS input is the LPUART_CTS pin.
2426  * - 1 - CTS input is the inverted Receiver Match result.
2427  */
2428 /*@{*/
2429 #define BP_LPUART_MODIR_TXCTSSRC (5U)      /*!< Bit position for LPUART_MODIR_TXCTSSRC. */
2430 #define BM_LPUART_MODIR_TXCTSSRC (0x00000020U) /*!< Bit mask for LPUART_MODIR_TXCTSSRC. */
2431 #define BS_LPUART_MODIR_TXCTSSRC (1U)      /*!< Bit field size in bits for LPUART_MODIR_TXCTSSRC. */
2432
2433 /*! @brief Read current value of the LPUART_MODIR_TXCTSSRC field. */
2434 #define BR_LPUART_MODIR_TXCTSSRC(x) (BITBAND_ACCESS32(HW_LPUART_MODIR_ADDR(x), BP_LPUART_MODIR_TXCTSSRC))
2435
2436 /*! @brief Format value for bitfield LPUART_MODIR_TXCTSSRC. */
2437 #define BF_LPUART_MODIR_TXCTSSRC(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_MODIR_TXCTSSRC) & BM_LPUART_MODIR_TXCTSSRC)
2438
2439 /*! @brief Set the TXCTSSRC field to a new value. */
2440 #define BW_LPUART_MODIR_TXCTSSRC(x, v) (BITBAND_ACCESS32(HW_LPUART_MODIR_ADDR(x), BP_LPUART_MODIR_TXCTSSRC) = (v))
2441 /*@}*/
2442
2443 /*!
2444  * @name Register LPUART_MODIR, field TNP[17:16] (RW)
2445  *
2446  * Enables whether the LPUART transmits a 1/OSR, 2/OSR, 3/OSR or 4/OSR narrow
2447  * pulse.
2448  *
2449  * Values:
2450  * - 00 - 1/OSR.
2451  * - 01 - 2/OSR.
2452  * - 10 - 3/OSR.
2453  * - 11 - 4/OSR.
2454  */
2455 /*@{*/
2456 #define BP_LPUART_MODIR_TNP  (16U)         /*!< Bit position for LPUART_MODIR_TNP. */
2457 #define BM_LPUART_MODIR_TNP  (0x00030000U) /*!< Bit mask for LPUART_MODIR_TNP. */
2458 #define BS_LPUART_MODIR_TNP  (2U)          /*!< Bit field size in bits for LPUART_MODIR_TNP. */
2459
2460 /*! @brief Read current value of the LPUART_MODIR_TNP field. */
2461 #define BR_LPUART_MODIR_TNP(x) (HW_LPUART_MODIR(x).B.TNP)
2462
2463 /*! @brief Format value for bitfield LPUART_MODIR_TNP. */
2464 #define BF_LPUART_MODIR_TNP(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_MODIR_TNP) & BM_LPUART_MODIR_TNP)
2465
2466 /*! @brief Set the TNP field to a new value. */
2467 #define BW_LPUART_MODIR_TNP(x, v) (HW_LPUART_MODIR_WR(x, (HW_LPUART_MODIR_RD(x) & ~BM_LPUART_MODIR_TNP) | BF_LPUART_MODIR_TNP(v)))
2468 /*@}*/
2469
2470 /*!
2471  * @name Register LPUART_MODIR, field IREN[18] (RW)
2472  *
2473  * Enables/disables the infrared modulation/demodulation.
2474  *
2475  * Values:
2476  * - 0 - IR disabled.
2477  * - 1 - IR enabled.
2478  */
2479 /*@{*/
2480 #define BP_LPUART_MODIR_IREN (18U)         /*!< Bit position for LPUART_MODIR_IREN. */
2481 #define BM_LPUART_MODIR_IREN (0x00040000U) /*!< Bit mask for LPUART_MODIR_IREN. */
2482 #define BS_LPUART_MODIR_IREN (1U)          /*!< Bit field size in bits for LPUART_MODIR_IREN. */
2483
2484 /*! @brief Read current value of the LPUART_MODIR_IREN field. */
2485 #define BR_LPUART_MODIR_IREN(x) (BITBAND_ACCESS32(HW_LPUART_MODIR_ADDR(x), BP_LPUART_MODIR_IREN))
2486
2487 /*! @brief Format value for bitfield LPUART_MODIR_IREN. */
2488 #define BF_LPUART_MODIR_IREN(v) ((uint32_t)((uint32_t)(v) << BP_LPUART_MODIR_IREN) & BM_LPUART_MODIR_IREN)
2489
2490 /*! @brief Set the IREN field to a new value. */
2491 #define BW_LPUART_MODIR_IREN(x, v) (BITBAND_ACCESS32(HW_LPUART_MODIR_ADDR(x), BP_LPUART_MODIR_IREN) = (v))
2492 /*@}*/
2493
2494 /*******************************************************************************
2495  * hw_lpuart_t - module struct
2496  ******************************************************************************/
2497 /*!
2498  * @brief All LPUART module registers.
2499  */
2500 #pragma pack(1)
2501 typedef struct _hw_lpuart
2502 {
2503     __IO hw_lpuart_baud_t BAUD;            /*!< [0x0] LPUART Baud Rate Register */
2504     __IO hw_lpuart_stat_t STAT;            /*!< [0x4] LPUART Status Register */
2505     __IO hw_lpuart_ctrl_t CTRL;            /*!< [0x8] LPUART Control Register */
2506     __IO hw_lpuart_data_t DATA;            /*!< [0xC] LPUART Data Register */
2507     __IO hw_lpuart_match_t MATCH;          /*!< [0x10] LPUART Match Address Register */
2508     __IO hw_lpuart_modir_t MODIR;          /*!< [0x14] LPUART Modem IrDA Register */
2509 } hw_lpuart_t;
2510 #pragma pack()
2511
2512 /*! @brief Macro to access all LPUART registers. */
2513 /*! @param x LPUART module instance base address. */
2514 /*! @return Reference (not a pointer) to the registers struct. To get a pointer to the struct,
2515  *     use the '&' operator, like <code>&HW_LPUART(LPUART0_BASE)</code>. */
2516 #define HW_LPUART(x)   (*(hw_lpuart_t *)(x))
2517
2518 #endif /* __HW_LPUART_REGISTERS_H__ */
2519 /* EOF */