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 BYPSHAD {
238 ShadowReg = 0,
240 BypassShadowReg = 1,
242}
243impl From<BYPSHAD> for bool {
244 #[inline(always)]
245 fn from(variant: BYPSHAD) -> Self {
246 variant as u8 != 0
247 }
248}
249pub type BYPSHAD_R = crate::BitReader<BYPSHAD>;
251impl BYPSHAD_R {
252 #[inline(always)]
254 pub const fn variant(&self) -> BYPSHAD {
255 match self.bits {
256 false => BYPSHAD::ShadowReg,
257 true => BYPSHAD::BypassShadowReg,
258 }
259 }
260 #[inline(always)]
262 pub fn is_shadow_reg(&self) -> bool {
263 *self == BYPSHAD::ShadowReg
264 }
265 #[inline(always)]
267 pub fn is_bypass_shadow_reg(&self) -> bool {
268 *self == BYPSHAD::BypassShadowReg
269 }
270}
271pub type BYPSHAD_W<'a, REG> = crate::BitWriter<'a, REG, BYPSHAD>;
273impl<'a, REG> BYPSHAD_W<'a, REG>
274where
275 REG: crate::Writable + crate::RegisterSpec,
276{
277 #[inline(always)]
279 pub fn shadow_reg(self) -> &'a mut crate::W<REG> {
280 self.variant(BYPSHAD::ShadowReg)
281 }
282 #[inline(always)]
284 pub fn bypass_shadow_reg(self) -> &'a mut crate::W<REG> {
285 self.variant(BYPSHAD::BypassShadowReg)
286 }
287}
288#[cfg_attr(feature = "defmt", derive(defmt::Format))]
292#[derive(Clone, Copy, Debug, PartialEq, Eq)]
293pub enum FMT {
294 TwentyFourHour = 0,
296 AmPm = 1,
298}
299impl From<FMT> for bool {
300 #[inline(always)]
301 fn from(variant: FMT) -> Self {
302 variant as u8 != 0
303 }
304}
305pub type FMT_R = crate::BitReader<FMT>;
307impl FMT_R {
308 #[inline(always)]
310 pub const fn variant(&self) -> FMT {
311 match self.bits {
312 false => FMT::TwentyFourHour,
313 true => FMT::AmPm,
314 }
315 }
316 #[inline(always)]
318 pub fn is_twenty_four_hour(&self) -> bool {
319 *self == FMT::TwentyFourHour
320 }
321 #[inline(always)]
323 pub fn is_am_pm(&self) -> bool {
324 *self == FMT::AmPm
325 }
326}
327pub type FMT_W<'a, REG> = crate::BitWriter<'a, REG, FMT>;
329impl<'a, REG> FMT_W<'a, REG>
330where
331 REG: crate::Writable + crate::RegisterSpec,
332{
333 #[inline(always)]
335 pub fn twenty_four_hour(self) -> &'a mut crate::W<REG> {
336 self.variant(FMT::TwentyFourHour)
337 }
338 #[inline(always)]
340 pub fn am_pm(self) -> &'a mut crate::W<REG> {
341 self.variant(FMT::AmPm)
342 }
343}
344pub type DCE_R = crate::BitReader;
346pub type DCE_W<'a, REG> = crate::BitWriter<'a, REG>;
348#[cfg_attr(feature = "defmt", derive(defmt::Format))]
352#[derive(Clone, Copy, Debug, PartialEq, Eq)]
353pub enum ALRAE {
354 Disabled = 0,
356 Enabled = 1,
358}
359impl From<ALRAE> for bool {
360 #[inline(always)]
361 fn from(variant: ALRAE) -> Self {
362 variant as u8 != 0
363 }
364}
365pub type ALRE_R = crate::BitReader<ALRAE>;
367impl ALRE_R {
368 #[inline(always)]
370 pub const fn variant(&self) -> ALRAE {
371 match self.bits {
372 false => ALRAE::Disabled,
373 true => ALRAE::Enabled,
374 }
375 }
376 #[inline(always)]
378 pub fn is_disabled(&self) -> bool {
379 *self == ALRAE::Disabled
380 }
381 #[inline(always)]
383 pub fn is_enabled(&self) -> bool {
384 *self == ALRAE::Enabled
385 }
386}
387pub type ALRE_W<'a, REG> = crate::BitWriter<'a, REG, ALRAE>;
389impl<'a, REG> ALRE_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(ALRAE::Disabled)
397 }
398 #[inline(always)]
400 pub fn enabled(self) -> &'a mut crate::W<REG> {
401 self.variant(ALRAE::Enabled)
402 }
403}
404#[cfg_attr(feature = "defmt", derive(defmt::Format))]
408#[derive(Clone, Copy, Debug, PartialEq, Eq)]
409pub enum WUTE {
410 Disabled = 0,
412 Enabled = 1,
414}
415impl From<WUTE> for bool {
416 #[inline(always)]
417 fn from(variant: WUTE) -> Self {
418 variant as u8 != 0
419 }
420}
421pub type WUTE_R = crate::BitReader<WUTE>;
423impl WUTE_R {
424 #[inline(always)]
426 pub const fn variant(&self) -> WUTE {
427 match self.bits {
428 false => WUTE::Disabled,
429 true => WUTE::Enabled,
430 }
431 }
432 #[inline(always)]
434 pub fn is_disabled(&self) -> bool {
435 *self == WUTE::Disabled
436 }
437 #[inline(always)]
439 pub fn is_enabled(&self) -> bool {
440 *self == WUTE::Enabled
441 }
442}
443pub type WUTE_W<'a, REG> = crate::BitWriter<'a, REG, WUTE>;
445impl<'a, REG> WUTE_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(WUTE::Disabled)
453 }
454 #[inline(always)]
456 pub fn enabled(self) -> &'a mut crate::W<REG> {
457 self.variant(WUTE::Enabled)
458 }
459}
460#[cfg_attr(feature = "defmt", derive(defmt::Format))]
464#[derive(Clone, Copy, Debug, PartialEq, Eq)]
465pub enum TSE {
466 Disabled = 0,
468 Enabled = 1,
470}
471impl From<TSE> for bool {
472 #[inline(always)]
473 fn from(variant: TSE) -> Self {
474 variant as u8 != 0
475 }
476}
477pub type TSE_R = crate::BitReader<TSE>;
479impl TSE_R {
480 #[inline(always)]
482 pub const fn variant(&self) -> TSE {
483 match self.bits {
484 false => TSE::Disabled,
485 true => TSE::Enabled,
486 }
487 }
488 #[inline(always)]
490 pub fn is_disabled(&self) -> bool {
491 *self == TSE::Disabled
492 }
493 #[inline(always)]
495 pub fn is_enabled(&self) -> bool {
496 *self == TSE::Enabled
497 }
498}
499pub type TSE_W<'a, REG> = crate::BitWriter<'a, REG, TSE>;
501impl<'a, REG> TSE_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(TSE::Disabled)
509 }
510 #[inline(always)]
512 pub fn enabled(self) -> &'a mut crate::W<REG> {
513 self.variant(TSE::Enabled)
514 }
515}
516#[cfg_attr(feature = "defmt", derive(defmt::Format))]
520#[derive(Clone, Copy, Debug, PartialEq, Eq)]
521pub enum ALRAIE {
522 Disabled = 0,
524 Enabled = 1,
526}
527impl From<ALRAIE> for bool {
528 #[inline(always)]
529 fn from(variant: ALRAIE) -> Self {
530 variant as u8 != 0
531 }
532}
533pub type ALRIE_R = crate::BitReader<ALRAIE>;
535impl ALRIE_R {
536 #[inline(always)]
538 pub const fn variant(&self) -> ALRAIE {
539 match self.bits {
540 false => ALRAIE::Disabled,
541 true => ALRAIE::Enabled,
542 }
543 }
544 #[inline(always)]
546 pub fn is_disabled(&self) -> bool {
547 *self == ALRAIE::Disabled
548 }
549 #[inline(always)]
551 pub fn is_enabled(&self) -> bool {
552 *self == ALRAIE::Enabled
553 }
554}
555pub type ALRIE_W<'a, REG> = crate::BitWriter<'a, REG, ALRAIE>;
557impl<'a, REG> ALRIE_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(ALRAIE::Disabled)
565 }
566 #[inline(always)]
568 pub fn enabled(self) -> &'a mut crate::W<REG> {
569 self.variant(ALRAIE::Enabled)
570 }
571}
572#[cfg_attr(feature = "defmt", derive(defmt::Format))]
576#[derive(Clone, Copy, Debug, PartialEq, Eq)]
577pub enum WUTIE {
578 Disabled = 0,
580 Enabled = 1,
582}
583impl From<WUTIE> for bool {
584 #[inline(always)]
585 fn from(variant: WUTIE) -> Self {
586 variant as u8 != 0
587 }
588}
589pub type WUTIE_R = crate::BitReader<WUTIE>;
591impl WUTIE_R {
592 #[inline(always)]
594 pub const fn variant(&self) -> WUTIE {
595 match self.bits {
596 false => WUTIE::Disabled,
597 true => WUTIE::Enabled,
598 }
599 }
600 #[inline(always)]
602 pub fn is_disabled(&self) -> bool {
603 *self == WUTIE::Disabled
604 }
605 #[inline(always)]
607 pub fn is_enabled(&self) -> bool {
608 *self == WUTIE::Enabled
609 }
610}
611pub type WUTIE_W<'a, REG> = crate::BitWriter<'a, REG, WUTIE>;
613impl<'a, REG> WUTIE_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(WUTIE::Disabled)
621 }
622 #[inline(always)]
624 pub fn enabled(self) -> &'a mut crate::W<REG> {
625 self.variant(WUTIE::Enabled)
626 }
627}
628#[cfg_attr(feature = "defmt", derive(defmt::Format))]
632#[derive(Clone, Copy, Debug, PartialEq, Eq)]
633pub enum TSIE {
634 Disabled = 0,
636 Enabled = 1,
638}
639impl From<TSIE> for bool {
640 #[inline(always)]
641 fn from(variant: TSIE) -> Self {
642 variant as u8 != 0
643 }
644}
645pub type TSIE_R = crate::BitReader<TSIE>;
647impl TSIE_R {
648 #[inline(always)]
650 pub const fn variant(&self) -> TSIE {
651 match self.bits {
652 false => TSIE::Disabled,
653 true => TSIE::Enabled,
654 }
655 }
656 #[inline(always)]
658 pub fn is_disabled(&self) -> bool {
659 *self == TSIE::Disabled
660 }
661 #[inline(always)]
663 pub fn is_enabled(&self) -> bool {
664 *self == TSIE::Enabled
665 }
666}
667pub type TSIE_W<'a, REG> = crate::BitWriter<'a, REG, TSIE>;
669impl<'a, REG> TSIE_W<'a, REG>
670where
671 REG: crate::Writable + crate::RegisterSpec,
672{
673 #[inline(always)]
675 pub fn disabled(self) -> &'a mut crate::W<REG> {
676 self.variant(TSIE::Disabled)
677 }
678 #[inline(always)]
680 pub fn enabled(self) -> &'a mut crate::W<REG> {
681 self.variant(TSIE::Enabled)
682 }
683}
684#[cfg_attr(feature = "defmt", derive(defmt::Format))]
688#[derive(Clone, Copy, Debug, PartialEq, Eq)]
689pub enum ADD1HW {
690 Add1 = 1,
692}
693impl From<ADD1HW> for bool {
694 #[inline(always)]
695 fn from(variant: ADD1HW) -> Self {
696 variant as u8 != 0
697 }
698}
699pub type ADD1H_R = crate::BitReader<ADD1HW>;
701impl ADD1H_R {
702 #[inline(always)]
704 pub const fn variant(&self) -> Option<ADD1HW> {
705 match self.bits {
706 true => Some(ADD1HW::Add1),
707 _ => None,
708 }
709 }
710 #[inline(always)]
712 pub fn is_add1(&self) -> bool {
713 *self == ADD1HW::Add1
714 }
715}
716pub type ADD1H_W<'a, REG> = crate::BitWriter<'a, REG, ADD1HW>;
718impl<'a, REG> ADD1H_W<'a, REG>
719where
720 REG: crate::Writable + crate::RegisterSpec,
721{
722 #[inline(always)]
724 pub fn add1(self) -> &'a mut crate::W<REG> {
725 self.variant(ADD1HW::Add1)
726 }
727}
728#[cfg_attr(feature = "defmt", derive(defmt::Format))]
732#[derive(Clone, Copy, Debug, PartialEq, Eq)]
733pub enum SUB1HW {
734 Sub1 = 1,
736}
737impl From<SUB1HW> for bool {
738 #[inline(always)]
739 fn from(variant: SUB1HW) -> Self {
740 variant as u8 != 0
741 }
742}
743pub type SUB1H_R = crate::BitReader<SUB1HW>;
745impl SUB1H_R {
746 #[inline(always)]
748 pub const fn variant(&self) -> Option<SUB1HW> {
749 match self.bits {
750 true => Some(SUB1HW::Sub1),
751 _ => None,
752 }
753 }
754 #[inline(always)]
756 pub fn is_sub1(&self) -> bool {
757 *self == SUB1HW::Sub1
758 }
759}
760pub type SUB1H_W<'a, REG> = crate::BitWriter<'a, REG, SUB1HW>;
762impl<'a, REG> SUB1H_W<'a, REG>
763where
764 REG: crate::Writable + crate::RegisterSpec,
765{
766 #[inline(always)]
768 pub fn sub1(self) -> &'a mut crate::W<REG> {
769 self.variant(SUB1HW::Sub1)
770 }
771}
772#[cfg_attr(feature = "defmt", derive(defmt::Format))]
776#[derive(Clone, Copy, Debug, PartialEq, Eq)]
777pub enum BKP {
778 DstNotChanged = 0,
780 DstChanged = 1,
782}
783impl From<BKP> for bool {
784 #[inline(always)]
785 fn from(variant: BKP) -> Self {
786 variant as u8 != 0
787 }
788}
789pub type BKP_R = crate::BitReader<BKP>;
791impl BKP_R {
792 #[inline(always)]
794 pub const fn variant(&self) -> BKP {
795 match self.bits {
796 false => BKP::DstNotChanged,
797 true => BKP::DstChanged,
798 }
799 }
800 #[inline(always)]
802 pub fn is_dst_not_changed(&self) -> bool {
803 *self == BKP::DstNotChanged
804 }
805 #[inline(always)]
807 pub fn is_dst_changed(&self) -> bool {
808 *self == BKP::DstChanged
809 }
810}
811pub type BKP_W<'a, REG> = crate::BitWriter<'a, REG, BKP>;
813impl<'a, REG> BKP_W<'a, REG>
814where
815 REG: crate::Writable + crate::RegisterSpec,
816{
817 #[inline(always)]
819 pub fn dst_not_changed(self) -> &'a mut crate::W<REG> {
820 self.variant(BKP::DstNotChanged)
821 }
822 #[inline(always)]
824 pub fn dst_changed(self) -> &'a mut crate::W<REG> {
825 self.variant(BKP::DstChanged)
826 }
827}
828#[cfg_attr(feature = "defmt", derive(defmt::Format))]
832#[derive(Clone, Copy, Debug, PartialEq, Eq)]
833pub enum COSEL {
834 CalFreq512hz = 0,
836 CalFreq1hz = 1,
838}
839impl From<COSEL> for bool {
840 #[inline(always)]
841 fn from(variant: COSEL) -> Self {
842 variant as u8 != 0
843 }
844}
845pub type COSEL_R = crate::BitReader<COSEL>;
847impl COSEL_R {
848 #[inline(always)]
850 pub const fn variant(&self) -> COSEL {
851 match self.bits {
852 false => COSEL::CalFreq512hz,
853 true => COSEL::CalFreq1hz,
854 }
855 }
856 #[inline(always)]
858 pub fn is_cal_freq_512hz(&self) -> bool {
859 *self == COSEL::CalFreq512hz
860 }
861 #[inline(always)]
863 pub fn is_cal_freq_1hz(&self) -> bool {
864 *self == COSEL::CalFreq1hz
865 }
866}
867pub type COSEL_W<'a, REG> = crate::BitWriter<'a, REG, COSEL>;
869impl<'a, REG> COSEL_W<'a, REG>
870where
871 REG: crate::Writable + crate::RegisterSpec,
872{
873 #[inline(always)]
875 pub fn cal_freq_512hz(self) -> &'a mut crate::W<REG> {
876 self.variant(COSEL::CalFreq512hz)
877 }
878 #[inline(always)]
880 pub fn cal_freq_1hz(self) -> &'a mut crate::W<REG> {
881 self.variant(COSEL::CalFreq1hz)
882 }
883}
884#[cfg_attr(feature = "defmt", derive(defmt::Format))]
888#[derive(Clone, Copy, Debug, PartialEq, Eq)]
889pub enum POL {
890 High = 0,
892 Low = 1,
894}
895impl From<POL> for bool {
896 #[inline(always)]
897 fn from(variant: POL) -> Self {
898 variant as u8 != 0
899 }
900}
901pub type POL_R = crate::BitReader<POL>;
903impl POL_R {
904 #[inline(always)]
906 pub const fn variant(&self) -> POL {
907 match self.bits {
908 false => POL::High,
909 true => POL::Low,
910 }
911 }
912 #[inline(always)]
914 pub fn is_high(&self) -> bool {
915 *self == POL::High
916 }
917 #[inline(always)]
919 pub fn is_low(&self) -> bool {
920 *self == POL::Low
921 }
922}
923pub type POL_W<'a, REG> = crate::BitWriter<'a, REG, POL>;
925impl<'a, REG> POL_W<'a, REG>
926where
927 REG: crate::Writable + crate::RegisterSpec,
928{
929 #[inline(always)]
931 pub fn high(self) -> &'a mut crate::W<REG> {
932 self.variant(POL::High)
933 }
934 #[inline(always)]
936 pub fn low(self) -> &'a mut crate::W<REG> {
937 self.variant(POL::Low)
938 }
939}
940#[cfg_attr(feature = "defmt", derive(defmt::Format))]
944#[derive(Clone, Copy, Debug, PartialEq, Eq)]
945#[repr(u8)]
946pub enum OSEL {
947 Disabled = 0,
949 AlarmA = 1,
951 AlarmB = 2,
953 Wakeup = 3,
955}
956impl From<OSEL> for u8 {
957 #[inline(always)]
958 fn from(variant: OSEL) -> Self {
959 variant as _
960 }
961}
962impl crate::FieldSpec for OSEL {
963 type Ux = u8;
964}
965impl crate::IsEnum for OSEL {}
966pub type OSEL_R = crate::FieldReader<OSEL>;
968impl OSEL_R {
969 #[inline(always)]
971 pub const fn variant(&self) -> OSEL {
972 match self.bits {
973 0 => OSEL::Disabled,
974 1 => OSEL::AlarmA,
975 2 => OSEL::AlarmB,
976 3 => OSEL::Wakeup,
977 _ => unreachable!(),
978 }
979 }
980 #[inline(always)]
982 pub fn is_disabled(&self) -> bool {
983 *self == OSEL::Disabled
984 }
985 #[inline(always)]
987 pub fn is_alarm_a(&self) -> bool {
988 *self == OSEL::AlarmA
989 }
990 #[inline(always)]
992 pub fn is_alarm_b(&self) -> bool {
993 *self == OSEL::AlarmB
994 }
995 #[inline(always)]
997 pub fn is_wakeup(&self) -> bool {
998 *self == OSEL::Wakeup
999 }
1000}
1001pub type OSEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2, OSEL, crate::Safe>;
1003impl<'a, REG> OSEL_W<'a, REG>
1004where
1005 REG: crate::Writable + crate::RegisterSpec,
1006 REG::Ux: From<u8>,
1007{
1008 #[inline(always)]
1010 pub fn disabled(self) -> &'a mut crate::W<REG> {
1011 self.variant(OSEL::Disabled)
1012 }
1013 #[inline(always)]
1015 pub fn alarm_a(self) -> &'a mut crate::W<REG> {
1016 self.variant(OSEL::AlarmA)
1017 }
1018 #[inline(always)]
1020 pub fn alarm_b(self) -> &'a mut crate::W<REG> {
1021 self.variant(OSEL::AlarmB)
1022 }
1023 #[inline(always)]
1025 pub fn wakeup(self) -> &'a mut crate::W<REG> {
1026 self.variant(OSEL::Wakeup)
1027 }
1028}
1029#[cfg_attr(feature = "defmt", derive(defmt::Format))]
1033#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1034pub enum COE {
1035 Disabled = 0,
1037 Enabled = 1,
1039}
1040impl From<COE> for bool {
1041 #[inline(always)]
1042 fn from(variant: COE) -> Self {
1043 variant as u8 != 0
1044 }
1045}
1046pub type COE_R = crate::BitReader<COE>;
1048impl COE_R {
1049 #[inline(always)]
1051 pub const fn variant(&self) -> COE {
1052 match self.bits {
1053 false => COE::Disabled,
1054 true => COE::Enabled,
1055 }
1056 }
1057 #[inline(always)]
1059 pub fn is_disabled(&self) -> bool {
1060 *self == COE::Disabled
1061 }
1062 #[inline(always)]
1064 pub fn is_enabled(&self) -> bool {
1065 *self == COE::Enabled
1066 }
1067}
1068pub type COE_W<'a, REG> = crate::BitWriter<'a, REG, COE>;
1070impl<'a, REG> COE_W<'a, REG>
1071where
1072 REG: crate::Writable + crate::RegisterSpec,
1073{
1074 #[inline(always)]
1076 pub fn disabled(self) -> &'a mut crate::W<REG> {
1077 self.variant(COE::Disabled)
1078 }
1079 #[inline(always)]
1081 pub fn enabled(self) -> &'a mut crate::W<REG> {
1082 self.variant(COE::Enabled)
1083 }
1084}
1085impl R {
1086 #[inline(always)]
1088 pub fn wucksel(&self) -> WUCKSEL_R {
1089 WUCKSEL_R::new((self.bits & 7) as u8)
1090 }
1091 #[inline(always)]
1093 pub fn tsedge(&self) -> TSEDGE_R {
1094 TSEDGE_R::new(((self.bits >> 3) & 1) != 0)
1095 }
1096 #[inline(always)]
1098 pub fn refckon(&self) -> REFCKON_R {
1099 REFCKON_R::new(((self.bits >> 4) & 1) != 0)
1100 }
1101 #[inline(always)]
1103 pub fn bypshad(&self) -> BYPSHAD_R {
1104 BYPSHAD_R::new(((self.bits >> 5) & 1) != 0)
1105 }
1106 #[inline(always)]
1108 pub fn fmt(&self) -> FMT_R {
1109 FMT_R::new(((self.bits >> 6) & 1) != 0)
1110 }
1111 #[inline(always)]
1113 pub fn dce(&self) -> DCE_R {
1114 DCE_R::new(((self.bits >> 7) & 1) != 0)
1115 }
1116 #[inline(always)]
1120 pub fn alre(&self, n: u8) -> ALRE_R {
1121 #[allow(clippy::no_effect)]
1122 [(); 2][n as usize];
1123 ALRE_R::new(((self.bits >> (n + 8)) & 1) != 0)
1124 }
1125 #[inline(always)]
1128 pub fn alre_iter(&self) -> impl Iterator<Item = ALRE_R> + '_ {
1129 (0..2).map(move |n| ALRE_R::new(((self.bits >> (n + 8)) & 1) != 0))
1130 }
1131 #[inline(always)]
1133 pub fn alrae(&self) -> ALRE_R {
1134 ALRE_R::new(((self.bits >> 8) & 1) != 0)
1135 }
1136 #[inline(always)]
1138 pub fn alrbe(&self) -> ALRE_R {
1139 ALRE_R::new(((self.bits >> 9) & 1) != 0)
1140 }
1141 #[inline(always)]
1143 pub fn wute(&self) -> WUTE_R {
1144 WUTE_R::new(((self.bits >> 10) & 1) != 0)
1145 }
1146 #[inline(always)]
1148 pub fn tse(&self) -> TSE_R {
1149 TSE_R::new(((self.bits >> 11) & 1) != 0)
1150 }
1151 #[inline(always)]
1155 pub fn alrie(&self, n: u8) -> ALRIE_R {
1156 #[allow(clippy::no_effect)]
1157 [(); 2][n as usize];
1158 ALRIE_R::new(((self.bits >> (n + 12)) & 1) != 0)
1159 }
1160 #[inline(always)]
1163 pub fn alrie_iter(&self) -> impl Iterator<Item = ALRIE_R> + '_ {
1164 (0..2).map(move |n| ALRIE_R::new(((self.bits >> (n + 12)) & 1) != 0))
1165 }
1166 #[inline(always)]
1168 pub fn alraie(&self) -> ALRIE_R {
1169 ALRIE_R::new(((self.bits >> 12) & 1) != 0)
1170 }
1171 #[inline(always)]
1173 pub fn alrbie(&self) -> ALRIE_R {
1174 ALRIE_R::new(((self.bits >> 13) & 1) != 0)
1175 }
1176 #[inline(always)]
1178 pub fn wutie(&self) -> WUTIE_R {
1179 WUTIE_R::new(((self.bits >> 14) & 1) != 0)
1180 }
1181 #[inline(always)]
1183 pub fn tsie(&self) -> TSIE_R {
1184 TSIE_R::new(((self.bits >> 15) & 1) != 0)
1185 }
1186 #[inline(always)]
1188 pub fn add1h(&self) -> ADD1H_R {
1189 ADD1H_R::new(((self.bits >> 16) & 1) != 0)
1190 }
1191 #[inline(always)]
1193 pub fn sub1h(&self) -> SUB1H_R {
1194 SUB1H_R::new(((self.bits >> 17) & 1) != 0)
1195 }
1196 #[inline(always)]
1198 pub fn bkp(&self) -> BKP_R {
1199 BKP_R::new(((self.bits >> 18) & 1) != 0)
1200 }
1201 #[inline(always)]
1203 pub fn cosel(&self) -> COSEL_R {
1204 COSEL_R::new(((self.bits >> 19) & 1) != 0)
1205 }
1206 #[inline(always)]
1208 pub fn pol(&self) -> POL_R {
1209 POL_R::new(((self.bits >> 20) & 1) != 0)
1210 }
1211 #[inline(always)]
1213 pub fn osel(&self) -> OSEL_R {
1214 OSEL_R::new(((self.bits >> 21) & 3) as u8)
1215 }
1216 #[inline(always)]
1218 pub fn coe(&self) -> COE_R {
1219 COE_R::new(((self.bits >> 23) & 1) != 0)
1220 }
1221}
1222impl core::fmt::Debug for R {
1223 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1224 f.debug_struct("CR")
1225 .field("coe", &self.coe())
1226 .field("osel", &self.osel())
1227 .field("pol", &self.pol())
1228 .field("cosel", &self.cosel())
1229 .field("bkp", &self.bkp())
1230 .field("sub1h", &self.sub1h())
1231 .field("add1h", &self.add1h())
1232 .field("tsie", &self.tsie())
1233 .field("wutie", &self.wutie())
1234 .field("alraie", &self.alraie())
1235 .field("alrbie", &self.alrbie())
1236 .field("tse", &self.tse())
1237 .field("wute", &self.wute())
1238 .field("alrae", &self.alrae())
1239 .field("alrbe", &self.alrbe())
1240 .field("dce", &self.dce())
1241 .field("fmt", &self.fmt())
1242 .field("bypshad", &self.bypshad())
1243 .field("refckon", &self.refckon())
1244 .field("tsedge", &self.tsedge())
1245 .field("wucksel", &self.wucksel())
1246 .finish()
1247 }
1248}
1249impl W {
1250 #[inline(always)]
1252 pub fn wucksel(&mut self) -> WUCKSEL_W<CRrs> {
1253 WUCKSEL_W::new(self, 0)
1254 }
1255 #[inline(always)]
1257 pub fn tsedge(&mut self) -> TSEDGE_W<CRrs> {
1258 TSEDGE_W::new(self, 3)
1259 }
1260 #[inline(always)]
1262 pub fn refckon(&mut self) -> REFCKON_W<CRrs> {
1263 REFCKON_W::new(self, 4)
1264 }
1265 #[inline(always)]
1267 pub fn bypshad(&mut self) -> BYPSHAD_W<CRrs> {
1268 BYPSHAD_W::new(self, 5)
1269 }
1270 #[inline(always)]
1272 pub fn fmt(&mut self) -> FMT_W<CRrs> {
1273 FMT_W::new(self, 6)
1274 }
1275 #[inline(always)]
1277 pub fn dce(&mut self) -> DCE_W<CRrs> {
1278 DCE_W::new(self, 7)
1279 }
1280 #[inline(always)]
1284 pub fn alre(&mut self, n: u8) -> ALRE_W<CRrs> {
1285 #[allow(clippy::no_effect)]
1286 [(); 2][n as usize];
1287 ALRE_W::new(self, n + 8)
1288 }
1289 #[inline(always)]
1291 pub fn alrae(&mut self) -> ALRE_W<CRrs> {
1292 ALRE_W::new(self, 8)
1293 }
1294 #[inline(always)]
1296 pub fn alrbe(&mut self) -> ALRE_W<CRrs> {
1297 ALRE_W::new(self, 9)
1298 }
1299 #[inline(always)]
1301 pub fn wute(&mut self) -> WUTE_W<CRrs> {
1302 WUTE_W::new(self, 10)
1303 }
1304 #[inline(always)]
1306 pub fn tse(&mut self) -> TSE_W<CRrs> {
1307 TSE_W::new(self, 11)
1308 }
1309 #[inline(always)]
1313 pub fn alrie(&mut self, n: u8) -> ALRIE_W<CRrs> {
1314 #[allow(clippy::no_effect)]
1315 [(); 2][n as usize];
1316 ALRIE_W::new(self, n + 12)
1317 }
1318 #[inline(always)]
1320 pub fn alraie(&mut self) -> ALRIE_W<CRrs> {
1321 ALRIE_W::new(self, 12)
1322 }
1323 #[inline(always)]
1325 pub fn alrbie(&mut self) -> ALRIE_W<CRrs> {
1326 ALRIE_W::new(self, 13)
1327 }
1328 #[inline(always)]
1330 pub fn wutie(&mut self) -> WUTIE_W<CRrs> {
1331 WUTIE_W::new(self, 14)
1332 }
1333 #[inline(always)]
1335 pub fn tsie(&mut self) -> TSIE_W<CRrs> {
1336 TSIE_W::new(self, 15)
1337 }
1338 #[inline(always)]
1340 pub fn add1h(&mut self) -> ADD1H_W<CRrs> {
1341 ADD1H_W::new(self, 16)
1342 }
1343 #[inline(always)]
1345 pub fn sub1h(&mut self) -> SUB1H_W<CRrs> {
1346 SUB1H_W::new(self, 17)
1347 }
1348 #[inline(always)]
1350 pub fn bkp(&mut self) -> BKP_W<CRrs> {
1351 BKP_W::new(self, 18)
1352 }
1353 #[inline(always)]
1355 pub fn cosel(&mut self) -> COSEL_W<CRrs> {
1356 COSEL_W::new(self, 19)
1357 }
1358 #[inline(always)]
1360 pub fn pol(&mut self) -> POL_W<CRrs> {
1361 POL_W::new(self, 20)
1362 }
1363 #[inline(always)]
1365 pub fn osel(&mut self) -> OSEL_W<CRrs> {
1366 OSEL_W::new(self, 21)
1367 }
1368 #[inline(always)]
1370 pub fn coe(&mut self) -> COE_W<CRrs> {
1371 COE_W::new(self, 23)
1372 }
1373}
1374pub struct CRrs;
1380impl crate::RegisterSpec for CRrs {
1381 type Ux = u32;
1382}
1383impl crate::Readable for CRrs {}
1385impl crate::Writable for CRrs {
1387 type Safety = crate::Unsafe;
1388}
1389impl crate::Resettable for CRrs {}