atsam4ls2b_pac/acifc/
sr.rs

1#[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 `ACCS0` reader - AC0 Current Comparison Status"]
17pub type ACCS0_R = crate::BitReader<bool>;
18#[doc = "Field `ACRDY0` reader - AC0 Ready"]
19pub type ACRDY0_R = crate::BitReader<bool>;
20#[doc = "Field `ACCS1` reader - AC1 Current Comparison Status"]
21pub type ACCS1_R = crate::BitReader<bool>;
22#[doc = "Field `ACRDY1` reader - AC1 Ready"]
23pub type ACRDY1_R = crate::BitReader<bool>;
24#[doc = "Field `ACCS2` reader - AC2 Current Comparison Status"]
25pub type ACCS2_R = crate::BitReader<bool>;
26#[doc = "Field `ACRDY2` reader - AC2 Ready"]
27pub type ACRDY2_R = crate::BitReader<bool>;
28#[doc = "Field `ACCS3` reader - AC3 Current Comparison Status"]
29pub type ACCS3_R = crate::BitReader<bool>;
30#[doc = "Field `ACRDY3` reader - AC3 Ready"]
31pub type ACRDY3_R = crate::BitReader<bool>;
32#[doc = "Field `ACCS4` reader - AC4 Current Comparison Status"]
33pub type ACCS4_R = crate::BitReader<bool>;
34#[doc = "Field `ACRDY4` reader - AC4 Ready"]
35pub type ACRDY4_R = crate::BitReader<bool>;
36#[doc = "Field `ACCS5` reader - AC5 Current Comparison Status"]
37pub type ACCS5_R = crate::BitReader<bool>;
38#[doc = "Field `ACRDY5` reader - AC5 Ready"]
39pub type ACRDY5_R = crate::BitReader<bool>;
40#[doc = "Field `ACCS6` reader - AC6 Current Comparison Status"]
41pub type ACCS6_R = crate::BitReader<bool>;
42#[doc = "Field `ACRDY6` reader - AC6 Ready"]
43pub type ACRDY6_R = crate::BitReader<bool>;
44#[doc = "Field `ACCS7` reader - AC7 Current Comparison Status"]
45pub type ACCS7_R = crate::BitReader<bool>;
46#[doc = "Field `ACRDY7` reader - AC7 Ready"]
47pub type ACRDY7_R = crate::BitReader<bool>;
48#[doc = "Field `WFCS0` reader - Window0 Mode Current Status"]
49pub type WFCS0_R = crate::BitReader<bool>;
50#[doc = "Field `WFCS1` reader - Window1 Mode Current Status"]
51pub type WFCS1_R = crate::BitReader<bool>;
52#[doc = "Field `WFCS2` reader - Window2 Mode Current Status"]
53pub type WFCS2_R = crate::BitReader<bool>;
54#[doc = "Field `WFCS3` reader - Window3 Mode Current Status"]
55pub type WFCS3_R = crate::BitReader<bool>;
56impl R {
57    #[doc = "Bit 0 - AC0 Current Comparison Status"]
58    #[inline(always)]
59    pub fn accs0(&self) -> ACCS0_R {
60        ACCS0_R::new((self.bits & 1) != 0)
61    }
62    #[doc = "Bit 1 - AC0 Ready"]
63    #[inline(always)]
64    pub fn acrdy0(&self) -> ACRDY0_R {
65        ACRDY0_R::new(((self.bits >> 1) & 1) != 0)
66    }
67    #[doc = "Bit 2 - AC1 Current Comparison Status"]
68    #[inline(always)]
69    pub fn accs1(&self) -> ACCS1_R {
70        ACCS1_R::new(((self.bits >> 2) & 1) != 0)
71    }
72    #[doc = "Bit 3 - AC1 Ready"]
73    #[inline(always)]
74    pub fn acrdy1(&self) -> ACRDY1_R {
75        ACRDY1_R::new(((self.bits >> 3) & 1) != 0)
76    }
77    #[doc = "Bit 4 - AC2 Current Comparison Status"]
78    #[inline(always)]
79    pub fn accs2(&self) -> ACCS2_R {
80        ACCS2_R::new(((self.bits >> 4) & 1) != 0)
81    }
82    #[doc = "Bit 5 - AC2 Ready"]
83    #[inline(always)]
84    pub fn acrdy2(&self) -> ACRDY2_R {
85        ACRDY2_R::new(((self.bits >> 5) & 1) != 0)
86    }
87    #[doc = "Bit 6 - AC3 Current Comparison Status"]
88    #[inline(always)]
89    pub fn accs3(&self) -> ACCS3_R {
90        ACCS3_R::new(((self.bits >> 6) & 1) != 0)
91    }
92    #[doc = "Bit 7 - AC3 Ready"]
93    #[inline(always)]
94    pub fn acrdy3(&self) -> ACRDY3_R {
95        ACRDY3_R::new(((self.bits >> 7) & 1) != 0)
96    }
97    #[doc = "Bit 8 - AC4 Current Comparison Status"]
98    #[inline(always)]
99    pub fn accs4(&self) -> ACCS4_R {
100        ACCS4_R::new(((self.bits >> 8) & 1) != 0)
101    }
102    #[doc = "Bit 9 - AC4 Ready"]
103    #[inline(always)]
104    pub fn acrdy4(&self) -> ACRDY4_R {
105        ACRDY4_R::new(((self.bits >> 9) & 1) != 0)
106    }
107    #[doc = "Bit 10 - AC5 Current Comparison Status"]
108    #[inline(always)]
109    pub fn accs5(&self) -> ACCS5_R {
110        ACCS5_R::new(((self.bits >> 10) & 1) != 0)
111    }
112    #[doc = "Bit 11 - AC5 Ready"]
113    #[inline(always)]
114    pub fn acrdy5(&self) -> ACRDY5_R {
115        ACRDY5_R::new(((self.bits >> 11) & 1) != 0)
116    }
117    #[doc = "Bit 12 - AC6 Current Comparison Status"]
118    #[inline(always)]
119    pub fn accs6(&self) -> ACCS6_R {
120        ACCS6_R::new(((self.bits >> 12) & 1) != 0)
121    }
122    #[doc = "Bit 13 - AC6 Ready"]
123    #[inline(always)]
124    pub fn acrdy6(&self) -> ACRDY6_R {
125        ACRDY6_R::new(((self.bits >> 13) & 1) != 0)
126    }
127    #[doc = "Bit 14 - AC7 Current Comparison Status"]
128    #[inline(always)]
129    pub fn accs7(&self) -> ACCS7_R {
130        ACCS7_R::new(((self.bits >> 14) & 1) != 0)
131    }
132    #[doc = "Bit 15 - AC7 Ready"]
133    #[inline(always)]
134    pub fn acrdy7(&self) -> ACRDY7_R {
135        ACRDY7_R::new(((self.bits >> 15) & 1) != 0)
136    }
137    #[doc = "Bit 24 - Window0 Mode Current Status"]
138    #[inline(always)]
139    pub fn wfcs0(&self) -> WFCS0_R {
140        WFCS0_R::new(((self.bits >> 24) & 1) != 0)
141    }
142    #[doc = "Bit 25 - Window1 Mode Current Status"]
143    #[inline(always)]
144    pub fn wfcs1(&self) -> WFCS1_R {
145        WFCS1_R::new(((self.bits >> 25) & 1) != 0)
146    }
147    #[doc = "Bit 26 - Window2 Mode Current Status"]
148    #[inline(always)]
149    pub fn wfcs2(&self) -> WFCS2_R {
150        WFCS2_R::new(((self.bits >> 26) & 1) != 0)
151    }
152    #[doc = "Bit 27 - Window3 Mode Current Status"]
153    #[inline(always)]
154    pub fn wfcs3(&self) -> WFCS3_R {
155        WFCS3_R::new(((self.bits >> 27) & 1) != 0)
156    }
157}
158#[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"]
159pub struct SR_SPEC;
160impl crate::RegisterSpec for SR_SPEC {
161    type Ux = u32;
162}
163#[doc = "`read()` method returns [sr::R](R) reader structure"]
164impl crate::Readable for SR_SPEC {
165    type Reader = R;
166}
167#[doc = "`reset()` method sets SR to value 0"]
168impl crate::Resettable for SR_SPEC {
169    const RESET_VALUE: Self::Ux = 0;
170}