atsams70j21/afec0/
afec_isr.rs1#[doc = "Register `AFEC_ISR` reader"]
2pub struct R(crate::R<AFEC_ISR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<AFEC_ISR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<AFEC_ISR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<AFEC_ISR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `EOC0` reader - End of Conversion 0 (cleared by reading AFEC_CDRx)"]
17pub struct EOC0_R(crate::FieldReader<bool, bool>);
18impl EOC0_R {
19 #[inline(always)]
20 pub(crate) fn new(bits: bool) -> Self {
21 EOC0_R(crate::FieldReader::new(bits))
22 }
23}
24impl core::ops::Deref for EOC0_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 `EOC1` reader - End of Conversion 1 (cleared by reading AFEC_CDRx)"]
32pub struct EOC1_R(crate::FieldReader<bool, bool>);
33impl EOC1_R {
34 #[inline(always)]
35 pub(crate) fn new(bits: bool) -> Self {
36 EOC1_R(crate::FieldReader::new(bits))
37 }
38}
39impl core::ops::Deref for EOC1_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 `EOC2` reader - End of Conversion 2 (cleared by reading AFEC_CDRx)"]
47pub struct EOC2_R(crate::FieldReader<bool, bool>);
48impl EOC2_R {
49 #[inline(always)]
50 pub(crate) fn new(bits: bool) -> Self {
51 EOC2_R(crate::FieldReader::new(bits))
52 }
53}
54impl core::ops::Deref for EOC2_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 `EOC3` reader - End of Conversion 3 (cleared by reading AFEC_CDRx)"]
62pub struct EOC3_R(crate::FieldReader<bool, bool>);
63impl EOC3_R {
64 #[inline(always)]
65 pub(crate) fn new(bits: bool) -> Self {
66 EOC3_R(crate::FieldReader::new(bits))
67 }
68}
69impl core::ops::Deref for EOC3_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 `EOC4` reader - End of Conversion 4 (cleared by reading AFEC_CDRx)"]
77pub struct EOC4_R(crate::FieldReader<bool, bool>);
78impl EOC4_R {
79 #[inline(always)]
80 pub(crate) fn new(bits: bool) -> Self {
81 EOC4_R(crate::FieldReader::new(bits))
82 }
83}
84impl core::ops::Deref for EOC4_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 `EOC5` reader - End of Conversion 5 (cleared by reading AFEC_CDRx)"]
92pub struct EOC5_R(crate::FieldReader<bool, bool>);
93impl EOC5_R {
94 #[inline(always)]
95 pub(crate) fn new(bits: bool) -> Self {
96 EOC5_R(crate::FieldReader::new(bits))
97 }
98}
99impl core::ops::Deref for EOC5_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 `EOC6` reader - End of Conversion 6 (cleared by reading AFEC_CDRx)"]
107pub struct EOC6_R(crate::FieldReader<bool, bool>);
108impl EOC6_R {
109 #[inline(always)]
110 pub(crate) fn new(bits: bool) -> Self {
111 EOC6_R(crate::FieldReader::new(bits))
112 }
113}
114impl core::ops::Deref for EOC6_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 `EOC7` reader - End of Conversion 7 (cleared by reading AFEC_CDRx)"]
122pub struct EOC7_R(crate::FieldReader<bool, bool>);
123impl EOC7_R {
124 #[inline(always)]
125 pub(crate) fn new(bits: bool) -> Self {
126 EOC7_R(crate::FieldReader::new(bits))
127 }
128}
129impl core::ops::Deref for EOC7_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 `EOC8` reader - End of Conversion 8 (cleared by reading AFEC_CDRx)"]
137pub struct EOC8_R(crate::FieldReader<bool, bool>);
138impl EOC8_R {
139 #[inline(always)]
140 pub(crate) fn new(bits: bool) -> Self {
141 EOC8_R(crate::FieldReader::new(bits))
142 }
143}
144impl core::ops::Deref for EOC8_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 `EOC9` reader - End of Conversion 9 (cleared by reading AFEC_CDRx)"]
152pub struct EOC9_R(crate::FieldReader<bool, bool>);
153impl EOC9_R {
154 #[inline(always)]
155 pub(crate) fn new(bits: bool) -> Self {
156 EOC9_R(crate::FieldReader::new(bits))
157 }
158}
159impl core::ops::Deref for EOC9_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 `EOC10` reader - End of Conversion 10 (cleared by reading AFEC_CDRx)"]
167pub struct EOC10_R(crate::FieldReader<bool, bool>);
168impl EOC10_R {
169 #[inline(always)]
170 pub(crate) fn new(bits: bool) -> Self {
171 EOC10_R(crate::FieldReader::new(bits))
172 }
173}
174impl core::ops::Deref for EOC10_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 `EOC11` reader - End of Conversion 11 (cleared by reading AFEC_CDRx)"]
182pub struct EOC11_R(crate::FieldReader<bool, bool>);
183impl EOC11_R {
184 #[inline(always)]
185 pub(crate) fn new(bits: bool) -> Self {
186 EOC11_R(crate::FieldReader::new(bits))
187 }
188}
189impl core::ops::Deref for EOC11_R {
190 type Target = crate::FieldReader<bool, bool>;
191 #[inline(always)]
192 fn deref(&self) -> &Self::Target {
193 &self.0
194 }
195}
196#[doc = "Field `DRDY` reader - Data Ready (cleared by reading AFEC_LCDR)"]
197pub struct DRDY_R(crate::FieldReader<bool, bool>);
198impl DRDY_R {
199 #[inline(always)]
200 pub(crate) fn new(bits: bool) -> Self {
201 DRDY_R(crate::FieldReader::new(bits))
202 }
203}
204impl core::ops::Deref for DRDY_R {
205 type Target = crate::FieldReader<bool, bool>;
206 #[inline(always)]
207 fn deref(&self) -> &Self::Target {
208 &self.0
209 }
210}
211#[doc = "Field `GOVRE` reader - General Overrun Error (cleared by reading AFEC_ISR)"]
212pub struct GOVRE_R(crate::FieldReader<bool, bool>);
213impl GOVRE_R {
214 #[inline(always)]
215 pub(crate) fn new(bits: bool) -> Self {
216 GOVRE_R(crate::FieldReader::new(bits))
217 }
218}
219impl core::ops::Deref for GOVRE_R {
220 type Target = crate::FieldReader<bool, bool>;
221 #[inline(always)]
222 fn deref(&self) -> &Self::Target {
223 &self.0
224 }
225}
226#[doc = "Field `COMPE` reader - Comparison Error (cleared by reading AFEC_ISR)"]
227pub struct COMPE_R(crate::FieldReader<bool, bool>);
228impl COMPE_R {
229 #[inline(always)]
230 pub(crate) fn new(bits: bool) -> Self {
231 COMPE_R(crate::FieldReader::new(bits))
232 }
233}
234impl core::ops::Deref for COMPE_R {
235 type Target = crate::FieldReader<bool, bool>;
236 #[inline(always)]
237 fn deref(&self) -> &Self::Target {
238 &self.0
239 }
240}
241#[doc = "Field `TEMPCHG` reader - Temperature Change (cleared on read)"]
242pub struct TEMPCHG_R(crate::FieldReader<bool, bool>);
243impl TEMPCHG_R {
244 #[inline(always)]
245 pub(crate) fn new(bits: bool) -> Self {
246 TEMPCHG_R(crate::FieldReader::new(bits))
247 }
248}
249impl core::ops::Deref for TEMPCHG_R {
250 type Target = crate::FieldReader<bool, bool>;
251 #[inline(always)]
252 fn deref(&self) -> &Self::Target {
253 &self.0
254 }
255}
256impl R {
257 #[doc = "Bit 0 - End of Conversion 0 (cleared by reading AFEC_CDRx)"]
258 #[inline(always)]
259 pub fn eoc0(&self) -> EOC0_R {
260 EOC0_R::new((self.bits & 0x01) != 0)
261 }
262 #[doc = "Bit 1 - End of Conversion 1 (cleared by reading AFEC_CDRx)"]
263 #[inline(always)]
264 pub fn eoc1(&self) -> EOC1_R {
265 EOC1_R::new(((self.bits >> 1) & 0x01) != 0)
266 }
267 #[doc = "Bit 2 - End of Conversion 2 (cleared by reading AFEC_CDRx)"]
268 #[inline(always)]
269 pub fn eoc2(&self) -> EOC2_R {
270 EOC2_R::new(((self.bits >> 2) & 0x01) != 0)
271 }
272 #[doc = "Bit 3 - End of Conversion 3 (cleared by reading AFEC_CDRx)"]
273 #[inline(always)]
274 pub fn eoc3(&self) -> EOC3_R {
275 EOC3_R::new(((self.bits >> 3) & 0x01) != 0)
276 }
277 #[doc = "Bit 4 - End of Conversion 4 (cleared by reading AFEC_CDRx)"]
278 #[inline(always)]
279 pub fn eoc4(&self) -> EOC4_R {
280 EOC4_R::new(((self.bits >> 4) & 0x01) != 0)
281 }
282 #[doc = "Bit 5 - End of Conversion 5 (cleared by reading AFEC_CDRx)"]
283 #[inline(always)]
284 pub fn eoc5(&self) -> EOC5_R {
285 EOC5_R::new(((self.bits >> 5) & 0x01) != 0)
286 }
287 #[doc = "Bit 6 - End of Conversion 6 (cleared by reading AFEC_CDRx)"]
288 #[inline(always)]
289 pub fn eoc6(&self) -> EOC6_R {
290 EOC6_R::new(((self.bits >> 6) & 0x01) != 0)
291 }
292 #[doc = "Bit 7 - End of Conversion 7 (cleared by reading AFEC_CDRx)"]
293 #[inline(always)]
294 pub fn eoc7(&self) -> EOC7_R {
295 EOC7_R::new(((self.bits >> 7) & 0x01) != 0)
296 }
297 #[doc = "Bit 8 - End of Conversion 8 (cleared by reading AFEC_CDRx)"]
298 #[inline(always)]
299 pub fn eoc8(&self) -> EOC8_R {
300 EOC8_R::new(((self.bits >> 8) & 0x01) != 0)
301 }
302 #[doc = "Bit 9 - End of Conversion 9 (cleared by reading AFEC_CDRx)"]
303 #[inline(always)]
304 pub fn eoc9(&self) -> EOC9_R {
305 EOC9_R::new(((self.bits >> 9) & 0x01) != 0)
306 }
307 #[doc = "Bit 10 - End of Conversion 10 (cleared by reading AFEC_CDRx)"]
308 #[inline(always)]
309 pub fn eoc10(&self) -> EOC10_R {
310 EOC10_R::new(((self.bits >> 10) & 0x01) != 0)
311 }
312 #[doc = "Bit 11 - End of Conversion 11 (cleared by reading AFEC_CDRx)"]
313 #[inline(always)]
314 pub fn eoc11(&self) -> EOC11_R {
315 EOC11_R::new(((self.bits >> 11) & 0x01) != 0)
316 }
317 #[doc = "Bit 24 - Data Ready (cleared by reading AFEC_LCDR)"]
318 #[inline(always)]
319 pub fn drdy(&self) -> DRDY_R {
320 DRDY_R::new(((self.bits >> 24) & 0x01) != 0)
321 }
322 #[doc = "Bit 25 - General Overrun Error (cleared by reading AFEC_ISR)"]
323 #[inline(always)]
324 pub fn govre(&self) -> GOVRE_R {
325 GOVRE_R::new(((self.bits >> 25) & 0x01) != 0)
326 }
327 #[doc = "Bit 26 - Comparison Error (cleared by reading AFEC_ISR)"]
328 #[inline(always)]
329 pub fn compe(&self) -> COMPE_R {
330 COMPE_R::new(((self.bits >> 26) & 0x01) != 0)
331 }
332 #[doc = "Bit 30 - Temperature Change (cleared on read)"]
333 #[inline(always)]
334 pub fn tempchg(&self) -> TEMPCHG_R {
335 TEMPCHG_R::new(((self.bits >> 30) & 0x01) != 0)
336 }
337}
338#[doc = "AFEC Interrupt 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_isr](index.html) module"]
339pub struct AFEC_ISR_SPEC;
340impl crate::RegisterSpec for AFEC_ISR_SPEC {
341 type Ux = u32;
342}
343#[doc = "`read()` method returns [afec_isr::R](R) reader structure"]
344impl crate::Readable for AFEC_ISR_SPEC {
345 type Reader = R;
346}
347#[doc = "`reset()` method sets AFEC_ISR to value 0"]
348impl crate::Resettable for AFEC_ISR_SPEC {
349 #[inline(always)]
350 fn reset_value() -> Self::Ux {
351 0
352 }
353}