1pub type R = crate::R<CRrs>;
3pub type W = crate::W<CRrs>;
5#[cfg_attr(feature = "defmt", derive(defmt::Format))]
9#[derive(Clone, Copy, Debug, PartialEq, Eq)]
10#[repr(u8)]
11pub enum WUCKSEL {
12 Div16 = 0,
14 Div8 = 1,
16 Div4 = 2,
18 Div2 = 3,
20 ClockSpare = 4,
22 ClockSpareWithOffset = 6,
24}
25impl From<WUCKSEL> for u8 {
26 #[inline(always)]
27 fn from(variant: WUCKSEL) -> Self {
28 variant as _
29 }
30}
31impl crate::FieldSpec for WUCKSEL {
32 type Ux = u8;
33}
34impl crate::IsEnum for WUCKSEL {}
35pub type WUCKSEL_R = crate::FieldReader<WUCKSEL>;
37impl WUCKSEL_R {
38 #[inline(always)]
40 pub const fn variant(&self) -> Option<WUCKSEL> {
41 match self.bits {
42 0 => Some(WUCKSEL::Div16),
43 1 => Some(WUCKSEL::Div8),
44 2 => Some(WUCKSEL::Div4),
45 3 => Some(WUCKSEL::Div2),
46 4 => Some(WUCKSEL::ClockSpare),
47 6 => Some(WUCKSEL::ClockSpareWithOffset),
48 _ => None,
49 }
50 }
51 #[inline(always)]
53 pub fn is_div16(&self) -> bool {
54 *self == WUCKSEL::Div16
55 }
56 #[inline(always)]
58 pub fn is_div8(&self) -> bool {
59 *self == WUCKSEL::Div8
60 }
61 #[inline(always)]
63 pub fn is_div4(&self) -> bool {
64 *self == WUCKSEL::Div4
65 }
66 #[inline(always)]
68 pub fn is_div2(&self) -> bool {
69 *self == WUCKSEL::Div2
70 }
71 #[inline(always)]
73 pub fn is_clock_spare(&self) -> bool {
74 *self == WUCKSEL::ClockSpare
75 }
76 #[inline(always)]
78 pub fn is_clock_spare_with_offset(&self) -> bool {
79 *self == WUCKSEL::ClockSpareWithOffset
80 }
81}
82pub type WUCKSEL_W<'a, REG> = crate::FieldWriter<'a, REG, 3, WUCKSEL>;
84impl<'a, REG> WUCKSEL_W<'a, REG>
85where
86 REG: crate::Writable + crate::RegisterSpec,
87 REG::Ux: From<u8>,
88{
89 #[inline(always)]
91 pub fn div16(self) -> &'a mut crate::W<REG> {
92 self.variant(WUCKSEL::Div16)
93 }
94 #[inline(always)]
96 pub fn div8(self) -> &'a mut crate::W<REG> {
97 self.variant(WUCKSEL::Div8)
98 }
99 #[inline(always)]
101 pub fn div4(self) -> &'a mut crate::W<REG> {
102 self.variant(WUCKSEL::Div4)
103 }
104 #[inline(always)]
106 pub fn div2(self) -> &'a mut crate::W<REG> {
107 self.variant(WUCKSEL::Div2)
108 }
109 #[inline(always)]
111 pub fn clock_spare(self) -> &'a mut crate::W<REG> {
112 self.variant(WUCKSEL::ClockSpare)
113 }
114 #[inline(always)]
116 pub fn clock_spare_with_offset(self) -> &'a mut crate::W<REG> {
117 self.variant(WUCKSEL::ClockSpareWithOffset)
118 }
119}
120#[cfg_attr(feature = "defmt", derive(defmt::Format))]
124#[derive(Clone, Copy, Debug, PartialEq, Eq)]
125pub enum TSEDGE {
126 RisingEdge = 0,
128 FallingEdge = 1,
130}
131impl From<TSEDGE> for bool {
132 #[inline(always)]
133 fn from(variant: TSEDGE) -> Self {
134 variant as u8 != 0
135 }
136}
137pub type TSEDGE_R = crate::BitReader<TSEDGE>;
139impl TSEDGE_R {
140 #[inline(always)]
142 pub const fn variant(&self) -> TSEDGE {
143 match self.bits {
144 false => TSEDGE::RisingEdge,
145 true => TSEDGE::FallingEdge,
146 }
147 }
148 #[inline(always)]
150 pub fn is_rising_edge(&self) -> bool {
151 *self == TSEDGE::RisingEdge
152 }
153 #[inline(always)]
155 pub fn is_falling_edge(&self) -> bool {
156 *self == TSEDGE::FallingEdge
157 }
158}
159pub type TSEDGE_W<'a, REG> = crate::BitWriter<'a, REG, TSEDGE>;
161impl<'a, REG> TSEDGE_W<'a, REG>
162where
163 REG: crate::Writable + crate::RegisterSpec,
164{
165 #[inline(always)]
167 pub fn rising_edge(self) -> &'a mut crate::W<REG> {
168 self.variant(TSEDGE::RisingEdge)
169 }
170 #[inline(always)]
172 pub fn falling_edge(self) -> &'a mut crate::W<REG> {
173 self.variant(TSEDGE::FallingEdge)
174 }
175}
176#[cfg_attr(feature = "defmt", derive(defmt::Format))]
180#[derive(Clone, Copy, Debug, PartialEq, Eq)]
181pub enum REFCKON {
182 Disabled = 0,
184 Enabled = 1,
186}
187impl From<REFCKON> for bool {
188 #[inline(always)]
189 fn from(variant: REFCKON) -> Self {
190 variant as u8 != 0
191 }
192}
193pub type REFCKON_R = crate::BitReader<REFCKON>;
195impl REFCKON_R {
196 #[inline(always)]
198 pub const fn variant(&self) -> REFCKON {
199 match self.bits {
200 false => REFCKON::Disabled,
201 true => REFCKON::Enabled,
202 }
203 }
204 #[inline(always)]
206 pub fn is_disabled(&self) -> bool {
207 *self == REFCKON::Disabled
208 }
209 #[inline(always)]
211 pub fn is_enabled(&self) -> bool {
212 *self == REFCKON::Enabled
213 }
214}
215pub type REFCKON_W<'a, REG> = crate::BitWriter<'a, REG, REFCKON>;
217impl<'a, REG> REFCKON_W<'a, REG>
218where
219 REG: crate::Writable + crate::RegisterSpec,
220{
221 #[inline(always)]
223 pub fn disabled(self) -> &'a mut crate::W<REG> {
224 self.variant(REFCKON::Disabled)
225 }
226 #[inline(always)]
228 pub fn enabled(self) -> &'a mut crate::W<REG> {
229 self.variant(REFCKON::Enabled)
230 }
231}
232#[cfg_attr(feature = "defmt", derive(defmt::Format))]
236#[derive(Clone, Copy, Debug, PartialEq, Eq)]
237pub enum FMT {
238 TwentyFourHour = 0,
240 AmPm = 1,
242}
243impl From<FMT> for bool {
244 #[inline(always)]
245 fn from(variant: FMT) -> Self {
246 variant as u8 != 0
247 }
248}
249pub type FMT_R = crate::BitReader<FMT>;
251impl FMT_R {
252 #[inline(always)]
254 pub const fn variant(&self) -> FMT {
255 match self.bits {
256 false => FMT::TwentyFourHour,
257 true => FMT::AmPm,
258 }
259 }
260 #[inline(always)]
262 pub fn is_twenty_four_hour(&self) -> bool {
263 *self == FMT::TwentyFourHour
264 }
265 #[inline(always)]
267 pub fn is_am_pm(&self) -> bool {
268 *self == FMT::AmPm
269 }
270}
271pub type FMT_W<'a, REG> = crate::BitWriter<'a, REG, FMT>;
273impl<'a, REG> FMT_W<'a, REG>
274where
275 REG: crate::Writable + crate::RegisterSpec,
276{
277 #[inline(always)]
279 pub fn twenty_four_hour(self) -> &'a mut crate::W<REG> {
280 self.variant(FMT::TwentyFourHour)
281 }
282 #[inline(always)]
284 pub fn am_pm(self) -> &'a mut crate::W<REG> {
285 self.variant(FMT::AmPm)
286 }
287}
288pub type DCE_R = crate::BitReader;
290pub type DCE_W<'a, REG> = crate::BitWriter<'a, REG>;
292#[cfg_attr(feature = "defmt", derive(defmt::Format))]
296#[derive(Clone, Copy, Debug, PartialEq, Eq)]
297pub enum ALRAE {
298 Disabled = 0,
300 Enabled = 1,
302}
303impl From<ALRAE> for bool {
304 #[inline(always)]
305 fn from(variant: ALRAE) -> Self {
306 variant as u8 != 0
307 }
308}
309pub type ALRE_R = crate::BitReader<ALRAE>;
311impl ALRE_R {
312 #[inline(always)]
314 pub const fn variant(&self) -> ALRAE {
315 match self.bits {
316 false => ALRAE::Disabled,
317 true => ALRAE::Enabled,
318 }
319 }
320 #[inline(always)]
322 pub fn is_disabled(&self) -> bool {
323 *self == ALRAE::Disabled
324 }
325 #[inline(always)]
327 pub fn is_enabled(&self) -> bool {
328 *self == ALRAE::Enabled
329 }
330}
331pub type ALRE_W<'a, REG> = crate::BitWriter<'a, REG, ALRAE>;
333impl<'a, REG> ALRE_W<'a, REG>
334where
335 REG: crate::Writable + crate::RegisterSpec,
336{
337 #[inline(always)]
339 pub fn disabled(self) -> &'a mut crate::W<REG> {
340 self.variant(ALRAE::Disabled)
341 }
342 #[inline(always)]
344 pub fn enabled(self) -> &'a mut crate::W<REG> {
345 self.variant(ALRAE::Enabled)
346 }
347}
348#[cfg_attr(feature = "defmt", derive(defmt::Format))]
352#[derive(Clone, Copy, Debug, PartialEq, Eq)]
353pub enum WUTE {
354 Disabled = 0,
356 Enabled = 1,
358}
359impl From<WUTE> for bool {
360 #[inline(always)]
361 fn from(variant: WUTE) -> Self {
362 variant as u8 != 0
363 }
364}
365pub type WUTE_R = crate::BitReader<WUTE>;
367impl WUTE_R {
368 #[inline(always)]
370 pub const fn variant(&self) -> WUTE {
371 match self.bits {
372 false => WUTE::Disabled,
373 true => WUTE::Enabled,
374 }
375 }
376 #[inline(always)]
378 pub fn is_disabled(&self) -> bool {
379 *self == WUTE::Disabled
380 }
381 #[inline(always)]
383 pub fn is_enabled(&self) -> bool {
384 *self == WUTE::Enabled
385 }
386}
387pub type WUTE_W<'a, REG> = crate::BitWriter<'a, REG, WUTE>;
389impl<'a, REG> WUTE_W<'a, REG>
390where
391 REG: crate::Writable + crate::RegisterSpec,
392{
393 #[inline(always)]
395 pub fn disabled(self) -> &'a mut crate::W<REG> {
396 self.variant(WUTE::Disabled)
397 }
398 #[inline(always)]
400 pub fn enabled(self) -> &'a mut crate::W<REG> {
401 self.variant(WUTE::Enabled)
402 }
403}
404#[cfg_attr(feature = "defmt", derive(defmt::Format))]
408#[derive(Clone, Copy, Debug, PartialEq, Eq)]
409pub enum TSE {
410 Disabled = 0,
412 Enabled = 1,
414}
415impl From<TSE> for bool {
416 #[inline(always)]
417 fn from(variant: TSE) -> Self {
418 variant as u8 != 0
419 }
420}
421pub type TSE_R = crate::BitReader<TSE>;
423impl TSE_R {
424 #[inline(always)]
426 pub const fn variant(&self) -> TSE {
427 match self.bits {
428 false => TSE::Disabled,
429 true => TSE::Enabled,
430 }
431 }
432 #[inline(always)]
434 pub fn is_disabled(&self) -> bool {
435 *self == TSE::Disabled
436 }
437 #[inline(always)]
439 pub fn is_enabled(&self) -> bool {
440 *self == TSE::Enabled
441 }
442}
443pub type TSE_W<'a, REG> = crate::BitWriter<'a, REG, TSE>;
445impl<'a, REG> TSE_W<'a, REG>
446where
447 REG: crate::Writable + crate::RegisterSpec,
448{
449 #[inline(always)]
451 pub fn disabled(self) -> &'a mut crate::W<REG> {
452 self.variant(TSE::Disabled)
453 }
454 #[inline(always)]
456 pub fn enabled(self) -> &'a mut crate::W<REG> {
457 self.variant(TSE::Enabled)
458 }
459}
460#[cfg_attr(feature = "defmt", derive(defmt::Format))]
464#[derive(Clone, Copy, Debug, PartialEq, Eq)]
465pub enum ALRAIE {
466 Disabled = 0,
468 Enabled = 1,
470}
471impl From<ALRAIE> for bool {
472 #[inline(always)]
473 fn from(variant: ALRAIE) -> Self {
474 variant as u8 != 0
475 }
476}
477pub type ALRIE_R = crate::BitReader<ALRAIE>;
479impl ALRIE_R {
480 #[inline(always)]
482 pub const fn variant(&self) -> ALRAIE {
483 match self.bits {
484 false => ALRAIE::Disabled,
485 true => ALRAIE::Enabled,
486 }
487 }
488 #[inline(always)]
490 pub fn is_disabled(&self) -> bool {
491 *self == ALRAIE::Disabled
492 }
493 #[inline(always)]
495 pub fn is_enabled(&self) -> bool {
496 *self == ALRAIE::Enabled
497 }
498}
499pub type ALRIE_W<'a, REG> = crate::BitWriter<'a, REG, ALRAIE>;
501impl<'a, REG> ALRIE_W<'a, REG>
502where
503 REG: crate::Writable + crate::RegisterSpec,
504{
505 #[inline(always)]
507 pub fn disabled(self) -> &'a mut crate::W<REG> {
508 self.variant(ALRAIE::Disabled)
509 }
510 #[inline(always)]
512 pub fn enabled(self) -> &'a mut crate::W<REG> {
513 self.variant(ALRAIE::Enabled)
514 }
515}
516#[cfg_attr(feature = "defmt", derive(defmt::Format))]
520#[derive(Clone, Copy, Debug, PartialEq, Eq)]
521pub enum WUTIE {
522 Disabled = 0,
524 Enabled = 1,
526}
527impl From<WUTIE> for bool {
528 #[inline(always)]
529 fn from(variant: WUTIE) -> Self {
530 variant as u8 != 0
531 }
532}
533pub type WUTIE_R = crate::BitReader<WUTIE>;
535impl WUTIE_R {
536 #[inline(always)]
538 pub const fn variant(&self) -> WUTIE {
539 match self.bits {
540 false => WUTIE::Disabled,
541 true => WUTIE::Enabled,
542 }
543 }
544 #[inline(always)]
546 pub fn is_disabled(&self) -> bool {
547 *self == WUTIE::Disabled
548 }
549 #[inline(always)]
551 pub fn is_enabled(&self) -> bool {
552 *self == WUTIE::Enabled
553 }
554}
555pub type WUTIE_W<'a, REG> = crate::BitWriter<'a, REG, WUTIE>;
557impl<'a, REG> WUTIE_W<'a, REG>
558where
559 REG: crate::Writable + crate::RegisterSpec,
560{
561 #[inline(always)]
563 pub fn disabled(self) -> &'a mut crate::W<REG> {
564 self.variant(WUTIE::Disabled)
565 }
566 #[inline(always)]
568 pub fn enabled(self) -> &'a mut crate::W<REG> {
569 self.variant(WUTIE::Enabled)
570 }
571}
572#[cfg_attr(feature = "defmt", derive(defmt::Format))]
576#[derive(Clone, Copy, Debug, PartialEq, Eq)]
577pub enum TSIE {
578 Disabled = 0,
580 Enabled = 1,
582}
583impl From<TSIE> for bool {
584 #[inline(always)]
585 fn from(variant: TSIE) -> Self {
586 variant as u8 != 0
587 }
588}
589pub type TSIE_R = crate::BitReader<TSIE>;
591impl TSIE_R {
592 #[inline(always)]
594 pub const fn variant(&self) -> TSIE {
595 match self.bits {
596 false => TSIE::Disabled,
597 true => TSIE::Enabled,
598 }
599 }
600 #[inline(always)]
602 pub fn is_disabled(&self) -> bool {
603 *self == TSIE::Disabled
604 }
605 #[inline(always)]
607 pub fn is_enabled(&self) -> bool {
608 *self == TSIE::Enabled
609 }
610}
611pub type TSIE_W<'a, REG> = crate::BitWriter<'a, REG, TSIE>;
613impl<'a, REG> TSIE_W<'a, REG>
614where
615 REG: crate::Writable + crate::RegisterSpec,
616{
617 #[inline(always)]
619 pub fn disabled(self) -> &'a mut crate::W<REG> {
620 self.variant(TSIE::Disabled)
621 }
622 #[inline(always)]
624 pub fn enabled(self) -> &'a mut crate::W<REG> {
625 self.variant(TSIE::Enabled)
626 }
627}
628#[cfg_attr(feature = "defmt", derive(defmt::Format))]
632#[derive(Clone, Copy, Debug, PartialEq, Eq)]
633pub enum ADD1HW {
634 Add1 = 1,
636}
637impl From<ADD1HW> for bool {
638 #[inline(always)]
639 fn from(variant: ADD1HW) -> Self {
640 variant as u8 != 0
641 }
642}
643pub type ADD1H_R = crate::BitReader<ADD1HW>;
645impl ADD1H_R {
646 #[inline(always)]
648 pub const fn variant(&self) -> Option<ADD1HW> {
649 match self.bits {
650 true => Some(ADD1HW::Add1),
651 _ => None,
652 }
653 }
654 #[inline(always)]
656 pub fn is_add1(&self) -> bool {
657 *self == ADD1HW::Add1
658 }
659}
660pub type ADD1H_W<'a, REG> = crate::BitWriter<'a, REG, ADD1HW>;
662impl<'a, REG> ADD1H_W<'a, REG>
663where
664 REG: crate::Writable + crate::RegisterSpec,
665{
666 #[inline(always)]
668 pub fn add1(self) -> &'a mut crate::W<REG> {
669 self.variant(ADD1HW::Add1)
670 }
671}
672#[cfg_attr(feature = "defmt", derive(defmt::Format))]
676#[derive(Clone, Copy, Debug, PartialEq, Eq)]
677pub enum SUB1HW {
678 Sub1 = 1,
680}
681impl From<SUB1HW> for bool {
682 #[inline(always)]
683 fn from(variant: SUB1HW) -> Self {
684 variant as u8 != 0
685 }
686}
687pub type SUB1H_R = crate::BitReader<SUB1HW>;
689impl SUB1H_R {
690 #[inline(always)]
692 pub const fn variant(&self) -> Option<SUB1HW> {
693 match self.bits {
694 true => Some(SUB1HW::Sub1),
695 _ => None,
696 }
697 }
698 #[inline(always)]
700 pub fn is_sub1(&self) -> bool {
701 *self == SUB1HW::Sub1
702 }
703}
704pub type SUB1H_W<'a, REG> = crate::BitWriter<'a, REG, SUB1HW>;
706impl<'a, REG> SUB1H_W<'a, REG>
707where
708 REG: crate::Writable + crate::RegisterSpec,
709{
710 #[inline(always)]
712 pub fn sub1(self) -> &'a mut crate::W<REG> {
713 self.variant(SUB1HW::Sub1)
714 }
715}
716#[cfg_attr(feature = "defmt", derive(defmt::Format))]
720#[derive(Clone, Copy, Debug, PartialEq, Eq)]
721pub enum BKP {
722 DstNotChanged = 0,
724 DstChanged = 1,
726}
727impl From<BKP> for bool {
728 #[inline(always)]
729 fn from(variant: BKP) -> Self {
730 variant as u8 != 0
731 }
732}
733pub type BKP_R = crate::BitReader<BKP>;
735impl BKP_R {
736 #[inline(always)]
738 pub const fn variant(&self) -> BKP {
739 match self.bits {
740 false => BKP::DstNotChanged,
741 true => BKP::DstChanged,
742 }
743 }
744 #[inline(always)]
746 pub fn is_dst_not_changed(&self) -> bool {
747 *self == BKP::DstNotChanged
748 }
749 #[inline(always)]
751 pub fn is_dst_changed(&self) -> bool {
752 *self == BKP::DstChanged
753 }
754}
755pub type BKP_W<'a, REG> = crate::BitWriter<'a, REG, BKP>;
757impl<'a, REG> BKP_W<'a, REG>
758where
759 REG: crate::Writable + crate::RegisterSpec,
760{
761 #[inline(always)]
763 pub fn dst_not_changed(self) -> &'a mut crate::W<REG> {
764 self.variant(BKP::DstNotChanged)
765 }
766 #[inline(always)]
768 pub fn dst_changed(self) -> &'a mut crate::W<REG> {
769 self.variant(BKP::DstChanged)
770 }
771}
772#[cfg_attr(feature = "defmt", derive(defmt::Format))]
776#[derive(Clone, Copy, Debug, PartialEq, Eq)]
777pub enum POL {
778 High = 0,
780 Low = 1,
782}
783impl From<POL> for bool {
784 #[inline(always)]
785 fn from(variant: POL) -> Self {
786 variant as u8 != 0
787 }
788}
789pub type POL_R = crate::BitReader<POL>;
791impl POL_R {
792 #[inline(always)]
794 pub const fn variant(&self) -> POL {
795 match self.bits {
796 false => POL::High,
797 true => POL::Low,
798 }
799 }
800 #[inline(always)]
802 pub fn is_high(&self) -> bool {
803 *self == POL::High
804 }
805 #[inline(always)]
807 pub fn is_low(&self) -> bool {
808 *self == POL::Low
809 }
810}
811pub type POL_W<'a, REG> = crate::BitWriter<'a, REG, POL>;
813impl<'a, REG> POL_W<'a, REG>
814where
815 REG: crate::Writable + crate::RegisterSpec,
816{
817 #[inline(always)]
819 pub fn high(self) -> &'a mut crate::W<REG> {
820 self.variant(POL::High)
821 }
822 #[inline(always)]
824 pub fn low(self) -> &'a mut crate::W<REG> {
825 self.variant(POL::Low)
826 }
827}
828#[cfg_attr(feature = "defmt", derive(defmt::Format))]
832#[derive(Clone, Copy, Debug, PartialEq, Eq)]
833#[repr(u8)]
834pub enum OSEL {
835 Disabled = 0,
837 AlarmA = 1,
839 AlarmB = 2,
841 Wakeup = 3,
843}
844impl From<OSEL> for u8 {
845 #[inline(always)]
846 fn from(variant: OSEL) -> Self {
847 variant as _
848 }
849}
850impl crate::FieldSpec for OSEL {
851 type Ux = u8;
852}
853impl crate::IsEnum for OSEL {}
854pub type OSEL_R = crate::FieldReader<OSEL>;
856impl OSEL_R {
857 #[inline(always)]
859 pub const fn variant(&self) -> OSEL {
860 match self.bits {
861 0 => OSEL::Disabled,
862 1 => OSEL::AlarmA,
863 2 => OSEL::AlarmB,
864 3 => OSEL::Wakeup,
865 _ => unreachable!(),
866 }
867 }
868 #[inline(always)]
870 pub fn is_disabled(&self) -> bool {
871 *self == OSEL::Disabled
872 }
873 #[inline(always)]
875 pub fn is_alarm_a(&self) -> bool {
876 *self == OSEL::AlarmA
877 }
878 #[inline(always)]
880 pub fn is_alarm_b(&self) -> bool {
881 *self == OSEL::AlarmB
882 }
883 #[inline(always)]
885 pub fn is_wakeup(&self) -> bool {
886 *self == OSEL::Wakeup
887 }
888}
889pub type OSEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2, OSEL, crate::Safe>;
891impl<'a, REG> OSEL_W<'a, REG>
892where
893 REG: crate::Writable + crate::RegisterSpec,
894 REG::Ux: From<u8>,
895{
896 #[inline(always)]
898 pub fn disabled(self) -> &'a mut crate::W<REG> {
899 self.variant(OSEL::Disabled)
900 }
901 #[inline(always)]
903 pub fn alarm_a(self) -> &'a mut crate::W<REG> {
904 self.variant(OSEL::AlarmA)
905 }
906 #[inline(always)]
908 pub fn alarm_b(self) -> &'a mut crate::W<REG> {
909 self.variant(OSEL::AlarmB)
910 }
911 #[inline(always)]
913 pub fn wakeup(self) -> &'a mut crate::W<REG> {
914 self.variant(OSEL::Wakeup)
915 }
916}
917#[cfg_attr(feature = "defmt", derive(defmt::Format))]
921#[derive(Clone, Copy, Debug, PartialEq, Eq)]
922pub enum COE {
923 Disabled = 0,
925 Enabled = 1,
927}
928impl From<COE> for bool {
929 #[inline(always)]
930 fn from(variant: COE) -> Self {
931 variant as u8 != 0
932 }
933}
934pub type COE_R = crate::BitReader<COE>;
936impl COE_R {
937 #[inline(always)]
939 pub const fn variant(&self) -> COE {
940 match self.bits {
941 false => COE::Disabled,
942 true => COE::Enabled,
943 }
944 }
945 #[inline(always)]
947 pub fn is_disabled(&self) -> bool {
948 *self == COE::Disabled
949 }
950 #[inline(always)]
952 pub fn is_enabled(&self) -> bool {
953 *self == COE::Enabled
954 }
955}
956pub type COE_W<'a, REG> = crate::BitWriter<'a, REG, COE>;
958impl<'a, REG> COE_W<'a, REG>
959where
960 REG: crate::Writable + crate::RegisterSpec,
961{
962 #[inline(always)]
964 pub fn disabled(self) -> &'a mut crate::W<REG> {
965 self.variant(COE::Disabled)
966 }
967 #[inline(always)]
969 pub fn enabled(self) -> &'a mut crate::W<REG> {
970 self.variant(COE::Enabled)
971 }
972}
973impl R {
974 #[inline(always)]
976 pub fn wucksel(&self) -> WUCKSEL_R {
977 WUCKSEL_R::new((self.bits & 7) as u8)
978 }
979 #[inline(always)]
981 pub fn tsedge(&self) -> TSEDGE_R {
982 TSEDGE_R::new(((self.bits >> 3) & 1) != 0)
983 }
984 #[inline(always)]
986 pub fn refckon(&self) -> REFCKON_R {
987 REFCKON_R::new(((self.bits >> 4) & 1) != 0)
988 }
989 #[inline(always)]
991 pub fn fmt(&self) -> FMT_R {
992 FMT_R::new(((self.bits >> 6) & 1) != 0)
993 }
994 #[inline(always)]
996 pub fn dce(&self) -> DCE_R {
997 DCE_R::new(((self.bits >> 7) & 1) != 0)
998 }
999 #[inline(always)]
1003 pub fn alre(&self, n: u8) -> ALRE_R {
1004 #[allow(clippy::no_effect)]
1005 [(); 2][n as usize];
1006 ALRE_R::new(((self.bits >> (n + 8)) & 1) != 0)
1007 }
1008 #[inline(always)]
1011 pub fn alre_iter(&self) -> impl Iterator<Item = ALRE_R> + '_ {
1012 (0..2).map(move |n| ALRE_R::new(((self.bits >> (n + 8)) & 1) != 0))
1013 }
1014 #[inline(always)]
1016 pub fn alrae(&self) -> ALRE_R {
1017 ALRE_R::new(((self.bits >> 8) & 1) != 0)
1018 }
1019 #[inline(always)]
1021 pub fn alrbe(&self) -> ALRE_R {
1022 ALRE_R::new(((self.bits >> 9) & 1) != 0)
1023 }
1024 #[inline(always)]
1026 pub fn wute(&self) -> WUTE_R {
1027 WUTE_R::new(((self.bits >> 10) & 1) != 0)
1028 }
1029 #[inline(always)]
1031 pub fn tse(&self) -> TSE_R {
1032 TSE_R::new(((self.bits >> 11) & 1) != 0)
1033 }
1034 #[inline(always)]
1038 pub fn alrie(&self, n: u8) -> ALRIE_R {
1039 #[allow(clippy::no_effect)]
1040 [(); 2][n as usize];
1041 ALRIE_R::new(((self.bits >> (n + 12)) & 1) != 0)
1042 }
1043 #[inline(always)]
1046 pub fn alrie_iter(&self) -> impl Iterator<Item = ALRIE_R> + '_ {
1047 (0..2).map(move |n| ALRIE_R::new(((self.bits >> (n + 12)) & 1) != 0))
1048 }
1049 #[inline(always)]
1051 pub fn alraie(&self) -> ALRIE_R {
1052 ALRIE_R::new(((self.bits >> 12) & 1) != 0)
1053 }
1054 #[inline(always)]
1056 pub fn alrbie(&self) -> ALRIE_R {
1057 ALRIE_R::new(((self.bits >> 13) & 1) != 0)
1058 }
1059 #[inline(always)]
1061 pub fn wutie(&self) -> WUTIE_R {
1062 WUTIE_R::new(((self.bits >> 14) & 1) != 0)
1063 }
1064 #[inline(always)]
1066 pub fn tsie(&self) -> TSIE_R {
1067 TSIE_R::new(((self.bits >> 15) & 1) != 0)
1068 }
1069 #[inline(always)]
1071 pub fn add1h(&self) -> ADD1H_R {
1072 ADD1H_R::new(((self.bits >> 16) & 1) != 0)
1073 }
1074 #[inline(always)]
1076 pub fn sub1h(&self) -> SUB1H_R {
1077 SUB1H_R::new(((self.bits >> 17) & 1) != 0)
1078 }
1079 #[inline(always)]
1081 pub fn bkp(&self) -> BKP_R {
1082 BKP_R::new(((self.bits >> 18) & 1) != 0)
1083 }
1084 #[inline(always)]
1086 pub fn pol(&self) -> POL_R {
1087 POL_R::new(((self.bits >> 20) & 1) != 0)
1088 }
1089 #[inline(always)]
1091 pub fn osel(&self) -> OSEL_R {
1092 OSEL_R::new(((self.bits >> 21) & 3) as u8)
1093 }
1094 #[inline(always)]
1096 pub fn coe(&self) -> COE_R {
1097 COE_R::new(((self.bits >> 23) & 1) != 0)
1098 }
1099}
1100impl core::fmt::Debug for R {
1101 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1102 f.debug_struct("CR")
1103 .field("coe", &self.coe())
1104 .field("osel", &self.osel())
1105 .field("pol", &self.pol())
1106 .field("bkp", &self.bkp())
1107 .field("sub1h", &self.sub1h())
1108 .field("add1h", &self.add1h())
1109 .field("tsie", &self.tsie())
1110 .field("wutie", &self.wutie())
1111 .field("alraie", &self.alraie())
1112 .field("alrbie", &self.alrbie())
1113 .field("tse", &self.tse())
1114 .field("wute", &self.wute())
1115 .field("alrae", &self.alrae())
1116 .field("alrbe", &self.alrbe())
1117 .field("dce", &self.dce())
1118 .field("fmt", &self.fmt())
1119 .field("refckon", &self.refckon())
1120 .field("tsedge", &self.tsedge())
1121 .field("wucksel", &self.wucksel())
1122 .finish()
1123 }
1124}
1125impl W {
1126 #[inline(always)]
1128 pub fn wucksel(&mut self) -> WUCKSEL_W<CRrs> {
1129 WUCKSEL_W::new(self, 0)
1130 }
1131 #[inline(always)]
1133 pub fn tsedge(&mut self) -> TSEDGE_W<CRrs> {
1134 TSEDGE_W::new(self, 3)
1135 }
1136 #[inline(always)]
1138 pub fn refckon(&mut self) -> REFCKON_W<CRrs> {
1139 REFCKON_W::new(self, 4)
1140 }
1141 #[inline(always)]
1143 pub fn fmt(&mut self) -> FMT_W<CRrs> {
1144 FMT_W::new(self, 6)
1145 }
1146 #[inline(always)]
1148 pub fn dce(&mut self) -> DCE_W<CRrs> {
1149 DCE_W::new(self, 7)
1150 }
1151 #[inline(always)]
1155 pub fn alre(&mut self, n: u8) -> ALRE_W<CRrs> {
1156 #[allow(clippy::no_effect)]
1157 [(); 2][n as usize];
1158 ALRE_W::new(self, n + 8)
1159 }
1160 #[inline(always)]
1162 pub fn alrae(&mut self) -> ALRE_W<CRrs> {
1163 ALRE_W::new(self, 8)
1164 }
1165 #[inline(always)]
1167 pub fn alrbe(&mut self) -> ALRE_W<CRrs> {
1168 ALRE_W::new(self, 9)
1169 }
1170 #[inline(always)]
1172 pub fn wute(&mut self) -> WUTE_W<CRrs> {
1173 WUTE_W::new(self, 10)
1174 }
1175 #[inline(always)]
1177 pub fn tse(&mut self) -> TSE_W<CRrs> {
1178 TSE_W::new(self, 11)
1179 }
1180 #[inline(always)]
1184 pub fn alrie(&mut self, n: u8) -> ALRIE_W<CRrs> {
1185 #[allow(clippy::no_effect)]
1186 [(); 2][n as usize];
1187 ALRIE_W::new(self, n + 12)
1188 }
1189 #[inline(always)]
1191 pub fn alraie(&mut self) -> ALRIE_W<CRrs> {
1192 ALRIE_W::new(self, 12)
1193 }
1194 #[inline(always)]
1196 pub fn alrbie(&mut self) -> ALRIE_W<CRrs> {
1197 ALRIE_W::new(self, 13)
1198 }
1199 #[inline(always)]
1201 pub fn wutie(&mut self) -> WUTIE_W<CRrs> {
1202 WUTIE_W::new(self, 14)
1203 }
1204 #[inline(always)]
1206 pub fn tsie(&mut self) -> TSIE_W<CRrs> {
1207 TSIE_W::new(self, 15)
1208 }
1209 #[inline(always)]
1211 pub fn add1h(&mut self) -> ADD1H_W<CRrs> {
1212 ADD1H_W::new(self, 16)
1213 }
1214 #[inline(always)]
1216 pub fn sub1h(&mut self) -> SUB1H_W<CRrs> {
1217 SUB1H_W::new(self, 17)
1218 }
1219 #[inline(always)]
1221 pub fn bkp(&mut self) -> BKP_W<CRrs> {
1222 BKP_W::new(self, 18)
1223 }
1224 #[inline(always)]
1226 pub fn pol(&mut self) -> POL_W<CRrs> {
1227 POL_W::new(self, 20)
1228 }
1229 #[inline(always)]
1231 pub fn osel(&mut self) -> OSEL_W<CRrs> {
1232 OSEL_W::new(self, 21)
1233 }
1234 #[inline(always)]
1236 pub fn coe(&mut self) -> COE_W<CRrs> {
1237 COE_W::new(self, 23)
1238 }
1239}
1240pub struct CRrs;
1246impl crate::RegisterSpec for CRrs {
1247 type Ux = u32;
1248}
1249impl crate::Readable for CRrs {}
1251impl crate::Writable for CRrs {
1253 type Safety = crate::Unsafe;
1254}
1255impl crate::Resettable for CRrs {}