efm32tg11b340_pac/usart0/
rxdoublex.rs1#[doc = "Register `RXDOUBLEX` reader"]
2pub struct R(crate::R<RXDOUBLEX_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<RXDOUBLEX_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<RXDOUBLEX_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<RXDOUBLEX_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `RXDATA0` reader - RX Data 0"]
17pub type RXDATA0_R = crate::FieldReader<u16, u16>;
18#[doc = "Field `PERR0` reader - Data Parity Error 0"]
19pub type PERR0_R = crate::BitReader<bool>;
20#[doc = "Field `FERR0` reader - Data Framing Error 0"]
21pub type FERR0_R = crate::BitReader<bool>;
22#[doc = "Field `RXDATA1` reader - RX Data 1"]
23pub type RXDATA1_R = crate::FieldReader<u16, u16>;
24#[doc = "Field `PERR1` reader - Data Parity Error 1"]
25pub type PERR1_R = crate::BitReader<bool>;
26#[doc = "Field `FERR1` reader - Data Framing Error 1"]
27pub type FERR1_R = crate::BitReader<bool>;
28impl R {
29 #[doc = "Bits 0:8 - RX Data 0"]
30 #[inline(always)]
31 pub fn rxdata0(&self) -> RXDATA0_R {
32 RXDATA0_R::new((self.bits & 0x01ff) as u16)
33 }
34 #[doc = "Bit 14 - Data Parity Error 0"]
35 #[inline(always)]
36 pub fn perr0(&self) -> PERR0_R {
37 PERR0_R::new(((self.bits >> 14) & 1) != 0)
38 }
39 #[doc = "Bit 15 - Data Framing Error 0"]
40 #[inline(always)]
41 pub fn ferr0(&self) -> FERR0_R {
42 FERR0_R::new(((self.bits >> 15) & 1) != 0)
43 }
44 #[doc = "Bits 16:24 - RX Data 1"]
45 #[inline(always)]
46 pub fn rxdata1(&self) -> RXDATA1_R {
47 RXDATA1_R::new(((self.bits >> 16) & 0x01ff) as u16)
48 }
49 #[doc = "Bit 30 - Data Parity Error 1"]
50 #[inline(always)]
51 pub fn perr1(&self) -> PERR1_R {
52 PERR1_R::new(((self.bits >> 30) & 1) != 0)
53 }
54 #[doc = "Bit 31 - Data Framing Error 1"]
55 #[inline(always)]
56 pub fn ferr1(&self) -> FERR1_R {
57 FERR1_R::new(((self.bits >> 31) & 1) != 0)
58 }
59}
60#[doc = "RX Buffer Double Data Extended Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rxdoublex](index.html) module\n\nOne or more dependent resources other than the current register are immediately affected by a read operation."]
61pub struct RXDOUBLEX_SPEC;
62impl crate::RegisterSpec for RXDOUBLEX_SPEC {
63 type Ux = u32;
64}
65#[doc = "`read()` method returns [rxdoublex::R](R) reader structure"]
66impl crate::Readable for RXDOUBLEX_SPEC {
67 type Reader = R;
68}
69#[doc = "`reset()` method sets RXDOUBLEX to value 0"]
70impl crate::Resettable for RXDOUBLEX_SPEC {
71 #[inline(always)]
72 fn reset_value() -> Self::Ux {
73 0
74 }
75}