atsams70n21/afec0/
afec_over.rs1#[doc = "Register `AFEC_OVER` reader"]
2pub struct R(crate::R<AFEC_OVER_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<AFEC_OVER_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<AFEC_OVER_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<AFEC_OVER_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `OVRE0` reader - Overrun Error 0"]
17pub struct OVRE0_R(crate::FieldReader<bool, bool>);
18impl OVRE0_R {
19 #[inline(always)]
20 pub(crate) fn new(bits: bool) -> Self {
21 OVRE0_R(crate::FieldReader::new(bits))
22 }
23}
24impl core::ops::Deref for OVRE0_R {
25 type Target = crate::FieldReader<bool, bool>;
26 #[inline(always)]
27 fn deref(&self) -> &Self::Target {
28 &self.0
29 }
30}
31#[doc = "Field `OVRE1` reader - Overrun Error 1"]
32pub struct OVRE1_R(crate::FieldReader<bool, bool>);
33impl OVRE1_R {
34 #[inline(always)]
35 pub(crate) fn new(bits: bool) -> Self {
36 OVRE1_R(crate::FieldReader::new(bits))
37 }
38}
39impl core::ops::Deref for OVRE1_R {
40 type Target = crate::FieldReader<bool, bool>;
41 #[inline(always)]
42 fn deref(&self) -> &Self::Target {
43 &self.0
44 }
45}
46#[doc = "Field `OVRE2` reader - Overrun Error 2"]
47pub struct OVRE2_R(crate::FieldReader<bool, bool>);
48impl OVRE2_R {
49 #[inline(always)]
50 pub(crate) fn new(bits: bool) -> Self {
51 OVRE2_R(crate::FieldReader::new(bits))
52 }
53}
54impl core::ops::Deref for OVRE2_R {
55 type Target = crate::FieldReader<bool, bool>;
56 #[inline(always)]
57 fn deref(&self) -> &Self::Target {
58 &self.0
59 }
60}
61#[doc = "Field `OVRE3` reader - Overrun Error 3"]
62pub struct OVRE3_R(crate::FieldReader<bool, bool>);
63impl OVRE3_R {
64 #[inline(always)]
65 pub(crate) fn new(bits: bool) -> Self {
66 OVRE3_R(crate::FieldReader::new(bits))
67 }
68}
69impl core::ops::Deref for OVRE3_R {
70 type Target = crate::FieldReader<bool, bool>;
71 #[inline(always)]
72 fn deref(&self) -> &Self::Target {
73 &self.0
74 }
75}
76#[doc = "Field `OVRE4` reader - Overrun Error 4"]
77pub struct OVRE4_R(crate::FieldReader<bool, bool>);
78impl OVRE4_R {
79 #[inline(always)]
80 pub(crate) fn new(bits: bool) -> Self {
81 OVRE4_R(crate::FieldReader::new(bits))
82 }
83}
84impl core::ops::Deref for OVRE4_R {
85 type Target = crate::FieldReader<bool, bool>;
86 #[inline(always)]
87 fn deref(&self) -> &Self::Target {
88 &self.0
89 }
90}
91#[doc = "Field `OVRE5` reader - Overrun Error 5"]
92pub struct OVRE5_R(crate::FieldReader<bool, bool>);
93impl OVRE5_R {
94 #[inline(always)]
95 pub(crate) fn new(bits: bool) -> Self {
96 OVRE5_R(crate::FieldReader::new(bits))
97 }
98}
99impl core::ops::Deref for OVRE5_R {
100 type Target = crate::FieldReader<bool, bool>;
101 #[inline(always)]
102 fn deref(&self) -> &Self::Target {
103 &self.0
104 }
105}
106#[doc = "Field `OVRE6` reader - Overrun Error 6"]
107pub struct OVRE6_R(crate::FieldReader<bool, bool>);
108impl OVRE6_R {
109 #[inline(always)]
110 pub(crate) fn new(bits: bool) -> Self {
111 OVRE6_R(crate::FieldReader::new(bits))
112 }
113}
114impl core::ops::Deref for OVRE6_R {
115 type Target = crate::FieldReader<bool, bool>;
116 #[inline(always)]
117 fn deref(&self) -> &Self::Target {
118 &self.0
119 }
120}
121#[doc = "Field `OVRE7` reader - Overrun Error 7"]
122pub struct OVRE7_R(crate::FieldReader<bool, bool>);
123impl OVRE7_R {
124 #[inline(always)]
125 pub(crate) fn new(bits: bool) -> Self {
126 OVRE7_R(crate::FieldReader::new(bits))
127 }
128}
129impl core::ops::Deref for OVRE7_R {
130 type Target = crate::FieldReader<bool, bool>;
131 #[inline(always)]
132 fn deref(&self) -> &Self::Target {
133 &self.0
134 }
135}
136#[doc = "Field `OVRE8` reader - Overrun Error 8"]
137pub struct OVRE8_R(crate::FieldReader<bool, bool>);
138impl OVRE8_R {
139 #[inline(always)]
140 pub(crate) fn new(bits: bool) -> Self {
141 OVRE8_R(crate::FieldReader::new(bits))
142 }
143}
144impl core::ops::Deref for OVRE8_R {
145 type Target = crate::FieldReader<bool, bool>;
146 #[inline(always)]
147 fn deref(&self) -> &Self::Target {
148 &self.0
149 }
150}
151#[doc = "Field `OVRE9` reader - Overrun Error 9"]
152pub struct OVRE9_R(crate::FieldReader<bool, bool>);
153impl OVRE9_R {
154 #[inline(always)]
155 pub(crate) fn new(bits: bool) -> Self {
156 OVRE9_R(crate::FieldReader::new(bits))
157 }
158}
159impl core::ops::Deref for OVRE9_R {
160 type Target = crate::FieldReader<bool, bool>;
161 #[inline(always)]
162 fn deref(&self) -> &Self::Target {
163 &self.0
164 }
165}
166#[doc = "Field `OVRE10` reader - Overrun Error 10"]
167pub struct OVRE10_R(crate::FieldReader<bool, bool>);
168impl OVRE10_R {
169 #[inline(always)]
170 pub(crate) fn new(bits: bool) -> Self {
171 OVRE10_R(crate::FieldReader::new(bits))
172 }
173}
174impl core::ops::Deref for OVRE10_R {
175 type Target = crate::FieldReader<bool, bool>;
176 #[inline(always)]
177 fn deref(&self) -> &Self::Target {
178 &self.0
179 }
180}
181#[doc = "Field `OVRE11` reader - Overrun Error 11"]
182pub struct OVRE11_R(crate::FieldReader<bool, bool>);
183impl OVRE11_R {
184 #[inline(always)]
185 pub(crate) fn new(bits: bool) -> Self {
186 OVRE11_R(crate::FieldReader::new(bits))
187 }
188}
189impl core::ops::Deref for OVRE11_R {
190 type Target = crate::FieldReader<bool, bool>;
191 #[inline(always)]
192 fn deref(&self) -> &Self::Target {
193 &self.0
194 }
195}
196impl R {
197 #[doc = "Bit 0 - Overrun Error 0"]
198 #[inline(always)]
199 pub fn ovre0(&self) -> OVRE0_R {
200 OVRE0_R::new((self.bits & 0x01) != 0)
201 }
202 #[doc = "Bit 1 - Overrun Error 1"]
203 #[inline(always)]
204 pub fn ovre1(&self) -> OVRE1_R {
205 OVRE1_R::new(((self.bits >> 1) & 0x01) != 0)
206 }
207 #[doc = "Bit 2 - Overrun Error 2"]
208 #[inline(always)]
209 pub fn ovre2(&self) -> OVRE2_R {
210 OVRE2_R::new(((self.bits >> 2) & 0x01) != 0)
211 }
212 #[doc = "Bit 3 - Overrun Error 3"]
213 #[inline(always)]
214 pub fn ovre3(&self) -> OVRE3_R {
215 OVRE3_R::new(((self.bits >> 3) & 0x01) != 0)
216 }
217 #[doc = "Bit 4 - Overrun Error 4"]
218 #[inline(always)]
219 pub fn ovre4(&self) -> OVRE4_R {
220 OVRE4_R::new(((self.bits >> 4) & 0x01) != 0)
221 }
222 #[doc = "Bit 5 - Overrun Error 5"]
223 #[inline(always)]
224 pub fn ovre5(&self) -> OVRE5_R {
225 OVRE5_R::new(((self.bits >> 5) & 0x01) != 0)
226 }
227 #[doc = "Bit 6 - Overrun Error 6"]
228 #[inline(always)]
229 pub fn ovre6(&self) -> OVRE6_R {
230 OVRE6_R::new(((self.bits >> 6) & 0x01) != 0)
231 }
232 #[doc = "Bit 7 - Overrun Error 7"]
233 #[inline(always)]
234 pub fn ovre7(&self) -> OVRE7_R {
235 OVRE7_R::new(((self.bits >> 7) & 0x01) != 0)
236 }
237 #[doc = "Bit 8 - Overrun Error 8"]
238 #[inline(always)]
239 pub fn ovre8(&self) -> OVRE8_R {
240 OVRE8_R::new(((self.bits >> 8) & 0x01) != 0)
241 }
242 #[doc = "Bit 9 - Overrun Error 9"]
243 #[inline(always)]
244 pub fn ovre9(&self) -> OVRE9_R {
245 OVRE9_R::new(((self.bits >> 9) & 0x01) != 0)
246 }
247 #[doc = "Bit 10 - Overrun Error 10"]
248 #[inline(always)]
249 pub fn ovre10(&self) -> OVRE10_R {
250 OVRE10_R::new(((self.bits >> 10) & 0x01) != 0)
251 }
252 #[doc = "Bit 11 - Overrun Error 11"]
253 #[inline(always)]
254 pub fn ovre11(&self) -> OVRE11_R {
255 OVRE11_R::new(((self.bits >> 11) & 0x01) != 0)
256 }
257}
258#[doc = "AFEC Overrun 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 [afec_over](index.html) module"]
259pub struct AFEC_OVER_SPEC;
260impl crate::RegisterSpec for AFEC_OVER_SPEC {
261 type Ux = u32;
262}
263#[doc = "`read()` method returns [afec_over::R](R) reader structure"]
264impl crate::Readable for AFEC_OVER_SPEC {
265 type Reader = R;
266}
267#[doc = "`reset()` method sets AFEC_OVER to value 0"]
268impl crate::Resettable for AFEC_OVER_SPEC {
269 #[inline(always)]
270 fn reset_value() -> Self::Ux {
271 0
272 }
273}