stm32l4x2_pac/adc/
cfgr.rs

1#[doc = r" Value read from the register"]
2pub struct R {
3    bits: u32,
4}
5#[doc = r" Value to write to the register"]
6pub struct W {
7    bits: u32,
8}
9impl super::CFGR {
10    #[doc = r" Modifies the contents of the register"]
11    #[inline]
12    pub fn modify<F>(&self, f: F)
13    where
14        for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
15    {
16        let bits = self.register.get();
17        let r = R { bits: bits };
18        let mut w = W { bits: bits };
19        f(&r, &mut w);
20        self.register.set(w.bits);
21    }
22    #[doc = r" Reads the contents of the register"]
23    #[inline]
24    pub fn read(&self) -> R {
25        R {
26            bits: self.register.get(),
27        }
28    }
29    #[doc = r" Writes to the register"]
30    #[inline]
31    pub fn write<F>(&self, f: F)
32    where
33        F: FnOnce(&mut W) -> &mut W,
34    {
35        let mut w = W::reset_value();
36        f(&mut w);
37        self.register.set(w.bits);
38    }
39    #[doc = r" Writes the reset value to the register"]
40    #[inline]
41    pub fn reset(&self) {
42        self.write(|w| w)
43    }
44}
45#[doc = r" Value of the field"]
46pub struct AWDCH1CHR {
47    bits: u8,
48}
49impl AWDCH1CHR {
50    #[doc = r" Value of the field as raw bits"]
51    #[inline]
52    pub fn bits(&self) -> u8 {
53        self.bits
54    }
55}
56#[doc = r" Value of the field"]
57pub struct JAUTOR {
58    bits: bool,
59}
60impl JAUTOR {
61    #[doc = r" Value of the field as raw bits"]
62    #[inline]
63    pub fn bit(&self) -> bool {
64        self.bits
65    }
66    #[doc = r" Returns `true` if the bit is clear (0)"]
67    #[inline]
68    pub fn bit_is_clear(&self) -> bool {
69        !self.bit()
70    }
71    #[doc = r" Returns `true` if the bit is set (1)"]
72    #[inline]
73    pub fn bit_is_set(&self) -> bool {
74        self.bit()
75    }
76}
77#[doc = r" Value of the field"]
78pub struct JAWD1ENR {
79    bits: bool,
80}
81impl JAWD1ENR {
82    #[doc = r" Value of the field as raw bits"]
83    #[inline]
84    pub fn bit(&self) -> bool {
85        self.bits
86    }
87    #[doc = r" Returns `true` if the bit is clear (0)"]
88    #[inline]
89    pub fn bit_is_clear(&self) -> bool {
90        !self.bit()
91    }
92    #[doc = r" Returns `true` if the bit is set (1)"]
93    #[inline]
94    pub fn bit_is_set(&self) -> bool {
95        self.bit()
96    }
97}
98#[doc = r" Value of the field"]
99pub struct AWD1ENR {
100    bits: bool,
101}
102impl AWD1ENR {
103    #[doc = r" Value of the field as raw bits"]
104    #[inline]
105    pub fn bit(&self) -> bool {
106        self.bits
107    }
108    #[doc = r" Returns `true` if the bit is clear (0)"]
109    #[inline]
110    pub fn bit_is_clear(&self) -> bool {
111        !self.bit()
112    }
113    #[doc = r" Returns `true` if the bit is set (1)"]
114    #[inline]
115    pub fn bit_is_set(&self) -> bool {
116        self.bit()
117    }
118}
119#[doc = r" Value of the field"]
120pub struct AWD1SGLR {
121    bits: bool,
122}
123impl AWD1SGLR {
124    #[doc = r" Value of the field as raw bits"]
125    #[inline]
126    pub fn bit(&self) -> bool {
127        self.bits
128    }
129    #[doc = r" Returns `true` if the bit is clear (0)"]
130    #[inline]
131    pub fn bit_is_clear(&self) -> bool {
132        !self.bit()
133    }
134    #[doc = r" Returns `true` if the bit is set (1)"]
135    #[inline]
136    pub fn bit_is_set(&self) -> bool {
137        self.bit()
138    }
139}
140#[doc = r" Value of the field"]
141pub struct JQMR {
142    bits: bool,
143}
144impl JQMR {
145    #[doc = r" Value of the field as raw bits"]
146    #[inline]
147    pub fn bit(&self) -> bool {
148        self.bits
149    }
150    #[doc = r" Returns `true` if the bit is clear (0)"]
151    #[inline]
152    pub fn bit_is_clear(&self) -> bool {
153        !self.bit()
154    }
155    #[doc = r" Returns `true` if the bit is set (1)"]
156    #[inline]
157    pub fn bit_is_set(&self) -> bool {
158        self.bit()
159    }
160}
161#[doc = r" Value of the field"]
162pub struct JDISCENR {
163    bits: bool,
164}
165impl JDISCENR {
166    #[doc = r" Value of the field as raw bits"]
167    #[inline]
168    pub fn bit(&self) -> bool {
169        self.bits
170    }
171    #[doc = r" Returns `true` if the bit is clear (0)"]
172    #[inline]
173    pub fn bit_is_clear(&self) -> bool {
174        !self.bit()
175    }
176    #[doc = r" Returns `true` if the bit is set (1)"]
177    #[inline]
178    pub fn bit_is_set(&self) -> bool {
179        self.bit()
180    }
181}
182#[doc = r" Value of the field"]
183pub struct DISCNUMR {
184    bits: u8,
185}
186impl DISCNUMR {
187    #[doc = r" Value of the field as raw bits"]
188    #[inline]
189    pub fn bits(&self) -> u8 {
190        self.bits
191    }
192}
193#[doc = r" Value of the field"]
194pub struct DISCENR {
195    bits: bool,
196}
197impl DISCENR {
198    #[doc = r" Value of the field as raw bits"]
199    #[inline]
200    pub fn bit(&self) -> bool {
201        self.bits
202    }
203    #[doc = r" Returns `true` if the bit is clear (0)"]
204    #[inline]
205    pub fn bit_is_clear(&self) -> bool {
206        !self.bit()
207    }
208    #[doc = r" Returns `true` if the bit is set (1)"]
209    #[inline]
210    pub fn bit_is_set(&self) -> bool {
211        self.bit()
212    }
213}
214#[doc = r" Value of the field"]
215pub struct AUTOFFR {
216    bits: bool,
217}
218impl AUTOFFR {
219    #[doc = r" Value of the field as raw bits"]
220    #[inline]
221    pub fn bit(&self) -> bool {
222        self.bits
223    }
224    #[doc = r" Returns `true` if the bit is clear (0)"]
225    #[inline]
226    pub fn bit_is_clear(&self) -> bool {
227        !self.bit()
228    }
229    #[doc = r" Returns `true` if the bit is set (1)"]
230    #[inline]
231    pub fn bit_is_set(&self) -> bool {
232        self.bit()
233    }
234}
235#[doc = r" Value of the field"]
236pub struct AUTDLYR {
237    bits: bool,
238}
239impl AUTDLYR {
240    #[doc = r" Value of the field as raw bits"]
241    #[inline]
242    pub fn bit(&self) -> bool {
243        self.bits
244    }
245    #[doc = r" Returns `true` if the bit is clear (0)"]
246    #[inline]
247    pub fn bit_is_clear(&self) -> bool {
248        !self.bit()
249    }
250    #[doc = r" Returns `true` if the bit is set (1)"]
251    #[inline]
252    pub fn bit_is_set(&self) -> bool {
253        self.bit()
254    }
255}
256#[doc = r" Value of the field"]
257pub struct CONTR {
258    bits: bool,
259}
260impl CONTR {
261    #[doc = r" Value of the field as raw bits"]
262    #[inline]
263    pub fn bit(&self) -> bool {
264        self.bits
265    }
266    #[doc = r" Returns `true` if the bit is clear (0)"]
267    #[inline]
268    pub fn bit_is_clear(&self) -> bool {
269        !self.bit()
270    }
271    #[doc = r" Returns `true` if the bit is set (1)"]
272    #[inline]
273    pub fn bit_is_set(&self) -> bool {
274        self.bit()
275    }
276}
277#[doc = r" Value of the field"]
278pub struct OVRMODR {
279    bits: bool,
280}
281impl OVRMODR {
282    #[doc = r" Value of the field as raw bits"]
283    #[inline]
284    pub fn bit(&self) -> bool {
285        self.bits
286    }
287    #[doc = r" Returns `true` if the bit is clear (0)"]
288    #[inline]
289    pub fn bit_is_clear(&self) -> bool {
290        !self.bit()
291    }
292    #[doc = r" Returns `true` if the bit is set (1)"]
293    #[inline]
294    pub fn bit_is_set(&self) -> bool {
295        self.bit()
296    }
297}
298#[doc = r" Value of the field"]
299pub struct EXTENR {
300    bits: u8,
301}
302impl EXTENR {
303    #[doc = r" Value of the field as raw bits"]
304    #[inline]
305    pub fn bits(&self) -> u8 {
306        self.bits
307    }
308}
309#[doc = r" Value of the field"]
310pub struct EXTSELR {
311    bits: u8,
312}
313impl EXTSELR {
314    #[doc = r" Value of the field as raw bits"]
315    #[inline]
316    pub fn bits(&self) -> u8 {
317        self.bits
318    }
319}
320#[doc = r" Value of the field"]
321pub struct ALIGNR {
322    bits: bool,
323}
324impl ALIGNR {
325    #[doc = r" Value of the field as raw bits"]
326    #[inline]
327    pub fn bit(&self) -> bool {
328        self.bits
329    }
330    #[doc = r" Returns `true` if the bit is clear (0)"]
331    #[inline]
332    pub fn bit_is_clear(&self) -> bool {
333        !self.bit()
334    }
335    #[doc = r" Returns `true` if the bit is set (1)"]
336    #[inline]
337    pub fn bit_is_set(&self) -> bool {
338        self.bit()
339    }
340}
341#[doc = r" Value of the field"]
342pub struct RESR {
343    bits: u8,
344}
345impl RESR {
346    #[doc = r" Value of the field as raw bits"]
347    #[inline]
348    pub fn bits(&self) -> u8 {
349        self.bits
350    }
351}
352#[doc = r" Value of the field"]
353pub struct DMACFGR {
354    bits: bool,
355}
356impl DMACFGR {
357    #[doc = r" Value of the field as raw bits"]
358    #[inline]
359    pub fn bit(&self) -> bool {
360        self.bits
361    }
362    #[doc = r" Returns `true` if the bit is clear (0)"]
363    #[inline]
364    pub fn bit_is_clear(&self) -> bool {
365        !self.bit()
366    }
367    #[doc = r" Returns `true` if the bit is set (1)"]
368    #[inline]
369    pub fn bit_is_set(&self) -> bool {
370        self.bit()
371    }
372}
373#[doc = r" Value of the field"]
374pub struct DMAENR {
375    bits: bool,
376}
377impl DMAENR {
378    #[doc = r" Value of the field as raw bits"]
379    #[inline]
380    pub fn bit(&self) -> bool {
381        self.bits
382    }
383    #[doc = r" Returns `true` if the bit is clear (0)"]
384    #[inline]
385    pub fn bit_is_clear(&self) -> bool {
386        !self.bit()
387    }
388    #[doc = r" Returns `true` if the bit is set (1)"]
389    #[inline]
390    pub fn bit_is_set(&self) -> bool {
391        self.bit()
392    }
393}
394#[doc = r" Proxy"]
395pub struct _AWDCH1CHW<'a> {
396    w: &'a mut W,
397}
398impl<'a> _AWDCH1CHW<'a> {
399    #[doc = r" Writes raw bits to the field"]
400    #[inline]
401    pub unsafe fn bits(self, value: u8) -> &'a mut W {
402        const MASK: u8 = 31;
403        const OFFSET: u8 = 26;
404        self.w.bits &= !((MASK as u32) << OFFSET);
405        self.w.bits |= ((value & MASK) as u32) << OFFSET;
406        self.w
407    }
408}
409#[doc = r" Proxy"]
410pub struct _JAUTOW<'a> {
411    w: &'a mut W,
412}
413impl<'a> _JAUTOW<'a> {
414    #[doc = r" Sets the field bit"]
415    pub fn set_bit(self) -> &'a mut W {
416        self.bit(true)
417    }
418    #[doc = r" Clears the field bit"]
419    pub fn clear_bit(self) -> &'a mut W {
420        self.bit(false)
421    }
422    #[doc = r" Writes raw bits to the field"]
423    #[inline]
424    pub fn bit(self, value: bool) -> &'a mut W {
425        const MASK: bool = true;
426        const OFFSET: u8 = 25;
427        self.w.bits &= !((MASK as u32) << OFFSET);
428        self.w.bits |= ((value & MASK) as u32) << OFFSET;
429        self.w
430    }
431}
432#[doc = r" Proxy"]
433pub struct _JAWD1ENW<'a> {
434    w: &'a mut W,
435}
436impl<'a> _JAWD1ENW<'a> {
437    #[doc = r" Sets the field bit"]
438    pub fn set_bit(self) -> &'a mut W {
439        self.bit(true)
440    }
441    #[doc = r" Clears the field bit"]
442    pub fn clear_bit(self) -> &'a mut W {
443        self.bit(false)
444    }
445    #[doc = r" Writes raw bits to the field"]
446    #[inline]
447    pub fn bit(self, value: bool) -> &'a mut W {
448        const MASK: bool = true;
449        const OFFSET: u8 = 24;
450        self.w.bits &= !((MASK as u32) << OFFSET);
451        self.w.bits |= ((value & MASK) as u32) << OFFSET;
452        self.w
453    }
454}
455#[doc = r" Proxy"]
456pub struct _AWD1ENW<'a> {
457    w: &'a mut W,
458}
459impl<'a> _AWD1ENW<'a> {
460    #[doc = r" Sets the field bit"]
461    pub fn set_bit(self) -> &'a mut W {
462        self.bit(true)
463    }
464    #[doc = r" Clears the field bit"]
465    pub fn clear_bit(self) -> &'a mut W {
466        self.bit(false)
467    }
468    #[doc = r" Writes raw bits to the field"]
469    #[inline]
470    pub fn bit(self, value: bool) -> &'a mut W {
471        const MASK: bool = true;
472        const OFFSET: u8 = 23;
473        self.w.bits &= !((MASK as u32) << OFFSET);
474        self.w.bits |= ((value & MASK) as u32) << OFFSET;
475        self.w
476    }
477}
478#[doc = r" Proxy"]
479pub struct _AWD1SGLW<'a> {
480    w: &'a mut W,
481}
482impl<'a> _AWD1SGLW<'a> {
483    #[doc = r" Sets the field bit"]
484    pub fn set_bit(self) -> &'a mut W {
485        self.bit(true)
486    }
487    #[doc = r" Clears the field bit"]
488    pub fn clear_bit(self) -> &'a mut W {
489        self.bit(false)
490    }
491    #[doc = r" Writes raw bits to the field"]
492    #[inline]
493    pub fn bit(self, value: bool) -> &'a mut W {
494        const MASK: bool = true;
495        const OFFSET: u8 = 22;
496        self.w.bits &= !((MASK as u32) << OFFSET);
497        self.w.bits |= ((value & MASK) as u32) << OFFSET;
498        self.w
499    }
500}
501#[doc = r" Proxy"]
502pub struct _JQMW<'a> {
503    w: &'a mut W,
504}
505impl<'a> _JQMW<'a> {
506    #[doc = r" Sets the field bit"]
507    pub fn set_bit(self) -> &'a mut W {
508        self.bit(true)
509    }
510    #[doc = r" Clears the field bit"]
511    pub fn clear_bit(self) -> &'a mut W {
512        self.bit(false)
513    }
514    #[doc = r" Writes raw bits to the field"]
515    #[inline]
516    pub fn bit(self, value: bool) -> &'a mut W {
517        const MASK: bool = true;
518        const OFFSET: u8 = 21;
519        self.w.bits &= !((MASK as u32) << OFFSET);
520        self.w.bits |= ((value & MASK) as u32) << OFFSET;
521        self.w
522    }
523}
524#[doc = r" Proxy"]
525pub struct _JDISCENW<'a> {
526    w: &'a mut W,
527}
528impl<'a> _JDISCENW<'a> {
529    #[doc = r" Sets the field bit"]
530    pub fn set_bit(self) -> &'a mut W {
531        self.bit(true)
532    }
533    #[doc = r" Clears the field bit"]
534    pub fn clear_bit(self) -> &'a mut W {
535        self.bit(false)
536    }
537    #[doc = r" Writes raw bits to the field"]
538    #[inline]
539    pub fn bit(self, value: bool) -> &'a mut W {
540        const MASK: bool = true;
541        const OFFSET: u8 = 20;
542        self.w.bits &= !((MASK as u32) << OFFSET);
543        self.w.bits |= ((value & MASK) as u32) << OFFSET;
544        self.w
545    }
546}
547#[doc = r" Proxy"]
548pub struct _DISCNUMW<'a> {
549    w: &'a mut W,
550}
551impl<'a> _DISCNUMW<'a> {
552    #[doc = r" Writes raw bits to the field"]
553    #[inline]
554    pub unsafe fn bits(self, value: u8) -> &'a mut W {
555        const MASK: u8 = 7;
556        const OFFSET: u8 = 17;
557        self.w.bits &= !((MASK as u32) << OFFSET);
558        self.w.bits |= ((value & MASK) as u32) << OFFSET;
559        self.w
560    }
561}
562#[doc = r" Proxy"]
563pub struct _DISCENW<'a> {
564    w: &'a mut W,
565}
566impl<'a> _DISCENW<'a> {
567    #[doc = r" Sets the field bit"]
568    pub fn set_bit(self) -> &'a mut W {
569        self.bit(true)
570    }
571    #[doc = r" Clears the field bit"]
572    pub fn clear_bit(self) -> &'a mut W {
573        self.bit(false)
574    }
575    #[doc = r" Writes raw bits to the field"]
576    #[inline]
577    pub fn bit(self, value: bool) -> &'a mut W {
578        const MASK: bool = true;
579        const OFFSET: u8 = 16;
580        self.w.bits &= !((MASK as u32) << OFFSET);
581        self.w.bits |= ((value & MASK) as u32) << OFFSET;
582        self.w
583    }
584}
585#[doc = r" Proxy"]
586pub struct _AUTOFFW<'a> {
587    w: &'a mut W,
588}
589impl<'a> _AUTOFFW<'a> {
590    #[doc = r" Sets the field bit"]
591    pub fn set_bit(self) -> &'a mut W {
592        self.bit(true)
593    }
594    #[doc = r" Clears the field bit"]
595    pub fn clear_bit(self) -> &'a mut W {
596        self.bit(false)
597    }
598    #[doc = r" Writes raw bits to the field"]
599    #[inline]
600    pub fn bit(self, value: bool) -> &'a mut W {
601        const MASK: bool = true;
602        const OFFSET: u8 = 15;
603        self.w.bits &= !((MASK as u32) << OFFSET);
604        self.w.bits |= ((value & MASK) as u32) << OFFSET;
605        self.w
606    }
607}
608#[doc = r" Proxy"]
609pub struct _AUTDLYW<'a> {
610    w: &'a mut W,
611}
612impl<'a> _AUTDLYW<'a> {
613    #[doc = r" Sets the field bit"]
614    pub fn set_bit(self) -> &'a mut W {
615        self.bit(true)
616    }
617    #[doc = r" Clears the field bit"]
618    pub fn clear_bit(self) -> &'a mut W {
619        self.bit(false)
620    }
621    #[doc = r" Writes raw bits to the field"]
622    #[inline]
623    pub fn bit(self, value: bool) -> &'a mut W {
624        const MASK: bool = true;
625        const OFFSET: u8 = 14;
626        self.w.bits &= !((MASK as u32) << OFFSET);
627        self.w.bits |= ((value & MASK) as u32) << OFFSET;
628        self.w
629    }
630}
631#[doc = r" Proxy"]
632pub struct _CONTW<'a> {
633    w: &'a mut W,
634}
635impl<'a> _CONTW<'a> {
636    #[doc = r" Sets the field bit"]
637    pub fn set_bit(self) -> &'a mut W {
638        self.bit(true)
639    }
640    #[doc = r" Clears the field bit"]
641    pub fn clear_bit(self) -> &'a mut W {
642        self.bit(false)
643    }
644    #[doc = r" Writes raw bits to the field"]
645    #[inline]
646    pub fn bit(self, value: bool) -> &'a mut W {
647        const MASK: bool = true;
648        const OFFSET: u8 = 13;
649        self.w.bits &= !((MASK as u32) << OFFSET);
650        self.w.bits |= ((value & MASK) as u32) << OFFSET;
651        self.w
652    }
653}
654#[doc = r" Proxy"]
655pub struct _OVRMODW<'a> {
656    w: &'a mut W,
657}
658impl<'a> _OVRMODW<'a> {
659    #[doc = r" Sets the field bit"]
660    pub fn set_bit(self) -> &'a mut W {
661        self.bit(true)
662    }
663    #[doc = r" Clears the field bit"]
664    pub fn clear_bit(self) -> &'a mut W {
665        self.bit(false)
666    }
667    #[doc = r" Writes raw bits to the field"]
668    #[inline]
669    pub fn bit(self, value: bool) -> &'a mut W {
670        const MASK: bool = true;
671        const OFFSET: u8 = 12;
672        self.w.bits &= !((MASK as u32) << OFFSET);
673        self.w.bits |= ((value & MASK) as u32) << OFFSET;
674        self.w
675    }
676}
677#[doc = r" Proxy"]
678pub struct _EXTENW<'a> {
679    w: &'a mut W,
680}
681impl<'a> _EXTENW<'a> {
682    #[doc = r" Writes raw bits to the field"]
683    #[inline]
684    pub unsafe fn bits(self, value: u8) -> &'a mut W {
685        const MASK: u8 = 3;
686        const OFFSET: u8 = 10;
687        self.w.bits &= !((MASK as u32) << OFFSET);
688        self.w.bits |= ((value & MASK) as u32) << OFFSET;
689        self.w
690    }
691}
692#[doc = r" Proxy"]
693pub struct _EXTSELW<'a> {
694    w: &'a mut W,
695}
696impl<'a> _EXTSELW<'a> {
697    #[doc = r" Writes raw bits to the field"]
698    #[inline]
699    pub unsafe fn bits(self, value: u8) -> &'a mut W {
700        const MASK: u8 = 15;
701        const OFFSET: u8 = 6;
702        self.w.bits &= !((MASK as u32) << OFFSET);
703        self.w.bits |= ((value & MASK) as u32) << OFFSET;
704        self.w
705    }
706}
707#[doc = r" Proxy"]
708pub struct _ALIGNW<'a> {
709    w: &'a mut W,
710}
711impl<'a> _ALIGNW<'a> {
712    #[doc = r" Sets the field bit"]
713    pub fn set_bit(self) -> &'a mut W {
714        self.bit(true)
715    }
716    #[doc = r" Clears the field bit"]
717    pub fn clear_bit(self) -> &'a mut W {
718        self.bit(false)
719    }
720    #[doc = r" Writes raw bits to the field"]
721    #[inline]
722    pub fn bit(self, value: bool) -> &'a mut W {
723        const MASK: bool = true;
724        const OFFSET: u8 = 5;
725        self.w.bits &= !((MASK as u32) << OFFSET);
726        self.w.bits |= ((value & MASK) as u32) << OFFSET;
727        self.w
728    }
729}
730#[doc = r" Proxy"]
731pub struct _RESW<'a> {
732    w: &'a mut W,
733}
734impl<'a> _RESW<'a> {
735    #[doc = r" Writes raw bits to the field"]
736    #[inline]
737    pub unsafe fn bits(self, value: u8) -> &'a mut W {
738        const MASK: u8 = 3;
739        const OFFSET: u8 = 3;
740        self.w.bits &= !((MASK as u32) << OFFSET);
741        self.w.bits |= ((value & MASK) as u32) << OFFSET;
742        self.w
743    }
744}
745#[doc = r" Proxy"]
746pub struct _DMACFGW<'a> {
747    w: &'a mut W,
748}
749impl<'a> _DMACFGW<'a> {
750    #[doc = r" Sets the field bit"]
751    pub fn set_bit(self) -> &'a mut W {
752        self.bit(true)
753    }
754    #[doc = r" Clears the field bit"]
755    pub fn clear_bit(self) -> &'a mut W {
756        self.bit(false)
757    }
758    #[doc = r" Writes raw bits to the field"]
759    #[inline]
760    pub fn bit(self, value: bool) -> &'a mut W {
761        const MASK: bool = true;
762        const OFFSET: u8 = 1;
763        self.w.bits &= !((MASK as u32) << OFFSET);
764        self.w.bits |= ((value & MASK) as u32) << OFFSET;
765        self.w
766    }
767}
768#[doc = r" Proxy"]
769pub struct _DMAENW<'a> {
770    w: &'a mut W,
771}
772impl<'a> _DMAENW<'a> {
773    #[doc = r" Sets the field bit"]
774    pub fn set_bit(self) -> &'a mut W {
775        self.bit(true)
776    }
777    #[doc = r" Clears the field bit"]
778    pub fn clear_bit(self) -> &'a mut W {
779        self.bit(false)
780    }
781    #[doc = r" Writes raw bits to the field"]
782    #[inline]
783    pub fn bit(self, value: bool) -> &'a mut W {
784        const MASK: bool = true;
785        const OFFSET: u8 = 0;
786        self.w.bits &= !((MASK as u32) << OFFSET);
787        self.w.bits |= ((value & MASK) as u32) << OFFSET;
788        self.w
789    }
790}
791impl R {
792    #[doc = r" Value of the register as raw bits"]
793    #[inline]
794    pub fn bits(&self) -> u32 {
795        self.bits
796    }
797    #[doc = "Bits 26:30 - AWDCH1CH"]
798    #[inline]
799    pub fn awdch1ch(&self) -> AWDCH1CHR {
800        let bits = {
801            const MASK: u8 = 31;
802            const OFFSET: u8 = 26;
803            ((self.bits >> OFFSET) & MASK as u32) as u8
804        };
805        AWDCH1CHR { bits }
806    }
807    #[doc = "Bit 25 - JAUTO"]
808    #[inline]
809    pub fn jauto(&self) -> JAUTOR {
810        let bits = {
811            const MASK: bool = true;
812            const OFFSET: u8 = 25;
813            ((self.bits >> OFFSET) & MASK as u32) != 0
814        };
815        JAUTOR { bits }
816    }
817    #[doc = "Bit 24 - JAWD1EN"]
818    #[inline]
819    pub fn jawd1en(&self) -> JAWD1ENR {
820        let bits = {
821            const MASK: bool = true;
822            const OFFSET: u8 = 24;
823            ((self.bits >> OFFSET) & MASK as u32) != 0
824        };
825        JAWD1ENR { bits }
826    }
827    #[doc = "Bit 23 - AWD1EN"]
828    #[inline]
829    pub fn awd1en(&self) -> AWD1ENR {
830        let bits = {
831            const MASK: bool = true;
832            const OFFSET: u8 = 23;
833            ((self.bits >> OFFSET) & MASK as u32) != 0
834        };
835        AWD1ENR { bits }
836    }
837    #[doc = "Bit 22 - AWD1SGL"]
838    #[inline]
839    pub fn awd1sgl(&self) -> AWD1SGLR {
840        let bits = {
841            const MASK: bool = true;
842            const OFFSET: u8 = 22;
843            ((self.bits >> OFFSET) & MASK as u32) != 0
844        };
845        AWD1SGLR { bits }
846    }
847    #[doc = "Bit 21 - JQM"]
848    #[inline]
849    pub fn jqm(&self) -> JQMR {
850        let bits = {
851            const MASK: bool = true;
852            const OFFSET: u8 = 21;
853            ((self.bits >> OFFSET) & MASK as u32) != 0
854        };
855        JQMR { bits }
856    }
857    #[doc = "Bit 20 - JDISCEN"]
858    #[inline]
859    pub fn jdiscen(&self) -> JDISCENR {
860        let bits = {
861            const MASK: bool = true;
862            const OFFSET: u8 = 20;
863            ((self.bits >> OFFSET) & MASK as u32) != 0
864        };
865        JDISCENR { bits }
866    }
867    #[doc = "Bits 17:19 - DISCNUM"]
868    #[inline]
869    pub fn discnum(&self) -> DISCNUMR {
870        let bits = {
871            const MASK: u8 = 7;
872            const OFFSET: u8 = 17;
873            ((self.bits >> OFFSET) & MASK as u32) as u8
874        };
875        DISCNUMR { bits }
876    }
877    #[doc = "Bit 16 - DISCEN"]
878    #[inline]
879    pub fn discen(&self) -> DISCENR {
880        let bits = {
881            const MASK: bool = true;
882            const OFFSET: u8 = 16;
883            ((self.bits >> OFFSET) & MASK as u32) != 0
884        };
885        DISCENR { bits }
886    }
887    #[doc = "Bit 15 - AUTOFF"]
888    #[inline]
889    pub fn autoff(&self) -> AUTOFFR {
890        let bits = {
891            const MASK: bool = true;
892            const OFFSET: u8 = 15;
893            ((self.bits >> OFFSET) & MASK as u32) != 0
894        };
895        AUTOFFR { bits }
896    }
897    #[doc = "Bit 14 - AUTDLY"]
898    #[inline]
899    pub fn autdly(&self) -> AUTDLYR {
900        let bits = {
901            const MASK: bool = true;
902            const OFFSET: u8 = 14;
903            ((self.bits >> OFFSET) & MASK as u32) != 0
904        };
905        AUTDLYR { bits }
906    }
907    #[doc = "Bit 13 - CONT"]
908    #[inline]
909    pub fn cont(&self) -> CONTR {
910        let bits = {
911            const MASK: bool = true;
912            const OFFSET: u8 = 13;
913            ((self.bits >> OFFSET) & MASK as u32) != 0
914        };
915        CONTR { bits }
916    }
917    #[doc = "Bit 12 - OVRMOD"]
918    #[inline]
919    pub fn ovrmod(&self) -> OVRMODR {
920        let bits = {
921            const MASK: bool = true;
922            const OFFSET: u8 = 12;
923            ((self.bits >> OFFSET) & MASK as u32) != 0
924        };
925        OVRMODR { bits }
926    }
927    #[doc = "Bits 10:11 - EXTEN"]
928    #[inline]
929    pub fn exten(&self) -> EXTENR {
930        let bits = {
931            const MASK: u8 = 3;
932            const OFFSET: u8 = 10;
933            ((self.bits >> OFFSET) & MASK as u32) as u8
934        };
935        EXTENR { bits }
936    }
937    #[doc = "Bits 6:9 - EXTSEL"]
938    #[inline]
939    pub fn extsel(&self) -> EXTSELR {
940        let bits = {
941            const MASK: u8 = 15;
942            const OFFSET: u8 = 6;
943            ((self.bits >> OFFSET) & MASK as u32) as u8
944        };
945        EXTSELR { bits }
946    }
947    #[doc = "Bit 5 - ALIGN"]
948    #[inline]
949    pub fn align(&self) -> ALIGNR {
950        let bits = {
951            const MASK: bool = true;
952            const OFFSET: u8 = 5;
953            ((self.bits >> OFFSET) & MASK as u32) != 0
954        };
955        ALIGNR { bits }
956    }
957    #[doc = "Bits 3:4 - RES"]
958    #[inline]
959    pub fn res(&self) -> RESR {
960        let bits = {
961            const MASK: u8 = 3;
962            const OFFSET: u8 = 3;
963            ((self.bits >> OFFSET) & MASK as u32) as u8
964        };
965        RESR { bits }
966    }
967    #[doc = "Bit 1 - DMACFG"]
968    #[inline]
969    pub fn dmacfg(&self) -> DMACFGR {
970        let bits = {
971            const MASK: bool = true;
972            const OFFSET: u8 = 1;
973            ((self.bits >> OFFSET) & MASK as u32) != 0
974        };
975        DMACFGR { bits }
976    }
977    #[doc = "Bit 0 - DMAEN"]
978    #[inline]
979    pub fn dmaen(&self) -> DMAENR {
980        let bits = {
981            const MASK: bool = true;
982            const OFFSET: u8 = 0;
983            ((self.bits >> OFFSET) & MASK as u32) != 0
984        };
985        DMAENR { bits }
986    }
987}
988impl W {
989    #[doc = r" Reset value of the register"]
990    #[inline]
991    pub fn reset_value() -> W {
992        W { bits: 0 }
993    }
994    #[doc = r" Writes raw bits to the register"]
995    #[inline]
996    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
997        self.bits = bits;
998        self
999    }
1000    #[doc = "Bits 26:30 - AWDCH1CH"]
1001    #[inline]
1002    pub fn awdch1ch(&mut self) -> _AWDCH1CHW {
1003        _AWDCH1CHW { w: self }
1004    }
1005    #[doc = "Bit 25 - JAUTO"]
1006    #[inline]
1007    pub fn jauto(&mut self) -> _JAUTOW {
1008        _JAUTOW { w: self }
1009    }
1010    #[doc = "Bit 24 - JAWD1EN"]
1011    #[inline]
1012    pub fn jawd1en(&mut self) -> _JAWD1ENW {
1013        _JAWD1ENW { w: self }
1014    }
1015    #[doc = "Bit 23 - AWD1EN"]
1016    #[inline]
1017    pub fn awd1en(&mut self) -> _AWD1ENW {
1018        _AWD1ENW { w: self }
1019    }
1020    #[doc = "Bit 22 - AWD1SGL"]
1021    #[inline]
1022    pub fn awd1sgl(&mut self) -> _AWD1SGLW {
1023        _AWD1SGLW { w: self }
1024    }
1025    #[doc = "Bit 21 - JQM"]
1026    #[inline]
1027    pub fn jqm(&mut self) -> _JQMW {
1028        _JQMW { w: self }
1029    }
1030    #[doc = "Bit 20 - JDISCEN"]
1031    #[inline]
1032    pub fn jdiscen(&mut self) -> _JDISCENW {
1033        _JDISCENW { w: self }
1034    }
1035    #[doc = "Bits 17:19 - DISCNUM"]
1036    #[inline]
1037    pub fn discnum(&mut self) -> _DISCNUMW {
1038        _DISCNUMW { w: self }
1039    }
1040    #[doc = "Bit 16 - DISCEN"]
1041    #[inline]
1042    pub fn discen(&mut self) -> _DISCENW {
1043        _DISCENW { w: self }
1044    }
1045    #[doc = "Bit 15 - AUTOFF"]
1046    #[inline]
1047    pub fn autoff(&mut self) -> _AUTOFFW {
1048        _AUTOFFW { w: self }
1049    }
1050    #[doc = "Bit 14 - AUTDLY"]
1051    #[inline]
1052    pub fn autdly(&mut self) -> _AUTDLYW {
1053        _AUTDLYW { w: self }
1054    }
1055    #[doc = "Bit 13 - CONT"]
1056    #[inline]
1057    pub fn cont(&mut self) -> _CONTW {
1058        _CONTW { w: self }
1059    }
1060    #[doc = "Bit 12 - OVRMOD"]
1061    #[inline]
1062    pub fn ovrmod(&mut self) -> _OVRMODW {
1063        _OVRMODW { w: self }
1064    }
1065    #[doc = "Bits 10:11 - EXTEN"]
1066    #[inline]
1067    pub fn exten(&mut self) -> _EXTENW {
1068        _EXTENW { w: self }
1069    }
1070    #[doc = "Bits 6:9 - EXTSEL"]
1071    #[inline]
1072    pub fn extsel(&mut self) -> _EXTSELW {
1073        _EXTSELW { w: self }
1074    }
1075    #[doc = "Bit 5 - ALIGN"]
1076    #[inline]
1077    pub fn align(&mut self) -> _ALIGNW {
1078        _ALIGNW { w: self }
1079    }
1080    #[doc = "Bits 3:4 - RES"]
1081    #[inline]
1082    pub fn res(&mut self) -> _RESW {
1083        _RESW { w: self }
1084    }
1085    #[doc = "Bit 1 - DMACFG"]
1086    #[inline]
1087    pub fn dmacfg(&mut self) -> _DMACFGW {
1088        _DMACFGW { w: self }
1089    }
1090    #[doc = "Bit 0 - DMAEN"]
1091    #[inline]
1092    pub fn dmaen(&mut self) -> _DMAENW {
1093        _DMAENW { w: self }
1094    }
1095}