atsam4lc8c/acifc/icr/
mod.rs1#[doc = r" Value to write to the register"]
2pub struct W {
3 bits: u32,
4}
5impl super::ICR {
6 #[doc = r" Writes to the register"]
7 #[inline]
8 pub fn write<F>(&self, f: F)
9 where
10 F: FnOnce(&mut W) -> &mut W,
11 {
12 let mut w = W::reset_value();
13 f(&mut w);
14 self.register.set(w.bits);
15 }
16}
17#[doc = r" Proxy"]
18pub struct _ACINT0W<'a> {
19 w: &'a mut W,
20}
21impl<'a> _ACINT0W<'a> {
22 #[doc = r" Sets the field bit"]
23 pub fn set_bit(self) -> &'a mut W {
24 self.bit(true)
25 }
26 #[doc = r" Clears the field bit"]
27 pub fn clear_bit(self) -> &'a mut W {
28 self.bit(false)
29 }
30 #[doc = r" Writes raw bits to the field"]
31 #[inline]
32 pub fn bit(self, value: bool) -> &'a mut W {
33 const MASK: bool = true;
34 const OFFSET: u8 = 0;
35 self.w.bits &= !((MASK as u32) << OFFSET);
36 self.w.bits |= ((value & MASK) as u32) << OFFSET;
37 self.w
38 }
39}
40#[doc = r" Proxy"]
41pub struct _SUTINT0W<'a> {
42 w: &'a mut W,
43}
44impl<'a> _SUTINT0W<'a> {
45 #[doc = r" Sets the field bit"]
46 pub fn set_bit(self) -> &'a mut W {
47 self.bit(true)
48 }
49 #[doc = r" Clears the field bit"]
50 pub fn clear_bit(self) -> &'a mut W {
51 self.bit(false)
52 }
53 #[doc = r" Writes raw bits to the field"]
54 #[inline]
55 pub fn bit(self, value: bool) -> &'a mut W {
56 const MASK: bool = true;
57 const OFFSET: u8 = 1;
58 self.w.bits &= !((MASK as u32) << OFFSET);
59 self.w.bits |= ((value & MASK) as u32) << OFFSET;
60 self.w
61 }
62}
63#[doc = r" Proxy"]
64pub struct _ACINT1W<'a> {
65 w: &'a mut W,
66}
67impl<'a> _ACINT1W<'a> {
68 #[doc = r" Sets the field bit"]
69 pub fn set_bit(self) -> &'a mut W {
70 self.bit(true)
71 }
72 #[doc = r" Clears the field bit"]
73 pub fn clear_bit(self) -> &'a mut W {
74 self.bit(false)
75 }
76 #[doc = r" Writes raw bits to the field"]
77 #[inline]
78 pub fn bit(self, value: bool) -> &'a mut W {
79 const MASK: bool = true;
80 const OFFSET: u8 = 2;
81 self.w.bits &= !((MASK as u32) << OFFSET);
82 self.w.bits |= ((value & MASK) as u32) << OFFSET;
83 self.w
84 }
85}
86#[doc = r" Proxy"]
87pub struct _SUTINT1W<'a> {
88 w: &'a mut W,
89}
90impl<'a> _SUTINT1W<'a> {
91 #[doc = r" Sets the field bit"]
92 pub fn set_bit(self) -> &'a mut W {
93 self.bit(true)
94 }
95 #[doc = r" Clears the field bit"]
96 pub fn clear_bit(self) -> &'a mut W {
97 self.bit(false)
98 }
99 #[doc = r" Writes raw bits to the field"]
100 #[inline]
101 pub fn bit(self, value: bool) -> &'a mut W {
102 const MASK: bool = true;
103 const OFFSET: u8 = 3;
104 self.w.bits &= !((MASK as u32) << OFFSET);
105 self.w.bits |= ((value & MASK) as u32) << OFFSET;
106 self.w
107 }
108}
109#[doc = r" Proxy"]
110pub struct _ACINT2W<'a> {
111 w: &'a mut W,
112}
113impl<'a> _ACINT2W<'a> {
114 #[doc = r" Sets the field bit"]
115 pub fn set_bit(self) -> &'a mut W {
116 self.bit(true)
117 }
118 #[doc = r" Clears the field bit"]
119 pub fn clear_bit(self) -> &'a mut W {
120 self.bit(false)
121 }
122 #[doc = r" Writes raw bits to the field"]
123 #[inline]
124 pub fn bit(self, value: bool) -> &'a mut W {
125 const MASK: bool = true;
126 const OFFSET: u8 = 4;
127 self.w.bits &= !((MASK as u32) << OFFSET);
128 self.w.bits |= ((value & MASK) as u32) << OFFSET;
129 self.w
130 }
131}
132#[doc = r" Proxy"]
133pub struct _SUTINT2W<'a> {
134 w: &'a mut W,
135}
136impl<'a> _SUTINT2W<'a> {
137 #[doc = r" Sets the field bit"]
138 pub fn set_bit(self) -> &'a mut W {
139 self.bit(true)
140 }
141 #[doc = r" Clears the field bit"]
142 pub fn clear_bit(self) -> &'a mut W {
143 self.bit(false)
144 }
145 #[doc = r" Writes raw bits to the field"]
146 #[inline]
147 pub fn bit(self, value: bool) -> &'a mut W {
148 const MASK: bool = true;
149 const OFFSET: u8 = 5;
150 self.w.bits &= !((MASK as u32) << OFFSET);
151 self.w.bits |= ((value & MASK) as u32) << OFFSET;
152 self.w
153 }
154}
155#[doc = r" Proxy"]
156pub struct _ACINT3W<'a> {
157 w: &'a mut W,
158}
159impl<'a> _ACINT3W<'a> {
160 #[doc = r" Sets the field bit"]
161 pub fn set_bit(self) -> &'a mut W {
162 self.bit(true)
163 }
164 #[doc = r" Clears the field bit"]
165 pub fn clear_bit(self) -> &'a mut W {
166 self.bit(false)
167 }
168 #[doc = r" Writes raw bits to the field"]
169 #[inline]
170 pub fn bit(self, value: bool) -> &'a mut W {
171 const MASK: bool = true;
172 const OFFSET: u8 = 6;
173 self.w.bits &= !((MASK as u32) << OFFSET);
174 self.w.bits |= ((value & MASK) as u32) << OFFSET;
175 self.w
176 }
177}
178#[doc = r" Proxy"]
179pub struct _SUTINT3W<'a> {
180 w: &'a mut W,
181}
182impl<'a> _SUTINT3W<'a> {
183 #[doc = r" Sets the field bit"]
184 pub fn set_bit(self) -> &'a mut W {
185 self.bit(true)
186 }
187 #[doc = r" Clears the field bit"]
188 pub fn clear_bit(self) -> &'a mut W {
189 self.bit(false)
190 }
191 #[doc = r" Writes raw bits to the field"]
192 #[inline]
193 pub fn bit(self, value: bool) -> &'a mut W {
194 const MASK: bool = true;
195 const OFFSET: u8 = 7;
196 self.w.bits &= !((MASK as u32) << OFFSET);
197 self.w.bits |= ((value & MASK) as u32) << OFFSET;
198 self.w
199 }
200}
201#[doc = r" Proxy"]
202pub struct _ACINT4W<'a> {
203 w: &'a mut W,
204}
205impl<'a> _ACINT4W<'a> {
206 #[doc = r" Sets the field bit"]
207 pub fn set_bit(self) -> &'a mut W {
208 self.bit(true)
209 }
210 #[doc = r" Clears the field bit"]
211 pub fn clear_bit(self) -> &'a mut W {
212 self.bit(false)
213 }
214 #[doc = r" Writes raw bits to the field"]
215 #[inline]
216 pub fn bit(self, value: bool) -> &'a mut W {
217 const MASK: bool = true;
218 const OFFSET: u8 = 8;
219 self.w.bits &= !((MASK as u32) << OFFSET);
220 self.w.bits |= ((value & MASK) as u32) << OFFSET;
221 self.w
222 }
223}
224#[doc = r" Proxy"]
225pub struct _SUTINT4W<'a> {
226 w: &'a mut W,
227}
228impl<'a> _SUTINT4W<'a> {
229 #[doc = r" Sets the field bit"]
230 pub fn set_bit(self) -> &'a mut W {
231 self.bit(true)
232 }
233 #[doc = r" Clears the field bit"]
234 pub fn clear_bit(self) -> &'a mut W {
235 self.bit(false)
236 }
237 #[doc = r" Writes raw bits to the field"]
238 #[inline]
239 pub fn bit(self, value: bool) -> &'a mut W {
240 const MASK: bool = true;
241 const OFFSET: u8 = 9;
242 self.w.bits &= !((MASK as u32) << OFFSET);
243 self.w.bits |= ((value & MASK) as u32) << OFFSET;
244 self.w
245 }
246}
247#[doc = r" Proxy"]
248pub struct _ACINT5W<'a> {
249 w: &'a mut W,
250}
251impl<'a> _ACINT5W<'a> {
252 #[doc = r" Sets the field bit"]
253 pub fn set_bit(self) -> &'a mut W {
254 self.bit(true)
255 }
256 #[doc = r" Clears the field bit"]
257 pub fn clear_bit(self) -> &'a mut W {
258 self.bit(false)
259 }
260 #[doc = r" Writes raw bits to the field"]
261 #[inline]
262 pub fn bit(self, value: bool) -> &'a mut W {
263 const MASK: bool = true;
264 const OFFSET: u8 = 10;
265 self.w.bits &= !((MASK as u32) << OFFSET);
266 self.w.bits |= ((value & MASK) as u32) << OFFSET;
267 self.w
268 }
269}
270#[doc = r" Proxy"]
271pub struct _SUTINT5W<'a> {
272 w: &'a mut W,
273}
274impl<'a> _SUTINT5W<'a> {
275 #[doc = r" Sets the field bit"]
276 pub fn set_bit(self) -> &'a mut W {
277 self.bit(true)
278 }
279 #[doc = r" Clears the field bit"]
280 pub fn clear_bit(self) -> &'a mut W {
281 self.bit(false)
282 }
283 #[doc = r" Writes raw bits to the field"]
284 #[inline]
285 pub fn bit(self, value: bool) -> &'a mut W {
286 const MASK: bool = true;
287 const OFFSET: u8 = 11;
288 self.w.bits &= !((MASK as u32) << OFFSET);
289 self.w.bits |= ((value & MASK) as u32) << OFFSET;
290 self.w
291 }
292}
293#[doc = r" Proxy"]
294pub struct _ACINT6W<'a> {
295 w: &'a mut W,
296}
297impl<'a> _ACINT6W<'a> {
298 #[doc = r" Sets the field bit"]
299 pub fn set_bit(self) -> &'a mut W {
300 self.bit(true)
301 }
302 #[doc = r" Clears the field bit"]
303 pub fn clear_bit(self) -> &'a mut W {
304 self.bit(false)
305 }
306 #[doc = r" Writes raw bits to the field"]
307 #[inline]
308 pub fn bit(self, value: bool) -> &'a mut W {
309 const MASK: bool = true;
310 const OFFSET: u8 = 12;
311 self.w.bits &= !((MASK as u32) << OFFSET);
312 self.w.bits |= ((value & MASK) as u32) << OFFSET;
313 self.w
314 }
315}
316#[doc = r" Proxy"]
317pub struct _SUTINT6W<'a> {
318 w: &'a mut W,
319}
320impl<'a> _SUTINT6W<'a> {
321 #[doc = r" Sets the field bit"]
322 pub fn set_bit(self) -> &'a mut W {
323 self.bit(true)
324 }
325 #[doc = r" Clears the field bit"]
326 pub fn clear_bit(self) -> &'a mut W {
327 self.bit(false)
328 }
329 #[doc = r" Writes raw bits to the field"]
330 #[inline]
331 pub fn bit(self, value: bool) -> &'a mut W {
332 const MASK: bool = true;
333 const OFFSET: u8 = 13;
334 self.w.bits &= !((MASK as u32) << OFFSET);
335 self.w.bits |= ((value & MASK) as u32) << OFFSET;
336 self.w
337 }
338}
339#[doc = r" Proxy"]
340pub struct _ACINT7W<'a> {
341 w: &'a mut W,
342}
343impl<'a> _ACINT7W<'a> {
344 #[doc = r" Sets the field bit"]
345 pub fn set_bit(self) -> &'a mut W {
346 self.bit(true)
347 }
348 #[doc = r" Clears the field bit"]
349 pub fn clear_bit(self) -> &'a mut W {
350 self.bit(false)
351 }
352 #[doc = r" Writes raw bits to the field"]
353 #[inline]
354 pub fn bit(self, value: bool) -> &'a mut W {
355 const MASK: bool = true;
356 const OFFSET: u8 = 14;
357 self.w.bits &= !((MASK as u32) << OFFSET);
358 self.w.bits |= ((value & MASK) as u32) << OFFSET;
359 self.w
360 }
361}
362#[doc = r" Proxy"]
363pub struct _SUTINT7W<'a> {
364 w: &'a mut W,
365}
366impl<'a> _SUTINT7W<'a> {
367 #[doc = r" Sets the field bit"]
368 pub fn set_bit(self) -> &'a mut W {
369 self.bit(true)
370 }
371 #[doc = r" Clears the field bit"]
372 pub fn clear_bit(self) -> &'a mut W {
373 self.bit(false)
374 }
375 #[doc = r" Writes raw bits to the field"]
376 #[inline]
377 pub fn bit(self, value: bool) -> &'a mut W {
378 const MASK: bool = true;
379 const OFFSET: u8 = 15;
380 self.w.bits &= !((MASK as u32) << OFFSET);
381 self.w.bits |= ((value & MASK) as u32) << OFFSET;
382 self.w
383 }
384}
385#[doc = r" Proxy"]
386pub struct _WFINT0W<'a> {
387 w: &'a mut W,
388}
389impl<'a> _WFINT0W<'a> {
390 #[doc = r" Sets the field bit"]
391 pub fn set_bit(self) -> &'a mut W {
392 self.bit(true)
393 }
394 #[doc = r" Clears the field bit"]
395 pub fn clear_bit(self) -> &'a mut W {
396 self.bit(false)
397 }
398 #[doc = r" Writes raw bits to the field"]
399 #[inline]
400 pub fn bit(self, value: bool) -> &'a mut W {
401 const MASK: bool = true;
402 const OFFSET: u8 = 24;
403 self.w.bits &= !((MASK as u32) << OFFSET);
404 self.w.bits |= ((value & MASK) as u32) << OFFSET;
405 self.w
406 }
407}
408#[doc = r" Proxy"]
409pub struct _WFINT1W<'a> {
410 w: &'a mut W,
411}
412impl<'a> _WFINT1W<'a> {
413 #[doc = r" Sets the field bit"]
414 pub fn set_bit(self) -> &'a mut W {
415 self.bit(true)
416 }
417 #[doc = r" Clears the field bit"]
418 pub fn clear_bit(self) -> &'a mut W {
419 self.bit(false)
420 }
421 #[doc = r" Writes raw bits to the field"]
422 #[inline]
423 pub fn bit(self, value: bool) -> &'a mut W {
424 const MASK: bool = true;
425 const OFFSET: u8 = 25;
426 self.w.bits &= !((MASK as u32) << OFFSET);
427 self.w.bits |= ((value & MASK) as u32) << OFFSET;
428 self.w
429 }
430}
431#[doc = r" Proxy"]
432pub struct _WFINT2W<'a> {
433 w: &'a mut W,
434}
435impl<'a> _WFINT2W<'a> {
436 #[doc = r" Sets the field bit"]
437 pub fn set_bit(self) -> &'a mut W {
438 self.bit(true)
439 }
440 #[doc = r" Clears the field bit"]
441 pub fn clear_bit(self) -> &'a mut W {
442 self.bit(false)
443 }
444 #[doc = r" Writes raw bits to the field"]
445 #[inline]
446 pub fn bit(self, value: bool) -> &'a mut W {
447 const MASK: bool = true;
448 const OFFSET: u8 = 26;
449 self.w.bits &= !((MASK as u32) << OFFSET);
450 self.w.bits |= ((value & MASK) as u32) << OFFSET;
451 self.w
452 }
453}
454#[doc = r" Proxy"]
455pub struct _WFINT3W<'a> {
456 w: &'a mut W,
457}
458impl<'a> _WFINT3W<'a> {
459 #[doc = r" Sets the field bit"]
460 pub fn set_bit(self) -> &'a mut W {
461 self.bit(true)
462 }
463 #[doc = r" Clears the field bit"]
464 pub fn clear_bit(self) -> &'a mut W {
465 self.bit(false)
466 }
467 #[doc = r" Writes raw bits to the field"]
468 #[inline]
469 pub fn bit(self, value: bool) -> &'a mut W {
470 const MASK: bool = true;
471 const OFFSET: u8 = 27;
472 self.w.bits &= !((MASK as u32) << OFFSET);
473 self.w.bits |= ((value & MASK) as u32) << OFFSET;
474 self.w
475 }
476}
477impl W {
478 #[doc = r" Reset value of the register"]
479 #[inline]
480 pub fn reset_value() -> W {
481 W { bits: 0 }
482 }
483 #[doc = r" Writes raw bits to the register"]
484 #[inline]
485 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
486 self.bits = bits;
487 self
488 }
489 #[doc = "Bit 0 - AC0 Interrupt Status Clear"]
490 #[inline]
491 pub fn acint0(&mut self) -> _ACINT0W {
492 _ACINT0W { w: self }
493 }
494 #[doc = "Bit 1 - AC0 Startup Time Interrupt Status Clear"]
495 #[inline]
496 pub fn sutint0(&mut self) -> _SUTINT0W {
497 _SUTINT0W { w: self }
498 }
499 #[doc = "Bit 2 - AC1 Interrupt Status Clear"]
500 #[inline]
501 pub fn acint1(&mut self) -> _ACINT1W {
502 _ACINT1W { w: self }
503 }
504 #[doc = "Bit 3 - AC1 Startup Time Interrupt Status Clear"]
505 #[inline]
506 pub fn sutint1(&mut self) -> _SUTINT1W {
507 _SUTINT1W { w: self }
508 }
509 #[doc = "Bit 4 - AC2 Interrupt Status Clear"]
510 #[inline]
511 pub fn acint2(&mut self) -> _ACINT2W {
512 _ACINT2W { w: self }
513 }
514 #[doc = "Bit 5 - AC2 Startup Time Interrupt Status Clear"]
515 #[inline]
516 pub fn sutint2(&mut self) -> _SUTINT2W {
517 _SUTINT2W { w: self }
518 }
519 #[doc = "Bit 6 - AC3 Interrupt Status Clear"]
520 #[inline]
521 pub fn acint3(&mut self) -> _ACINT3W {
522 _ACINT3W { w: self }
523 }
524 #[doc = "Bit 7 - AC3 Startup Time Interrupt Status Clear"]
525 #[inline]
526 pub fn sutint3(&mut self) -> _SUTINT3W {
527 _SUTINT3W { w: self }
528 }
529 #[doc = "Bit 8 - AC4 Interrupt Status Clear"]
530 #[inline]
531 pub fn acint4(&mut self) -> _ACINT4W {
532 _ACINT4W { w: self }
533 }
534 #[doc = "Bit 9 - AC4 Startup Time Interrupt Status Clear"]
535 #[inline]
536 pub fn sutint4(&mut self) -> _SUTINT4W {
537 _SUTINT4W { w: self }
538 }
539 #[doc = "Bit 10 - AC5 Interrupt Status Clear"]
540 #[inline]
541 pub fn acint5(&mut self) -> _ACINT5W {
542 _ACINT5W { w: self }
543 }
544 #[doc = "Bit 11 - AC5 Startup Time Interrupt Status Clear"]
545 #[inline]
546 pub fn sutint5(&mut self) -> _SUTINT5W {
547 _SUTINT5W { w: self }
548 }
549 #[doc = "Bit 12 - AC6 Interrupt Status Clear"]
550 #[inline]
551 pub fn acint6(&mut self) -> _ACINT6W {
552 _ACINT6W { w: self }
553 }
554 #[doc = "Bit 13 - AC6 Startup Time Interrupt Status Clear"]
555 #[inline]
556 pub fn sutint6(&mut self) -> _SUTINT6W {
557 _SUTINT6W { w: self }
558 }
559 #[doc = "Bit 14 - AC7 Interrupt Status Clear"]
560 #[inline]
561 pub fn acint7(&mut self) -> _ACINT7W {
562 _ACINT7W { w: self }
563 }
564 #[doc = "Bit 15 - AC7 Startup Time Interrupt Status Clear"]
565 #[inline]
566 pub fn sutint7(&mut self) -> _SUTINT7W {
567 _SUTINT7W { w: self }
568 }
569 #[doc = "Bit 24 - Window0 Mode Interrupt Status Clear"]
570 #[inline]
571 pub fn wfint0(&mut self) -> _WFINT0W {
572 _WFINT0W { w: self }
573 }
574 #[doc = "Bit 25 - Window1 Mode Interrupt Status Clear"]
575 #[inline]
576 pub fn wfint1(&mut self) -> _WFINT1W {
577 _WFINT1W { w: self }
578 }
579 #[doc = "Bit 26 - Window2 Mode Interrupt Status Clear"]
580 #[inline]
581 pub fn wfint2(&mut self) -> _WFINT2W {
582 _WFINT2W { w: self }
583 }
584 #[doc = "Bit 27 - Window3 Mode Interrupt Status Clear"]
585 #[inline]
586 pub fn wfint3(&mut self) -> _WFINT3W {
587 _WFINT3W { w: self }
588 }
589}