1 /* 2 * Copyright (c) 2020 - 2024 Renesas Electronics Corporation and/or its affiliates 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 /********************************************************************************************************************** 8 * File Name : scifa_iodefine.h 9 * Version : 1.00 10 * Description : IO define file for scifa. 11 *********************************************************************************************************************/ 12 13 /* ================================================================================================================= */ 14 /* ================ Device Specific Cluster Section ====== */ 15 /* ================================================================================================================= */ 16 17 /* ================================================================================================================= */ 18 /* ================ Device Specific Peripheral Section ====== */ 19 /* ================================================================================================================= */ 20 21 #ifndef SCIFA_IODEFINE_H 22 #define SCIFA_IODEFINE_H 23 24 typedef struct 25 { 26 union 27 { 28 __IOM uint16_t SMR; 29 struct 30 { 31 __IOM uint16_t CKS : 2; 32 uint16_t : 1; 33 __IOM uint16_t STOP : 1; 34 __IOM uint16_t PM : 1; 35 __IOM uint16_t PE : 1; 36 __IOM uint16_t CHR : 1; 37 __IOM uint16_t CM : 1; 38 uint16_t : 8; 39 } SMR_b; 40 }; 41 42 union 43 { 44 union 45 { 46 __IOM uint8_t MDDR; 47 struct 48 { 49 __IOM uint8_t MDDR : 8; 50 } MDDR_b; 51 }; 52 53 union 54 { 55 __IOM uint8_t BRR; 56 struct 57 { 58 __IOM uint8_t BRR : 8; 59 } BRR_b; 60 }; 61 }; 62 63 __IM uint8_t RESERVED[1]; 64 union 65 { 66 __IOM uint16_t SCR; 67 struct 68 { 69 __IOM uint16_t CKE : 2; 70 __IOM uint16_t TEIE : 1; 71 __IOM uint16_t REIE : 1; 72 __IOM uint16_t RE : 1; 73 __IOM uint16_t TE : 1; 74 __IOM uint16_t RIE : 1; 75 __IOM uint16_t TIE : 1; 76 uint16_t : 8; 77 } SCR_b; 78 }; 79 80 union 81 { 82 __OM uint8_t FTDR; 83 struct 84 { 85 __OM uint8_t FTDR : 8; 86 } FTDR_b; 87 }; 88 89 __IM uint8_t RESERVED1[1]; 90 union 91 { 92 __IOM uint16_t FSR; 93 struct 94 { 95 __IOM uint16_t DR : 1; 96 __IOM uint16_t RDF : 1; 97 __IM uint16_t PER : 1; 98 __IM uint16_t FER : 1; 99 __IOM uint16_t BRK : 1; 100 __IOM uint16_t TDFE : 1; 101 __IOM uint16_t TEND : 1; 102 __IOM uint16_t ER : 1; 103 uint16_t : 8; 104 } FSR_b; 105 }; 106 107 union 108 { 109 __IM uint8_t FRDR; 110 struct 111 { 112 __IM uint8_t FRDR : 8; 113 } FRDR_b; 114 }; 115 116 __IM uint8_t RESERVED2[1]; 117 union 118 { 119 __IOM uint16_t FCR; 120 struct 121 { 122 __IOM uint16_t LOOP : 1; 123 __IOM uint16_t RFRST : 1; 124 __IOM uint16_t TFRST : 1; 125 __IOM uint16_t MCE : 1; 126 __IOM uint16_t TTRG : 2; 127 __IOM uint16_t RTRG : 2; 128 __IOM uint16_t RSTRG : 3; 129 uint16_t : 5; 130 } FCR_b; 131 }; 132 133 union 134 { 135 __IM uint16_t FDR; 136 struct 137 { 138 __IM uint16_t R : 5; 139 uint16_t : 3; 140 __IM uint16_t T : 5; 141 uint16_t : 3; 142 } FDR_b; 143 }; 144 145 union 146 { 147 __IOM uint16_t SPTR; 148 struct 149 { 150 __IOM uint16_t SPB2DT : 1; 151 __IOM uint16_t SPB2IO : 1; 152 __IOM uint16_t SCKDT : 1; 153 __IOM uint16_t SCKIO : 1; 154 __IOM uint16_t CTS2DT : 1; 155 __IOM uint16_t CTS2IO : 1; 156 __IOM uint16_t RTS2DT : 1; 157 __IOM uint16_t RTS2IO : 1; 158 uint16_t : 8; 159 } SPTR_b; 160 }; 161 162 union 163 { 164 __IOM uint16_t LSR; 165 struct 166 { 167 __IOM uint16_t ORER : 1; 168 uint16_t : 1; 169 __IM uint16_t FER : 4; 170 uint16_t : 2; 171 __IM uint16_t PER : 4; 172 uint16_t : 4; 173 } LSR_b; 174 }; 175 176 union 177 { 178 __IOM uint8_t SEMR; 179 struct 180 { 181 __IOM uint8_t ABCS0 : 1; 182 uint8_t : 1; 183 __IOM uint8_t NFEN : 1; 184 __IOM uint8_t DIR : 1; 185 __IOM uint8_t MDDRS : 1; 186 __IOM uint8_t BRME : 1; 187 uint8_t : 1; 188 __IOM uint8_t BGDM : 1; 189 } SEMR_b; 190 }; 191 192 __IM uint8_t RESERVED3[1]; 193 union 194 { 195 __IOM uint16_t FTCR; 196 struct 197 { 198 __IOM uint16_t TFTC : 5; 199 uint16_t : 2; 200 __IOM uint16_t TTRGS : 1; 201 __IOM uint16_t RFTC : 5; 202 uint16_t : 2; 203 __IOM uint16_t RTRGS : 1; 204 } FTCR_b; 205 }; 206 } R_SCIFA0_Type; 207 208 /* =========================================================================================================================== */ 209 /* ================ Device Specific Peripheral Address Map ================ */ 210 /* =========================================================================================================================== */ 211 212 #define R_SCIFA0_BASE 0x4004B800 213 #define R_SCIFA1_BASE 0x4004BC00 214 #define R_SCIFA2_BASE 0x4004C000 215 #define R_SCIFA3_BASE 0x4004C400 216 #define R_SCIFA4_BASE 0x4004C800 217 #define R_SCIFA5_BASE 0x4004E000 218 219 /* =========================================================================================================================== */ 220 /* ================ Peripheral declaration ================ */ 221 /* =========================================================================================================================== */ 222 223 #define R_SCIFA0 ((R_SCIFA0_Type *) R_SCIFA0_BASE) 224 #define R_SCIFA1 ((R_SCIFA0_Type *) R_SCIFA1_BASE) 225 #define R_SCIFA2 ((R_SCIFA0_Type *) R_SCIFA2_BASE) 226 #define R_SCIFA3 ((R_SCIFA0_Type *) R_SCIFA3_BASE) 227 #define R_SCIFA4 ((R_SCIFA0_Type *) R_SCIFA4_BASE) 228 #define R_SCIFA5 ((R_SCIFA0_Type *) R_SCIFA5_BASE) 229 230 #endif /* SCIFA_IODEFINE_H */ 231