1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333
#[doc = "Reader of register S1"] pub type R = crate::R<u8, super::S1>; #[doc = "Parity Error Flag\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PF_A { #[doc = "0: No parity error detected since the last time this flag was cleared. If the receive buffer has a depth greater than 1, then there may be data in the receive buffer what was received with a parity error."] _0 = 0, #[doc = "1: At least one dataword was received with a parity error since the last time this flag was cleared."] _1 = 1, } impl From<PF_A> for bool { #[inline(always)] fn from(variant: PF_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `PF`"] pub type PF_R = crate::R<bool, PF_A>; impl PF_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> PF_A { match self.bits { false => PF_A::_0, true => PF_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] #[inline(always)] pub fn is_0(&self) -> bool { *self == PF_A::_0 } #[doc = "Checks if the value of the field is `_1`"] #[inline(always)] pub fn is_1(&self) -> bool { *self == PF_A::_1 } } #[doc = "Framing Error Flag\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum FE_A { #[doc = "0: No framing error detected."] _0 = 0, #[doc = "1: Framing error."] _1 = 1, } impl From<FE_A> for bool { #[inline(always)] fn from(variant: FE_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `FE`"] pub type FE_R = crate::R<bool, FE_A>; impl FE_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> FE_A { match self.bits { false => FE_A::_0, true => FE_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] #[inline(always)] pub fn is_0(&self) -> bool { *self == FE_A::_0 } #[doc = "Checks if the value of the field is `_1`"] #[inline(always)] pub fn is_1(&self) -> bool { *self == FE_A::_1 } } #[doc = "Noise Flag\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum NF_A { #[doc = "0: No noise detected since the last time this flag was cleared. If the receive buffer has a depth greater than 1 then there may be data in the receiver buffer that was received with noise."] _0 = 0, #[doc = "1: At least one dataword was received with noise detected since the last time the flag was cleared."] _1 = 1, } impl From<NF_A> for bool { #[inline(always)] fn from(variant: NF_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `NF`"] pub type NF_R = crate::R<bool, NF_A>; impl NF_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> NF_A { match self.bits { false => NF_A::_0, true => NF_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] #[inline(always)] pub fn is_0(&self) -> bool { *self == NF_A::_0 } #[doc = "Checks if the value of the field is `_1`"] #[inline(always)] pub fn is_1(&self) -> bool { *self == NF_A::_1 } } #[doc = "Receiver Overrun Flag\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum OR_A { #[doc = "0: No overrun has occurred since the last time the flag was cleared."] _0 = 0, #[doc = "1: Overrun has occurred or the overrun flag has not been cleared since the last overrun occured."] _1 = 1, } impl From<OR_A> for bool { #[inline(always)] fn from(variant: OR_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `OR`"] pub type OR_R = crate::R<bool, OR_A>; impl OR_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> OR_A { match self.bits { false => OR_A::_0, true => OR_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] #[inline(always)] pub fn is_0(&self) -> bool { *self == OR_A::_0 } #[doc = "Checks if the value of the field is `_1`"] #[inline(always)] pub fn is_1(&self) -> bool { *self == OR_A::_1 } } #[doc = "Idle Line Flag\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum IDLE_A { #[doc = "0: Receiver input is either active now or has never become active since the IDLE flag was last cleared."] _0 = 0, #[doc = "1: Receiver input has become idle or the flag has not been cleared since it last asserted."] _1 = 1, } impl From<IDLE_A> for bool { #[inline(always)] fn from(variant: IDLE_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `IDLE`"] pub type IDLE_R = crate::R<bool, IDLE_A>; impl IDLE_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> IDLE_A { match self.bits { false => IDLE_A::_0, true => IDLE_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] #[inline(always)] pub fn is_0(&self) -> bool { *self == IDLE_A::_0 } #[doc = "Checks if the value of the field is `_1`"] #[inline(always)] pub fn is_1(&self) -> bool { *self == IDLE_A::_1 } } #[doc = "Receive Data Register Full Flag\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum RDRF_A { #[doc = "0: The number of datawords in the receive buffer is less than the number indicated by RXWATER."] _0 = 0, #[doc = "1: The number of datawords in the receive buffer is equal to or greater than the number indicated by RXWATER at some point in time since this flag was last cleared."] _1 = 1, } impl From<RDRF_A> for bool { #[inline(always)] fn from(variant: RDRF_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `RDRF`"] pub type RDRF_R = crate::R<bool, RDRF_A>; impl RDRF_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> RDRF_A { match self.bits { false => RDRF_A::_0, true => RDRF_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] #[inline(always)] pub fn is_0(&self) -> bool { *self == RDRF_A::_0 } #[doc = "Checks if the value of the field is `_1`"] #[inline(always)] pub fn is_1(&self) -> bool { *self == RDRF_A::_1 } } #[doc = "Transmit Complete Flag\n\nValue on reset: 1"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum TC_A { #[doc = "0: Transmitter active (sending data, a preamble, or a break)."] _0 = 0, #[doc = "1: Transmitter idle (transmission activity complete)."] _1 = 1, } impl From<TC_A> for bool { #[inline(always)] fn from(variant: TC_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `TC`"] pub type TC_R = crate::R<bool, TC_A>; impl TC_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> TC_A { match self.bits { false => TC_A::_0, true => TC_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] #[inline(always)] pub fn is_0(&self) -> bool { *self == TC_A::_0 } #[doc = "Checks if the value of the field is `_1`"] #[inline(always)] pub fn is_1(&self) -> bool { *self == TC_A::_1 } } #[doc = "Transmit Data Register Empty Flag\n\nValue on reset: 1"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum TDRE_A { #[doc = "0: The amount of data in the transmit buffer is greater than the value indicated by TWFIFO\\[TXWATER\\]."] _0 = 0, #[doc = "1: The amount of data in the transmit buffer is less than or equal to the value indicated by TWFIFO\\[TXWATER\\] at some point in time since the flag has been cleared."] _1 = 1, } impl From<TDRE_A> for bool { #[inline(always)] fn from(variant: TDRE_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `TDRE`"] pub type TDRE_R = crate::R<bool, TDRE_A>; impl TDRE_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> TDRE_A { match self.bits { false => TDRE_A::_0, true => TDRE_A::_1, } } #[doc = "Checks if the value of the field is `_0`"] #[inline(always)] pub fn is_0(&self) -> bool { *self == TDRE_A::_0 } #[doc = "Checks if the value of the field is `_1`"] #[inline(always)] pub fn is_1(&self) -> bool { *self == TDRE_A::_1 } } impl R { #[doc = "Bit 0 - Parity Error Flag"] #[inline(always)] pub fn pf(&self) -> PF_R { PF_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Framing Error Flag"] #[inline(always)] pub fn fe(&self) -> FE_R { FE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Noise Flag"] #[inline(always)] pub fn nf(&self) -> NF_R { NF_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Receiver Overrun Flag"] #[inline(always)] pub fn or(&self) -> OR_R { OR_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Idle Line Flag"] #[inline(always)] pub fn idle(&self) -> IDLE_R { IDLE_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Receive Data Register Full Flag"] #[inline(always)] pub fn rdrf(&self) -> RDRF_R { RDRF_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Transmit Complete Flag"] #[inline(always)] pub fn tc(&self) -> TC_R { TC_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Transmit Data Register Empty Flag"] #[inline(always)] pub fn tdre(&self) -> TDRE_R { TDRE_R::new(((self.bits >> 7) & 0x01) != 0) } }