1pub type R = crate::R<DIERrs>;
3pub type W = crate::W<DIERrs>;
5#[cfg_attr(feature = "defmt", derive(defmt::Format))]
9#[derive(Clone, Copy, Debug, PartialEq, Eq)]
10pub enum UIE {
11 Disabled = 0,
13 Enabled = 1,
15}
16impl From<UIE> for bool {
17 #[inline(always)]
18 fn from(variant: UIE) -> Self {
19 variant as u8 != 0
20 }
21}
22pub type UIE_R = crate::BitReader<UIE>;
24impl UIE_R {
25 #[inline(always)]
27 pub const fn variant(&self) -> UIE {
28 match self.bits {
29 false => UIE::Disabled,
30 true => UIE::Enabled,
31 }
32 }
33 #[inline(always)]
35 pub fn is_disabled(&self) -> bool {
36 *self == UIE::Disabled
37 }
38 #[inline(always)]
40 pub fn is_enabled(&self) -> bool {
41 *self == UIE::Enabled
42 }
43}
44pub type UIE_W<'a, REG> = crate::BitWriter<'a, REG, UIE>;
46impl<'a, REG> UIE_W<'a, REG>
47where
48 REG: crate::Writable + crate::RegisterSpec,
49{
50 #[inline(always)]
52 pub fn disabled(self) -> &'a mut crate::W<REG> {
53 self.variant(UIE::Disabled)
54 }
55 #[inline(always)]
57 pub fn enabled(self) -> &'a mut crate::W<REG> {
58 self.variant(UIE::Enabled)
59 }
60}
61#[cfg_attr(feature = "defmt", derive(defmt::Format))]
65#[derive(Clone, Copy, Debug, PartialEq, Eq)]
66pub enum CC1IE {
67 Disabled = 0,
69 Enabled = 1,
71}
72impl From<CC1IE> for bool {
73 #[inline(always)]
74 fn from(variant: CC1IE) -> Self {
75 variant as u8 != 0
76 }
77}
78pub type CCIE_R = crate::BitReader<CC1IE>;
80impl CCIE_R {
81 #[inline(always)]
83 pub const fn variant(&self) -> CC1IE {
84 match self.bits {
85 false => CC1IE::Disabled,
86 true => CC1IE::Enabled,
87 }
88 }
89 #[inline(always)]
91 pub fn is_disabled(&self) -> bool {
92 *self == CC1IE::Disabled
93 }
94 #[inline(always)]
96 pub fn is_enabled(&self) -> bool {
97 *self == CC1IE::Enabled
98 }
99}
100pub type CCIE_W<'a, REG> = crate::BitWriter<'a, REG, CC1IE>;
102impl<'a, REG> CCIE_W<'a, REG>
103where
104 REG: crate::Writable + crate::RegisterSpec,
105{
106 #[inline(always)]
108 pub fn disabled(self) -> &'a mut crate::W<REG> {
109 self.variant(CC1IE::Disabled)
110 }
111 #[inline(always)]
113 pub fn enabled(self) -> &'a mut crate::W<REG> {
114 self.variant(CC1IE::Enabled)
115 }
116}
117#[cfg_attr(feature = "defmt", derive(defmt::Format))]
121#[derive(Clone, Copy, Debug, PartialEq, Eq)]
122pub enum COMIE {
123 Disabled = 0,
125 Enabled = 1,
127}
128impl From<COMIE> for bool {
129 #[inline(always)]
130 fn from(variant: COMIE) -> Self {
131 variant as u8 != 0
132 }
133}
134pub type COMIE_R = crate::BitReader<COMIE>;
136impl COMIE_R {
137 #[inline(always)]
139 pub const fn variant(&self) -> COMIE {
140 match self.bits {
141 false => COMIE::Disabled,
142 true => COMIE::Enabled,
143 }
144 }
145 #[inline(always)]
147 pub fn is_disabled(&self) -> bool {
148 *self == COMIE::Disabled
149 }
150 #[inline(always)]
152 pub fn is_enabled(&self) -> bool {
153 *self == COMIE::Enabled
154 }
155}
156pub type COMIE_W<'a, REG> = crate::BitWriter<'a, REG, COMIE>;
158impl<'a, REG> COMIE_W<'a, REG>
159where
160 REG: crate::Writable + crate::RegisterSpec,
161{
162 #[inline(always)]
164 pub fn disabled(self) -> &'a mut crate::W<REG> {
165 self.variant(COMIE::Disabled)
166 }
167 #[inline(always)]
169 pub fn enabled(self) -> &'a mut crate::W<REG> {
170 self.variant(COMIE::Enabled)
171 }
172}
173#[cfg_attr(feature = "defmt", derive(defmt::Format))]
177#[derive(Clone, Copy, Debug, PartialEq, Eq)]
178pub enum TIE {
179 Disabled = 0,
181 Enabled = 1,
183}
184impl From<TIE> for bool {
185 #[inline(always)]
186 fn from(variant: TIE) -> Self {
187 variant as u8 != 0
188 }
189}
190pub type TIE_R = crate::BitReader<TIE>;
192impl TIE_R {
193 #[inline(always)]
195 pub const fn variant(&self) -> TIE {
196 match self.bits {
197 false => TIE::Disabled,
198 true => TIE::Enabled,
199 }
200 }
201 #[inline(always)]
203 pub fn is_disabled(&self) -> bool {
204 *self == TIE::Disabled
205 }
206 #[inline(always)]
208 pub fn is_enabled(&self) -> bool {
209 *self == TIE::Enabled
210 }
211}
212pub type TIE_W<'a, REG> = crate::BitWriter<'a, REG, TIE>;
214impl<'a, REG> TIE_W<'a, REG>
215where
216 REG: crate::Writable + crate::RegisterSpec,
217{
218 #[inline(always)]
220 pub fn disabled(self) -> &'a mut crate::W<REG> {
221 self.variant(TIE::Disabled)
222 }
223 #[inline(always)]
225 pub fn enabled(self) -> &'a mut crate::W<REG> {
226 self.variant(TIE::Enabled)
227 }
228}
229#[cfg_attr(feature = "defmt", derive(defmt::Format))]
233#[derive(Clone, Copy, Debug, PartialEq, Eq)]
234pub enum BIE {
235 Disabled = 0,
237 Enabled = 1,
239}
240impl From<BIE> for bool {
241 #[inline(always)]
242 fn from(variant: BIE) -> Self {
243 variant as u8 != 0
244 }
245}
246pub type BIE_R = crate::BitReader<BIE>;
248impl BIE_R {
249 #[inline(always)]
251 pub const fn variant(&self) -> BIE {
252 match self.bits {
253 false => BIE::Disabled,
254 true => BIE::Enabled,
255 }
256 }
257 #[inline(always)]
259 pub fn is_disabled(&self) -> bool {
260 *self == BIE::Disabled
261 }
262 #[inline(always)]
264 pub fn is_enabled(&self) -> bool {
265 *self == BIE::Enabled
266 }
267}
268pub type BIE_W<'a, REG> = crate::BitWriter<'a, REG, BIE>;
270impl<'a, REG> BIE_W<'a, REG>
271where
272 REG: crate::Writable + crate::RegisterSpec,
273{
274 #[inline(always)]
276 pub fn disabled(self) -> &'a mut crate::W<REG> {
277 self.variant(BIE::Disabled)
278 }
279 #[inline(always)]
281 pub fn enabled(self) -> &'a mut crate::W<REG> {
282 self.variant(BIE::Enabled)
283 }
284}
285#[cfg_attr(feature = "defmt", derive(defmt::Format))]
289#[derive(Clone, Copy, Debug, PartialEq, Eq)]
290pub enum UDE {
291 Disabled = 0,
293 Enabled = 1,
295}
296impl From<UDE> for bool {
297 #[inline(always)]
298 fn from(variant: UDE) -> Self {
299 variant as u8 != 0
300 }
301}
302pub type UDE_R = crate::BitReader<UDE>;
304impl UDE_R {
305 #[inline(always)]
307 pub const fn variant(&self) -> UDE {
308 match self.bits {
309 false => UDE::Disabled,
310 true => UDE::Enabled,
311 }
312 }
313 #[inline(always)]
315 pub fn is_disabled(&self) -> bool {
316 *self == UDE::Disabled
317 }
318 #[inline(always)]
320 pub fn is_enabled(&self) -> bool {
321 *self == UDE::Enabled
322 }
323}
324pub type UDE_W<'a, REG> = crate::BitWriter<'a, REG, UDE>;
326impl<'a, REG> UDE_W<'a, REG>
327where
328 REG: crate::Writable + crate::RegisterSpec,
329{
330 #[inline(always)]
332 pub fn disabled(self) -> &'a mut crate::W<REG> {
333 self.variant(UDE::Disabled)
334 }
335 #[inline(always)]
337 pub fn enabled(self) -> &'a mut crate::W<REG> {
338 self.variant(UDE::Enabled)
339 }
340}
341#[cfg_attr(feature = "defmt", derive(defmt::Format))]
345#[derive(Clone, Copy, Debug, PartialEq, Eq)]
346pub enum CC1DE {
347 Disabled = 0,
349 Enabled = 1,
351}
352impl From<CC1DE> for bool {
353 #[inline(always)]
354 fn from(variant: CC1DE) -> Self {
355 variant as u8 != 0
356 }
357}
358pub type CCDE_R = crate::BitReader<CC1DE>;
360impl CCDE_R {
361 #[inline(always)]
363 pub const fn variant(&self) -> CC1DE {
364 match self.bits {
365 false => CC1DE::Disabled,
366 true => CC1DE::Enabled,
367 }
368 }
369 #[inline(always)]
371 pub fn is_disabled(&self) -> bool {
372 *self == CC1DE::Disabled
373 }
374 #[inline(always)]
376 pub fn is_enabled(&self) -> bool {
377 *self == CC1DE::Enabled
378 }
379}
380pub type CCDE_W<'a, REG> = crate::BitWriter<'a, REG, CC1DE>;
382impl<'a, REG> CCDE_W<'a, REG>
383where
384 REG: crate::Writable + crate::RegisterSpec,
385{
386 #[inline(always)]
388 pub fn disabled(self) -> &'a mut crate::W<REG> {
389 self.variant(CC1DE::Disabled)
390 }
391 #[inline(always)]
393 pub fn enabled(self) -> &'a mut crate::W<REG> {
394 self.variant(CC1DE::Enabled)
395 }
396}
397#[cfg_attr(feature = "defmt", derive(defmt::Format))]
401#[derive(Clone, Copy, Debug, PartialEq, Eq)]
402pub enum COMDE {
403 Disabled = 0,
405 Enabled = 1,
407}
408impl From<COMDE> for bool {
409 #[inline(always)]
410 fn from(variant: COMDE) -> Self {
411 variant as u8 != 0
412 }
413}
414pub type COMDE_R = crate::BitReader<COMDE>;
416impl COMDE_R {
417 #[inline(always)]
419 pub const fn variant(&self) -> COMDE {
420 match self.bits {
421 false => COMDE::Disabled,
422 true => COMDE::Enabled,
423 }
424 }
425 #[inline(always)]
427 pub fn is_disabled(&self) -> bool {
428 *self == COMDE::Disabled
429 }
430 #[inline(always)]
432 pub fn is_enabled(&self) -> bool {
433 *self == COMDE::Enabled
434 }
435}
436pub type COMDE_W<'a, REG> = crate::BitWriter<'a, REG, COMDE>;
438impl<'a, REG> COMDE_W<'a, REG>
439where
440 REG: crate::Writable + crate::RegisterSpec,
441{
442 #[inline(always)]
444 pub fn disabled(self) -> &'a mut crate::W<REG> {
445 self.variant(COMDE::Disabled)
446 }
447 #[inline(always)]
449 pub fn enabled(self) -> &'a mut crate::W<REG> {
450 self.variant(COMDE::Enabled)
451 }
452}
453#[cfg_attr(feature = "defmt", derive(defmt::Format))]
457#[derive(Clone, Copy, Debug, PartialEq, Eq)]
458pub enum TDE {
459 Disabled = 0,
461 Enabled = 1,
463}
464impl From<TDE> for bool {
465 #[inline(always)]
466 fn from(variant: TDE) -> Self {
467 variant as u8 != 0
468 }
469}
470pub type TDE_R = crate::BitReader<TDE>;
472impl TDE_R {
473 #[inline(always)]
475 pub const fn variant(&self) -> TDE {
476 match self.bits {
477 false => TDE::Disabled,
478 true => TDE::Enabled,
479 }
480 }
481 #[inline(always)]
483 pub fn is_disabled(&self) -> bool {
484 *self == TDE::Disabled
485 }
486 #[inline(always)]
488 pub fn is_enabled(&self) -> bool {
489 *self == TDE::Enabled
490 }
491}
492pub type TDE_W<'a, REG> = crate::BitWriter<'a, REG, TDE>;
494impl<'a, REG> TDE_W<'a, REG>
495where
496 REG: crate::Writable + crate::RegisterSpec,
497{
498 #[inline(always)]
500 pub fn disabled(self) -> &'a mut crate::W<REG> {
501 self.variant(TDE::Disabled)
502 }
503 #[inline(always)]
505 pub fn enabled(self) -> &'a mut crate::W<REG> {
506 self.variant(TDE::Enabled)
507 }
508}
509impl R {
510 #[inline(always)]
512 pub fn uie(&self) -> UIE_R {
513 UIE_R::new((self.bits & 1) != 0)
514 }
515 #[inline(always)]
519 pub fn ccie(&self, n: u8) -> CCIE_R {
520 #[allow(clippy::no_effect)]
521 [(); 4][n as usize];
522 CCIE_R::new(((self.bits >> (n + 1)) & 1) != 0)
523 }
524 #[inline(always)]
527 pub fn ccie_iter(&self) -> impl Iterator<Item = CCIE_R> + '_ {
528 (0..4).map(move |n| CCIE_R::new(((self.bits >> (n + 1)) & 1) != 0))
529 }
530 #[inline(always)]
532 pub fn cc1ie(&self) -> CCIE_R {
533 CCIE_R::new(((self.bits >> 1) & 1) != 0)
534 }
535 #[inline(always)]
537 pub fn cc2ie(&self) -> CCIE_R {
538 CCIE_R::new(((self.bits >> 2) & 1) != 0)
539 }
540 #[inline(always)]
542 pub fn cc3ie(&self) -> CCIE_R {
543 CCIE_R::new(((self.bits >> 3) & 1) != 0)
544 }
545 #[inline(always)]
547 pub fn cc4ie(&self) -> CCIE_R {
548 CCIE_R::new(((self.bits >> 4) & 1) != 0)
549 }
550 #[inline(always)]
552 pub fn comie(&self) -> COMIE_R {
553 COMIE_R::new(((self.bits >> 5) & 1) != 0)
554 }
555 #[inline(always)]
557 pub fn tie(&self) -> TIE_R {
558 TIE_R::new(((self.bits >> 6) & 1) != 0)
559 }
560 #[inline(always)]
562 pub fn bie(&self) -> BIE_R {
563 BIE_R::new(((self.bits >> 7) & 1) != 0)
564 }
565 #[inline(always)]
567 pub fn ude(&self) -> UDE_R {
568 UDE_R::new(((self.bits >> 8) & 1) != 0)
569 }
570 #[inline(always)]
574 pub fn ccde(&self, n: u8) -> CCDE_R {
575 #[allow(clippy::no_effect)]
576 [(); 4][n as usize];
577 CCDE_R::new(((self.bits >> (n + 9)) & 1) != 0)
578 }
579 #[inline(always)]
582 pub fn ccde_iter(&self) -> impl Iterator<Item = CCDE_R> + '_ {
583 (0..4).map(move |n| CCDE_R::new(((self.bits >> (n + 9)) & 1) != 0))
584 }
585 #[inline(always)]
587 pub fn cc1de(&self) -> CCDE_R {
588 CCDE_R::new(((self.bits >> 9) & 1) != 0)
589 }
590 #[inline(always)]
592 pub fn cc2de(&self) -> CCDE_R {
593 CCDE_R::new(((self.bits >> 10) & 1) != 0)
594 }
595 #[inline(always)]
597 pub fn cc3de(&self) -> CCDE_R {
598 CCDE_R::new(((self.bits >> 11) & 1) != 0)
599 }
600 #[inline(always)]
602 pub fn cc4de(&self) -> CCDE_R {
603 CCDE_R::new(((self.bits >> 12) & 1) != 0)
604 }
605 #[inline(always)]
607 pub fn comde(&self) -> COMDE_R {
608 COMDE_R::new(((self.bits >> 13) & 1) != 0)
609 }
610 #[inline(always)]
612 pub fn tde(&self) -> TDE_R {
613 TDE_R::new(((self.bits >> 14) & 1) != 0)
614 }
615}
616impl core::fmt::Debug for R {
617 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
618 f.debug_struct("DIER")
619 .field("tde", &self.tde())
620 .field("comde", &self.comde())
621 .field("cc1de", &self.cc1de())
622 .field("cc2de", &self.cc2de())
623 .field("cc3de", &self.cc3de())
624 .field("cc4de", &self.cc4de())
625 .field("ude", &self.ude())
626 .field("tie", &self.tie())
627 .field("cc1ie", &self.cc1ie())
628 .field("cc2ie", &self.cc2ie())
629 .field("cc3ie", &self.cc3ie())
630 .field("cc4ie", &self.cc4ie())
631 .field("uie", &self.uie())
632 .field("bie", &self.bie())
633 .field("comie", &self.comie())
634 .finish()
635 }
636}
637impl W {
638 #[inline(always)]
640 pub fn uie(&mut self) -> UIE_W<DIERrs> {
641 UIE_W::new(self, 0)
642 }
643 #[inline(always)]
647 pub fn ccie(&mut self, n: u8) -> CCIE_W<DIERrs> {
648 #[allow(clippy::no_effect)]
649 [(); 4][n as usize];
650 CCIE_W::new(self, n + 1)
651 }
652 #[inline(always)]
654 pub fn cc1ie(&mut self) -> CCIE_W<DIERrs> {
655 CCIE_W::new(self, 1)
656 }
657 #[inline(always)]
659 pub fn cc2ie(&mut self) -> CCIE_W<DIERrs> {
660 CCIE_W::new(self, 2)
661 }
662 #[inline(always)]
664 pub fn cc3ie(&mut self) -> CCIE_W<DIERrs> {
665 CCIE_W::new(self, 3)
666 }
667 #[inline(always)]
669 pub fn cc4ie(&mut self) -> CCIE_W<DIERrs> {
670 CCIE_W::new(self, 4)
671 }
672 #[inline(always)]
674 pub fn comie(&mut self) -> COMIE_W<DIERrs> {
675 COMIE_W::new(self, 5)
676 }
677 #[inline(always)]
679 pub fn tie(&mut self) -> TIE_W<DIERrs> {
680 TIE_W::new(self, 6)
681 }
682 #[inline(always)]
684 pub fn bie(&mut self) -> BIE_W<DIERrs> {
685 BIE_W::new(self, 7)
686 }
687 #[inline(always)]
689 pub fn ude(&mut self) -> UDE_W<DIERrs> {
690 UDE_W::new(self, 8)
691 }
692 #[inline(always)]
696 pub fn ccde(&mut self, n: u8) -> CCDE_W<DIERrs> {
697 #[allow(clippy::no_effect)]
698 [(); 4][n as usize];
699 CCDE_W::new(self, n + 9)
700 }
701 #[inline(always)]
703 pub fn cc1de(&mut self) -> CCDE_W<DIERrs> {
704 CCDE_W::new(self, 9)
705 }
706 #[inline(always)]
708 pub fn cc2de(&mut self) -> CCDE_W<DIERrs> {
709 CCDE_W::new(self, 10)
710 }
711 #[inline(always)]
713 pub fn cc3de(&mut self) -> CCDE_W<DIERrs> {
714 CCDE_W::new(self, 11)
715 }
716 #[inline(always)]
718 pub fn cc4de(&mut self) -> CCDE_W<DIERrs> {
719 CCDE_W::new(self, 12)
720 }
721 #[inline(always)]
723 pub fn comde(&mut self) -> COMDE_W<DIERrs> {
724 COMDE_W::new(self, 13)
725 }
726 #[inline(always)]
728 pub fn tde(&mut self) -> TDE_W<DIERrs> {
729 TDE_W::new(self, 14)
730 }
731}
732pub struct DIERrs;
738impl crate::RegisterSpec for DIERrs {
739 type Ux = u32;
740}
741impl crate::Readable for DIERrs {}
743impl crate::Writable for DIERrs {
745 type Safety = crate::Unsafe;
746}
747impl crate::Resettable for DIERrs {}