stm32f429/dma2/
s3cr.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::S3CR {
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 CHSELR {
47    bits: u8,
48}
49impl CHSELR {
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 MBURSTR {
58    bits: u8,
59}
60impl MBURSTR {
61    #[doc = r" Value of the field as raw bits"]
62    #[inline]
63    pub fn bits(&self) -> u8 {
64        self.bits
65    }
66}
67#[doc = r" Value of the field"]
68pub struct PBURSTR {
69    bits: u8,
70}
71impl PBURSTR {
72    #[doc = r" Value of the field as raw bits"]
73    #[inline]
74    pub fn bits(&self) -> u8 {
75        self.bits
76    }
77}
78#[doc = r" Value of the field"]
79pub struct ACKR {
80    bits: bool,
81}
82impl ACKR {
83    #[doc = r" Value of the field as raw bits"]
84    #[inline]
85    pub fn bit(&self) -> bool {
86        self.bits
87    }
88    #[doc = r" Returns `true` if the bit is clear (0)"]
89    #[inline]
90    pub fn bit_is_clear(&self) -> bool {
91        !self.bit()
92    }
93    #[doc = r" Returns `true` if the bit is set (1)"]
94    #[inline]
95    pub fn bit_is_set(&self) -> bool {
96        self.bit()
97    }
98}
99#[doc = r" Value of the field"]
100pub struct CTR {
101    bits: bool,
102}
103impl CTR {
104    #[doc = r" Value of the field as raw bits"]
105    #[inline]
106    pub fn bit(&self) -> bool {
107        self.bits
108    }
109    #[doc = r" Returns `true` if the bit is clear (0)"]
110    #[inline]
111    pub fn bit_is_clear(&self) -> bool {
112        !self.bit()
113    }
114    #[doc = r" Returns `true` if the bit is set (1)"]
115    #[inline]
116    pub fn bit_is_set(&self) -> bool {
117        self.bit()
118    }
119}
120#[doc = r" Value of the field"]
121pub struct DBMR {
122    bits: bool,
123}
124impl DBMR {
125    #[doc = r" Value of the field as raw bits"]
126    #[inline]
127    pub fn bit(&self) -> bool {
128        self.bits
129    }
130    #[doc = r" Returns `true` if the bit is clear (0)"]
131    #[inline]
132    pub fn bit_is_clear(&self) -> bool {
133        !self.bit()
134    }
135    #[doc = r" Returns `true` if the bit is set (1)"]
136    #[inline]
137    pub fn bit_is_set(&self) -> bool {
138        self.bit()
139    }
140}
141#[doc = r" Value of the field"]
142pub struct PLR {
143    bits: u8,
144}
145impl PLR {
146    #[doc = r" Value of the field as raw bits"]
147    #[inline]
148    pub fn bits(&self) -> u8 {
149        self.bits
150    }
151}
152#[doc = r" Value of the field"]
153pub struct PINCOSR {
154    bits: bool,
155}
156impl PINCOSR {
157    #[doc = r" Value of the field as raw bits"]
158    #[inline]
159    pub fn bit(&self) -> bool {
160        self.bits
161    }
162    #[doc = r" Returns `true` if the bit is clear (0)"]
163    #[inline]
164    pub fn bit_is_clear(&self) -> bool {
165        !self.bit()
166    }
167    #[doc = r" Returns `true` if the bit is set (1)"]
168    #[inline]
169    pub fn bit_is_set(&self) -> bool {
170        self.bit()
171    }
172}
173#[doc = r" Value of the field"]
174pub struct MSIZER {
175    bits: u8,
176}
177impl MSIZER {
178    #[doc = r" Value of the field as raw bits"]
179    #[inline]
180    pub fn bits(&self) -> u8 {
181        self.bits
182    }
183}
184#[doc = r" Value of the field"]
185pub struct PSIZER {
186    bits: u8,
187}
188impl PSIZER {
189    #[doc = r" Value of the field as raw bits"]
190    #[inline]
191    pub fn bits(&self) -> u8 {
192        self.bits
193    }
194}
195#[doc = r" Value of the field"]
196pub struct MINCR {
197    bits: bool,
198}
199impl MINCR {
200    #[doc = r" Value of the field as raw bits"]
201    #[inline]
202    pub fn bit(&self) -> bool {
203        self.bits
204    }
205    #[doc = r" Returns `true` if the bit is clear (0)"]
206    #[inline]
207    pub fn bit_is_clear(&self) -> bool {
208        !self.bit()
209    }
210    #[doc = r" Returns `true` if the bit is set (1)"]
211    #[inline]
212    pub fn bit_is_set(&self) -> bool {
213        self.bit()
214    }
215}
216#[doc = r" Value of the field"]
217pub struct PINCR {
218    bits: bool,
219}
220impl PINCR {
221    #[doc = r" Value of the field as raw bits"]
222    #[inline]
223    pub fn bit(&self) -> bool {
224        self.bits
225    }
226    #[doc = r" Returns `true` if the bit is clear (0)"]
227    #[inline]
228    pub fn bit_is_clear(&self) -> bool {
229        !self.bit()
230    }
231    #[doc = r" Returns `true` if the bit is set (1)"]
232    #[inline]
233    pub fn bit_is_set(&self) -> bool {
234        self.bit()
235    }
236}
237#[doc = r" Value of the field"]
238pub struct CIRCR {
239    bits: bool,
240}
241impl CIRCR {
242    #[doc = r" Value of the field as raw bits"]
243    #[inline]
244    pub fn bit(&self) -> bool {
245        self.bits
246    }
247    #[doc = r" Returns `true` if the bit is clear (0)"]
248    #[inline]
249    pub fn bit_is_clear(&self) -> bool {
250        !self.bit()
251    }
252    #[doc = r" Returns `true` if the bit is set (1)"]
253    #[inline]
254    pub fn bit_is_set(&self) -> bool {
255        self.bit()
256    }
257}
258#[doc = r" Value of the field"]
259pub struct DIRR {
260    bits: u8,
261}
262impl DIRR {
263    #[doc = r" Value of the field as raw bits"]
264    #[inline]
265    pub fn bits(&self) -> u8 {
266        self.bits
267    }
268}
269#[doc = r" Value of the field"]
270pub struct PFCTRLR {
271    bits: bool,
272}
273impl PFCTRLR {
274    #[doc = r" Value of the field as raw bits"]
275    #[inline]
276    pub fn bit(&self) -> bool {
277        self.bits
278    }
279    #[doc = r" Returns `true` if the bit is clear (0)"]
280    #[inline]
281    pub fn bit_is_clear(&self) -> bool {
282        !self.bit()
283    }
284    #[doc = r" Returns `true` if the bit is set (1)"]
285    #[inline]
286    pub fn bit_is_set(&self) -> bool {
287        self.bit()
288    }
289}
290#[doc = r" Value of the field"]
291pub struct TCIER {
292    bits: bool,
293}
294impl TCIER {
295    #[doc = r" Value of the field as raw bits"]
296    #[inline]
297    pub fn bit(&self) -> bool {
298        self.bits
299    }
300    #[doc = r" Returns `true` if the bit is clear (0)"]
301    #[inline]
302    pub fn bit_is_clear(&self) -> bool {
303        !self.bit()
304    }
305    #[doc = r" Returns `true` if the bit is set (1)"]
306    #[inline]
307    pub fn bit_is_set(&self) -> bool {
308        self.bit()
309    }
310}
311#[doc = r" Value of the field"]
312pub struct HTIER {
313    bits: bool,
314}
315impl HTIER {
316    #[doc = r" Value of the field as raw bits"]
317    #[inline]
318    pub fn bit(&self) -> bool {
319        self.bits
320    }
321    #[doc = r" Returns `true` if the bit is clear (0)"]
322    #[inline]
323    pub fn bit_is_clear(&self) -> bool {
324        !self.bit()
325    }
326    #[doc = r" Returns `true` if the bit is set (1)"]
327    #[inline]
328    pub fn bit_is_set(&self) -> bool {
329        self.bit()
330    }
331}
332#[doc = r" Value of the field"]
333pub struct TEIER {
334    bits: bool,
335}
336impl TEIER {
337    #[doc = r" Value of the field as raw bits"]
338    #[inline]
339    pub fn bit(&self) -> bool {
340        self.bits
341    }
342    #[doc = r" Returns `true` if the bit is clear (0)"]
343    #[inline]
344    pub fn bit_is_clear(&self) -> bool {
345        !self.bit()
346    }
347    #[doc = r" Returns `true` if the bit is set (1)"]
348    #[inline]
349    pub fn bit_is_set(&self) -> bool {
350        self.bit()
351    }
352}
353#[doc = r" Value of the field"]
354pub struct DMEIER {
355    bits: bool,
356}
357impl DMEIER {
358    #[doc = r" Value of the field as raw bits"]
359    #[inline]
360    pub fn bit(&self) -> bool {
361        self.bits
362    }
363    #[doc = r" Returns `true` if the bit is clear (0)"]
364    #[inline]
365    pub fn bit_is_clear(&self) -> bool {
366        !self.bit()
367    }
368    #[doc = r" Returns `true` if the bit is set (1)"]
369    #[inline]
370    pub fn bit_is_set(&self) -> bool {
371        self.bit()
372    }
373}
374#[doc = r" Value of the field"]
375pub struct ENR {
376    bits: bool,
377}
378impl ENR {
379    #[doc = r" Value of the field as raw bits"]
380    #[inline]
381    pub fn bit(&self) -> bool {
382        self.bits
383    }
384    #[doc = r" Returns `true` if the bit is clear (0)"]
385    #[inline]
386    pub fn bit_is_clear(&self) -> bool {
387        !self.bit()
388    }
389    #[doc = r" Returns `true` if the bit is set (1)"]
390    #[inline]
391    pub fn bit_is_set(&self) -> bool {
392        self.bit()
393    }
394}
395#[doc = r" Proxy"]
396pub struct _CHSELW<'a> {
397    w: &'a mut W,
398}
399impl<'a> _CHSELW<'a> {
400    #[doc = r" Writes raw bits to the field"]
401    #[inline]
402    pub unsafe fn bits(self, value: u8) -> &'a mut W {
403        const MASK: u8 = 7;
404        const OFFSET: u8 = 25;
405        self.w.bits &= !((MASK as u32) << OFFSET);
406        self.w.bits |= ((value & MASK) as u32) << OFFSET;
407        self.w
408    }
409}
410#[doc = r" Proxy"]
411pub struct _MBURSTW<'a> {
412    w: &'a mut W,
413}
414impl<'a> _MBURSTW<'a> {
415    #[doc = r" Writes raw bits to the field"]
416    #[inline]
417    pub unsafe fn bits(self, value: u8) -> &'a mut W {
418        const MASK: u8 = 3;
419        const OFFSET: u8 = 23;
420        self.w.bits &= !((MASK as u32) << OFFSET);
421        self.w.bits |= ((value & MASK) as u32) << OFFSET;
422        self.w
423    }
424}
425#[doc = r" Proxy"]
426pub struct _PBURSTW<'a> {
427    w: &'a mut W,
428}
429impl<'a> _PBURSTW<'a> {
430    #[doc = r" Writes raw bits to the field"]
431    #[inline]
432    pub unsafe fn bits(self, value: u8) -> &'a mut W {
433        const MASK: u8 = 3;
434        const OFFSET: u8 = 21;
435        self.w.bits &= !((MASK as u32) << OFFSET);
436        self.w.bits |= ((value & MASK) as u32) << OFFSET;
437        self.w
438    }
439}
440#[doc = r" Proxy"]
441pub struct _ACKW<'a> {
442    w: &'a mut W,
443}
444impl<'a> _ACKW<'a> {
445    #[doc = r" Sets the field bit"]
446    pub fn set_bit(self) -> &'a mut W {
447        self.bit(true)
448    }
449    #[doc = r" Clears the field bit"]
450    pub fn clear_bit(self) -> &'a mut W {
451        self.bit(false)
452    }
453    #[doc = r" Writes raw bits to the field"]
454    #[inline]
455    pub fn bit(self, value: bool) -> &'a mut W {
456        const MASK: bool = true;
457        const OFFSET: u8 = 20;
458        self.w.bits &= !((MASK as u32) << OFFSET);
459        self.w.bits |= ((value & MASK) as u32) << OFFSET;
460        self.w
461    }
462}
463#[doc = r" Proxy"]
464pub struct _CTW<'a> {
465    w: &'a mut W,
466}
467impl<'a> _CTW<'a> {
468    #[doc = r" Sets the field bit"]
469    pub fn set_bit(self) -> &'a mut W {
470        self.bit(true)
471    }
472    #[doc = r" Clears the field bit"]
473    pub fn clear_bit(self) -> &'a mut W {
474        self.bit(false)
475    }
476    #[doc = r" Writes raw bits to the field"]
477    #[inline]
478    pub fn bit(self, value: bool) -> &'a mut W {
479        const MASK: bool = true;
480        const OFFSET: u8 = 19;
481        self.w.bits &= !((MASK as u32) << OFFSET);
482        self.w.bits |= ((value & MASK) as u32) << OFFSET;
483        self.w
484    }
485}
486#[doc = r" Proxy"]
487pub struct _DBMW<'a> {
488    w: &'a mut W,
489}
490impl<'a> _DBMW<'a> {
491    #[doc = r" Sets the field bit"]
492    pub fn set_bit(self) -> &'a mut W {
493        self.bit(true)
494    }
495    #[doc = r" Clears the field bit"]
496    pub fn clear_bit(self) -> &'a mut W {
497        self.bit(false)
498    }
499    #[doc = r" Writes raw bits to the field"]
500    #[inline]
501    pub fn bit(self, value: bool) -> &'a mut W {
502        const MASK: bool = true;
503        const OFFSET: u8 = 18;
504        self.w.bits &= !((MASK as u32) << OFFSET);
505        self.w.bits |= ((value & MASK) as u32) << OFFSET;
506        self.w
507    }
508}
509#[doc = r" Proxy"]
510pub struct _PLW<'a> {
511    w: &'a mut W,
512}
513impl<'a> _PLW<'a> {
514    #[doc = r" Writes raw bits to the field"]
515    #[inline]
516    pub unsafe fn bits(self, value: u8) -> &'a mut W {
517        const MASK: u8 = 3;
518        const OFFSET: u8 = 16;
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 _PINCOSW<'a> {
526    w: &'a mut W,
527}
528impl<'a> _PINCOSW<'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 = 15;
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 _MSIZEW<'a> {
549    w: &'a mut W,
550}
551impl<'a> _MSIZEW<'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 = 3;
556        const OFFSET: u8 = 13;
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 _PSIZEW<'a> {
564    w: &'a mut W,
565}
566impl<'a> _PSIZEW<'a> {
567    #[doc = r" Writes raw bits to the field"]
568    #[inline]
569    pub unsafe fn bits(self, value: u8) -> &'a mut W {
570        const MASK: u8 = 3;
571        const OFFSET: u8 = 11;
572        self.w.bits &= !((MASK as u32) << OFFSET);
573        self.w.bits |= ((value & MASK) as u32) << OFFSET;
574        self.w
575    }
576}
577#[doc = r" Proxy"]
578pub struct _MINCW<'a> {
579    w: &'a mut W,
580}
581impl<'a> _MINCW<'a> {
582    #[doc = r" Sets the field bit"]
583    pub fn set_bit(self) -> &'a mut W {
584        self.bit(true)
585    }
586    #[doc = r" Clears the field bit"]
587    pub fn clear_bit(self) -> &'a mut W {
588        self.bit(false)
589    }
590    #[doc = r" Writes raw bits to the field"]
591    #[inline]
592    pub fn bit(self, value: bool) -> &'a mut W {
593        const MASK: bool = true;
594        const OFFSET: u8 = 10;
595        self.w.bits &= !((MASK as u32) << OFFSET);
596        self.w.bits |= ((value & MASK) as u32) << OFFSET;
597        self.w
598    }
599}
600#[doc = r" Proxy"]
601pub struct _PINCW<'a> {
602    w: &'a mut W,
603}
604impl<'a> _PINCW<'a> {
605    #[doc = r" Sets the field bit"]
606    pub fn set_bit(self) -> &'a mut W {
607        self.bit(true)
608    }
609    #[doc = r" Clears the field bit"]
610    pub fn clear_bit(self) -> &'a mut W {
611        self.bit(false)
612    }
613    #[doc = r" Writes raw bits to the field"]
614    #[inline]
615    pub fn bit(self, value: bool) -> &'a mut W {
616        const MASK: bool = true;
617        const OFFSET: u8 = 9;
618        self.w.bits &= !((MASK as u32) << OFFSET);
619        self.w.bits |= ((value & MASK) as u32) << OFFSET;
620        self.w
621    }
622}
623#[doc = r" Proxy"]
624pub struct _CIRCW<'a> {
625    w: &'a mut W,
626}
627impl<'a> _CIRCW<'a> {
628    #[doc = r" Sets the field bit"]
629    pub fn set_bit(self) -> &'a mut W {
630        self.bit(true)
631    }
632    #[doc = r" Clears the field bit"]
633    pub fn clear_bit(self) -> &'a mut W {
634        self.bit(false)
635    }
636    #[doc = r" Writes raw bits to the field"]
637    #[inline]
638    pub fn bit(self, value: bool) -> &'a mut W {
639        const MASK: bool = true;
640        const OFFSET: u8 = 8;
641        self.w.bits &= !((MASK as u32) << OFFSET);
642        self.w.bits |= ((value & MASK) as u32) << OFFSET;
643        self.w
644    }
645}
646#[doc = r" Proxy"]
647pub struct _DIRW<'a> {
648    w: &'a mut W,
649}
650impl<'a> _DIRW<'a> {
651    #[doc = r" Writes raw bits to the field"]
652    #[inline]
653    pub unsafe fn bits(self, value: u8) -> &'a mut W {
654        const MASK: u8 = 3;
655        const OFFSET: u8 = 6;
656        self.w.bits &= !((MASK as u32) << OFFSET);
657        self.w.bits |= ((value & MASK) as u32) << OFFSET;
658        self.w
659    }
660}
661#[doc = r" Proxy"]
662pub struct _PFCTRLW<'a> {
663    w: &'a mut W,
664}
665impl<'a> _PFCTRLW<'a> {
666    #[doc = r" Sets the field bit"]
667    pub fn set_bit(self) -> &'a mut W {
668        self.bit(true)
669    }
670    #[doc = r" Clears the field bit"]
671    pub fn clear_bit(self) -> &'a mut W {
672        self.bit(false)
673    }
674    #[doc = r" Writes raw bits to the field"]
675    #[inline]
676    pub fn bit(self, value: bool) -> &'a mut W {
677        const MASK: bool = true;
678        const OFFSET: u8 = 5;
679        self.w.bits &= !((MASK as u32) << OFFSET);
680        self.w.bits |= ((value & MASK) as u32) << OFFSET;
681        self.w
682    }
683}
684#[doc = r" Proxy"]
685pub struct _TCIEW<'a> {
686    w: &'a mut W,
687}
688impl<'a> _TCIEW<'a> {
689    #[doc = r" Sets the field bit"]
690    pub fn set_bit(self) -> &'a mut W {
691        self.bit(true)
692    }
693    #[doc = r" Clears the field bit"]
694    pub fn clear_bit(self) -> &'a mut W {
695        self.bit(false)
696    }
697    #[doc = r" Writes raw bits to the field"]
698    #[inline]
699    pub fn bit(self, value: bool) -> &'a mut W {
700        const MASK: bool = true;
701        const OFFSET: u8 = 4;
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 _HTIEW<'a> {
709    w: &'a mut W,
710}
711impl<'a> _HTIEW<'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 = 3;
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 _TEIEW<'a> {
732    w: &'a mut W,
733}
734impl<'a> _TEIEW<'a> {
735    #[doc = r" Sets the field bit"]
736    pub fn set_bit(self) -> &'a mut W {
737        self.bit(true)
738    }
739    #[doc = r" Clears the field bit"]
740    pub fn clear_bit(self) -> &'a mut W {
741        self.bit(false)
742    }
743    #[doc = r" Writes raw bits to the field"]
744    #[inline]
745    pub fn bit(self, value: bool) -> &'a mut W {
746        const MASK: bool = true;
747        const OFFSET: u8 = 2;
748        self.w.bits &= !((MASK as u32) << OFFSET);
749        self.w.bits |= ((value & MASK) as u32) << OFFSET;
750        self.w
751    }
752}
753#[doc = r" Proxy"]
754pub struct _DMEIEW<'a> {
755    w: &'a mut W,
756}
757impl<'a> _DMEIEW<'a> {
758    #[doc = r" Sets the field bit"]
759    pub fn set_bit(self) -> &'a mut W {
760        self.bit(true)
761    }
762    #[doc = r" Clears the field bit"]
763    pub fn clear_bit(self) -> &'a mut W {
764        self.bit(false)
765    }
766    #[doc = r" Writes raw bits to the field"]
767    #[inline]
768    pub fn bit(self, value: bool) -> &'a mut W {
769        const MASK: bool = true;
770        const OFFSET: u8 = 1;
771        self.w.bits &= !((MASK as u32) << OFFSET);
772        self.w.bits |= ((value & MASK) as u32) << OFFSET;
773        self.w
774    }
775}
776#[doc = r" Proxy"]
777pub struct _ENW<'a> {
778    w: &'a mut W,
779}
780impl<'a> _ENW<'a> {
781    #[doc = r" Sets the field bit"]
782    pub fn set_bit(self) -> &'a mut W {
783        self.bit(true)
784    }
785    #[doc = r" Clears the field bit"]
786    pub fn clear_bit(self) -> &'a mut W {
787        self.bit(false)
788    }
789    #[doc = r" Writes raw bits to the field"]
790    #[inline]
791    pub fn bit(self, value: bool) -> &'a mut W {
792        const MASK: bool = true;
793        const OFFSET: u8 = 0;
794        self.w.bits &= !((MASK as u32) << OFFSET);
795        self.w.bits |= ((value & MASK) as u32) << OFFSET;
796        self.w
797    }
798}
799impl R {
800    #[doc = r" Value of the register as raw bits"]
801    #[inline]
802    pub fn bits(&self) -> u32 {
803        self.bits
804    }
805    #[doc = "Bits 25:27 - Channel selection"]
806    #[inline]
807    pub fn chsel(&self) -> CHSELR {
808        let bits = {
809            const MASK: u8 = 7;
810            const OFFSET: u8 = 25;
811            ((self.bits >> OFFSET) & MASK as u32) as u8
812        };
813        CHSELR { bits }
814    }
815    #[doc = "Bits 23:24 - Memory burst transfer configuration"]
816    #[inline]
817    pub fn mburst(&self) -> MBURSTR {
818        let bits = {
819            const MASK: u8 = 3;
820            const OFFSET: u8 = 23;
821            ((self.bits >> OFFSET) & MASK as u32) as u8
822        };
823        MBURSTR { bits }
824    }
825    #[doc = "Bits 21:22 - Peripheral burst transfer configuration"]
826    #[inline]
827    pub fn pburst(&self) -> PBURSTR {
828        let bits = {
829            const MASK: u8 = 3;
830            const OFFSET: u8 = 21;
831            ((self.bits >> OFFSET) & MASK as u32) as u8
832        };
833        PBURSTR { bits }
834    }
835    #[doc = "Bit 20 - ACK"]
836    #[inline]
837    pub fn ack(&self) -> ACKR {
838        let bits = {
839            const MASK: bool = true;
840            const OFFSET: u8 = 20;
841            ((self.bits >> OFFSET) & MASK as u32) != 0
842        };
843        ACKR { bits }
844    }
845    #[doc = "Bit 19 - Current target (only in double buffer mode)"]
846    #[inline]
847    pub fn ct(&self) -> CTR {
848        let bits = {
849            const MASK: bool = true;
850            const OFFSET: u8 = 19;
851            ((self.bits >> OFFSET) & MASK as u32) != 0
852        };
853        CTR { bits }
854    }
855    #[doc = "Bit 18 - Double buffer mode"]
856    #[inline]
857    pub fn dbm(&self) -> DBMR {
858        let bits = {
859            const MASK: bool = true;
860            const OFFSET: u8 = 18;
861            ((self.bits >> OFFSET) & MASK as u32) != 0
862        };
863        DBMR { bits }
864    }
865    #[doc = "Bits 16:17 - Priority level"]
866    #[inline]
867    pub fn pl(&self) -> PLR {
868        let bits = {
869            const MASK: u8 = 3;
870            const OFFSET: u8 = 16;
871            ((self.bits >> OFFSET) & MASK as u32) as u8
872        };
873        PLR { bits }
874    }
875    #[doc = "Bit 15 - Peripheral increment offset size"]
876    #[inline]
877    pub fn pincos(&self) -> PINCOSR {
878        let bits = {
879            const MASK: bool = true;
880            const OFFSET: u8 = 15;
881            ((self.bits >> OFFSET) & MASK as u32) != 0
882        };
883        PINCOSR { bits }
884    }
885    #[doc = "Bits 13:14 - Memory data size"]
886    #[inline]
887    pub fn msize(&self) -> MSIZER {
888        let bits = {
889            const MASK: u8 = 3;
890            const OFFSET: u8 = 13;
891            ((self.bits >> OFFSET) & MASK as u32) as u8
892        };
893        MSIZER { bits }
894    }
895    #[doc = "Bits 11:12 - Peripheral data size"]
896    #[inline]
897    pub fn psize(&self) -> PSIZER {
898        let bits = {
899            const MASK: u8 = 3;
900            const OFFSET: u8 = 11;
901            ((self.bits >> OFFSET) & MASK as u32) as u8
902        };
903        PSIZER { bits }
904    }
905    #[doc = "Bit 10 - Memory increment mode"]
906    #[inline]
907    pub fn minc(&self) -> MINCR {
908        let bits = {
909            const MASK: bool = true;
910            const OFFSET: u8 = 10;
911            ((self.bits >> OFFSET) & MASK as u32) != 0
912        };
913        MINCR { bits }
914    }
915    #[doc = "Bit 9 - Peripheral increment mode"]
916    #[inline]
917    pub fn pinc(&self) -> PINCR {
918        let bits = {
919            const MASK: bool = true;
920            const OFFSET: u8 = 9;
921            ((self.bits >> OFFSET) & MASK as u32) != 0
922        };
923        PINCR { bits }
924    }
925    #[doc = "Bit 8 - Circular mode"]
926    #[inline]
927    pub fn circ(&self) -> CIRCR {
928        let bits = {
929            const MASK: bool = true;
930            const OFFSET: u8 = 8;
931            ((self.bits >> OFFSET) & MASK as u32) != 0
932        };
933        CIRCR { bits }
934    }
935    #[doc = "Bits 6:7 - Data transfer direction"]
936    #[inline]
937    pub fn dir(&self) -> DIRR {
938        let bits = {
939            const MASK: u8 = 3;
940            const OFFSET: u8 = 6;
941            ((self.bits >> OFFSET) & MASK as u32) as u8
942        };
943        DIRR { bits }
944    }
945    #[doc = "Bit 5 - Peripheral flow controller"]
946    #[inline]
947    pub fn pfctrl(&self) -> PFCTRLR {
948        let bits = {
949            const MASK: bool = true;
950            const OFFSET: u8 = 5;
951            ((self.bits >> OFFSET) & MASK as u32) != 0
952        };
953        PFCTRLR { bits }
954    }
955    #[doc = "Bit 4 - Transfer complete interrupt enable"]
956    #[inline]
957    pub fn tcie(&self) -> TCIER {
958        let bits = {
959            const MASK: bool = true;
960            const OFFSET: u8 = 4;
961            ((self.bits >> OFFSET) & MASK as u32) != 0
962        };
963        TCIER { bits }
964    }
965    #[doc = "Bit 3 - Half transfer interrupt enable"]
966    #[inline]
967    pub fn htie(&self) -> HTIER {
968        let bits = {
969            const MASK: bool = true;
970            const OFFSET: u8 = 3;
971            ((self.bits >> OFFSET) & MASK as u32) != 0
972        };
973        HTIER { bits }
974    }
975    #[doc = "Bit 2 - Transfer error interrupt enable"]
976    #[inline]
977    pub fn teie(&self) -> TEIER {
978        let bits = {
979            const MASK: bool = true;
980            const OFFSET: u8 = 2;
981            ((self.bits >> OFFSET) & MASK as u32) != 0
982        };
983        TEIER { bits }
984    }
985    #[doc = "Bit 1 - Direct mode error interrupt enable"]
986    #[inline]
987    pub fn dmeie(&self) -> DMEIER {
988        let bits = {
989            const MASK: bool = true;
990            const OFFSET: u8 = 1;
991            ((self.bits >> OFFSET) & MASK as u32) != 0
992        };
993        DMEIER { bits }
994    }
995    #[doc = "Bit 0 - Stream enable / flag stream ready when read low"]
996    #[inline]
997    pub fn en(&self) -> ENR {
998        let bits = {
999            const MASK: bool = true;
1000            const OFFSET: u8 = 0;
1001            ((self.bits >> OFFSET) & MASK as u32) != 0
1002        };
1003        ENR { bits }
1004    }
1005}
1006impl W {
1007    #[doc = r" Reset value of the register"]
1008    #[inline]
1009    pub fn reset_value() -> W {
1010        W { bits: 0 }
1011    }
1012    #[doc = r" Writes raw bits to the register"]
1013    #[inline]
1014    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1015        self.bits = bits;
1016        self
1017    }
1018    #[doc = "Bits 25:27 - Channel selection"]
1019    #[inline]
1020    pub fn chsel(&mut self) -> _CHSELW {
1021        _CHSELW { w: self }
1022    }
1023    #[doc = "Bits 23:24 - Memory burst transfer configuration"]
1024    #[inline]
1025    pub fn mburst(&mut self) -> _MBURSTW {
1026        _MBURSTW { w: self }
1027    }
1028    #[doc = "Bits 21:22 - Peripheral burst transfer configuration"]
1029    #[inline]
1030    pub fn pburst(&mut self) -> _PBURSTW {
1031        _PBURSTW { w: self }
1032    }
1033    #[doc = "Bit 20 - ACK"]
1034    #[inline]
1035    pub fn ack(&mut self) -> _ACKW {
1036        _ACKW { w: self }
1037    }
1038    #[doc = "Bit 19 - Current target (only in double buffer mode)"]
1039    #[inline]
1040    pub fn ct(&mut self) -> _CTW {
1041        _CTW { w: self }
1042    }
1043    #[doc = "Bit 18 - Double buffer mode"]
1044    #[inline]
1045    pub fn dbm(&mut self) -> _DBMW {
1046        _DBMW { w: self }
1047    }
1048    #[doc = "Bits 16:17 - Priority level"]
1049    #[inline]
1050    pub fn pl(&mut self) -> _PLW {
1051        _PLW { w: self }
1052    }
1053    #[doc = "Bit 15 - Peripheral increment offset size"]
1054    #[inline]
1055    pub fn pincos(&mut self) -> _PINCOSW {
1056        _PINCOSW { w: self }
1057    }
1058    #[doc = "Bits 13:14 - Memory data size"]
1059    #[inline]
1060    pub fn msize(&mut self) -> _MSIZEW {
1061        _MSIZEW { w: self }
1062    }
1063    #[doc = "Bits 11:12 - Peripheral data size"]
1064    #[inline]
1065    pub fn psize(&mut self) -> _PSIZEW {
1066        _PSIZEW { w: self }
1067    }
1068    #[doc = "Bit 10 - Memory increment mode"]
1069    #[inline]
1070    pub fn minc(&mut self) -> _MINCW {
1071        _MINCW { w: self }
1072    }
1073    #[doc = "Bit 9 - Peripheral increment mode"]
1074    #[inline]
1075    pub fn pinc(&mut self) -> _PINCW {
1076        _PINCW { w: self }
1077    }
1078    #[doc = "Bit 8 - Circular mode"]
1079    #[inline]
1080    pub fn circ(&mut self) -> _CIRCW {
1081        _CIRCW { w: self }
1082    }
1083    #[doc = "Bits 6:7 - Data transfer direction"]
1084    #[inline]
1085    pub fn dir(&mut self) -> _DIRW {
1086        _DIRW { w: self }
1087    }
1088    #[doc = "Bit 5 - Peripheral flow controller"]
1089    #[inline]
1090    pub fn pfctrl(&mut self) -> _PFCTRLW {
1091        _PFCTRLW { w: self }
1092    }
1093    #[doc = "Bit 4 - Transfer complete interrupt enable"]
1094    #[inline]
1095    pub fn tcie(&mut self) -> _TCIEW {
1096        _TCIEW { w: self }
1097    }
1098    #[doc = "Bit 3 - Half transfer interrupt enable"]
1099    #[inline]
1100    pub fn htie(&mut self) -> _HTIEW {
1101        _HTIEW { w: self }
1102    }
1103    #[doc = "Bit 2 - Transfer error interrupt enable"]
1104    #[inline]
1105    pub fn teie(&mut self) -> _TEIEW {
1106        _TEIEW { w: self }
1107    }
1108    #[doc = "Bit 1 - Direct mode error interrupt enable"]
1109    #[inline]
1110    pub fn dmeie(&mut self) -> _DMEIEW {
1111        _DMEIEW { w: self }
1112    }
1113    #[doc = "Bit 0 - Stream enable / flag stream ready when read low"]
1114    #[inline]
1115    pub fn en(&mut self) -> _ENW {
1116        _ENW { w: self }
1117    }
1118}