1pub struct R(crate::R<CR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<CR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<CR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<CR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16pub struct W(crate::W<CR_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<CR_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<CR_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<CR_SPEC>) -> Self {
34 W(writer)
35 }
36}
37pub type EN_R = crate::BitReader<EN_A>;
39#[derive(Clone, Copy, Debug, PartialEq, Eq)]
43pub enum EN_A {
44 Disabled = 0,
46 Enabled = 1,
48}
49impl From<EN_A> for bool {
50 #[inline(always)]
51 fn from(variant: EN_A) -> Self {
52 variant as u8 != 0
53 }
54}
55impl EN_R {
56 #[inline(always)]
58 pub fn variant(&self) -> EN_A {
59 match self.bits {
60 false => EN_A::Disabled,
61 true => EN_A::Enabled,
62 }
63 }
64 #[inline(always)]
66 pub fn is_disabled(&self) -> bool {
67 *self == EN_A::Disabled
68 }
69 #[inline(always)]
71 pub fn is_enabled(&self) -> bool {
72 *self == EN_A::Enabled
73 }
74}
75pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CR_SPEC, EN_A, O>;
77impl<'a, const O: u8> EN_W<'a, O> {
78 #[inline(always)]
80 pub fn disabled(self) -> &'a mut W {
81 self.variant(EN_A::Disabled)
82 }
83 #[inline(always)]
85 pub fn enabled(self) -> &'a mut W {
86 self.variant(EN_A::Enabled)
87 }
88}
89pub type TCIE_R = crate::BitReader<TCIE_A>;
91#[derive(Clone, Copy, Debug, PartialEq, Eq)]
95pub enum TCIE_A {
96 Disabled = 0,
98 Enabled = 1,
100}
101impl From<TCIE_A> for bool {
102 #[inline(always)]
103 fn from(variant: TCIE_A) -> Self {
104 variant as u8 != 0
105 }
106}
107impl TCIE_R {
108 #[inline(always)]
110 pub fn variant(&self) -> TCIE_A {
111 match self.bits {
112 false => TCIE_A::Disabled,
113 true => TCIE_A::Enabled,
114 }
115 }
116 #[inline(always)]
118 pub fn is_disabled(&self) -> bool {
119 *self == TCIE_A::Disabled
120 }
121 #[inline(always)]
123 pub fn is_enabled(&self) -> bool {
124 *self == TCIE_A::Enabled
125 }
126}
127pub type TCIE_W<'a, const O: u8> = crate::BitWriter<'a, u32, CR_SPEC, TCIE_A, O>;
129impl<'a, const O: u8> TCIE_W<'a, O> {
130 #[inline(always)]
132 pub fn disabled(self) -> &'a mut W {
133 self.variant(TCIE_A::Disabled)
134 }
135 #[inline(always)]
137 pub fn enabled(self) -> &'a mut W {
138 self.variant(TCIE_A::Enabled)
139 }
140}
141pub type HTIE_R = crate::BitReader<HTIE_A>;
143#[derive(Clone, Copy, Debug, PartialEq, Eq)]
147pub enum HTIE_A {
148 Disabled = 0,
150 Enabled = 1,
152}
153impl From<HTIE_A> for bool {
154 #[inline(always)]
155 fn from(variant: HTIE_A) -> Self {
156 variant as u8 != 0
157 }
158}
159impl HTIE_R {
160 #[inline(always)]
162 pub fn variant(&self) -> HTIE_A {
163 match self.bits {
164 false => HTIE_A::Disabled,
165 true => HTIE_A::Enabled,
166 }
167 }
168 #[inline(always)]
170 pub fn is_disabled(&self) -> bool {
171 *self == HTIE_A::Disabled
172 }
173 #[inline(always)]
175 pub fn is_enabled(&self) -> bool {
176 *self == HTIE_A::Enabled
177 }
178}
179pub type HTIE_W<'a, const O: u8> = crate::BitWriter<'a, u32, CR_SPEC, HTIE_A, O>;
181impl<'a, const O: u8> HTIE_W<'a, O> {
182 #[inline(always)]
184 pub fn disabled(self) -> &'a mut W {
185 self.variant(HTIE_A::Disabled)
186 }
187 #[inline(always)]
189 pub fn enabled(self) -> &'a mut W {
190 self.variant(HTIE_A::Enabled)
191 }
192}
193pub type TEIE_R = crate::BitReader<TEIE_A>;
195#[derive(Clone, Copy, Debug, PartialEq, Eq)]
199pub enum TEIE_A {
200 Disabled = 0,
202 Enabled = 1,
204}
205impl From<TEIE_A> for bool {
206 #[inline(always)]
207 fn from(variant: TEIE_A) -> Self {
208 variant as u8 != 0
209 }
210}
211impl TEIE_R {
212 #[inline(always)]
214 pub fn variant(&self) -> TEIE_A {
215 match self.bits {
216 false => TEIE_A::Disabled,
217 true => TEIE_A::Enabled,
218 }
219 }
220 #[inline(always)]
222 pub fn is_disabled(&self) -> bool {
223 *self == TEIE_A::Disabled
224 }
225 #[inline(always)]
227 pub fn is_enabled(&self) -> bool {
228 *self == TEIE_A::Enabled
229 }
230}
231pub type TEIE_W<'a, const O: u8> = crate::BitWriter<'a, u32, CR_SPEC, TEIE_A, O>;
233impl<'a, const O: u8> TEIE_W<'a, O> {
234 #[inline(always)]
236 pub fn disabled(self) -> &'a mut W {
237 self.variant(TEIE_A::Disabled)
238 }
239 #[inline(always)]
241 pub fn enabled(self) -> &'a mut W {
242 self.variant(TEIE_A::Enabled)
243 }
244}
245pub type DIR_R = crate::BitReader<DIR_A>;
247#[derive(Clone, Copy, Debug, PartialEq, Eq)]
251pub enum DIR_A {
252 FromPeripheral = 0,
254 FromMemory = 1,
256}
257impl From<DIR_A> for bool {
258 #[inline(always)]
259 fn from(variant: DIR_A) -> Self {
260 variant as u8 != 0
261 }
262}
263impl DIR_R {
264 #[inline(always)]
266 pub fn variant(&self) -> DIR_A {
267 match self.bits {
268 false => DIR_A::FromPeripheral,
269 true => DIR_A::FromMemory,
270 }
271 }
272 #[inline(always)]
274 pub fn is_from_peripheral(&self) -> bool {
275 *self == DIR_A::FromPeripheral
276 }
277 #[inline(always)]
279 pub fn is_from_memory(&self) -> bool {
280 *self == DIR_A::FromMemory
281 }
282}
283pub type DIR_W<'a, const O: u8> = crate::BitWriter<'a, u32, CR_SPEC, DIR_A, O>;
285impl<'a, const O: u8> DIR_W<'a, O> {
286 #[inline(always)]
288 pub fn from_peripheral(self) -> &'a mut W {
289 self.variant(DIR_A::FromPeripheral)
290 }
291 #[inline(always)]
293 pub fn from_memory(self) -> &'a mut W {
294 self.variant(DIR_A::FromMemory)
295 }
296}
297pub type CIRC_R = crate::BitReader<CIRC_A>;
299#[derive(Clone, Copy, Debug, PartialEq, Eq)]
303pub enum CIRC_A {
304 Disabled = 0,
306 Enabled = 1,
308}
309impl From<CIRC_A> for bool {
310 #[inline(always)]
311 fn from(variant: CIRC_A) -> Self {
312 variant as u8 != 0
313 }
314}
315impl CIRC_R {
316 #[inline(always)]
318 pub fn variant(&self) -> CIRC_A {
319 match self.bits {
320 false => CIRC_A::Disabled,
321 true => CIRC_A::Enabled,
322 }
323 }
324 #[inline(always)]
326 pub fn is_disabled(&self) -> bool {
327 *self == CIRC_A::Disabled
328 }
329 #[inline(always)]
331 pub fn is_enabled(&self) -> bool {
332 *self == CIRC_A::Enabled
333 }
334}
335pub type CIRC_W<'a, const O: u8> = crate::BitWriter<'a, u32, CR_SPEC, CIRC_A, O>;
337impl<'a, const O: u8> CIRC_W<'a, O> {
338 #[inline(always)]
340 pub fn disabled(self) -> &'a mut W {
341 self.variant(CIRC_A::Disabled)
342 }
343 #[inline(always)]
345 pub fn enabled(self) -> &'a mut W {
346 self.variant(CIRC_A::Enabled)
347 }
348}
349pub type PINC_R = crate::BitReader<PINC_A>;
351#[derive(Clone, Copy, Debug, PartialEq, Eq)]
355pub enum PINC_A {
356 Disabled = 0,
358 Enabled = 1,
360}
361impl From<PINC_A> for bool {
362 #[inline(always)]
363 fn from(variant: PINC_A) -> Self {
364 variant as u8 != 0
365 }
366}
367impl PINC_R {
368 #[inline(always)]
370 pub fn variant(&self) -> PINC_A {
371 match self.bits {
372 false => PINC_A::Disabled,
373 true => PINC_A::Enabled,
374 }
375 }
376 #[inline(always)]
378 pub fn is_disabled(&self) -> bool {
379 *self == PINC_A::Disabled
380 }
381 #[inline(always)]
383 pub fn is_enabled(&self) -> bool {
384 *self == PINC_A::Enabled
385 }
386}
387pub type PINC_W<'a, const O: u8> = crate::BitWriter<'a, u32, CR_SPEC, PINC_A, O>;
389impl<'a, const O: u8> PINC_W<'a, O> {
390 #[inline(always)]
392 pub fn disabled(self) -> &'a mut W {
393 self.variant(PINC_A::Disabled)
394 }
395 #[inline(always)]
397 pub fn enabled(self) -> &'a mut W {
398 self.variant(PINC_A::Enabled)
399 }
400}
401pub use PINC_R as MINC_R;
403pub use PINC_W as MINC_W;
405pub type PSIZE_R = crate::FieldReader<u8, PSIZE_A>;
407#[derive(Clone, Copy, Debug, PartialEq, Eq)]
411#[repr(u8)]
412pub enum PSIZE_A {
413 Bits8 = 0,
415 Bits16 = 1,
417 Bits32 = 2,
419}
420impl From<PSIZE_A> for u8 {
421 #[inline(always)]
422 fn from(variant: PSIZE_A) -> Self {
423 variant as _
424 }
425}
426impl PSIZE_R {
427 #[inline(always)]
429 pub fn variant(&self) -> Option<PSIZE_A> {
430 match self.bits {
431 0 => Some(PSIZE_A::Bits8),
432 1 => Some(PSIZE_A::Bits16),
433 2 => Some(PSIZE_A::Bits32),
434 _ => None,
435 }
436 }
437 #[inline(always)]
439 pub fn is_bits8(&self) -> bool {
440 *self == PSIZE_A::Bits8
441 }
442 #[inline(always)]
444 pub fn is_bits16(&self) -> bool {
445 *self == PSIZE_A::Bits16
446 }
447 #[inline(always)]
449 pub fn is_bits32(&self) -> bool {
450 *self == PSIZE_A::Bits32
451 }
452}
453pub type PSIZE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CR_SPEC, u8, PSIZE_A, 2, O>;
455impl<'a, const O: u8> PSIZE_W<'a, O> {
456 #[inline(always)]
458 pub fn bits8(self) -> &'a mut W {
459 self.variant(PSIZE_A::Bits8)
460 }
461 #[inline(always)]
463 pub fn bits16(self) -> &'a mut W {
464 self.variant(PSIZE_A::Bits16)
465 }
466 #[inline(always)]
468 pub fn bits32(self) -> &'a mut W {
469 self.variant(PSIZE_A::Bits32)
470 }
471}
472pub use PSIZE_R as MSIZE_R;
474pub use PSIZE_W as MSIZE_W;
476pub type PL_R = crate::FieldReader<u8, PL_A>;
478#[derive(Clone, Copy, Debug, PartialEq, Eq)]
482#[repr(u8)]
483pub enum PL_A {
484 Low = 0,
486 Medium = 1,
488 High = 2,
490 VeryHigh = 3,
492}
493impl From<PL_A> for u8 {
494 #[inline(always)]
495 fn from(variant: PL_A) -> Self {
496 variant as _
497 }
498}
499impl PL_R {
500 #[inline(always)]
502 pub fn variant(&self) -> PL_A {
503 match self.bits {
504 0 => PL_A::Low,
505 1 => PL_A::Medium,
506 2 => PL_A::High,
507 3 => PL_A::VeryHigh,
508 _ => unreachable!(),
509 }
510 }
511 #[inline(always)]
513 pub fn is_low(&self) -> bool {
514 *self == PL_A::Low
515 }
516 #[inline(always)]
518 pub fn is_medium(&self) -> bool {
519 *self == PL_A::Medium
520 }
521 #[inline(always)]
523 pub fn is_high(&self) -> bool {
524 *self == PL_A::High
525 }
526 #[inline(always)]
528 pub fn is_very_high(&self) -> bool {
529 *self == PL_A::VeryHigh
530 }
531}
532pub type PL_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, CR_SPEC, u8, PL_A, 2, O>;
534impl<'a, const O: u8> PL_W<'a, O> {
535 #[inline(always)]
537 pub fn low(self) -> &'a mut W {
538 self.variant(PL_A::Low)
539 }
540 #[inline(always)]
542 pub fn medium(self) -> &'a mut W {
543 self.variant(PL_A::Medium)
544 }
545 #[inline(always)]
547 pub fn high(self) -> &'a mut W {
548 self.variant(PL_A::High)
549 }
550 #[inline(always)]
552 pub fn very_high(self) -> &'a mut W {
553 self.variant(PL_A::VeryHigh)
554 }
555}
556pub type MEM2MEM_R = crate::BitReader<MEM2MEM_A>;
558#[derive(Clone, Copy, Debug, PartialEq, Eq)]
562pub enum MEM2MEM_A {
563 Disabled = 0,
565 Enabled = 1,
567}
568impl From<MEM2MEM_A> for bool {
569 #[inline(always)]
570 fn from(variant: MEM2MEM_A) -> Self {
571 variant as u8 != 0
572 }
573}
574impl MEM2MEM_R {
575 #[inline(always)]
577 pub fn variant(&self) -> MEM2MEM_A {
578 match self.bits {
579 false => MEM2MEM_A::Disabled,
580 true => MEM2MEM_A::Enabled,
581 }
582 }
583 #[inline(always)]
585 pub fn is_disabled(&self) -> bool {
586 *self == MEM2MEM_A::Disabled
587 }
588 #[inline(always)]
590 pub fn is_enabled(&self) -> bool {
591 *self == MEM2MEM_A::Enabled
592 }
593}
594pub type MEM2MEM_W<'a, const O: u8> = crate::BitWriter<'a, u32, CR_SPEC, MEM2MEM_A, O>;
596impl<'a, const O: u8> MEM2MEM_W<'a, O> {
597 #[inline(always)]
599 pub fn disabled(self) -> &'a mut W {
600 self.variant(MEM2MEM_A::Disabled)
601 }
602 #[inline(always)]
604 pub fn enabled(self) -> &'a mut W {
605 self.variant(MEM2MEM_A::Enabled)
606 }
607}
608impl R {
609 #[inline(always)]
611 pub fn en(&self) -> EN_R {
612 EN_R::new((self.bits & 1) != 0)
613 }
614 #[inline(always)]
616 pub fn tcie(&self) -> TCIE_R {
617 TCIE_R::new(((self.bits >> 1) & 1) != 0)
618 }
619 #[inline(always)]
621 pub fn htie(&self) -> HTIE_R {
622 HTIE_R::new(((self.bits >> 2) & 1) != 0)
623 }
624 #[inline(always)]
626 pub fn teie(&self) -> TEIE_R {
627 TEIE_R::new(((self.bits >> 3) & 1) != 0)
628 }
629 #[inline(always)]
631 pub fn dir(&self) -> DIR_R {
632 DIR_R::new(((self.bits >> 4) & 1) != 0)
633 }
634 #[inline(always)]
636 pub fn circ(&self) -> CIRC_R {
637 CIRC_R::new(((self.bits >> 5) & 1) != 0)
638 }
639 #[inline(always)]
641 pub fn pinc(&self) -> PINC_R {
642 PINC_R::new(((self.bits >> 6) & 1) != 0)
643 }
644 #[inline(always)]
646 pub fn minc(&self) -> MINC_R {
647 MINC_R::new(((self.bits >> 7) & 1) != 0)
648 }
649 #[inline(always)]
651 pub fn psize(&self) -> PSIZE_R {
652 PSIZE_R::new(((self.bits >> 8) & 3) as u8)
653 }
654 #[inline(always)]
656 pub fn msize(&self) -> MSIZE_R {
657 MSIZE_R::new(((self.bits >> 10) & 3) as u8)
658 }
659 #[inline(always)]
661 pub fn pl(&self) -> PL_R {
662 PL_R::new(((self.bits >> 12) & 3) as u8)
663 }
664 #[inline(always)]
666 pub fn mem2mem(&self) -> MEM2MEM_R {
667 MEM2MEM_R::new(((self.bits >> 14) & 1) != 0)
668 }
669}
670impl W {
671 #[inline(always)]
673 #[must_use]
674 pub fn en(&mut self) -> EN_W<0> {
675 EN_W::new(self)
676 }
677 #[inline(always)]
679 #[must_use]
680 pub fn tcie(&mut self) -> TCIE_W<1> {
681 TCIE_W::new(self)
682 }
683 #[inline(always)]
685 #[must_use]
686 pub fn htie(&mut self) -> HTIE_W<2> {
687 HTIE_W::new(self)
688 }
689 #[inline(always)]
691 #[must_use]
692 pub fn teie(&mut self) -> TEIE_W<3> {
693 TEIE_W::new(self)
694 }
695 #[inline(always)]
697 #[must_use]
698 pub fn dir(&mut self) -> DIR_W<4> {
699 DIR_W::new(self)
700 }
701 #[inline(always)]
703 #[must_use]
704 pub fn circ(&mut self) -> CIRC_W<5> {
705 CIRC_W::new(self)
706 }
707 #[inline(always)]
709 #[must_use]
710 pub fn pinc(&mut self) -> PINC_W<6> {
711 PINC_W::new(self)
712 }
713 #[inline(always)]
715 #[must_use]
716 pub fn minc(&mut self) -> MINC_W<7> {
717 MINC_W::new(self)
718 }
719 #[inline(always)]
721 #[must_use]
722 pub fn psize(&mut self) -> PSIZE_W<8> {
723 PSIZE_W::new(self)
724 }
725 #[inline(always)]
727 #[must_use]
728 pub fn msize(&mut self) -> MSIZE_W<10> {
729 MSIZE_W::new(self)
730 }
731 #[inline(always)]
733 #[must_use]
734 pub fn pl(&mut self) -> PL_W<12> {
735 PL_W::new(self)
736 }
737 #[inline(always)]
739 #[must_use]
740 pub fn mem2mem(&mut self) -> MEM2MEM_W<14> {
741 MEM2MEM_W::new(self)
742 }
743 #[inline(always)]
745 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
746 self.0.bits(bits);
747 self
748 }
749}
750pub struct CR_SPEC;
756impl crate::RegisterSpec for CR_SPEC {
757 type Ux = u32;
758}
759impl crate::Readable for CR_SPEC {
761 type Reader = R;
762}
763impl crate::Writable for CR_SPEC {
765 type Writer = W;
766 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
767 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
768}
769impl crate::Resettable for CR_SPEC {
771 const RESET_VALUE: Self::Ux = 0;
772}