1 /*
2  * Copyright (c) 2024 Microchip Technology Inc.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 #ifndef _MEC5_UART_V1_H
7 #define _MEC5_UART_V1_H
8 
9 /** @addtogroup Device_Peripheral_peripherals
10   * @{
11   */
12 
13 /**
14   * @brief UART 16550 compatible (MEC_UART)
15   */
16 
17 typedef struct mec_uart_regs {                  /*!< (@ 0x400F2400) MEC_UART Structure                                        */
18 
19   union {
20     __IM  uint8_t RXB;                          /*!< (@ 0x00000000) UART RX buffer or BAUD clock LSB when LSR.DLAB=1           */
21     __OM  uint8_t TXB;                          /*!< (@ 0x00000000) UART TX buffer or BAUD clock LSB when LSR.DLAB=1           */
22   };
23   __IOM uint8_t   IER;                          /*!< (@ 0x00000001) UART interrupt enable register or BAUD clock
24                                                                     MSB when LSR.DLAB=1                                        */
25 
26   union {
27     __IM  uint8_t IIR;                          /*!< (@ 0x00000002) UART Interrupt Identification Register (RO)                */
28     __OM  uint8_t FCR;                          /*!< (@ 0x00000002) UART FIFO control register(WO)                             */
29   };
30   __IOM uint8_t   LCR;                          /*!< (@ 0x00000003) UART Line control register                                 */
31   __IOM uint8_t   MCR;                          /*!< (@ 0x00000004) UART Modem control register                                */
32   __IOM uint8_t   LSR;                          /*!< (@ 0x00000005) UART Line status register                                  */
33   __IOM uint8_t   MSR;                          /*!< (@ 0x00000006) UART Modem status register                                 */
34   __IOM uint8_t   SCR;                          /*!< (@ 0x00000007) UART scratch pad register                                  */
35   __IM  uint8_t   RESERVED[808];
36   __IOM uint8_t   ACTV;                         /*!< (@ 0x00000330) UART Activate register                                     */
37   __IM  uint8_t   RESERVED1[191];
38   __IOM uint8_t   CFGS;                         /*!< (@ 0x000003F0) UART Configuration select register                         */
39 } MEC_UART_Type;                                /*!< Size = 1009 (0x3f1)                                                       */
40 
41 /** @} */ /* End of group Device_Peripheral_peripherals */
42 
43 /** @addtogroup PosMask_peripherals
44   * @{
45   */
46 /* ==========================================================  IER  ========================================================== */
47 #define MEC_UART_IER_ERDAI_Pos            (0UL)                     /*!< ERDAI (Bit 0)                                         */
48 #define MEC_UART_IER_ERDAI_Msk            (0x1UL)                   /*!< ERDAI (Bitfield-Mask: 0x01)                           */
49 #define MEC_UART_IER_ETHREI_Pos           (1UL)                     /*!< ETHREI (Bit 1)                                        */
50 #define MEC_UART_IER_ETHREI_Msk           (0x2UL)                   /*!< ETHREI (Bitfield-Mask: 0x01)                          */
51 #define MEC_UART_IER_ELSI_Pos             (2UL)                     /*!< ELSI (Bit 2)                                          */
52 #define MEC_UART_IER_ELSI_Msk             (0x4UL)                   /*!< ELSI (Bitfield-Mask: 0x01)                            */
53 #define MEC_UART_IER_EMSI_Pos             (3UL)                     /*!< EMSI (Bit 3)                                          */
54 #define MEC_UART_IER_EMSI_Msk             (0x8UL)                   /*!< EMSI (Bitfield-Mask: 0x01)                            */
55 #define MEC_UART_IER_BAUD_CLK_SEL_Pos     (7UL)                     /*!< BAUD_CLK_SEL (Bit 7)                                  */
56 #define MEC_UART_IER_BAUD_CLK_SEL_Msk     (0x80UL)                  /*!< BAUD_CLK_SEL (Bitfield-Mask: 0x01)                    */
57 /* ==========================================================  IIR  ========================================================== */
58 #define MEC_UART_IIR_NIPEND_Pos           (0UL)                     /*!< NIPEND (Bit 0)                                        */
59 #define MEC_UART_IIR_NIPEND_Msk           (0x1UL)                   /*!< NIPEND (Bitfield-Mask: 0x01)                          */
60 #define MEC_UART_IIR_INTID_Pos            (1UL)                     /*!< INTID (Bit 1)                                         */
61 #define MEC_UART_IIR_INTID_Msk            (0xeUL)                   /*!< INTID (Bitfield-Mask: 0x07)                           */
62 #define MEC_UART_IIR_FIFO_STATE_Pos       (6UL)                     /*!< FIFO_STATE (Bit 6)                                    */
63 #define MEC_UART_IIR_FIFO_STATE_Msk       (0xc0UL)                  /*!< FIFO_STATE (Bitfield-Mask: 0x03)                      */
64 /* ==========================================================  FCR  ========================================================== */
65 #define MEC_UART_FCR_EXRF_Pos             (0UL)                     /*!< EXRF (Bit 0)                                          */
66 #define MEC_UART_FCR_EXRF_Msk             (0x1UL)                   /*!< EXRF (Bitfield-Mask: 0x01)                            */
67 #define MEC_UART_FCR_CLR_RX_FIFO_Pos      (1UL)                     /*!< CLR_RX_FIFO (Bit 1)                                   */
68 #define MEC_UART_FCR_CLR_RX_FIFO_Msk      (0x2UL)                   /*!< CLR_RX_FIFO (Bitfield-Mask: 0x01)                     */
69 #define MEC_UART_FCR_CLR_TX_FIFO_Pos      (2UL)                     /*!< CLR_TX_FIFO (Bit 2)                                   */
70 #define MEC_UART_FCR_CLR_TX_FIFO_Msk      (0x4UL)                   /*!< CLR_TX_FIFO (Bitfield-Mask: 0x01)                     */
71 #define MEC_UART_FCR_RXF_TLVL_Pos         (6UL)                     /*!< RXF_TLVL (Bit 6)                                      */
72 #define MEC_UART_FCR_RXF_TLVL_Msk         (0xc0UL)                  /*!< RXF_TLVL (Bitfield-Mask: 0x03)                        */
73 /* ==========================================================  LCR  ========================================================== */
74 #define MEC_UART_LCR_WORD_LEN_Pos         (0UL)                     /*!< WORD_LEN (Bit 0)                                      */
75 #define MEC_UART_LCR_WORD_LEN_Msk         (0x3UL)                   /*!< WORD_LEN (Bitfield-Mask: 0x03)                        */
76 #define MEC_UART_LCR_STOP_BITS_Pos        (2UL)                     /*!< STOP_BITS (Bit 2)                                     */
77 #define MEC_UART_LCR_STOP_BITS_Msk        (0x4UL)                   /*!< STOP_BITS (Bitfield-Mask: 0x01)                       */
78 #define MEC_UART_LCR_PARITY_Pos           (3UL)                     /*!< PARITY (Bit 3)                                        */
79 #define MEC_UART_LCR_PARITY_Msk           (0x8UL)                   /*!< PARITY (Bitfield-Mask: 0x01)                          */
80 #define MEC_UART_LCR_PARITY_SEL_Pos       (4UL)                     /*!< PARITY_SEL (Bit 4)                                    */
81 #define MEC_UART_LCR_PARITY_SEL_Msk       (0x30UL)                  /*!< PARITY_SEL (Bitfield-Mask: 0x03)                      */
82 #define MEC_UART_LCR_TX_BRK_Pos           (6UL)                     /*!< TX_BRK (Bit 6)                                        */
83 #define MEC_UART_LCR_TX_BRK_Msk           (0x40UL)                  /*!< TX_BRK (Bitfield-Mask: 0x01)                          */
84 #define MEC_UART_LCR_DLAB_Pos             (7UL)                     /*!< DLAB (Bit 7)                                          */
85 #define MEC_UART_LCR_DLAB_Msk             (0x80UL)                  /*!< DLAB (Bitfield-Mask: 0x01)                            */
86 /* ==========================================================  MCR  ========================================================== */
87 #define MEC_UART_MCR_DTR_Pos              (0UL)                     /*!< DTR (Bit 0)                                           */
88 #define MEC_UART_MCR_DTR_Msk              (0x1UL)                   /*!< DTR (Bitfield-Mask: 0x01)                             */
89 #define MEC_UART_MCR_RTS_Pos              (1UL)                     /*!< RTS (Bit 1)                                           */
90 #define MEC_UART_MCR_RTS_Msk              (0x2UL)                   /*!< RTS (Bitfield-Mask: 0x01)                             */
91 #define MEC_UART_MCR_OUT1_Pos             (2UL)                     /*!< OUT1 (Bit 2)                                          */
92 #define MEC_UART_MCR_OUT1_Msk             (0x4UL)                   /*!< OUT1 (Bitfield-Mask: 0x01)                            */
93 #define MEC_UART_MCR_OUT2_Pos             (3UL)                     /*!< OUT2 (Bit 3)                                          */
94 #define MEC_UART_MCR_OUT2_Msk             (0x8UL)                   /*!< OUT2 (Bitfield-Mask: 0x01)                            */
95 #define MEC_UART_MCR_LOOPBACK_Pos         (4UL)                     /*!< LOOPBACK (Bit 4)                                      */
96 #define MEC_UART_MCR_LOOPBACK_Msk         (0x10UL)                  /*!< LOOPBACK (Bitfield-Mask: 0x01)                        */
97 /* ==========================================================  LSR  ========================================================== */
98 #define MEC_UART_LSR_DRDY_Pos             (0UL)                     /*!< DRDY (Bit 0)                                          */
99 #define MEC_UART_LSR_DRDY_Msk             (0x1UL)                   /*!< DRDY (Bitfield-Mask: 0x01)                            */
100 #define MEC_UART_LSR_OVR_ERR_Pos          (1UL)                     /*!< OVR_ERR (Bit 1)                                       */
101 #define MEC_UART_LSR_OVR_ERR_Msk          (0x2UL)                   /*!< OVR_ERR (Bitfield-Mask: 0x01)                         */
102 #define MEC_UART_LSR_PAR_ERR_Pos          (2UL)                     /*!< PAR_ERR (Bit 2)                                       */
103 #define MEC_UART_LSR_PAR_ERR_Msk          (0x4UL)                   /*!< PAR_ERR (Bitfield-Mask: 0x01)                         */
104 #define MEC_UART_LSR_FR_ERR_Pos           (3UL)                     /*!< FR_ERR (Bit 3)                                        */
105 #define MEC_UART_LSR_FR_ERR_Msk           (0x8UL)                   /*!< FR_ERR (Bitfield-Mask: 0x01)                          */
106 #define MEC_UART_LSR_BREAK_Pos            (4UL)                     /*!< BREAK (Bit 4)                                         */
107 #define MEC_UART_LSR_BREAK_Msk            (0x10UL)                  /*!< BREAK (Bitfield-Mask: 0x01)                           */
108 #define MEC_UART_LSR_THRE_Pos             (5UL)                     /*!< THRE (Bit 5)                                          */
109 #define MEC_UART_LSR_THRE_Msk             (0x20UL)                  /*!< THRE (Bitfield-Mask: 0x01)                            */
110 #define MEC_UART_LSR_THSE_Pos             (6UL)                     /*!< THSE (Bit 6)                                          */
111 #define MEC_UART_LSR_THSE_Msk             (0x40UL)                  /*!< THSE (Bitfield-Mask: 0x01)                            */
112 #define MEC_UART_LSR_FIFO_ERR_Pos         (7UL)                     /*!< FIFO_ERR (Bit 7)                                      */
113 #define MEC_UART_LSR_FIFO_ERR_Msk         (0x80UL)                  /*!< FIFO_ERR (Bitfield-Mask: 0x01)                        */
114 /* ==========================================================  MSR  ========================================================== */
115 #define MEC_UART_MSR_DCTS_Pos             (0UL)                     /*!< DCTS (Bit 0)                                          */
116 #define MEC_UART_MSR_DCTS_Msk             (0x1UL)                   /*!< DCTS (Bitfield-Mask: 0x01)                            */
117 #define MEC_UART_MSR_DDSR_Pos             (1UL)                     /*!< DDSR (Bit 1)                                          */
118 #define MEC_UART_MSR_DDSR_Msk             (0x2UL)                   /*!< DDSR (Bitfield-Mask: 0x01)                            */
119 #define MEC_UART_MSR_TERI_Pos             (2UL)                     /*!< TERI (Bit 2)                                          */
120 #define MEC_UART_MSR_TERI_Msk             (0x4UL)                   /*!< TERI (Bitfield-Mask: 0x01)                            */
121 #define MEC_UART_MSR_DDCD_Pos             (3UL)                     /*!< DDCD (Bit 3)                                          */
122 #define MEC_UART_MSR_DDCD_Msk             (0x8UL)                   /*!< DDCD (Bitfield-Mask: 0x01)                            */
123 #define MEC_UART_MSR_CTS_Pos              (4UL)                     /*!< CTS (Bit 4)                                           */
124 #define MEC_UART_MSR_CTS_Msk              (0x10UL)                  /*!< CTS (Bitfield-Mask: 0x01)                             */
125 #define MEC_UART_MSR_DSR_Pos              (5UL)                     /*!< DSR (Bit 5)                                           */
126 #define MEC_UART_MSR_DSR_Msk              (0x20UL)                  /*!< DSR (Bitfield-Mask: 0x01)                             */
127 #define MEC_UART_MSR_RI_Pos               (6UL)                     /*!< RI (Bit 6)                                            */
128 #define MEC_UART_MSR_RI_Msk               (0x40UL)                  /*!< RI (Bitfield-Mask: 0x01)                              */
129 #define MEC_UART_MSR_DCD_Pos              (7UL)                     /*!< DCD (Bit 7)                                           */
130 #define MEC_UART_MSR_DCD_Msk              (0x80UL)                  /*!< DCD (Bitfield-Mask: 0x01)                             */
131 /* =========================================================  ACTV  ========================================================== */
132 #define MEC_UART_ACTV_CLKS_Pos            (0UL)                     /*!< CLKS (Bit 0)                                          */
133 #define MEC_UART_ACTV_CLKS_Msk            (0x1UL)                   /*!< CLKS (Bitfield-Mask: 0x01)                            */
134 /* =========================================================  CFGS  ========================================================== */
135 #define MEC_UART_CFGS_CLK_SRC_EXT_Pos     (0UL)                     /*!< CLK_SRC_EXT (Bit 0)                                   */
136 #define MEC_UART_CFGS_CLK_SRC_EXT_Msk     (0x1UL)                   /*!< CLK_SRC_EXT (Bitfield-Mask: 0x01)                     */
137 #define MEC_UART_CFGS_RESET_SRC_Pos       (1UL)                     /*!< RESET_SRC (Bit 1)                                     */
138 #define MEC_UART_CFGS_RESET_SRC_Msk       (0x2UL)                   /*!< RESET_SRC (Bitfield-Mask: 0x01)                       */
139 #define MEC_UART_CFGS_POLARITY_Pos        (2UL)                     /*!< POLARITY (Bit 2)                                      */
140 #define MEC_UART_CFGS_POLARITY_Msk        (0x4UL)                   /*!< POLARITY (Bitfield-Mask: 0x01)                        */
141 
142 /** @} */ /* End of group PosMask_peripherals */
143 
144 /** @addtogroup EnumValue_peripherals
145   * @{
146   */
147 /* ==========================================================  IER  ========================================================== */
148 /* ==============================================  MEC_UART IER ERDAI [0..0]  =============================================== */
149 typedef enum {                                  /*!< MEC_UART_IER_ERDAI                                                       */
150   MEC_UART_IER_ERDAI_DIS              = 0,     /*!< DIS : Disable RX data availabe interrupt                                  */
151   MEC_UART_IER_ERDAI_EN               = 1,     /*!< EN : Enable RX data availabe interrupt                                    */
152 } MEC_UART_IER_ERDAI_Enum;
153 
154 /* ==============================================  MEC_UART IER ETHREI [1..1]  ============================================== */
155 typedef enum {                                  /*!< MEC_UART_IER_ETHREI                                                      */
156   MEC_UART_IER_ETHREI_DIS             = 0,     /*!< DIS : Disable TX empty interrupt                                          */
157   MEC_UART_IER_ETHREI_EN              = 1,     /*!< EN : Enable TX empty interrupt                                            */
158 } MEC_UART_IER_ETHREI_Enum;
159 
160 /* ===============================================  MEC_UART IER ELSI [2..2]  =============================================== */
161 typedef enum {                                  /*!< MEC_UART_IER_ELSI                                                        */
162   MEC_UART_IER_ELSI_DIS               = 0,     /*!< DIS : Disable LS interrupts                                               */
163   MEC_UART_IER_ELSI_EN                = 1,     /*!< EN : Enable LS interrupts                                                 */
164 } MEC_UART_IER_ELSI_Enum;
165 
166 /* ===============================================  MEC_UART IER EMSI [3..3]  =============================================== */
167 typedef enum {                                  /*!< MEC_UART_IER_EMSI                                                        */
168   MEC_UART_IER_EMSI_DIS               = 0,     /*!< DIS : Disable Modem status interrupts                                     */
169   MEC_UART_IER_EMSI_EN                = 1,     /*!< EN : Enable Modem status interrupts                                       */
170 } MEC_UART_IER_EMSI_Enum;
171 
172 /* ===========================================  MEC_UART IER BAUD_CLK_SEL [7..7]  =========================================== */
173 typedef enum {                                  /*!< MEC_UART_IER_BAUD_CLK_SEL                                                */
174   MEC_UART_IER_BAUD_CLK_SEL_M1P8      = 0,     /*!< M1P8 : Internal 1.8 MHz clock is BAUD clock source                        */
175   MEC_UART_IER_BAUD_CLK_SEL_M48       = 1,     /*!< M48 : Internal 48MHz AHB is BAUD clock source                             */
176 } MEC_UART_IER_BAUD_CLK_SEL_Enum;
177 
178 /* ==========================================================  IIR  ========================================================== */
179 /* ==============================================  MEC_UART IIR NIPEND [0..0]  ============================================== */
180 typedef enum {                                  /*!< MEC_UART_IIR_NIPEND                                                      */
181   MEC_UART_IIR_NIPEND_IP              = 0,     /*!< IP : Interrupt(s) are pending                                             */
182   MEC_UART_IIR_NIPEND_NONE            = 1,     /*!< NONE : Interrupt(s) are not pending                                       */
183 } MEC_UART_IIR_NIPEND_Enum;
184 
185 /* ==============================================  MEC_UART IIR INTID [1..3]  =============================================== */
186 typedef enum {                                  /*!< MEC_UART_IIR_INTID                                                       */
187   MEC_UART_IIR_INTID_MSR              = 0,     /*!< MSR : Modem status change                                                 */
188   MEC_UART_IIR_INTID_THRE             = 1,     /*!< THRE : TX holding or FIFO empty                                           */
189   MEC_UART_IIR_INTID_RXD              = 2,     /*!< RXD : RX data available                                                   */
190   MEC_UART_IIR_INTID_LSR              = 3,     /*!< LSR : Line status change                                                  */
191   MEC_UART_IIR_INTID_RXTMOUT          = 6,     /*!< RXTMOUT : RX character timeout                                            */
192 } MEC_UART_IIR_INTID_Enum;
193 
194 /* ============================================  MEC_UART IIR FIFO_STATE [6..7]  ============================================ */
195 typedef enum {                                  /*!< MEC_UART_IIR_FIFO_STATE                                                  */
196   MEC_UART_IIR_FIFO_STATE_DISABLED    = 0,     /*!< DISABLED : FIFO state is disabled                                         */
197   MEC_UART_IIR_FIFO_STATE_ENABLED     = 3,     /*!< ENABLED : FIFO state is enabled                                           */
198 } MEC_UART_IIR_FIFO_STATE_Enum;
199 
200 /* ==========================================================  FCR  ========================================================== */
201 /* ===============================================  MEC_UART FCR EXRF [0..0]  =============================================== */
202 typedef enum {                                  /*!< MEC_UART_FCR_EXRF                                                        */
203   MEC_UART_FCR_EXRF_DISABLE           = 0,     /*!< DISABLE : Disable TX and RX FIFOs                                         */
204   MEC_UART_FCR_EXRF_ENABLE            = 1,     /*!< ENABLE : Enable TX and RX FIFOs                                           */
205 } MEC_UART_FCR_EXRF_Enum;
206 
207 /* ===========================================  MEC_UART FCR CLR_RX_FIFO [1..1]  ============================================ */
208 typedef enum {                                  /*!< MEC_UART_FCR_CLR_RX_FIFO                                                 */
209   MEC_UART_FCR_CLR_RX_FIFO_EN         = 1,     /*!< EN : Enable RX FIFO clear                                                 */
210 } MEC_UART_FCR_CLR_RX_FIFO_Enum;
211 
212 /* ===========================================  MEC_UART FCR CLR_TX_FIFO [2..2]  ============================================ */
213 typedef enum {                                  /*!< MEC_UART_FCR_CLR_TX_FIFO                                                 */
214   MEC_UART_FCR_CLR_TX_FIFO_EN         = 1,     /*!< EN : Enable TX FIFO clear                                                 */
215 } MEC_UART_FCR_CLR_TX_FIFO_Enum;
216 
217 /* =============================================  MEC_UART FCR RXF_TLVL [6..7]  ============================================= */
218 typedef enum {                                  /*!< MEC_UART_FCR_RXF_TLVL                                                    */
219   MEC_UART_FCR_RXF_TLVL_1BYTE         = 0,     /*!< 1BYTE : Trigger level is 1 byte                                           */
220   MEC_UART_FCR_RXF_TLVL_4BYTES        = 1,     /*!< 4BYTES : Trigger level is 4 bytes                                         */
221   MEC_UART_FCR_RXF_TLVL_8BYTES        = 2,     /*!< 8BYTES : Trigger level is 8 bytes                                         */
222   MEC_UART_FCR_RXF_TLVL_14BYTES       = 3,     /*!< 14BYTES : Trigger level is 14 bytes                                       */
223 } MEC_UART_FCR_RXF_TLVL_Enum;
224 
225 /* ==========================================================  LCR  ========================================================== */
226 /* =============================================  MEC_UART LCR WORD_LEN [0..1]  ============================================= */
227 typedef enum {                                  /*!< MEC_UART_LCR_WORD_LEN                                                    */
228   MEC_UART_LCR_WORD_LEN_5BITS         = 0,     /*!< 5BITS : Word length is 5 bits                                             */
229   MEC_UART_LCR_WORD_LEN_6BITS         = 1,     /*!< 6BITS : Word length is 6 bits                                             */
230   MEC_UART_LCR_WORD_LEN_7BITS         = 2,     /*!< 7BITS : Word length is 7 bits                                             */
231   MEC_UART_LCR_WORD_LEN_8BITS         = 3,     /*!< 8BITS : Word length is 8 bits                                             */
232 } MEC_UART_LCR_WORD_LEN_Enum;
233 
234 /* ============================================  MEC_UART LCR STOP_BITS [2..2]  ============================================= */
235 typedef enum {                                  /*!< MEC_UART_LCR_STOP_BITS                                                   */
236   MEC_UART_LCR_STOP_BITS_1BIT         = 0,     /*!< 1BIT : Use one stop bit                                                   */
237   MEC_UART_LCR_STOP_BITS_2BITS        = 1,     /*!< 2BITS : Use two stop bits except for 5-bit word length use 1.5
238                                                      stop bits                                                                 */
239 } MEC_UART_LCR_STOP_BITS_Enum;
240 
241 /* ==============================================  MEC_UART LCR PARITY [3..3]  ============================================== */
242 typedef enum {                                  /*!< MEC_UART_LCR_PARITY                                                      */
243   MEC_UART_LCR_PARITY_DISABLE         = 0,     /*!< DISABLE : Disable parity generation on TX data and checks on
244                                                      RX data                                                                   */
245   MEC_UART_LCR_PARITY_ENABLE          = 1,     /*!< ENABLE : Enable parity generation on TX data and check on RX
246                                                      data                                                                      */
247 } MEC_UART_LCR_PARITY_Enum;
248 
249 /* ============================================  MEC_UART LCR PARITY_SEL [4..5]  ============================================ */
250 typedef enum {                                  /*!< MEC_UART_LCR_PARITY_SEL                                                  */
251   MEC_UART_LCR_PARITY_SEL_ODD         = 0,     /*!< ODD : Select ODD parity                                                   */
252   MEC_UART_LCR_PARITY_SEL_EVEN        = 1,     /*!< EVEN : Select Even parity                                                 */
253   MEC_UART_LCR_PARITY_SEL_MARK        = 2,     /*!< MARK : Select Mark parity                                                 */
254   MEC_UART_LCR_PARITY_SEL_SPACE       = 3,     /*!< SPACE : Select Space parity                                               */
255 } MEC_UART_LCR_PARITY_SEL_Enum;
256 
257 /* ==============================================  MEC_UART LCR TX_BRK [6..6]  ============================================== */
258 typedef enum {                                  /*!< MEC_UART_LCR_TX_BRK                                                      */
259   MEC_UART_LCR_TX_BRK_DISABLE         = 0,     /*!< DISABLE : Do not force transmit of a BREAK                                */
260   MEC_UART_LCR_TX_BRK_ENABLE          = 1,     /*!< ENABLE : Force TX data to be a BREAK                                      */
261 } MEC_UART_LCR_TX_BRK_Enum;
262 
263 /* ===============================================  MEC_UART LCR DLAB [7..7]  =============================================== */
264 typedef enum {                                  /*!< MEC_UART_LCR_DLAB                                                        */
265   MEC_UART_LCR_DLAB_DISABLE           = 0,     /*!< DISABLE : BAUD rate divisor latch register are hidden                     */
266   MEC_UART_LCR_DLAB_ENABLE            = 1,     /*!< ENABLE : Access BAUD rate divisor at registers 0 and 1                    */
267 } MEC_UART_LCR_DLAB_Enum;
268 
269 /* ==========================================================  MCR  ========================================================== */
270 /* ===============================================  MEC_UART MCR DTR [0..0]  ================================================ */
271 typedef enum {                                  /*!< MEC_UART_MCR_DTR                                                         */
272   MEC_UART_MCR_DTR_DEASSERT           = 0,     /*!< DEASSERT : De-assert DTR# signal                                          */
273   MEC_UART_MCR_DTR_ASSERT             = 1,     /*!< ASSERT : Assert DTR# signal                                               */
274 } MEC_UART_MCR_DTR_Enum;
275 
276 /* ===============================================  MEC_UART MCR RTS [1..1]  ================================================ */
277 typedef enum {                                  /*!< MEC_UART_MCR_RTS                                                         */
278   MEC_UART_MCR_RTS_DEASSERT           = 0,     /*!< DEASSERT : De-assert RST# signal                                          */
279   MEC_UART_MCR_RTS_ASSERT             = 1,     /*!< ASSERT : Assert RST# signal                                               */
280 } MEC_UART_MCR_RTS_Enum;
281 
282 /* ===============================================  MEC_UART MCR OUT1 [2..2]  =============================================== */
283 typedef enum {                                  /*!< MEC_UART_MCR_OUT1                                                        */
284   MEC_UART_MCR_OUT1_DEASSERT          = 0,     /*!< DEASSERT : De-assert UART output 1 signal                                 */
285   MEC_UART_MCR_OUT1_ASSERT            = 1,     /*!< ASSERT : Assert UART output 1 signal                                      */
286 } MEC_UART_MCR_OUT1_Enum;
287 
288 /* ===============================================  MEC_UART MCR OUT2 [3..3]  =============================================== */
289 typedef enum {                                  /*!< MEC_UART_MCR_OUT2                                                        */
290   MEC_UART_MCR_OUT2_DISABLE           = 0,     /*!< DISABLE : Disable UART interrupt output signal                            */
291   MEC_UART_MCR_OUT2_ENABLE            = 1,     /*!< ENABLE : Enable UART interrupt output signal                              */
292 } MEC_UART_MCR_OUT2_Enum;
293 
294 /* =============================================  MEC_UART MCR LOOPBACK [4..4]  ============================================= */
295 typedef enum {                                  /*!< MEC_UART_MCR_LOOPBACK                                                    */
296   MEC_UART_MCR_LOOPBACK_DISABLE       = 0,     /*!< DISABLE : Disable loopback mode                                           */
297   MEC_UART_MCR_LOOPBACK_ENABLE        = 1,     /*!< ENABLE : Enable loopback mode                                             */
298 } MEC_UART_MCR_LOOPBACK_Enum;
299 
300 /* ==========================================================  LSR  ========================================================== */
301 /* ===============================================  MEC_UART LSR DRDY [0..0]  =============================================== */
302 typedef enum {                                  /*!< MEC_UART_LSR_DRDY                                                        */
303   MEC_UART_LSR_DRDY_NONE              = 0,     /*!< NONE : No data in RX buffer or FIFO                                       */
304   MEC_UART_LSR_DRDY_ACTIVE            = 1,     /*!< ACTIVE : RX data present in RX buffer or FIFO                             */
305 } MEC_UART_LSR_DRDY_Enum;
306 
307 /* =============================================  MEC_UART LSR OVR_ERR [1..1]  ============================================== */
308 typedef enum {                                  /*!< MEC_UART_LSR_OVR_ERR                                                     */
309   MEC_UART_LSR_OVR_ERR_NONE           = 0,     /*!< NONE : No RX overrun error detected                                       */
310   MEC_UART_LSR_OVR_ERR_ACTIVE         = 1,     /*!< ACTIVE : RX data overrun detected                                         */
311 } MEC_UART_LSR_OVR_ERR_Enum;
312 
313 /* =============================================  MEC_UART LSR PAR_ERR [2..2]  ============================================== */
314 typedef enum {                                  /*!< MEC_UART_LSR_PAR_ERR                                                     */
315   MEC_UART_LSR_PAR_ERR_NONE           = 0,     /*!< NONE : No Parity error detected                                           */
316   MEC_UART_LSR_PAR_ERR_ACTIVE         = 1,     /*!< ACTIVE : RX data has parity error                                         */
317 } MEC_UART_LSR_PAR_ERR_Enum;
318 
319 /* ==============================================  MEC_UART LSR FR_ERR [3..3]  ============================================== */
320 typedef enum {                                  /*!< MEC_UART_LSR_FR_ERR                                                      */
321   MEC_UART_LSR_FR_ERR_NONE            = 0,     /*!< NONE : No RX framing error detected                                       */
322   MEC_UART_LSR_FR_ERR_ACTIVE          = 1,     /*!< ACTIVE : RX data has framing error                                        */
323 } MEC_UART_LSR_FR_ERR_Enum;
324 
325 /* ==============================================  MEC_UART LSR BREAK [4..4]  =============================================== */
326 typedef enum {                                  /*!< MEC_UART_LSR_BREAK                                                       */
327   MEC_UART_LSR_BREAK_NONE             = 0,     /*!< NONE : No break received                                                  */
328   MEC_UART_LSR_BREAK_ACTIVE           = 1,     /*!< ACTIVE : A break was received on RX input                                 */
329 } MEC_UART_LSR_BREAK_Enum;
330 
331 /* ===============================================  MEC_UART LSR THRE [5..5]  =============================================== */
332 typedef enum {                                  /*!< MEC_UART_LSR_THRE                                                        */
333   MEC_UART_LSR_THRE_NONE              = 0,     /*!< NONE : Transmit holding or TX FIFO are not empty                          */
334   MEC_UART_LSR_THRE_ACTIVE            = 1,     /*!< ACTIVE : Transmit holding or TX FIFO empty                                */
335 } MEC_UART_LSR_THRE_Enum;
336 
337 /* ===============================================  MEC_UART LSR THSE [6..6]  =============================================== */
338 typedef enum {                                  /*!< MEC_UART_LSR_THSE                                                        */
339   MEC_UART_LSR_THSE_NONE              = 0,     /*!< NONE : Transmit holding and shift registers are not both empty            */
340   MEC_UART_LSR_THSE_ACTIVE            = 1,     /*!< ACTIVE : Transmit holding and shift registers are both empty              */
341 } MEC_UART_LSR_THSE_Enum;
342 
343 /* =============================================  MEC_UART LSR FIFO_ERR [7..7]  ============================================= */
344 typedef enum {                                  /*!< MEC_UART_LSR_FIFO_ERR                                                    */
345   MEC_UART_LSR_FIFO_ERR_NONE          = 0,     /*!< NONE : No errors in RX FIFO data                                          */
346   MEC_UART_LSR_FIFO_ERR_ACTIVE        = 1,     /*!< ACTIVE : Errors deteced in RX FIFO data                                   */
347 } MEC_UART_LSR_FIFO_ERR_Enum;
348 
349 /* ==========================================================  MSR  ========================================================== */
350 /* ===============================================  MEC_UART MSR DCTS [0..0]  =============================================== */
351 typedef enum {                                  /*!< MEC_UART_MSR_DCTS                                                        */
352   MEC_UART_MSR_DCTS_NO_CHG            = 0,     /*!< NO_CHG : CTS# signal had not changed                                      */
353   MEC_UART_MSR_DCTS_CHG               = 1,     /*!< CHG : CTS# signal changed                                                 */
354 } MEC_UART_MSR_DCTS_Enum;
355 
356 /* ===============================================  MEC_UART MSR DDSR [1..1]  =============================================== */
357 typedef enum {                                  /*!< MEC_UART_MSR_DDSR                                                        */
358   MEC_UART_MSR_DDSR_NO_CHG            = 0,     /*!< NO_CHG : DSR# signal had not changed                                      */
359   MEC_UART_MSR_DDSR_CHG               = 1,     /*!< CHG : DSR# signal changed                                                 */
360 } MEC_UART_MSR_DDSR_Enum;
361 
362 /* ===============================================  MEC_UART MSR TERI [2..2]  =============================================== */
363 typedef enum {                                  /*!< MEC_UART_MSR_TERI                                                        */
364   MEC_UART_MSR_TERI_NO_CHG            = 0,     /*!< NO_CHG : RI# signal had not changed                                       */
365   MEC_UART_MSR_TERI_CHG               = 1,     /*!< CHG : RI# signal changed                                                  */
366 } MEC_UART_MSR_TERI_Enum;
367 
368 /* ===============================================  MEC_UART MSR DDCD [3..3]  =============================================== */
369 typedef enum {                                  /*!< MEC_UART_MSR_DDCD                                                        */
370   MEC_UART_MSR_DDCD_NO_CHG            = 0,     /*!< NO_CHG : DCD# signal had not changed                                      */
371   MEC_UART_MSR_DDCD_CHG               = 1,     /*!< CHG : DCD# signal changed                                                 */
372 } MEC_UART_MSR_DDCD_Enum;
373 
374 /* ===============================================  MEC_UART MSR CTS [4..4]  ================================================ */
375 typedef enum {                                  /*!< MEC_UART_MSR_CTS                                                         */
376   MEC_UART_MSR_CTS_ACTIVE             = 0,     /*!< ACTIVE : CTS# signal is asserted                                          */
377   MEC_UART_MSR_CTS_INACTIVE           = 1,     /*!< INACTIVE : CTS# signal is not asserted                                    */
378 } MEC_UART_MSR_CTS_Enum;
379 
380 /* ===============================================  MEC_UART MSR DSR [5..5]  ================================================ */
381 typedef enum {                                  /*!< MEC_UART_MSR_DSR                                                         */
382   MEC_UART_MSR_DSR_ACTIVE             = 0,     /*!< ACTIVE : DSR# signal is asserted                                          */
383   MEC_UART_MSR_DSR_INACTIVE           = 1,     /*!< INACTIVE : DSR# signal is not asserted                                    */
384 } MEC_UART_MSR_DSR_Enum;
385 
386 /* ================================================  MEC_UART MSR RI [6..6]  ================================================ */
387 typedef enum {                                  /*!< MEC_UART_MSR_RI                                                          */
388   MEC_UART_MSR_RI_ACTIVE              = 0,     /*!< ACTIVE : RI# signal is asserted                                           */
389   MEC_UART_MSR_RI_INACTIVE            = 1,     /*!< INACTIVE : RI# signal is not asserted                                     */
390 } MEC_UART_MSR_RI_Enum;
391 
392 /* ===============================================  MEC_UART MSR DCD [7..7]  ================================================ */
393 typedef enum {                                  /*!< MEC_UART_MSR_DCD                                                         */
394   MEC_UART_MSR_DCD_ACTIVE             = 0,     /*!< ACTIVE : DCD# signal is asserted                                          */
395   MEC_UART_MSR_DCD_INACTIVE           = 1,     /*!< INACTIVE : DCD# signal is not asserted                                    */
396 } MEC_UART_MSR_DCD_Enum;
397 
398 /* =========================================================  ACTV  ========================================================== */
399 /* ==============================================  MEC_UART ACTV CLKS [0..0]  =============================================== */
400 typedef enum {                                  /*!< MEC_UART_ACTV_CLKS                                                       */
401   MEC_UART_ACTV_CLKS_OFF              = 0,     /*!< OFF : Clocks gated off                                                    */
402   MEC_UART_ACTV_CLKS_ON               = 1,     /*!< ON : Clocks gated on                                                      */
403 } MEC_UART_ACTV_CLKS_Enum;
404 
405 /* =========================================================  CFGS  ========================================================== */
406 /* ===========================================  MEC_UART CFGS CLK_SRC_EXT [0..0]  =========================================== */
407 typedef enum {                                  /*!< MEC_UART_CFGS_CLK_SRC_EXT                                                */
408   MEC_UART_CFGS_CLK_SRC_EXT_DISABLED  = 0,     /*!< DISABLED : Use one of the internal clock sources                          */
409   MEC_UART_CFGS_CLK_SRC_EXT_ENABLED   = 1,     /*!< ENABLED : Use external clock source on GPIO 025                           */
410 } MEC_UART_CFGS_CLK_SRC_EXT_Enum;
411 
412 /* ============================================  MEC_UART CFGS RESET_SRC [1..1]  ============================================ */
413 typedef enum {                                  /*!< MEC_UART_CFGS_RESET_SRC                                                  */
414   MEC_UART_CFGS_RESET_SRC_SYS         = 0,     /*!< SYS : UART reset derived from RESET_SYS signal                            */
415   MEC_UART_CFGS_RESET_SRC_HOST        = 1,     /*!< HOST : UART reset derived from RESET_HOST signal                          */
416 } MEC_UART_CFGS_RESET_SRC_Enum;
417 
418 /* ============================================  MEC_UART CFGS POLARITY [2..2]  ============================================= */
419 typedef enum {                                  /*!< MEC_UART_CFGS_POLARITY                                                   */
420   MEC_UART_CFGS_POLARITY_NORMAL       = 0,     /*!< NORMAL : TX and RX pins states are not inverted                           */
421   MEC_UART_CFGS_POLARITY_INVERTED     = 1,     /*!< INVERTED : TX and RX pins states are inverted                             */
422 } MEC_UART_CFGS_POLARITY_Enum;
423 
424 /** @} */ /* End of group EnumValue_peripherals */
425 
426 #endif /* _MEC5_UART_V1_H */
427