MSPM0G1X0X_G3X0X Driver Library  1.10.01.05
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_INTERRUPT_RX_TIMEOUT (UART_DMA_TRIG_RX_IMASK_RTOUT_SET)
249 
255 #define DL_UART_DMA_INTERRUPT_TX (UART_DMA_TRIG_TX_IMASK_TXINT_SET)
256 
263 #define DL_UART_ERROR_OVERRUN (UART_RXDATA_OVRERR_SET)
264 
268 #define DL_UART_ERROR_BREAK (UART_RXDATA_BRKERR_SET)
269 
273 #define DL_UART_ERROR_PARITY (UART_RXDATA_BRKERR_SET)
274 
278 #define DL_UART_ERROR_FRAMING (UART_RXDATA_FRMERR_SET)
279 
283 typedef enum {
285  DL_UART_PULSE_WIDTH_5_NS = UART_GFCTL_AGFSEL_AGLIT_5,
287  DL_UART_PULSE_WIDTH_10_NS = UART_GFCTL_AGFSEL_AGLIT_10,
289  DL_UART_PULSE_WIDTH_25_NS = UART_GFCTL_AGFSEL_AGLIT_25,
291  DL_UART_PULSE_WIDTH_50_NS = UART_GFCTL_AGFSEL_AGLIT_50
293 
295 typedef enum {
297  DL_UART_OVERSAMPLING_RATE_16X = UART_CTL0_HSE_OVS16,
299  DL_UART_OVERSAMPLING_RATE_8X = UART_CTL0_HSE_OVS8,
303  DL_UART_OVERSAMPLING_RATE_3X = UART_CTL0_HSE_OVS3
305 
307 typedef enum {
309  DL_UART_PARITY_EVEN = (UART_LCRH_PEN_ENABLE | UART_LCRH_EPS_EVEN),
311  DL_UART_PARITY_ODD = (UART_LCRH_PEN_ENABLE | UART_LCRH_EPS_ODD),
315  DL_UART_PARITY_STICK_ONE = (UART_LCRH_PEN_ENABLE | UART_LCRH_SPS_ENABLE | UART_LCRH_EPS_ODD),
319  DL_UART_PARITY_STICK_ZERO = (UART_LCRH_PEN_ENABLE | UART_LCRH_SPS_ENABLE | UART_LCRH_EPS_EVEN),
321  DL_UART_PARITY_NONE = UART_LCRH_PEN_DISABLE
323 
325 typedef enum {
327  DL_UART_WORD_LENGTH_5_BITS = UART_LCRH_WLEN_DATABIT5,
329  DL_UART_WORD_LENGTH_6_BITS = UART_LCRH_WLEN_DATABIT6,
331  DL_UART_WORD_LENGTH_7_BITS = UART_LCRH_WLEN_DATABIT7,
333  DL_UART_WORD_LENGTH_8_BITS = UART_LCRH_WLEN_DATABIT8
335 
337 typedef enum {
339  DL_UART_MODE_NORMAL = UART_CTL0_MODE_UART,
341  DL_UART_MODE_RS485 = UART_CTL0_MODE_RS485,
343  DL_UART_MODE_IDLE_LINE = UART_CTL0_MODE_IDLELINE,
345  DL_UART_MODE_ADDR_9_BIT = UART_CTL0_MODE_ADDR9BIT,
347  DL_UART_MODE_SMART_CARD = UART_CTL0_MODE_SMART,
349  DL_UART_MODE_DALI = UART_CTL0_MODE_DALI
350 } DL_UART_MODE;
351 
353 typedef enum {
355  DL_UART_DIRECTION_TX = UART_CTL0_TXE_ENABLE,
357  DL_UART_DIRECTION_RX = UART_CTL0_RXE_ENABLE,
359  DL_UART_DIRECTION_TX_RX = (UART_CTL0_RXE_ENABLE | UART_CTL0_TXE_ENABLE),
361  DL_UART_DIRECTION_NONE = (UART_CTL0_RXE_DISABLE | UART_CTL0_TXE_DISABLE)
363 
365 typedef enum {
367  DL_UART_CLOCK_BUSCLK = UART_CLKSEL_BUSCLK_SEL_ENABLE,
369  DL_UART_CLOCK_MFCLK = UART_CLKSEL_MFCLK_SEL_ENABLE,
371  DL_UART_CLOCK_LFCLK = UART_CLKSEL_LFCLK_SEL_ENABLE
372 } DL_UART_CLOCK;
373 
375 typedef enum {
377  DL_UART_FLOW_CONTROL_RTS = UART_CTL0_RTSEN_ENABLE,
379  DL_UART_FLOW_CONTROL_CTS = UART_CTL0_CTSEN_ENABLE,
381  DL_UART_FLOW_CONTROL_RTS_CTS = (UART_CTL0_RTSEN_ENABLE | UART_CTL0_CTSEN_ENABLE),
383  DL_UART_FLOW_CONTROL_NONE = (UART_CTL0_CTSEN_DISABLE | UART_CTL0_RTSEN_DISABLE)
385 
387 typedef enum {
389  DL_UART_RTS_ASSERT = UART_CTL0_RTS_SET,
391  DL_UART_RTS_DEASSERT = UART_CTL0_RTS_CLR
392 } DL_UART_RTS;
393 
395 typedef enum {
397  DL_UART_STOP_BITS_ONE = UART_LCRH_STP2_DISABLE,
399  DL_UART_STOP_BITS_TWO = UART_LCRH_STP2_ENABLE
401 
403 typedef enum {
405  DL_UART_TXD_OUT_LOW = UART_CTL0_TXD_OUT_LOW,
407  DL_UART_TXD_OUT_HIGH = UART_CTL0_TXD_OUT_HIGH
409 
411 typedef enum {
413  DL_UART_TX_FIFO_LEVEL_3_4_EMPTY = UART_IFLS_TXIFLSEL_LVL_3_4,
415  DL_UART_TX_FIFO_LEVEL_1_2_EMPTY = UART_IFLS_TXIFLSEL_LVL_1_2,
417  DL_UART_TX_FIFO_LEVEL_1_4_EMPTY = UART_IFLS_TXIFLSEL_LVL_1_4,
419  DL_UART_TX_FIFO_LEVEL_EMPTY = UART_IFLS_TXIFLSEL_LVL_EMPTY,
421  DL_UART_TX_FIFO_LEVEL_ONE_ENTRY = UART_IFLS_TXIFLSEL_LVL_1
423 
425 typedef enum {
428  DL_UART_RX_FIFO_LEVEL_ONE_ENTRY = UART_IFLS_RXIFLSEL_LVL_1,
430  DL_UART_RX_FIFO_LEVEL_FULL = UART_IFLS_RXIFLSEL_LVL_FULL,
432  DL_UART_RX_FIFO_LEVEL_3_4_FULL = UART_IFLS_RXIFLSEL_LVL_3_4,
434  DL_UART_RX_FIFO_LEVEL_1_2_FULL = UART_IFLS_RXIFLSEL_LVL_1_2,
436  DL_UART_RX_FIFO_LEVEL_1_4_FULL = UART_IFLS_RXIFLSEL_LVL_1_4,
438 
440 typedef enum {
442  DL_UART_IRDA_CLOCK_BAUD_RATE = UART_IRCTL_IRTXCLK_BRCLK,
444  DL_UART_IRDA_CLOCK_FUNCTIONAL = UART_IRCTL_IRTXCLK_BITCLK
446 
448 typedef enum {
450  DL_UART_IRDA_POLARITY_LOW = UART_IRCTL_IRRXPL_LOW,
452  DL_UART_IRDA_POLARITY_HIGH = UART_IRCTL_IRRXPL_HIGH
454 
458 #define DL_UART_PULSE_WIDTH_3_16_BIT_PERIOD ((uint32_t) 0x00000000U)
459 
461 typedef enum {
463  DL_UART_CLOCK_DIVIDE_RATIO_1 = UART_CLKDIV_RATIO_DIV_BY_1,
465  DL_UART_CLOCK_DIVIDE_RATIO_2 = UART_CLKDIV_RATIO_DIV_BY_2,
467  DL_UART_CLOCK_DIVIDE_RATIO_3 = UART_CLKDIV_RATIO_DIV_BY_3,
469  DL_UART_CLOCK_DIVIDE_RATIO_4 = UART_CLKDIV_RATIO_DIV_BY_4,
471  DL_UART_CLOCK_DIVIDE_RATIO_5 = UART_CLKDIV_RATIO_DIV_BY_5,
473  DL_UART_CLOCK_DIVIDE_RATIO_6 = UART_CLKDIV_RATIO_DIV_BY_6,
475  DL_UART_CLOCK_DIVIDE_RATIO_7 = UART_CLKDIV_RATIO_DIV_BY_7,
477  DL_UART_CLOCK_DIVIDE_RATIO_8 = UART_CLKDIV_RATIO_DIV_BY_8
479 
481 typedef enum {
483  DL_UART_CLOCK_DIVIDE2_RATIO_1 = UART_CLKDIV2_RATIO_DIV_BY_1,
485  DL_UART_CLOCK_DIVIDE2_RATIO_2 = UART_CLKDIV2_RATIO_DIV_BY_2,
487  DL_UART_CLOCK_DIVIDE2_RATIO_3 = UART_CLKDIV2_RATIO_DIV_BY_3,
489  DL_UART_CLOCK_DIVIDE2_RATIO_4 = UART_CLKDIV2_RATIO_DIV_BY_4,
491  DL_UART_CLOCK_DIVIDE2_RATIO_5 = UART_CLKDIV2_RATIO_DIV_BY_5,
493  DL_UART_CLOCK_DIVIDE2_RATIO_6 = UART_CLKDIV2_RATIO_DIV_BY_6,
495  DL_UART_CLOCK_DIVIDE2_RATIO_7 = UART_CLKDIV2_RATIO_DIV_BY_7,
497  DL_UART_CLOCK_DIVIDE2_RATIO_8 = UART_CLKDIV2_RATIO_DIV_BY_8
499 
500 /* clang-format on */
501 
505 typedef struct {
507  DL_UART_MODE mode;
508 
511 
514 
516  DL_UART_PARITY parity;
517 
519  DL_UART_WORD_LENGTH wordLength;
520 
522  DL_UART_STOP_BITS stopBits;
523 
525 
529 typedef struct {
531  DL_UART_CLOCK clockSel;
532 
534  DL_UART_CLOCK_DIVIDE_RATIO divideRatio;
535 
537 
538 #ifdef __MSPM0_HAS_UART_MAIN__
539 
546 typedef struct {
551  uint32_t controlWord;
552 
554  uint32_t clockSel;
555 
557  uint32_t divideRatio;
558 
563 
565  uint32_t ibrd;
566 
568  uint32_t fbrd;
569 
575 
580 
583  uint32_t interruptMask0;
584 
587  uint32_t interruptMask1;
588 
591  uint32_t interruptMask2;
592 
595  bool backupRdy;
597 
598 #endif /* __MSPM0_HAS_UART_MAIN__ */
599 
600 #ifdef __MSPM0_HAS_UART_EXTD__
601 
608 typedef struct {
613  uint32_t controlWord;
614 
616  uint32_t clockSel;
617 
619  uint32_t divideRatio;
620 
626 
631 
633  uint32_t ibrd;
634 
636  uint32_t fbrd;
637 
642 
646  uint32_t linControlWord;
647 
651  uint32_t irdaControlWord;
652 
654  uint32_t addressMask;
655 
657  uint32_t address;
658 
661  uint32_t interruptMask0;
662 
665  uint32_t interruptMask1;
666 
669  uint32_t interruptMask2;
670 
673  bool backupRdy;
675 
676 #endif /* __MSPM0_HAS_UART_EXTD__ */
677 
688 void DL_UART_init(UART_Regs *uart, DL_UART_Config *config);
689 
695 __STATIC_INLINE void DL_UART_enablePower(UART_Regs *uart)
696 {
697  uart->GPRCM.PWREN = (UART_PWREN_KEY_UNLOCK_W | UART_PWREN_ENABLE_ENABLE);
698 }
699 
705 __STATIC_INLINE void DL_UART_disablePower(UART_Regs *uart)
706 {
707  uart->GPRCM.PWREN = (UART_PWREN_KEY_UNLOCK_W | UART_PWREN_ENABLE_DISABLE);
708 }
709 
718 __STATIC_INLINE bool DL_UART_isPowerEnabled(UART_Regs *uart)
719 {
720  return ((uart->GPRCM.PWREN & UART_PWREN_ENABLE_MASK) ==
721  UART_PWREN_ENABLE_ENABLE);
722 }
723 
729 __STATIC_INLINE void DL_UART_reset(UART_Regs *uart)
730 {
731  uart->GPRCM.RSTCTL =
732  (UART_RSTCTL_KEY_UNLOCK_W | UART_RSTCTL_RESETSTKYCLR_CLR |
733  UART_RSTCTL_RESETASSERT_ASSERT);
734 }
735 
745 __STATIC_INLINE bool DL_UART_isReset(UART_Regs *uart)
746 {
747  return ((uart->GPRCM.STAT & UART_GPRCM_STAT_RESETSTKY_MASK) ==
748  UART_GPRCM_STAT_RESETSTKY_RESET);
749 }
750 
756 __STATIC_INLINE void DL_UART_enable(UART_Regs *uart)
757 {
758  uart->CTL0 |= UART_CTL0_ENABLE_ENABLE;
759 }
760 
772 __STATIC_INLINE bool DL_UART_isEnabled(UART_Regs *uart)
773 {
774  return ((uart->CTL0 & UART_CTL0_ENABLE_MASK) == UART_CTL0_ENABLE_ENABLE);
775 }
776 
782 __STATIC_INLINE void DL_UART_disable(UART_Regs *uart)
783 {
784  uart->CTL0 &= ~(UART_CTL0_ENABLE_MASK);
785 }
786 
795 void DL_UART_setClockConfig(UART_Regs *uart, DL_UART_ClockConfig *config);
796 
805 void DL_UART_getClockConfig(UART_Regs *uart, DL_UART_ClockConfig *config);
806 
829  UART_Regs *uart, uint32_t clockFreq, uint32_t baudRate);
830 
843 __STATIC_INLINE void DL_UART_setOversampling(
844  UART_Regs *uart, DL_UART_OVERSAMPLING_RATE rate)
845 {
846  DL_Common_updateReg(&uart->CTL0, (uint32_t) rate, UART_CTL0_HSE_MASK);
847 }
848 
859 __STATIC_INLINE DL_UART_OVERSAMPLING_RATE DL_UART_getOversampling(
860  UART_Regs *uart)
861 {
862  uint32_t rate = uart->CTL0 & UART_CTL0_HSE_MASK;
863 
864  return (DL_UART_OVERSAMPLING_RATE)(rate);
865 }
866 
880 __STATIC_INLINE void DL_UART_enableLoopbackMode(UART_Regs *uart)
881 {
882  uart->CTL0 |= UART_CTL0_LBE_ENABLE;
883 }
884 
895 __STATIC_INLINE bool DL_UART_isLoopbackModeEnabled(UART_Regs *uart)
896 {
897  return ((uart->CTL0 & UART_CTL0_LBE_MASK) == UART_CTL0_LBE_ENABLE);
898 }
899 
913 __STATIC_INLINE void DL_UART_disableLoopbackMode(UART_Regs *uart)
914 {
915  uart->CTL0 &= ~(UART_CTL0_LBE_MASK);
916 }
917 
934 __STATIC_INLINE void DL_UART_setDirection(
935  UART_Regs *uart, DL_UART_DIRECTION direction)
936 {
937  DL_Common_updateReg(&uart->CTL0, (uint32_t) direction,
938  UART_CTL0_TXE_MASK | UART_CTL0_RXE_MASK);
939 }
940 
950 __STATIC_INLINE DL_UART_DIRECTION DL_UART_getDirection(UART_Regs *uart)
951 {
952  uint32_t direction =
953  uart->CTL0 & (UART_CTL0_TXE_MASK | UART_CTL0_RXE_MASK);
954 
955  return (DL_UART_DIRECTION)(direction);
956 }
957 
983 __STATIC_INLINE void DL_UART_enableMajorityVoting(UART_Regs *uart)
984 {
985  uart->CTL0 |= UART_CTL0_MAJVOTE_ENABLE;
986 }
987 
998 __STATIC_INLINE bool DL_UART_isMajorityVotingEnabled(UART_Regs *uart)
999 {
1000  return ((uart->CTL0 & UART_CTL0_MAJVOTE_MASK) == UART_CTL0_MAJVOTE_ENABLE);
1001 }
1002 
1015 __STATIC_INLINE void DL_UART_disableMajorityVoting(UART_Regs *uart)
1016 {
1017  uart->CTL0 &= ~(UART_CTL0_MAJVOTE_MASK);
1018 }
1019 
1034 __STATIC_INLINE void DL_UART_enableMSBFirst(UART_Regs *uart)
1035 {
1036  uart->CTL0 |= UART_CTL0_MSBFIRST_ENABLE;
1037 }
1038 
1049 __STATIC_INLINE bool DL_UART_isMSBFirstEnabled(UART_Regs *uart)
1050 {
1051  return (
1052  (uart->CTL0 & UART_CTL0_MSBFIRST_MASK) == UART_CTL0_MSBFIRST_ENABLE);
1053 }
1054 
1069 __STATIC_INLINE void DL_UART_disableMSBFirst(UART_Regs *uart)
1070 {
1071  uart->CTL0 &= ~(UART_CTL0_MSBFIRST_MASK);
1072 }
1073 
1090 __STATIC_INLINE void DL_UART_enableTransmitPinManualControl(UART_Regs *uart)
1091 {
1092  uart->CTL0 |= UART_CTL0_TXD_OUT_EN_ENABLE;
1093 }
1094 
1105 __STATIC_INLINE bool DL_UART_isTransmitPinManualControlEnabled(UART_Regs *uart)
1106 {
1107  return ((uart->CTL0 & UART_CTL0_TXD_OUT_EN_MASK) ==
1108  UART_CTL0_TXD_OUT_EN_ENABLE);
1109 }
1110 
1123 __STATIC_INLINE void DL_UART_disableTransmitPinManualControl(UART_Regs *uart)
1124 {
1125  uart->CTL0 &= ~(UART_CTL0_TXD_OUT_EN_MASK);
1126 }
1127 
1150  UART_Regs *uart, DL_UART_TXD_OUT txdOutVal)
1151 {
1152  DL_Common_updateReg(&uart->CTL0,
1153  UART_CTL0_TXD_OUT_EN_ENABLE | (uint32_t) txdOutVal,
1154  UART_CTL0_TXD_OUT_EN_MASK | UART_CTL0_TXD_OUT_MASK);
1155 }
1156 
1166 __STATIC_INLINE DL_UART_TXD_OUT DL_UART_getTransmitPinManualOutput(
1167  UART_Regs *uart)
1168 {
1169  uint32_t txdOutVal = uart->CTL0 & UART_CTL0_TXD_OUT_MASK;
1170 
1171  return (DL_UART_TXD_OUT)(txdOutVal);
1172 }
1173 
1179 __STATIC_INLINE void DL_UART_enableManchesterEncoding(UART_Regs *uart)
1180 {
1181  uart->CTL0 |= UART_CTL0_MENC_ENABLE;
1182 }
1183 
1189 __STATIC_INLINE void DL_UART_disableManchesterEncoding(UART_Regs *uart)
1190 {
1191  uart->CTL0 &= ~(UART_CTL0_MENC_MASK);
1192 }
1193 
1204 __STATIC_INLINE bool DL_UART_isManchesterEncodingEnabled(UART_Regs *uart)
1205 {
1206  return ((uart->CTL0 & UART_CTL0_MENC_MASK) == UART_CTL0_MENC_ENABLE);
1207 }
1208 
1221 __STATIC_INLINE void DL_UART_setCommunicationMode(
1222  UART_Regs *uart, DL_UART_MODE mode)
1223 {
1224  DL_Common_updateReg(&uart->CTL0, (uint32_t) mode, UART_CTL0_MODE_MASK);
1225 }
1226 
1236 __STATIC_INLINE DL_UART_MODE DL_UART_getCommunicationMode(UART_Regs *uart)
1237 {
1238  uint32_t mode = uart->CTL0 & UART_CTL0_MODE_MASK;
1239 
1240  return (DL_UART_MODE)(mode);
1241 }
1242 
1255 __STATIC_INLINE void DL_UART_setFlowControl(
1256  UART_Regs *uart, DL_UART_FLOW_CONTROL config)
1257 {
1258  DL_Common_updateReg(&uart->CTL0, (uint32_t) config,
1259  UART_CTL0_RTSEN_MASK | UART_CTL0_CTSEN_MASK);
1260 }
1261 
1272 __STATIC_INLINE DL_UART_FLOW_CONTROL DL_UART_getFlowControl(UART_Regs *uart)
1273 {
1274  uint32_t config =
1275  uart->CTL0 & (UART_CTL0_RTSEN_MASK | UART_CTL0_CTSEN_MASK);
1276 
1277  return (DL_UART_FLOW_CONTROL)(config);
1278 }
1279 
1301 __STATIC_INLINE void DL_UART_setRTSOutput(UART_Regs *uart, DL_UART_RTS val)
1302 {
1303  DL_Common_updateReg(&uart->CTL0, (uint32_t) val, UART_CTL0_RTS_MASK);
1304 }
1305 
1325 __STATIC_INLINE DL_UART_RTS DL_UART_getRTSOutput(UART_Regs *uart)
1326 {
1327  uint32_t val = uart->CTL0 & UART_CTL0_RTS_MASK;
1328 
1329  return (DL_UART_RTS)(val);
1330 }
1331 
1346 __STATIC_INLINE void DL_UART_enableFIFOs(UART_Regs *uart)
1347 {
1348  uart->CTL0 |= UART_CTL0_FEN_ENABLE;
1349 }
1350 
1364 __STATIC_INLINE void DL_UART_disableFIFOs(UART_Regs *uart)
1365 {
1366  uart->CTL0 &= ~(UART_CTL0_FEN_MASK);
1367 }
1368 
1379 __STATIC_INLINE bool DL_UART_isFIFOsEnabled(UART_Regs *uart)
1380 {
1381  return ((uart->CTL0 & UART_CTL0_FEN_MASK) == UART_CTL0_FEN_ENABLE);
1382 }
1383 
1393 __STATIC_INLINE void DL_UART_enableLINSendBreak(UART_Regs *uart)
1394 {
1395  uart->LCRH |= UART_LCRH_BRK_ENABLE;
1396 }
1397 
1406 __STATIC_INLINE void DL_UART_disableLINSendBreak(UART_Regs *uart)
1407 {
1408  uart->LCRH &= ~(UART_LCRH_BRK_MASK);
1409 }
1410 
1421 __STATIC_INLINE bool DL_UART_isLINSendBreakEnabled(UART_Regs *uart)
1422 {
1423  return ((uart->LCRH & UART_LCRH_BRK_MASK) == UART_LCRH_BRK_ENABLE);
1424 }
1425 
1436 __STATIC_INLINE bool DL_UART_isParityEnabled(UART_Regs *uart)
1437 {
1438  return ((uart->LCRH & UART_LCRH_PEN_MASK) == UART_LCRH_PEN_ENABLE);
1439 }
1440 
1454 __STATIC_INLINE void DL_UART_setParityMode(
1455  UART_Regs *uart, DL_UART_PARITY parity)
1456 {
1457  DL_Common_updateReg(&uart->LCRH, (uint32_t) parity,
1458  (UART_LCRH_PEN_MASK | UART_LCRH_EPS_MASK | UART_LCRH_SPS_MASK));
1459 }
1460 
1471 __STATIC_INLINE DL_UART_PARITY DL_UART_getParityMode(UART_Regs *uart)
1472 {
1473  uint32_t parity = uart->LCRH & (UART_LCRH_PEN_MASK | UART_LCRH_EPS_MASK |
1474  UART_LCRH_SPS_MASK);
1475 
1476  return (DL_UART_PARITY)(parity);
1477 }
1478 
1489 __STATIC_INLINE void DL_UART_setStopBits(
1490  UART_Regs *uart, DL_UART_STOP_BITS numStopBits)
1491 {
1493  &uart->LCRH, (uint32_t) numStopBits, UART_LCRH_STP2_MASK);
1494 }
1495 
1505 __STATIC_INLINE DL_UART_STOP_BITS DL_UART_getStopBits(UART_Regs *uart)
1506 {
1507  uint32_t numStopBits = uart->LCRH & UART_LCRH_STP2_MASK;
1508 
1509  return (DL_UART_STOP_BITS)(numStopBits);
1510 }
1511 
1519 __STATIC_INLINE void DL_UART_setWordLength(
1520  UART_Regs *uart, DL_UART_WORD_LENGTH wordLength)
1521 {
1523  &uart->LCRH, (uint32_t) wordLength, UART_LCRH_WLEN_MASK);
1524 }
1525 
1535 __STATIC_INLINE DL_UART_WORD_LENGTH DL_UART_getWordLength(UART_Regs *uart)
1536 {
1537  uint32_t wordLength = uart->LCRH & UART_LCRH_WLEN_MASK;
1538 
1539  return (DL_UART_WORD_LENGTH)(wordLength);
1540 }
1541 
1550 __STATIC_INLINE void DL_UART_enableSendIdlePattern(UART_Regs *uart)
1551 {
1552  uart->LCRH |= UART_LCRH_SENDIDLE_ENABLE;
1553 }
1554 
1560 __STATIC_INLINE void DL_UART_disableSendIdlePattern(UART_Regs *uart)
1561 {
1562  uart->LCRH &= ~(UART_LCRH_SENDIDLE_MASK);
1563 }
1564 
1575 __STATIC_INLINE bool DL_UART_isSendIdlePatternEnabled(UART_Regs *uart)
1576 {
1577  return (
1578  (uart->LCRH & UART_LCRH_SENDIDLE_MASK) == UART_LCRH_SENDIDLE_ENABLE);
1579 }
1580 
1591 __STATIC_INLINE void DL_UART_setExternalDriverSetup(
1592  UART_Regs *uart, uint32_t val)
1593 {
1594  DL_Common_updateReg(&uart->LCRH, val << UART_LCRH_EXTDIR_SETUP_OFS,
1595  UART_LCRH_EXTDIR_SETUP_MASK);
1596 }
1597 
1608 __STATIC_INLINE uint32_t DL_UART_getExternalDriverSetup(UART_Regs *uart)
1609 {
1610  return ((uart->LCRH &
1611  UART_LCRH_EXTDIR_SETUP_MASK >> UART_LCRH_EXTDIR_SETUP_OFS));
1612 }
1613 
1627 __STATIC_INLINE void DL_UART_setExternalDriverHold(
1628  UART_Regs *uart, uint32_t val)
1629 {
1630  DL_Common_updateReg(&uart->LCRH, val << UART_LCRH_EXTDIR_HOLD_OFS,
1631  UART_LCRH_EXTDIR_HOLD_MASK);
1632 }
1633 
1644 __STATIC_INLINE uint32_t DL_UART_getExternalDriverHold(UART_Regs *uart)
1645 {
1646  return ((
1647  uart->LCRH & UART_LCRH_EXTDIR_HOLD_MASK >> UART_LCRH_EXTDIR_HOLD_OFS));
1648 }
1649 
1669 __STATIC_INLINE bool DL_UART_isBusy(UART_Regs *uart)
1670 {
1671  return ((uart->STAT & UART_STAT_BUSY_MASK) == UART_STAT_BUSY_SET);
1672 }
1673 
1689 __STATIC_INLINE bool DL_UART_isRXFIFOEmpty(UART_Regs *uart)
1690 {
1691  return ((uart->STAT & UART_STAT_RXFE_MASK) == UART_STAT_RXFE_SET);
1692 }
1693 
1710 __STATIC_INLINE bool DL_UART_isRXFIFOFull(UART_Regs *uart)
1711 {
1712  return ((uart->STAT & UART_STAT_RXFF_MASK) == UART_STAT_RXFF_SET);
1713 }
1714 
1730 __STATIC_INLINE bool DL_UART_isTXFIFOEmpty(UART_Regs *uart)
1731 {
1732  return ((uart->STAT & UART_STAT_TXFE_MASK) == UART_STAT_TXFE_SET);
1733 }
1734 
1751 __STATIC_INLINE bool DL_UART_isTXFIFOFull(UART_Regs *uart)
1752 {
1753  return ((uart->STAT & UART_STAT_TXFF_MASK) == UART_STAT_TXFF_SET);
1754 }
1755 
1768 __STATIC_INLINE bool DL_UART_isClearToSend(UART_Regs *uart)
1769 {
1770  return ((uart->STAT & UART_STAT_CTS_MASK) == UART_STAT_CTS_SET);
1771 }
1772 
1789 __STATIC_INLINE bool DL_UART_isIdleModeDetected(UART_Regs *uart)
1790 {
1791  return ((uart->STAT & UART_STAT_IDLE_MASK) == UART_STAT_IDLE_SET);
1792 }
1793 
1810 __STATIC_INLINE void DL_UART_setTXFIFOThreshold(
1811  UART_Regs *uart, DL_UART_TX_FIFO_LEVEL threshold)
1812 {
1814  &uart->IFLS, (uint32_t) threshold, UART_IFLS_TXIFLSEL_MASK);
1815 }
1816 
1826 __STATIC_INLINE DL_UART_TX_FIFO_LEVEL DL_UART_getTXFIFOThreshold(
1827  UART_Regs *uart)
1828 {
1829  uint32_t threshold = uart->IFLS & UART_IFLS_TXIFLSEL_MASK;
1830 
1831  return (DL_UART_TX_FIFO_LEVEL)(threshold);
1832 }
1833 
1846 __STATIC_INLINE void DL_UART_setRXFIFOThreshold(
1847  UART_Regs *uart, DL_UART_RX_FIFO_LEVEL threshold)
1848 {
1850  &uart->IFLS, (uint32_t) threshold, UART_IFLS_RXIFLSEL_MASK);
1851 }
1852 
1862 __STATIC_INLINE DL_UART_RX_FIFO_LEVEL DL_UART_getRXFIFOThreshold(
1863  UART_Regs *uart)
1864 {
1865  uint32_t threshold = uart->IFLS & UART_IFLS_RXIFLSEL_MASK;
1866 
1867  return (DL_UART_RX_FIFO_LEVEL)(threshold);
1868 }
1869 
1881 __STATIC_INLINE void DL_UART_setRXInterruptTimeout(
1882  UART_Regs *uart, uint32_t timeout)
1883 {
1885  &uart->IFLS, timeout << UART_IFLS_RXTOSEL_OFS, UART_IFLS_RXTOSEL_MASK);
1886 }
1887 
1898 __STATIC_INLINE uint32_t DL_UART_getRXInterruptTimeout(UART_Regs *uart)
1899 {
1900  return ((uart->IFLS & UART_IFLS_RXTOSEL_MASK) >> UART_IFLS_RXTOSEL_OFS);
1901 }
1902 
1912 __STATIC_INLINE uint32_t DL_UART_getIntegerBaudRateDivisor(UART_Regs *uart)
1913 {
1914  return (uart->IBRD & UART_IBRD_DIVINT_MASK);
1915 }
1916 
1926 __STATIC_INLINE uint32_t DL_UART_getFractionalBaudRateDivisor(UART_Regs *uart)
1927 {
1928  return (uart->FBRD & UART_FBRD_DIVFRAC_MASK);
1929 }
1930 
1944 __STATIC_INLINE void DL_UART_setBaudRateDivisor(
1945  UART_Regs *uart, uint32_t integerDivisor, uint32_t fractionalDivisor)
1946 {
1947  DL_Common_updateReg(&uart->IBRD, integerDivisor, UART_IBRD_DIVINT_MASK);
1949  &uart->FBRD, fractionalDivisor, UART_FBRD_DIVFRAC_MASK);
1950 
1951  // When updating the baud-rate divisor (UARTIBRD or UARTIFRD),
1952  // the LCRH register must also be written to (any bit in LCRH can
1953  // be written to for updating the baud-rate divisor).
1955  &uart->LCRH, (uart->LCRH & UART_LCRH_BRK_MASK), UART_LCRH_BRK_MASK);
1956 }
1957 
1977 __STATIC_INLINE void DL_UART_setIrDABaudRateDivisor(
1978  UART_Regs *uart, uint32_t integerDivisor, uint32_t fractionalDivisor, DL_UART_CLOCK_DIVIDE2_RATIO clkDivisor2)
1979 {
1980  DL_Common_updateReg(&uart->IBRD, (integerDivisor / ((uint32_t)clkDivisor2 + 1)), UART_IBRD_DIVINT_MASK);
1982  &uart->FBRD, fractionalDivisor, UART_FBRD_DIVFRAC_MASK);
1983 
1984  // When updating the baud-rate divisor (UARTIBRD or UARTIFRD),
1985  // the LCRH register must also be written to (any bit in LCRH can
1986  // be written to for updating the baud-rate divisor).
1988  &uart->LCRH, (uart->LCRH & UART_LCRH_BRK_MASK), UART_LCRH_BRK_MASK);
1989 }
1990 
1991 
2005 __STATIC_INLINE void DL_UART_setDigitalPulseWidth(
2006  UART_Regs *uart, uint32_t pulseWidth)
2007 {
2008  DL_Common_updateReg(&uart->GFCTL, pulseWidth, UART_GFCTL_DGFSEL_MASK);
2009 }
2010 
2024 __STATIC_INLINE uint32_t DL_UART_getDigitalPulseWidth(UART_Regs *uart)
2025 {
2026  return (uart->GFCTL & UART_GFCTL_DGFSEL_MASK);
2027 }
2028 
2047 __STATIC_INLINE void DL_UART_transmitData(UART_Regs *uart, uint8_t data)
2048 {
2049  uart->TXDATA = data;
2050 }
2051 
2066 __STATIC_INLINE uint8_t DL_UART_receiveData(UART_Regs *uart)
2067 {
2068  return ((uint8_t)(uart->RXDATA & UART_RXDATA_DATA_MASK));
2069 }
2070 
2082 __STATIC_INLINE uint32_t DL_UART_getErrorStatus(
2083  UART_Regs *uart, uint32_t errorMask)
2084 {
2085  return (uart->RXDATA & errorMask);
2086 }
2087 
2097 __STATIC_INLINE void DL_UART_setLINCounterValue(
2098  UART_Regs *uart, uint16_t value)
2099 {
2100  DL_Common_updateReg(&uart->LINCNT, value, UART_LINCNT_VALUE_MASK);
2101 }
2102 
2116 __STATIC_INLINE uint16_t DL_UART_getLINCounterValue(UART_Regs *uart)
2117 {
2118  return ((uint16_t)(uart->LINCNT & UART_LINCNT_VALUE_MASK));
2119 }
2120 
2128 __STATIC_INLINE void DL_UART_enableLINCounter(UART_Regs *uart)
2129 {
2130  uart->LINCTL |= UART_LINCTL_CTRENA_ENABLE;
2131 }
2132 
2143 __STATIC_INLINE bool DL_UART_isLINCounterEnabled(UART_Regs *uart)
2144 {
2145  return (
2146  (uart->LINCTL & UART_LINCTL_CTRENA_MASK) == UART_LINCTL_CTRENA_ENABLE);
2147 }
2148 
2156 __STATIC_INLINE void DL_UART_disableLINCounter(UART_Regs *uart)
2157 {
2158  uart->LINCTL &= ~(UART_LINCTL_CTRENA_MASK);
2159 }
2160 
2174  UART_Regs *uart)
2175 {
2176  uart->LINCTL |= UART_LINCTL_ZERONE_ENABLE;
2177 }
2178 
2189 __STATIC_INLINE bool DL_UART_isLINCounterClearOnFallingEdge(UART_Regs *uart)
2190 {
2191  return (
2192  (uart->LINCTL & UART_LINCTL_ZERONE_MASK) == UART_LINCTL_ZERONE_ENABLE);
2193 }
2194 
2201  UART_Regs *uart)
2202 {
2203  uart->LINCTL &= ~(UART_LINCTL_ZERONE_MASK);
2204 }
2205 
2216 __STATIC_INLINE void DL_UART_enableLINCountWhileLow(UART_Regs *uart)
2217 {
2218  uart->LINCTL |= UART_LINCTL_CNTRXLOW_ENABLE;
2219 }
2220 
2231 __STATIC_INLINE bool DL_UART_isLINCountWhileLowEnabled(UART_Regs *uart)
2232 {
2233  return ((uart->LINCTL & UART_LINCTL_CNTRXLOW_MASK) ==
2234  UART_LINCTL_CNTRXLOW_ENABLE);
2235 }
2236 
2244 __STATIC_INLINE void DL_UART_disableLINCountWhileLow(UART_Regs *uart)
2245 {
2246  uart->LINCTL &= ~(UART_LINCTL_CNTRXLOW_MASK);
2247 }
2248 
2261 __STATIC_INLINE void DL_UART_enableLINFallingEdgeCapture(UART_Regs *uart)
2262 {
2263  DL_Common_updateReg(&uart->LINCTL,
2264  UART_LINCTL_LINC0CAP_ENABLE | UART_LINCTL_LINC0_MATCH_DISABLE,
2265  UART_LINCTL_LINC0CAP_MASK | UART_LINCTL_LINC0_MATCH_MASK);
2266 }
2267 
2278 __STATIC_INLINE bool DL_UART_isLINFallingEdgeCaptureEnabled(UART_Regs *uart)
2279 {
2280  return ((uart->LINCTL & UART_LINCTL_LINC0CAP_MASK) ==
2281  UART_LINCTL_LINC0CAP_ENABLE);
2282 }
2283 
2289 __STATIC_INLINE void DL_UART_disableLINFallingEdgeCapture(UART_Regs *uart)
2290 {
2291  uart->LINCTL &= ~(UART_LINCTL_LINC0CAP_MASK);
2292 }
2293 
2303 __STATIC_INLINE void DL_UART_enableLINRisingEdgeCapture(UART_Regs *uart)
2304 {
2305  uart->LINCTL |= UART_LINCTL_LINC1CAP_ENABLE;
2306 }
2307 
2318 __STATIC_INLINE bool DL_UART_isLINRisingEdgeCaptureEnabled(UART_Regs *uart)
2319 {
2320  return ((uart->LINCTL & UART_LINCTL_LINC1CAP_MASK) ==
2321  UART_LINCTL_LINC1CAP_ENABLE);
2322 }
2323 
2329 __STATIC_INLINE void DL_UART_disableLINRisingEdgeCapture(UART_Regs *uart)
2330 {
2331  uart->LINCTL &= ~(UART_LINCTL_LINC1CAP_MASK);
2332 }
2333 
2342 __STATIC_INLINE void DL_UART_enableLINCounterCompareMatch(UART_Regs *uart)
2343 {
2344  DL_Common_updateReg(&uart->LINCTL,
2345  UART_LINCTL_LINC0_MATCH_ENABLE | UART_LINCTL_LINC0CAP_DISABLE,
2346  UART_LINCTL_LINC0CAP_MASK | UART_LINCTL_LINC0_MATCH_MASK);
2347 }
2348 
2358  UART_Regs *uart)
2359 {
2360  DL_Common_updateReg(&uart->LINCTL,
2361  UART_LINCTL_LINC0CAP_ENABLE | UART_LINCTL_LINC1CAP_ENABLE |
2362  UART_LINCTL_ZERONE_ENABLE | UART_LINCTL_CTRENA_ENABLE,
2363  UART_LINCTL_LINC0CAP_MASK | UART_LINCTL_LINC1CAP_MASK |
2364  UART_LINCTL_ZERONE_MASK | UART_LINCTL_CTRENA_MASK);
2365 }
2366 
2375 __STATIC_INLINE void DL_UART_enableLINReceptionCountControl(UART_Regs *uart)
2376 {
2377  DL_Common_updateReg(&uart->LINCTL,
2378  UART_LINCTL_CNTRXLOW_ENABLE | UART_LINCTL_ZERONE_ENABLE |
2379  UART_LINCTL_CTRENA_ENABLE,
2380  UART_LINCTL_CNTRXLOW_MASK | UART_LINCTL_ZERONE_MASK |
2381  UART_LINCTL_CTRENA_MASK);
2382 }
2383 
2394 __STATIC_INLINE bool DL_UART_isLINCounterCompareMatchEnabled(UART_Regs *uart)
2395 {
2396  return ((uart->LINCTL & UART_LINCTL_LINC0_MATCH_MASK) ==
2397  UART_LINCTL_LINC0_MATCH_ENABLE);
2398 }
2399 
2405 __STATIC_INLINE void DL_UART_disableLINCounterCompareMatch(UART_Regs *uart)
2406 {
2407  uart->LINCTL &= ~(UART_LINCTL_LINC0_MATCH_MASK);
2408 }
2409 
2423  UART_Regs *uart, uint16_t value)
2424 {
2425  DL_Common_updateReg(&uart->LINC0, value, UART_LINC0_DATA_MASK);
2426 }
2427 
2447 __STATIC_INLINE uint16_t DL_UART_getLINFallingEdgeCaptureValue(UART_Regs *uart)
2448 {
2449  return ((uint16_t)(uart->LINC0 & UART_LINC0_DATA_MASK));
2450 }
2451 
2466 __STATIC_INLINE uint16_t DL_UART_getLINRisingEdgeCaptureValue(UART_Regs *uart)
2467 {
2468  return ((uint16_t)(uart->LINC1 & UART_LINC1_DATA_MASK));
2469 }
2470 
2476 __STATIC_INLINE void DL_UART_enableIrDAMode(UART_Regs *uart)
2477 {
2478  uart->IRCTL |= UART_IRCTL_IREN_ENABLE;
2479 }
2480 
2491 __STATIC_INLINE bool DL_UART_isIrDAModeEnabled(UART_Regs *uart)
2492 {
2493  return ((uart->IRCTL & UART_IRCTL_IREN_MASK) == UART_IRCTL_IREN_ENABLE);
2494 }
2495 
2501 __STATIC_INLINE void DL_UART_disableIrDAMode(UART_Regs *uart)
2502 {
2503  uart->IRCTL &= ~(UART_IRCTL_IREN_MASK);
2504 }
2505 
2514  UART_Regs *uart, DL_UART_IRDA_CLOCK uartClock)
2515 {
2517  &uart->IRCTL, (uint32_t) uartClock, UART_IRCTL_IRTXCLK_MASK);
2518 }
2519 
2530 __STATIC_INLINE DL_UART_IRDA_CLOCK DL_UART_getIrDATXPulseClockSelect(
2531  UART_Regs *uart)
2532 {
2533  uint32_t uartClock = uart->IRCTL & UART_IRCTL_IRTXCLK_MASK;
2534 
2535  return (DL_UART_IRDA_CLOCK)(uartClock);
2536 }
2537 
2551 void DL_UART_configIrDAMode(UART_Regs *uart, DL_UART_IRDA_POLARITY polarity,
2552  uint32_t pulseLength, DL_UART_IRDA_CLOCK irdaClk);
2553 
2572  UART_Regs *uart, uint32_t pulseLength, DL_UART_IRDA_CLOCK irdaClk);
2573 
2583 __STATIC_INLINE uint32_t DL_UART_getIrDATXPulseLength(UART_Regs *uart)
2584 {
2585  return (uart->IRCTL & UART_IRCTL_IRTXPL_MASK);
2586 }
2587 
2595 __STATIC_INLINE void DL_UART_setIrDARXPulsePolarity(
2596  UART_Regs *uart, DL_UART_IRDA_POLARITY polarity)
2597 {
2599  &uart->IRCTL, (uint32_t) polarity, UART_IRCTL_IRRXPL_MASK);
2600 }
2601 
2611 __STATIC_INLINE DL_UART_IRDA_POLARITY DL_UART_getIrDARXPulsePolarity(
2612  UART_Regs *uart)
2613 {
2614  uint32_t polarity = uart->IRCTL & UART_IRCTL_IRRXPL_MASK;
2615 
2616  return (DL_UART_IRDA_POLARITY)(polarity);
2617 }
2618 
2635 __STATIC_INLINE void DL_UART_setAddressMask(
2636  UART_Regs *uart, uint32_t addressMask)
2637 {
2638  DL_Common_updateReg(&uart->AMASK, addressMask, UART_AMASK_VALUE_MASK);
2639 }
2640 
2661 __STATIC_INLINE uint32_t DL_UART_getAddressMask(UART_Regs *uart)
2662 {
2663  return (uart->AMASK & UART_AMASK_VALUE_MASK);
2664 }
2665 
2679 __STATIC_INLINE void DL_UART_setAddress(UART_Regs *uart, uint32_t address)
2680 {
2681  DL_Common_updateReg(&uart->ADDR, address, UART_ADDR_VALUE_MASK);
2682 }
2683 
2701 __STATIC_INLINE uint32_t DL_UART_getAddress(UART_Regs *uart)
2702 {
2703  return (uart->ADDR & UART_ADDR_VALUE_MASK);
2704 }
2705 
2714 __STATIC_INLINE void DL_UART_enableInterrupt(
2715  UART_Regs *uart, uint32_t interruptMask)
2716 {
2717  uart->CPU_INT.IMASK |= interruptMask;
2718 }
2719 
2728 __STATIC_INLINE void DL_UART_disableInterrupt(
2729  UART_Regs *uart, uint32_t interruptMask)
2730 {
2731  uart->CPU_INT.IMASK &= ~(interruptMask);
2732 }
2733 
2746 __STATIC_INLINE uint32_t DL_UART_getEnabledInterrupts(
2747  UART_Regs *uart, uint32_t interruptMask)
2748 {
2749  return (uart->CPU_INT.IMASK & interruptMask);
2750 }
2751 
2769 __STATIC_INLINE uint32_t DL_UART_getEnabledInterruptStatus(
2770  UART_Regs *uart, uint32_t interruptMask)
2771 {
2772  return (uart->CPU_INT.MIS & interruptMask);
2773 }
2774 
2790 __STATIC_INLINE uint32_t DL_UART_getRawInterruptStatus(
2791  UART_Regs *uart, uint32_t interruptMask)
2792 {
2793  return (uart->CPU_INT.RIS & interruptMask);
2794 }
2795 
2809 __STATIC_INLINE DL_UART_IIDX DL_UART_getPendingInterrupt(UART_Regs *uart)
2810 {
2811  return (DL_UART_IIDX)(uart->CPU_INT.IIDX);
2812 }
2813 
2822 __STATIC_INLINE void DL_UART_clearInterruptStatus(
2823  UART_Regs *uart, uint32_t interruptMask)
2824 {
2825  uart->CPU_INT.ICLR = interruptMask;
2826 }
2827 
2845 __STATIC_INLINE void DL_UART_changeConfig(UART_Regs *uart)
2846 {
2847  DL_UART_disable(uart);
2848  while (DL_UART_isBusy(uart)) {
2849  ;
2850  }
2851  DL_UART_disableFIFOs(uart);
2852 }
2853 
2859 __STATIC_INLINE void DL_UART_enableAnalogGlitchFilter(UART_Regs *uart)
2860 {
2861  uart->GFCTL |= UART_GFCTL_AGFEN_ENABLE;
2862 }
2863 
2869 __STATIC_INLINE void DL_UART_disableAnalogGlitchFilter(UART_Regs *uart)
2870 {
2871  uart->GFCTL &= ~(UART_GFCTL_AGFEN_MASK);
2872 }
2873 
2882 __STATIC_INLINE bool DL_UART_isAnalogGlitchFilterEnabled(UART_Regs *uart)
2883 {
2884  return ((uart->GFCTL & UART_GFCTL_AGFEN_MASK) == UART_GFCTL_AGFEN_ENABLE);
2885 }
2886 
2895 __STATIC_INLINE void DL_UART_enableGlitchFilterChaining(UART_Regs *uart)
2896 {
2897  uart->GFCTL |= UART_GFCTL_CHAIN_ENABLED;
2898 }
2899 
2908 __STATIC_INLINE void DL_UART_disableGlitchFilterChaining(UART_Regs *uart)
2909 {
2910  uart->GFCTL &= ~(UART_GFCTL_CHAIN_MASK);
2911 }
2912 
2921 __STATIC_INLINE bool DL_UART_isGlitchFilterChainingEnabled(UART_Regs *uart)
2922 {
2923  return ((uart->GFCTL & UART_GFCTL_CHAIN_MASK) == UART_GFCTL_CHAIN_ENABLED);
2924 }
2925 
2938 __STATIC_INLINE void DL_UART_setAnalogPulseWidth(
2939  UART_Regs *uart, DL_UART_PULSE_WIDTH pulseWidth)
2940 {
2942  &uart->GFCTL, (uint32_t) pulseWidth, UART_GFCTL_AGFSEL_MASK);
2943 }
2944 
2960 __STATIC_INLINE DL_UART_PULSE_WIDTH DL_UART_getAnalogPulseWidth(
2961  UART_Regs *uart)
2962 {
2963  uint32_t pulseWidth = uart->GFCTL & UART_GFCTL_AGFSEL_MASK;
2964 
2965  return (DL_UART_PULSE_WIDTH)(pulseWidth);
2966 }
2967 
2983 void DL_UART_transmitDataBlocking(UART_Regs *uart, uint8_t data);
2984 
3001 uint8_t DL_UART_receiveDataBlocking(UART_Regs *uart);
3002 
3023 bool DL_UART_transmitDataCheck(UART_Regs *uart, uint8_t data);
3024 
3045 bool DL_UART_receiveDataCheck(UART_Regs *uart, uint8_t *buffer);
3046 
3056 uint32_t DL_UART_drainRXFIFO(
3057  UART_Regs *uart, uint8_t *buffer, uint32_t maxCount);
3058 
3071 uint32_t DL_UART_fillTXFIFO(UART_Regs *uart, uint8_t *buffer, uint32_t count);
3072 
3088 __STATIC_INLINE void DL_UART_enableDMAReceiveEvent(
3089  UART_Regs *uart, uint32_t interrupt)
3090 {
3091  uart->DMA_TRIG_RX.IMASK = interrupt;
3092 }
3093 
3107 __STATIC_INLINE void DL_UART_enableDMATransmitEvent(UART_Regs *uart)
3108 {
3109  uart->DMA_TRIG_TX.IMASK = UART_DMA_TRIG_TX_IMASK_TXINT_SET;
3110 }
3111 
3125 __STATIC_INLINE void DL_UART_disableDMAReceiveEvent(
3126  UART_Regs *uart, uint32_t interrupt)
3127 {
3128  uart->DMA_TRIG_RX.IMASK &= ~(interrupt);
3129 }
3130 
3144 __STATIC_INLINE void DL_UART_disableDMATransmitEvent(UART_Regs *uart)
3145 {
3146  uart->DMA_TRIG_TX.IMASK = UART_DMA_TRIG_TX_IMASK_TXINT_CLR;
3147 }
3148 
3164 __STATIC_INLINE uint32_t DL_UART_getEnabledDMAReceiveEvent(
3165  UART_Regs *uart, uint32_t interruptMask)
3166 {
3167  return (uart->DMA_TRIG_RX.IMASK & interruptMask);
3168 }
3169 
3183 __STATIC_INLINE uint32_t DL_UART_getEnabledDMATransmitEvent(UART_Regs *uart)
3184 {
3185  return (uart->DMA_TRIG_TX.IMASK & UART_DMA_TRIG_TX_IMASK_TXINT_MASK);
3186 }
3187 
3208  UART_Regs *uart, uint32_t interruptMask)
3209 {
3210  return (uart->DMA_TRIG_RX.MIS & interruptMask);
3211 }
3212 
3231  UART_Regs *uart)
3232 {
3233  return (uart->DMA_TRIG_TX.MIS & UART_DMA_TRIG_TX_MIS_TXINT_MASK);
3234 }
3235 
3253 __STATIC_INLINE uint32_t DL_UART_getRawDMAReceiveEventStatus(
3254  UART_Regs *uart, uint32_t interruptMask)
3255 {
3256  return (uart->DMA_TRIG_RX.RIS & interruptMask);
3257 }
3258 
3274 __STATIC_INLINE uint32_t DL_UART_getRawDMATransmitEventStatus(UART_Regs *uart)
3275 {
3276  return (uart->DMA_TRIG_TX.RIS & UART_DMA_TRIG_TX_RIS_TXINT_MASK);
3277 }
3278 
3295 __STATIC_INLINE DL_UART_DMA_IIDX_RX DL_UART_getPendingDMAReceiveEvent(
3296  UART_Regs *uart)
3297 {
3298  return (DL_UART_DMA_IIDX_RX)(uart->DMA_TRIG_RX.IIDX);
3299 }
3300 
3317 __STATIC_INLINE DL_UART_DMA_IIDX_TX DL_UART_getPendingDMATransmitEvent(
3318  UART_Regs *uart)
3319 {
3320  return (DL_UART_DMA_IIDX_TX)(uart->DMA_TRIG_TX.IIDX);
3321 }
3322 
3335  UART_Regs *uart, uint32_t interruptMask)
3336 {
3337  uart->DMA_TRIG_RX.ICLR = interruptMask;
3338 }
3339 
3350 __STATIC_INLINE void DL_UART_clearDMATransmitEventStatus(UART_Regs *uart)
3351 {
3352  uart->DMA_TRIG_TX.ICLR = UART_DMA_TRIG_TX_ICLR_TXINT_CLR;
3353 }
3354 
3364 __STATIC_INLINE void DL_UART_setClockDivider2(
3365  UART_Regs *uart, DL_UART_CLOCK_DIVIDE2_RATIO ratio)
3366 {
3367  uart->CLKDIV2 = (uint32_t) ratio;
3368 }
3369 
3383 __STATIC_INLINE DL_UART_CLOCK_DIVIDE2_RATIO DL_UART_getClockDivider2(
3384  UART_Regs *uart)
3385 {
3386  uint32_t ratio = uart->CLKDIV2;
3387  return (DL_UART_CLOCK_DIVIDE2_RATIO) ratio;
3388 }
3389 #ifdef __MSPM0_HAS_UART_MAIN__
3390 
3408  UART_Regs *uart, DL_UART_Main_backupConfig *ptr);
3409 
3427  UART_Regs *uart, DL_UART_Main_backupConfig *ptr);
3428 
3429 #endif /* __MSPM0_HAS_UART_MAIN__ */
3430 
3431 #ifdef __MSPM0_HAS_UART_EXTD__
3432 
3451  UART_Regs *uart, DL_UART_Extend_backupConfig *ptr);
3452 
3471  UART_Regs *uart, DL_UART_Extend_backupConfig *ptr);
3472 
3473 #endif /* __MSPM0_HAS_UART_EXTD__ */
3474 
3475 #ifdef __cplusplus
3476 }
3477 #endif
3478 
3479 #endif /* __MSPM0_HAS_UART_MAIN__ || __MSPM0_HAS_UART_EXTD__ */
3480 
3481 #else
3482 #warning \
3483  "TI highly recommends accessing uart with dl_uart_main, dl_uart_extend.h only."
3484 #endif /* ti_dl_dl_uart_main__include ti_dl_dl_uart_extend__include */
3485 
3486 #endif /* ti_dl_dl_uart__include */
3487 
Definition: dl_uart.h:452
DL_UART_CLOCK clockSel
Definition: dl_uart.h:531
__STATIC_INLINE void DL_UART_disable(UART_Regs *uart)
Disable the UART peripheral.
Definition: dl_uart.h:782
__STATIC_INLINE uint32_t DL_UART_getExternalDriverHold(UART_Regs *uart)
Get the external driver setup hold.
Definition: dl_uart.h:1644
bool DL_UART_Extend_restoreConfiguration(UART_Regs *uart, DL_UART_Extend_backupConfig *ptr)
Restore UART Extend configuration after leaving a power loss state.
bool DL_UART_receiveDataCheck(UART_Regs *uart, uint8_t *buffer)
Checks the RX FIFO before trying to transmit data.
__STATIC_INLINE bool DL_UART_isRXFIFOEmpty(UART_Regs *uart)
Checks if the RX FIFO is empty.
Definition: dl_uart.h:1689
__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 void DL_UART_enableMSBFirst(UART_Regs *uart)
Enable most significant bit (MSB) first.
Definition: dl_uart.h:1034
__STATIC_INLINE DL_UART_CLOCK_DIVIDE2_RATIO DL_UART_getClockDivider2(UART_Regs *uart)
Gets the value of CLKDIV2.
Definition: dl_uart.h:3383
Definition: dl_uart.h:194
bool backupRdy
Definition: dl_uart.h:673
Definition: dl_uart.h:417
__STATIC_INLINE uint32_t DL_UART_getRawDMAReceiveEventStatus(UART_Regs *uart, uint32_t interruptMask)
Check interrupt flag of any UART interrupt for DMA receive event.
Definition: dl_uart.h:3253
Definition: dl_uart.h:204
__STATIC_INLINE DL_UART_IRDA_POLARITY DL_UART_getIrDARXPulsePolarity(UART_Regs *uart)
Get the IrDA receive input UCAxRXD polarity.
Definition: dl_uart.h:2611
Definition: dl_uart.h:192
Definition: dl_uart.h:361
__STATIC_INLINE void DL_UART_enablePower(UART_Regs *uart)
Enables power on UART module.
Definition: dl_uart.h:695
uint32_t clockSel
Definition: dl_uart.h:616
__STATIC_INLINE uint32_t DL_UART_getEnabledDMAReceiveEvent(UART_Regs *uart, uint32_t interruptMask)
Check which UART interrupt for DMA receive events is enabled.
Definition: dl_uart.h:3164
__STATIC_INLINE bool DL_UART_isPowerEnabled(UART_Regs *uart)
Returns if power on uart module.
Definition: dl_uart.h:718
__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:2938
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:3144
__STATIC_INLINE void DL_UART_disableSendIdlePattern(UART_Regs *uart)
Disable send idle pattern.
Definition: dl_uart.h:1560
__STATIC_INLINE void DL_UART_enableAnalogGlitchFilter(UART_Regs *uart)
Enable the analog glitch filter on the RX input.
Definition: dl_uart.h:2859
__STATIC_INLINE uint8_t DL_UART_receiveData(UART_Regs *uart)
Reads data from the RX FIFO.
Definition: dl_uart.h:2066
__STATIC_INLINE void DL_UART_disableLINCountWhileLow(UART_Regs *uart)
Disable LIN counter increments while RXD signal is low.
Definition: dl_uart.h:2244
Definition: dl_uart.h:477
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:2329
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:2216
DL_UART_FLOW_CONTROL flowControl
Definition: dl_uart.h:513
__STATIC_INLINE void DL_UART_enableIrDAMode(UART_Regs *uart)
Enable the IrDA encoder/decoder.
Definition: dl_uart.h:2476
__STATIC_INLINE uint32_t DL_UART_getEnabledDMATransmitEventStatus(UART_Regs *uart)
Check interrupt flag of enabled UART interrupt for DMA transmit event.
Definition: dl_uart.h:3230
Definition: dl_uart.h:327
Definition: dl_uart.h:442
Definition: dl_uart.h:471
__STATIC_INLINE void DL_UART_setOversampling(UART_Regs *uart, DL_UART_OVERSAMPLING_RATE rate)
Set the oversampling rate.
Definition: dl_uart.h:843
uint32_t ibrd
Definition: dl_uart.h:565
Definition: dl_uart.h:357
__STATIC_INLINE bool DL_UART_isTXFIFOEmpty(UART_Regs *uart)
Checks if the TX FIFO is empty.
Definition: dl_uart.h:1730
Definition: dl_uart.h:303
Definition: dl_uart.h:367
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:2869
__STATIC_INLINE void DL_UART_setExternalDriverHold(UART_Regs *uart, uint32_t val)
Set external driver setup hold.
Definition: dl_uart.h:1627
__STATIC_INLINE bool DL_UART_isIdleModeDetected(UART_Regs *uart)
Checks if Idle mode has been detected.
Definition: dl_uart.h:1789
__STATIC_INLINE uint32_t DL_UART_getEnabledInterruptStatus(UART_Regs *uart, uint32_t interruptMask)
Check interrupt flag of enabled UART interrupts.
Definition: dl_uart.h:2769
Definition: dl_uart.h:285
__STATIC_INLINE void DL_UART_enable(UART_Regs *uart)
Enable the UART peripheral.
Definition: dl_uart.h:756
Definition: dl_uart.h:315
Definition: dl_uart.h:196
uint32_t controlWord
Definition: dl_uart.h:613
DL_UART_FLOW_CONTROL
Definition: dl_uart.h:375
__STATIC_INLINE uint32_t DL_UART_getFractionalBaudRateDivisor(UART_Regs *uart)
Get Fractional Baud-Rate Divisor.
Definition: dl_uart.h:1926
__STATIC_INLINE bool DL_UART_isMajorityVotingEnabled(UART_Regs *uart)
Check if majority voting is enabled.
Definition: dl_uart.h:998
__STATIC_INLINE bool DL_UART_isLINRisingEdgeCaptureEnabled(UART_Regs *uart)
Check status of capture of LIN counter on a rising edge.
Definition: dl_uart.h:2318
__STATIC_INLINE void DL_UART_setBaudRateDivisor(UART_Regs *uart, uint32_t integerDivisor, uint32_t fractionalDivisor)
Set the baud rate divisor.
Definition: dl_uart.h:1944
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:2405
DL_UART_PARITY parity
Definition: dl_uart.h:516
Definition: dl_uart.h:497
__STATIC_INLINE bool DL_UART_isClearToSend(UART_Regs *uart)
Checks if UART is clear to send.
Definition: dl_uart.h:1768
uint32_t divideRatio
Definition: dl_uart.h:557
__STATIC_INLINE DL_UART_TX_FIFO_LEVEL DL_UART_getTXFIFOThreshold(UART_Regs *uart)
Get the TX FIFO interrupt threshold level.
Definition: dl_uart.h:1826
Definition: dl_uart.h:381
__STATIC_INLINE bool DL_UART_isTransmitPinManualControlEnabled(UART_Regs *uart)
Check if control of the TXD pin is enabled.
Definition: dl_uart.h:1105
Definition: dl_uart.h:475
__STATIC_INLINE void DL_UART_clearDMATransmitEventStatus(UART_Regs *uart)
Clear pending UART interrupt for DMA transmit event.
Definition: dl_uart.h:3350
__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:3088
DL_UART_DMA_IIDX_RX
Definition: dl_uart.h:224
__STATIC_INLINE DL_UART_MODE DL_UART_getCommunicationMode(UART_Regs *uart)
Get the communication mode/protocol being used.
Definition: dl_uart.h:1236
void DL_UART_transmitDataBlocking(UART_Regs *uart, uint8_t data)
Blocks to ensure transmit is ready before sending data.
__STATIC_INLINE bool DL_UART_isLINSendBreakEnabled(UART_Regs *uart)
Check if send break is enabled.
Definition: dl_uart.h:1421
Definition: dl_uart.h:331
__STATIC_INLINE void DL_UART_setParityMode(UART_Regs *uart, DL_UART_PARITY parity)
Set the parity mode.
Definition: dl_uart.h:1454
uint32_t interruptFifoLevelSelectWord
Definition: dl_uart.h:562
Definition: dl_uart.h:450
Definition: dl_uart.h:485
__STATIC_INLINE void DL_UART_enableLINCounterCompareMatch(UART_Regs *uart)
Enable LIN counter compare match mode.
Definition: dl_uart.h:2342
__STATIC_INLINE uint16_t DL_UART_getLINCounterValue(UART_Regs *uart)
Get the LIN counter value.
Definition: dl_uart.h:2116
__STATIC_INLINE DL_UART_STOP_BITS DL_UART_getStopBits(UART_Regs *uart)
Get the number of stop bits.
Definition: dl_uart.h:1505
uint32_t divideRatio
Definition: dl_uart.h:619
__STATIC_INLINE uint32_t DL_UART_getIrDATXPulseLength(UART_Regs *uart)
Get the IrDA transmit pulse length.
Definition: dl_uart.h:2583
Definition: dl_uart.h:463
Definition: dl_uart.h:329
DL_UART_WORD_LENGTH
Definition: dl_uart.h:325
__STATIC_INLINE void DL_UART_enableLoopbackMode(UART_Regs *uart)
Enable loopback mode.
Definition: dl_uart.h:880
__STATIC_INLINE void DL_UART_enableMajorityVoting(UART_Regs *uart)
Enable majority voting control.
Definition: dl_uart.h:983
uint8_t DL_UART_receiveDataBlocking(UART_Regs *uart)
Blocks to ensure receive is ready before reading data.
DL_UART_TX_FIFO_LEVEL
Definition: dl_uart.h:411
DL_UART_IRDA_CLOCK
Definition: dl_uart.h:440
Definition: dl_uart.h:391
__STATIC_INLINE void DL_UART_setRTSOutput(UART_Regs *uart, DL_UART_RTS val)
Set the request to send output signal.
Definition: dl_uart.h:1301
Definition: dl_uart.h:421
DriverLib Common APIs.
Definition: dl_uart.h:413
__STATIC_INLINE void DL_UART_enableDMATransmitEvent(UART_Regs *uart)
Enable UART interrupt for triggering the DMA transmit event.
Definition: dl_uart.h:3107
uint32_t glitchFilterControlWord
Definition: dl_uart.h:579
Definition: dl_uart.h:345
__STATIC_INLINE uint32_t DL_UART_getRawInterruptStatus(UART_Regs *uart, uint32_t interruptMask)
Check interrupt flag of any UART interrupt.
Definition: dl_uart.h:2790
__STATIC_INLINE void DL_UART_enableLINReceptionCountControl(UART_Regs *uart)
Setup LIN counter control for LIN reception.
Definition: dl_uart.h:2375
Definition: dl_uart.h:432
uint32_t DL_UART_fillTXFIFO(UART_Regs *uart, uint8_t *buffer, uint32_t count)
Fill the TX FIFO until full using 8 bit access.
__STATIC_INLINE uint32_t DL_UART_getEnabledDMATransmitEvent(UART_Regs *uart)
Check if UART interrupt for DMA transmit event is enabled.
Definition: dl_uart.h:3183
Definition: dl_uart.h:383
Definition: dl_uart.h:483
uint32_t ibrd
Definition: dl_uart.h:633
Definition: dl_uart.h:200
__STATIC_INLINE bool DL_UART_isAnalogGlitchFilterEnabled(UART_Regs *uart)
Returns if analog glitch filter is enabled.
Definition: dl_uart.h:2882
__STATIC_INLINE uint32_t DL_UART_getRawDMATransmitEventStatus(UART_Regs *uart)
Check interrupt flag of any UART interrupt for DMA transmit event.
Definition: dl_uart.h:3274
uint32_t interruptMask0
Definition: dl_uart.h:583
__STATIC_INLINE void DL_UART_disableTransmitPinManualControl(UART_Regs *uart)
Disable control of the TXD pin.
Definition: dl_uart.h:1123
Definition: dl_uart.h:333
__STATIC_INLINE uint32_t DL_UART_getEnabledInterrupts(UART_Regs *uart, uint32_t interruptMask)
Check which UART interrupts are enabled.
Definition: dl_uart.h:2746
__STATIC_INLINE DL_UART_RX_FIFO_LEVEL DL_UART_getRXFIFOThreshold(UART_Regs *uart)
Get the RX FIFO interrupt threshold level.
Definition: dl_uart.h:1862
Definition: dl_uart.h:220
__STATIC_INLINE void DL_UART_disableMSBFirst(UART_Regs *uart)
Disable most significant bit (MSB) first.
Definition: dl_uart.h:1069
uint32_t linControlWord
Definition: dl_uart.h:646
__STATIC_INLINE void DL_UART_enableLINRisingEdgeCapture(UART_Regs *uart)
Enable capture of the LIN counter on a rising edge.
Definition: dl_uart.h:2303
__STATIC_INLINE uint32_t DL_UART_getRXInterruptTimeout(UART_Regs *uart)
Get the RX interrupt timeout.
Definition: dl_uart.h:1898
__STATIC_INLINE DL_UART_DIRECTION DL_UART_getDirection(UART_Regs *uart)
Get the direction of the UART communication.
Definition: dl_uart.h:950
DL_UART_MODE
Definition: dl_uart.h:337
__STATIC_INLINE uint32_t DL_UART_getEnabledDMAReceiveEventStatus(UART_Regs *uart, uint32_t interruptMask)
Check interrupt flag of enabled UART interrupt for DMA receive event.
Definition: dl_uart.h:3207
DL_UART_DMA_IIDX_TX
Definition: dl_uart.h:232
DL_UART_CLOCK_DIVIDE_RATIO divideRatio
Definition: dl_uart.h:534
__STATIC_INLINE bool DL_UART_isFIFOsEnabled(UART_Regs *uart)
Check if FIFOs are enabled.
Definition: dl_uart.h:1379
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:1591
Definition: dl_uart.h:339
__STATIC_INLINE bool DL_UART_isParityEnabled(UART_Regs *uart)
Check if parity is enabled.
Definition: dl_uart.h:1436
Configuration structure to backup UART Main peripheral state before going to STOP/STANDBY mode...
Definition: dl_uart.h:546
__STATIC_INLINE void DL_UART_enableSendIdlePattern(UART_Regs *uart)
Send idle pattern.
Definition: dl_uart.h:1550
__STATIC_INLINE bool DL_UART_isReset(UART_Regs *uart)
Returns if uart peripheral was reset.
Definition: dl_uart.h:745
Definition: dl_uart.h:399
__STATIC_INLINE DL_UART_DMA_IIDX_RX DL_UART_getPendingDMAReceiveEvent(UART_Regs *uart)
Get highest priority pending UART interrupt for DMA receive event.
Definition: dl_uart.h:3295
DL_UART_PULSE_WIDTH
Definition: dl_uart.h:283
Definition: dl_uart.h:212
__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:2513
__STATIC_INLINE bool DL_UART_isSendIdlePatternEnabled(UART_Regs *uart)
Check if send idle pattern is enabled.
Definition: dl_uart.h:1575
__STATIC_INLINE void DL_UART_enableInterrupt(UART_Regs *uart, uint32_t interruptMask)
Enable UART interrupts.
Definition: dl_uart.h:2714
__STATIC_INLINE void DL_UART_setAddress(UART_Regs *uart, uint32_t address)
Set the address.
Definition: dl_uart.h:2679
Definition: dl_uart.h:184
__STATIC_INLINE uint16_t DL_UART_getLINFallingEdgeCaptureValue(UART_Regs *uart)
Get the LINC0 counter value.
Definition: dl_uart.h:2447
uint32_t fbrd
Definition: dl_uart.h:636
__STATIC_INLINE bool DL_UART_isLINCounterEnabled(UART_Regs *uart)
Check if the LIN counter is enabled.
Definition: dl_uart.h:2143
__STATIC_INLINE void DL_UART_clearDMAReceiveEventStatus(UART_Regs *uart, uint32_t interruptMask)
Clear pending UART interrupts for DMA receive event.
Definition: dl_uart.h:3334
Definition: dl_uart.h:428
Definition: dl_uart.h:436
DL_UART_RX_FIFO_LEVEL
Definition: dl_uart.h:425
__STATIC_INLINE void DL_UART_enableLINCounter(UART_Regs *uart)
Enable the LIN counter.
Definition: dl_uart.h:2128
Configuration struct for DL_UART_setClockConfig.
Definition: dl_uart.h:529
__STATIC_INLINE void DL_UART_enableLINFallingEdgeCapture(UART_Regs *uart)
Enable capture of the LIN counter on a falling edge.
Definition: dl_uart.h:2261
Definition: dl_uart.h:379
__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:2595
__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:3364
DL_UART_PARITY
Definition: dl_uart.h:307
DL_UART_TXD_OUT
Definition: dl_uart.h:403
DL_UART_CLOCK_DIVIDE_RATIO
Definition: dl_uart.h:461
uint32_t DL_UART_drainRXFIFO(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:190
Configuration struct for DL_UART_init.
Definition: dl_uart.h:505
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:657
__STATIC_INLINE uint32_t DL_UART_getErrorStatus(UART_Regs *uart, uint32_t errorMask)
Gets the status of the error flags of the received data.
Definition: dl_uart.h:2082
Definition: dl_uart.h:487
Definition: dl_uart.h:321
__STATIC_INLINE uint32_t DL_UART_getIntegerBaudRateDivisor(UART_Regs *uart)
Get Integer Baud-Rate Divisor.
Definition: dl_uart.h:1912
DL_UART_STOP_BITS
Definition: dl_uart.h:395
Definition: dl_uart.h:415
DL_UART_CLOCK
Definition: dl_uart.h:365
Definition: dl_uart.h:430
bool DL_UART_Main_saveConfiguration(UART_Regs *uart, DL_UART_Main_backupConfig *ptr)
Save UART Main configuration before entering a power loss state.
Definition: dl_uart.h:343
Definition: dl_uart.h:287
__STATIC_INLINE bool DL_UART_isMSBFirstEnabled(UART_Regs *uart)
Check if most significant bit (MSB) first is enabled.
Definition: dl_uart.h:1049
Definition: dl_uart.h:465
Definition: dl_uart.h:491
__STATIC_INLINE void DL_UART_disableLINFallingEdgeCapture(UART_Regs *uart)
Disable capture of LIN counter on a falling edge.
Definition: dl_uart.h:2289
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:729
uint32_t controlWord
Definition: dl_uart.h:551
__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:3125
DL_UART_STOP_BITS stopBits
Definition: dl_uart.h:522
__STATIC_INLINE bool DL_UART_isBusy(UART_Regs *uart)
Checks if the UART is busy.
Definition: dl_uart.h:1669
__STATIC_INLINE bool DL_UART_isTXFIFOFull(UART_Regs *uart)
Checks if the TX FIFO is full.
Definition: dl_uart.h:1751
__STATIC_INLINE bool DL_UART_isGlitchFilterChainingEnabled(UART_Regs *uart)
Returns if glitch filter chaining enabled.
Definition: dl_uart.h:2921
Definition: dl_uart.h:226
Definition: dl_uart.h:434
__STATIC_INLINE void DL_UART_disableMajorityVoting(UART_Regs *uart)
Disable majority voting control.
Definition: dl_uart.h:1015
__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:1149
Definition: dl_uart.h:444
Definition: dl_uart.h:299
__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:1846
uint32_t interruptMask0
Definition: dl_uart.h:661
__STATIC_INLINE void DL_UART_disableFIFOs(UART_Regs *uart)
Disable FIFOs.
Definition: dl_uart.h:1364
__STATIC_INLINE DL_UART_DMA_IIDX_TX DL_UART_getPendingDMATransmitEvent(UART_Regs *uart)
Get highest priority pending UART interrupt for DMA transmit event.
Definition: dl_uart.h:3317
Configuration structure to backup UART Extend peripheral state before going to STOP/STANDBY mode...
Definition: dl_uart.h:608
__STATIC_INLINE void DL_UART_enableFIFOs(UART_Regs *uart)
Enable FIFOs.
Definition: dl_uart.h:1346
Definition: dl_uart.h:397
__STATIC_INLINE void DL_UART_disableLINSendBreak(UART_Regs *uart)
Disable send break.
Definition: dl_uart.h:1406
__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:2005
__STATIC_INLINE bool DL_UART_isIrDAModeEnabled(UART_Regs *uart)
Check if the IrDA encoder/decoder is enabled.
Definition: dl_uart.h:2491
Definition: dl_uart.h:469
DL_UART_IRDA_POLARITY
Definition: dl_uart.h:448
__STATIC_INLINE DL_UART_PULSE_WIDTH DL_UART_getAnalogPulseWidth(UART_Regs *uart)
Get the pulse width select for the glitch suppresion.
Definition: dl_uart.h:2960
__STATIC_INLINE void DL_UART_disableManchesterEncoding(UART_Regs *uart)
Disable Manchester encoding.
Definition: dl_uart.h:1189
DL_UART_CLOCK_DIVIDE2_RATIO
Definition: dl_uart.h:481
__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:2422
Definition: dl_uart.h:347
Definition: dl_uart.h:359
__STATIC_INLINE void DL_UART_setRXInterruptTimeout(UART_Regs *uart, uint32_t timeout)
Set the RX interrupt timeout.
Definition: dl_uart.h:1881
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:934
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:1977
__STATIC_INLINE void DL_UART_setCommunicationMode(UART_Regs *uart, DL_UART_MODE mode)
Set the communication mode/protocol to use.
Definition: dl_uart.h:1221
Definition: dl_uart.h:355
__STATIC_INLINE void DL_UART_disableLoopbackMode(UART_Regs *uart)
Disable loopback mode.
Definition: dl_uart.h:913
uint32_t interruptMask1
Definition: dl_uart.h:665
__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:2173
uint32_t interruptMask2
Definition: dl_uart.h:669
__STATIC_INLINE void DL_UART_setLINCounterValue(UART_Regs *uart, uint16_t value)
Set the LIN counter value.
Definition: dl_uart.h:2097
uint32_t glitchFilterControlWord
Definition: dl_uart.h:641
Definition: dl_uart.h:405
Definition: dl_uart.h:349
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:2501
Definition: dl_uart.h:341
void DL_UART_init(UART_Regs *uart, DL_UART_Config *config)
Initialize the UART peripheral.
uint32_t clockSel
Definition: dl_uart.h:554
__STATIC_INLINE void DL_UART_enableGlitchFilterChaining(UART_Regs *uart)
Enable analog and digital noise glitch filter chaining.
Definition: dl_uart.h:2895
DL_UART_DIRECTION
Definition: dl_uart.h:353
__STATIC_INLINE DL_UART_IRDA_CLOCK DL_UART_getIrDATXPulseClockSelect(UART_Regs *uart)
Get the IrDA transmit pulse clock select.
Definition: dl_uart.h:2530
uint32_t addressMask
Definition: dl_uart.h:654
uint32_t interruptMask2
Definition: dl_uart.h:591
Definition: dl_uart.h:311
DL_UART_OVERSAMPLING_RATE
Definition: dl_uart.h:295
__STATIC_INLINE DL_UART_WORD_LENGTH DL_UART_getWordLength(UART_Regs *uart)
Get the word length.
Definition: dl_uart.h:1535
__STATIC_INLINE void DL_UART_setWordLength(UART_Regs *uart, DL_UART_WORD_LENGTH wordLength)
Set the word length.
Definition: dl_uart.h:1519
uint32_t irdaControlWord
Definition: dl_uart.h:651
Definition: dl_uart.h:489
__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:2635
__STATIC_INLINE void DL_UART_changeConfig(UART_Regs *uart)
Prepares the UART to change the configuration.
Definition: dl_uart.h:2845
__STATIC_INLINE void DL_UART_disableLINCounterClearOnFallingEdge(UART_Regs *uart)
Disable LIN counting on falling edge of RXD.
Definition: dl_uart.h:2200
uint32_t lineControlRegisterWord
Definition: dl_uart.h:625
__STATIC_INLINE DL_UART_FLOW_CONTROL DL_UART_getFlowControl(UART_Regs *uart)
Check the flow control configuration.
Definition: dl_uart.h:1272
uint32_t interruptMask1
Definition: dl_uart.h:587
uint32_t lineControlRegisterWord
Definition: dl_uart.h:574
__STATIC_INLINE uint32_t DL_UART_getExternalDriverSetup(UART_Regs *uart)
Get the external driver setup value.
Definition: dl_uart.h:1608
bool DL_UART_transmitDataCheck(UART_Regs *uart, uint8_t data)
Checks the TX FIFO before trying to transmit data.
Definition: dl_uart.h:371
__STATIC_INLINE void DL_UART_disablePower(UART_Regs *uart)
Disables power on uart module.
Definition: dl_uart.h:705
DL_UART_DIRECTION direction
Definition: dl_uart.h:510
__STATIC_INLINE DL_UART_RTS DL_UART_getRTSOutput(UART_Regs *uart)
Get the request to send output signal.
Definition: dl_uart.h:1325
DL_UART_MODE mode
Definition: dl_uart.h:507
uint32_t interruptFifoLevelSelectWord
Definition: dl_uart.h:630
__STATIC_INLINE bool DL_UART_isEnabled(UART_Regs *uart)
Checks if the UART peripheral is enabled.
Definition: dl_uart.h:772
Definition: dl_uart.h:377
__STATIC_INLINE void DL_UART_enableManchesterEncoding(UART_Regs *uart)
Enable Manchester encoding.
Definition: dl_uart.h:1179
__STATIC_INLINE bool DL_UART_isLoopbackModeEnabled(UART_Regs *uart)
Check if loopback mode is enabled.
Definition: dl_uart.h:895
__STATIC_INLINE void DL_UART_setFlowControl(UART_Regs *uart, DL_UART_FLOW_CONTROL config)
Set the flow control configuration.
Definition: dl_uart.h:1255
Definition: dl_uart.h:407
DL_UART_WORD_LENGTH wordLength
Definition: dl_uart.h:519
Definition: dl_uart.h:182
__STATIC_INLINE uint16_t DL_UART_getLINRisingEdgeCaptureValue(UART_Regs *uart)
Get the LINC1 counter value.
Definition: dl_uart.h:2466
__STATIC_INLINE DL_UART_IIDX DL_UART_getPendingInterrupt(UART_Regs *uart)
Get highest priority pending UART interrupt.
Definition: dl_uart.h:2809
bool DL_UART_Extend_saveConfiguration(UART_Regs *uart, DL_UART_Extend_backupConfig *ptr)
Save UART Extend configuration before entering a power loss state.
__STATIC_INLINE bool DL_UART_isRXFIFOFull(UART_Regs *uart)
Checks if the RX FIFO is full.
Definition: dl_uart.h:1710
__STATIC_INLINE bool DL_UART_isLINCounterCompareMatchEnabled(UART_Regs *uart)
Check if LIN counter compare match mode is enabled.
Definition: dl_uart.h:2394
Definition: dl_uart.h:289
__STATIC_INLINE uint32_t DL_UART_getAddressMask(UART_Regs *uart)
Get the address mask being used.
Definition: dl_uart.h:2661
bool backupRdy
Definition: dl_uart.h:595
void DL_UART_setClockConfig(UART_Regs *uart, DL_UART_ClockConfig *config)
Configure UART source clock.
__STATIC_INLINE bool DL_UART_isManchesterEncodingEnabled(UART_Regs *uart)
Check if Manchester encoding is enabled.
Definition: dl_uart.h:1204
DL_UART_RTS
Definition: dl_uart.h:387
__STATIC_INLINE bool DL_UART_isLINFallingEdgeCaptureEnabled(UART_Regs *uart)
Check status of capture of LIN counter on a falling edge.
Definition: dl_uart.h:2278
__STATIC_INLINE void DL_UART_enableLINSendBreak(UART_Regs *uart)
Enable send break (for LIN protocol)
Definition: dl_uart.h:1393
__STATIC_INLINE DL_UART_PARITY DL_UART_getParityMode(UART_Regs *uart)
Get parity mode.
Definition: dl_uart.h:1471
void DL_UART_getClockConfig(UART_Regs *uart, DL_UART_ClockConfig *config)
Get UART source clock configuration.
Definition: dl_uart.h:234
Definition: dl_uart.h:467
__STATIC_INLINE bool DL_UART_isLINCounterClearOnFallingEdge(UART_Regs *uart)
Check if LIN counting on falling edge of RXD is enabled.
Definition: dl_uart.h:2189
__STATIC_INLINE DL_UART_TXD_OUT DL_UART_getTransmitPinManualOutput(UART_Regs *uart)
Get the output value of the TXD pin.
Definition: dl_uart.h:1166
__STATIC_INLINE bool DL_UART_isLINCountWhileLowEnabled(UART_Regs *uart)
Check if LIN counter increments while RXD signal is low is enabled.
Definition: dl_uart.h:2231
Definition: dl_uart.h:198
Definition: dl_uart.h:473
Definition: dl_uart.h:369
__STATIC_INLINE DL_UART_OVERSAMPLING_RATE DL_UART_getOversampling(UART_Regs *uart)
Get the oversampling rate.
Definition: dl_uart.h:859
__STATIC_INLINE uint32_t DL_UART_getAddress(UART_Regs *uart)
Get the address being used.
Definition: dl_uart.h:2701
Definition: dl_uart.h:493
__STATIC_INLINE void DL_UART_enableTransmitPinManualControl(UART_Regs *uart)
Enable control of the TXD pin.
Definition: dl_uart.h:1090
__STATIC_INLINE void DL_UART_disableGlitchFilterChaining(UART_Regs *uart)
Disable analog and digital noise glitch filter chaining.
Definition: dl_uart.h:2908
__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:1810
Definition: dl_uart.h:419
uint32_t fbrd
Definition: dl_uart.h:568
__STATIC_INLINE void DL_UART_clearInterruptStatus(UART_Regs *uart, uint32_t interruptMask)
Clear pending UART interrupts.
Definition: dl_uart.h:2822
Definition: dl_uart.h:216
__STATIC_INLINE void DL_UART_disableInterrupt(UART_Regs *uart, uint32_t interruptMask)
Disable UART interrupts.
Definition: dl_uart.h:2728
Definition: dl_uart.h:297
Definition: dl_uart.h:495
Definition: dl_uart.h:319
__STATIC_INLINE void DL_UART_transmitData(UART_Regs *uart, uint8_t data)
Writes data into the TX FIFO to transmit.
Definition: dl_uart.h:2047
__STATIC_INLINE uint32_t DL_UART_getDigitalPulseWidth(UART_Regs *uart)
Get the pulse width select for the digital glitch suppresion.
Definition: dl_uart.h:2024
__STATIC_INLINE void DL_UART_setStopBits(UART_Regs *uart, DL_UART_STOP_BITS numStopBits)
Set the number of stop bits.
Definition: dl_uart.h:1489
__STATIC_INLINE void DL_UART_disableLINCounter(UART_Regs *uart)
Disable the LIN counter.
Definition: dl_uart.h:2156
__STATIC_INLINE void DL_UART_enableLINSyncFieldValidationCounterControl(UART_Regs *uart)
Setup LIN counter control for sync field validation.
Definition: dl_uart.h:2357
Definition: dl_uart.h:309
Definition: dl_uart.h:389
Definition: dl_uart.h:291
Definition: dl_uart.h:228
© Copyright 1995-2023, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale