1#[doc = r" Value read from the register"]
2pub struct R {
3 bits: u32,
4}
5#[doc = r" Value to write to the register"]
6pub struct W {
7 bits: u32,
8}
9impl super::CSELR {
10 #[doc = r" Modifies the contents of the register"]
11 #[inline]
12 pub fn modify<F>(&self, f: F)
13 where
14 for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
15 {
16 let bits = self.register.get();
17 let r = R { bits: bits };
18 let mut w = W { bits: bits };
19 f(&r, &mut w);
20 self.register.set(w.bits);
21 }
22 #[doc = r" Reads the contents of the register"]
23 #[inline]
24 pub fn read(&self) -> R {
25 R {
26 bits: self.register.get(),
27 }
28 }
29 #[doc = r" Writes to the register"]
30 #[inline]
31 pub fn write<F>(&self, f: F)
32 where
33 F: FnOnce(&mut W) -> &mut W,
34 {
35 let mut w = W::reset_value();
36 f(&mut w);
37 self.register.set(w.bits);
38 }
39 #[doc = r" Writes the reset value to the register"]
40 #[inline]
41 pub fn reset(&self) {
42 self.write(|w| w)
43 }
44}
45#[doc = "Possible values of the field `C7S`"]
46#[derive(Clone, Copy, Debug, PartialEq)]
47pub enum C7SR {
48 #[doc = "Default mapping"]
49 NOMAPPING,
50 #[doc = "Mapping 1"]
51 MAP1,
52 #[doc = "Mapping 2"]
53 MAP2,
54 #[doc = "Mapping 3"]
55 MAP3,
56 #[doc = "Mapping 4"]
57 MAP4,
58 #[doc = "Mapping 5"]
59 MAP5,
60 #[doc = "Mapping 6"]
61 MAP6,
62 #[doc = "Mapping 7"]
63 MAP7,
64 #[doc = "Mapping 8"]
65 MAP8,
66 #[doc = "Mapping 9"]
67 MAP9,
68 #[doc = "Mapping 10"]
69 MAP10,
70 #[doc = "Mapping 11"]
71 MAP11,
72 #[doc = "Mapping 12"]
73 MAP12,
74 #[doc = "Mapping 13"]
75 MAP13,
76 #[doc = "Mapping 14"]
77 MAP14,
78 #[doc = "Mapping 15"]
79 MAP15,
80}
81impl C7SR {
82 #[doc = r" Value of the field as raw bits"]
83 #[inline]
84 pub fn bits(&self) -> u8 {
85 match *self {
86 C7SR::NOMAPPING => 0,
87 C7SR::MAP1 => 1,
88 C7SR::MAP2 => 2,
89 C7SR::MAP3 => 3,
90 C7SR::MAP4 => 4,
91 C7SR::MAP5 => 5,
92 C7SR::MAP6 => 6,
93 C7SR::MAP7 => 7,
94 C7SR::MAP8 => 8,
95 C7SR::MAP9 => 9,
96 C7SR::MAP10 => 10,
97 C7SR::MAP11 => 11,
98 C7SR::MAP12 => 12,
99 C7SR::MAP13 => 13,
100 C7SR::MAP14 => 14,
101 C7SR::MAP15 => 15,
102 }
103 }
104 #[allow(missing_docs)]
105 #[doc(hidden)]
106 #[inline]
107 pub fn _from(value: u8) -> C7SR {
108 match value {
109 0 => C7SR::NOMAPPING,
110 1 => C7SR::MAP1,
111 2 => C7SR::MAP2,
112 3 => C7SR::MAP3,
113 4 => C7SR::MAP4,
114 5 => C7SR::MAP5,
115 6 => C7SR::MAP6,
116 7 => C7SR::MAP7,
117 8 => C7SR::MAP8,
118 9 => C7SR::MAP9,
119 10 => C7SR::MAP10,
120 11 => C7SR::MAP11,
121 12 => C7SR::MAP12,
122 13 => C7SR::MAP13,
123 14 => C7SR::MAP14,
124 15 => C7SR::MAP15,
125 _ => unreachable!(),
126 }
127 }
128 #[doc = "Checks if the value of the field is `NOMAPPING`"]
129 #[inline]
130 pub fn is_no_mapping(&self) -> bool {
131 *self == C7SR::NOMAPPING
132 }
133 #[doc = "Checks if the value of the field is `MAP1`"]
134 #[inline]
135 pub fn is_map1(&self) -> bool {
136 *self == C7SR::MAP1
137 }
138 #[doc = "Checks if the value of the field is `MAP2`"]
139 #[inline]
140 pub fn is_map2(&self) -> bool {
141 *self == C7SR::MAP2
142 }
143 #[doc = "Checks if the value of the field is `MAP3`"]
144 #[inline]
145 pub fn is_map3(&self) -> bool {
146 *self == C7SR::MAP3
147 }
148 #[doc = "Checks if the value of the field is `MAP4`"]
149 #[inline]
150 pub fn is_map4(&self) -> bool {
151 *self == C7SR::MAP4
152 }
153 #[doc = "Checks if the value of the field is `MAP5`"]
154 #[inline]
155 pub fn is_map5(&self) -> bool {
156 *self == C7SR::MAP5
157 }
158 #[doc = "Checks if the value of the field is `MAP6`"]
159 #[inline]
160 pub fn is_map6(&self) -> bool {
161 *self == C7SR::MAP6
162 }
163 #[doc = "Checks if the value of the field is `MAP7`"]
164 #[inline]
165 pub fn is_map7(&self) -> bool {
166 *self == C7SR::MAP7
167 }
168 #[doc = "Checks if the value of the field is `MAP8`"]
169 #[inline]
170 pub fn is_map8(&self) -> bool {
171 *self == C7SR::MAP8
172 }
173 #[doc = "Checks if the value of the field is `MAP9`"]
174 #[inline]
175 pub fn is_map9(&self) -> bool {
176 *self == C7SR::MAP9
177 }
178 #[doc = "Checks if the value of the field is `MAP10`"]
179 #[inline]
180 pub fn is_map10(&self) -> bool {
181 *self == C7SR::MAP10
182 }
183 #[doc = "Checks if the value of the field is `MAP11`"]
184 #[inline]
185 pub fn is_map11(&self) -> bool {
186 *self == C7SR::MAP11
187 }
188 #[doc = "Checks if the value of the field is `MAP12`"]
189 #[inline]
190 pub fn is_map12(&self) -> bool {
191 *self == C7SR::MAP12
192 }
193 #[doc = "Checks if the value of the field is `MAP13`"]
194 #[inline]
195 pub fn is_map13(&self) -> bool {
196 *self == C7SR::MAP13
197 }
198 #[doc = "Checks if the value of the field is `MAP14`"]
199 #[inline]
200 pub fn is_map14(&self) -> bool {
201 *self == C7SR::MAP14
202 }
203 #[doc = "Checks if the value of the field is `MAP15`"]
204 #[inline]
205 pub fn is_map15(&self) -> bool {
206 *self == C7SR::MAP15
207 }
208}
209#[doc = "Possible values of the field `C6S`"]
210pub type C6SR = C7SR;
211#[doc = "Possible values of the field `C5S`"]
212pub type C5SR = C7SR;
213#[doc = "Possible values of the field `C4S`"]
214pub type C4SR = C7SR;
215#[doc = "Possible values of the field `C3S`"]
216pub type C3SR = C7SR;
217#[doc = "Possible values of the field `C2S`"]
218pub type C2SR = C7SR;
219#[doc = "Possible values of the field `C1S`"]
220pub type C1SR = C7SR;
221#[doc = "Values that can be written to the field `C7S`"]
222pub enum C7SW {
223 #[doc = "Default mapping"]
224 NOMAPPING,
225 #[doc = "Mapping 1"]
226 MAP1,
227 #[doc = "Mapping 2"]
228 MAP2,
229 #[doc = "Mapping 3"]
230 MAP3,
231 #[doc = "Mapping 4"]
232 MAP4,
233 #[doc = "Mapping 5"]
234 MAP5,
235 #[doc = "Mapping 6"]
236 MAP6,
237 #[doc = "Mapping 7"]
238 MAP7,
239 #[doc = "Mapping 8"]
240 MAP8,
241 #[doc = "Mapping 9"]
242 MAP9,
243 #[doc = "Mapping 10"]
244 MAP10,
245 #[doc = "Mapping 11"]
246 MAP11,
247 #[doc = "Mapping 12"]
248 MAP12,
249 #[doc = "Mapping 13"]
250 MAP13,
251 #[doc = "Mapping 14"]
252 MAP14,
253 #[doc = "Mapping 15"]
254 MAP15,
255}
256impl C7SW {
257 #[allow(missing_docs)]
258 #[doc(hidden)]
259 #[inline]
260 pub fn _bits(&self) -> u8 {
261 match *self {
262 C7SW::NOMAPPING => 0,
263 C7SW::MAP1 => 1,
264 C7SW::MAP2 => 2,
265 C7SW::MAP3 => 3,
266 C7SW::MAP4 => 4,
267 C7SW::MAP5 => 5,
268 C7SW::MAP6 => 6,
269 C7SW::MAP7 => 7,
270 C7SW::MAP8 => 8,
271 C7SW::MAP9 => 9,
272 C7SW::MAP10 => 10,
273 C7SW::MAP11 => 11,
274 C7SW::MAP12 => 12,
275 C7SW::MAP13 => 13,
276 C7SW::MAP14 => 14,
277 C7SW::MAP15 => 15,
278 }
279 }
280}
281#[doc = r" Proxy"]
282pub struct _C7SW<'a> {
283 w: &'a mut W,
284}
285impl<'a> _C7SW<'a> {
286 #[doc = r" Writes `variant` to the field"]
287 #[inline]
288 pub fn variant(self, variant: C7SW) -> &'a mut W {
289 {
290 self.bits(variant._bits())
291 }
292 }
293 #[doc = "Default mapping"]
294 #[inline]
295 pub fn no_mapping(self) -> &'a mut W {
296 self.variant(C7SW::NOMAPPING)
297 }
298 #[doc = "Mapping 1"]
299 #[inline]
300 pub fn map1(self) -> &'a mut W {
301 self.variant(C7SW::MAP1)
302 }
303 #[doc = "Mapping 2"]
304 #[inline]
305 pub fn map2(self) -> &'a mut W {
306 self.variant(C7SW::MAP2)
307 }
308 #[doc = "Mapping 3"]
309 #[inline]
310 pub fn map3(self) -> &'a mut W {
311 self.variant(C7SW::MAP3)
312 }
313 #[doc = "Mapping 4"]
314 #[inline]
315 pub fn map4(self) -> &'a mut W {
316 self.variant(C7SW::MAP4)
317 }
318 #[doc = "Mapping 5"]
319 #[inline]
320 pub fn map5(self) -> &'a mut W {
321 self.variant(C7SW::MAP5)
322 }
323 #[doc = "Mapping 6"]
324 #[inline]
325 pub fn map6(self) -> &'a mut W {
326 self.variant(C7SW::MAP6)
327 }
328 #[doc = "Mapping 7"]
329 #[inline]
330 pub fn map7(self) -> &'a mut W {
331 self.variant(C7SW::MAP7)
332 }
333 #[doc = "Mapping 8"]
334 #[inline]
335 pub fn map8(self) -> &'a mut W {
336 self.variant(C7SW::MAP8)
337 }
338 #[doc = "Mapping 9"]
339 #[inline]
340 pub fn map9(self) -> &'a mut W {
341 self.variant(C7SW::MAP9)
342 }
343 #[doc = "Mapping 10"]
344 #[inline]
345 pub fn map10(self) -> &'a mut W {
346 self.variant(C7SW::MAP10)
347 }
348 #[doc = "Mapping 11"]
349 #[inline]
350 pub fn map11(self) -> &'a mut W {
351 self.variant(C7SW::MAP11)
352 }
353 #[doc = "Mapping 12"]
354 #[inline]
355 pub fn map12(self) -> &'a mut W {
356 self.variant(C7SW::MAP12)
357 }
358 #[doc = "Mapping 13"]
359 #[inline]
360 pub fn map13(self) -> &'a mut W {
361 self.variant(C7SW::MAP13)
362 }
363 #[doc = "Mapping 14"]
364 #[inline]
365 pub fn map14(self) -> &'a mut W {
366 self.variant(C7SW::MAP14)
367 }
368 #[doc = "Mapping 15"]
369 #[inline]
370 pub fn map15(self) -> &'a mut W {
371 self.variant(C7SW::MAP15)
372 }
373 #[doc = r" Writes raw bits to the field"]
374 #[inline]
375 pub fn bits(self, value: u8) -> &'a mut W {
376 const MASK: u8 = 15;
377 const OFFSET: u8 = 24;
378 self.w.bits &= !((MASK as u32) << OFFSET);
379 self.w.bits |= ((value & MASK) as u32) << OFFSET;
380 self.w
381 }
382}
383#[doc = "Values that can be written to the field `C6S`"]
384pub type C6SW = C7SW;
385#[doc = r" Proxy"]
386pub struct _C6SW<'a> {
387 w: &'a mut W,
388}
389impl<'a> _C6SW<'a> {
390 #[doc = r" Writes `variant` to the field"]
391 #[inline]
392 pub fn variant(self, variant: C6SW) -> &'a mut W {
393 {
394 self.bits(variant._bits())
395 }
396 }
397 #[doc = "Default mapping"]
398 #[inline]
399 pub fn no_mapping(self) -> &'a mut W {
400 self.variant(C7SW::NOMAPPING)
401 }
402 #[doc = "Mapping 1"]
403 #[inline]
404 pub fn map1(self) -> &'a mut W {
405 self.variant(C7SW::MAP1)
406 }
407 #[doc = "Mapping 2"]
408 #[inline]
409 pub fn map2(self) -> &'a mut W {
410 self.variant(C7SW::MAP2)
411 }
412 #[doc = "Mapping 3"]
413 #[inline]
414 pub fn map3(self) -> &'a mut W {
415 self.variant(C7SW::MAP3)
416 }
417 #[doc = "Mapping 4"]
418 #[inline]
419 pub fn map4(self) -> &'a mut W {
420 self.variant(C7SW::MAP4)
421 }
422 #[doc = "Mapping 5"]
423 #[inline]
424 pub fn map5(self) -> &'a mut W {
425 self.variant(C7SW::MAP5)
426 }
427 #[doc = "Mapping 6"]
428 #[inline]
429 pub fn map6(self) -> &'a mut W {
430 self.variant(C7SW::MAP6)
431 }
432 #[doc = "Mapping 7"]
433 #[inline]
434 pub fn map7(self) -> &'a mut W {
435 self.variant(C7SW::MAP7)
436 }
437 #[doc = "Mapping 8"]
438 #[inline]
439 pub fn map8(self) -> &'a mut W {
440 self.variant(C7SW::MAP8)
441 }
442 #[doc = "Mapping 9"]
443 #[inline]
444 pub fn map9(self) -> &'a mut W {
445 self.variant(C7SW::MAP9)
446 }
447 #[doc = "Mapping 10"]
448 #[inline]
449 pub fn map10(self) -> &'a mut W {
450 self.variant(C7SW::MAP10)
451 }
452 #[doc = "Mapping 11"]
453 #[inline]
454 pub fn map11(self) -> &'a mut W {
455 self.variant(C7SW::MAP11)
456 }
457 #[doc = "Mapping 12"]
458 #[inline]
459 pub fn map12(self) -> &'a mut W {
460 self.variant(C7SW::MAP12)
461 }
462 #[doc = "Mapping 13"]
463 #[inline]
464 pub fn map13(self) -> &'a mut W {
465 self.variant(C7SW::MAP13)
466 }
467 #[doc = "Mapping 14"]
468 #[inline]
469 pub fn map14(self) -> &'a mut W {
470 self.variant(C7SW::MAP14)
471 }
472 #[doc = "Mapping 15"]
473 #[inline]
474 pub fn map15(self) -> &'a mut W {
475 self.variant(C7SW::MAP15)
476 }
477 #[doc = r" Writes raw bits to the field"]
478 #[inline]
479 pub fn bits(self, value: u8) -> &'a mut W {
480 const MASK: u8 = 15;
481 const OFFSET: u8 = 20;
482 self.w.bits &= !((MASK as u32) << OFFSET);
483 self.w.bits |= ((value & MASK) as u32) << OFFSET;
484 self.w
485 }
486}
487#[doc = "Values that can be written to the field `C5S`"]
488pub type C5SW = C7SW;
489#[doc = r" Proxy"]
490pub struct _C5SW<'a> {
491 w: &'a mut W,
492}
493impl<'a> _C5SW<'a> {
494 #[doc = r" Writes `variant` to the field"]
495 #[inline]
496 pub fn variant(self, variant: C5SW) -> &'a mut W {
497 {
498 self.bits(variant._bits())
499 }
500 }
501 #[doc = "Default mapping"]
502 #[inline]
503 pub fn no_mapping(self) -> &'a mut W {
504 self.variant(C7SW::NOMAPPING)
505 }
506 #[doc = "Mapping 1"]
507 #[inline]
508 pub fn map1(self) -> &'a mut W {
509 self.variant(C7SW::MAP1)
510 }
511 #[doc = "Mapping 2"]
512 #[inline]
513 pub fn map2(self) -> &'a mut W {
514 self.variant(C7SW::MAP2)
515 }
516 #[doc = "Mapping 3"]
517 #[inline]
518 pub fn map3(self) -> &'a mut W {
519 self.variant(C7SW::MAP3)
520 }
521 #[doc = "Mapping 4"]
522 #[inline]
523 pub fn map4(self) -> &'a mut W {
524 self.variant(C7SW::MAP4)
525 }
526 #[doc = "Mapping 5"]
527 #[inline]
528 pub fn map5(self) -> &'a mut W {
529 self.variant(C7SW::MAP5)
530 }
531 #[doc = "Mapping 6"]
532 #[inline]
533 pub fn map6(self) -> &'a mut W {
534 self.variant(C7SW::MAP6)
535 }
536 #[doc = "Mapping 7"]
537 #[inline]
538 pub fn map7(self) -> &'a mut W {
539 self.variant(C7SW::MAP7)
540 }
541 #[doc = "Mapping 8"]
542 #[inline]
543 pub fn map8(self) -> &'a mut W {
544 self.variant(C7SW::MAP8)
545 }
546 #[doc = "Mapping 9"]
547 #[inline]
548 pub fn map9(self) -> &'a mut W {
549 self.variant(C7SW::MAP9)
550 }
551 #[doc = "Mapping 10"]
552 #[inline]
553 pub fn map10(self) -> &'a mut W {
554 self.variant(C7SW::MAP10)
555 }
556 #[doc = "Mapping 11"]
557 #[inline]
558 pub fn map11(self) -> &'a mut W {
559 self.variant(C7SW::MAP11)
560 }
561 #[doc = "Mapping 12"]
562 #[inline]
563 pub fn map12(self) -> &'a mut W {
564 self.variant(C7SW::MAP12)
565 }
566 #[doc = "Mapping 13"]
567 #[inline]
568 pub fn map13(self) -> &'a mut W {
569 self.variant(C7SW::MAP13)
570 }
571 #[doc = "Mapping 14"]
572 #[inline]
573 pub fn map14(self) -> &'a mut W {
574 self.variant(C7SW::MAP14)
575 }
576 #[doc = "Mapping 15"]
577 #[inline]
578 pub fn map15(self) -> &'a mut W {
579 self.variant(C7SW::MAP15)
580 }
581 #[doc = r" Writes raw bits to the field"]
582 #[inline]
583 pub fn bits(self, value: u8) -> &'a mut W {
584 const MASK: u8 = 15;
585 const OFFSET: u8 = 16;
586 self.w.bits &= !((MASK as u32) << OFFSET);
587 self.w.bits |= ((value & MASK) as u32) << OFFSET;
588 self.w
589 }
590}
591#[doc = "Values that can be written to the field `C4S`"]
592pub type C4SW = C7SW;
593#[doc = r" Proxy"]
594pub struct _C4SW<'a> {
595 w: &'a mut W,
596}
597impl<'a> _C4SW<'a> {
598 #[doc = r" Writes `variant` to the field"]
599 #[inline]
600 pub fn variant(self, variant: C4SW) -> &'a mut W {
601 {
602 self.bits(variant._bits())
603 }
604 }
605 #[doc = "Default mapping"]
606 #[inline]
607 pub fn no_mapping(self) -> &'a mut W {
608 self.variant(C7SW::NOMAPPING)
609 }
610 #[doc = "Mapping 1"]
611 #[inline]
612 pub fn map1(self) -> &'a mut W {
613 self.variant(C7SW::MAP1)
614 }
615 #[doc = "Mapping 2"]
616 #[inline]
617 pub fn map2(self) -> &'a mut W {
618 self.variant(C7SW::MAP2)
619 }
620 #[doc = "Mapping 3"]
621 #[inline]
622 pub fn map3(self) -> &'a mut W {
623 self.variant(C7SW::MAP3)
624 }
625 #[doc = "Mapping 4"]
626 #[inline]
627 pub fn map4(self) -> &'a mut W {
628 self.variant(C7SW::MAP4)
629 }
630 #[doc = "Mapping 5"]
631 #[inline]
632 pub fn map5(self) -> &'a mut W {
633 self.variant(C7SW::MAP5)
634 }
635 #[doc = "Mapping 6"]
636 #[inline]
637 pub fn map6(self) -> &'a mut W {
638 self.variant(C7SW::MAP6)
639 }
640 #[doc = "Mapping 7"]
641 #[inline]
642 pub fn map7(self) -> &'a mut W {
643 self.variant(C7SW::MAP7)
644 }
645 #[doc = "Mapping 8"]
646 #[inline]
647 pub fn map8(self) -> &'a mut W {
648 self.variant(C7SW::MAP8)
649 }
650 #[doc = "Mapping 9"]
651 #[inline]
652 pub fn map9(self) -> &'a mut W {
653 self.variant(C7SW::MAP9)
654 }
655 #[doc = "Mapping 10"]
656 #[inline]
657 pub fn map10(self) -> &'a mut W {
658 self.variant(C7SW::MAP10)
659 }
660 #[doc = "Mapping 11"]
661 #[inline]
662 pub fn map11(self) -> &'a mut W {
663 self.variant(C7SW::MAP11)
664 }
665 #[doc = "Mapping 12"]
666 #[inline]
667 pub fn map12(self) -> &'a mut W {
668 self.variant(C7SW::MAP12)
669 }
670 #[doc = "Mapping 13"]
671 #[inline]
672 pub fn map13(self) -> &'a mut W {
673 self.variant(C7SW::MAP13)
674 }
675 #[doc = "Mapping 14"]
676 #[inline]
677 pub fn map14(self) -> &'a mut W {
678 self.variant(C7SW::MAP14)
679 }
680 #[doc = "Mapping 15"]
681 #[inline]
682 pub fn map15(self) -> &'a mut W {
683 self.variant(C7SW::MAP15)
684 }
685 #[doc = r" Writes raw bits to the field"]
686 #[inline]
687 pub fn bits(self, value: u8) -> &'a mut W {
688 const MASK: u8 = 15;
689 const OFFSET: u8 = 12;
690 self.w.bits &= !((MASK as u32) << OFFSET);
691 self.w.bits |= ((value & MASK) as u32) << OFFSET;
692 self.w
693 }
694}
695#[doc = "Values that can be written to the field `C3S`"]
696pub type C3SW = C7SW;
697#[doc = r" Proxy"]
698pub struct _C3SW<'a> {
699 w: &'a mut W,
700}
701impl<'a> _C3SW<'a> {
702 #[doc = r" Writes `variant` to the field"]
703 #[inline]
704 pub fn variant(self, variant: C3SW) -> &'a mut W {
705 {
706 self.bits(variant._bits())
707 }
708 }
709 #[doc = "Default mapping"]
710 #[inline]
711 pub fn no_mapping(self) -> &'a mut W {
712 self.variant(C7SW::NOMAPPING)
713 }
714 #[doc = "Mapping 1"]
715 #[inline]
716 pub fn map1(self) -> &'a mut W {
717 self.variant(C7SW::MAP1)
718 }
719 #[doc = "Mapping 2"]
720 #[inline]
721 pub fn map2(self) -> &'a mut W {
722 self.variant(C7SW::MAP2)
723 }
724 #[doc = "Mapping 3"]
725 #[inline]
726 pub fn map3(self) -> &'a mut W {
727 self.variant(C7SW::MAP3)
728 }
729 #[doc = "Mapping 4"]
730 #[inline]
731 pub fn map4(self) -> &'a mut W {
732 self.variant(C7SW::MAP4)
733 }
734 #[doc = "Mapping 5"]
735 #[inline]
736 pub fn map5(self) -> &'a mut W {
737 self.variant(C7SW::MAP5)
738 }
739 #[doc = "Mapping 6"]
740 #[inline]
741 pub fn map6(self) -> &'a mut W {
742 self.variant(C7SW::MAP6)
743 }
744 #[doc = "Mapping 7"]
745 #[inline]
746 pub fn map7(self) -> &'a mut W {
747 self.variant(C7SW::MAP7)
748 }
749 #[doc = "Mapping 8"]
750 #[inline]
751 pub fn map8(self) -> &'a mut W {
752 self.variant(C7SW::MAP8)
753 }
754 #[doc = "Mapping 9"]
755 #[inline]
756 pub fn map9(self) -> &'a mut W {
757 self.variant(C7SW::MAP9)
758 }
759 #[doc = "Mapping 10"]
760 #[inline]
761 pub fn map10(self) -> &'a mut W {
762 self.variant(C7SW::MAP10)
763 }
764 #[doc = "Mapping 11"]
765 #[inline]
766 pub fn map11(self) -> &'a mut W {
767 self.variant(C7SW::MAP11)
768 }
769 #[doc = "Mapping 12"]
770 #[inline]
771 pub fn map12(self) -> &'a mut W {
772 self.variant(C7SW::MAP12)
773 }
774 #[doc = "Mapping 13"]
775 #[inline]
776 pub fn map13(self) -> &'a mut W {
777 self.variant(C7SW::MAP13)
778 }
779 #[doc = "Mapping 14"]
780 #[inline]
781 pub fn map14(self) -> &'a mut W {
782 self.variant(C7SW::MAP14)
783 }
784 #[doc = "Mapping 15"]
785 #[inline]
786 pub fn map15(self) -> &'a mut W {
787 self.variant(C7SW::MAP15)
788 }
789 #[doc = r" Writes raw bits to the field"]
790 #[inline]
791 pub fn bits(self, value: u8) -> &'a mut W {
792 const MASK: u8 = 15;
793 const OFFSET: u8 = 8;
794 self.w.bits &= !((MASK as u32) << OFFSET);
795 self.w.bits |= ((value & MASK) as u32) << OFFSET;
796 self.w
797 }
798}
799#[doc = "Values that can be written to the field `C2S`"]
800pub type C2SW = C7SW;
801#[doc = r" Proxy"]
802pub struct _C2SW<'a> {
803 w: &'a mut W,
804}
805impl<'a> _C2SW<'a> {
806 #[doc = r" Writes `variant` to the field"]
807 #[inline]
808 pub fn variant(self, variant: C2SW) -> &'a mut W {
809 {
810 self.bits(variant._bits())
811 }
812 }
813 #[doc = "Default mapping"]
814 #[inline]
815 pub fn no_mapping(self) -> &'a mut W {
816 self.variant(C7SW::NOMAPPING)
817 }
818 #[doc = "Mapping 1"]
819 #[inline]
820 pub fn map1(self) -> &'a mut W {
821 self.variant(C7SW::MAP1)
822 }
823 #[doc = "Mapping 2"]
824 #[inline]
825 pub fn map2(self) -> &'a mut W {
826 self.variant(C7SW::MAP2)
827 }
828 #[doc = "Mapping 3"]
829 #[inline]
830 pub fn map3(self) -> &'a mut W {
831 self.variant(C7SW::MAP3)
832 }
833 #[doc = "Mapping 4"]
834 #[inline]
835 pub fn map4(self) -> &'a mut W {
836 self.variant(C7SW::MAP4)
837 }
838 #[doc = "Mapping 5"]
839 #[inline]
840 pub fn map5(self) -> &'a mut W {
841 self.variant(C7SW::MAP5)
842 }
843 #[doc = "Mapping 6"]
844 #[inline]
845 pub fn map6(self) -> &'a mut W {
846 self.variant(C7SW::MAP6)
847 }
848 #[doc = "Mapping 7"]
849 #[inline]
850 pub fn map7(self) -> &'a mut W {
851 self.variant(C7SW::MAP7)
852 }
853 #[doc = "Mapping 8"]
854 #[inline]
855 pub fn map8(self) -> &'a mut W {
856 self.variant(C7SW::MAP8)
857 }
858 #[doc = "Mapping 9"]
859 #[inline]
860 pub fn map9(self) -> &'a mut W {
861 self.variant(C7SW::MAP9)
862 }
863 #[doc = "Mapping 10"]
864 #[inline]
865 pub fn map10(self) -> &'a mut W {
866 self.variant(C7SW::MAP10)
867 }
868 #[doc = "Mapping 11"]
869 #[inline]
870 pub fn map11(self) -> &'a mut W {
871 self.variant(C7SW::MAP11)
872 }
873 #[doc = "Mapping 12"]
874 #[inline]
875 pub fn map12(self) -> &'a mut W {
876 self.variant(C7SW::MAP12)
877 }
878 #[doc = "Mapping 13"]
879 #[inline]
880 pub fn map13(self) -> &'a mut W {
881 self.variant(C7SW::MAP13)
882 }
883 #[doc = "Mapping 14"]
884 #[inline]
885 pub fn map14(self) -> &'a mut W {
886 self.variant(C7SW::MAP14)
887 }
888 #[doc = "Mapping 15"]
889 #[inline]
890 pub fn map15(self) -> &'a mut W {
891 self.variant(C7SW::MAP15)
892 }
893 #[doc = r" Writes raw bits to the field"]
894 #[inline]
895 pub fn bits(self, value: u8) -> &'a mut W {
896 const MASK: u8 = 15;
897 const OFFSET: u8 = 4;
898 self.w.bits &= !((MASK as u32) << OFFSET);
899 self.w.bits |= ((value & MASK) as u32) << OFFSET;
900 self.w
901 }
902}
903#[doc = "Values that can be written to the field `C1S`"]
904pub type C1SW = C7SW;
905#[doc = r" Proxy"]
906pub struct _C1SW<'a> {
907 w: &'a mut W,
908}
909impl<'a> _C1SW<'a> {
910 #[doc = r" Writes `variant` to the field"]
911 #[inline]
912 pub fn variant(self, variant: C1SW) -> &'a mut W {
913 {
914 self.bits(variant._bits())
915 }
916 }
917 #[doc = "Default mapping"]
918 #[inline]
919 pub fn no_mapping(self) -> &'a mut W {
920 self.variant(C7SW::NOMAPPING)
921 }
922 #[doc = "Mapping 1"]
923 #[inline]
924 pub fn map1(self) -> &'a mut W {
925 self.variant(C7SW::MAP1)
926 }
927 #[doc = "Mapping 2"]
928 #[inline]
929 pub fn map2(self) -> &'a mut W {
930 self.variant(C7SW::MAP2)
931 }
932 #[doc = "Mapping 3"]
933 #[inline]
934 pub fn map3(self) -> &'a mut W {
935 self.variant(C7SW::MAP3)
936 }
937 #[doc = "Mapping 4"]
938 #[inline]
939 pub fn map4(self) -> &'a mut W {
940 self.variant(C7SW::MAP4)
941 }
942 #[doc = "Mapping 5"]
943 #[inline]
944 pub fn map5(self) -> &'a mut W {
945 self.variant(C7SW::MAP5)
946 }
947 #[doc = "Mapping 6"]
948 #[inline]
949 pub fn map6(self) -> &'a mut W {
950 self.variant(C7SW::MAP6)
951 }
952 #[doc = "Mapping 7"]
953 #[inline]
954 pub fn map7(self) -> &'a mut W {
955 self.variant(C7SW::MAP7)
956 }
957 #[doc = "Mapping 8"]
958 #[inline]
959 pub fn map8(self) -> &'a mut W {
960 self.variant(C7SW::MAP8)
961 }
962 #[doc = "Mapping 9"]
963 #[inline]
964 pub fn map9(self) -> &'a mut W {
965 self.variant(C7SW::MAP9)
966 }
967 #[doc = "Mapping 10"]
968 #[inline]
969 pub fn map10(self) -> &'a mut W {
970 self.variant(C7SW::MAP10)
971 }
972 #[doc = "Mapping 11"]
973 #[inline]
974 pub fn map11(self) -> &'a mut W {
975 self.variant(C7SW::MAP11)
976 }
977 #[doc = "Mapping 12"]
978 #[inline]
979 pub fn map12(self) -> &'a mut W {
980 self.variant(C7SW::MAP12)
981 }
982 #[doc = "Mapping 13"]
983 #[inline]
984 pub fn map13(self) -> &'a mut W {
985 self.variant(C7SW::MAP13)
986 }
987 #[doc = "Mapping 14"]
988 #[inline]
989 pub fn map14(self) -> &'a mut W {
990 self.variant(C7SW::MAP14)
991 }
992 #[doc = "Mapping 15"]
993 #[inline]
994 pub fn map15(self) -> &'a mut W {
995 self.variant(C7SW::MAP15)
996 }
997 #[doc = r" Writes raw bits to the field"]
998 #[inline]
999 pub fn bits(self, value: u8) -> &'a mut W {
1000 const MASK: u8 = 15;
1001 const OFFSET: u8 = 0;
1002 self.w.bits &= !((MASK as u32) << OFFSET);
1003 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1004 self.w
1005 }
1006}
1007impl R {
1008 #[doc = r" Value of the register as raw bits"]
1009 #[inline]
1010 pub fn bits(&self) -> u32 {
1011 self.bits
1012 }
1013 #[doc = "Bits 24:27 - DMA channel 7 selection"]
1014 #[inline]
1015 pub fn c7s(&self) -> C7SR {
1016 C7SR::_from({
1017 const MASK: u8 = 15;
1018 const OFFSET: u8 = 24;
1019 ((self.bits >> OFFSET) & MASK as u32) as u8
1020 })
1021 }
1022 #[doc = "Bits 20:23 - DMA channel 6 selection"]
1023 #[inline]
1024 pub fn c6s(&self) -> C6SR {
1025 C6SR::_from({
1026 const MASK: u8 = 15;
1027 const OFFSET: u8 = 20;
1028 ((self.bits >> OFFSET) & MASK as u32) as u8
1029 })
1030 }
1031 #[doc = "Bits 16:19 - DMA channel 5 selection"]
1032 #[inline]
1033 pub fn c5s(&self) -> C5SR {
1034 C5SR::_from({
1035 const MASK: u8 = 15;
1036 const OFFSET: u8 = 16;
1037 ((self.bits >> OFFSET) & MASK as u32) as u8
1038 })
1039 }
1040 #[doc = "Bits 12:15 - DMA channel 4 selection"]
1041 #[inline]
1042 pub fn c4s(&self) -> C4SR {
1043 C4SR::_from({
1044 const MASK: u8 = 15;
1045 const OFFSET: u8 = 12;
1046 ((self.bits >> OFFSET) & MASK as u32) as u8
1047 })
1048 }
1049 #[doc = "Bits 8:11 - DMA channel 3 selection"]
1050 #[inline]
1051 pub fn c3s(&self) -> C3SR {
1052 C3SR::_from({
1053 const MASK: u8 = 15;
1054 const OFFSET: u8 = 8;
1055 ((self.bits >> OFFSET) & MASK as u32) as u8
1056 })
1057 }
1058 #[doc = "Bits 4:7 - DMA channel 2 selection"]
1059 #[inline]
1060 pub fn c2s(&self) -> C2SR {
1061 C2SR::_from({
1062 const MASK: u8 = 15;
1063 const OFFSET: u8 = 4;
1064 ((self.bits >> OFFSET) & MASK as u32) as u8
1065 })
1066 }
1067 #[doc = "Bits 0:3 - DMA channel 1 selection"]
1068 #[inline]
1069 pub fn c1s(&self) -> C1SR {
1070 C1SR::_from({
1071 const MASK: u8 = 15;
1072 const OFFSET: u8 = 0;
1073 ((self.bits >> OFFSET) & MASK as u32) as u8
1074 })
1075 }
1076}
1077impl W {
1078 #[doc = r" Reset value of the register"]
1079 #[inline]
1080 pub fn reset_value() -> W {
1081 W { bits: 0 }
1082 }
1083 #[doc = r" Writes raw bits to the register"]
1084 #[inline]
1085 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1086 self.bits = bits;
1087 self
1088 }
1089 #[doc = "Bits 24:27 - DMA channel 7 selection"]
1090 #[inline]
1091 pub fn c7s(&mut self) -> _C7SW {
1092 _C7SW { w: self }
1093 }
1094 #[doc = "Bits 20:23 - DMA channel 6 selection"]
1095 #[inline]
1096 pub fn c6s(&mut self) -> _C6SW {
1097 _C6SW { w: self }
1098 }
1099 #[doc = "Bits 16:19 - DMA channel 5 selection"]
1100 #[inline]
1101 pub fn c5s(&mut self) -> _C5SW {
1102 _C5SW { w: self }
1103 }
1104 #[doc = "Bits 12:15 - DMA channel 4 selection"]
1105 #[inline]
1106 pub fn c4s(&mut self) -> _C4SW {
1107 _C4SW { w: self }
1108 }
1109 #[doc = "Bits 8:11 - DMA channel 3 selection"]
1110 #[inline]
1111 pub fn c3s(&mut self) -> _C3SW {
1112 _C3SW { w: self }
1113 }
1114 #[doc = "Bits 4:7 - DMA channel 2 selection"]
1115 #[inline]
1116 pub fn c2s(&mut self) -> _C2SW {
1117 _C2SW { w: self }
1118 }
1119 #[doc = "Bits 0:3 - DMA channel 1 selection"]
1120 #[inline]
1121 pub fn c1s(&mut self) -> _C1SW {
1122 _C1SW { w: self }
1123 }
1124}