atsam4sd16b_pac/ssc/
sr.rs1#[doc = "Register `SR` reader"]
2pub struct R(crate::R<SR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<SR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<SR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<SR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `TXRDY` reader - Transmit Ready"]
17pub type TXRDY_R = crate::BitReader<bool>;
18#[doc = "Field `TXEMPTY` reader - Transmit Empty"]
19pub type TXEMPTY_R = crate::BitReader<bool>;
20#[doc = "Field `ENDTX` reader - End of Transmission"]
21pub type ENDTX_R = crate::BitReader<bool>;
22#[doc = "Field `TXBUFE` reader - "]
23pub type TXBUFE_R = crate::BitReader<bool>;
24#[doc = "Field `RXRDY` reader - Receive Ready"]
25pub type RXRDY_R = crate::BitReader<bool>;
26#[doc = "Field `OVRUN` reader - Receive Overrun"]
27pub type OVRUN_R = crate::BitReader<bool>;
28#[doc = "Field `ENDRX` reader - End of Reception"]
29pub type ENDRX_R = crate::BitReader<bool>;
30#[doc = "Field `RXBUFF` reader - "]
31pub type RXBUFF_R = crate::BitReader<bool>;
32#[doc = "Field `CP0` reader - Compare 0"]
33pub type CP0_R = crate::BitReader<bool>;
34#[doc = "Field `CP1` reader - Compare 1"]
35pub type CP1_R = crate::BitReader<bool>;
36#[doc = "Field `TXSYN` reader - Transmit Sync"]
37pub type TXSYN_R = crate::BitReader<bool>;
38#[doc = "Field `RXSYN` reader - Receive Sync"]
39pub type RXSYN_R = crate::BitReader<bool>;
40#[doc = "Field `TXEN` reader - Transmit Enable"]
41pub type TXEN_R = crate::BitReader<bool>;
42#[doc = "Field `RXEN` reader - Receive Enable"]
43pub type RXEN_R = crate::BitReader<bool>;
44impl R {
45 #[doc = "Bit 0 - Transmit Ready"]
46 #[inline(always)]
47 pub fn txrdy(&self) -> TXRDY_R {
48 TXRDY_R::new((self.bits & 1) != 0)
49 }
50 #[doc = "Bit 1 - Transmit Empty"]
51 #[inline(always)]
52 pub fn txempty(&self) -> TXEMPTY_R {
53 TXEMPTY_R::new(((self.bits >> 1) & 1) != 0)
54 }
55 #[doc = "Bit 2 - End of Transmission"]
56 #[inline(always)]
57 pub fn endtx(&self) -> ENDTX_R {
58 ENDTX_R::new(((self.bits >> 2) & 1) != 0)
59 }
60 #[doc = "Bit 3"]
61 #[inline(always)]
62 pub fn txbufe(&self) -> TXBUFE_R {
63 TXBUFE_R::new(((self.bits >> 3) & 1) != 0)
64 }
65 #[doc = "Bit 4 - Receive Ready"]
66 #[inline(always)]
67 pub fn rxrdy(&self) -> RXRDY_R {
68 RXRDY_R::new(((self.bits >> 4) & 1) != 0)
69 }
70 #[doc = "Bit 5 - Receive Overrun"]
71 #[inline(always)]
72 pub fn ovrun(&self) -> OVRUN_R {
73 OVRUN_R::new(((self.bits >> 5) & 1) != 0)
74 }
75 #[doc = "Bit 6 - End of Reception"]
76 #[inline(always)]
77 pub fn endrx(&self) -> ENDRX_R {
78 ENDRX_R::new(((self.bits >> 6) & 1) != 0)
79 }
80 #[doc = "Bit 7"]
81 #[inline(always)]
82 pub fn rxbuff(&self) -> RXBUFF_R {
83 RXBUFF_R::new(((self.bits >> 7) & 1) != 0)
84 }
85 #[doc = "Bit 8 - Compare 0"]
86 #[inline(always)]
87 pub fn cp0(&self) -> CP0_R {
88 CP0_R::new(((self.bits >> 8) & 1) != 0)
89 }
90 #[doc = "Bit 9 - Compare 1"]
91 #[inline(always)]
92 pub fn cp1(&self) -> CP1_R {
93 CP1_R::new(((self.bits >> 9) & 1) != 0)
94 }
95 #[doc = "Bit 10 - Transmit Sync"]
96 #[inline(always)]
97 pub fn txsyn(&self) -> TXSYN_R {
98 TXSYN_R::new(((self.bits >> 10) & 1) != 0)
99 }
100 #[doc = "Bit 11 - Receive Sync"]
101 #[inline(always)]
102 pub fn rxsyn(&self) -> RXSYN_R {
103 RXSYN_R::new(((self.bits >> 11) & 1) != 0)
104 }
105 #[doc = "Bit 16 - Transmit Enable"]
106 #[inline(always)]
107 pub fn txen(&self) -> TXEN_R {
108 TXEN_R::new(((self.bits >> 16) & 1) != 0)
109 }
110 #[doc = "Bit 17 - Receive Enable"]
111 #[inline(always)]
112 pub fn rxen(&self) -> RXEN_R {
113 RXEN_R::new(((self.bits >> 17) & 1) != 0)
114 }
115}
116#[doc = "Status 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 [sr](index.html) module"]
117pub struct SR_SPEC;
118impl crate::RegisterSpec for SR_SPEC {
119 type Ux = u32;
120}
121#[doc = "`read()` method returns [sr::R](R) reader structure"]
122impl crate::Readable for SR_SPEC {
123 type Reader = R;
124}
125#[doc = "`reset()` method sets SR to value 0xcc"]
126impl crate::Resettable for SR_SPEC {
127 const RESET_VALUE: Self::Ux = 0xcc;
128}