MSPM0C110X Driver Library  2.10.00.04
dl_uart.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 /*!****************************************************************************
33  * @file dl_uart.h
34  * @brief UART Driver Library
35  * @defgroup UART Universal Asynchronous Receiver-Transmitter (UART)
36  *
37  * @anchor ti_dl_dl_uart_Overview
38  * # Overview
39  *
40  * The Universal Asynchronous Receiver-Transmitter Driver Library allows
41  * full configuration of the MSPM0 UART module.
42  * This module provides common functionality for UART-Main and UART-Extend, but
43  * developers should use the corresponding dl_uart_extend or dl_uart_main APIs
44  * directly.
45  *
46  * <hr>
47  ******************************************************************************
48  */
52 #ifndef ti_dl_dl_uart__include
53 #define ti_dl_dl_uart__include
54 
55 #if defined(ti_dl_dl_uart_main__include) || \
56  defined(ti_dl_dl_uart_extend__include) || defined(DOXYGEN__INCLUDE)
57 
58 #include <stdbool.h>
59 #include <stdint.h>
60 
61 #include <ti/devices/msp/msp.h>
62 #include <ti/driverlib/dl_common.h>
63 
64 #if defined(__MSPM0_HAS_UART_MAIN__) || defined(__MSPM0_HAS_UART_EXTD__)
65 
66 #ifdef __cplusplus
67 extern "C" {
68 #endif
69 
70 /* clang-format off */
71 
78 #define DL_UART_INTERRUPT_DMA_DONE_TX (UART_CPU_INT_IMASK_DMA_DONE_TX_SET)
79 
83 #define DL_UART_INTERRUPT_DMA_DONE_RX (UART_CPU_INT_IMASK_DMA_DONE_RX_SET)
84 
88 #define DL_UART_INTERRUPT_CTS_DONE (UART_CPU_INT_IMASK_CTS_SET)
89 
93 #define DL_UART_INTERRUPT_ADDRESS_MATCH (UART_CPU_INT_IMASK_ADDR_MATCH_SET)
94 
98 #define DL_UART_INTERRUPT_LINC0_MATCH (UART_CPU_INT_IMASK_LINC0_SET)
99 
103 #define DL_UART_INTERRUPT_EOT_DONE (UART_CPU_INT_IMASK_EOT_SET)
104 
108 #define DL_UART_INTERRUPT_TX (UART_CPU_INT_IMASK_TXINT_SET)
109 
113 #define DL_UART_INTERRUPT_RX (UART_CPU_INT_IMASK_RXINT_SET)
114 
118 #define DL_UART_INTERRUPT_LIN_COUNTER_OVERFLOW \
119  (UART_CPU_INT_IMASK_LINOVF_SET)
120 
124 #define DL_UART_INTERRUPT_LIN_RISING_EDGE \
125  (UART_CPU_INT_IMASK_LINC1_SET)
126 
130 #define DL_UART_INTERRUPT_LIN_FALLING_EDGE \
131  (UART_CPU_INT_IMASK_LINC0_SET)
132 
136 #define DL_UART_INTERRUPT_RXD_POS_EDGE (UART_CPU_INT_IMASK_RXPE_SET)
137 
141 #define DL_UART_INTERRUPT_RXD_NEG_EDGE (UART_CPU_INT_IMASK_RXNE_SET)
142 
146 #define DL_UART_INTERRUPT_OVERRUN_ERROR (UART_CPU_INT_IMASK_OVRERR_SET)
147 
151 #define DL_UART_INTERRUPT_BREAK_ERROR (UART_CPU_INT_IMASK_BRKERR_SET)
152 
156 #define DL_UART_INTERRUPT_PARITY_ERROR (UART_CPU_INT_IMASK_PARERR_SET)
157 
161 #define DL_UART_INTERRUPT_FRAMING_ERROR (UART_CPU_INT_IMASK_FRMERR_SET)
162 
166 #define DL_UART_INTERRUPT_RX_TIMEOUT_ERROR (UART_CPU_INT_IMASK_RTOUT_SET)
167 
168 
172 #define DL_UART_INTERRUPT_NOISE_ERROR (UART_CPU_INT_IMASK_NERR_SET)
173 
174 
178 typedef enum {
180  DL_UART_IIDX_DMA_DONE_TX = UART_CPU_INT_IIDX_STAT_DMA_DONE_TX,
182  DL_UART_IIDX_DMA_DONE_RX = UART_CPU_INT_IIDX_STAT_DMA_DONE_RX,
184  DL_UART_IIDX_CTS_DONE = UART_CPU_INT_IIDX_STAT_CTS,
186  DL_UART_IIDX_ADDRESS_MATCH = UART_CPU_INT_IIDX_STAT_MODE_9B,
188  DL_UART_IIDX_EOT_DONE = UART_CPU_INT_IIDX_STAT_EOT,
190  DL_UART_IIDX_TX = UART_CPU_INT_IIDX_STAT_TXIFG,
192  DL_UART_IIDX_RX = UART_CPU_INT_IIDX_STAT_RXIFG,
194  DL_UART_IIDX_LIN_COUNTER_OVERFLOW = UART_CPU_INT_IIDX_STAT_LINOVF,
196  DL_UART_IIDX_LIN_RISING_EDGE = UART_CPU_INT_IIDX_STAT_LINC1,
198  DL_UART_IIDX_LIN_FALLING_EDGE = UART_CPU_INT_IIDX_STAT_LINC0,
200  DL_UART_IIDX_RXD_POS_EDGE = UART_CPU_INT_IIDX_STAT_RXPE,
202  DL_UART_IIDX_RXD_NEG_EDGE = UART_CPU_INT_IIDX_STAT_RXNE,
204  DL_UART_IIDX_OVERRUN_ERROR = UART_CPU_INT_IIDX_STAT_OEFG,
206  DL_UART_IIDX_BREAK_ERROR = UART_CPU_INT_IIDX_STAT_BEFG,
208  DL_UART_IIDX_PARITY_ERROR = UART_CPU_INT_IIDX_STAT_PEFG,
210  DL_UART_IIDX_FRAMING_ERROR = UART_CPU_INT_IIDX_STAT_FEFG,
212  DL_UART_IIDX_RX_TIMEOUT_ERROR = UART_CPU_INT_IIDX_STAT_RTFG,
213 
214 
216  DL_UART_IIDX_NOISE_ERROR = UART_CPU_INT_IIDX_STAT_NERR_EVT,
217 
218 
220  DL_UART_IIDX_NO_INTERRUPT = UART_CPU_INT_IIDX_STAT_NO_INTR
221 } DL_UART_IIDX;
222 
224 typedef enum {
226  DL_UART_DMA_IIDX_RX_TRIGGER = UART_DMA_TRIG_RX_IIDX_STAT_RXIFG,
228  DL_UART_DMA_IIDX_RX_TIMEOUT_TRIGGER = UART_DMA_TRIG_RX_IIDX_STAT_RTFG
230 
232 typedef enum {
234  DL_UART_DMA_IIDX_TX_TRIGGER = UART_DMA_TRIG_TX_IIDX_STAT_TXIFG
236 
243 #define DL_UART_DMA_INTERRUPT_RX (UART_DMA_TRIG_RX_IMASK_RXINT_SET)
244 
248 #define DL_UART_DMA_DONE_INTERRUPT_RX (UART_CPU_INT_IMASK_DMA_DONE_RX_SET)
249 
253 #define DL_UART_DMA_INTERRUPT_RX_TIMEOUT (UART_DMA_TRIG_RX_IMASK_RTOUT_SET)
254 
260 #define DL_UART_DMA_INTERRUPT_TX (UART_DMA_TRIG_TX_IMASK_TXINT_SET)
261 
265 #define DL_UART_DMA_DONE_INTERRUPT_TX (UART_CPU_INT_IMASK_DMA_DONE_TX_SET)
266 
273 #define DL_UART_ERROR_OVERRUN (UART_RXDATA_OVRERR_SET)
274 
278 #define DL_UART_ERROR_BREAK (UART_RXDATA_BRKERR_SET)
279 
283 #define DL_UART_ERROR_PARITY (UART_RXDATA_PARERR_SET)
284 
288 #define DL_UART_ERROR_FRAMING (UART_RXDATA_FRMERR_SET)
289 
293 typedef enum {
295  DL_UART_PULSE_WIDTH_5_NS = UART_GFCTL_AGFSEL_AGLIT_5,
297  DL_UART_PULSE_WIDTH_10_NS = UART_GFCTL_AGFSEL_AGLIT_10,
299  DL_UART_PULSE_WIDTH_25_NS = UART_GFCTL_AGFSEL_AGLIT_25,
301  DL_UART_PULSE_WIDTH_50_NS = UART_GFCTL_AGFSEL_AGLIT_50
303 
305 typedef enum {
307  DL_UART_OVERSAMPLING_RATE_16X = UART_CTL0_HSE_OVS16,
309  DL_UART_OVERSAMPLING_RATE_8X = UART_CTL0_HSE_OVS8,
313  DL_UART_OVERSAMPLING_RATE_3X = UART_CTL0_HSE_OVS3
315 
317 typedef enum {
319  DL_UART_PARITY_EVEN = (UART_LCRH_PEN_ENABLE | UART_LCRH_EPS_EVEN),
321  DL_UART_PARITY_ODD = (UART_LCRH_PEN_ENABLE | UART_LCRH_EPS_ODD),
325  DL_UART_PARITY_STICK_ONE = (UART_LCRH_PEN_ENABLE | UART_LCRH_SPS_ENABLE | UART_LCRH_EPS_ODD),
329  DL_UART_PARITY_STICK_ZERO = (UART_LCRH_PEN_ENABLE | UART_LCRH_SPS_ENABLE | UART_LCRH_EPS_EVEN),
331  DL_UART_PARITY_NONE = UART_LCRH_PEN_DISABLE
333 
335 typedef enum {
337  DL_UART_WORD_LENGTH_5_BITS = UART_LCRH_WLEN_DATABIT5,
339  DL_UART_WORD_LENGTH_6_BITS = UART_LCRH_WLEN_DATABIT6,
341  DL_UART_WORD_LENGTH_7_BITS = UART_LCRH_WLEN_DATABIT7,
343  DL_UART_WORD_LENGTH_8_BITS = UART_LCRH_WLEN_DATABIT8
345 
347 typedef enum {
349  DL_UART_MODE_NORMAL = UART_CTL0_MODE_UART,
351  DL_UART_MODE_RS485 = UART_CTL0_MODE_RS485,
353  DL_UART_MODE_IDLE_LINE = UART_CTL0_MODE_IDLELINE,
355  DL_UART_MODE_ADDR_9_BIT = UART_CTL0_MODE_ADDR9BIT,
357  DL_UART_MODE_SMART_CARD = UART_CTL0_MODE_SMART,
359  DL_UART_MODE_DALI = UART_CTL0_MODE_DALI
360 } DL_UART_MODE;
361 
363 typedef enum {
365  DL_UART_DIRECTION_TX = UART_CTL0_TXE_ENABLE,
367  DL_UART_DIRECTION_RX = UART_CTL0_RXE_ENABLE,
369  DL_UART_DIRECTION_TX_RX = (UART_CTL0_RXE_ENABLE | UART_CTL0_TXE_ENABLE),
371  DL_UART_DIRECTION_NONE = (UART_CTL0_RXE_DISABLE | UART_CTL0_TXE_DISABLE)
373 
375 typedef enum {
377  DL_UART_CLOCK_BUSCLK = UART_CLKSEL_BUSCLK_SEL_ENABLE,
379  DL_UART_CLOCK_MFCLK = UART_CLKSEL_MFCLK_SEL_ENABLE,
381  DL_UART_CLOCK_LFCLK = UART_CLKSEL_LFCLK_SEL_ENABLE
382 } DL_UART_CLOCK;
383 
385 typedef enum {
387  DL_UART_FLOW_CONTROL_RTS = UART_CTL0_RTSEN_ENABLE,
389  DL_UART_FLOW_CONTROL_CTS = UART_CTL0_CTSEN_ENABLE,
391  DL_UART_FLOW_CONTROL_RTS_CTS = (UART_CTL0_RTSEN_ENABLE | UART_CTL0_CTSEN_ENABLE),
393  DL_UART_FLOW_CONTROL_NONE = (UART_CTL0_CTSEN_DISABLE | UART_CTL0_RTSEN_DISABLE)
395 
397 typedef enum {
399  DL_UART_RTS_ASSERT = UART_CTL0_RTS_SET,
401  DL_UART_RTS_DEASSERT = UART_CTL0_RTS_CLR
402 } DL_UART_RTS;
403 
405 typedef enum {
407  DL_UART_STOP_BITS_ONE = UART_LCRH_STP2_DISABLE,
409  DL_UART_STOP_BITS_TWO = UART_LCRH_STP2_ENABLE
411 
413 typedef enum {
415  DL_UART_TXD_OUT_LOW = UART_CTL0_TXD_OUT_LOW,
417  DL_UART_TXD_OUT_HIGH = UART_CTL0_TXD_OUT_HIGH
419 
421 typedef enum {
423  DL_UART_TX_FIFO_LEVEL_3_4_EMPTY = UART_IFLS_TXIFLSEL_LVL_3_4,
425  DL_UART_TX_FIFO_LEVEL_1_2_EMPTY = UART_IFLS_TXIFLSEL_LVL_1_2,
427  DL_UART_TX_FIFO_LEVEL_1_4_EMPTY = UART_IFLS_TXIFLSEL_LVL_1_4,
429  DL_UART_TX_FIFO_LEVEL_EMPTY = UART_IFLS_TXIFLSEL_LVL_EMPTY,
431  DL_UART_TX_FIFO_LEVEL_ONE_ENTRY = UART_IFLS_TXIFLSEL_LVL_1
433 
435 typedef enum {
438  DL_UART_RX_FIFO_LEVEL_ONE_ENTRY = UART_IFLS_RXIFLSEL_LVL_1,
440  DL_UART_RX_FIFO_LEVEL_FULL = UART_IFLS_RXIFLSEL_LVL_FULL,
442  DL_UART_RX_FIFO_LEVEL_3_4_FULL = UART_IFLS_RXIFLSEL_LVL_3_4,
444  DL_UART_RX_FIFO_LEVEL_1_2_FULL = UART_IFLS_RXIFLSEL_LVL_1_2,
446  DL_UART_RX_FIFO_LEVEL_1_4_FULL = UART_IFLS_RXIFLSEL_LVL_1_4,
448 
450 typedef enum {
452  DL_UART_IRDA_CLOCK_BAUD_RATE = UART_IRCTL_IRTXCLK_BRCLK,
454  DL_UART_IRDA_CLOCK_FUNCTIONAL = UART_IRCTL_IRTXCLK_BITCLK
456 
458 typedef enum {
460  DL_UART_IRDA_POLARITY_LOW = UART_IRCTL_IRRXPL_LOW,
462  DL_UART_IRDA_POLARITY_HIGH = UART_IRCTL_IRRXPL_HIGH
464 
468 #define DL_UART_PULSE_WIDTH_3_16_BIT_PERIOD ((uint32_t) 0x00000000U)
469 
471 typedef enum {
473  DL_UART_CLOCK_DIVIDE_RATIO_1 = UART_CLKDIV_RATIO_DIV_BY_1,
475  DL_UART_CLOCK_DIVIDE_RATIO_2 = UART_CLKDIV_RATIO_DIV_BY_2,
477  DL_UART_CLOCK_DIVIDE_RATIO_3 = UART_CLKDIV_RATIO_DIV_BY_3,
479  DL_UART_CLOCK_DIVIDE_RATIO_4 = UART_CLKDIV_RATIO_DIV_BY_4,
481  DL_UART_CLOCK_DIVIDE_RATIO_5 = UART_CLKDIV_RATIO_DIV_BY_5,
483  DL_UART_CLOCK_DIVIDE_RATIO_6 = UART_CLKDIV_RATIO_DIV_BY_6,
485  DL_UART_CLOCK_DIVIDE_RATIO_7 = UART_CLKDIV_RATIO_DIV_BY_7,
487  DL_UART_CLOCK_DIVIDE_RATIO_8 = UART_CLKDIV_RATIO_DIV_BY_8
489 
491 typedef enum {
493  DL_UART_CLOCK_DIVIDE2_RATIO_1 = UART_CLKDIV2_RATIO_DIV_BY_1,
495  DL_UART_CLOCK_DIVIDE2_RATIO_2 = UART_CLKDIV2_RATIO_DIV_BY_2,
497  DL_UART_CLOCK_DIVIDE2_RATIO_3 = UART_CLKDIV2_RATIO_DIV_BY_3,
499  DL_UART_CLOCK_DIVIDE2_RATIO_4 = UART_CLKDIV2_RATIO_DIV_BY_4,
501  DL_UART_CLOCK_DIVIDE2_RATIO_5 = UART_CLKDIV2_RATIO_DIV_BY_5,
503  DL_UART_CLOCK_DIVIDE2_RATIO_6 = UART_CLKDIV2_RATIO_DIV_BY_6,
505  DL_UART_CLOCK_DIVIDE2_RATIO_7 = UART_CLKDIV2_RATIO_DIV_BY_7,
507  DL_UART_CLOCK_DIVIDE2_RATIO_8 = UART_CLKDIV2_RATIO_DIV_BY_8
509 
510 /* clang-format on */
511 
515 typedef struct {
517  DL_UART_MODE mode;
518 
521 
524 
526  DL_UART_PARITY parity;
527 
529  DL_UART_WORD_LENGTH wordLength;
530 
532  DL_UART_STOP_BITS stopBits;
533 
535 
539 typedef struct {
541  DL_UART_CLOCK clockSel;
542 
544  DL_UART_CLOCK_DIVIDE_RATIO divideRatio;
545 
547 
548 #ifdef __MSPM0_HAS_UART_MAIN__
549 
556 typedef struct {
561  uint32_t controlWord;
562 
564  uint32_t clockSel;
565 
567  uint32_t divideRatio;
568 
573 
575  uint32_t ibrd;
576 
578  uint32_t fbrd;
579 
585 
590 
593  uint32_t interruptMask0;
594 
597  uint32_t interruptMask1;
598 
601  uint32_t interruptMask2;
602 
605  bool backupRdy;
607 
608 #endif /* __MSPM0_HAS_UART_MAIN__ */
609 
610 #ifdef __MSPM0_HAS_UART_EXTD__
611 
618 typedef struct {
623  uint32_t controlWord;
624 
626  uint32_t clockSel;
627 
629  uint32_t divideRatio;
630 
636 
641 
643  uint32_t ibrd;
644 
646  uint32_t fbrd;
647 
652 
656  uint32_t linControlWord;
657 
661  uint32_t irdaControlWord;
662 
664  uint32_t addressMask;
665 
667  uint32_t address;
668 
671  uint32_t interruptMask0;
672 
675  uint32_t interruptMask1;
676 
679  uint32_t interruptMask2;
680 
683  bool backupRdy;
685 
686 #endif /* __MSPM0_HAS_UART_EXTD__ */
687 
698 void DL_UART_init(UART_Regs *uart, const DL_UART_Config *config);
699 
711 __STATIC_INLINE void DL_UART_enablePower(UART_Regs *uart)
712 {
713  uart->GPRCM.PWREN = (UART_PWREN_KEY_UNLOCK_W | UART_PWREN_ENABLE_ENABLE);
714 }
715 
727 __STATIC_INLINE void DL_UART_disablePower(UART_Regs *uart)
728 {
729  uart->GPRCM.PWREN = (UART_PWREN_KEY_UNLOCK_W | UART_PWREN_ENABLE_DISABLE);
730 }
731 
748 __STATIC_INLINE bool DL_UART_isPowerEnabled(const UART_Regs *uart)
749 {
750  return ((uart->GPRCM.PWREN & UART_PWREN_ENABLE_MASK) ==
751  UART_PWREN_ENABLE_ENABLE);
752 }
753 
759 __STATIC_INLINE void DL_UART_reset(UART_Regs *uart)
760 {
761  uart->GPRCM.RSTCTL =
762  (UART_RSTCTL_KEY_UNLOCK_W | UART_RSTCTL_RESETSTKYCLR_CLR |
763  UART_RSTCTL_RESETASSERT_ASSERT);
764 }
765 
775 __STATIC_INLINE bool DL_UART_isReset(const UART_Regs *uart)
776 {
777  return ((uart->GPRCM.STAT & UART_GPRCM_STAT_RESETSTKY_MASK) ==
778  UART_GPRCM_STAT_RESETSTKY_RESET);
779 }
780 
786 __STATIC_INLINE void DL_UART_enable(UART_Regs *uart)
787 {
788  uart->CTL0 |= UART_CTL0_ENABLE_ENABLE;
789 }
790 
802 __STATIC_INLINE bool DL_UART_isEnabled(const UART_Regs *uart)
803 {
804  return ((uart->CTL0 & UART_CTL0_ENABLE_MASK) == UART_CTL0_ENABLE_ENABLE);
805 }
806 
812 __STATIC_INLINE void DL_UART_disable(UART_Regs *uart)
813 {
814  uart->CTL0 &= ~(UART_CTL0_ENABLE_MASK);
815 }
816 
826  UART_Regs *uart, const DL_UART_ClockConfig *config);
827 
837  const UART_Regs *uart, DL_UART_ClockConfig *config);
838 
861  UART_Regs *uart, uint32_t clockFreq, uint32_t baudRate);
862 
875 __STATIC_INLINE void DL_UART_setOversampling(
876  UART_Regs *uart, DL_UART_OVERSAMPLING_RATE rate)
877 {
878  DL_Common_updateReg(&uart->CTL0, (uint32_t) rate, UART_CTL0_HSE_MASK);
879 }
880 
891 __STATIC_INLINE DL_UART_OVERSAMPLING_RATE DL_UART_getOversampling(
892  const UART_Regs *uart)
893 {
894  uint32_t rate = uart->CTL0 & UART_CTL0_HSE_MASK;
895 
896  return (DL_UART_OVERSAMPLING_RATE)(rate);
897 }
898 
912 __STATIC_INLINE void DL_UART_enableLoopbackMode(UART_Regs *uart)
913 {
914  uart->CTL0 |= UART_CTL0_LBE_ENABLE;
915 }
916 
927 __STATIC_INLINE bool DL_UART_isLoopbackModeEnabled(const UART_Regs *uart)
928 {
929  return ((uart->CTL0 & UART_CTL0_LBE_MASK) == UART_CTL0_LBE_ENABLE);
930 }
931 
945 __STATIC_INLINE void DL_UART_disableLoopbackMode(UART_Regs *uart)
946 {
947  uart->CTL0 &= ~(UART_CTL0_LBE_MASK);
948 }
949 
966 __STATIC_INLINE void DL_UART_setDirection(
967  UART_Regs *uart, DL_UART_DIRECTION direction)
968 {
969  DL_Common_updateReg(&uart->CTL0, (uint32_t) direction,
970  UART_CTL0_TXE_MASK | UART_CTL0_RXE_MASK);
971 }
972 
982 __STATIC_INLINE DL_UART_DIRECTION DL_UART_getDirection(const UART_Regs *uart)
983 {
984  uint32_t direction =
985  uart->CTL0 & (UART_CTL0_TXE_MASK | UART_CTL0_RXE_MASK);
986 
987  return (DL_UART_DIRECTION)(direction);
988 }
989 
1015 __STATIC_INLINE void DL_UART_enableMajorityVoting(UART_Regs *uart)
1016 {
1017  uart->CTL0 |= UART_CTL0_MAJVOTE_ENABLE;
1018 }
1019 
1030 __STATIC_INLINE bool DL_UART_isMajorityVotingEnabled(const UART_Regs *uart)
1031 {
1032  return ((uart->CTL0 & UART_CTL0_MAJVOTE_MASK) == UART_CTL0_MAJVOTE_ENABLE);
1033 }
1034 
1047 __STATIC_INLINE void DL_UART_disableMajorityVoting(UART_Regs *uart)
1048 {
1049  uart->CTL0 &= ~(UART_CTL0_MAJVOTE_MASK);
1050 }
1051 
1066 __STATIC_INLINE void DL_UART_enableMSBFirst(UART_Regs *uart)
1067 {
1068  uart->CTL0 |= UART_CTL0_MSBFIRST_ENABLE;
1069 }
1070 
1081 __STATIC_INLINE bool DL_UART_isMSBFirstEnabled(const UART_Regs *uart)
1082 {
1083  return (
1084  (uart->CTL0 & UART_CTL0_MSBFIRST_MASK) == UART_CTL0_MSBFIRST_ENABLE);
1085 }
1086 
1101 __STATIC_INLINE void DL_UART_disableMSBFirst(UART_Regs *uart)
1102 {
1103  uart->CTL0 &= ~(UART_CTL0_MSBFIRST_MASK);
1104 }
1105 
1122 __STATIC_INLINE void DL_UART_enableTransmitPinManualControl(UART_Regs *uart)
1123 {
1124  uart->CTL0 |= UART_CTL0_TXD_OUT_EN_ENABLE;
1125 }
1126 
1138  const UART_Regs *uart)
1139 {
1140  return ((uart->CTL0 & UART_CTL0_TXD_OUT_EN_MASK) ==
1141  UART_CTL0_TXD_OUT_EN_ENABLE);
1142 }
1143 
1156 __STATIC_INLINE void DL_UART_disableTransmitPinManualControl(UART_Regs *uart)
1157 {
1158  uart->CTL0 &= ~(UART_CTL0_TXD_OUT_EN_MASK);
1159 }
1160 
1183  UART_Regs *uart, DL_UART_TXD_OUT txdOutVal)
1184 {
1185  DL_Common_updateReg(&uart->CTL0,
1186  UART_CTL0_TXD_OUT_EN_ENABLE | (uint32_t) txdOutVal,
1187  UART_CTL0_TXD_OUT_EN_MASK | UART_CTL0_TXD_OUT_MASK);
1188 }
1189 
1199 __STATIC_INLINE DL_UART_TXD_OUT DL_UART_getTransmitPinManualOutput(
1200  const UART_Regs *uart)
1201 {
1202  uint32_t txdOutVal = uart->CTL0 & UART_CTL0_TXD_OUT_MASK;
1203 
1204  return (DL_UART_TXD_OUT)(txdOutVal);
1205 }
1206 
1212 __STATIC_INLINE void DL_UART_enableManchesterEncoding(UART_Regs *uart)
1213 {
1214  uart->CTL0 |= UART_CTL0_MENC_ENABLE;
1215 }
1216 
1222 __STATIC_INLINE void DL_UART_disableManchesterEncoding(UART_Regs *uart)
1223 {
1224  uart->CTL0 &= ~(UART_CTL0_MENC_MASK);
1225 }
1226 
1237 __STATIC_INLINE bool DL_UART_isManchesterEncodingEnabled(const UART_Regs *uart)
1238 {
1239  return ((uart->CTL0 & UART_CTL0_MENC_MASK) == UART_CTL0_MENC_ENABLE);
1240 }
1241 
1254 __STATIC_INLINE void DL_UART_setCommunicationMode(
1255  UART_Regs *uart, DL_UART_MODE mode)
1256 {
1257  DL_Common_updateReg(&uart->CTL0, (uint32_t) mode, UART_CTL0_MODE_MASK);
1258 }
1259 
1269 __STATIC_INLINE DL_UART_MODE DL_UART_getCommunicationMode(
1270  const UART_Regs *uart)
1271 {
1272  uint32_t mode = uart->CTL0 & UART_CTL0_MODE_MASK;
1273 
1274  return (DL_UART_MODE)(mode);
1275 }
1276 
1289 __STATIC_INLINE void DL_UART_setFlowControl(
1290  UART_Regs *uart, DL_UART_FLOW_CONTROL config)
1291 {
1292  DL_Common_updateReg(&uart->CTL0, (uint32_t) config,
1293  UART_CTL0_RTSEN_MASK | UART_CTL0_CTSEN_MASK);
1294 }
1295 
1307  const UART_Regs *uart)
1308 {
1309  uint32_t config =
1310  uart->CTL0 & (UART_CTL0_RTSEN_MASK | UART_CTL0_CTSEN_MASK);
1311 
1312  return (DL_UART_FLOW_CONTROL)(config);
1313 }
1314 
1336 __STATIC_INLINE void DL_UART_setRTSOutput(UART_Regs *uart, DL_UART_RTS val)
1337 {
1338  DL_Common_updateReg(&uart->CTL0, (uint32_t) val, UART_CTL0_RTS_MASK);
1339 }
1340 
1360 __STATIC_INLINE DL_UART_RTS DL_UART_getRTSOutput(const UART_Regs *uart)
1361 {
1362  uint32_t val = uart->CTL0 & UART_CTL0_RTS_MASK;
1363 
1364  return (DL_UART_RTS)(val);
1365 }
1366 
1381 __STATIC_INLINE void DL_UART_enableFIFOs(UART_Regs *uart)
1382 {
1383  uart->CTL0 |= UART_CTL0_FEN_ENABLE;
1384 }
1385 
1399 __STATIC_INLINE void DL_UART_disableFIFOs(UART_Regs *uart)
1400 {
1401  uart->CTL0 &= ~(UART_CTL0_FEN_MASK);
1402 }
1403 
1414 __STATIC_INLINE bool DL_UART_isFIFOsEnabled(const UART_Regs *uart)
1415 {
1416  return ((uart->CTL0 & UART_CTL0_FEN_MASK) == UART_CTL0_FEN_ENABLE);
1417 }
1418 
1428 __STATIC_INLINE void DL_UART_enableLINSendBreak(UART_Regs *uart)
1429 {
1430  uart->LCRH |= UART_LCRH_BRK_ENABLE;
1431 }
1432 
1441 __STATIC_INLINE void DL_UART_disableLINSendBreak(UART_Regs *uart)
1442 {
1443  uart->LCRH &= ~(UART_LCRH_BRK_MASK);
1444 }
1445 
1456 __STATIC_INLINE bool DL_UART_isLINSendBreakEnabled(const UART_Regs *uart)
1457 {
1458  return ((uart->LCRH & UART_LCRH_BRK_MASK) == UART_LCRH_BRK_ENABLE);
1459 }
1460 
1471 __STATIC_INLINE bool DL_UART_isParityEnabled(const UART_Regs *uart)
1472 {
1473  return ((uart->LCRH & UART_LCRH_PEN_MASK) == UART_LCRH_PEN_ENABLE);
1474 }
1475 
1490 __STATIC_INLINE void DL_UART_setParityMode(
1491  UART_Regs *uart, DL_UART_PARITY parity)
1492 {
1493  DL_Common_updateReg(&uart->LCRH, (uint32_t) parity,
1494  (UART_LCRH_PEN_MASK | UART_LCRH_EPS_MASK | UART_LCRH_SPS_MASK));
1495 }
1496 
1507 __STATIC_INLINE DL_UART_PARITY DL_UART_getParityMode(const UART_Regs *uart)
1508 {
1509  uint32_t parity = uart->LCRH & (UART_LCRH_PEN_MASK | UART_LCRH_EPS_MASK |
1510  UART_LCRH_SPS_MASK);
1511 
1512  return (DL_UART_PARITY)(parity);
1513 }
1514 
1525 __STATIC_INLINE void DL_UART_setStopBits(
1526  UART_Regs *uart, DL_UART_STOP_BITS numStopBits)
1527 {
1529  &uart->LCRH, (uint32_t) numStopBits, UART_LCRH_STP2_MASK);
1530 }
1531 
1541 __STATIC_INLINE DL_UART_STOP_BITS DL_UART_getStopBits(const UART_Regs *uart)
1542 {
1543  uint32_t numStopBits = uart->LCRH & UART_LCRH_STP2_MASK;
1544 
1545  return (DL_UART_STOP_BITS)(numStopBits);
1546 }
1547 
1555 __STATIC_INLINE void DL_UART_setWordLength(
1556  UART_Regs *uart, DL_UART_WORD_LENGTH wordLength)
1557 {
1559  &uart->LCRH, (uint32_t) wordLength, UART_LCRH_WLEN_MASK);
1560 }
1561 
1571 __STATIC_INLINE DL_UART_WORD_LENGTH DL_UART_getWordLength(
1572  const UART_Regs *uart)
1573 {
1574  uint32_t wordLength = uart->LCRH & UART_LCRH_WLEN_MASK;
1575 
1576  return (DL_UART_WORD_LENGTH)(wordLength);
1577 }
1578 
1587 __STATIC_INLINE void DL_UART_enableSendIdlePattern(UART_Regs *uart)
1588 {
1589  uart->LCRH |= UART_LCRH_SENDIDLE_ENABLE;
1590 }
1591 
1597 __STATIC_INLINE void DL_UART_disableSendIdlePattern(UART_Regs *uart)
1598 {
1599  uart->LCRH &= ~(UART_LCRH_SENDIDLE_MASK);
1600 }
1601 
1612 __STATIC_INLINE bool DL_UART_isSendIdlePatternEnabled(const UART_Regs *uart)
1613 {
1614  return (
1615  (uart->LCRH & UART_LCRH_SENDIDLE_MASK) == UART_LCRH_SENDIDLE_ENABLE);
1616 }
1617 
1628 __STATIC_INLINE void DL_UART_setExternalDriverSetup(
1629  UART_Regs *uart, uint32_t val)
1630 {
1631  DL_Common_updateReg(&uart->LCRH, val << UART_LCRH_EXTDIR_SETUP_OFS,
1632  UART_LCRH_EXTDIR_SETUP_MASK);
1633 }
1634 
1645 __STATIC_INLINE uint32_t DL_UART_getExternalDriverSetup(const UART_Regs *uart)
1646 {
1647  return ((uart->LCRH &
1648  UART_LCRH_EXTDIR_SETUP_MASK) >> UART_LCRH_EXTDIR_SETUP_OFS);
1649 }
1650 
1664 __STATIC_INLINE void DL_UART_setExternalDriverHold(
1665  UART_Regs *uart, uint32_t val)
1666 {
1667  DL_Common_updateReg(&uart->LCRH, val << UART_LCRH_EXTDIR_HOLD_OFS,
1668  UART_LCRH_EXTDIR_HOLD_MASK);
1669 }
1670 
1681 __STATIC_INLINE uint32_t DL_UART_getExternalDriverHold(const UART_Regs *uart)
1682 {
1683  return ((
1684  uart->LCRH & UART_LCRH_EXTDIR_HOLD_MASK) >> UART_LCRH_EXTDIR_HOLD_OFS);
1685 }
1686 
1706 __STATIC_INLINE bool DL_UART_isBusy(const UART_Regs *uart)
1707 {
1708  return ((uart->STAT & UART_STAT_BUSY_MASK) == UART_STAT_BUSY_SET);
1709 }
1710 
1726 __STATIC_INLINE bool DL_UART_isRXFIFOEmpty(const UART_Regs *uart)
1727 {
1728  return ((uart->STAT & UART_STAT_RXFE_MASK) == UART_STAT_RXFE_SET);
1729 }
1730 
1747 __STATIC_INLINE bool DL_UART_isRXFIFOFull(const UART_Regs *uart)
1748 {
1749  return ((uart->STAT & UART_STAT_RXFF_MASK) == UART_STAT_RXFF_SET);
1750 }
1751 
1767 __STATIC_INLINE bool DL_UART_isTXFIFOEmpty(const UART_Regs *uart)
1768 {
1769  return ((uart->STAT & UART_STAT_TXFE_MASK) == UART_STAT_TXFE_SET);
1770 }
1771 
1788 __STATIC_INLINE bool DL_UART_isTXFIFOFull(const UART_Regs *uart)
1789 {
1790  return ((uart->STAT & UART_STAT_TXFF_MASK) == UART_STAT_TXFF_SET);
1791 }
1792 
1805 __STATIC_INLINE bool DL_UART_isClearToSend(const UART_Regs *uart)
1806 {
1807  return ((uart->STAT & UART_STAT_CTS_MASK) == UART_STAT_CTS_SET);
1808 }
1809 
1826 __STATIC_INLINE bool DL_UART_isIdleModeDetected(const UART_Regs *uart)
1827 {
1828  return ((uart->STAT & UART_STAT_IDLE_MASK) == UART_STAT_IDLE_SET);
1829 }
1830 
1847 __STATIC_INLINE void DL_UART_setTXFIFOThreshold(
1848  UART_Regs *uart, DL_UART_TX_FIFO_LEVEL threshold)
1849 {
1851  &uart->IFLS, (uint32_t) threshold, UART_IFLS_TXIFLSEL_MASK);
1852 }
1853 
1863 __STATIC_INLINE DL_UART_TX_FIFO_LEVEL DL_UART_getTXFIFOThreshold(
1864  const UART_Regs *uart)
1865 {
1866  uint32_t threshold = uart->IFLS & UART_IFLS_TXIFLSEL_MASK;
1867 
1868  return (DL_UART_TX_FIFO_LEVEL)(threshold);
1869 }
1870 
1883 __STATIC_INLINE void DL_UART_setRXFIFOThreshold(
1884  UART_Regs *uart, DL_UART_RX_FIFO_LEVEL threshold)
1885 {
1887  &uart->IFLS, (uint32_t) threshold, UART_IFLS_RXIFLSEL_MASK);
1888 }
1889 
1899 __STATIC_INLINE DL_UART_RX_FIFO_LEVEL DL_UART_getRXFIFOThreshold(
1900  const UART_Regs *uart)
1901 {
1902  uint32_t threshold = uart->IFLS & UART_IFLS_RXIFLSEL_MASK;
1903 
1904  return (DL_UART_RX_FIFO_LEVEL)(threshold);
1905 }
1906 
1918 __STATIC_INLINE void DL_UART_setRXInterruptTimeout(
1919  UART_Regs *uart, uint32_t timeout)
1920 {
1922  &uart->IFLS, timeout << UART_IFLS_RXTOSEL_OFS, UART_IFLS_RXTOSEL_MASK);
1923 }
1924 
1935 __STATIC_INLINE uint32_t DL_UART_getRXInterruptTimeout(const UART_Regs *uart)
1936 {
1937  return ((uart->IFLS & UART_IFLS_RXTOSEL_MASK) >> UART_IFLS_RXTOSEL_OFS);
1938 }
1939 
1949 __STATIC_INLINE uint32_t DL_UART_getIntegerBaudRateDivisor(
1950  const UART_Regs *uart)
1951 {
1952  return (uart->IBRD & UART_IBRD_DIVINT_MASK);
1953 }
1954 
1964 __STATIC_INLINE uint32_t DL_UART_getFractionalBaudRateDivisor(
1965  const UART_Regs *uart)
1966 {
1967  return (uart->FBRD & UART_FBRD_DIVFRAC_MASK);
1968 }
1969 
1983 __STATIC_INLINE void DL_UART_setBaudRateDivisor(
1984  UART_Regs *uart, uint32_t integerDivisor, uint32_t fractionalDivisor)
1985 {
1986  DL_Common_updateReg(&uart->IBRD, integerDivisor, UART_IBRD_DIVINT_MASK);
1988  &uart->FBRD, fractionalDivisor, UART_FBRD_DIVFRAC_MASK);
1989 
1990  // When updating the baud-rate divisor (UARTIBRD or UARTIFRD),
1991  // the LCRH register must also be written to (any bit in LCRH can
1992  // be written to for updating the baud-rate divisor).
1994  &uart->LCRH, (uart->LCRH & UART_LCRH_BRK_MASK), UART_LCRH_BRK_MASK);
1995 }
1996 
2016 __STATIC_INLINE void DL_UART_setIrDABaudRateDivisor(UART_Regs *uart,
2017  uint32_t integerDivisor, uint32_t fractionalDivisor,
2018  DL_UART_CLOCK_DIVIDE2_RATIO clkDivisor2)
2019 {
2020  DL_Common_updateReg(&uart->IBRD,
2021  (integerDivisor / ((uint32_t) clkDivisor2 + 1)),
2022  UART_IBRD_DIVINT_MASK);
2024  &uart->FBRD, fractionalDivisor, UART_FBRD_DIVFRAC_MASK);
2025 
2026  // When updating the baud-rate divisor (UARTIBRD or UARTIFRD),
2027  // the LCRH register must also be written to (any bit in LCRH can
2028  // be written to for updating the baud-rate divisor).
2030  &uart->LCRH, (uart->LCRH & UART_LCRH_BRK_MASK), UART_LCRH_BRK_MASK);
2031 }
2032 
2046 __STATIC_INLINE void DL_UART_setDigitalPulseWidth(
2047  UART_Regs *uart, uint32_t pulseWidth)
2048 {
2049  DL_Common_updateReg(&uart->GFCTL, pulseWidth, UART_GFCTL_DGFSEL_MASK);
2050 }
2051 
2065 __STATIC_INLINE uint32_t DL_UART_getDigitalPulseWidth(const UART_Regs *uart)
2066 {
2067  return (uart->GFCTL & UART_GFCTL_DGFSEL_MASK);
2068 }
2069 
2088 __STATIC_INLINE void DL_UART_transmitData(UART_Regs *uart, uint8_t data)
2089 {
2090  uart->TXDATA = data;
2091 }
2092 
2111 __STATIC_INLINE uint8_t DL_UART_receiveData(const UART_Regs *uart)
2112 {
2113  return ((uint8_t)(uart->RXDATA & UART_RXDATA_DATA_MASK));
2114 }
2115 
2130 __STATIC_INLINE uint32_t DL_UART_getErrorStatus(
2131  const UART_Regs *uart, uint32_t errorMask)
2132 {
2133  return (uart->RXDATA & errorMask);
2134 }
2135 
2145 __STATIC_INLINE void DL_UART_setLINCounterValue(
2146  UART_Regs *uart, uint16_t value)
2147 {
2148  DL_Common_updateReg(&uart->LINCNT, value, UART_LINCNT_VALUE_MASK);
2149 }
2150 
2164 __STATIC_INLINE uint16_t DL_UART_getLINCounterValue(const UART_Regs *uart)
2165 {
2166  return ((uint16_t)(uart->LINCNT & UART_LINCNT_VALUE_MASK));
2167 }
2168 
2176 __STATIC_INLINE void DL_UART_enableLINCounter(UART_Regs *uart)
2177 {
2178  uart->LINCTL |= UART_LINCTL_CTRENA_ENABLE;
2179 }
2180 
2191 __STATIC_INLINE bool DL_UART_isLINCounterEnabled(const UART_Regs *uart)
2192 {
2193  return (
2194  (uart->LINCTL & UART_LINCTL_CTRENA_MASK) == UART_LINCTL_CTRENA_ENABLE);
2195 }
2196 
2204 __STATIC_INLINE void DL_UART_disableLINCounter(UART_Regs *uart)
2205 {
2206  uart->LINCTL &= ~(UART_LINCTL_CTRENA_MASK);
2207 }
2208 
2222  UART_Regs *uart)
2223 {
2224  uart->LINCTL |= UART_LINCTL_ZERONE_ENABLE;
2225 }
2226 
2238  const UART_Regs *uart)
2239 {
2240  return (
2241  (uart->LINCTL & UART_LINCTL_ZERONE_MASK) == UART_LINCTL_ZERONE_ENABLE);
2242 }
2243 
2250  UART_Regs *uart)
2251 {
2252  uart->LINCTL &= ~(UART_LINCTL_ZERONE_MASK);
2253 }
2254 
2265 __STATIC_INLINE void DL_UART_enableLINCountWhileLow(UART_Regs *uart)
2266 {
2267  uart->LINCTL |= UART_LINCTL_CNTRXLOW_ENABLE;
2268 }
2269 
2280 __STATIC_INLINE bool DL_UART_isLINCountWhileLowEnabled(const UART_Regs *uart)
2281 {
2282  return ((uart->LINCTL & UART_LINCTL_CNTRXLOW_MASK) ==
2283  UART_LINCTL_CNTRXLOW_ENABLE);
2284 }
2285 
2293 __STATIC_INLINE void DL_UART_disableLINCountWhileLow(UART_Regs *uart)
2294 {
2295  uart->LINCTL &= ~(UART_LINCTL_CNTRXLOW_MASK);
2296 }
2297 
2310 __STATIC_INLINE void DL_UART_enableLINFallingEdgeCapture(UART_Regs *uart)
2311 {
2312  DL_Common_updateReg(&uart->LINCTL,
2313  UART_LINCTL_LINC0CAP_ENABLE | UART_LINCTL_LINC0_MATCH_DISABLE,
2314  UART_LINCTL_LINC0CAP_MASK | UART_LINCTL_LINC0_MATCH_MASK);
2315 }
2316 
2328  const UART_Regs *uart)
2329 {
2330  return ((uart->LINCTL & UART_LINCTL_LINC0CAP_MASK) ==
2331  UART_LINCTL_LINC0CAP_ENABLE);
2332 }
2333 
2339 __STATIC_INLINE void DL_UART_disableLINFallingEdgeCapture(UART_Regs *uart)
2340 {
2341  uart->LINCTL &= ~(UART_LINCTL_LINC0CAP_MASK);
2342 }
2343 
2353 __STATIC_INLINE void DL_UART_enableLINRisingEdgeCapture(UART_Regs *uart)
2354 {
2355  uart->LINCTL |= UART_LINCTL_LINC1CAP_ENABLE;
2356 }
2357 
2369  const UART_Regs *uart)
2370 {
2371  return ((uart->LINCTL & UART_LINCTL_LINC1CAP_MASK) ==
2372  UART_LINCTL_LINC1CAP_ENABLE);
2373 }
2374 
2380 __STATIC_INLINE void DL_UART_disableLINRisingEdgeCapture(UART_Regs *uart)
2381 {
2382  uart->LINCTL &= ~(UART_LINCTL_LINC1CAP_MASK);
2383 }
2384 
2393 __STATIC_INLINE void DL_UART_enableLINCounterCompareMatch(UART_Regs *uart)
2394 {
2395  DL_Common_updateReg(&uart->LINCTL,
2396  UART_LINCTL_LINC0_MATCH_ENABLE | UART_LINCTL_LINC0CAP_DISABLE,
2397  UART_LINCTL_LINC0CAP_MASK | UART_LINCTL_LINC0_MATCH_MASK);
2398 }
2399 
2409  UART_Regs *uart)
2410 {
2411  DL_Common_updateReg(&uart->LINCTL,
2412  UART_LINCTL_LINC0CAP_ENABLE | UART_LINCTL_LINC1CAP_ENABLE |
2413  UART_LINCTL_ZERONE_ENABLE | UART_LINCTL_CTRENA_ENABLE,
2414  UART_LINCTL_LINC0CAP_MASK | UART_LINCTL_LINC1CAP_MASK |
2415  UART_LINCTL_ZERONE_MASK | UART_LINCTL_CTRENA_MASK);
2416 }
2417 
2426 __STATIC_INLINE void DL_UART_enableLINReceptionCountControl(UART_Regs *uart)
2427 {
2428  DL_Common_updateReg(&uart->LINCTL,
2429  UART_LINCTL_CNTRXLOW_ENABLE | UART_LINCTL_ZERONE_ENABLE |
2430  UART_LINCTL_CTRENA_ENABLE,
2431  UART_LINCTL_CNTRXLOW_MASK | UART_LINCTL_ZERONE_MASK |
2432  UART_LINCTL_CTRENA_MASK);
2433 }
2434 
2446  const UART_Regs *uart)
2447 {
2448  return ((uart->LINCTL & UART_LINCTL_LINC0_MATCH_MASK) ==
2449  UART_LINCTL_LINC0_MATCH_ENABLE);
2450 }
2451 
2457 __STATIC_INLINE void DL_UART_disableLINCounterCompareMatch(UART_Regs *uart)
2458 {
2459  uart->LINCTL &= ~(UART_LINCTL_LINC0_MATCH_MASK);
2460 }
2461 
2475  UART_Regs *uart, uint16_t value)
2476 {
2477  DL_Common_updateReg(&uart->LINC0, value, UART_LINC0_DATA_MASK);
2478 }
2479 
2499 __STATIC_INLINE uint16_t DL_UART_getLINFallingEdgeCaptureValue(
2500  const UART_Regs *uart)
2501 {
2502  return ((uint16_t)(uart->LINC0 & UART_LINC0_DATA_MASK));
2503 }
2504 
2519 __STATIC_INLINE uint16_t DL_UART_getLINRisingEdgeCaptureValue(
2520  const UART_Regs *uart)
2521 {
2522  return ((uint16_t)(uart->LINC1 & UART_LINC1_DATA_MASK));
2523 }
2524 
2530 __STATIC_INLINE void DL_UART_enableIrDAMode(UART_Regs *uart)
2531 {
2532  uart->IRCTL |= UART_IRCTL_IREN_ENABLE;
2533 }
2534 
2545 __STATIC_INLINE bool DL_UART_isIrDAModeEnabled(const UART_Regs *uart)
2546 {
2547  return ((uart->IRCTL & UART_IRCTL_IREN_MASK) == UART_IRCTL_IREN_ENABLE);
2548 }
2549 
2555 __STATIC_INLINE void DL_UART_disableIrDAMode(UART_Regs *uart)
2556 {
2557  uart->IRCTL &= ~(UART_IRCTL_IREN_MASK);
2558 }
2559 
2568  UART_Regs *uart, DL_UART_IRDA_CLOCK uartClock)
2569 {
2571  &uart->IRCTL, (uint32_t) uartClock, UART_IRCTL_IRTXCLK_MASK);
2572 }
2573 
2584 __STATIC_INLINE DL_UART_IRDA_CLOCK DL_UART_getIrDATXPulseClockSelect(
2585  const UART_Regs *uart)
2586 {
2587  uint32_t uartClock = uart->IRCTL & UART_IRCTL_IRTXCLK_MASK;
2588 
2589  return (DL_UART_IRDA_CLOCK)(uartClock);
2590 }
2591 
2605 void DL_UART_configIrDAMode(UART_Regs *uart, DL_UART_IRDA_POLARITY polarity,
2606  uint32_t pulseLength, DL_UART_IRDA_CLOCK irdaClk);
2607 
2626  UART_Regs *uart, uint32_t pulseLength, DL_UART_IRDA_CLOCK irdaClk);
2627 
2637 __STATIC_INLINE uint32_t DL_UART_getIrDATXPulseLength(const UART_Regs *uart)
2638 {
2639  return (uart->IRCTL & UART_IRCTL_IRTXPL_MASK);
2640 }
2641 
2649 __STATIC_INLINE void DL_UART_setIrDARXPulsePolarity(
2650  UART_Regs *uart, DL_UART_IRDA_POLARITY polarity)
2651 {
2653  &uart->IRCTL, (uint32_t) polarity, UART_IRCTL_IRRXPL_MASK);
2654 }
2655 
2665 __STATIC_INLINE DL_UART_IRDA_POLARITY DL_UART_getIrDARXPulsePolarity(
2666  const UART_Regs *uart)
2667 {
2668  uint32_t polarity = uart->IRCTL & UART_IRCTL_IRRXPL_MASK;
2669 
2670  return (DL_UART_IRDA_POLARITY)(polarity);
2671 }
2672 
2689 __STATIC_INLINE void DL_UART_setAddressMask(
2690  UART_Regs *uart, uint32_t addressMask)
2691 {
2692  DL_Common_updateReg(&uart->AMASK, addressMask, UART_AMASK_VALUE_MASK);
2693 }
2694 
2715 __STATIC_INLINE uint32_t DL_UART_getAddressMask(const UART_Regs *uart)
2716 {
2717  return (uart->AMASK & UART_AMASK_VALUE_MASK);
2718 }
2719 
2733 __STATIC_INLINE void DL_UART_setAddress(UART_Regs *uart, uint32_t address)
2734 {
2735  DL_Common_updateReg(&uart->ADDR, address, UART_ADDR_VALUE_MASK);
2736 }
2737 
2755 __STATIC_INLINE uint32_t DL_UART_getAddress(const UART_Regs *uart)
2756 {
2757  return (uart->ADDR & UART_ADDR_VALUE_MASK);
2758 }
2759 
2768 __STATIC_INLINE void DL_UART_enableInterrupt(
2769  UART_Regs *uart, uint32_t interruptMask)
2770 {
2771  uart->CPU_INT.IMASK |= interruptMask;
2772 }
2773 
2782 __STATIC_INLINE void DL_UART_disableInterrupt(
2783  UART_Regs *uart, uint32_t interruptMask)
2784 {
2785  uart->CPU_INT.IMASK &= ~(interruptMask);
2786 }
2787 
2800 __STATIC_INLINE uint32_t DL_UART_getEnabledInterrupts(
2801  const UART_Regs *uart, uint32_t interruptMask)
2802 {
2803  return (uart->CPU_INT.IMASK & interruptMask);
2804 }
2805 
2823 __STATIC_INLINE uint32_t DL_UART_getEnabledInterruptStatus(
2824  const UART_Regs *uart, uint32_t interruptMask)
2825 {
2826  return (uart->CPU_INT.MIS & interruptMask);
2827 }
2828 
2844 __STATIC_INLINE uint32_t DL_UART_getRawInterruptStatus(
2845  const UART_Regs *uart, uint32_t interruptMask)
2846 {
2847  return (uart->CPU_INT.RIS & interruptMask);
2848 }
2849 
2863 __STATIC_INLINE DL_UART_IIDX DL_UART_getPendingInterrupt(const UART_Regs *uart)
2864 {
2865  return (DL_UART_IIDX)(uart->CPU_INT.IIDX);
2866 }
2867 
2876 __STATIC_INLINE void DL_UART_clearInterruptStatus(
2877  UART_Regs *uart, uint32_t interruptMask)
2878 {
2879  uart->CPU_INT.ICLR = interruptMask;
2880 }
2881 
2899 __STATIC_INLINE void DL_UART_changeConfig(UART_Regs *uart)
2900 {
2901  DL_UART_disable(uart);
2902  while (DL_UART_isBusy(uart)) {
2903  ;
2904  }
2905  DL_UART_disableFIFOs(uart);
2906 }
2907 
2913 __STATIC_INLINE void DL_UART_enableAnalogGlitchFilter(UART_Regs *uart)
2914 {
2915  uart->GFCTL |= UART_GFCTL_AGFEN_ENABLE;
2916 }
2917 
2923 __STATIC_INLINE void DL_UART_disableAnalogGlitchFilter(UART_Regs *uart)
2924 {
2925  uart->GFCTL &= ~(UART_GFCTL_AGFEN_MASK);
2926 }
2927 
2936 __STATIC_INLINE bool DL_UART_isAnalogGlitchFilterEnabled(const UART_Regs *uart)
2937 {
2938  return ((uart->GFCTL & UART_GFCTL_AGFEN_MASK) == UART_GFCTL_AGFEN_ENABLE);
2939 }
2940 
2949 __STATIC_INLINE void DL_UART_enableGlitchFilterChaining(UART_Regs *uart)
2950 {
2951  uart->GFCTL |= UART_GFCTL_CHAIN_ENABLED;
2952 }
2953 
2962 __STATIC_INLINE void DL_UART_disableGlitchFilterChaining(UART_Regs *uart)
2963 {
2964  uart->GFCTL &= ~(UART_GFCTL_CHAIN_MASK);
2965 }
2966 
2976  const UART_Regs *uart)
2977 {
2978  return ((uart->GFCTL & UART_GFCTL_CHAIN_MASK) == UART_GFCTL_CHAIN_ENABLED);
2979 }
2980 
2993 __STATIC_INLINE void DL_UART_setAnalogPulseWidth(
2994  UART_Regs *uart, DL_UART_PULSE_WIDTH pulseWidth)
2995 {
2997  &uart->GFCTL, (uint32_t) pulseWidth, UART_GFCTL_AGFSEL_MASK);
2998 }
2999 
3015 __STATIC_INLINE DL_UART_PULSE_WIDTH DL_UART_getAnalogPulseWidth(
3016  const UART_Regs *uart)
3017 {
3018  uint32_t pulseWidth = uart->GFCTL & UART_GFCTL_AGFSEL_MASK;
3019 
3020  return (DL_UART_PULSE_WIDTH)(pulseWidth);
3021 }
3022 
3040 void DL_UART_transmitDataBlocking(UART_Regs *uart, uint8_t data);
3041 
3062 uint8_t DL_UART_receiveDataBlocking(const UART_Regs *uart);
3063 
3084 bool DL_UART_transmitDataCheck(UART_Regs *uart, uint8_t data);
3085 
3110 bool DL_UART_receiveDataCheck(const UART_Regs *uart, uint8_t *buffer);
3111 
3121 uint32_t DL_UART_drainRXFIFO(
3122  const UART_Regs *uart, uint8_t *buffer, uint32_t maxCount);
3123 
3136 uint32_t DL_UART_fillTXFIFO(
3137  UART_Regs *uart, const uint8_t *buffer, uint32_t count);
3138 
3154 __STATIC_INLINE void DL_UART_enableDMAReceiveEvent(
3155  UART_Regs *uart, uint32_t interrupt)
3156 {
3157  uart->DMA_TRIG_RX.IMASK = interrupt;
3158 }
3159 
3173 __STATIC_INLINE void DL_UART_enableDMATransmitEvent(UART_Regs *uart)
3174 {
3175  uart->DMA_TRIG_TX.IMASK = UART_DMA_TRIG_TX_IMASK_TXINT_SET;
3176 }
3177 
3191 __STATIC_INLINE void DL_UART_disableDMAReceiveEvent(
3192  UART_Regs *uart, uint32_t interrupt)
3193 {
3194  uart->DMA_TRIG_RX.IMASK &= ~(interrupt);
3195 }
3196 
3210 __STATIC_INLINE void DL_UART_disableDMATransmitEvent(UART_Regs *uart)
3211 {
3212  uart->DMA_TRIG_TX.IMASK = UART_DMA_TRIG_TX_IMASK_TXINT_CLR;
3213 }
3214 
3230 __STATIC_INLINE uint32_t DL_UART_getEnabledDMAReceiveEvent(
3231  const UART_Regs *uart, uint32_t interruptMask)
3232 {
3233  return (uart->DMA_TRIG_RX.IMASK & interruptMask);
3234 }
3235 
3249 __STATIC_INLINE uint32_t DL_UART_getEnabledDMATransmitEvent(
3250  const UART_Regs *uart)
3251 {
3252  return (uart->DMA_TRIG_TX.IMASK & UART_DMA_TRIG_TX_IMASK_TXINT_MASK);
3253 }
3254 
3275  const UART_Regs *uart, uint32_t interruptMask)
3276 {
3277  return (uart->DMA_TRIG_RX.MIS & interruptMask);
3278 }
3279 
3298  const UART_Regs *uart)
3299 {
3300  return (uart->DMA_TRIG_TX.MIS & UART_DMA_TRIG_TX_MIS_TXINT_MASK);
3301 }
3302 
3320 __STATIC_INLINE uint32_t DL_UART_getRawDMAReceiveEventStatus(
3321  const UART_Regs *uart, uint32_t interruptMask)
3322 {
3323  return (uart->DMA_TRIG_RX.RIS & interruptMask);
3324 }
3325 
3341 __STATIC_INLINE uint32_t DL_UART_getRawDMATransmitEventStatus(
3342  const UART_Regs *uart)
3343 {
3344  return (uart->DMA_TRIG_TX.RIS & UART_DMA_TRIG_TX_RIS_TXINT_MASK);
3345 }
3346 
3363 __STATIC_INLINE DL_UART_DMA_IIDX_RX DL_UART_getPendingDMAReceiveEvent(
3364  const UART_Regs *uart)
3365 {
3366  return (DL_UART_DMA_IIDX_RX)(uart->DMA_TRIG_RX.IIDX);
3367 }
3368 
3385 __STATIC_INLINE DL_UART_DMA_IIDX_TX DL_UART_getPendingDMATransmitEvent(
3386  const UART_Regs *uart)
3387 {
3388  return (DL_UART_DMA_IIDX_TX)(uart->DMA_TRIG_TX.IIDX);
3389 }
3390 
3403  UART_Regs *uart, uint32_t interruptMask)
3404 {
3405  uart->DMA_TRIG_RX.ICLR = interruptMask;
3406 }
3407 
3418 __STATIC_INLINE void DL_UART_clearDMATransmitEventStatus(UART_Regs *uart)
3419 {
3420  uart->DMA_TRIG_TX.ICLR = UART_DMA_TRIG_TX_ICLR_TXINT_CLR;
3421 }
3422 
3432 __STATIC_INLINE void DL_UART_setClockDivider2(
3433  UART_Regs *uart, DL_UART_CLOCK_DIVIDE2_RATIO ratio)
3434 {
3435  uart->CLKDIV2 = (uint32_t) ratio;
3436 }
3437 
3451 __STATIC_INLINE DL_UART_CLOCK_DIVIDE2_RATIO DL_UART_getClockDivider2(
3452  const UART_Regs *uart)
3453 {
3454  uint32_t ratio = uart->CLKDIV2;
3455  return (DL_UART_CLOCK_DIVIDE2_RATIO) ratio;
3456 }
3457 #ifdef __MSPM0_HAS_UART_MAIN__
3458 
3476  const UART_Regs *uart, DL_UART_Main_backupConfig *ptr);
3477 
3495  UART_Regs *uart, DL_UART_Main_backupConfig *ptr);
3496 
3497 #endif /* __MSPM0_HAS_UART_MAIN__ */
3498 
3499 #ifdef __MSPM0_HAS_UART_EXTD__
3500 
3519  const UART_Regs *uart, DL_UART_Extend_backupConfig *ptr);
3520 
3539  UART_Regs *uart, DL_UART_Extend_backupConfig *ptr);
3540 
3541 #endif /* __MSPM0_HAS_UART_EXTD__ */
3542 
3543 #ifdef __cplusplus
3544 }
3545 #endif
3546 
3547 #endif /* __MSPM0_HAS_UART_MAIN__ || __MSPM0_HAS_UART_EXTD__ */
3548 
3549 #else
3550 #warning \
3551  "TI highly recommends accessing uart with dl_uart_main, dl_uart_extend.h only."
3552 #endif /* ti_dl_dl_uart_main__include ti_dl_dl_uart_extend__include */
3553 
3554 #endif /* ti_dl_dl_uart__include */
3555 
Definition: dl_uart.h:462
DL_UART_CLOCK clockSel
Definition: dl_uart.h:541
__STATIC_INLINE void DL_UART_disable(UART_Regs *uart)
Disable the UART peripheral.
Definition: dl_uart.h:812
__STATIC_INLINE bool DL_UART_isLoopbackModeEnabled(const UART_Regs *uart)
Check if loopback mode is enabled.
Definition: dl_uart.h:927
bool DL_UART_Extend_restoreConfiguration(UART_Regs *uart, DL_UART_Extend_backupConfig *ptr)
Restore UART Extend configuration after leaving a power loss state.
__STATIC_INLINE void DL_Common_updateReg(volatile uint32_t *reg, uint32_t val, uint32_t mask)
Writes value to specified register - retaining bits unaffected by mask.
Definition: dl_common.h:63
__STATIC_INLINE uint32_t DL_UART_getDigitalPulseWidth(const UART_Regs *uart)
Get the pulse width select for the digital glitch suppresion.
Definition: dl_uart.h:2065
__STATIC_INLINE void DL_UART_enableMSBFirst(UART_Regs *uart)
Enable most significant bit (MSB) first.
Definition: dl_uart.h:1066
Definition: dl_uart.h:194
bool backupRdy
Definition: dl_uart.h:683
__STATIC_INLINE DL_UART_IIDX DL_UART_getPendingInterrupt(const UART_Regs *uart)
Get highest priority pending UART interrupt.
Definition: dl_uart.h:2863
Definition: dl_uart.h:427
Definition: dl_uart.h:204
Definition: dl_uart.h:192
Definition: dl_uart.h:371
__STATIC_INLINE void DL_UART_enablePower(UART_Regs *uart)
Enables the Peripheral Write Enable (PWREN) register for the UART.
Definition: dl_uart.h:711
__STATIC_INLINE DL_UART_DIRECTION DL_UART_getDirection(const UART_Regs *uart)
Get the direction of the UART communication.
Definition: dl_uart.h:982
uint32_t clockSel
Definition: dl_uart.h:626
__STATIC_INLINE uint32_t DL_UART_getEnabledInterrupts(const UART_Regs *uart, uint32_t interruptMask)
Check which UART interrupts are enabled.
Definition: dl_uart.h:2800
__STATIC_INLINE void DL_UART_setAnalogPulseWidth(UART_Regs *uart, DL_UART_PULSE_WIDTH pulseWidth)
Set the pulse width select for the analog glitch suppresion.
Definition: dl_uart.h:2993
Definition: dl_uart.h:186
__STATIC_INLINE void DL_UART_disableDMATransmitEvent(UART_Regs *uart)
Disables UART interrupt from triggering the DMA transmit event.
Definition: dl_uart.h:3210
__STATIC_INLINE uint32_t DL_UART_getEnabledInterruptStatus(const UART_Regs *uart, uint32_t interruptMask)
Check interrupt flag of enabled UART interrupts.
Definition: dl_uart.h:2823
__STATIC_INLINE bool DL_UART_isAnalogGlitchFilterEnabled(const UART_Regs *uart)
Returns if analog glitch filter is enabled.
Definition: dl_uart.h:2936
__STATIC_INLINE void DL_UART_disableSendIdlePattern(UART_Regs *uart)
Disable send idle pattern.
Definition: dl_uart.h:1597
__STATIC_INLINE void DL_UART_enableAnalogGlitchFilter(UART_Regs *uart)
Enable the analog glitch filter on the RX input.
Definition: dl_uart.h:2913
__STATIC_INLINE void DL_UART_disableLINCountWhileLow(UART_Regs *uart)
Disable LIN counter increments while RXD signal is low.
Definition: dl_uart.h:2293
__STATIC_INLINE bool DL_UART_isReset(const UART_Regs *uart)
Returns if uart peripheral was reset.
Definition: dl_uart.h:775
Definition: dl_uart.h:487
Definition: dl_uart.h:206
__STATIC_INLINE void DL_UART_disableLINRisingEdgeCapture(UART_Regs *uart)
Disable capture of LIN counter on a rising edge.
Definition: dl_uart.h:2380
DL_UART_IIDX
Definition: dl_uart.h:178
__STATIC_INLINE void DL_UART_enableLINCountWhileLow(UART_Regs *uart)
Enable LIN counter incrementing while RXD signal is low.
Definition: dl_uart.h:2265
DL_UART_FLOW_CONTROL flowControl
Definition: dl_uart.h:523
__STATIC_INLINE void DL_UART_enableIrDAMode(UART_Regs *uart)
Enable the IrDA encoder/decoder.
Definition: dl_uart.h:2530
Definition: dl_uart.h:337
Definition: dl_uart.h:452
Definition: dl_uart.h:481
__STATIC_INLINE void DL_UART_setOversampling(UART_Regs *uart, DL_UART_OVERSAMPLING_RATE rate)
Set the oversampling rate.
Definition: dl_uart.h:875
uint32_t ibrd
Definition: dl_uart.h:575
Definition: dl_uart.h:367
__STATIC_INLINE bool DL_UART_isRXFIFOEmpty(const UART_Regs *uart)
Checks if the RX FIFO is empty.
Definition: dl_uart.h:1726
Definition: dl_uart.h:313
__STATIC_INLINE DL_UART_STOP_BITS DL_UART_getStopBits(const UART_Regs *uart)
Get the number of stop bits.
Definition: dl_uart.h:1541
__STATIC_INLINE uint32_t DL_UART_getRawInterruptStatus(const UART_Regs *uart, uint32_t interruptMask)
Check interrupt flag of any UART interrupt.
Definition: dl_uart.h:2844
__STATIC_INLINE DL_UART_TX_FIFO_LEVEL DL_UART_getTXFIFOThreshold(const UART_Regs *uart)
Get the TX FIFO interrupt threshold level.
Definition: dl_uart.h:1863
Definition: dl_uart.h:377
Definition: dl_uart.h:188
__STATIC_INLINE void DL_UART_disableAnalogGlitchFilter(UART_Regs *uart)
Disable the analog glitch filter on the RX input.
Definition: dl_uart.h:2923
__STATIC_INLINE void DL_UART_setExternalDriverHold(UART_Regs *uart, uint32_t val)
Set external driver setup hold.
Definition: dl_uart.h:1664
__STATIC_INLINE DL_UART_MODE DL_UART_getCommunicationMode(const UART_Regs *uart)
Get the communication mode/protocol being used.
Definition: dl_uart.h:1269
__STATIC_INLINE DL_UART_PULSE_WIDTH DL_UART_getAnalogPulseWidth(const UART_Regs *uart)
Get the pulse width select for the glitch suppresion.
Definition: dl_uart.h:3015
__STATIC_INLINE bool DL_UART_isFIFOsEnabled(const UART_Regs *uart)
Check if FIFOs are enabled.
Definition: dl_uart.h:1414
Definition: dl_uart.h:295
__STATIC_INLINE void DL_UART_enable(UART_Regs *uart)
Enable the UART peripheral.
Definition: dl_uart.h:786
Definition: dl_uart.h:325
Definition: dl_uart.h:196
uint32_t controlWord
Definition: dl_uart.h:623
DL_UART_FLOW_CONTROL
Definition: dl_uart.h:385
__STATIC_INLINE void DL_UART_setBaudRateDivisor(UART_Regs *uart, uint32_t integerDivisor, uint32_t fractionalDivisor)
Set the baud rate divisor.
Definition: dl_uart.h:1983
void DL_UART_configBaudRate(UART_Regs *uart, uint32_t clockFreq, uint32_t baudRate)
Configure the baud rate.
__STATIC_INLINE void DL_UART_disableLINCounterCompareMatch(UART_Regs *uart)
Disable LIN counter compare match mode.
Definition: dl_uart.h:2457
DL_UART_PARITY parity
Definition: dl_uart.h:526
Definition: dl_uart.h:507
uint32_t divideRatio
Definition: dl_uart.h:567
Definition: dl_uart.h:391
Definition: dl_uart.h:485
__STATIC_INLINE void DL_UART_clearDMATransmitEventStatus(UART_Regs *uart)
Clear pending UART interrupt for DMA transmit event.
Definition: dl_uart.h:3418
__STATIC_INLINE void DL_UART_enableDMAReceiveEvent(UART_Regs *uart, uint32_t interrupt)
Enable UART interrupt for triggering the DMA receive event.
Definition: dl_uart.h:3154
__STATIC_INLINE uint32_t DL_UART_getEnabledDMATransmitEvent(const UART_Regs *uart)
Check if UART interrupt for DMA transmit event is enabled.
Definition: dl_uart.h:3249
DL_UART_DMA_IIDX_RX
Definition: dl_uart.h:224
void DL_UART_transmitDataBlocking(UART_Regs *uart, uint8_t data)
Blocks to ensure transmit is ready before sending data.
Definition: dl_uart.h:341
__STATIC_INLINE bool DL_UART_isClearToSend(const UART_Regs *uart)
Checks if UART is clear to send.
Definition: dl_uart.h:1805
__STATIC_INLINE void DL_UART_setParityMode(UART_Regs *uart, DL_UART_PARITY parity)
Set the parity mode.
Definition: dl_uart.h:1490
uint32_t interruptFifoLevelSelectWord
Definition: dl_uart.h:572
Definition: dl_uart.h:460
Definition: dl_uart.h:495
__STATIC_INLINE void DL_UART_enableLINCounterCompareMatch(UART_Regs *uart)
Enable LIN counter compare match mode.
Definition: dl_uart.h:2393
__STATIC_INLINE uint16_t DL_UART_getLINRisingEdgeCaptureValue(const UART_Regs *uart)
Get the LINC1 counter value.
Definition: dl_uart.h:2519
uint32_t divideRatio
Definition: dl_uart.h:629
__STATIC_INLINE uint32_t DL_UART_getAddress(const UART_Regs *uart)
Get the address being used.
Definition: dl_uart.h:2755
Definition: dl_uart.h:473
Definition: dl_uart.h:339
DL_UART_WORD_LENGTH
Definition: dl_uart.h:335
__STATIC_INLINE void DL_UART_enableLoopbackMode(UART_Regs *uart)
Enable loopback mode.
Definition: dl_uart.h:912
__STATIC_INLINE void DL_UART_enableMajorityVoting(UART_Regs *uart)
Enable majority voting control.
Definition: dl_uart.h:1015
DL_UART_TX_FIFO_LEVEL
Definition: dl_uart.h:421
DL_UART_IRDA_CLOCK
Definition: dl_uart.h:450
Definition: dl_uart.h:401
__STATIC_INLINE void DL_UART_setRTSOutput(UART_Regs *uart, DL_UART_RTS val)
Set the request to send output signal.
Definition: dl_uart.h:1336
Definition: dl_uart.h:431
__STATIC_INLINE uint32_t DL_UART_getErrorStatus(const UART_Regs *uart, uint32_t errorMask)
Gets the status of the error flags of the received data.
Definition: dl_uart.h:2130
DriverLib Common APIs.
__STATIC_INLINE bool DL_UART_isGlitchFilterChainingEnabled(const UART_Regs *uart)
Returns if glitch filter chaining enabled.
Definition: dl_uart.h:2975
Definition: dl_uart.h:423
__STATIC_INLINE void DL_UART_enableDMATransmitEvent(UART_Regs *uart)
Enable UART interrupt for triggering the DMA transmit event.
Definition: dl_uart.h:3173
uint32_t glitchFilterControlWord
Definition: dl_uart.h:589
Definition: dl_uart.h:355
__STATIC_INLINE bool DL_UART_isLINSendBreakEnabled(const UART_Regs *uart)
Check if send break is enabled.
Definition: dl_uart.h:1456
__STATIC_INLINE bool DL_UART_isTXFIFOEmpty(const UART_Regs *uart)
Checks if the TX FIFO is empty.
Definition: dl_uart.h:1767
__STATIC_INLINE uint32_t DL_UART_getAddressMask(const UART_Regs *uart)
Get the address mask being used.
Definition: dl_uart.h:2715
__STATIC_INLINE void DL_UART_enableLINReceptionCountControl(UART_Regs *uart)
Setup LIN counter control for LIN reception.
Definition: dl_uart.h:2426
Definition: dl_uart.h:442
__STATIC_INLINE bool DL_UART_isLINCountWhileLowEnabled(const UART_Regs *uart)
Check if LIN counter increments while RXD signal is low is enabled.
Definition: dl_uart.h:2280
Definition: dl_uart.h:393
Definition: dl_uart.h:493
__STATIC_INLINE uint16_t DL_UART_getLINFallingEdgeCaptureValue(const UART_Regs *uart)
Get the LINC0 counter value.
Definition: dl_uart.h:2499
uint32_t ibrd
Definition: dl_uart.h:643
uint32_t DL_UART_drainRXFIFO(const UART_Regs *uart, uint8_t *buffer, uint32_t maxCount)
Read all available data out of the RX FIFO using 8 bit access.
Definition: dl_uart.h:200
__STATIC_INLINE DL_UART_DMA_IIDX_RX DL_UART_getPendingDMAReceiveEvent(const UART_Regs *uart)
Get highest priority pending UART interrupt for DMA receive event.
Definition: dl_uart.h:3363
uint32_t interruptMask0
Definition: dl_uart.h:593
__STATIC_INLINE void DL_UART_disableTransmitPinManualControl(UART_Regs *uart)
Disable control of the TXD pin.
Definition: dl_uart.h:1156
Definition: dl_uart.h:343
Definition: dl_uart.h:220
uint8_t DL_UART_receiveDataBlocking(const UART_Regs *uart)
Blocks to ensure receive is ready before reading data.
__STATIC_INLINE DL_UART_FLOW_CONTROL DL_UART_getFlowControl(const UART_Regs *uart)
Check the flow control configuration.
Definition: dl_uart.h:1306
__STATIC_INLINE void DL_UART_disableMSBFirst(UART_Regs *uart)
Disable most significant bit (MSB) first.
Definition: dl_uart.h:1101
__STATIC_INLINE DL_UART_WORD_LENGTH DL_UART_getWordLength(const UART_Regs *uart)
Get the word length.
Definition: dl_uart.h:1571
uint32_t linControlWord
Definition: dl_uart.h:656
__STATIC_INLINE void DL_UART_enableLINRisingEdgeCapture(UART_Regs *uart)
Enable capture of the LIN counter on a rising edge.
Definition: dl_uart.h:2353
void DL_UART_init(UART_Regs *uart, const DL_UART_Config *config)
Initialize the UART peripheral.
DL_UART_MODE
Definition: dl_uart.h:347
__STATIC_INLINE uint8_t DL_UART_receiveData(const UART_Regs *uart)
Reads data from the RX FIFO.
Definition: dl_uart.h:2111
__STATIC_INLINE bool DL_UART_isBusy(const UART_Regs *uart)
Checks if the UART is busy.
Definition: dl_uart.h:1706
__STATIC_INLINE bool DL_UART_isLINCounterClearOnFallingEdge(const UART_Regs *uart)
Check if LIN counting on falling edge of RXD is enabled.
Definition: dl_uart.h:2237
__STATIC_INLINE bool DL_UART_isLINRisingEdgeCaptureEnabled(const UART_Regs *uart)
Check status of capture of LIN counter on a rising edge.
Definition: dl_uart.h:2368
DL_UART_DMA_IIDX_TX
Definition: dl_uart.h:232
DL_UART_CLOCK_DIVIDE_RATIO divideRatio
Definition: dl_uart.h:544
Definition: dl_uart.h:208
__STATIC_INLINE void DL_UART_setExternalDriverSetup(UART_Regs *uart, uint32_t val)
Set external driver setup value.
Definition: dl_uart.h:1628
__STATIC_INLINE uint32_t DL_UART_getEnabledDMAReceiveEvent(const UART_Regs *uart, uint32_t interruptMask)
Check which UART interrupt for DMA receive events is enabled.
Definition: dl_uart.h:3230
Definition: dl_uart.h:349
Configuration structure to backup UART Main peripheral state before going to STOP/STANDBY mode...
Definition: dl_uart.h:556
__STATIC_INLINE void DL_UART_enableSendIdlePattern(UART_Regs *uart)
Send idle pattern.
Definition: dl_uart.h:1587
Definition: dl_uart.h:409
__STATIC_INLINE bool DL_UART_isMajorityVotingEnabled(const UART_Regs *uart)
Check if majority voting is enabled.
Definition: dl_uart.h:1030
DL_UART_PULSE_WIDTH
Definition: dl_uart.h:293
__STATIC_INLINE bool DL_UART_isRXFIFOFull(const UART_Regs *uart)
Checks if the RX FIFO is full.
Definition: dl_uart.h:1747
Definition: dl_uart.h:212
bool DL_UART_Extend_saveConfiguration(const UART_Regs *uart, DL_UART_Extend_backupConfig *ptr)
Save UART Extend configuration before entering a power loss state.
__STATIC_INLINE void DL_UART_setIrDATXPulseClockSelect(UART_Regs *uart, DL_UART_IRDA_CLOCK uartClock)
Set the IrDA transmit pulse clock select.
Definition: dl_uart.h:2567
__STATIC_INLINE DL_UART_PARITY DL_UART_getParityMode(const UART_Regs *uart)
Get parity mode.
Definition: dl_uart.h:1507
__STATIC_INLINE void DL_UART_enableInterrupt(UART_Regs *uart, uint32_t interruptMask)
Enable UART interrupts.
Definition: dl_uart.h:2768
__STATIC_INLINE void DL_UART_setAddress(UART_Regs *uart, uint32_t address)
Set the address.
Definition: dl_uart.h:2733
Definition: dl_uart.h:184
uint32_t fbrd
Definition: dl_uart.h:646
__STATIC_INLINE void DL_UART_clearDMAReceiveEventStatus(UART_Regs *uart, uint32_t interruptMask)
Clear pending UART interrupts for DMA receive event.
Definition: dl_uart.h:3402
Definition: dl_uart.h:438
Definition: dl_uart.h:446
DL_UART_RX_FIFO_LEVEL
Definition: dl_uart.h:435
__STATIC_INLINE void DL_UART_enableLINCounter(UART_Regs *uart)
Enable the LIN counter.
Definition: dl_uart.h:2176
Configuration struct for DL_UART_setClockConfig.
Definition: dl_uart.h:539
__STATIC_INLINE void DL_UART_enableLINFallingEdgeCapture(UART_Regs *uart)
Enable capture of the LIN counter on a falling edge.
Definition: dl_uart.h:2310
Definition: dl_uart.h:389
__STATIC_INLINE void DL_UART_setIrDARXPulsePolarity(UART_Regs *uart, DL_UART_IRDA_POLARITY polarity)
Set the IrDA receive input UCAxRXD polarity.
Definition: dl_uart.h:2649
__STATIC_INLINE void DL_UART_setClockDivider2(UART_Regs *uart, DL_UART_CLOCK_DIVIDE2_RATIO ratio)
Sets the second clock divider ratio.
Definition: dl_uart.h:3432
DL_UART_PARITY
Definition: dl_uart.h:317
DL_UART_TXD_OUT
Definition: dl_uart.h:413
DL_UART_CLOCK_DIVIDE_RATIO
Definition: dl_uart.h:471
Definition: dl_uart.h:190
Configuration struct for DL_UART_init.
Definition: dl_uart.h:515
__STATIC_INLINE bool DL_UART_isIrDAModeEnabled(const UART_Regs *uart)
Check if the IrDA encoder/decoder is enabled.
Definition: dl_uart.h:2545
void DL_UART_configIrDAMode(UART_Regs *uart, DL_UART_IRDA_POLARITY polarity, uint32_t pulseLength, DL_UART_IRDA_CLOCK irdaClk)
Set the IrDA configurations.
uint32_t address
Definition: dl_uart.h:667
Definition: dl_uart.h:497
__STATIC_INLINE DL_UART_TXD_OUT DL_UART_getTransmitPinManualOutput(const UART_Regs *uart)
Get the output value of the TXD pin.
Definition: dl_uart.h:1199
Definition: dl_uart.h:331
__STATIC_INLINE uint32_t DL_UART_getRawDMAReceiveEventStatus(const UART_Regs *uart, uint32_t interruptMask)
Check interrupt flag of any UART interrupt for DMA receive event.
Definition: dl_uart.h:3320
DL_UART_STOP_BITS
Definition: dl_uart.h:405
Definition: dl_uart.h:425
__STATIC_INLINE DL_UART_IRDA_POLARITY DL_UART_getIrDARXPulsePolarity(const UART_Regs *uart)
Get the IrDA receive input UCAxRXD polarity.
Definition: dl_uart.h:2665
__STATIC_INLINE uint32_t DL_UART_getExternalDriverHold(const UART_Regs *uart)
Get the external driver setup hold.
Definition: dl_uart.h:1681
DL_UART_CLOCK
Definition: dl_uart.h:375
Definition: dl_uart.h:440
__STATIC_INLINE bool DL_UART_isParityEnabled(const UART_Regs *uart)
Check if parity is enabled.
Definition: dl_uart.h:1471
Definition: dl_uart.h:353
Definition: dl_uart.h:297
Definition: dl_uart.h:475
Definition: dl_uart.h:501
__STATIC_INLINE void DL_UART_disableLINFallingEdgeCapture(UART_Regs *uart)
Disable capture of LIN counter on a falling edge.
Definition: dl_uart.h:2339
Definition: dl_uart.h:180
bool DL_UART_Main_restoreConfiguration(UART_Regs *uart, DL_UART_Main_backupConfig *ptr)
Restore UART Main configuration after leaving a power loss state.
__STATIC_INLINE void DL_UART_reset(UART_Regs *uart)
Resets uart peripheral.
Definition: dl_uart.h:759
uint32_t controlWord
Definition: dl_uart.h:561
__STATIC_INLINE void DL_UART_disableDMAReceiveEvent(UART_Regs *uart, uint32_t interrupt)
Disables UART interrupt from triggering the DMA receive event.
Definition: dl_uart.h:3191
DL_UART_STOP_BITS stopBits
Definition: dl_uart.h:532
Definition: dl_uart.h:226
Definition: dl_uart.h:444
__STATIC_INLINE DL_UART_IRDA_CLOCK DL_UART_getIrDATXPulseClockSelect(const UART_Regs *uart)
Get the IrDA transmit pulse clock select.
Definition: dl_uart.h:2584
__STATIC_INLINE void DL_UART_disableMajorityVoting(UART_Regs *uart)
Disable majority voting control.
Definition: dl_uart.h:1047
__STATIC_INLINE void DL_UART_setTransmitPinManualOutput(UART_Regs *uart, DL_UART_TXD_OUT txdOutVal)
Set the output of the TXD pin.
Definition: dl_uart.h:1182
Definition: dl_uart.h:454
Definition: dl_uart.h:309
__STATIC_INLINE void DL_UART_setRXFIFOThreshold(UART_Regs *uart, DL_UART_RX_FIFO_LEVEL threshold)
Set the RX FIFO interrupt threshold level. The interrupts are generated based on a transition through...
Definition: dl_uart.h:1883
uint32_t interruptMask0
Definition: dl_uart.h:671
__STATIC_INLINE bool DL_UART_isMSBFirstEnabled(const UART_Regs *uart)
Check if most significant bit (MSB) first is enabled.
Definition: dl_uart.h:1081
__STATIC_INLINE bool DL_UART_isIdleModeDetected(const UART_Regs *uart)
Checks if Idle mode has been detected.
Definition: dl_uart.h:1826
__STATIC_INLINE DL_UART_DMA_IIDX_TX DL_UART_getPendingDMATransmitEvent(const UART_Regs *uart)
Get highest priority pending UART interrupt for DMA transmit event.
Definition: dl_uart.h:3385
__STATIC_INLINE void DL_UART_disableFIFOs(UART_Regs *uart)
Disable FIFOs.
Definition: dl_uart.h:1399
Configuration structure to backup UART Extend peripheral state before going to STOP/STANDBY mode...
Definition: dl_uart.h:618
__STATIC_INLINE bool DL_UART_isSendIdlePatternEnabled(const UART_Regs *uart)
Check if send idle pattern is enabled.
Definition: dl_uart.h:1612
__STATIC_INLINE void DL_UART_enableFIFOs(UART_Regs *uart)
Enable FIFOs.
Definition: dl_uart.h:1381
Definition: dl_uart.h:407
__STATIC_INLINE void DL_UART_disableLINSendBreak(UART_Regs *uart)
Disable send break.
Definition: dl_uart.h:1441
__STATIC_INLINE void DL_UART_setDigitalPulseWidth(UART_Regs *uart, uint32_t pulseWidth)
Set the pulse width select for the digital glitch suppresion.
Definition: dl_uart.h:2046
bool DL_UART_receiveDataCheck(const UART_Regs *uart, uint8_t *buffer)
Checks the RX FIFO before trying to transmit data.
Definition: dl_uart.h:479
__STATIC_INLINE DL_UART_RTS DL_UART_getRTSOutput(const UART_Regs *uart)
Get the request to send output signal.
Definition: dl_uart.h:1360
DL_UART_IRDA_POLARITY
Definition: dl_uart.h:458
__STATIC_INLINE void DL_UART_disableManchesterEncoding(UART_Regs *uart)
Disable Manchester encoding.
Definition: dl_uart.h:1222
DL_UART_CLOCK_DIVIDE2_RATIO
Definition: dl_uart.h:491
__STATIC_INLINE void DL_UART_setLINCounterCompareValue(UART_Regs *uart, uint16_t value)
Set the value to be compared to the LIN counter.
Definition: dl_uart.h:2474
Definition: dl_uart.h:357
Definition: dl_uart.h:369
__STATIC_INLINE void DL_UART_setRXInterruptTimeout(UART_Regs *uart, uint32_t timeout)
Set the RX interrupt timeout.
Definition: dl_uart.h:1918
Definition: dl_uart.h:210
__STATIC_INLINE void DL_UART_setDirection(UART_Regs *uart, DL_UART_DIRECTION direction)
Set the direction of the UART communication.
Definition: dl_uart.h:966
__STATIC_INLINE uint32_t DL_UART_getFractionalBaudRateDivisor(const UART_Regs *uart)
Get Fractional Baud-Rate Divisor.
Definition: dl_uart.h:1964
__STATIC_INLINE DL_UART_CLOCK_DIVIDE2_RATIO DL_UART_getClockDivider2(const UART_Regs *uart)
Gets the value of CLKDIV2.
Definition: dl_uart.h:3451
Definition: dl_uart.h:202
__STATIC_INLINE void DL_UART_setIrDABaudRateDivisor(UART_Regs *uart, uint32_t integerDivisor, uint32_t fractionalDivisor, DL_UART_CLOCK_DIVIDE2_RATIO clkDivisor2)
Set the baud rate divisor for IrDA mode.
Definition: dl_uart.h:2016
__STATIC_INLINE void DL_UART_setCommunicationMode(UART_Regs *uart, DL_UART_MODE mode)
Set the communication mode/protocol to use.
Definition: dl_uart.h:1254
Definition: dl_uart.h:365
__STATIC_INLINE void DL_UART_disableLoopbackMode(UART_Regs *uart)
Disable loopback mode.
Definition: dl_uart.h:945
uint32_t interruptMask1
Definition: dl_uart.h:675
__STATIC_INLINE void DL_UART_enableLINCounterClearOnFallingEdge(UART_Regs *uart)
Enable LIN counter clear and start counting on falling edge of RXD.
Definition: dl_uart.h:2221
uint32_t interruptMask2
Definition: dl_uart.h:679
__STATIC_INLINE bool DL_UART_isLINFallingEdgeCaptureEnabled(const UART_Regs *uart)
Check status of capture of LIN counter on a falling edge.
Definition: dl_uart.h:2327
__STATIC_INLINE void DL_UART_setLINCounterValue(UART_Regs *uart, uint16_t value)
Set the LIN counter value.
Definition: dl_uart.h:2145
uint32_t glitchFilterControlWord
Definition: dl_uart.h:651
Definition: dl_uart.h:415
Definition: dl_uart.h:359
__STATIC_INLINE uint32_t DL_UART_getIrDATXPulseLength(const UART_Regs *uart)
Get the IrDA transmit pulse length.
Definition: dl_uart.h:2637
void DL_UART_setIrDAPulseLength(UART_Regs *uart, uint32_t pulseLength, DL_UART_IRDA_CLOCK irdaClk)
Set the IrDA transmit pulse length.
__STATIC_INLINE void DL_UART_disableIrDAMode(UART_Regs *uart)
Disable the IrDA encoder/decoder.
Definition: dl_uart.h:2555
Definition: dl_uart.h:351
__STATIC_INLINE uint32_t DL_UART_getEnabledDMATransmitEventStatus(const UART_Regs *uart)
Check interrupt flag of enabled UART interrupt for DMA transmit event.
Definition: dl_uart.h:3297
uint32_t clockSel
Definition: dl_uart.h:564
__STATIC_INLINE void DL_UART_enableGlitchFilterChaining(UART_Regs *uart)
Enable analog and digital noise glitch filter chaining.
Definition: dl_uart.h:2949
DL_UART_DIRECTION
Definition: dl_uart.h:363
uint32_t addressMask
Definition: dl_uart.h:664
uint32_t interruptMask2
Definition: dl_uart.h:601
__STATIC_INLINE bool DL_UART_isEnabled(const UART_Regs *uart)
Checks if the UART peripheral is enabled.
Definition: dl_uart.h:802
Definition: dl_uart.h:321
DL_UART_OVERSAMPLING_RATE
Definition: dl_uart.h:305
void DL_UART_getClockConfig(const UART_Regs *uart, DL_UART_ClockConfig *config)
Get UART source clock configuration.
__STATIC_INLINE void DL_UART_setWordLength(UART_Regs *uart, DL_UART_WORD_LENGTH wordLength)
Set the word length.
Definition: dl_uart.h:1555
uint32_t irdaControlWord
Definition: dl_uart.h:661
__STATIC_INLINE bool DL_UART_isPowerEnabled(const UART_Regs *uart)
Returns if the Peripheral Write Enable (PWREN) register for the UART is enabled.
Definition: dl_uart.h:748
__STATIC_INLINE DL_UART_OVERSAMPLING_RATE DL_UART_getOversampling(const UART_Regs *uart)
Get the oversampling rate.
Definition: dl_uart.h:891
__STATIC_INLINE DL_UART_RX_FIFO_LEVEL DL_UART_getRXFIFOThreshold(const UART_Regs *uart)
Get the RX FIFO interrupt threshold level.
Definition: dl_uart.h:1899
__STATIC_INLINE uint32_t DL_UART_getEnabledDMAReceiveEventStatus(const UART_Regs *uart, uint32_t interruptMask)
Check interrupt flag of enabled UART interrupt for DMA receive event.
Definition: dl_uart.h:3274
Definition: dl_uart.h:499
__STATIC_INLINE void DL_UART_setAddressMask(UART_Regs *uart, uint32_t addressMask)
Set the address mask for DALI, 9-bit, or Idle-Line mode.
Definition: dl_uart.h:2689
__STATIC_INLINE void DL_UART_changeConfig(UART_Regs *uart)
Prepares the UART to change the configuration.
Definition: dl_uart.h:2899
__STATIC_INLINE void DL_UART_disableLINCounterClearOnFallingEdge(UART_Regs *uart)
Disable LIN counting on falling edge of RXD.
Definition: dl_uart.h:2249
uint32_t lineControlRegisterWord
Definition: dl_uart.h:635
uint32_t interruptMask1
Definition: dl_uart.h:597
__STATIC_INLINE bool DL_UART_isTransmitPinManualControlEnabled(const UART_Regs *uart)
Check if control of the TXD pin is enabled.
Definition: dl_uart.h:1137
uint32_t lineControlRegisterWord
Definition: dl_uart.h:584
bool DL_UART_transmitDataCheck(UART_Regs *uart, uint8_t data)
Checks the TX FIFO before trying to transmit data.
Definition: dl_uart.h:381
__STATIC_INLINE void DL_UART_disablePower(UART_Regs *uart)
Disables the Peripheral Write Enable (PWREN) register for the UART.
Definition: dl_uart.h:727
DL_UART_DIRECTION direction
Definition: dl_uart.h:520
DL_UART_MODE mode
Definition: dl_uart.h:517
__STATIC_INLINE uint32_t DL_UART_getExternalDriverSetup(const UART_Regs *uart)
Get the external driver setup value.
Definition: dl_uart.h:1645
uint32_t interruptFifoLevelSelectWord
Definition: dl_uart.h:640
Definition: dl_uart.h:387
__STATIC_INLINE void DL_UART_enableManchesterEncoding(UART_Regs *uart)
Enable Manchester encoding.
Definition: dl_uart.h:1212
__STATIC_INLINE void DL_UART_setFlowControl(UART_Regs *uart, DL_UART_FLOW_CONTROL config)
Set the flow control configuration.
Definition: dl_uart.h:1289
Definition: dl_uart.h:417
DL_UART_WORD_LENGTH wordLength
Definition: dl_uart.h:529
Definition: dl_uart.h:182
__STATIC_INLINE bool DL_UART_isLINCounterCompareMatchEnabled(const UART_Regs *uart)
Check if LIN counter compare match mode is enabled.
Definition: dl_uart.h:2445
Definition: dl_uart.h:299
__STATIC_INLINE bool DL_UART_isLINCounterEnabled(const UART_Regs *uart)
Check if the LIN counter is enabled.
Definition: dl_uart.h:2191
bool backupRdy
Definition: dl_uart.h:605
__STATIC_INLINE bool DL_UART_isManchesterEncodingEnabled(const UART_Regs *uart)
Check if Manchester encoding is enabled.
Definition: dl_uart.h:1237
DL_UART_RTS
Definition: dl_uart.h:397
__STATIC_INLINE void DL_UART_enableLINSendBreak(UART_Regs *uart)
Enable send break (for LIN protocol)
Definition: dl_uart.h:1428
Definition: dl_uart.h:234
Definition: dl_uart.h:477
Definition: dl_uart.h:198
Definition: dl_uart.h:483
Definition: dl_uart.h:379
Definition: dl_uart.h:503
__STATIC_INLINE void DL_UART_enableTransmitPinManualControl(UART_Regs *uart)
Enable control of the TXD pin.
Definition: dl_uart.h:1122
__STATIC_INLINE void DL_UART_disableGlitchFilterChaining(UART_Regs *uart)
Disable analog and digital noise glitch filter chaining.
Definition: dl_uart.h:2962
__STATIC_INLINE void DL_UART_setTXFIFOThreshold(UART_Regs *uart, DL_UART_TX_FIFO_LEVEL threshold)
Set the TX FIFO interrupt threshold level.
Definition: dl_uart.h:1847
__STATIC_INLINE bool DL_UART_isTXFIFOFull(const UART_Regs *uart)
Checks if the TX FIFO is full.
Definition: dl_uart.h:1788
Definition: dl_uart.h:429
bool DL_UART_Main_saveConfiguration(const UART_Regs *uart, DL_UART_Main_backupConfig *ptr)
Save UART Main configuration before entering a power loss state.
uint32_t fbrd
Definition: dl_uart.h:578
__STATIC_INLINE uint16_t DL_UART_getLINCounterValue(const UART_Regs *uart)
Get the LIN counter value.
Definition: dl_uart.h:2164
__STATIC_INLINE void DL_UART_clearInterruptStatus(UART_Regs *uart, uint32_t interruptMask)
Clear pending UART interrupts.
Definition: dl_uart.h:2876
Definition: dl_uart.h:216
__STATIC_INLINE void DL_UART_disableInterrupt(UART_Regs *uart, uint32_t interruptMask)
Disable UART interrupts.
Definition: dl_uart.h:2782
Definition: dl_uart.h:307
Definition: dl_uart.h:505
Definition: dl_uart.h:329
uint32_t DL_UART_fillTXFIFO(UART_Regs *uart, const uint8_t *buffer, uint32_t count)
Fill the TX FIFO until full using 8 bit access.
__STATIC_INLINE void DL_UART_transmitData(UART_Regs *uart, uint8_t data)
Writes data into the TX FIFO to transmit.
Definition: dl_uart.h:2088
__STATIC_INLINE void DL_UART_setStopBits(UART_Regs *uart, DL_UART_STOP_BITS numStopBits)
Set the number of stop bits.
Definition: dl_uart.h:1525
__STATIC_INLINE void DL_UART_disableLINCounter(UART_Regs *uart)
Disable the LIN counter.
Definition: dl_uart.h:2204
__STATIC_INLINE uint32_t DL_UART_getRawDMATransmitEventStatus(const UART_Regs *uart)
Check interrupt flag of any UART interrupt for DMA transmit event.
Definition: dl_uart.h:3341
__STATIC_INLINE void DL_UART_enableLINSyncFieldValidationCounterControl(UART_Regs *uart)
Setup LIN counter control for sync field validation.
Definition: dl_uart.h:2408
Definition: dl_uart.h:319
__STATIC_INLINE uint32_t DL_UART_getIntegerBaudRateDivisor(const UART_Regs *uart)
Get Integer Baud-Rate Divisor.
Definition: dl_uart.h:1949
__STATIC_INLINE uint32_t DL_UART_getRXInterruptTimeout(const UART_Regs *uart)
Get the RX interrupt timeout.
Definition: dl_uart.h:1935
Definition: dl_uart.h:399
Definition: dl_uart.h:301
Definition: dl_uart.h:228
void DL_UART_setClockConfig(UART_Regs *uart, const DL_UART_ClockConfig *config)
Configure UART source clock.
© Copyright 1995-2026, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale