1pub type R = crate::R<CR3rs>;
3pub type W = crate::W<CR3rs>;
5#[cfg_attr(feature = "defmt", derive(defmt::Format))]
9#[derive(Clone, Copy, Debug, PartialEq, Eq)]
10pub enum EIE {
11 Disabled = 0,
13 Enabled = 1,
15}
16impl From<EIE> for bool {
17 #[inline(always)]
18 fn from(variant: EIE) -> Self {
19 variant as u8 != 0
20 }
21}
22pub type EIE_R = crate::BitReader<EIE>;
24impl EIE_R {
25 #[inline(always)]
27 pub const fn variant(&self) -> EIE {
28 match self.bits {
29 false => EIE::Disabled,
30 true => EIE::Enabled,
31 }
32 }
33 #[inline(always)]
35 pub fn is_disabled(&self) -> bool {
36 *self == EIE::Disabled
37 }
38 #[inline(always)]
40 pub fn is_enabled(&self) -> bool {
41 *self == EIE::Enabled
42 }
43}
44pub type EIE_W<'a, REG> = crate::BitWriter<'a, REG, EIE>;
46impl<'a, REG> EIE_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(EIE::Disabled)
54 }
55 #[inline(always)]
57 pub fn enabled(self) -> &'a mut crate::W<REG> {
58 self.variant(EIE::Enabled)
59 }
60}
61#[cfg_attr(feature = "defmt", derive(defmt::Format))]
65#[derive(Clone, Copy, Debug, PartialEq, Eq)]
66pub enum IREN {
67 Disabled = 0,
69 Enabled = 1,
71}
72impl From<IREN> for bool {
73 #[inline(always)]
74 fn from(variant: IREN) -> Self {
75 variant as u8 != 0
76 }
77}
78pub type IREN_R = crate::BitReader<IREN>;
80impl IREN_R {
81 #[inline(always)]
83 pub const fn variant(&self) -> IREN {
84 match self.bits {
85 false => IREN::Disabled,
86 true => IREN::Enabled,
87 }
88 }
89 #[inline(always)]
91 pub fn is_disabled(&self) -> bool {
92 *self == IREN::Disabled
93 }
94 #[inline(always)]
96 pub fn is_enabled(&self) -> bool {
97 *self == IREN::Enabled
98 }
99}
100pub type IREN_W<'a, REG> = crate::BitWriter<'a, REG, IREN>;
102impl<'a, REG> IREN_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(IREN::Disabled)
110 }
111 #[inline(always)]
113 pub fn enabled(self) -> &'a mut crate::W<REG> {
114 self.variant(IREN::Enabled)
115 }
116}
117#[cfg_attr(feature = "defmt", derive(defmt::Format))]
121#[derive(Clone, Copy, Debug, PartialEq, Eq)]
122pub enum IRLP {
123 Normal = 0,
125 LowPower = 1,
127}
128impl From<IRLP> for bool {
129 #[inline(always)]
130 fn from(variant: IRLP) -> Self {
131 variant as u8 != 0
132 }
133}
134pub type IRLP_R = crate::BitReader<IRLP>;
136impl IRLP_R {
137 #[inline(always)]
139 pub const fn variant(&self) -> IRLP {
140 match self.bits {
141 false => IRLP::Normal,
142 true => IRLP::LowPower,
143 }
144 }
145 #[inline(always)]
147 pub fn is_normal(&self) -> bool {
148 *self == IRLP::Normal
149 }
150 #[inline(always)]
152 pub fn is_low_power(&self) -> bool {
153 *self == IRLP::LowPower
154 }
155}
156pub type IRLP_W<'a, REG> = crate::BitWriter<'a, REG, IRLP>;
158impl<'a, REG> IRLP_W<'a, REG>
159where
160 REG: crate::Writable + crate::RegisterSpec,
161{
162 #[inline(always)]
164 pub fn normal(self) -> &'a mut crate::W<REG> {
165 self.variant(IRLP::Normal)
166 }
167 #[inline(always)]
169 pub fn low_power(self) -> &'a mut crate::W<REG> {
170 self.variant(IRLP::LowPower)
171 }
172}
173#[cfg_attr(feature = "defmt", derive(defmt::Format))]
177#[derive(Clone, Copy, Debug, PartialEq, Eq)]
178pub enum HDSEL {
179 NotSelected = 0,
181 Selected = 1,
183}
184impl From<HDSEL> for bool {
185 #[inline(always)]
186 fn from(variant: HDSEL) -> Self {
187 variant as u8 != 0
188 }
189}
190pub type HDSEL_R = crate::BitReader<HDSEL>;
192impl HDSEL_R {
193 #[inline(always)]
195 pub const fn variant(&self) -> HDSEL {
196 match self.bits {
197 false => HDSEL::NotSelected,
198 true => HDSEL::Selected,
199 }
200 }
201 #[inline(always)]
203 pub fn is_not_selected(&self) -> bool {
204 *self == HDSEL::NotSelected
205 }
206 #[inline(always)]
208 pub fn is_selected(&self) -> bool {
209 *self == HDSEL::Selected
210 }
211}
212pub type HDSEL_W<'a, REG> = crate::BitWriter<'a, REG, HDSEL>;
214impl<'a, REG> HDSEL_W<'a, REG>
215where
216 REG: crate::Writable + crate::RegisterSpec,
217{
218 #[inline(always)]
220 pub fn not_selected(self) -> &'a mut crate::W<REG> {
221 self.variant(HDSEL::NotSelected)
222 }
223 #[inline(always)]
225 pub fn selected(self) -> &'a mut crate::W<REG> {
226 self.variant(HDSEL::Selected)
227 }
228}
229#[cfg_attr(feature = "defmt", derive(defmt::Format))]
233#[derive(Clone, Copy, Debug, PartialEq, Eq)]
234pub enum NACK {
235 Disabled = 0,
237 Enabled = 1,
239}
240impl From<NACK> for bool {
241 #[inline(always)]
242 fn from(variant: NACK) -> Self {
243 variant as u8 != 0
244 }
245}
246pub type NACK_R = crate::BitReader<NACK>;
248impl NACK_R {
249 #[inline(always)]
251 pub const fn variant(&self) -> NACK {
252 match self.bits {
253 false => NACK::Disabled,
254 true => NACK::Enabled,
255 }
256 }
257 #[inline(always)]
259 pub fn is_disabled(&self) -> bool {
260 *self == NACK::Disabled
261 }
262 #[inline(always)]
264 pub fn is_enabled(&self) -> bool {
265 *self == NACK::Enabled
266 }
267}
268pub type NACK_W<'a, REG> = crate::BitWriter<'a, REG, NACK>;
270impl<'a, REG> NACK_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(NACK::Disabled)
278 }
279 #[inline(always)]
281 pub fn enabled(self) -> &'a mut crate::W<REG> {
282 self.variant(NACK::Enabled)
283 }
284}
285#[cfg_attr(feature = "defmt", derive(defmt::Format))]
289#[derive(Clone, Copy, Debug, PartialEq, Eq)]
290pub enum SCEN {
291 Disabled = 0,
293 Enabled = 1,
295}
296impl From<SCEN> for bool {
297 #[inline(always)]
298 fn from(variant: SCEN) -> Self {
299 variant as u8 != 0
300 }
301}
302pub type SCEN_R = crate::BitReader<SCEN>;
304impl SCEN_R {
305 #[inline(always)]
307 pub const fn variant(&self) -> SCEN {
308 match self.bits {
309 false => SCEN::Disabled,
310 true => SCEN::Enabled,
311 }
312 }
313 #[inline(always)]
315 pub fn is_disabled(&self) -> bool {
316 *self == SCEN::Disabled
317 }
318 #[inline(always)]
320 pub fn is_enabled(&self) -> bool {
321 *self == SCEN::Enabled
322 }
323}
324pub type SCEN_W<'a, REG> = crate::BitWriter<'a, REG, SCEN>;
326impl<'a, REG> SCEN_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(SCEN::Disabled)
334 }
335 #[inline(always)]
337 pub fn enabled(self) -> &'a mut crate::W<REG> {
338 self.variant(SCEN::Enabled)
339 }
340}
341#[cfg_attr(feature = "defmt", derive(defmt::Format))]
345#[derive(Clone, Copy, Debug, PartialEq, Eq)]
346pub enum DMAR {
347 Disabled = 0,
349 Enabled = 1,
351}
352impl From<DMAR> for bool {
353 #[inline(always)]
354 fn from(variant: DMAR) -> Self {
355 variant as u8 != 0
356 }
357}
358pub type DMAR_R = crate::BitReader<DMAR>;
360impl DMAR_R {
361 #[inline(always)]
363 pub const fn variant(&self) -> DMAR {
364 match self.bits {
365 false => DMAR::Disabled,
366 true => DMAR::Enabled,
367 }
368 }
369 #[inline(always)]
371 pub fn is_disabled(&self) -> bool {
372 *self == DMAR::Disabled
373 }
374 #[inline(always)]
376 pub fn is_enabled(&self) -> bool {
377 *self == DMAR::Enabled
378 }
379}
380pub type DMAR_W<'a, REG> = crate::BitWriter<'a, REG, DMAR>;
382impl<'a, REG> DMAR_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(DMAR::Disabled)
390 }
391 #[inline(always)]
393 pub fn enabled(self) -> &'a mut crate::W<REG> {
394 self.variant(DMAR::Enabled)
395 }
396}
397#[cfg_attr(feature = "defmt", derive(defmt::Format))]
401#[derive(Clone, Copy, Debug, PartialEq, Eq)]
402pub enum DMAT {
403 Disabled = 0,
405 Enabled = 1,
407}
408impl From<DMAT> for bool {
409 #[inline(always)]
410 fn from(variant: DMAT) -> Self {
411 variant as u8 != 0
412 }
413}
414pub type DMAT_R = crate::BitReader<DMAT>;
416impl DMAT_R {
417 #[inline(always)]
419 pub const fn variant(&self) -> DMAT {
420 match self.bits {
421 false => DMAT::Disabled,
422 true => DMAT::Enabled,
423 }
424 }
425 #[inline(always)]
427 pub fn is_disabled(&self) -> bool {
428 *self == DMAT::Disabled
429 }
430 #[inline(always)]
432 pub fn is_enabled(&self) -> bool {
433 *self == DMAT::Enabled
434 }
435}
436pub type DMAT_W<'a, REG> = crate::BitWriter<'a, REG, DMAT>;
438impl<'a, REG> DMAT_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(DMAT::Disabled)
446 }
447 #[inline(always)]
449 pub fn enabled(self) -> &'a mut crate::W<REG> {
450 self.variant(DMAT::Enabled)
451 }
452}
453#[cfg_attr(feature = "defmt", derive(defmt::Format))]
457#[derive(Clone, Copy, Debug, PartialEq, Eq)]
458pub enum RTSE {
459 Disabled = 0,
461 Enabled = 1,
463}
464impl From<RTSE> for bool {
465 #[inline(always)]
466 fn from(variant: RTSE) -> Self {
467 variant as u8 != 0
468 }
469}
470pub type RTSE_R = crate::BitReader<RTSE>;
472impl RTSE_R {
473 #[inline(always)]
475 pub const fn variant(&self) -> RTSE {
476 match self.bits {
477 false => RTSE::Disabled,
478 true => RTSE::Enabled,
479 }
480 }
481 #[inline(always)]
483 pub fn is_disabled(&self) -> bool {
484 *self == RTSE::Disabled
485 }
486 #[inline(always)]
488 pub fn is_enabled(&self) -> bool {
489 *self == RTSE::Enabled
490 }
491}
492pub type RTSE_W<'a, REG> = crate::BitWriter<'a, REG, RTSE>;
494impl<'a, REG> RTSE_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(RTSE::Disabled)
502 }
503 #[inline(always)]
505 pub fn enabled(self) -> &'a mut crate::W<REG> {
506 self.variant(RTSE::Enabled)
507 }
508}
509#[cfg_attr(feature = "defmt", derive(defmt::Format))]
513#[derive(Clone, Copy, Debug, PartialEq, Eq)]
514pub enum CTSE {
515 Disabled = 0,
517 Enabled = 1,
519}
520impl From<CTSE> for bool {
521 #[inline(always)]
522 fn from(variant: CTSE) -> Self {
523 variant as u8 != 0
524 }
525}
526pub type CTSE_R = crate::BitReader<CTSE>;
528impl CTSE_R {
529 #[inline(always)]
531 pub const fn variant(&self) -> CTSE {
532 match self.bits {
533 false => CTSE::Disabled,
534 true => CTSE::Enabled,
535 }
536 }
537 #[inline(always)]
539 pub fn is_disabled(&self) -> bool {
540 *self == CTSE::Disabled
541 }
542 #[inline(always)]
544 pub fn is_enabled(&self) -> bool {
545 *self == CTSE::Enabled
546 }
547}
548pub type CTSE_W<'a, REG> = crate::BitWriter<'a, REG, CTSE>;
550impl<'a, REG> CTSE_W<'a, REG>
551where
552 REG: crate::Writable + crate::RegisterSpec,
553{
554 #[inline(always)]
556 pub fn disabled(self) -> &'a mut crate::W<REG> {
557 self.variant(CTSE::Disabled)
558 }
559 #[inline(always)]
561 pub fn enabled(self) -> &'a mut crate::W<REG> {
562 self.variant(CTSE::Enabled)
563 }
564}
565#[cfg_attr(feature = "defmt", derive(defmt::Format))]
569#[derive(Clone, Copy, Debug, PartialEq, Eq)]
570pub enum CTSIE {
571 Disabled = 0,
573 Enabled = 1,
575}
576impl From<CTSIE> for bool {
577 #[inline(always)]
578 fn from(variant: CTSIE) -> Self {
579 variant as u8 != 0
580 }
581}
582pub type CTSIE_R = crate::BitReader<CTSIE>;
584impl CTSIE_R {
585 #[inline(always)]
587 pub const fn variant(&self) -> CTSIE {
588 match self.bits {
589 false => CTSIE::Disabled,
590 true => CTSIE::Enabled,
591 }
592 }
593 #[inline(always)]
595 pub fn is_disabled(&self) -> bool {
596 *self == CTSIE::Disabled
597 }
598 #[inline(always)]
600 pub fn is_enabled(&self) -> bool {
601 *self == CTSIE::Enabled
602 }
603}
604pub type CTSIE_W<'a, REG> = crate::BitWriter<'a, REG, CTSIE>;
606impl<'a, REG> CTSIE_W<'a, REG>
607where
608 REG: crate::Writable + crate::RegisterSpec,
609{
610 #[inline(always)]
612 pub fn disabled(self) -> &'a mut crate::W<REG> {
613 self.variant(CTSIE::Disabled)
614 }
615 #[inline(always)]
617 pub fn enabled(self) -> &'a mut crate::W<REG> {
618 self.variant(CTSIE::Enabled)
619 }
620}
621#[cfg_attr(feature = "defmt", derive(defmt::Format))]
625#[derive(Clone, Copy, Debug, PartialEq, Eq)]
626pub enum ONEBIT {
627 Sample3 = 0,
629 Sample1 = 1,
631}
632impl From<ONEBIT> for bool {
633 #[inline(always)]
634 fn from(variant: ONEBIT) -> Self {
635 variant as u8 != 0
636 }
637}
638pub type ONEBIT_R = crate::BitReader<ONEBIT>;
640impl ONEBIT_R {
641 #[inline(always)]
643 pub const fn variant(&self) -> ONEBIT {
644 match self.bits {
645 false => ONEBIT::Sample3,
646 true => ONEBIT::Sample1,
647 }
648 }
649 #[inline(always)]
651 pub fn is_sample3(&self) -> bool {
652 *self == ONEBIT::Sample3
653 }
654 #[inline(always)]
656 pub fn is_sample1(&self) -> bool {
657 *self == ONEBIT::Sample1
658 }
659}
660pub type ONEBIT_W<'a, REG> = crate::BitWriter<'a, REG, ONEBIT>;
662impl<'a, REG> ONEBIT_W<'a, REG>
663where
664 REG: crate::Writable + crate::RegisterSpec,
665{
666 #[inline(always)]
668 pub fn sample3(self) -> &'a mut crate::W<REG> {
669 self.variant(ONEBIT::Sample3)
670 }
671 #[inline(always)]
673 pub fn sample1(self) -> &'a mut crate::W<REG> {
674 self.variant(ONEBIT::Sample1)
675 }
676}
677#[cfg_attr(feature = "defmt", derive(defmt::Format))]
681#[derive(Clone, Copy, Debug, PartialEq, Eq)]
682pub enum OVRDIS {
683 Enabled = 0,
685 Disabled = 1,
687}
688impl From<OVRDIS> for bool {
689 #[inline(always)]
690 fn from(variant: OVRDIS) -> Self {
691 variant as u8 != 0
692 }
693}
694pub type OVRDIS_R = crate::BitReader<OVRDIS>;
696impl OVRDIS_R {
697 #[inline(always)]
699 pub const fn variant(&self) -> OVRDIS {
700 match self.bits {
701 false => OVRDIS::Enabled,
702 true => OVRDIS::Disabled,
703 }
704 }
705 #[inline(always)]
707 pub fn is_enabled(&self) -> bool {
708 *self == OVRDIS::Enabled
709 }
710 #[inline(always)]
712 pub fn is_disabled(&self) -> bool {
713 *self == OVRDIS::Disabled
714 }
715}
716pub type OVRDIS_W<'a, REG> = crate::BitWriter<'a, REG, OVRDIS>;
718impl<'a, REG> OVRDIS_W<'a, REG>
719where
720 REG: crate::Writable + crate::RegisterSpec,
721{
722 #[inline(always)]
724 pub fn enabled(self) -> &'a mut crate::W<REG> {
725 self.variant(OVRDIS::Enabled)
726 }
727 #[inline(always)]
729 pub fn disabled(self) -> &'a mut crate::W<REG> {
730 self.variant(OVRDIS::Disabled)
731 }
732}
733#[cfg_attr(feature = "defmt", derive(defmt::Format))]
737#[derive(Clone, Copy, Debug, PartialEq, Eq)]
738pub enum DDRE {
739 NotDisabled = 0,
741 Disabled = 1,
743}
744impl From<DDRE> for bool {
745 #[inline(always)]
746 fn from(variant: DDRE) -> Self {
747 variant as u8 != 0
748 }
749}
750pub type DDRE_R = crate::BitReader<DDRE>;
752impl DDRE_R {
753 #[inline(always)]
755 pub const fn variant(&self) -> DDRE {
756 match self.bits {
757 false => DDRE::NotDisabled,
758 true => DDRE::Disabled,
759 }
760 }
761 #[inline(always)]
763 pub fn is_not_disabled(&self) -> bool {
764 *self == DDRE::NotDisabled
765 }
766 #[inline(always)]
768 pub fn is_disabled(&self) -> bool {
769 *self == DDRE::Disabled
770 }
771}
772pub type DDRE_W<'a, REG> = crate::BitWriter<'a, REG, DDRE>;
774impl<'a, REG> DDRE_W<'a, REG>
775where
776 REG: crate::Writable + crate::RegisterSpec,
777{
778 #[inline(always)]
780 pub fn not_disabled(self) -> &'a mut crate::W<REG> {
781 self.variant(DDRE::NotDisabled)
782 }
783 #[inline(always)]
785 pub fn disabled(self) -> &'a mut crate::W<REG> {
786 self.variant(DDRE::Disabled)
787 }
788}
789#[cfg_attr(feature = "defmt", derive(defmt::Format))]
793#[derive(Clone, Copy, Debug, PartialEq, Eq)]
794pub enum DEM {
795 Disabled = 0,
797 Enabled = 1,
799}
800impl From<DEM> for bool {
801 #[inline(always)]
802 fn from(variant: DEM) -> Self {
803 variant as u8 != 0
804 }
805}
806pub type DEM_R = crate::BitReader<DEM>;
808impl DEM_R {
809 #[inline(always)]
811 pub const fn variant(&self) -> DEM {
812 match self.bits {
813 false => DEM::Disabled,
814 true => DEM::Enabled,
815 }
816 }
817 #[inline(always)]
819 pub fn is_disabled(&self) -> bool {
820 *self == DEM::Disabled
821 }
822 #[inline(always)]
824 pub fn is_enabled(&self) -> bool {
825 *self == DEM::Enabled
826 }
827}
828pub type DEM_W<'a, REG> = crate::BitWriter<'a, REG, DEM>;
830impl<'a, REG> DEM_W<'a, REG>
831where
832 REG: crate::Writable + crate::RegisterSpec,
833{
834 #[inline(always)]
836 pub fn disabled(self) -> &'a mut crate::W<REG> {
837 self.variant(DEM::Disabled)
838 }
839 #[inline(always)]
841 pub fn enabled(self) -> &'a mut crate::W<REG> {
842 self.variant(DEM::Enabled)
843 }
844}
845#[cfg_attr(feature = "defmt", derive(defmt::Format))]
849#[derive(Clone, Copy, Debug, PartialEq, Eq)]
850pub enum DEP {
851 High = 0,
853 Low = 1,
855}
856impl From<DEP> for bool {
857 #[inline(always)]
858 fn from(variant: DEP) -> Self {
859 variant as u8 != 0
860 }
861}
862pub type DEP_R = crate::BitReader<DEP>;
864impl DEP_R {
865 #[inline(always)]
867 pub const fn variant(&self) -> DEP {
868 match self.bits {
869 false => DEP::High,
870 true => DEP::Low,
871 }
872 }
873 #[inline(always)]
875 pub fn is_high(&self) -> bool {
876 *self == DEP::High
877 }
878 #[inline(always)]
880 pub fn is_low(&self) -> bool {
881 *self == DEP::Low
882 }
883}
884pub type DEP_W<'a, REG> = crate::BitWriter<'a, REG, DEP>;
886impl<'a, REG> DEP_W<'a, REG>
887where
888 REG: crate::Writable + crate::RegisterSpec,
889{
890 #[inline(always)]
892 pub fn high(self) -> &'a mut crate::W<REG> {
893 self.variant(DEP::High)
894 }
895 #[inline(always)]
897 pub fn low(self) -> &'a mut crate::W<REG> {
898 self.variant(DEP::Low)
899 }
900}
901pub type SCARCNT_R = crate::FieldReader;
903pub type SCARCNT_W<'a, REG> = crate::FieldWriter<'a, REG, 3, u8, crate::Safe>;
905#[cfg_attr(feature = "defmt", derive(defmt::Format))]
909#[derive(Clone, Copy, Debug, PartialEq, Eq)]
910#[repr(u8)]
911pub enum WUS {
912 Address = 0,
914 Start = 2,
916 Rxne = 3,
918}
919impl From<WUS> for u8 {
920 #[inline(always)]
921 fn from(variant: WUS) -> Self {
922 variant as _
923 }
924}
925impl crate::FieldSpec for WUS {
926 type Ux = u8;
927}
928impl crate::IsEnum for WUS {}
929pub type WUS_R = crate::FieldReader<WUS>;
931impl WUS_R {
932 #[inline(always)]
934 pub const fn variant(&self) -> Option<WUS> {
935 match self.bits {
936 0 => Some(WUS::Address),
937 2 => Some(WUS::Start),
938 3 => Some(WUS::Rxne),
939 _ => None,
940 }
941 }
942 #[inline(always)]
944 pub fn is_address(&self) -> bool {
945 *self == WUS::Address
946 }
947 #[inline(always)]
949 pub fn is_start(&self) -> bool {
950 *self == WUS::Start
951 }
952 #[inline(always)]
954 pub fn is_rxne(&self) -> bool {
955 *self == WUS::Rxne
956 }
957}
958pub type WUS_W<'a, REG> = crate::FieldWriter<'a, REG, 2, WUS>;
960impl<'a, REG> WUS_W<'a, REG>
961where
962 REG: crate::Writable + crate::RegisterSpec,
963 REG::Ux: From<u8>,
964{
965 #[inline(always)]
967 pub fn address(self) -> &'a mut crate::W<REG> {
968 self.variant(WUS::Address)
969 }
970 #[inline(always)]
972 pub fn start(self) -> &'a mut crate::W<REG> {
973 self.variant(WUS::Start)
974 }
975 #[inline(always)]
977 pub fn rxne(self) -> &'a mut crate::W<REG> {
978 self.variant(WUS::Rxne)
979 }
980}
981#[cfg_attr(feature = "defmt", derive(defmt::Format))]
985#[derive(Clone, Copy, Debug, PartialEq, Eq)]
986pub enum WUFIE {
987 Disabled = 0,
989 Enabled = 1,
991}
992impl From<WUFIE> for bool {
993 #[inline(always)]
994 fn from(variant: WUFIE) -> Self {
995 variant as u8 != 0
996 }
997}
998pub type WUFIE_R = crate::BitReader<WUFIE>;
1000impl WUFIE_R {
1001 #[inline(always)]
1003 pub const fn variant(&self) -> WUFIE {
1004 match self.bits {
1005 false => WUFIE::Disabled,
1006 true => WUFIE::Enabled,
1007 }
1008 }
1009 #[inline(always)]
1011 pub fn is_disabled(&self) -> bool {
1012 *self == WUFIE::Disabled
1013 }
1014 #[inline(always)]
1016 pub fn is_enabled(&self) -> bool {
1017 *self == WUFIE::Enabled
1018 }
1019}
1020pub type WUFIE_W<'a, REG> = crate::BitWriter<'a, REG, WUFIE>;
1022impl<'a, REG> WUFIE_W<'a, REG>
1023where
1024 REG: crate::Writable + crate::RegisterSpec,
1025{
1026 #[inline(always)]
1028 pub fn disabled(self) -> &'a mut crate::W<REG> {
1029 self.variant(WUFIE::Disabled)
1030 }
1031 #[inline(always)]
1033 pub fn enabled(self) -> &'a mut crate::W<REG> {
1034 self.variant(WUFIE::Enabled)
1035 }
1036}
1037#[cfg_attr(feature = "defmt", derive(defmt::Format))]
1041#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1042pub enum TXFTIE {
1043 Disabled = 0,
1045 Enabled = 1,
1047}
1048impl From<TXFTIE> for bool {
1049 #[inline(always)]
1050 fn from(variant: TXFTIE) -> Self {
1051 variant as u8 != 0
1052 }
1053}
1054pub type TXFTIE_R = crate::BitReader<TXFTIE>;
1056impl TXFTIE_R {
1057 #[inline(always)]
1059 pub const fn variant(&self) -> TXFTIE {
1060 match self.bits {
1061 false => TXFTIE::Disabled,
1062 true => TXFTIE::Enabled,
1063 }
1064 }
1065 #[inline(always)]
1067 pub fn is_disabled(&self) -> bool {
1068 *self == TXFTIE::Disabled
1069 }
1070 #[inline(always)]
1072 pub fn is_enabled(&self) -> bool {
1073 *self == TXFTIE::Enabled
1074 }
1075}
1076pub type TXFTIE_W<'a, REG> = crate::BitWriter<'a, REG, TXFTIE>;
1078impl<'a, REG> TXFTIE_W<'a, REG>
1079where
1080 REG: crate::Writable + crate::RegisterSpec,
1081{
1082 #[inline(always)]
1084 pub fn disabled(self) -> &'a mut crate::W<REG> {
1085 self.variant(TXFTIE::Disabled)
1086 }
1087 #[inline(always)]
1089 pub fn enabled(self) -> &'a mut crate::W<REG> {
1090 self.variant(TXFTIE::Enabled)
1091 }
1092}
1093#[cfg_attr(feature = "defmt", derive(defmt::Format))]
1097#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1098pub enum TCBGTIE {
1099 Disabled = 0,
1101 Enabled = 1,
1103}
1104impl From<TCBGTIE> for bool {
1105 #[inline(always)]
1106 fn from(variant: TCBGTIE) -> Self {
1107 variant as u8 != 0
1108 }
1109}
1110pub type TCBGTIE_R = crate::BitReader<TCBGTIE>;
1112impl TCBGTIE_R {
1113 #[inline(always)]
1115 pub const fn variant(&self) -> TCBGTIE {
1116 match self.bits {
1117 false => TCBGTIE::Disabled,
1118 true => TCBGTIE::Enabled,
1119 }
1120 }
1121 #[inline(always)]
1123 pub fn is_disabled(&self) -> bool {
1124 *self == TCBGTIE::Disabled
1125 }
1126 #[inline(always)]
1128 pub fn is_enabled(&self) -> bool {
1129 *self == TCBGTIE::Enabled
1130 }
1131}
1132pub type TCBGTIE_W<'a, REG> = crate::BitWriter<'a, REG, TCBGTIE>;
1134impl<'a, REG> TCBGTIE_W<'a, REG>
1135where
1136 REG: crate::Writable + crate::RegisterSpec,
1137{
1138 #[inline(always)]
1140 pub fn disabled(self) -> &'a mut crate::W<REG> {
1141 self.variant(TCBGTIE::Disabled)
1142 }
1143 #[inline(always)]
1145 pub fn enabled(self) -> &'a mut crate::W<REG> {
1146 self.variant(TCBGTIE::Enabled)
1147 }
1148}
1149#[cfg_attr(feature = "defmt", derive(defmt::Format))]
1153#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1154#[repr(u8)]
1155pub enum RXFTCFG {
1156 Depth1_8 = 0,
1158 Depth1_4 = 1,
1160 Depth1_2 = 2,
1162 Depth3_4 = 3,
1164 Depth7_8 = 4,
1166 Full = 5,
1168}
1169impl From<RXFTCFG> for u8 {
1170 #[inline(always)]
1171 fn from(variant: RXFTCFG) -> Self {
1172 variant as _
1173 }
1174}
1175impl crate::FieldSpec for RXFTCFG {
1176 type Ux = u8;
1177}
1178impl crate::IsEnum for RXFTCFG {}
1179pub type RXFTCFG_R = crate::FieldReader<RXFTCFG>;
1181impl RXFTCFG_R {
1182 #[inline(always)]
1184 pub const fn variant(&self) -> Option<RXFTCFG> {
1185 match self.bits {
1186 0 => Some(RXFTCFG::Depth1_8),
1187 1 => Some(RXFTCFG::Depth1_4),
1188 2 => Some(RXFTCFG::Depth1_2),
1189 3 => Some(RXFTCFG::Depth3_4),
1190 4 => Some(RXFTCFG::Depth7_8),
1191 5 => Some(RXFTCFG::Full),
1192 _ => None,
1193 }
1194 }
1195 #[inline(always)]
1197 pub fn is_depth_1_8(&self) -> bool {
1198 *self == RXFTCFG::Depth1_8
1199 }
1200 #[inline(always)]
1202 pub fn is_depth_1_4(&self) -> bool {
1203 *self == RXFTCFG::Depth1_4
1204 }
1205 #[inline(always)]
1207 pub fn is_depth_1_2(&self) -> bool {
1208 *self == RXFTCFG::Depth1_2
1209 }
1210 #[inline(always)]
1212 pub fn is_depth_3_4(&self) -> bool {
1213 *self == RXFTCFG::Depth3_4
1214 }
1215 #[inline(always)]
1217 pub fn is_depth_7_8(&self) -> bool {
1218 *self == RXFTCFG::Depth7_8
1219 }
1220 #[inline(always)]
1222 pub fn is_full(&self) -> bool {
1223 *self == RXFTCFG::Full
1224 }
1225}
1226pub type RXFTCFG_W<'a, REG> = crate::FieldWriter<'a, REG, 3, RXFTCFG>;
1228impl<'a, REG> RXFTCFG_W<'a, REG>
1229where
1230 REG: crate::Writable + crate::RegisterSpec,
1231 REG::Ux: From<u8>,
1232{
1233 #[inline(always)]
1235 pub fn depth_1_8(self) -> &'a mut crate::W<REG> {
1236 self.variant(RXFTCFG::Depth1_8)
1237 }
1238 #[inline(always)]
1240 pub fn depth_1_4(self) -> &'a mut crate::W<REG> {
1241 self.variant(RXFTCFG::Depth1_4)
1242 }
1243 #[inline(always)]
1245 pub fn depth_1_2(self) -> &'a mut crate::W<REG> {
1246 self.variant(RXFTCFG::Depth1_2)
1247 }
1248 #[inline(always)]
1250 pub fn depth_3_4(self) -> &'a mut crate::W<REG> {
1251 self.variant(RXFTCFG::Depth3_4)
1252 }
1253 #[inline(always)]
1255 pub fn depth_7_8(self) -> &'a mut crate::W<REG> {
1256 self.variant(RXFTCFG::Depth7_8)
1257 }
1258 #[inline(always)]
1260 pub fn full(self) -> &'a mut crate::W<REG> {
1261 self.variant(RXFTCFG::Full)
1262 }
1263}
1264#[cfg_attr(feature = "defmt", derive(defmt::Format))]
1268#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1269pub enum RXFTIE {
1270 Disabled = 0,
1272 Enabled = 1,
1274}
1275impl From<RXFTIE> for bool {
1276 #[inline(always)]
1277 fn from(variant: RXFTIE) -> Self {
1278 variant as u8 != 0
1279 }
1280}
1281pub type RXFTIE_R = crate::BitReader<RXFTIE>;
1283impl RXFTIE_R {
1284 #[inline(always)]
1286 pub const fn variant(&self) -> RXFTIE {
1287 match self.bits {
1288 false => RXFTIE::Disabled,
1289 true => RXFTIE::Enabled,
1290 }
1291 }
1292 #[inline(always)]
1294 pub fn is_disabled(&self) -> bool {
1295 *self == RXFTIE::Disabled
1296 }
1297 #[inline(always)]
1299 pub fn is_enabled(&self) -> bool {
1300 *self == RXFTIE::Enabled
1301 }
1302}
1303pub type RXFTIE_W<'a, REG> = crate::BitWriter<'a, REG, RXFTIE>;
1305impl<'a, REG> RXFTIE_W<'a, REG>
1306where
1307 REG: crate::Writable + crate::RegisterSpec,
1308{
1309 #[inline(always)]
1311 pub fn disabled(self) -> &'a mut crate::W<REG> {
1312 self.variant(RXFTIE::Disabled)
1313 }
1314 #[inline(always)]
1316 pub fn enabled(self) -> &'a mut crate::W<REG> {
1317 self.variant(RXFTIE::Enabled)
1318 }
1319}
1320#[cfg_attr(feature = "defmt", derive(defmt::Format))]
1324#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1325#[repr(u8)]
1326pub enum TXFTCFG {
1327 Depth1_8 = 0,
1329 Depth1_4 = 1,
1331 Depth1_2 = 2,
1333 Depth3_4 = 3,
1335 Depth7_8 = 4,
1337 Empty = 5,
1339}
1340impl From<TXFTCFG> for u8 {
1341 #[inline(always)]
1342 fn from(variant: TXFTCFG) -> Self {
1343 variant as _
1344 }
1345}
1346impl crate::FieldSpec for TXFTCFG {
1347 type Ux = u8;
1348}
1349impl crate::IsEnum for TXFTCFG {}
1350pub type TXFTCFG_R = crate::FieldReader<TXFTCFG>;
1352impl TXFTCFG_R {
1353 #[inline(always)]
1355 pub const fn variant(&self) -> Option<TXFTCFG> {
1356 match self.bits {
1357 0 => Some(TXFTCFG::Depth1_8),
1358 1 => Some(TXFTCFG::Depth1_4),
1359 2 => Some(TXFTCFG::Depth1_2),
1360 3 => Some(TXFTCFG::Depth3_4),
1361 4 => Some(TXFTCFG::Depth7_8),
1362 5 => Some(TXFTCFG::Empty),
1363 _ => None,
1364 }
1365 }
1366 #[inline(always)]
1368 pub fn is_depth_1_8(&self) -> bool {
1369 *self == TXFTCFG::Depth1_8
1370 }
1371 #[inline(always)]
1373 pub fn is_depth_1_4(&self) -> bool {
1374 *self == TXFTCFG::Depth1_4
1375 }
1376 #[inline(always)]
1378 pub fn is_depth_1_2(&self) -> bool {
1379 *self == TXFTCFG::Depth1_2
1380 }
1381 #[inline(always)]
1383 pub fn is_depth_3_4(&self) -> bool {
1384 *self == TXFTCFG::Depth3_4
1385 }
1386 #[inline(always)]
1388 pub fn is_depth_7_8(&self) -> bool {
1389 *self == TXFTCFG::Depth7_8
1390 }
1391 #[inline(always)]
1393 pub fn is_empty(&self) -> bool {
1394 *self == TXFTCFG::Empty
1395 }
1396}
1397pub type TXFTCFG_W<'a, REG> = crate::FieldWriter<'a, REG, 3, TXFTCFG>;
1399impl<'a, REG> TXFTCFG_W<'a, REG>
1400where
1401 REG: crate::Writable + crate::RegisterSpec,
1402 REG::Ux: From<u8>,
1403{
1404 #[inline(always)]
1406 pub fn depth_1_8(self) -> &'a mut crate::W<REG> {
1407 self.variant(TXFTCFG::Depth1_8)
1408 }
1409 #[inline(always)]
1411 pub fn depth_1_4(self) -> &'a mut crate::W<REG> {
1412 self.variant(TXFTCFG::Depth1_4)
1413 }
1414 #[inline(always)]
1416 pub fn depth_1_2(self) -> &'a mut crate::W<REG> {
1417 self.variant(TXFTCFG::Depth1_2)
1418 }
1419 #[inline(always)]
1421 pub fn depth_3_4(self) -> &'a mut crate::W<REG> {
1422 self.variant(TXFTCFG::Depth3_4)
1423 }
1424 #[inline(always)]
1426 pub fn depth_7_8(self) -> &'a mut crate::W<REG> {
1427 self.variant(TXFTCFG::Depth7_8)
1428 }
1429 #[inline(always)]
1431 pub fn empty(self) -> &'a mut crate::W<REG> {
1432 self.variant(TXFTCFG::Empty)
1433 }
1434}
1435impl R {
1436 #[inline(always)]
1438 pub fn eie(&self) -> EIE_R {
1439 EIE_R::new((self.bits & 1) != 0)
1440 }
1441 #[inline(always)]
1443 pub fn iren(&self) -> IREN_R {
1444 IREN_R::new(((self.bits >> 1) & 1) != 0)
1445 }
1446 #[inline(always)]
1448 pub fn irlp(&self) -> IRLP_R {
1449 IRLP_R::new(((self.bits >> 2) & 1) != 0)
1450 }
1451 #[inline(always)]
1453 pub fn hdsel(&self) -> HDSEL_R {
1454 HDSEL_R::new(((self.bits >> 3) & 1) != 0)
1455 }
1456 #[inline(always)]
1458 pub fn nack(&self) -> NACK_R {
1459 NACK_R::new(((self.bits >> 4) & 1) != 0)
1460 }
1461 #[inline(always)]
1463 pub fn scen(&self) -> SCEN_R {
1464 SCEN_R::new(((self.bits >> 5) & 1) != 0)
1465 }
1466 #[inline(always)]
1468 pub fn dmar(&self) -> DMAR_R {
1469 DMAR_R::new(((self.bits >> 6) & 1) != 0)
1470 }
1471 #[inline(always)]
1473 pub fn dmat(&self) -> DMAT_R {
1474 DMAT_R::new(((self.bits >> 7) & 1) != 0)
1475 }
1476 #[inline(always)]
1478 pub fn rtse(&self) -> RTSE_R {
1479 RTSE_R::new(((self.bits >> 8) & 1) != 0)
1480 }
1481 #[inline(always)]
1483 pub fn ctse(&self) -> CTSE_R {
1484 CTSE_R::new(((self.bits >> 9) & 1) != 0)
1485 }
1486 #[inline(always)]
1488 pub fn ctsie(&self) -> CTSIE_R {
1489 CTSIE_R::new(((self.bits >> 10) & 1) != 0)
1490 }
1491 #[inline(always)]
1493 pub fn onebit(&self) -> ONEBIT_R {
1494 ONEBIT_R::new(((self.bits >> 11) & 1) != 0)
1495 }
1496 #[inline(always)]
1498 pub fn ovrdis(&self) -> OVRDIS_R {
1499 OVRDIS_R::new(((self.bits >> 12) & 1) != 0)
1500 }
1501 #[inline(always)]
1503 pub fn ddre(&self) -> DDRE_R {
1504 DDRE_R::new(((self.bits >> 13) & 1) != 0)
1505 }
1506 #[inline(always)]
1508 pub fn dem(&self) -> DEM_R {
1509 DEM_R::new(((self.bits >> 14) & 1) != 0)
1510 }
1511 #[inline(always)]
1513 pub fn dep(&self) -> DEP_R {
1514 DEP_R::new(((self.bits >> 15) & 1) != 0)
1515 }
1516 #[inline(always)]
1518 pub fn scarcnt(&self) -> SCARCNT_R {
1519 SCARCNT_R::new(((self.bits >> 17) & 7) as u8)
1520 }
1521 #[inline(always)]
1523 pub fn wus(&self) -> WUS_R {
1524 WUS_R::new(((self.bits >> 20) & 3) as u8)
1525 }
1526 #[inline(always)]
1528 pub fn wufie(&self) -> WUFIE_R {
1529 WUFIE_R::new(((self.bits >> 22) & 1) != 0)
1530 }
1531 #[inline(always)]
1533 pub fn txftie(&self) -> TXFTIE_R {
1534 TXFTIE_R::new(((self.bits >> 23) & 1) != 0)
1535 }
1536 #[inline(always)]
1538 pub fn tcbgtie(&self) -> TCBGTIE_R {
1539 TCBGTIE_R::new(((self.bits >> 24) & 1) != 0)
1540 }
1541 #[inline(always)]
1543 pub fn rxftcfg(&self) -> RXFTCFG_R {
1544 RXFTCFG_R::new(((self.bits >> 25) & 7) as u8)
1545 }
1546 #[inline(always)]
1548 pub fn rxftie(&self) -> RXFTIE_R {
1549 RXFTIE_R::new(((self.bits >> 28) & 1) != 0)
1550 }
1551 #[inline(always)]
1553 pub fn txftcfg(&self) -> TXFTCFG_R {
1554 TXFTCFG_R::new(((self.bits >> 29) & 7) as u8)
1555 }
1556}
1557impl core::fmt::Debug for R {
1558 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1559 f.debug_struct("CR3")
1560 .field("txftcfg", &self.txftcfg())
1561 .field("rxftie", &self.rxftie())
1562 .field("rxftcfg", &self.rxftcfg())
1563 .field("tcbgtie", &self.tcbgtie())
1564 .field("txftie", &self.txftie())
1565 .field("wufie", &self.wufie())
1566 .field("wus", &self.wus())
1567 .field("scarcnt", &self.scarcnt())
1568 .field("dep", &self.dep())
1569 .field("dem", &self.dem())
1570 .field("ddre", &self.ddre())
1571 .field("ovrdis", &self.ovrdis())
1572 .field("onebit", &self.onebit())
1573 .field("ctsie", &self.ctsie())
1574 .field("ctse", &self.ctse())
1575 .field("rtse", &self.rtse())
1576 .field("dmat", &self.dmat())
1577 .field("dmar", &self.dmar())
1578 .field("scen", &self.scen())
1579 .field("nack", &self.nack())
1580 .field("hdsel", &self.hdsel())
1581 .field("irlp", &self.irlp())
1582 .field("iren", &self.iren())
1583 .field("eie", &self.eie())
1584 .finish()
1585 }
1586}
1587impl W {
1588 #[inline(always)]
1590 pub fn eie(&mut self) -> EIE_W<CR3rs> {
1591 EIE_W::new(self, 0)
1592 }
1593 #[inline(always)]
1595 pub fn iren(&mut self) -> IREN_W<CR3rs> {
1596 IREN_W::new(self, 1)
1597 }
1598 #[inline(always)]
1600 pub fn irlp(&mut self) -> IRLP_W<CR3rs> {
1601 IRLP_W::new(self, 2)
1602 }
1603 #[inline(always)]
1605 pub fn hdsel(&mut self) -> HDSEL_W<CR3rs> {
1606 HDSEL_W::new(self, 3)
1607 }
1608 #[inline(always)]
1610 pub fn nack(&mut self) -> NACK_W<CR3rs> {
1611 NACK_W::new(self, 4)
1612 }
1613 #[inline(always)]
1615 pub fn scen(&mut self) -> SCEN_W<CR3rs> {
1616 SCEN_W::new(self, 5)
1617 }
1618 #[inline(always)]
1620 pub fn dmar(&mut self) -> DMAR_W<CR3rs> {
1621 DMAR_W::new(self, 6)
1622 }
1623 #[inline(always)]
1625 pub fn dmat(&mut self) -> DMAT_W<CR3rs> {
1626 DMAT_W::new(self, 7)
1627 }
1628 #[inline(always)]
1630 pub fn rtse(&mut self) -> RTSE_W<CR3rs> {
1631 RTSE_W::new(self, 8)
1632 }
1633 #[inline(always)]
1635 pub fn ctse(&mut self) -> CTSE_W<CR3rs> {
1636 CTSE_W::new(self, 9)
1637 }
1638 #[inline(always)]
1640 pub fn ctsie(&mut self) -> CTSIE_W<CR3rs> {
1641 CTSIE_W::new(self, 10)
1642 }
1643 #[inline(always)]
1645 pub fn onebit(&mut self) -> ONEBIT_W<CR3rs> {
1646 ONEBIT_W::new(self, 11)
1647 }
1648 #[inline(always)]
1650 pub fn ovrdis(&mut self) -> OVRDIS_W<CR3rs> {
1651 OVRDIS_W::new(self, 12)
1652 }
1653 #[inline(always)]
1655 pub fn ddre(&mut self) -> DDRE_W<CR3rs> {
1656 DDRE_W::new(self, 13)
1657 }
1658 #[inline(always)]
1660 pub fn dem(&mut self) -> DEM_W<CR3rs> {
1661 DEM_W::new(self, 14)
1662 }
1663 #[inline(always)]
1665 pub fn dep(&mut self) -> DEP_W<CR3rs> {
1666 DEP_W::new(self, 15)
1667 }
1668 #[inline(always)]
1670 pub fn scarcnt(&mut self) -> SCARCNT_W<CR3rs> {
1671 SCARCNT_W::new(self, 17)
1672 }
1673 #[inline(always)]
1675 pub fn wus(&mut self) -> WUS_W<CR3rs> {
1676 WUS_W::new(self, 20)
1677 }
1678 #[inline(always)]
1680 pub fn wufie(&mut self) -> WUFIE_W<CR3rs> {
1681 WUFIE_W::new(self, 22)
1682 }
1683 #[inline(always)]
1685 pub fn txftie(&mut self) -> TXFTIE_W<CR3rs> {
1686 TXFTIE_W::new(self, 23)
1687 }
1688 #[inline(always)]
1690 pub fn tcbgtie(&mut self) -> TCBGTIE_W<CR3rs> {
1691 TCBGTIE_W::new(self, 24)
1692 }
1693 #[inline(always)]
1695 pub fn rxftcfg(&mut self) -> RXFTCFG_W<CR3rs> {
1696 RXFTCFG_W::new(self, 25)
1697 }
1698 #[inline(always)]
1700 pub fn rxftie(&mut self) -> RXFTIE_W<CR3rs> {
1701 RXFTIE_W::new(self, 28)
1702 }
1703 #[inline(always)]
1705 pub fn txftcfg(&mut self) -> TXFTCFG_W<CR3rs> {
1706 TXFTCFG_W::new(self, 29)
1707 }
1708}
1709pub struct CR3rs;
1715impl crate::RegisterSpec for CR3rs {
1716 type Ux = u32;
1717}
1718impl crate::Readable for CR3rs {}
1720impl crate::Writable for CR3rs {
1722 type Safety = crate::Unsafe;
1723}
1724impl crate::Resettable for CR3rs {}