1pub type R = crate::R<ISRrs>;
3pub type W = crate::W<ISRrs>;
5#[cfg_attr(feature = "defmt", derive(defmt::Format))]
9#[derive(Clone, Copy, Debug, PartialEq, Eq)]
10pub enum ALRAWFR {
11 UpdateNotAllowed = 0,
13 UpdateAllowed = 1,
15}
16impl From<ALRAWFR> for bool {
17 #[inline(always)]
18 fn from(variant: ALRAWFR) -> Self {
19 variant as u8 != 0
20 }
21}
22pub type ALRWF_R = crate::BitReader<ALRAWFR>;
24impl ALRWF_R {
25 #[inline(always)]
27 pub const fn variant(&self) -> ALRAWFR {
28 match self.bits {
29 false => ALRAWFR::UpdateNotAllowed,
30 true => ALRAWFR::UpdateAllowed,
31 }
32 }
33 #[inline(always)]
35 pub fn is_update_not_allowed(&self) -> bool {
36 *self == ALRAWFR::UpdateNotAllowed
37 }
38 #[inline(always)]
40 pub fn is_update_allowed(&self) -> bool {
41 *self == ALRAWFR::UpdateAllowed
42 }
43}
44#[cfg_attr(feature = "defmt", derive(defmt::Format))]
48#[derive(Clone, Copy, Debug, PartialEq, Eq)]
49pub enum WUTWFR {
50 UpdateNotAllowed = 0,
52 UpdateAllowed = 1,
54}
55impl From<WUTWFR> for bool {
56 #[inline(always)]
57 fn from(variant: WUTWFR) -> Self {
58 variant as u8 != 0
59 }
60}
61pub type WUTWF_R = crate::BitReader<WUTWFR>;
63impl WUTWF_R {
64 #[inline(always)]
66 pub const fn variant(&self) -> WUTWFR {
67 match self.bits {
68 false => WUTWFR::UpdateNotAllowed,
69 true => WUTWFR::UpdateAllowed,
70 }
71 }
72 #[inline(always)]
74 pub fn is_update_not_allowed(&self) -> bool {
75 *self == WUTWFR::UpdateNotAllowed
76 }
77 #[inline(always)]
79 pub fn is_update_allowed(&self) -> bool {
80 *self == WUTWFR::UpdateAllowed
81 }
82}
83#[cfg_attr(feature = "defmt", derive(defmt::Format))]
87#[derive(Clone, Copy, Debug, PartialEq, Eq)]
88pub enum SHPFR {
89 NoShiftPending = 0,
91 ShiftPending = 1,
93}
94impl From<SHPFR> for bool {
95 #[inline(always)]
96 fn from(variant: SHPFR) -> Self {
97 variant as u8 != 0
98 }
99}
100pub type SHPF_R = crate::BitReader<SHPFR>;
102impl SHPF_R {
103 #[inline(always)]
105 pub const fn variant(&self) -> SHPFR {
106 match self.bits {
107 false => SHPFR::NoShiftPending,
108 true => SHPFR::ShiftPending,
109 }
110 }
111 #[inline(always)]
113 pub fn is_no_shift_pending(&self) -> bool {
114 *self == SHPFR::NoShiftPending
115 }
116 #[inline(always)]
118 pub fn is_shift_pending(&self) -> bool {
119 *self == SHPFR::ShiftPending
120 }
121}
122pub type SHPF_W<'a, REG> = crate::BitWriter<'a, REG, SHPFR>;
124impl<'a, REG> SHPF_W<'a, REG>
125where
126 REG: crate::Writable + crate::RegisterSpec,
127{
128 #[inline(always)]
130 pub fn no_shift_pending(self) -> &'a mut crate::W<REG> {
131 self.variant(SHPFR::NoShiftPending)
132 }
133 #[inline(always)]
135 pub fn shift_pending(self) -> &'a mut crate::W<REG> {
136 self.variant(SHPFR::ShiftPending)
137 }
138}
139#[cfg_attr(feature = "defmt", derive(defmt::Format))]
143#[derive(Clone, Copy, Debug, PartialEq, Eq)]
144pub enum INITSR {
145 NotInitalized = 0,
147 Initalized = 1,
149}
150impl From<INITSR> for bool {
151 #[inline(always)]
152 fn from(variant: INITSR) -> Self {
153 variant as u8 != 0
154 }
155}
156pub type INITS_R = crate::BitReader<INITSR>;
158impl INITS_R {
159 #[inline(always)]
161 pub const fn variant(&self) -> INITSR {
162 match self.bits {
163 false => INITSR::NotInitalized,
164 true => INITSR::Initalized,
165 }
166 }
167 #[inline(always)]
169 pub fn is_not_initalized(&self) -> bool {
170 *self == INITSR::NotInitalized
171 }
172 #[inline(always)]
174 pub fn is_initalized(&self) -> bool {
175 *self == INITSR::Initalized
176 }
177}
178#[cfg_attr(feature = "defmt", derive(defmt::Format))]
182#[derive(Clone, Copy, Debug, PartialEq, Eq)]
183pub enum RSFR {
184 NotSynced = 0,
186 Synced = 1,
188}
189impl From<RSFR> for bool {
190 #[inline(always)]
191 fn from(variant: RSFR) -> Self {
192 variant as u8 != 0
193 }
194}
195pub type RSF_R = crate::BitReader<RSFR>;
197impl RSF_R {
198 #[inline(always)]
200 pub const fn variant(&self) -> RSFR {
201 match self.bits {
202 false => RSFR::NotSynced,
203 true => RSFR::Synced,
204 }
205 }
206 #[inline(always)]
208 pub fn is_not_synced(&self) -> bool {
209 *self == RSFR::NotSynced
210 }
211 #[inline(always)]
213 pub fn is_synced(&self) -> bool {
214 *self == RSFR::Synced
215 }
216}
217#[cfg_attr(feature = "defmt", derive(defmt::Format))]
221#[derive(Clone, Copy, Debug, PartialEq, Eq)]
222pub enum RSFW {
223 Clear = 0,
225}
226impl From<RSFW> for bool {
227 #[inline(always)]
228 fn from(variant: RSFW) -> Self {
229 variant as u8 != 0
230 }
231}
232pub type RSF_W<'a, REG> = crate::BitWriter0C<'a, REG, RSFW>;
234impl<'a, REG> RSF_W<'a, REG>
235where
236 REG: crate::Writable + crate::RegisterSpec,
237{
238 #[inline(always)]
240 pub fn clear(self) -> &'a mut crate::W<REG> {
241 self.variant(RSFW::Clear)
242 }
243}
244#[cfg_attr(feature = "defmt", derive(defmt::Format))]
248#[derive(Clone, Copy, Debug, PartialEq, Eq)]
249pub enum INITFR {
250 NotAllowed = 0,
252 Allowed = 1,
254}
255impl From<INITFR> for bool {
256 #[inline(always)]
257 fn from(variant: INITFR) -> Self {
258 variant as u8 != 0
259 }
260}
261pub type INITF_R = crate::BitReader<INITFR>;
263impl INITF_R {
264 #[inline(always)]
266 pub const fn variant(&self) -> INITFR {
267 match self.bits {
268 false => INITFR::NotAllowed,
269 true => INITFR::Allowed,
270 }
271 }
272 #[inline(always)]
274 pub fn is_not_allowed(&self) -> bool {
275 *self == INITFR::NotAllowed
276 }
277 #[inline(always)]
279 pub fn is_allowed(&self) -> bool {
280 *self == INITFR::Allowed
281 }
282}
283#[cfg_attr(feature = "defmt", derive(defmt::Format))]
287#[derive(Clone, Copy, Debug, PartialEq, Eq)]
288pub enum INIT {
289 FreeRunningMode = 0,
291 InitMode = 1,
293}
294impl From<INIT> for bool {
295 #[inline(always)]
296 fn from(variant: INIT) -> Self {
297 variant as u8 != 0
298 }
299}
300pub type INIT_R = crate::BitReader<INIT>;
302impl INIT_R {
303 #[inline(always)]
305 pub const fn variant(&self) -> INIT {
306 match self.bits {
307 false => INIT::FreeRunningMode,
308 true => INIT::InitMode,
309 }
310 }
311 #[inline(always)]
313 pub fn is_free_running_mode(&self) -> bool {
314 *self == INIT::FreeRunningMode
315 }
316 #[inline(always)]
318 pub fn is_init_mode(&self) -> bool {
319 *self == INIT::InitMode
320 }
321}
322pub type INIT_W<'a, REG> = crate::BitWriter<'a, REG, INIT>;
324impl<'a, REG> INIT_W<'a, REG>
325where
326 REG: crate::Writable + crate::RegisterSpec,
327{
328 #[inline(always)]
330 pub fn free_running_mode(self) -> &'a mut crate::W<REG> {
331 self.variant(INIT::FreeRunningMode)
332 }
333 #[inline(always)]
335 pub fn init_mode(self) -> &'a mut crate::W<REG> {
336 self.variant(INIT::InitMode)
337 }
338}
339#[cfg_attr(feature = "defmt", derive(defmt::Format))]
343#[derive(Clone, Copy, Debug, PartialEq, Eq)]
344pub enum ALRAFR {
345 Match = 1,
347}
348impl From<ALRAFR> for bool {
349 #[inline(always)]
350 fn from(variant: ALRAFR) -> Self {
351 variant as u8 != 0
352 }
353}
354pub type ALRF_R = crate::BitReader<ALRAFR>;
356impl ALRF_R {
357 #[inline(always)]
359 pub const fn variant(&self) -> Option<ALRAFR> {
360 match self.bits {
361 true => Some(ALRAFR::Match),
362 _ => None,
363 }
364 }
365 #[inline(always)]
367 pub fn is_match(&self) -> bool {
368 *self == ALRAFR::Match
369 }
370}
371#[cfg_attr(feature = "defmt", derive(defmt::Format))]
375#[derive(Clone, Copy, Debug, PartialEq, Eq)]
376pub enum ALRAFW {
377 Clear = 0,
379}
380impl From<ALRAFW> for bool {
381 #[inline(always)]
382 fn from(variant: ALRAFW) -> Self {
383 variant as u8 != 0
384 }
385}
386pub type ALRF_W<'a, REG> = crate::BitWriter0C<'a, REG, ALRAFW>;
388impl<'a, REG> ALRF_W<'a, REG>
389where
390 REG: crate::Writable + crate::RegisterSpec,
391{
392 #[inline(always)]
394 pub fn clear(self) -> &'a mut crate::W<REG> {
395 self.variant(ALRAFW::Clear)
396 }
397}
398#[cfg_attr(feature = "defmt", derive(defmt::Format))]
402#[derive(Clone, Copy, Debug, PartialEq, Eq)]
403pub enum WUTFR {
404 Zero = 1,
406}
407impl From<WUTFR> for bool {
408 #[inline(always)]
409 fn from(variant: WUTFR) -> Self {
410 variant as u8 != 0
411 }
412}
413pub type WUTF_R = crate::BitReader<WUTFR>;
415impl WUTF_R {
416 #[inline(always)]
418 pub const fn variant(&self) -> Option<WUTFR> {
419 match self.bits {
420 true => Some(WUTFR::Zero),
421 _ => None,
422 }
423 }
424 #[inline(always)]
426 pub fn is_zero(&self) -> bool {
427 *self == WUTFR::Zero
428 }
429}
430#[cfg_attr(feature = "defmt", derive(defmt::Format))]
434#[derive(Clone, Copy, Debug, PartialEq, Eq)]
435pub enum WUTFW {
436 Clear = 0,
438}
439impl From<WUTFW> for bool {
440 #[inline(always)]
441 fn from(variant: WUTFW) -> Self {
442 variant as u8 != 0
443 }
444}
445pub type WUTF_W<'a, REG> = crate::BitWriter0C<'a, REG, WUTFW>;
447impl<'a, REG> WUTF_W<'a, REG>
448where
449 REG: crate::Writable + crate::RegisterSpec,
450{
451 #[inline(always)]
453 pub fn clear(self) -> &'a mut crate::W<REG> {
454 self.variant(WUTFW::Clear)
455 }
456}
457#[cfg_attr(feature = "defmt", derive(defmt::Format))]
461#[derive(Clone, Copy, Debug, PartialEq, Eq)]
462pub enum TSFR {
463 TimestampEvent = 1,
465}
466impl From<TSFR> for bool {
467 #[inline(always)]
468 fn from(variant: TSFR) -> Self {
469 variant as u8 != 0
470 }
471}
472pub type TSF_R = crate::BitReader<TSFR>;
474impl TSF_R {
475 #[inline(always)]
477 pub const fn variant(&self) -> Option<TSFR> {
478 match self.bits {
479 true => Some(TSFR::TimestampEvent),
480 _ => None,
481 }
482 }
483 #[inline(always)]
485 pub fn is_timestamp_event(&self) -> bool {
486 *self == TSFR::TimestampEvent
487 }
488}
489#[cfg_attr(feature = "defmt", derive(defmt::Format))]
493#[derive(Clone, Copy, Debug, PartialEq, Eq)]
494pub enum TSFW {
495 Clear = 0,
497}
498impl From<TSFW> for bool {
499 #[inline(always)]
500 fn from(variant: TSFW) -> Self {
501 variant as u8 != 0
502 }
503}
504pub type TSF_W<'a, REG> = crate::BitWriter0C<'a, REG, TSFW>;
506impl<'a, REG> TSF_W<'a, REG>
507where
508 REG: crate::Writable + crate::RegisterSpec,
509{
510 #[inline(always)]
512 pub fn clear(self) -> &'a mut crate::W<REG> {
513 self.variant(TSFW::Clear)
514 }
515}
516#[cfg_attr(feature = "defmt", derive(defmt::Format))]
520#[derive(Clone, Copy, Debug, PartialEq, Eq)]
521pub enum TSOVFR {
522 Overflow = 1,
524}
525impl From<TSOVFR> for bool {
526 #[inline(always)]
527 fn from(variant: TSOVFR) -> Self {
528 variant as u8 != 0
529 }
530}
531pub type TSOVF_R = crate::BitReader<TSOVFR>;
533impl TSOVF_R {
534 #[inline(always)]
536 pub const fn variant(&self) -> Option<TSOVFR> {
537 match self.bits {
538 true => Some(TSOVFR::Overflow),
539 _ => None,
540 }
541 }
542 #[inline(always)]
544 pub fn is_overflow(&self) -> bool {
545 *self == TSOVFR::Overflow
546 }
547}
548#[cfg_attr(feature = "defmt", derive(defmt::Format))]
552#[derive(Clone, Copy, Debug, PartialEq, Eq)]
553pub enum TSOVFW {
554 Clear = 0,
556}
557impl From<TSOVFW> for bool {
558 #[inline(always)]
559 fn from(variant: TSOVFW) -> Self {
560 variant as u8 != 0
561 }
562}
563pub type TSOVF_W<'a, REG> = crate::BitWriter0C<'a, REG, TSOVFW>;
565impl<'a, REG> TSOVF_W<'a, REG>
566where
567 REG: crate::Writable + crate::RegisterSpec,
568{
569 #[inline(always)]
571 pub fn clear(self) -> &'a mut crate::W<REG> {
572 self.variant(TSOVFW::Clear)
573 }
574}
575#[cfg_attr(feature = "defmt", derive(defmt::Format))]
579#[derive(Clone, Copy, Debug, PartialEq, Eq)]
580pub enum TAMP1FR {
581 Tampered = 1,
583}
584impl From<TAMP1FR> for bool {
585 #[inline(always)]
586 fn from(variant: TAMP1FR) -> Self {
587 variant as u8 != 0
588 }
589}
590pub type TAMP1F_R = crate::BitReader<TAMP1FR>;
592impl TAMP1F_R {
593 #[inline(always)]
595 pub const fn variant(&self) -> Option<TAMP1FR> {
596 match self.bits {
597 true => Some(TAMP1FR::Tampered),
598 _ => None,
599 }
600 }
601 #[inline(always)]
603 pub fn is_tampered(&self) -> bool {
604 *self == TAMP1FR::Tampered
605 }
606}
607#[cfg_attr(feature = "defmt", derive(defmt::Format))]
611#[derive(Clone, Copy, Debug, PartialEq, Eq)]
612pub enum TAMP1FW {
613 Clear = 0,
615}
616impl From<TAMP1FW> for bool {
617 #[inline(always)]
618 fn from(variant: TAMP1FW) -> Self {
619 variant as u8 != 0
620 }
621}
622pub type TAMP1F_W<'a, REG> = crate::BitWriter0C<'a, REG, TAMP1FW>;
624impl<'a, REG> TAMP1F_W<'a, REG>
625where
626 REG: crate::Writable + crate::RegisterSpec,
627{
628 #[inline(always)]
630 pub fn clear(self) -> &'a mut crate::W<REG> {
631 self.variant(TAMP1FW::Clear)
632 }
633}
634pub use TAMP1F_R as TAMP2F_R;
636pub use TAMP1F_W as TAMP2F_W;
638#[cfg_attr(feature = "defmt", derive(defmt::Format))]
642#[derive(Clone, Copy, Debug, PartialEq, Eq)]
643pub enum RECALPFR {
644 Pending = 1,
646}
647impl From<RECALPFR> for bool {
648 #[inline(always)]
649 fn from(variant: RECALPFR) -> Self {
650 variant as u8 != 0
651 }
652}
653pub type RECALPF_R = crate::BitReader<RECALPFR>;
655impl RECALPF_R {
656 #[inline(always)]
658 pub const fn variant(&self) -> Option<RECALPFR> {
659 match self.bits {
660 true => Some(RECALPFR::Pending),
661 _ => None,
662 }
663 }
664 #[inline(always)]
666 pub fn is_pending(&self) -> bool {
667 *self == RECALPFR::Pending
668 }
669}
670impl R {
671 #[inline(always)]
675 pub fn alrwf(&self, n: u8) -> ALRWF_R {
676 #[allow(clippy::no_effect)]
677 [(); 2][n as usize];
678 ALRWF_R::new(((self.bits >> n) & 1) != 0)
679 }
680 #[inline(always)]
683 pub fn alrwf_iter(&self) -> impl Iterator<Item = ALRWF_R> + '_ {
684 (0..2).map(move |n| ALRWF_R::new(((self.bits >> n) & 1) != 0))
685 }
686 #[inline(always)]
688 pub fn alrawf(&self) -> ALRWF_R {
689 ALRWF_R::new((self.bits & 1) != 0)
690 }
691 #[inline(always)]
693 pub fn alrbwf(&self) -> ALRWF_R {
694 ALRWF_R::new(((self.bits >> 1) & 1) != 0)
695 }
696 #[inline(always)]
698 pub fn wutwf(&self) -> WUTWF_R {
699 WUTWF_R::new(((self.bits >> 2) & 1) != 0)
700 }
701 #[inline(always)]
703 pub fn shpf(&self) -> SHPF_R {
704 SHPF_R::new(((self.bits >> 3) & 1) != 0)
705 }
706 #[inline(always)]
708 pub fn inits(&self) -> INITS_R {
709 INITS_R::new(((self.bits >> 4) & 1) != 0)
710 }
711 #[inline(always)]
713 pub fn rsf(&self) -> RSF_R {
714 RSF_R::new(((self.bits >> 5) & 1) != 0)
715 }
716 #[inline(always)]
718 pub fn initf(&self) -> INITF_R {
719 INITF_R::new(((self.bits >> 6) & 1) != 0)
720 }
721 #[inline(always)]
723 pub fn init(&self) -> INIT_R {
724 INIT_R::new(((self.bits >> 7) & 1) != 0)
725 }
726 #[inline(always)]
730 pub fn alrf(&self, n: u8) -> ALRF_R {
731 #[allow(clippy::no_effect)]
732 [(); 2][n as usize];
733 ALRF_R::new(((self.bits >> (n + 8)) & 1) != 0)
734 }
735 #[inline(always)]
738 pub fn alrf_iter(&self) -> impl Iterator<Item = ALRF_R> + '_ {
739 (0..2).map(move |n| ALRF_R::new(((self.bits >> (n + 8)) & 1) != 0))
740 }
741 #[inline(always)]
743 pub fn alraf(&self) -> ALRF_R {
744 ALRF_R::new(((self.bits >> 8) & 1) != 0)
745 }
746 #[inline(always)]
748 pub fn alrbf(&self) -> ALRF_R {
749 ALRF_R::new(((self.bits >> 9) & 1) != 0)
750 }
751 #[inline(always)]
753 pub fn wutf(&self) -> WUTF_R {
754 WUTF_R::new(((self.bits >> 10) & 1) != 0)
755 }
756 #[inline(always)]
758 pub fn tsf(&self) -> TSF_R {
759 TSF_R::new(((self.bits >> 11) & 1) != 0)
760 }
761 #[inline(always)]
763 pub fn tsovf(&self) -> TSOVF_R {
764 TSOVF_R::new(((self.bits >> 12) & 1) != 0)
765 }
766 #[inline(always)]
768 pub fn tamp1f(&self) -> TAMP1F_R {
769 TAMP1F_R::new(((self.bits >> 13) & 1) != 0)
770 }
771 #[inline(always)]
773 pub fn tamp2f(&self) -> TAMP2F_R {
774 TAMP2F_R::new(((self.bits >> 14) & 1) != 0)
775 }
776 #[inline(always)]
778 pub fn recalpf(&self) -> RECALPF_R {
779 RECALPF_R::new(((self.bits >> 16) & 1) != 0)
780 }
781}
782impl core::fmt::Debug for R {
783 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
784 f.debug_struct("ISR")
785 .field("alrawf", &self.alrawf())
786 .field("alrbwf", &self.alrbwf())
787 .field("wutwf", &self.wutwf())
788 .field("shpf", &self.shpf())
789 .field("inits", &self.inits())
790 .field("rsf", &self.rsf())
791 .field("initf", &self.initf())
792 .field("init", &self.init())
793 .field("alraf", &self.alraf())
794 .field("alrbf", &self.alrbf())
795 .field("wutf", &self.wutf())
796 .field("tsf", &self.tsf())
797 .field("tsovf", &self.tsovf())
798 .field("tamp1f", &self.tamp1f())
799 .field("tamp2f", &self.tamp2f())
800 .field("recalpf", &self.recalpf())
801 .finish()
802 }
803}
804impl W {
805 #[inline(always)]
807 pub fn shpf(&mut self) -> SHPF_W<ISRrs> {
808 SHPF_W::new(self, 3)
809 }
810 #[inline(always)]
812 pub fn rsf(&mut self) -> RSF_W<ISRrs> {
813 RSF_W::new(self, 5)
814 }
815 #[inline(always)]
817 pub fn init(&mut self) -> INIT_W<ISRrs> {
818 INIT_W::new(self, 7)
819 }
820 #[inline(always)]
824 pub fn alrf(&mut self, n: u8) -> ALRF_W<ISRrs> {
825 #[allow(clippy::no_effect)]
826 [(); 2][n as usize];
827 ALRF_W::new(self, n + 8)
828 }
829 #[inline(always)]
831 pub fn alraf(&mut self) -> ALRF_W<ISRrs> {
832 ALRF_W::new(self, 8)
833 }
834 #[inline(always)]
836 pub fn alrbf(&mut self) -> ALRF_W<ISRrs> {
837 ALRF_W::new(self, 9)
838 }
839 #[inline(always)]
841 pub fn wutf(&mut self) -> WUTF_W<ISRrs> {
842 WUTF_W::new(self, 10)
843 }
844 #[inline(always)]
846 pub fn tsf(&mut self) -> TSF_W<ISRrs> {
847 TSF_W::new(self, 11)
848 }
849 #[inline(always)]
851 pub fn tsovf(&mut self) -> TSOVF_W<ISRrs> {
852 TSOVF_W::new(self, 12)
853 }
854 #[inline(always)]
856 pub fn tamp1f(&mut self) -> TAMP1F_W<ISRrs> {
857 TAMP1F_W::new(self, 13)
858 }
859 #[inline(always)]
861 pub fn tamp2f(&mut self) -> TAMP2F_W<ISRrs> {
862 TAMP2F_W::new(self, 14)
863 }
864}
865pub struct ISRrs;
871impl crate::RegisterSpec for ISRrs {
872 type Ux = u32;
873}
874impl crate::Readable for ISRrs {}
876impl crate::Writable for ISRrs {
878 type Safety = crate::Unsafe;
879 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0x7f20;
880}
881impl crate::Resettable for ISRrs {
883 const RESET_VALUE: u32 = 0x07;
884}