1pub type R = crate::R<CFGR1rs>;
3pub type W = crate::W<CFGR1rs>;
5#[cfg_attr(feature = "defmt", derive(defmt::Format))]
9#[derive(Clone, Copy, Debug, PartialEq, Eq)]
10pub enum DMAEN {
11 Disabled = 0,
13 Enabled = 1,
15}
16impl From<DMAEN> for bool {
17 #[inline(always)]
18 fn from(variant: DMAEN) -> Self {
19 variant as u8 != 0
20 }
21}
22pub type DMAEN_R = crate::BitReader<DMAEN>;
24impl DMAEN_R {
25 #[inline(always)]
27 pub const fn variant(&self) -> DMAEN {
28 match self.bits {
29 false => DMAEN::Disabled,
30 true => DMAEN::Enabled,
31 }
32 }
33 #[inline(always)]
35 pub fn is_disabled(&self) -> bool {
36 *self == DMAEN::Disabled
37 }
38 #[inline(always)]
40 pub fn is_enabled(&self) -> bool {
41 *self == DMAEN::Enabled
42 }
43}
44pub type DMAEN_W<'a, REG> = crate::BitWriter<'a, REG, DMAEN>;
46impl<'a, REG> DMAEN_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(DMAEN::Disabled)
54 }
55 #[inline(always)]
57 pub fn enabled(self) -> &'a mut crate::W<REG> {
58 self.variant(DMAEN::Enabled)
59 }
60}
61#[cfg_attr(feature = "defmt", derive(defmt::Format))]
65#[derive(Clone, Copy, Debug, PartialEq, Eq)]
66pub enum DMACFG {
67 OneShot = 0,
69 Circular = 1,
71}
72impl From<DMACFG> for bool {
73 #[inline(always)]
74 fn from(variant: DMACFG) -> Self {
75 variant as u8 != 0
76 }
77}
78pub type DMACFG_R = crate::BitReader<DMACFG>;
80impl DMACFG_R {
81 #[inline(always)]
83 pub const fn variant(&self) -> DMACFG {
84 match self.bits {
85 false => DMACFG::OneShot,
86 true => DMACFG::Circular,
87 }
88 }
89 #[inline(always)]
91 pub fn is_one_shot(&self) -> bool {
92 *self == DMACFG::OneShot
93 }
94 #[inline(always)]
96 pub fn is_circular(&self) -> bool {
97 *self == DMACFG::Circular
98 }
99}
100pub type DMACFG_W<'a, REG> = crate::BitWriter<'a, REG, DMACFG>;
102impl<'a, REG> DMACFG_W<'a, REG>
103where
104 REG: crate::Writable + crate::RegisterSpec,
105{
106 #[inline(always)]
108 pub fn one_shot(self) -> &'a mut crate::W<REG> {
109 self.variant(DMACFG::OneShot)
110 }
111 #[inline(always)]
113 pub fn circular(self) -> &'a mut crate::W<REG> {
114 self.variant(DMACFG::Circular)
115 }
116}
117#[cfg_attr(feature = "defmt", derive(defmt::Format))]
121#[derive(Clone, Copy, Debug, PartialEq, Eq)]
122pub enum SCANDIR {
123 Upward = 0,
125 Backward = 1,
127}
128impl From<SCANDIR> for bool {
129 #[inline(always)]
130 fn from(variant: SCANDIR) -> Self {
131 variant as u8 != 0
132 }
133}
134pub type SCANDIR_R = crate::BitReader<SCANDIR>;
136impl SCANDIR_R {
137 #[inline(always)]
139 pub const fn variant(&self) -> SCANDIR {
140 match self.bits {
141 false => SCANDIR::Upward,
142 true => SCANDIR::Backward,
143 }
144 }
145 #[inline(always)]
147 pub fn is_upward(&self) -> bool {
148 *self == SCANDIR::Upward
149 }
150 #[inline(always)]
152 pub fn is_backward(&self) -> bool {
153 *self == SCANDIR::Backward
154 }
155}
156pub type SCANDIR_W<'a, REG> = crate::BitWriter<'a, REG, SCANDIR>;
158impl<'a, REG> SCANDIR_W<'a, REG>
159where
160 REG: crate::Writable + crate::RegisterSpec,
161{
162 #[inline(always)]
164 pub fn upward(self) -> &'a mut crate::W<REG> {
165 self.variant(SCANDIR::Upward)
166 }
167 #[inline(always)]
169 pub fn backward(self) -> &'a mut crate::W<REG> {
170 self.variant(SCANDIR::Backward)
171 }
172}
173#[cfg_attr(feature = "defmt", derive(defmt::Format))]
177#[derive(Clone, Copy, Debug, PartialEq, Eq)]
178#[repr(u8)]
179pub enum RES {
180 TwelveBit = 0,
182 TenBit = 1,
184 EightBit = 2,
186 SixBit = 3,
188}
189impl From<RES> for u8 {
190 #[inline(always)]
191 fn from(variant: RES) -> Self {
192 variant as _
193 }
194}
195impl crate::FieldSpec for RES {
196 type Ux = u8;
197}
198impl crate::IsEnum for RES {}
199pub type RES_R = crate::FieldReader<RES>;
201impl RES_R {
202 #[inline(always)]
204 pub const fn variant(&self) -> RES {
205 match self.bits {
206 0 => RES::TwelveBit,
207 1 => RES::TenBit,
208 2 => RES::EightBit,
209 3 => RES::SixBit,
210 _ => unreachable!(),
211 }
212 }
213 #[inline(always)]
215 pub fn is_twelve_bit(&self) -> bool {
216 *self == RES::TwelveBit
217 }
218 #[inline(always)]
220 pub fn is_ten_bit(&self) -> bool {
221 *self == RES::TenBit
222 }
223 #[inline(always)]
225 pub fn is_eight_bit(&self) -> bool {
226 *self == RES::EightBit
227 }
228 #[inline(always)]
230 pub fn is_six_bit(&self) -> bool {
231 *self == RES::SixBit
232 }
233}
234pub type RES_W<'a, REG> = crate::FieldWriter<'a, REG, 2, RES, crate::Safe>;
236impl<'a, REG> RES_W<'a, REG>
237where
238 REG: crate::Writable + crate::RegisterSpec,
239 REG::Ux: From<u8>,
240{
241 #[inline(always)]
243 pub fn twelve_bit(self) -> &'a mut crate::W<REG> {
244 self.variant(RES::TwelveBit)
245 }
246 #[inline(always)]
248 pub fn ten_bit(self) -> &'a mut crate::W<REG> {
249 self.variant(RES::TenBit)
250 }
251 #[inline(always)]
253 pub fn eight_bit(self) -> &'a mut crate::W<REG> {
254 self.variant(RES::EightBit)
255 }
256 #[inline(always)]
258 pub fn six_bit(self) -> &'a mut crate::W<REG> {
259 self.variant(RES::SixBit)
260 }
261}
262#[cfg_attr(feature = "defmt", derive(defmt::Format))]
266#[derive(Clone, Copy, Debug, PartialEq, Eq)]
267pub enum ALIGN {
268 Right = 0,
270 Left = 1,
272}
273impl From<ALIGN> for bool {
274 #[inline(always)]
275 fn from(variant: ALIGN) -> Self {
276 variant as u8 != 0
277 }
278}
279pub type ALIGN_R = crate::BitReader<ALIGN>;
281impl ALIGN_R {
282 #[inline(always)]
284 pub const fn variant(&self) -> ALIGN {
285 match self.bits {
286 false => ALIGN::Right,
287 true => ALIGN::Left,
288 }
289 }
290 #[inline(always)]
292 pub fn is_right(&self) -> bool {
293 *self == ALIGN::Right
294 }
295 #[inline(always)]
297 pub fn is_left(&self) -> bool {
298 *self == ALIGN::Left
299 }
300}
301pub type ALIGN_W<'a, REG> = crate::BitWriter<'a, REG, ALIGN>;
303impl<'a, REG> ALIGN_W<'a, REG>
304where
305 REG: crate::Writable + crate::RegisterSpec,
306{
307 #[inline(always)]
309 pub fn right(self) -> &'a mut crate::W<REG> {
310 self.variant(ALIGN::Right)
311 }
312 #[inline(always)]
314 pub fn left(self) -> &'a mut crate::W<REG> {
315 self.variant(ALIGN::Left)
316 }
317}
318#[cfg_attr(feature = "defmt", derive(defmt::Format))]
322#[derive(Clone, Copy, Debug, PartialEq, Eq)]
323#[repr(u8)]
324pub enum EXTSEL {
325 Tim1Trgo = 0,
327 Tim1Cc4 = 1,
329 Tim3Trgo = 3,
331 Tim15Trgo = 4,
333}
334impl From<EXTSEL> for u8 {
335 #[inline(always)]
336 fn from(variant: EXTSEL) -> Self {
337 variant as _
338 }
339}
340impl crate::FieldSpec for EXTSEL {
341 type Ux = u8;
342}
343impl crate::IsEnum for EXTSEL {}
344pub type EXTSEL_R = crate::FieldReader<EXTSEL>;
346impl EXTSEL_R {
347 #[inline(always)]
349 pub const fn variant(&self) -> Option<EXTSEL> {
350 match self.bits {
351 0 => Some(EXTSEL::Tim1Trgo),
352 1 => Some(EXTSEL::Tim1Cc4),
353 3 => Some(EXTSEL::Tim3Trgo),
354 4 => Some(EXTSEL::Tim15Trgo),
355 _ => None,
356 }
357 }
358 #[inline(always)]
360 pub fn is_tim1_trgo(&self) -> bool {
361 *self == EXTSEL::Tim1Trgo
362 }
363 #[inline(always)]
365 pub fn is_tim1_cc4(&self) -> bool {
366 *self == EXTSEL::Tim1Cc4
367 }
368 #[inline(always)]
370 pub fn is_tim3_trgo(&self) -> bool {
371 *self == EXTSEL::Tim3Trgo
372 }
373 #[inline(always)]
375 pub fn is_tim15_trgo(&self) -> bool {
376 *self == EXTSEL::Tim15Trgo
377 }
378}
379pub type EXTSEL_W<'a, REG> = crate::FieldWriter<'a, REG, 3, EXTSEL>;
381impl<'a, REG> EXTSEL_W<'a, REG>
382where
383 REG: crate::Writable + crate::RegisterSpec,
384 REG::Ux: From<u8>,
385{
386 #[inline(always)]
388 pub fn tim1_trgo(self) -> &'a mut crate::W<REG> {
389 self.variant(EXTSEL::Tim1Trgo)
390 }
391 #[inline(always)]
393 pub fn tim1_cc4(self) -> &'a mut crate::W<REG> {
394 self.variant(EXTSEL::Tim1Cc4)
395 }
396 #[inline(always)]
398 pub fn tim3_trgo(self) -> &'a mut crate::W<REG> {
399 self.variant(EXTSEL::Tim3Trgo)
400 }
401 #[inline(always)]
403 pub fn tim15_trgo(self) -> &'a mut crate::W<REG> {
404 self.variant(EXTSEL::Tim15Trgo)
405 }
406}
407#[cfg_attr(feature = "defmt", derive(defmt::Format))]
411#[derive(Clone, Copy, Debug, PartialEq, Eq)]
412#[repr(u8)]
413pub enum EXTEN {
414 Disabled = 0,
416 RisingEdge = 1,
418 FallingEdge = 2,
420 BothEdges = 3,
422}
423impl From<EXTEN> for u8 {
424 #[inline(always)]
425 fn from(variant: EXTEN) -> Self {
426 variant as _
427 }
428}
429impl crate::FieldSpec for EXTEN {
430 type Ux = u8;
431}
432impl crate::IsEnum for EXTEN {}
433pub type EXTEN_R = crate::FieldReader<EXTEN>;
435impl EXTEN_R {
436 #[inline(always)]
438 pub const fn variant(&self) -> EXTEN {
439 match self.bits {
440 0 => EXTEN::Disabled,
441 1 => EXTEN::RisingEdge,
442 2 => EXTEN::FallingEdge,
443 3 => EXTEN::BothEdges,
444 _ => unreachable!(),
445 }
446 }
447 #[inline(always)]
449 pub fn is_disabled(&self) -> bool {
450 *self == EXTEN::Disabled
451 }
452 #[inline(always)]
454 pub fn is_rising_edge(&self) -> bool {
455 *self == EXTEN::RisingEdge
456 }
457 #[inline(always)]
459 pub fn is_falling_edge(&self) -> bool {
460 *self == EXTEN::FallingEdge
461 }
462 #[inline(always)]
464 pub fn is_both_edges(&self) -> bool {
465 *self == EXTEN::BothEdges
466 }
467}
468pub type EXTEN_W<'a, REG> = crate::FieldWriter<'a, REG, 2, EXTEN, crate::Safe>;
470impl<'a, REG> EXTEN_W<'a, REG>
471where
472 REG: crate::Writable + crate::RegisterSpec,
473 REG::Ux: From<u8>,
474{
475 #[inline(always)]
477 pub fn disabled(self) -> &'a mut crate::W<REG> {
478 self.variant(EXTEN::Disabled)
479 }
480 #[inline(always)]
482 pub fn rising_edge(self) -> &'a mut crate::W<REG> {
483 self.variant(EXTEN::RisingEdge)
484 }
485 #[inline(always)]
487 pub fn falling_edge(self) -> &'a mut crate::W<REG> {
488 self.variant(EXTEN::FallingEdge)
489 }
490 #[inline(always)]
492 pub fn both_edges(self) -> &'a mut crate::W<REG> {
493 self.variant(EXTEN::BothEdges)
494 }
495}
496#[cfg_attr(feature = "defmt", derive(defmt::Format))]
500#[derive(Clone, Copy, Debug, PartialEq, Eq)]
501pub enum OVRMOD {
502 Preserved = 0,
504 Overwritten = 1,
506}
507impl From<OVRMOD> for bool {
508 #[inline(always)]
509 fn from(variant: OVRMOD) -> Self {
510 variant as u8 != 0
511 }
512}
513pub type OVRMOD_R = crate::BitReader<OVRMOD>;
515impl OVRMOD_R {
516 #[inline(always)]
518 pub const fn variant(&self) -> OVRMOD {
519 match self.bits {
520 false => OVRMOD::Preserved,
521 true => OVRMOD::Overwritten,
522 }
523 }
524 #[inline(always)]
526 pub fn is_preserved(&self) -> bool {
527 *self == OVRMOD::Preserved
528 }
529 #[inline(always)]
531 pub fn is_overwritten(&self) -> bool {
532 *self == OVRMOD::Overwritten
533 }
534}
535pub type OVRMOD_W<'a, REG> = crate::BitWriter<'a, REG, OVRMOD>;
537impl<'a, REG> OVRMOD_W<'a, REG>
538where
539 REG: crate::Writable + crate::RegisterSpec,
540{
541 #[inline(always)]
543 pub fn preserved(self) -> &'a mut crate::W<REG> {
544 self.variant(OVRMOD::Preserved)
545 }
546 #[inline(always)]
548 pub fn overwritten(self) -> &'a mut crate::W<REG> {
549 self.variant(OVRMOD::Overwritten)
550 }
551}
552#[cfg_attr(feature = "defmt", derive(defmt::Format))]
556#[derive(Clone, Copy, Debug, PartialEq, Eq)]
557pub enum CONT {
558 Single = 0,
560 Continuous = 1,
562}
563impl From<CONT> for bool {
564 #[inline(always)]
565 fn from(variant: CONT) -> Self {
566 variant as u8 != 0
567 }
568}
569pub type CONT_R = crate::BitReader<CONT>;
571impl CONT_R {
572 #[inline(always)]
574 pub const fn variant(&self) -> CONT {
575 match self.bits {
576 false => CONT::Single,
577 true => CONT::Continuous,
578 }
579 }
580 #[inline(always)]
582 pub fn is_single(&self) -> bool {
583 *self == CONT::Single
584 }
585 #[inline(always)]
587 pub fn is_continuous(&self) -> bool {
588 *self == CONT::Continuous
589 }
590}
591pub type CONT_W<'a, REG> = crate::BitWriter<'a, REG, CONT>;
593impl<'a, REG> CONT_W<'a, REG>
594where
595 REG: crate::Writable + crate::RegisterSpec,
596{
597 #[inline(always)]
599 pub fn single(self) -> &'a mut crate::W<REG> {
600 self.variant(CONT::Single)
601 }
602 #[inline(always)]
604 pub fn continuous(self) -> &'a mut crate::W<REG> {
605 self.variant(CONT::Continuous)
606 }
607}
608#[cfg_attr(feature = "defmt", derive(defmt::Format))]
612#[derive(Clone, Copy, Debug, PartialEq, Eq)]
613pub enum WAIT {
614 Disabled = 0,
616 Enabled = 1,
618}
619impl From<WAIT> for bool {
620 #[inline(always)]
621 fn from(variant: WAIT) -> Self {
622 variant as u8 != 0
623 }
624}
625pub type WAIT_R = crate::BitReader<WAIT>;
627impl WAIT_R {
628 #[inline(always)]
630 pub const fn variant(&self) -> WAIT {
631 match self.bits {
632 false => WAIT::Disabled,
633 true => WAIT::Enabled,
634 }
635 }
636 #[inline(always)]
638 pub fn is_disabled(&self) -> bool {
639 *self == WAIT::Disabled
640 }
641 #[inline(always)]
643 pub fn is_enabled(&self) -> bool {
644 *self == WAIT::Enabled
645 }
646}
647pub type WAIT_W<'a, REG> = crate::BitWriter<'a, REG, WAIT>;
649impl<'a, REG> WAIT_W<'a, REG>
650where
651 REG: crate::Writable + crate::RegisterSpec,
652{
653 #[inline(always)]
655 pub fn disabled(self) -> &'a mut crate::W<REG> {
656 self.variant(WAIT::Disabled)
657 }
658 #[inline(always)]
660 pub fn enabled(self) -> &'a mut crate::W<REG> {
661 self.variant(WAIT::Enabled)
662 }
663}
664#[cfg_attr(feature = "defmt", derive(defmt::Format))]
668#[derive(Clone, Copy, Debug, PartialEq, Eq)]
669pub enum AUTOFF {
670 Disabled = 0,
672 Enabled = 1,
674}
675impl From<AUTOFF> for bool {
676 #[inline(always)]
677 fn from(variant: AUTOFF) -> Self {
678 variant as u8 != 0
679 }
680}
681pub type AUTOFF_R = crate::BitReader<AUTOFF>;
683impl AUTOFF_R {
684 #[inline(always)]
686 pub const fn variant(&self) -> AUTOFF {
687 match self.bits {
688 false => AUTOFF::Disabled,
689 true => AUTOFF::Enabled,
690 }
691 }
692 #[inline(always)]
694 pub fn is_disabled(&self) -> bool {
695 *self == AUTOFF::Disabled
696 }
697 #[inline(always)]
699 pub fn is_enabled(&self) -> bool {
700 *self == AUTOFF::Enabled
701 }
702}
703pub type AUTOFF_W<'a, REG> = crate::BitWriter<'a, REG, AUTOFF>;
705impl<'a, REG> AUTOFF_W<'a, REG>
706where
707 REG: crate::Writable + crate::RegisterSpec,
708{
709 #[inline(always)]
711 pub fn disabled(self) -> &'a mut crate::W<REG> {
712 self.variant(AUTOFF::Disabled)
713 }
714 #[inline(always)]
716 pub fn enabled(self) -> &'a mut crate::W<REG> {
717 self.variant(AUTOFF::Enabled)
718 }
719}
720#[cfg_attr(feature = "defmt", derive(defmt::Format))]
724#[derive(Clone, Copy, Debug, PartialEq, Eq)]
725pub enum DISCEN {
726 Disabled = 0,
728 Enabled = 1,
730}
731impl From<DISCEN> for bool {
732 #[inline(always)]
733 fn from(variant: DISCEN) -> Self {
734 variant as u8 != 0
735 }
736}
737pub type DISCEN_R = crate::BitReader<DISCEN>;
739impl DISCEN_R {
740 #[inline(always)]
742 pub const fn variant(&self) -> DISCEN {
743 match self.bits {
744 false => DISCEN::Disabled,
745 true => DISCEN::Enabled,
746 }
747 }
748 #[inline(always)]
750 pub fn is_disabled(&self) -> bool {
751 *self == DISCEN::Disabled
752 }
753 #[inline(always)]
755 pub fn is_enabled(&self) -> bool {
756 *self == DISCEN::Enabled
757 }
758}
759pub type DISCEN_W<'a, REG> = crate::BitWriter<'a, REG, DISCEN>;
761impl<'a, REG> DISCEN_W<'a, REG>
762where
763 REG: crate::Writable + crate::RegisterSpec,
764{
765 #[inline(always)]
767 pub fn disabled(self) -> &'a mut crate::W<REG> {
768 self.variant(DISCEN::Disabled)
769 }
770 #[inline(always)]
772 pub fn enabled(self) -> &'a mut crate::W<REG> {
773 self.variant(DISCEN::Enabled)
774 }
775}
776#[cfg_attr(feature = "defmt", derive(defmt::Format))]
780#[derive(Clone, Copy, Debug, PartialEq, Eq)]
781pub enum AWDSGL {
782 AllChannels = 0,
784 SingleChannel = 1,
786}
787impl From<AWDSGL> for bool {
788 #[inline(always)]
789 fn from(variant: AWDSGL) -> Self {
790 variant as u8 != 0
791 }
792}
793pub type AWDSGL_R = crate::BitReader<AWDSGL>;
795impl AWDSGL_R {
796 #[inline(always)]
798 pub const fn variant(&self) -> AWDSGL {
799 match self.bits {
800 false => AWDSGL::AllChannels,
801 true => AWDSGL::SingleChannel,
802 }
803 }
804 #[inline(always)]
806 pub fn is_all_channels(&self) -> bool {
807 *self == AWDSGL::AllChannels
808 }
809 #[inline(always)]
811 pub fn is_single_channel(&self) -> bool {
812 *self == AWDSGL::SingleChannel
813 }
814}
815pub type AWDSGL_W<'a, REG> = crate::BitWriter<'a, REG, AWDSGL>;
817impl<'a, REG> AWDSGL_W<'a, REG>
818where
819 REG: crate::Writable + crate::RegisterSpec,
820{
821 #[inline(always)]
823 pub fn all_channels(self) -> &'a mut crate::W<REG> {
824 self.variant(AWDSGL::AllChannels)
825 }
826 #[inline(always)]
828 pub fn single_channel(self) -> &'a mut crate::W<REG> {
829 self.variant(AWDSGL::SingleChannel)
830 }
831}
832#[cfg_attr(feature = "defmt", derive(defmt::Format))]
836#[derive(Clone, Copy, Debug, PartialEq, Eq)]
837pub enum AWDEN {
838 Disabled = 0,
840 Enabled = 1,
842}
843impl From<AWDEN> for bool {
844 #[inline(always)]
845 fn from(variant: AWDEN) -> Self {
846 variant as u8 != 0
847 }
848}
849pub type AWDEN_R = crate::BitReader<AWDEN>;
851impl AWDEN_R {
852 #[inline(always)]
854 pub const fn variant(&self) -> AWDEN {
855 match self.bits {
856 false => AWDEN::Disabled,
857 true => AWDEN::Enabled,
858 }
859 }
860 #[inline(always)]
862 pub fn is_disabled(&self) -> bool {
863 *self == AWDEN::Disabled
864 }
865 #[inline(always)]
867 pub fn is_enabled(&self) -> bool {
868 *self == AWDEN::Enabled
869 }
870}
871pub type AWDEN_W<'a, REG> = crate::BitWriter<'a, REG, AWDEN>;
873impl<'a, REG> AWDEN_W<'a, REG>
874where
875 REG: crate::Writable + crate::RegisterSpec,
876{
877 #[inline(always)]
879 pub fn disabled(self) -> &'a mut crate::W<REG> {
880 self.variant(AWDEN::Disabled)
881 }
882 #[inline(always)]
884 pub fn enabled(self) -> &'a mut crate::W<REG> {
885 self.variant(AWDEN::Enabled)
886 }
887}
888pub type AWDCH_R = crate::FieldReader;
890pub type AWDCH_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
892impl R {
893 #[inline(always)]
895 pub fn dmaen(&self) -> DMAEN_R {
896 DMAEN_R::new((self.bits & 1) != 0)
897 }
898 #[inline(always)]
900 pub fn dmacfg(&self) -> DMACFG_R {
901 DMACFG_R::new(((self.bits >> 1) & 1) != 0)
902 }
903 #[inline(always)]
905 pub fn scandir(&self) -> SCANDIR_R {
906 SCANDIR_R::new(((self.bits >> 2) & 1) != 0)
907 }
908 #[inline(always)]
910 pub fn res(&self) -> RES_R {
911 RES_R::new(((self.bits >> 3) & 3) as u8)
912 }
913 #[inline(always)]
915 pub fn align(&self) -> ALIGN_R {
916 ALIGN_R::new(((self.bits >> 5) & 1) != 0)
917 }
918 #[inline(always)]
920 pub fn extsel(&self) -> EXTSEL_R {
921 EXTSEL_R::new(((self.bits >> 6) & 7) as u8)
922 }
923 #[inline(always)]
925 pub fn exten(&self) -> EXTEN_R {
926 EXTEN_R::new(((self.bits >> 10) & 3) as u8)
927 }
928 #[inline(always)]
930 pub fn ovrmod(&self) -> OVRMOD_R {
931 OVRMOD_R::new(((self.bits >> 12) & 1) != 0)
932 }
933 #[inline(always)]
935 pub fn cont(&self) -> CONT_R {
936 CONT_R::new(((self.bits >> 13) & 1) != 0)
937 }
938 #[inline(always)]
940 pub fn wait(&self) -> WAIT_R {
941 WAIT_R::new(((self.bits >> 14) & 1) != 0)
942 }
943 #[inline(always)]
945 pub fn autoff(&self) -> AUTOFF_R {
946 AUTOFF_R::new(((self.bits >> 15) & 1) != 0)
947 }
948 #[inline(always)]
950 pub fn discen(&self) -> DISCEN_R {
951 DISCEN_R::new(((self.bits >> 16) & 1) != 0)
952 }
953 #[inline(always)]
955 pub fn awdsgl(&self) -> AWDSGL_R {
956 AWDSGL_R::new(((self.bits >> 22) & 1) != 0)
957 }
958 #[inline(always)]
960 pub fn awden(&self) -> AWDEN_R {
961 AWDEN_R::new(((self.bits >> 23) & 1) != 0)
962 }
963 #[inline(always)]
965 pub fn awdch(&self) -> AWDCH_R {
966 AWDCH_R::new(((self.bits >> 26) & 0x1f) as u8)
967 }
968}
969impl core::fmt::Debug for R {
970 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
971 f.debug_struct("CFGR1")
972 .field("awdch", &self.awdch())
973 .field("awden", &self.awden())
974 .field("awdsgl", &self.awdsgl())
975 .field("discen", &self.discen())
976 .field("autoff", &self.autoff())
977 .field("wait", &self.wait())
978 .field("cont", &self.cont())
979 .field("ovrmod", &self.ovrmod())
980 .field("exten", &self.exten())
981 .field("extsel", &self.extsel())
982 .field("align", &self.align())
983 .field("res", &self.res())
984 .field("scandir", &self.scandir())
985 .field("dmacfg", &self.dmacfg())
986 .field("dmaen", &self.dmaen())
987 .finish()
988 }
989}
990impl W {
991 #[inline(always)]
993 pub fn dmaen(&mut self) -> DMAEN_W<CFGR1rs> {
994 DMAEN_W::new(self, 0)
995 }
996 #[inline(always)]
998 pub fn dmacfg(&mut self) -> DMACFG_W<CFGR1rs> {
999 DMACFG_W::new(self, 1)
1000 }
1001 #[inline(always)]
1003 pub fn scandir(&mut self) -> SCANDIR_W<CFGR1rs> {
1004 SCANDIR_W::new(self, 2)
1005 }
1006 #[inline(always)]
1008 pub fn res(&mut self) -> RES_W<CFGR1rs> {
1009 RES_W::new(self, 3)
1010 }
1011 #[inline(always)]
1013 pub fn align(&mut self) -> ALIGN_W<CFGR1rs> {
1014 ALIGN_W::new(self, 5)
1015 }
1016 #[inline(always)]
1018 pub fn extsel(&mut self) -> EXTSEL_W<CFGR1rs> {
1019 EXTSEL_W::new(self, 6)
1020 }
1021 #[inline(always)]
1023 pub fn exten(&mut self) -> EXTEN_W<CFGR1rs> {
1024 EXTEN_W::new(self, 10)
1025 }
1026 #[inline(always)]
1028 pub fn ovrmod(&mut self) -> OVRMOD_W<CFGR1rs> {
1029 OVRMOD_W::new(self, 12)
1030 }
1031 #[inline(always)]
1033 pub fn cont(&mut self) -> CONT_W<CFGR1rs> {
1034 CONT_W::new(self, 13)
1035 }
1036 #[inline(always)]
1038 pub fn wait(&mut self) -> WAIT_W<CFGR1rs> {
1039 WAIT_W::new(self, 14)
1040 }
1041 #[inline(always)]
1043 pub fn autoff(&mut self) -> AUTOFF_W<CFGR1rs> {
1044 AUTOFF_W::new(self, 15)
1045 }
1046 #[inline(always)]
1048 pub fn discen(&mut self) -> DISCEN_W<CFGR1rs> {
1049 DISCEN_W::new(self, 16)
1050 }
1051 #[inline(always)]
1053 pub fn awdsgl(&mut self) -> AWDSGL_W<CFGR1rs> {
1054 AWDSGL_W::new(self, 22)
1055 }
1056 #[inline(always)]
1058 pub fn awden(&mut self) -> AWDEN_W<CFGR1rs> {
1059 AWDEN_W::new(self, 23)
1060 }
1061 #[inline(always)]
1063 pub fn awdch(&mut self) -> AWDCH_W<CFGR1rs> {
1064 AWDCH_W::new(self, 26)
1065 }
1066}
1067pub struct CFGR1rs;
1073impl crate::RegisterSpec for CFGR1rs {
1074 type Ux = u32;
1075}
1076impl crate::Readable for CFGR1rs {}
1078impl crate::Writable for CFGR1rs {
1080 type Safety = crate::Unsafe;
1081}
1082impl crate::Resettable for CFGR1rs {}