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