da14682_pac/
dma.rs

1/*
2DISCLAIMER
3This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
4No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
5applicable laws, including copyright laws.
6THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
7OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
8NON-INFRINGEMENT.  ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
9LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
10INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
11ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
13of this software. By using this software, you agree to the additional terms and conditions found by accessing the
14following link:
15http://www.renesas.com/disclaimer
16
17*/
18// Generated from SVD 1.2, with svd2pac 0.6.0 on Thu, 24 Jul 2025 04:45:10 +0000
19
20#![allow(clippy::identity_op)]
21#![allow(clippy::module_inception)]
22#![allow(clippy::derivable_impls)]
23#[allow(unused_imports)]
24use crate::common::sealed;
25#[allow(unused_imports)]
26use crate::common::*;
27#[doc = r"DMA registers"]
28unsafe impl ::core::marker::Send for super::Dma {}
29unsafe impl ::core::marker::Sync for super::Dma {}
30impl super::Dma {
31    #[allow(unused)]
32    #[inline(always)]
33    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34        self.ptr
35    }
36
37    #[doc = "Start address High A of DMA channel 0"]
38    #[inline(always)]
39    pub const fn dma0_a_starth_reg(
40        &self,
41    ) -> &'static crate::common::Reg<self::Dma0AStarthReg_SPEC, crate::common::RW> {
42        unsafe {
43            crate::common::Reg::<self::Dma0AStarthReg_SPEC, crate::common::RW>::from_ptr(
44                self._svd2pac_as_ptr().add(2usize),
45            )
46        }
47    }
48
49    #[doc = "Start address Low A of DMA channel 0"]
50    #[inline(always)]
51    pub const fn dma0_a_startl_reg(
52        &self,
53    ) -> &'static crate::common::Reg<self::Dma0AStartlReg_SPEC, crate::common::RW> {
54        unsafe {
55            crate::common::Reg::<self::Dma0AStartlReg_SPEC, crate::common::RW>::from_ptr(
56                self._svd2pac_as_ptr().add(0usize),
57            )
58        }
59    }
60
61    #[doc = "Start address High B of DMA channel 0"]
62    #[inline(always)]
63    pub const fn dma0_b_starth_reg(
64        &self,
65    ) -> &'static crate::common::Reg<self::Dma0BStarthReg_SPEC, crate::common::RW> {
66        unsafe {
67            crate::common::Reg::<self::Dma0BStarthReg_SPEC, crate::common::RW>::from_ptr(
68                self._svd2pac_as_ptr().add(6usize),
69            )
70        }
71    }
72
73    #[doc = "Start address Low B of DMA channel 0"]
74    #[inline(always)]
75    pub const fn dma0_b_startl_reg(
76        &self,
77    ) -> &'static crate::common::Reg<self::Dma0BStartlReg_SPEC, crate::common::RW> {
78        unsafe {
79            crate::common::Reg::<self::Dma0BStartlReg_SPEC, crate::common::RW>::from_ptr(
80                self._svd2pac_as_ptr().add(4usize),
81            )
82        }
83    }
84
85    #[doc = "Control register for the DMA channel 0"]
86    #[inline(always)]
87    pub const fn dma0_ctrl_reg(
88        &self,
89    ) -> &'static crate::common::Reg<self::Dma0CtrlReg_SPEC, crate::common::RW> {
90        unsafe {
91            crate::common::Reg::<self::Dma0CtrlReg_SPEC, crate::common::RW>::from_ptr(
92                self._svd2pac_as_ptr().add(12usize),
93            )
94        }
95    }
96
97    #[doc = "Index value of DMA channel 0"]
98    #[inline(always)]
99    pub const fn dma0_idx_reg(
100        &self,
101    ) -> &'static crate::common::Reg<self::Dma0IdxReg_SPEC, crate::common::RW> {
102        unsafe {
103            crate::common::Reg::<self::Dma0IdxReg_SPEC, crate::common::RW>::from_ptr(
104                self._svd2pac_as_ptr().add(14usize),
105            )
106        }
107    }
108
109    #[doc = "DMA receive interrupt register channel 0"]
110    #[inline(always)]
111    pub const fn dma0_int_reg(
112        &self,
113    ) -> &'static crate::common::Reg<self::Dma0IntReg_SPEC, crate::common::RW> {
114        unsafe {
115            crate::common::Reg::<self::Dma0IntReg_SPEC, crate::common::RW>::from_ptr(
116                self._svd2pac_as_ptr().add(8usize),
117            )
118        }
119    }
120
121    #[doc = "DMA receive length register channel 0"]
122    #[inline(always)]
123    pub const fn dma0_len_reg(
124        &self,
125    ) -> &'static crate::common::Reg<self::Dma0LenReg_SPEC, crate::common::RW> {
126        unsafe {
127            crate::common::Reg::<self::Dma0LenReg_SPEC, crate::common::RW>::from_ptr(
128                self._svd2pac_as_ptr().add(10usize),
129            )
130        }
131    }
132
133    #[doc = "Start address High A of DMA channel 1"]
134    #[inline(always)]
135    pub const fn dma1_a_starth_reg(
136        &self,
137    ) -> &'static crate::common::Reg<self::Dma1AStarthReg_SPEC, crate::common::RW> {
138        unsafe {
139            crate::common::Reg::<self::Dma1AStarthReg_SPEC, crate::common::RW>::from_ptr(
140                self._svd2pac_as_ptr().add(18usize),
141            )
142        }
143    }
144
145    #[doc = "Start address Low A of DMA channel 1"]
146    #[inline(always)]
147    pub const fn dma1_a_startl_reg(
148        &self,
149    ) -> &'static crate::common::Reg<self::Dma1AStartlReg_SPEC, crate::common::RW> {
150        unsafe {
151            crate::common::Reg::<self::Dma1AStartlReg_SPEC, crate::common::RW>::from_ptr(
152                self._svd2pac_as_ptr().add(16usize),
153            )
154        }
155    }
156
157    #[doc = "Start address High B of DMA channel 1"]
158    #[inline(always)]
159    pub const fn dma1_b_starth_reg(
160        &self,
161    ) -> &'static crate::common::Reg<self::Dma1BStarthReg_SPEC, crate::common::RW> {
162        unsafe {
163            crate::common::Reg::<self::Dma1BStarthReg_SPEC, crate::common::RW>::from_ptr(
164                self._svd2pac_as_ptr().add(22usize),
165            )
166        }
167    }
168
169    #[doc = "Start address Low B of DMA channel 1"]
170    #[inline(always)]
171    pub const fn dma1_b_startl_reg(
172        &self,
173    ) -> &'static crate::common::Reg<self::Dma1BStartlReg_SPEC, crate::common::RW> {
174        unsafe {
175            crate::common::Reg::<self::Dma1BStartlReg_SPEC, crate::common::RW>::from_ptr(
176                self._svd2pac_as_ptr().add(20usize),
177            )
178        }
179    }
180
181    #[doc = "Control register for the DMA channel 1"]
182    #[inline(always)]
183    pub const fn dma1_ctrl_reg(
184        &self,
185    ) -> &'static crate::common::Reg<self::Dma1CtrlReg_SPEC, crate::common::RW> {
186        unsafe {
187            crate::common::Reg::<self::Dma1CtrlReg_SPEC, crate::common::RW>::from_ptr(
188                self._svd2pac_as_ptr().add(28usize),
189            )
190        }
191    }
192
193    #[doc = "Index value of DMA channel 1"]
194    #[inline(always)]
195    pub const fn dma1_idx_reg(
196        &self,
197    ) -> &'static crate::common::Reg<self::Dma1IdxReg_SPEC, crate::common::RW> {
198        unsafe {
199            crate::common::Reg::<self::Dma1IdxReg_SPEC, crate::common::RW>::from_ptr(
200                self._svd2pac_as_ptr().add(30usize),
201            )
202        }
203    }
204
205    #[doc = "DMA receive interrupt register channel 1"]
206    #[inline(always)]
207    pub const fn dma1_int_reg(
208        &self,
209    ) -> &'static crate::common::Reg<self::Dma1IntReg_SPEC, crate::common::RW> {
210        unsafe {
211            crate::common::Reg::<self::Dma1IntReg_SPEC, crate::common::RW>::from_ptr(
212                self._svd2pac_as_ptr().add(24usize),
213            )
214        }
215    }
216
217    #[doc = "DMA receive length register channel 1"]
218    #[inline(always)]
219    pub const fn dma1_len_reg(
220        &self,
221    ) -> &'static crate::common::Reg<self::Dma1LenReg_SPEC, crate::common::RW> {
222        unsafe {
223            crate::common::Reg::<self::Dma1LenReg_SPEC, crate::common::RW>::from_ptr(
224                self._svd2pac_as_ptr().add(26usize),
225            )
226        }
227    }
228
229    #[doc = "Start address High A of DMA channel 2"]
230    #[inline(always)]
231    pub const fn dma2_a_starth_reg(
232        &self,
233    ) -> &'static crate::common::Reg<self::Dma2AStarthReg_SPEC, crate::common::RW> {
234        unsafe {
235            crate::common::Reg::<self::Dma2AStarthReg_SPEC, crate::common::RW>::from_ptr(
236                self._svd2pac_as_ptr().add(34usize),
237            )
238        }
239    }
240
241    #[doc = "Start address Low A of DMA channel 2"]
242    #[inline(always)]
243    pub const fn dma2_a_startl_reg(
244        &self,
245    ) -> &'static crate::common::Reg<self::Dma2AStartlReg_SPEC, crate::common::RW> {
246        unsafe {
247            crate::common::Reg::<self::Dma2AStartlReg_SPEC, crate::common::RW>::from_ptr(
248                self._svd2pac_as_ptr().add(32usize),
249            )
250        }
251    }
252
253    #[doc = "Start address High B of DMA channel 2"]
254    #[inline(always)]
255    pub const fn dma2_b_starth_reg(
256        &self,
257    ) -> &'static crate::common::Reg<self::Dma2BStarthReg_SPEC, crate::common::RW> {
258        unsafe {
259            crate::common::Reg::<self::Dma2BStarthReg_SPEC, crate::common::RW>::from_ptr(
260                self._svd2pac_as_ptr().add(38usize),
261            )
262        }
263    }
264
265    #[doc = "Start address Low B of DMA channel 2"]
266    #[inline(always)]
267    pub const fn dma2_b_startl_reg(
268        &self,
269    ) -> &'static crate::common::Reg<self::Dma2BStartlReg_SPEC, crate::common::RW> {
270        unsafe {
271            crate::common::Reg::<self::Dma2BStartlReg_SPEC, crate::common::RW>::from_ptr(
272                self._svd2pac_as_ptr().add(36usize),
273            )
274        }
275    }
276
277    #[doc = "Control register for the DMA channel 2"]
278    #[inline(always)]
279    pub const fn dma2_ctrl_reg(
280        &self,
281    ) -> &'static crate::common::Reg<self::Dma2CtrlReg_SPEC, crate::common::RW> {
282        unsafe {
283            crate::common::Reg::<self::Dma2CtrlReg_SPEC, crate::common::RW>::from_ptr(
284                self._svd2pac_as_ptr().add(44usize),
285            )
286        }
287    }
288
289    #[doc = "Index value of DMA channel 2"]
290    #[inline(always)]
291    pub const fn dma2_idx_reg(
292        &self,
293    ) -> &'static crate::common::Reg<self::Dma2IdxReg_SPEC, crate::common::RW> {
294        unsafe {
295            crate::common::Reg::<self::Dma2IdxReg_SPEC, crate::common::RW>::from_ptr(
296                self._svd2pac_as_ptr().add(46usize),
297            )
298        }
299    }
300
301    #[doc = "DMA receive interrupt register channel 2"]
302    #[inline(always)]
303    pub const fn dma2_int_reg(
304        &self,
305    ) -> &'static crate::common::Reg<self::Dma2IntReg_SPEC, crate::common::RW> {
306        unsafe {
307            crate::common::Reg::<self::Dma2IntReg_SPEC, crate::common::RW>::from_ptr(
308                self._svd2pac_as_ptr().add(40usize),
309            )
310        }
311    }
312
313    #[doc = "DMA receive length register channel 2"]
314    #[inline(always)]
315    pub const fn dma2_len_reg(
316        &self,
317    ) -> &'static crate::common::Reg<self::Dma2LenReg_SPEC, crate::common::RW> {
318        unsafe {
319            crate::common::Reg::<self::Dma2LenReg_SPEC, crate::common::RW>::from_ptr(
320                self._svd2pac_as_ptr().add(42usize),
321            )
322        }
323    }
324
325    #[doc = "Start address High A of DMA channel 3"]
326    #[inline(always)]
327    pub const fn dma3_a_starth_reg(
328        &self,
329    ) -> &'static crate::common::Reg<self::Dma3AStarthReg_SPEC, crate::common::RW> {
330        unsafe {
331            crate::common::Reg::<self::Dma3AStarthReg_SPEC, crate::common::RW>::from_ptr(
332                self._svd2pac_as_ptr().add(50usize),
333            )
334        }
335    }
336
337    #[doc = "Start address Low A of DMA channel 3"]
338    #[inline(always)]
339    pub const fn dma3_a_startl_reg(
340        &self,
341    ) -> &'static crate::common::Reg<self::Dma3AStartlReg_SPEC, crate::common::RW> {
342        unsafe {
343            crate::common::Reg::<self::Dma3AStartlReg_SPEC, crate::common::RW>::from_ptr(
344                self._svd2pac_as_ptr().add(48usize),
345            )
346        }
347    }
348
349    #[doc = "Start address High B of DMA channel 3"]
350    #[inline(always)]
351    pub const fn dma3_b_starth_reg(
352        &self,
353    ) -> &'static crate::common::Reg<self::Dma3BStarthReg_SPEC, crate::common::RW> {
354        unsafe {
355            crate::common::Reg::<self::Dma3BStarthReg_SPEC, crate::common::RW>::from_ptr(
356                self._svd2pac_as_ptr().add(54usize),
357            )
358        }
359    }
360
361    #[doc = "Start address Low B of DMA channel 3"]
362    #[inline(always)]
363    pub const fn dma3_b_startl_reg(
364        &self,
365    ) -> &'static crate::common::Reg<self::Dma3BStartlReg_SPEC, crate::common::RW> {
366        unsafe {
367            crate::common::Reg::<self::Dma3BStartlReg_SPEC, crate::common::RW>::from_ptr(
368                self._svd2pac_as_ptr().add(52usize),
369            )
370        }
371    }
372
373    #[doc = "Control register for the DMA channel 3"]
374    #[inline(always)]
375    pub const fn dma3_ctrl_reg(
376        &self,
377    ) -> &'static crate::common::Reg<self::Dma3CtrlReg_SPEC, crate::common::RW> {
378        unsafe {
379            crate::common::Reg::<self::Dma3CtrlReg_SPEC, crate::common::RW>::from_ptr(
380                self._svd2pac_as_ptr().add(60usize),
381            )
382        }
383    }
384
385    #[doc = "Index value of DMA channel 3"]
386    #[inline(always)]
387    pub const fn dma3_idx_reg(
388        &self,
389    ) -> &'static crate::common::Reg<self::Dma3IdxReg_SPEC, crate::common::RW> {
390        unsafe {
391            crate::common::Reg::<self::Dma3IdxReg_SPEC, crate::common::RW>::from_ptr(
392                self._svd2pac_as_ptr().add(62usize),
393            )
394        }
395    }
396
397    #[doc = "DMA receive interrupt register channel 3"]
398    #[inline(always)]
399    pub const fn dma3_int_reg(
400        &self,
401    ) -> &'static crate::common::Reg<self::Dma3IntReg_SPEC, crate::common::RW> {
402        unsafe {
403            crate::common::Reg::<self::Dma3IntReg_SPEC, crate::common::RW>::from_ptr(
404                self._svd2pac_as_ptr().add(56usize),
405            )
406        }
407    }
408
409    #[doc = "DMA receive length register channel 3"]
410    #[inline(always)]
411    pub const fn dma3_len_reg(
412        &self,
413    ) -> &'static crate::common::Reg<self::Dma3LenReg_SPEC, crate::common::RW> {
414        unsafe {
415            crate::common::Reg::<self::Dma3LenReg_SPEC, crate::common::RW>::from_ptr(
416                self._svd2pac_as_ptr().add(58usize),
417            )
418        }
419    }
420
421    #[doc = "Start address High A of DMA channel 4"]
422    #[inline(always)]
423    pub const fn dma4_a_starth_reg(
424        &self,
425    ) -> &'static crate::common::Reg<self::Dma4AStarthReg_SPEC, crate::common::RW> {
426        unsafe {
427            crate::common::Reg::<self::Dma4AStarthReg_SPEC, crate::common::RW>::from_ptr(
428                self._svd2pac_as_ptr().add(66usize),
429            )
430        }
431    }
432
433    #[doc = "Start address Low A of DMA channel 4"]
434    #[inline(always)]
435    pub const fn dma4_a_startl_reg(
436        &self,
437    ) -> &'static crate::common::Reg<self::Dma4AStartlReg_SPEC, crate::common::RW> {
438        unsafe {
439            crate::common::Reg::<self::Dma4AStartlReg_SPEC, crate::common::RW>::from_ptr(
440                self._svd2pac_as_ptr().add(64usize),
441            )
442        }
443    }
444
445    #[doc = "Start address High B of DMA channel 4"]
446    #[inline(always)]
447    pub const fn dma4_b_starth_reg(
448        &self,
449    ) -> &'static crate::common::Reg<self::Dma4BStarthReg_SPEC, crate::common::RW> {
450        unsafe {
451            crate::common::Reg::<self::Dma4BStarthReg_SPEC, crate::common::RW>::from_ptr(
452                self._svd2pac_as_ptr().add(70usize),
453            )
454        }
455    }
456
457    #[doc = "Start address Low B of DMA channel 4"]
458    #[inline(always)]
459    pub const fn dma4_b_startl_reg(
460        &self,
461    ) -> &'static crate::common::Reg<self::Dma4BStartlReg_SPEC, crate::common::RW> {
462        unsafe {
463            crate::common::Reg::<self::Dma4BStartlReg_SPEC, crate::common::RW>::from_ptr(
464                self._svd2pac_as_ptr().add(68usize),
465            )
466        }
467    }
468
469    #[doc = "Control register for the DMA channel 4"]
470    #[inline(always)]
471    pub const fn dma4_ctrl_reg(
472        &self,
473    ) -> &'static crate::common::Reg<self::Dma4CtrlReg_SPEC, crate::common::RW> {
474        unsafe {
475            crate::common::Reg::<self::Dma4CtrlReg_SPEC, crate::common::RW>::from_ptr(
476                self._svd2pac_as_ptr().add(76usize),
477            )
478        }
479    }
480
481    #[doc = "Index value of DMA channel 4"]
482    #[inline(always)]
483    pub const fn dma4_idx_reg(
484        &self,
485    ) -> &'static crate::common::Reg<self::Dma4IdxReg_SPEC, crate::common::RW> {
486        unsafe {
487            crate::common::Reg::<self::Dma4IdxReg_SPEC, crate::common::RW>::from_ptr(
488                self._svd2pac_as_ptr().add(78usize),
489            )
490        }
491    }
492
493    #[doc = "DMA receive interrupt register channel 4"]
494    #[inline(always)]
495    pub const fn dma4_int_reg(
496        &self,
497    ) -> &'static crate::common::Reg<self::Dma4IntReg_SPEC, crate::common::RW> {
498        unsafe {
499            crate::common::Reg::<self::Dma4IntReg_SPEC, crate::common::RW>::from_ptr(
500                self._svd2pac_as_ptr().add(72usize),
501            )
502        }
503    }
504
505    #[doc = "DMA receive length register channel 4"]
506    #[inline(always)]
507    pub const fn dma4_len_reg(
508        &self,
509    ) -> &'static crate::common::Reg<self::Dma4LenReg_SPEC, crate::common::RW> {
510        unsafe {
511            crate::common::Reg::<self::Dma4LenReg_SPEC, crate::common::RW>::from_ptr(
512                self._svd2pac_as_ptr().add(74usize),
513            )
514        }
515    }
516
517    #[doc = "Start address High A of DMA channel 5"]
518    #[inline(always)]
519    pub const fn dma5_a_starth_reg(
520        &self,
521    ) -> &'static crate::common::Reg<self::Dma5AStarthReg_SPEC, crate::common::RW> {
522        unsafe {
523            crate::common::Reg::<self::Dma5AStarthReg_SPEC, crate::common::RW>::from_ptr(
524                self._svd2pac_as_ptr().add(82usize),
525            )
526        }
527    }
528
529    #[doc = "Start address Low A of DMA channel 5"]
530    #[inline(always)]
531    pub const fn dma5_a_startl_reg(
532        &self,
533    ) -> &'static crate::common::Reg<self::Dma5AStartlReg_SPEC, crate::common::RW> {
534        unsafe {
535            crate::common::Reg::<self::Dma5AStartlReg_SPEC, crate::common::RW>::from_ptr(
536                self._svd2pac_as_ptr().add(80usize),
537            )
538        }
539    }
540
541    #[doc = "Start address High B of DMA channel 5"]
542    #[inline(always)]
543    pub const fn dma5_b_starth_reg(
544        &self,
545    ) -> &'static crate::common::Reg<self::Dma5BStarthReg_SPEC, crate::common::RW> {
546        unsafe {
547            crate::common::Reg::<self::Dma5BStarthReg_SPEC, crate::common::RW>::from_ptr(
548                self._svd2pac_as_ptr().add(86usize),
549            )
550        }
551    }
552
553    #[doc = "Start address Low B of DMA channel 5"]
554    #[inline(always)]
555    pub const fn dma5_b_startl_reg(
556        &self,
557    ) -> &'static crate::common::Reg<self::Dma5BStartlReg_SPEC, crate::common::RW> {
558        unsafe {
559            crate::common::Reg::<self::Dma5BStartlReg_SPEC, crate::common::RW>::from_ptr(
560                self._svd2pac_as_ptr().add(84usize),
561            )
562        }
563    }
564
565    #[doc = "Control register for the DMA channel 5"]
566    #[inline(always)]
567    pub const fn dma5_ctrl_reg(
568        &self,
569    ) -> &'static crate::common::Reg<self::Dma5CtrlReg_SPEC, crate::common::RW> {
570        unsafe {
571            crate::common::Reg::<self::Dma5CtrlReg_SPEC, crate::common::RW>::from_ptr(
572                self._svd2pac_as_ptr().add(92usize),
573            )
574        }
575    }
576
577    #[doc = "Index value of DMA channel 5"]
578    #[inline(always)]
579    pub const fn dma5_idx_reg(
580        &self,
581    ) -> &'static crate::common::Reg<self::Dma5IdxReg_SPEC, crate::common::RW> {
582        unsafe {
583            crate::common::Reg::<self::Dma5IdxReg_SPEC, crate::common::RW>::from_ptr(
584                self._svd2pac_as_ptr().add(94usize),
585            )
586        }
587    }
588
589    #[doc = "DMA receive interrupt register channel 5"]
590    #[inline(always)]
591    pub const fn dma5_int_reg(
592        &self,
593    ) -> &'static crate::common::Reg<self::Dma5IntReg_SPEC, crate::common::RW> {
594        unsafe {
595            crate::common::Reg::<self::Dma5IntReg_SPEC, crate::common::RW>::from_ptr(
596                self._svd2pac_as_ptr().add(88usize),
597            )
598        }
599    }
600
601    #[doc = "DMA receive length register channel 5"]
602    #[inline(always)]
603    pub const fn dma5_len_reg(
604        &self,
605    ) -> &'static crate::common::Reg<self::Dma5LenReg_SPEC, crate::common::RW> {
606        unsafe {
607            crate::common::Reg::<self::Dma5LenReg_SPEC, crate::common::RW>::from_ptr(
608                self._svd2pac_as_ptr().add(90usize),
609            )
610        }
611    }
612
613    #[doc = "Start address High A of DMA channel 6"]
614    #[inline(always)]
615    pub const fn dma6_a_starth_reg(
616        &self,
617    ) -> &'static crate::common::Reg<self::Dma6AStarthReg_SPEC, crate::common::RW> {
618        unsafe {
619            crate::common::Reg::<self::Dma6AStarthReg_SPEC, crate::common::RW>::from_ptr(
620                self._svd2pac_as_ptr().add(98usize),
621            )
622        }
623    }
624
625    #[doc = "Start address Low A of DMA channel 6"]
626    #[inline(always)]
627    pub const fn dma6_a_startl_reg(
628        &self,
629    ) -> &'static crate::common::Reg<self::Dma6AStartlReg_SPEC, crate::common::RW> {
630        unsafe {
631            crate::common::Reg::<self::Dma6AStartlReg_SPEC, crate::common::RW>::from_ptr(
632                self._svd2pac_as_ptr().add(96usize),
633            )
634        }
635    }
636
637    #[doc = "Start address High B of DMA channel 6"]
638    #[inline(always)]
639    pub const fn dma6_b_starth_reg(
640        &self,
641    ) -> &'static crate::common::Reg<self::Dma6BStarthReg_SPEC, crate::common::RW> {
642        unsafe {
643            crate::common::Reg::<self::Dma6BStarthReg_SPEC, crate::common::RW>::from_ptr(
644                self._svd2pac_as_ptr().add(102usize),
645            )
646        }
647    }
648
649    #[doc = "Start address Low B of DMA channel 6"]
650    #[inline(always)]
651    pub const fn dma6_b_startl_reg(
652        &self,
653    ) -> &'static crate::common::Reg<self::Dma6BStartlReg_SPEC, crate::common::RW> {
654        unsafe {
655            crate::common::Reg::<self::Dma6BStartlReg_SPEC, crate::common::RW>::from_ptr(
656                self._svd2pac_as_ptr().add(100usize),
657            )
658        }
659    }
660
661    #[doc = "Control register for the DMA channel 6"]
662    #[inline(always)]
663    pub const fn dma6_ctrl_reg(
664        &self,
665    ) -> &'static crate::common::Reg<self::Dma6CtrlReg_SPEC, crate::common::RW> {
666        unsafe {
667            crate::common::Reg::<self::Dma6CtrlReg_SPEC, crate::common::RW>::from_ptr(
668                self._svd2pac_as_ptr().add(108usize),
669            )
670        }
671    }
672
673    #[doc = "Index value of DMA channel 6"]
674    #[inline(always)]
675    pub const fn dma6_idx_reg(
676        &self,
677    ) -> &'static crate::common::Reg<self::Dma6IdxReg_SPEC, crate::common::RW> {
678        unsafe {
679            crate::common::Reg::<self::Dma6IdxReg_SPEC, crate::common::RW>::from_ptr(
680                self._svd2pac_as_ptr().add(110usize),
681            )
682        }
683    }
684
685    #[doc = "DMA receive interrupt register channel 6"]
686    #[inline(always)]
687    pub const fn dma6_int_reg(
688        &self,
689    ) -> &'static crate::common::Reg<self::Dma6IntReg_SPEC, crate::common::RW> {
690        unsafe {
691            crate::common::Reg::<self::Dma6IntReg_SPEC, crate::common::RW>::from_ptr(
692                self._svd2pac_as_ptr().add(104usize),
693            )
694        }
695    }
696
697    #[doc = "DMA receive length register channel 6"]
698    #[inline(always)]
699    pub const fn dma6_len_reg(
700        &self,
701    ) -> &'static crate::common::Reg<self::Dma6LenReg_SPEC, crate::common::RW> {
702        unsafe {
703            crate::common::Reg::<self::Dma6LenReg_SPEC, crate::common::RW>::from_ptr(
704                self._svd2pac_as_ptr().add(106usize),
705            )
706        }
707    }
708
709    #[doc = "Start address High A of DMA channel 7"]
710    #[inline(always)]
711    pub const fn dma7_a_starth_reg(
712        &self,
713    ) -> &'static crate::common::Reg<self::Dma7AStarthReg_SPEC, crate::common::RW> {
714        unsafe {
715            crate::common::Reg::<self::Dma7AStarthReg_SPEC, crate::common::RW>::from_ptr(
716                self._svd2pac_as_ptr().add(114usize),
717            )
718        }
719    }
720
721    #[doc = "Start address Low A of DMA channel 7"]
722    #[inline(always)]
723    pub const fn dma7_a_startl_reg(
724        &self,
725    ) -> &'static crate::common::Reg<self::Dma7AStartlReg_SPEC, crate::common::RW> {
726        unsafe {
727            crate::common::Reg::<self::Dma7AStartlReg_SPEC, crate::common::RW>::from_ptr(
728                self._svd2pac_as_ptr().add(112usize),
729            )
730        }
731    }
732
733    #[doc = "Start address High B of DMA channel 7"]
734    #[inline(always)]
735    pub const fn dma7_b_starth_reg(
736        &self,
737    ) -> &'static crate::common::Reg<self::Dma7BStarthReg_SPEC, crate::common::RW> {
738        unsafe {
739            crate::common::Reg::<self::Dma7BStarthReg_SPEC, crate::common::RW>::from_ptr(
740                self._svd2pac_as_ptr().add(118usize),
741            )
742        }
743    }
744
745    #[doc = "Start address Low B of DMA channel 7"]
746    #[inline(always)]
747    pub const fn dma7_b_startl_reg(
748        &self,
749    ) -> &'static crate::common::Reg<self::Dma7BStartlReg_SPEC, crate::common::RW> {
750        unsafe {
751            crate::common::Reg::<self::Dma7BStartlReg_SPEC, crate::common::RW>::from_ptr(
752                self._svd2pac_as_ptr().add(116usize),
753            )
754        }
755    }
756
757    #[doc = "Control register for the DMA channel 7"]
758    #[inline(always)]
759    pub const fn dma7_ctrl_reg(
760        &self,
761    ) -> &'static crate::common::Reg<self::Dma7CtrlReg_SPEC, crate::common::RW> {
762        unsafe {
763            crate::common::Reg::<self::Dma7CtrlReg_SPEC, crate::common::RW>::from_ptr(
764                self._svd2pac_as_ptr().add(124usize),
765            )
766        }
767    }
768
769    #[doc = "Index value of DMA channel 7"]
770    #[inline(always)]
771    pub const fn dma7_idx_reg(
772        &self,
773    ) -> &'static crate::common::Reg<self::Dma7IdxReg_SPEC, crate::common::RW> {
774        unsafe {
775            crate::common::Reg::<self::Dma7IdxReg_SPEC, crate::common::RW>::from_ptr(
776                self._svd2pac_as_ptr().add(126usize),
777            )
778        }
779    }
780
781    #[doc = "DMA receive interrupt register channel 7"]
782    #[inline(always)]
783    pub const fn dma7_int_reg(
784        &self,
785    ) -> &'static crate::common::Reg<self::Dma7IntReg_SPEC, crate::common::RW> {
786        unsafe {
787            crate::common::Reg::<self::Dma7IntReg_SPEC, crate::common::RW>::from_ptr(
788                self._svd2pac_as_ptr().add(120usize),
789            )
790        }
791    }
792
793    #[doc = "DMA receive length register channel 7"]
794    #[inline(always)]
795    pub const fn dma7_len_reg(
796        &self,
797    ) -> &'static crate::common::Reg<self::Dma7LenReg_SPEC, crate::common::RW> {
798        unsafe {
799            crate::common::Reg::<self::Dma7LenReg_SPEC, crate::common::RW>::from_ptr(
800                self._svd2pac_as_ptr().add(122usize),
801            )
802        }
803    }
804
805    #[doc = "DMA clear interrupt register"]
806    #[inline(always)]
807    pub const fn dma_clear_int_reg(
808        &self,
809    ) -> &'static crate::common::Reg<self::DmaClearIntReg_SPEC, crate::common::RW> {
810        unsafe {
811            crate::common::Reg::<self::DmaClearIntReg_SPEC, crate::common::RW>::from_ptr(
812                self._svd2pac_as_ptr().add(132usize),
813            )
814        }
815    }
816
817    #[doc = "DMA interrupt status register"]
818    #[inline(always)]
819    pub const fn dma_int_status_reg(
820        &self,
821    ) -> &'static crate::common::Reg<self::DmaIntStatusReg_SPEC, crate::common::RW> {
822        unsafe {
823            crate::common::Reg::<self::DmaIntStatusReg_SPEC, crate::common::RW>::from_ptr(
824                self._svd2pac_as_ptr().add(130usize),
825            )
826        }
827    }
828
829    #[doc = "DMA channel assignments"]
830    #[inline(always)]
831    pub const fn dma_req_mux_reg(
832        &self,
833    ) -> &'static crate::common::Reg<self::DmaReqMuxReg_SPEC, crate::common::RW> {
834        unsafe {
835            crate::common::Reg::<self::DmaReqMuxReg_SPEC, crate::common::RW>::from_ptr(
836                self._svd2pac_as_ptr().add(128usize),
837            )
838        }
839    }
840}
841#[doc(hidden)]
842#[derive(Copy, Clone, Eq, PartialEq)]
843pub struct Dma0AStarthReg_SPEC;
844impl crate::sealed::RegSpec for Dma0AStarthReg_SPEC {
845    type DataType = u16;
846}
847
848#[doc = "Start address High A of DMA channel 0"]
849pub type Dma0AStarthReg = crate::RegValueT<Dma0AStarthReg_SPEC>;
850
851impl Dma0AStarthReg {
852    #[doc = "Source start address, upper 16 bits"]
853    #[inline(always)]
854    pub fn dma0_a_starth(
855        self,
856    ) -> crate::common::RegisterField<
857        0,
858        0xffff,
859        1,
860        0,
861        u16,
862        u16,
863        Dma0AStarthReg_SPEC,
864        crate::common::RW,
865    > {
866        crate::common::RegisterField::<
867            0,
868            0xffff,
869            1,
870            0,
871            u16,
872            u16,
873            Dma0AStarthReg_SPEC,
874            crate::common::RW,
875        >::from_register(self, 0)
876    }
877}
878impl ::core::default::Default for Dma0AStarthReg {
879    #[inline(always)]
880    fn default() -> Dma0AStarthReg {
881        <crate::RegValueT<Dma0AStarthReg_SPEC> as RegisterValue<_>>::new(0)
882    }
883}
884
885#[doc(hidden)]
886#[derive(Copy, Clone, Eq, PartialEq)]
887pub struct Dma0AStartlReg_SPEC;
888impl crate::sealed::RegSpec for Dma0AStartlReg_SPEC {
889    type DataType = u16;
890}
891
892#[doc = "Start address Low A of DMA channel 0"]
893pub type Dma0AStartlReg = crate::RegValueT<Dma0AStartlReg_SPEC>;
894
895impl Dma0AStartlReg {
896    #[doc = "Source start address, lower 16 bits"]
897    #[inline(always)]
898    pub fn dma0_a_startl(
899        self,
900    ) -> crate::common::RegisterField<
901        0,
902        0xffff,
903        1,
904        0,
905        u16,
906        u16,
907        Dma0AStartlReg_SPEC,
908        crate::common::RW,
909    > {
910        crate::common::RegisterField::<
911            0,
912            0xffff,
913            1,
914            0,
915            u16,
916            u16,
917            Dma0AStartlReg_SPEC,
918            crate::common::RW,
919        >::from_register(self, 0)
920    }
921}
922impl ::core::default::Default for Dma0AStartlReg {
923    #[inline(always)]
924    fn default() -> Dma0AStartlReg {
925        <crate::RegValueT<Dma0AStartlReg_SPEC> as RegisterValue<_>>::new(0)
926    }
927}
928
929#[doc(hidden)]
930#[derive(Copy, Clone, Eq, PartialEq)]
931pub struct Dma0BStarthReg_SPEC;
932impl crate::sealed::RegSpec for Dma0BStarthReg_SPEC {
933    type DataType = u16;
934}
935
936#[doc = "Start address High B of DMA channel 0"]
937pub type Dma0BStarthReg = crate::RegValueT<Dma0BStarthReg_SPEC>;
938
939impl Dma0BStarthReg {
940    #[doc = "Destination start address, upper 16 bits"]
941    #[inline(always)]
942    pub fn dma0_b_starth(
943        self,
944    ) -> crate::common::RegisterField<
945        0,
946        0xffff,
947        1,
948        0,
949        u16,
950        u16,
951        Dma0BStarthReg_SPEC,
952        crate::common::RW,
953    > {
954        crate::common::RegisterField::<
955            0,
956            0xffff,
957            1,
958            0,
959            u16,
960            u16,
961            Dma0BStarthReg_SPEC,
962            crate::common::RW,
963        >::from_register(self, 0)
964    }
965}
966impl ::core::default::Default for Dma0BStarthReg {
967    #[inline(always)]
968    fn default() -> Dma0BStarthReg {
969        <crate::RegValueT<Dma0BStarthReg_SPEC> as RegisterValue<_>>::new(0)
970    }
971}
972
973#[doc(hidden)]
974#[derive(Copy, Clone, Eq, PartialEq)]
975pub struct Dma0BStartlReg_SPEC;
976impl crate::sealed::RegSpec for Dma0BStartlReg_SPEC {
977    type DataType = u16;
978}
979
980#[doc = "Start address Low B of DMA channel 0"]
981pub type Dma0BStartlReg = crate::RegValueT<Dma0BStartlReg_SPEC>;
982
983impl Dma0BStartlReg {
984    #[doc = "Destination start address, lower 16 bits"]
985    #[inline(always)]
986    pub fn dma0_b_startl(
987        self,
988    ) -> crate::common::RegisterField<
989        0,
990        0xffff,
991        1,
992        0,
993        u16,
994        u16,
995        Dma0BStartlReg_SPEC,
996        crate::common::RW,
997    > {
998        crate::common::RegisterField::<
999            0,
1000            0xffff,
1001            1,
1002            0,
1003            u16,
1004            u16,
1005            Dma0BStartlReg_SPEC,
1006            crate::common::RW,
1007        >::from_register(self, 0)
1008    }
1009}
1010impl ::core::default::Default for Dma0BStartlReg {
1011    #[inline(always)]
1012    fn default() -> Dma0BStartlReg {
1013        <crate::RegValueT<Dma0BStartlReg_SPEC> as RegisterValue<_>>::new(0)
1014    }
1015}
1016
1017#[doc(hidden)]
1018#[derive(Copy, Clone, Eq, PartialEq)]
1019pub struct Dma0CtrlReg_SPEC;
1020impl crate::sealed::RegSpec for Dma0CtrlReg_SPEC {
1021    type DataType = u16;
1022}
1023
1024#[doc = "Control register for the DMA channel 0"]
1025pub type Dma0CtrlReg = crate::RegValueT<Dma0CtrlReg_SPEC>;
1026
1027impl Dma0CtrlReg {
1028    #[doc = "0 = DMA operates with level-sensitive peripheral requests (default)\n1 = DMA operates with (positive) edge-sensitive peripheral requests"]
1029    #[inline(always)]
1030    pub fn req_sense(
1031        self,
1032    ) -> crate::common::RegisterFieldBool<13, 1, 0, Dma0CtrlReg_SPEC, crate::common::RW> {
1033        crate::common::RegisterFieldBool::<13,1,0,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1034    }
1035
1036    #[doc = "0 = DMA performs copy A1 to B1, A2 to B2, etc ...\n1 = DMA performs copy of A1 to B1, B2, etc ...\nThis feature is useful for memory initialization to any value. Thus, BINC must be set to \'1\', while AINC is don\'t care, as only one fetch from A is done. This process cannot be interrupted by other DMA channels. It is also noted that DMA_INIT should not be used when DREQ_MODE=\'1\'."]
1037    #[inline(always)]
1038    pub fn dma_init(
1039        self,
1040    ) -> crate::common::RegisterFieldBool<12, 1, 0, Dma0CtrlReg_SPEC, crate::common::RW> {
1041        crate::common::RegisterFieldBool::<12,1,0,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1042    }
1043
1044    #[doc = "0 = Blocking mode, the DMA performs a fast back-to-back copy, disabling bus access for any bus master with lower priority.\n1 = Interrupting mode, the DMA inserts a wait cycle after each store allowing the CPU to steal cycles or cache to perform a burst read. If DREQ_MODE=\'1\', DMA_IDLE is don\'t care."]
1045    #[inline(always)]
1046    pub fn dma_idle(
1047        self,
1048    ) -> crate::common::RegisterFieldBool<11, 1, 0, Dma0CtrlReg_SPEC, crate::common::RW> {
1049        crate::common::RegisterFieldBool::<11,1,0,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1050    }
1051
1052    #[doc = "The priority level determines which DMA channel will be granted access for transferring data, in case more than one channels are active and request the bus at the same time. The greater the value, the higher the priority. In specific:\n000 = lowest priority\n111 = highest priority\nIf different channels with equal priority level values request the bus at the same time, an inherent priority mechanism is applied. According to this mechanism, if, for example, both the DMA0 and DMA1 channels have the same priority level, then DMA0 will first be granted access to the bus."]
1053    #[inline(always)]
1054    pub fn dma_prio(
1055        self,
1056    ) -> crate::common::RegisterField<8, 0x7, 1, 0, u8, u8, Dma0CtrlReg_SPEC, crate::common::RW>
1057    {
1058        crate::common::RegisterField::<8,0x7,1,0,u8,u8,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1059    }
1060
1061    #[doc = "0 = Normal mode. The DMA channel stops after having completed the transfer of length determined by DMAx_LEN_REG. DMA_ON automatically deasserts when the transfer is completed.\n1 = Circular mode (applicable only if DREQ_MODE = \'1\'). In this mode, DMA_ON never deasserts, as the DMA channel automatically resets DMAx_IDX_REG and starts a new transfer."]
1062    #[inline(always)]
1063    pub fn circular(
1064        self,
1065    ) -> crate::common::RegisterFieldBool<7, 1, 0, Dma0CtrlReg_SPEC, crate::common::RW> {
1066        crate::common::RegisterFieldBool::<7,1,0,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1067    }
1068
1069    #[doc = "Enable increment of source address.\n0 = do not increment (source address stays the same during the transfer)\n1 = increment according to the value of BW bit-field (by 1, when BW=\"00\" ; by 2, when BW=\"01\" ; by 4, when BW=\"10\")"]
1070    #[inline(always)]
1071    pub fn ainc(
1072        self,
1073    ) -> crate::common::RegisterFieldBool<6, 1, 0, Dma0CtrlReg_SPEC, crate::common::RW> {
1074        crate::common::RegisterFieldBool::<6,1,0,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1075    }
1076
1077    #[doc = "Enable increment of destination address.\n0 = do not increment (destination address stays the same during the transfer)\n1 = increment according to the value of BW bit-field (by 1, when BW=\"00\" ; by 2, when BW=\"01\" ; by 4, when BW=\"10\")"]
1078    #[inline(always)]
1079    pub fn binc(
1080        self,
1081    ) -> crate::common::RegisterFieldBool<5, 1, 0, Dma0CtrlReg_SPEC, crate::common::RW> {
1082        crate::common::RegisterFieldBool::<5,1,0,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1083    }
1084
1085    #[doc = "0 = DMA channel starts immediately\n1 = DMA channel must be triggered by peripheral DMA request (see also the description of DMA_REQ_MUX_REG)"]
1086    #[inline(always)]
1087    pub fn dreq_mode(
1088        self,
1089    ) -> crate::common::RegisterFieldBool<4, 1, 0, Dma0CtrlReg_SPEC, crate::common::RW> {
1090        crate::common::RegisterFieldBool::<4,1,0,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1091    }
1092
1093    #[doc = "0 = disable interrupt on this channel\n1 = enable interrupt on this channel"]
1094    #[inline(always)]
1095    pub fn irq_enable(
1096        self,
1097    ) -> crate::common::RegisterFieldBool<3, 1, 0, Dma0CtrlReg_SPEC, crate::common::RW> {
1098        crate::common::RegisterFieldBool::<3,1,0,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1099    }
1100
1101    #[doc = "Bus transfer width:\n00 = 1 Byte (suggested for peripherals like UART and 8-bit SPI)\n01 = 2 Bytes (suggested for peripherals like I2C and 16-bit SPI)\n10 = 4 Bytes (suggested for Memory-to-Memory transfers)\n11 = Reserved"]
1102    #[inline(always)]
1103    pub fn bw(
1104        self,
1105    ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, Dma0CtrlReg_SPEC, crate::common::RW>
1106    {
1107        crate::common::RegisterField::<1,0x3,1,0,u8,u8,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1108    }
1109
1110    #[doc = "0 = DMA channel is off, clocks are disabled\n1 = DMA channel is enabled. This bit will be automatically cleared after the completion of a transfer, if circular mode is not enabled. In circular mode, this bit stays set."]
1111    #[inline(always)]
1112    pub fn dma_on(
1113        self,
1114    ) -> crate::common::RegisterFieldBool<0, 1, 0, Dma0CtrlReg_SPEC, crate::common::RW> {
1115        crate::common::RegisterFieldBool::<0,1,0,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1116    }
1117}
1118impl ::core::default::Default for Dma0CtrlReg {
1119    #[inline(always)]
1120    fn default() -> Dma0CtrlReg {
1121        <crate::RegValueT<Dma0CtrlReg_SPEC> as RegisterValue<_>>::new(0)
1122    }
1123}
1124
1125#[doc(hidden)]
1126#[derive(Copy, Clone, Eq, PartialEq)]
1127pub struct Dma0IdxReg_SPEC;
1128impl crate::sealed::RegSpec for Dma0IdxReg_SPEC {
1129    type DataType = u16;
1130}
1131
1132#[doc = "Index value of DMA channel 0"]
1133pub type Dma0IdxReg = crate::RegValueT<Dma0IdxReg_SPEC>;
1134
1135impl Dma0IdxReg {
1136    #[doc = "This (read-only) register determines the data items currently fetched by the DMA channel, during an on-going transfer. When the transfer is completed, the register is automatically reset to 0.\nThe DMA channel uses this register to form the source/destination address of the next DMA cycle, considering also AINC/BINC and BW."]
1137    #[inline(always)]
1138    pub fn dma0_idx(
1139        self,
1140    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma0IdxReg_SPEC, crate::common::R>
1141    {
1142        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma0IdxReg_SPEC,crate::common::R>::from_register(self,0)
1143    }
1144}
1145impl ::core::default::Default for Dma0IdxReg {
1146    #[inline(always)]
1147    fn default() -> Dma0IdxReg {
1148        <crate::RegValueT<Dma0IdxReg_SPEC> as RegisterValue<_>>::new(0)
1149    }
1150}
1151
1152#[doc(hidden)]
1153#[derive(Copy, Clone, Eq, PartialEq)]
1154pub struct Dma0IntReg_SPEC;
1155impl crate::sealed::RegSpec for Dma0IntReg_SPEC {
1156    type DataType = u16;
1157}
1158
1159#[doc = "DMA receive interrupt register channel 0"]
1160pub type Dma0IntReg = crate::RegValueT<Dma0IntReg_SPEC>;
1161
1162impl Dma0IntReg {
1163    #[doc = "Number of transfers until an interrupt is generated. The interrupt is generated after a transfer, if DMAx_INT_REG is equal to DMAx_IDX_REG and before DMAx_IDX_REG is incremented. The bit-field IRQ_ENABLE of DMAx_CTRL_REG must be set to \'1\' to let the controller generate the interrupt."]
1164    #[inline(always)]
1165    pub fn dma0_int(
1166        self,
1167    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma0IntReg_SPEC, crate::common::RW>
1168    {
1169        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma0IntReg_SPEC,crate::common::RW>::from_register(self,0)
1170    }
1171}
1172impl ::core::default::Default for Dma0IntReg {
1173    #[inline(always)]
1174    fn default() -> Dma0IntReg {
1175        <crate::RegValueT<Dma0IntReg_SPEC> as RegisterValue<_>>::new(0)
1176    }
1177}
1178
1179#[doc(hidden)]
1180#[derive(Copy, Clone, Eq, PartialEq)]
1181pub struct Dma0LenReg_SPEC;
1182impl crate::sealed::RegSpec for Dma0LenReg_SPEC {
1183    type DataType = u16;
1184}
1185
1186#[doc = "DMA receive length register channel 0"]
1187pub type Dma0LenReg = crate::RegValueT<Dma0LenReg_SPEC>;
1188
1189impl Dma0LenReg {
1190    #[doc = "DMA channel\'s transfer length. DMAx_LEN of value 0, 1, 2, ... results into an actual transfer length of 1, 2, 3, ..."]
1191    #[inline(always)]
1192    pub fn dma0_len(
1193        self,
1194    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma0LenReg_SPEC, crate::common::RW>
1195    {
1196        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma0LenReg_SPEC,crate::common::RW>::from_register(self,0)
1197    }
1198}
1199impl ::core::default::Default for Dma0LenReg {
1200    #[inline(always)]
1201    fn default() -> Dma0LenReg {
1202        <crate::RegValueT<Dma0LenReg_SPEC> as RegisterValue<_>>::new(0)
1203    }
1204}
1205
1206#[doc(hidden)]
1207#[derive(Copy, Clone, Eq, PartialEq)]
1208pub struct Dma1AStarthReg_SPEC;
1209impl crate::sealed::RegSpec for Dma1AStarthReg_SPEC {
1210    type DataType = u16;
1211}
1212
1213#[doc = "Start address High A of DMA channel 1"]
1214pub type Dma1AStarthReg = crate::RegValueT<Dma1AStarthReg_SPEC>;
1215
1216impl Dma1AStarthReg {
1217    #[doc = "Source start address, upper 16 bits"]
1218    #[inline(always)]
1219    pub fn dma1_a_starth(
1220        self,
1221    ) -> crate::common::RegisterField<
1222        0,
1223        0xffff,
1224        1,
1225        0,
1226        u16,
1227        u16,
1228        Dma1AStarthReg_SPEC,
1229        crate::common::RW,
1230    > {
1231        crate::common::RegisterField::<
1232            0,
1233            0xffff,
1234            1,
1235            0,
1236            u16,
1237            u16,
1238            Dma1AStarthReg_SPEC,
1239            crate::common::RW,
1240        >::from_register(self, 0)
1241    }
1242}
1243impl ::core::default::Default for Dma1AStarthReg {
1244    #[inline(always)]
1245    fn default() -> Dma1AStarthReg {
1246        <crate::RegValueT<Dma1AStarthReg_SPEC> as RegisterValue<_>>::new(0)
1247    }
1248}
1249
1250#[doc(hidden)]
1251#[derive(Copy, Clone, Eq, PartialEq)]
1252pub struct Dma1AStartlReg_SPEC;
1253impl crate::sealed::RegSpec for Dma1AStartlReg_SPEC {
1254    type DataType = u16;
1255}
1256
1257#[doc = "Start address Low A of DMA channel 1"]
1258pub type Dma1AStartlReg = crate::RegValueT<Dma1AStartlReg_SPEC>;
1259
1260impl Dma1AStartlReg {
1261    #[doc = "Source start address, lower 16 bits"]
1262    #[inline(always)]
1263    pub fn dma1_a_startl(
1264        self,
1265    ) -> crate::common::RegisterField<
1266        0,
1267        0xffff,
1268        1,
1269        0,
1270        u16,
1271        u16,
1272        Dma1AStartlReg_SPEC,
1273        crate::common::RW,
1274    > {
1275        crate::common::RegisterField::<
1276            0,
1277            0xffff,
1278            1,
1279            0,
1280            u16,
1281            u16,
1282            Dma1AStartlReg_SPEC,
1283            crate::common::RW,
1284        >::from_register(self, 0)
1285    }
1286}
1287impl ::core::default::Default for Dma1AStartlReg {
1288    #[inline(always)]
1289    fn default() -> Dma1AStartlReg {
1290        <crate::RegValueT<Dma1AStartlReg_SPEC> as RegisterValue<_>>::new(0)
1291    }
1292}
1293
1294#[doc(hidden)]
1295#[derive(Copy, Clone, Eq, PartialEq)]
1296pub struct Dma1BStarthReg_SPEC;
1297impl crate::sealed::RegSpec for Dma1BStarthReg_SPEC {
1298    type DataType = u16;
1299}
1300
1301#[doc = "Start address High B of DMA channel 1"]
1302pub type Dma1BStarthReg = crate::RegValueT<Dma1BStarthReg_SPEC>;
1303
1304impl Dma1BStarthReg {
1305    #[doc = "Destination start address, upper 16 bits"]
1306    #[inline(always)]
1307    pub fn dma1_b_starth(
1308        self,
1309    ) -> crate::common::RegisterField<
1310        0,
1311        0xffff,
1312        1,
1313        0,
1314        u16,
1315        u16,
1316        Dma1BStarthReg_SPEC,
1317        crate::common::RW,
1318    > {
1319        crate::common::RegisterField::<
1320            0,
1321            0xffff,
1322            1,
1323            0,
1324            u16,
1325            u16,
1326            Dma1BStarthReg_SPEC,
1327            crate::common::RW,
1328        >::from_register(self, 0)
1329    }
1330}
1331impl ::core::default::Default for Dma1BStarthReg {
1332    #[inline(always)]
1333    fn default() -> Dma1BStarthReg {
1334        <crate::RegValueT<Dma1BStarthReg_SPEC> as RegisterValue<_>>::new(0)
1335    }
1336}
1337
1338#[doc(hidden)]
1339#[derive(Copy, Clone, Eq, PartialEq)]
1340pub struct Dma1BStartlReg_SPEC;
1341impl crate::sealed::RegSpec for Dma1BStartlReg_SPEC {
1342    type DataType = u16;
1343}
1344
1345#[doc = "Start address Low B of DMA channel 1"]
1346pub type Dma1BStartlReg = crate::RegValueT<Dma1BStartlReg_SPEC>;
1347
1348impl Dma1BStartlReg {
1349    #[doc = "Destination start address, lower 16 bits"]
1350    #[inline(always)]
1351    pub fn dma1_b_startl(
1352        self,
1353    ) -> crate::common::RegisterField<
1354        0,
1355        0xffff,
1356        1,
1357        0,
1358        u16,
1359        u16,
1360        Dma1BStartlReg_SPEC,
1361        crate::common::RW,
1362    > {
1363        crate::common::RegisterField::<
1364            0,
1365            0xffff,
1366            1,
1367            0,
1368            u16,
1369            u16,
1370            Dma1BStartlReg_SPEC,
1371            crate::common::RW,
1372        >::from_register(self, 0)
1373    }
1374}
1375impl ::core::default::Default for Dma1BStartlReg {
1376    #[inline(always)]
1377    fn default() -> Dma1BStartlReg {
1378        <crate::RegValueT<Dma1BStartlReg_SPEC> as RegisterValue<_>>::new(0)
1379    }
1380}
1381
1382#[doc(hidden)]
1383#[derive(Copy, Clone, Eq, PartialEq)]
1384pub struct Dma1CtrlReg_SPEC;
1385impl crate::sealed::RegSpec for Dma1CtrlReg_SPEC {
1386    type DataType = u16;
1387}
1388
1389#[doc = "Control register for the DMA channel 1"]
1390pub type Dma1CtrlReg = crate::RegValueT<Dma1CtrlReg_SPEC>;
1391
1392impl Dma1CtrlReg {
1393    #[doc = "0 = DMA operates with level-sensitive peripheral requests (default)\n1 = DMA operates with (positive) edge-sensitive peripheral requests"]
1394    #[inline(always)]
1395    pub fn req_sense(
1396        self,
1397    ) -> crate::common::RegisterFieldBool<13, 1, 0, Dma1CtrlReg_SPEC, crate::common::RW> {
1398        crate::common::RegisterFieldBool::<13,1,0,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1399    }
1400
1401    #[doc = "0 = DMA performs copy A1 to B1, A2 to B2, etc ...\n1 = DMA performs copy of A1 to B1, B2, etc ...\nThis feature is useful for memory initialization to any value. Thus, BINC must be set to \'1\', while AINC is don\'t care, as only one fetch from A is done. This process cannot be interrupted by other DMA channels. It is also noted that DMA_INIT should not be used when DREQ_MODE=\'1\'."]
1402    #[inline(always)]
1403    pub fn dma_init(
1404        self,
1405    ) -> crate::common::RegisterFieldBool<12, 1, 0, Dma1CtrlReg_SPEC, crate::common::RW> {
1406        crate::common::RegisterFieldBool::<12,1,0,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1407    }
1408
1409    #[doc = "0 = Blocking mode, the DMA performs a fast back-to-back copy, disabling bus access for any bus master with lower priority.\n1 = Interrupting mode, the DMA inserts a wait cycle after each store allowing the CPU to steal cycles or cache to perform a burst read. If DREQ_MODE=\'1\', DMA_IDLE is don\'t care."]
1410    #[inline(always)]
1411    pub fn dma_idle(
1412        self,
1413    ) -> crate::common::RegisterFieldBool<11, 1, 0, Dma1CtrlReg_SPEC, crate::common::RW> {
1414        crate::common::RegisterFieldBool::<11,1,0,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1415    }
1416
1417    #[doc = "The priority level determines which DMA channel will be granted access for transferring data, in case more than one channels are active and request the bus at the same time. The greater the value, the higher the priority. In specific:\n000 = lowest priority\n111 = highest priority\nIf different channels with equal priority level values request the bus at the same time, an inherent priority mechanism is applied. According to this mechanism, if, for example, both the DMA0 and DMA1 channels have the same priority level, then DMA0 will first be granted access to the bus."]
1418    #[inline(always)]
1419    pub fn dma_prio(
1420        self,
1421    ) -> crate::common::RegisterField<8, 0x7, 1, 0, u8, u8, Dma1CtrlReg_SPEC, crate::common::RW>
1422    {
1423        crate::common::RegisterField::<8,0x7,1,0,u8,u8,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1424    }
1425
1426    #[doc = "0 = Normal mode. The DMA channel stops after having completed the transfer of length determined by DMAx_LEN_REG. DMA_ON automatically deasserts when the transfer is completed.\n1 = Circular mode (applicable only if DREQ_MODE = \'1\'). In this mode, DMA_ON never deasserts, as the DMA channel automatically resets DMAx_IDX_REG and starts a new transfer."]
1427    #[inline(always)]
1428    pub fn circular(
1429        self,
1430    ) -> crate::common::RegisterFieldBool<7, 1, 0, Dma1CtrlReg_SPEC, crate::common::RW> {
1431        crate::common::RegisterFieldBool::<7,1,0,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1432    }
1433
1434    #[doc = "Enable increment of source address.\n0 = do not increment (source address stays the same during the transfer)\n1 = increment according to the value of BW bit-field (by 1, when BW=\"00\" ; by 2, when BW=\"01\" ; by 4, when BW=\"10\")"]
1435    #[inline(always)]
1436    pub fn ainc(
1437        self,
1438    ) -> crate::common::RegisterFieldBool<6, 1, 0, Dma1CtrlReg_SPEC, crate::common::RW> {
1439        crate::common::RegisterFieldBool::<6,1,0,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1440    }
1441
1442    #[doc = "Enable increment of destination address.\n0 = do not increment (destination address stays the same during the transfer)\n1 = increment according to the value of BW bit-field (by 1, when BW=\"00\" ; by 2, when BW=\"01\" ; by 4, when BW=\"10\")"]
1443    #[inline(always)]
1444    pub fn binc(
1445        self,
1446    ) -> crate::common::RegisterFieldBool<5, 1, 0, Dma1CtrlReg_SPEC, crate::common::RW> {
1447        crate::common::RegisterFieldBool::<5,1,0,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1448    }
1449
1450    #[doc = "0 = DMA channel starts immediately\n1 = DMA channel must be triggered by peripheral DMA request (see also the description of DMA_REQ_MUX_REG)"]
1451    #[inline(always)]
1452    pub fn dreq_mode(
1453        self,
1454    ) -> crate::common::RegisterFieldBool<4, 1, 0, Dma1CtrlReg_SPEC, crate::common::RW> {
1455        crate::common::RegisterFieldBool::<4,1,0,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1456    }
1457
1458    #[doc = "0 = disable interrupt on this channel\n1 = enable interrupt on this channel"]
1459    #[inline(always)]
1460    pub fn irq_enable(
1461        self,
1462    ) -> crate::common::RegisterFieldBool<3, 1, 0, Dma1CtrlReg_SPEC, crate::common::RW> {
1463        crate::common::RegisterFieldBool::<3,1,0,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1464    }
1465
1466    #[doc = "Bus transfer width:\n00 = 1 Byte (suggested for peripherals like UART and 8-bit SPI)\n01 = 2 Bytes (suggested for peripherals like I2C and 16-bit SPI)\n10 = 4 Bytes (suggested for Memory-to-Memory transfers)\n11 = Reserved"]
1467    #[inline(always)]
1468    pub fn bw(
1469        self,
1470    ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, Dma1CtrlReg_SPEC, crate::common::RW>
1471    {
1472        crate::common::RegisterField::<1,0x3,1,0,u8,u8,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1473    }
1474
1475    #[doc = "0 = DMA channel is off, clocks are disabled\n1 = DMA channel is enabled. This bit will be automatically cleared after the completion of a transfer, if circular mode is not enabled. In circular mode, this bit stays set."]
1476    #[inline(always)]
1477    pub fn dma_on(
1478        self,
1479    ) -> crate::common::RegisterFieldBool<0, 1, 0, Dma1CtrlReg_SPEC, crate::common::RW> {
1480        crate::common::RegisterFieldBool::<0,1,0,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1481    }
1482}
1483impl ::core::default::Default for Dma1CtrlReg {
1484    #[inline(always)]
1485    fn default() -> Dma1CtrlReg {
1486        <crate::RegValueT<Dma1CtrlReg_SPEC> as RegisterValue<_>>::new(0)
1487    }
1488}
1489
1490#[doc(hidden)]
1491#[derive(Copy, Clone, Eq, PartialEq)]
1492pub struct Dma1IdxReg_SPEC;
1493impl crate::sealed::RegSpec for Dma1IdxReg_SPEC {
1494    type DataType = u16;
1495}
1496
1497#[doc = "Index value of DMA channel 1"]
1498pub type Dma1IdxReg = crate::RegValueT<Dma1IdxReg_SPEC>;
1499
1500impl Dma1IdxReg {
1501    #[doc = "This (read-only) register determines the data items currently fetched by the DMA channel, during an on-going transfer. When the transfer is completed, the register is automatically reset to 0.\nThe DMA channel uses this register to form the source/destination address of the next DMA cycle, considering also AINC/BINC and BW."]
1502    #[inline(always)]
1503    pub fn dma1_idx(
1504        self,
1505    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma1IdxReg_SPEC, crate::common::R>
1506    {
1507        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma1IdxReg_SPEC,crate::common::R>::from_register(self,0)
1508    }
1509}
1510impl ::core::default::Default for Dma1IdxReg {
1511    #[inline(always)]
1512    fn default() -> Dma1IdxReg {
1513        <crate::RegValueT<Dma1IdxReg_SPEC> as RegisterValue<_>>::new(0)
1514    }
1515}
1516
1517#[doc(hidden)]
1518#[derive(Copy, Clone, Eq, PartialEq)]
1519pub struct Dma1IntReg_SPEC;
1520impl crate::sealed::RegSpec for Dma1IntReg_SPEC {
1521    type DataType = u16;
1522}
1523
1524#[doc = "DMA receive interrupt register channel 1"]
1525pub type Dma1IntReg = crate::RegValueT<Dma1IntReg_SPEC>;
1526
1527impl Dma1IntReg {
1528    #[doc = "Number of transfers until an interrupt is generated. The interrupt is generated after a transfer, if DMAx_INT_REG is equal to DMAx_IDX_REG and before DMAx_IDX_REG is incremented. The bit-field IRQ_ENABLE of DMAx_CTRL_REG must be set to \'1\' to let the controller generate the interrupt."]
1529    #[inline(always)]
1530    pub fn dma1_int(
1531        self,
1532    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma1IntReg_SPEC, crate::common::RW>
1533    {
1534        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma1IntReg_SPEC,crate::common::RW>::from_register(self,0)
1535    }
1536}
1537impl ::core::default::Default for Dma1IntReg {
1538    #[inline(always)]
1539    fn default() -> Dma1IntReg {
1540        <crate::RegValueT<Dma1IntReg_SPEC> as RegisterValue<_>>::new(0)
1541    }
1542}
1543
1544#[doc(hidden)]
1545#[derive(Copy, Clone, Eq, PartialEq)]
1546pub struct Dma1LenReg_SPEC;
1547impl crate::sealed::RegSpec for Dma1LenReg_SPEC {
1548    type DataType = u16;
1549}
1550
1551#[doc = "DMA receive length register channel 1"]
1552pub type Dma1LenReg = crate::RegValueT<Dma1LenReg_SPEC>;
1553
1554impl Dma1LenReg {
1555    #[doc = "DMA channel\'s transfer length. DMAx_LEN of value 0, 1, 2, ... results into an actual transfer length of 1, 2, 3, ..."]
1556    #[inline(always)]
1557    pub fn dma1_len(
1558        self,
1559    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma1LenReg_SPEC, crate::common::RW>
1560    {
1561        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma1LenReg_SPEC,crate::common::RW>::from_register(self,0)
1562    }
1563}
1564impl ::core::default::Default for Dma1LenReg {
1565    #[inline(always)]
1566    fn default() -> Dma1LenReg {
1567        <crate::RegValueT<Dma1LenReg_SPEC> as RegisterValue<_>>::new(0)
1568    }
1569}
1570
1571#[doc(hidden)]
1572#[derive(Copy, Clone, Eq, PartialEq)]
1573pub struct Dma2AStarthReg_SPEC;
1574impl crate::sealed::RegSpec for Dma2AStarthReg_SPEC {
1575    type DataType = u16;
1576}
1577
1578#[doc = "Start address High A of DMA channel 2"]
1579pub type Dma2AStarthReg = crate::RegValueT<Dma2AStarthReg_SPEC>;
1580
1581impl Dma2AStarthReg {
1582    #[doc = "Source start address, upper 16 bits"]
1583    #[inline(always)]
1584    pub fn dma2_a_starth(
1585        self,
1586    ) -> crate::common::RegisterField<
1587        0,
1588        0xffff,
1589        1,
1590        0,
1591        u16,
1592        u16,
1593        Dma2AStarthReg_SPEC,
1594        crate::common::RW,
1595    > {
1596        crate::common::RegisterField::<
1597            0,
1598            0xffff,
1599            1,
1600            0,
1601            u16,
1602            u16,
1603            Dma2AStarthReg_SPEC,
1604            crate::common::RW,
1605        >::from_register(self, 0)
1606    }
1607}
1608impl ::core::default::Default for Dma2AStarthReg {
1609    #[inline(always)]
1610    fn default() -> Dma2AStarthReg {
1611        <crate::RegValueT<Dma2AStarthReg_SPEC> as RegisterValue<_>>::new(0)
1612    }
1613}
1614
1615#[doc(hidden)]
1616#[derive(Copy, Clone, Eq, PartialEq)]
1617pub struct Dma2AStartlReg_SPEC;
1618impl crate::sealed::RegSpec for Dma2AStartlReg_SPEC {
1619    type DataType = u16;
1620}
1621
1622#[doc = "Start address Low A of DMA channel 2"]
1623pub type Dma2AStartlReg = crate::RegValueT<Dma2AStartlReg_SPEC>;
1624
1625impl Dma2AStartlReg {
1626    #[doc = "Source start address, lower 16 bits"]
1627    #[inline(always)]
1628    pub fn dma2_a_startl(
1629        self,
1630    ) -> crate::common::RegisterField<
1631        0,
1632        0xffff,
1633        1,
1634        0,
1635        u16,
1636        u16,
1637        Dma2AStartlReg_SPEC,
1638        crate::common::RW,
1639    > {
1640        crate::common::RegisterField::<
1641            0,
1642            0xffff,
1643            1,
1644            0,
1645            u16,
1646            u16,
1647            Dma2AStartlReg_SPEC,
1648            crate::common::RW,
1649        >::from_register(self, 0)
1650    }
1651}
1652impl ::core::default::Default for Dma2AStartlReg {
1653    #[inline(always)]
1654    fn default() -> Dma2AStartlReg {
1655        <crate::RegValueT<Dma2AStartlReg_SPEC> as RegisterValue<_>>::new(0)
1656    }
1657}
1658
1659#[doc(hidden)]
1660#[derive(Copy, Clone, Eq, PartialEq)]
1661pub struct Dma2BStarthReg_SPEC;
1662impl crate::sealed::RegSpec for Dma2BStarthReg_SPEC {
1663    type DataType = u16;
1664}
1665
1666#[doc = "Start address High B of DMA channel 2"]
1667pub type Dma2BStarthReg = crate::RegValueT<Dma2BStarthReg_SPEC>;
1668
1669impl Dma2BStarthReg {
1670    #[doc = "Destination start address, upper 16 bits"]
1671    #[inline(always)]
1672    pub fn dma2_b_starth(
1673        self,
1674    ) -> crate::common::RegisterField<
1675        0,
1676        0xffff,
1677        1,
1678        0,
1679        u16,
1680        u16,
1681        Dma2BStarthReg_SPEC,
1682        crate::common::RW,
1683    > {
1684        crate::common::RegisterField::<
1685            0,
1686            0xffff,
1687            1,
1688            0,
1689            u16,
1690            u16,
1691            Dma2BStarthReg_SPEC,
1692            crate::common::RW,
1693        >::from_register(self, 0)
1694    }
1695}
1696impl ::core::default::Default for Dma2BStarthReg {
1697    #[inline(always)]
1698    fn default() -> Dma2BStarthReg {
1699        <crate::RegValueT<Dma2BStarthReg_SPEC> as RegisterValue<_>>::new(0)
1700    }
1701}
1702
1703#[doc(hidden)]
1704#[derive(Copy, Clone, Eq, PartialEq)]
1705pub struct Dma2BStartlReg_SPEC;
1706impl crate::sealed::RegSpec for Dma2BStartlReg_SPEC {
1707    type DataType = u16;
1708}
1709
1710#[doc = "Start address Low B of DMA channel 2"]
1711pub type Dma2BStartlReg = crate::RegValueT<Dma2BStartlReg_SPEC>;
1712
1713impl Dma2BStartlReg {
1714    #[doc = "Destination start address, lower 16 bits"]
1715    #[inline(always)]
1716    pub fn dma2_b_startl(
1717        self,
1718    ) -> crate::common::RegisterField<
1719        0,
1720        0xffff,
1721        1,
1722        0,
1723        u16,
1724        u16,
1725        Dma2BStartlReg_SPEC,
1726        crate::common::RW,
1727    > {
1728        crate::common::RegisterField::<
1729            0,
1730            0xffff,
1731            1,
1732            0,
1733            u16,
1734            u16,
1735            Dma2BStartlReg_SPEC,
1736            crate::common::RW,
1737        >::from_register(self, 0)
1738    }
1739}
1740impl ::core::default::Default for Dma2BStartlReg {
1741    #[inline(always)]
1742    fn default() -> Dma2BStartlReg {
1743        <crate::RegValueT<Dma2BStartlReg_SPEC> as RegisterValue<_>>::new(0)
1744    }
1745}
1746
1747#[doc(hidden)]
1748#[derive(Copy, Clone, Eq, PartialEq)]
1749pub struct Dma2CtrlReg_SPEC;
1750impl crate::sealed::RegSpec for Dma2CtrlReg_SPEC {
1751    type DataType = u16;
1752}
1753
1754#[doc = "Control register for the DMA channel 2"]
1755pub type Dma2CtrlReg = crate::RegValueT<Dma2CtrlReg_SPEC>;
1756
1757impl Dma2CtrlReg {
1758    #[doc = "0 = DMA operates with level-sensitive peripheral requests (default)\n1 = DMA operates with (positive) edge-sensitive peripheral requests"]
1759    #[inline(always)]
1760    pub fn req_sense(
1761        self,
1762    ) -> crate::common::RegisterFieldBool<13, 1, 0, Dma2CtrlReg_SPEC, crate::common::RW> {
1763        crate::common::RegisterFieldBool::<13,1,0,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1764    }
1765
1766    #[doc = "0 = DMA performs copy A1 to B1, A2 to B2, etc ...\n1 = DMA performs copy of A1 to B1, B2, etc ...\nThis feature is useful for memory initialization to any value. Thus, BINC must be set to \'1\', while AINC is don\'t care, as only one fetch from A is done. This process cannot be interrupted by other DMA channels. It is also noted that DMA_INIT should not be used when DREQ_MODE=\'1\'."]
1767    #[inline(always)]
1768    pub fn dma_init(
1769        self,
1770    ) -> crate::common::RegisterFieldBool<12, 1, 0, Dma2CtrlReg_SPEC, crate::common::RW> {
1771        crate::common::RegisterFieldBool::<12,1,0,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1772    }
1773
1774    #[doc = "0 = Blocking mode, the DMA performs a fast back-to-back copy, disabling bus access for any bus master with lower priority.\n1 = Interrupting mode, the DMA inserts a wait cycle after each store allowing the CPU to steal cycles or cache to perform a burst read. If DREQ_MODE=\'1\', DMA_IDLE is don\'t care."]
1775    #[inline(always)]
1776    pub fn dma_idle(
1777        self,
1778    ) -> crate::common::RegisterFieldBool<11, 1, 0, Dma2CtrlReg_SPEC, crate::common::RW> {
1779        crate::common::RegisterFieldBool::<11,1,0,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1780    }
1781
1782    #[doc = "The priority level determines which DMA channel will be granted access for transferring data, in case more than one channels are active and request the bus at the same time. The greater the value, the higher the priority. In specific:\n000 = lowest priority\n111 = highest priority\nIf different channels with equal priority level values request the bus at the same time, an inherent priority mechanism is applied. According to this mechanism, if, for example, both the DMA0 and DMA1 channels have the same priority level, then DMA0 will first be granted access to the bus."]
1783    #[inline(always)]
1784    pub fn dma_prio(
1785        self,
1786    ) -> crate::common::RegisterField<8, 0x7, 1, 0, u8, u8, Dma2CtrlReg_SPEC, crate::common::RW>
1787    {
1788        crate::common::RegisterField::<8,0x7,1,0,u8,u8,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1789    }
1790
1791    #[doc = "0 = Normal mode. The DMA channel stops after having completed the transfer of length determined by DMAx_LEN_REG. DMA_ON automatically deasserts when the transfer is completed.\n1 = Circular mode (applicable only if DREQ_MODE = \'1\'). In this mode, DMA_ON never deasserts, as the DMA channel automatically resets DMAx_IDX_REG and starts a new transfer."]
1792    #[inline(always)]
1793    pub fn circular(
1794        self,
1795    ) -> crate::common::RegisterFieldBool<7, 1, 0, Dma2CtrlReg_SPEC, crate::common::RW> {
1796        crate::common::RegisterFieldBool::<7,1,0,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1797    }
1798
1799    #[doc = "Enable increment of destination address.\n0 = do not increment (destination address stays the same during the transfer)\n1 = increment according to the value of BW bit-field (by 1, when BW=\"00\" ; by 2, when BW=\"01\" ; by 4, when BW=\"10\")"]
1800    #[inline(always)]
1801    pub fn ainc(
1802        self,
1803    ) -> crate::common::RegisterFieldBool<6, 1, 0, Dma2CtrlReg_SPEC, crate::common::RW> {
1804        crate::common::RegisterFieldBool::<6,1,0,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1805    }
1806
1807    #[doc = "Enable increment of destination address\n0 = do not increment\n1 = increment according value of BW"]
1808    #[inline(always)]
1809    pub fn binc(
1810        self,
1811    ) -> crate::common::RegisterFieldBool<5, 1, 0, Dma2CtrlReg_SPEC, crate::common::RW> {
1812        crate::common::RegisterFieldBool::<5,1,0,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1813    }
1814
1815    #[doc = "0 = DMA channel starts immediately\n1 = DMA channel must be triggered by peripheral DMA request (see also the description of DMA_REQ_MUX_REG)"]
1816    #[inline(always)]
1817    pub fn dreq_mode(
1818        self,
1819    ) -> crate::common::RegisterFieldBool<4, 1, 0, Dma2CtrlReg_SPEC, crate::common::RW> {
1820        crate::common::RegisterFieldBool::<4,1,0,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1821    }
1822
1823    #[doc = "0 = disable interrupt on this channel\n1 = enable interrupt on this channel"]
1824    #[inline(always)]
1825    pub fn irq_enable(
1826        self,
1827    ) -> crate::common::RegisterFieldBool<3, 1, 0, Dma2CtrlReg_SPEC, crate::common::RW> {
1828        crate::common::RegisterFieldBool::<3,1,0,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1829    }
1830
1831    #[doc = "Bus transfer width:\n00 = 1 Byte (suggested for peripherals like UART and 8-bit SPI)\n01 = 2 Bytes (suggested for peripherals like I2C and 16-bit SPI)\n10 = 4 Bytes (suggested for Memory-to-Memory transfers)\n11 = Reserved"]
1832    #[inline(always)]
1833    pub fn bw(
1834        self,
1835    ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, Dma2CtrlReg_SPEC, crate::common::RW>
1836    {
1837        crate::common::RegisterField::<1,0x3,1,0,u8,u8,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1838    }
1839
1840    #[doc = "0 = DMA channel is off, clocks are disabled\n1 = DMA channel is enabled. This bit will be automatically cleared after the completion of a transfer, if circular mode is not enabled. In circular mode, this bit stays set."]
1841    #[inline(always)]
1842    pub fn dma_on(
1843        self,
1844    ) -> crate::common::RegisterFieldBool<0, 1, 0, Dma2CtrlReg_SPEC, crate::common::RW> {
1845        crate::common::RegisterFieldBool::<0,1,0,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1846    }
1847}
1848impl ::core::default::Default for Dma2CtrlReg {
1849    #[inline(always)]
1850    fn default() -> Dma2CtrlReg {
1851        <crate::RegValueT<Dma2CtrlReg_SPEC> as RegisterValue<_>>::new(0)
1852    }
1853}
1854
1855#[doc(hidden)]
1856#[derive(Copy, Clone, Eq, PartialEq)]
1857pub struct Dma2IdxReg_SPEC;
1858impl crate::sealed::RegSpec for Dma2IdxReg_SPEC {
1859    type DataType = u16;
1860}
1861
1862#[doc = "Index value of DMA channel 2"]
1863pub type Dma2IdxReg = crate::RegValueT<Dma2IdxReg_SPEC>;
1864
1865impl Dma2IdxReg {
1866    #[doc = "This (read-only) register determines the data items currently fetched by the DMA channel, during an on-going transfer. When the transfer is completed, the register is automatically reset to 0.\nThe DMA channel uses this register to form the source/destination address of the next DMA cycle, considering also AINC/BINC and BW."]
1867    #[inline(always)]
1868    pub fn dma2_idx(
1869        self,
1870    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma2IdxReg_SPEC, crate::common::R>
1871    {
1872        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma2IdxReg_SPEC,crate::common::R>::from_register(self,0)
1873    }
1874}
1875impl ::core::default::Default for Dma2IdxReg {
1876    #[inline(always)]
1877    fn default() -> Dma2IdxReg {
1878        <crate::RegValueT<Dma2IdxReg_SPEC> as RegisterValue<_>>::new(0)
1879    }
1880}
1881
1882#[doc(hidden)]
1883#[derive(Copy, Clone, Eq, PartialEq)]
1884pub struct Dma2IntReg_SPEC;
1885impl crate::sealed::RegSpec for Dma2IntReg_SPEC {
1886    type DataType = u16;
1887}
1888
1889#[doc = "DMA receive interrupt register channel 2"]
1890pub type Dma2IntReg = crate::RegValueT<Dma2IntReg_SPEC>;
1891
1892impl Dma2IntReg {
1893    #[doc = "Number of transfers until an interrupt is generated. The interrupt is generated after a transfer, if DMAx_INT_REG is equal to DMAx_IDX_REG and before DMAx_IDX_REG is incremented. The bit-field IRQ_ENABLE of DMAx_CTRL_REG must be set to \'1\' to let the controller generate the interrupt."]
1894    #[inline(always)]
1895    pub fn dma2_int(
1896        self,
1897    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma2IntReg_SPEC, crate::common::RW>
1898    {
1899        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma2IntReg_SPEC,crate::common::RW>::from_register(self,0)
1900    }
1901}
1902impl ::core::default::Default for Dma2IntReg {
1903    #[inline(always)]
1904    fn default() -> Dma2IntReg {
1905        <crate::RegValueT<Dma2IntReg_SPEC> as RegisterValue<_>>::new(0)
1906    }
1907}
1908
1909#[doc(hidden)]
1910#[derive(Copy, Clone, Eq, PartialEq)]
1911pub struct Dma2LenReg_SPEC;
1912impl crate::sealed::RegSpec for Dma2LenReg_SPEC {
1913    type DataType = u16;
1914}
1915
1916#[doc = "DMA receive length register channel 2"]
1917pub type Dma2LenReg = crate::RegValueT<Dma2LenReg_SPEC>;
1918
1919impl Dma2LenReg {
1920    #[doc = "DMA channel\'s transfer length. DMAx_LEN of value 0, 1, 2, ... results into an actual transfer length of 1, 2, 3, ..."]
1921    #[inline(always)]
1922    pub fn dma2_len(
1923        self,
1924    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma2LenReg_SPEC, crate::common::RW>
1925    {
1926        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma2LenReg_SPEC,crate::common::RW>::from_register(self,0)
1927    }
1928}
1929impl ::core::default::Default for Dma2LenReg {
1930    #[inline(always)]
1931    fn default() -> Dma2LenReg {
1932        <crate::RegValueT<Dma2LenReg_SPEC> as RegisterValue<_>>::new(0)
1933    }
1934}
1935
1936#[doc(hidden)]
1937#[derive(Copy, Clone, Eq, PartialEq)]
1938pub struct Dma3AStarthReg_SPEC;
1939impl crate::sealed::RegSpec for Dma3AStarthReg_SPEC {
1940    type DataType = u16;
1941}
1942
1943#[doc = "Start address High A of DMA channel 3"]
1944pub type Dma3AStarthReg = crate::RegValueT<Dma3AStarthReg_SPEC>;
1945
1946impl Dma3AStarthReg {
1947    #[doc = "Source start address, upper 16 bits"]
1948    #[inline(always)]
1949    pub fn dma3_a_starth(
1950        self,
1951    ) -> crate::common::RegisterField<
1952        0,
1953        0xffff,
1954        1,
1955        0,
1956        u16,
1957        u16,
1958        Dma3AStarthReg_SPEC,
1959        crate::common::RW,
1960    > {
1961        crate::common::RegisterField::<
1962            0,
1963            0xffff,
1964            1,
1965            0,
1966            u16,
1967            u16,
1968            Dma3AStarthReg_SPEC,
1969            crate::common::RW,
1970        >::from_register(self, 0)
1971    }
1972}
1973impl ::core::default::Default for Dma3AStarthReg {
1974    #[inline(always)]
1975    fn default() -> Dma3AStarthReg {
1976        <crate::RegValueT<Dma3AStarthReg_SPEC> as RegisterValue<_>>::new(0)
1977    }
1978}
1979
1980#[doc(hidden)]
1981#[derive(Copy, Clone, Eq, PartialEq)]
1982pub struct Dma3AStartlReg_SPEC;
1983impl crate::sealed::RegSpec for Dma3AStartlReg_SPEC {
1984    type DataType = u16;
1985}
1986
1987#[doc = "Start address Low A of DMA channel 3"]
1988pub type Dma3AStartlReg = crate::RegValueT<Dma3AStartlReg_SPEC>;
1989
1990impl Dma3AStartlReg {
1991    #[doc = "Source start address, lower 16 bits"]
1992    #[inline(always)]
1993    pub fn dma3_a_startl(
1994        self,
1995    ) -> crate::common::RegisterField<
1996        0,
1997        0xffff,
1998        1,
1999        0,
2000        u16,
2001        u16,
2002        Dma3AStartlReg_SPEC,
2003        crate::common::RW,
2004    > {
2005        crate::common::RegisterField::<
2006            0,
2007            0xffff,
2008            1,
2009            0,
2010            u16,
2011            u16,
2012            Dma3AStartlReg_SPEC,
2013            crate::common::RW,
2014        >::from_register(self, 0)
2015    }
2016}
2017impl ::core::default::Default for Dma3AStartlReg {
2018    #[inline(always)]
2019    fn default() -> Dma3AStartlReg {
2020        <crate::RegValueT<Dma3AStartlReg_SPEC> as RegisterValue<_>>::new(0)
2021    }
2022}
2023
2024#[doc(hidden)]
2025#[derive(Copy, Clone, Eq, PartialEq)]
2026pub struct Dma3BStarthReg_SPEC;
2027impl crate::sealed::RegSpec for Dma3BStarthReg_SPEC {
2028    type DataType = u16;
2029}
2030
2031#[doc = "Start address High B of DMA channel 3"]
2032pub type Dma3BStarthReg = crate::RegValueT<Dma3BStarthReg_SPEC>;
2033
2034impl Dma3BStarthReg {
2035    #[doc = "Destination start address, upper 16 bits"]
2036    #[inline(always)]
2037    pub fn dma3_b_starth(
2038        self,
2039    ) -> crate::common::RegisterField<
2040        0,
2041        0xffff,
2042        1,
2043        0,
2044        u16,
2045        u16,
2046        Dma3BStarthReg_SPEC,
2047        crate::common::RW,
2048    > {
2049        crate::common::RegisterField::<
2050            0,
2051            0xffff,
2052            1,
2053            0,
2054            u16,
2055            u16,
2056            Dma3BStarthReg_SPEC,
2057            crate::common::RW,
2058        >::from_register(self, 0)
2059    }
2060}
2061impl ::core::default::Default for Dma3BStarthReg {
2062    #[inline(always)]
2063    fn default() -> Dma3BStarthReg {
2064        <crate::RegValueT<Dma3BStarthReg_SPEC> as RegisterValue<_>>::new(0)
2065    }
2066}
2067
2068#[doc(hidden)]
2069#[derive(Copy, Clone, Eq, PartialEq)]
2070pub struct Dma3BStartlReg_SPEC;
2071impl crate::sealed::RegSpec for Dma3BStartlReg_SPEC {
2072    type DataType = u16;
2073}
2074
2075#[doc = "Start address Low B of DMA channel 3"]
2076pub type Dma3BStartlReg = crate::RegValueT<Dma3BStartlReg_SPEC>;
2077
2078impl Dma3BStartlReg {
2079    #[doc = "Destination start address, lower 16 bits"]
2080    #[inline(always)]
2081    pub fn dma3_b_startl(
2082        self,
2083    ) -> crate::common::RegisterField<
2084        0,
2085        0xffff,
2086        1,
2087        0,
2088        u16,
2089        u16,
2090        Dma3BStartlReg_SPEC,
2091        crate::common::RW,
2092    > {
2093        crate::common::RegisterField::<
2094            0,
2095            0xffff,
2096            1,
2097            0,
2098            u16,
2099            u16,
2100            Dma3BStartlReg_SPEC,
2101            crate::common::RW,
2102        >::from_register(self, 0)
2103    }
2104}
2105impl ::core::default::Default for Dma3BStartlReg {
2106    #[inline(always)]
2107    fn default() -> Dma3BStartlReg {
2108        <crate::RegValueT<Dma3BStartlReg_SPEC> as RegisterValue<_>>::new(0)
2109    }
2110}
2111
2112#[doc(hidden)]
2113#[derive(Copy, Clone, Eq, PartialEq)]
2114pub struct Dma3CtrlReg_SPEC;
2115impl crate::sealed::RegSpec for Dma3CtrlReg_SPEC {
2116    type DataType = u16;
2117}
2118
2119#[doc = "Control register for the DMA channel 3"]
2120pub type Dma3CtrlReg = crate::RegValueT<Dma3CtrlReg_SPEC>;
2121
2122impl Dma3CtrlReg {
2123    #[doc = "0 = DMA operates with level-sensitive peripheral requests (default)\n1 = DMA operates with (positive) edge-sensitive peripheral requests"]
2124    #[inline(always)]
2125    pub fn req_sense(
2126        self,
2127    ) -> crate::common::RegisterFieldBool<13, 1, 0, Dma3CtrlReg_SPEC, crate::common::RW> {
2128        crate::common::RegisterFieldBool::<13,1,0,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2129    }
2130
2131    #[doc = "0 = DMA performs copy A1 to B1, A2 to B2, etc ...\n1 = DMA performs copy of A1 to B1, B2, etc ...\nThis feature is useful for memory initialization to any value. Thus, BINC must be set to \'1\', while AINC is don\'t care, as only one fetch from A is done. This process cannot be interrupted by other DMA channels. It is also noted that DMA_INIT should not be used when DREQ_MODE=\'1\'."]
2132    #[inline(always)]
2133    pub fn dma_init(
2134        self,
2135    ) -> crate::common::RegisterFieldBool<12, 1, 0, Dma3CtrlReg_SPEC, crate::common::RW> {
2136        crate::common::RegisterFieldBool::<12,1,0,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2137    }
2138
2139    #[doc = "0 = Blocking mode, the DMA performs a fast back-to-back copy, disabling bus access for any bus master with lower priority.\n1 = Interrupting mode, the DMA inserts a wait cycle after each store allowing the CPU to steal cycles or cache to perform a burst read. If DREQ_MODE=\'1\', DMA_IDLE is don\'t care."]
2140    #[inline(always)]
2141    pub fn dma_idle(
2142        self,
2143    ) -> crate::common::RegisterFieldBool<11, 1, 0, Dma3CtrlReg_SPEC, crate::common::RW> {
2144        crate::common::RegisterFieldBool::<11,1,0,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2145    }
2146
2147    #[doc = "The priority level determines which DMA channel will be granted access for transferring data, in case more than one channels are active and request the bus at the same time. The greater the value, the higher the priority. In specific:\n000 = lowest priority\n111 = highest priority\nIf different channels with equal priority level values request the bus at the same time, an inherent priority mechanism is applied. According to this mechanism, if, for example, both the DMA0 and DMA1 channels have the same priority level, then DMA0 will first be granted access to the bus."]
2148    #[inline(always)]
2149    pub fn dma_prio(
2150        self,
2151    ) -> crate::common::RegisterField<8, 0x7, 1, 0, u8, u8, Dma3CtrlReg_SPEC, crate::common::RW>
2152    {
2153        crate::common::RegisterField::<8,0x7,1,0,u8,u8,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2154    }
2155
2156    #[doc = "0 = Normal mode. The DMA channel stops after having completed the transfer of length determined by DMAx_LEN_REG. DMA_ON automatically deasserts when the transfer is completed.\n1 = Circular mode (applicable only if DREQ_MODE = \'1\'). In this mode, DMA_ON never deasserts, as the DMA channel automatically resets DMAx_IDX_REG and starts a new transfer."]
2157    #[inline(always)]
2158    pub fn circular(
2159        self,
2160    ) -> crate::common::RegisterFieldBool<7, 1, 0, Dma3CtrlReg_SPEC, crate::common::RW> {
2161        crate::common::RegisterFieldBool::<7,1,0,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2162    }
2163
2164    #[doc = "Enable increment of source address.\n0 = do not increment (source address stays the same during the transfer)\n1 = increment according to the value of BW bit-field (by 1, when BW=\"00\" ; by 2, when BW=\"01\" ; by 4, when BW=\"10\")"]
2165    #[inline(always)]
2166    pub fn ainc(
2167        self,
2168    ) -> crate::common::RegisterFieldBool<6, 1, 0, Dma3CtrlReg_SPEC, crate::common::RW> {
2169        crate::common::RegisterFieldBool::<6,1,0,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2170    }
2171
2172    #[doc = "Enable increment of destination address.\n0 = do not increment (destination address stays the same during the transfer)\n1 = increment according to the value of BW bit-field (by 1, when BW=\"00\" ; by 2, when BW=\"01\" ; by 4, when BW=\"10\")"]
2173    #[inline(always)]
2174    pub fn binc(
2175        self,
2176    ) -> crate::common::RegisterFieldBool<5, 1, 0, Dma3CtrlReg_SPEC, crate::common::RW> {
2177        crate::common::RegisterFieldBool::<5,1,0,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2178    }
2179
2180    #[doc = "0 = DMA channel starts immediately\n1 = DMA channel must be triggered by peripheral DMA request (see also the description of DMA_REQ_MUX_REG)"]
2181    #[inline(always)]
2182    pub fn dreq_mode(
2183        self,
2184    ) -> crate::common::RegisterFieldBool<4, 1, 0, Dma3CtrlReg_SPEC, crate::common::RW> {
2185        crate::common::RegisterFieldBool::<4,1,0,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2186    }
2187
2188    #[doc = "0 = disable interrupt on this channel\n1 = enable interrupt on this channel"]
2189    #[inline(always)]
2190    pub fn irq_enable(
2191        self,
2192    ) -> crate::common::RegisterFieldBool<3, 1, 0, Dma3CtrlReg_SPEC, crate::common::RW> {
2193        crate::common::RegisterFieldBool::<3,1,0,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2194    }
2195
2196    #[doc = "Bus transfer width:\n00 = 1 Byte (suggested for peripherals like UART and 8-bit SPI)\n01 = 2 Bytes (suggested for peripherals like I2C and 16-bit SPI)\n10 = 4 Bytes (suggested for Memory-to-Memory transfers)\n11 = Reserved"]
2197    #[inline(always)]
2198    pub fn bw(
2199        self,
2200    ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, Dma3CtrlReg_SPEC, crate::common::RW>
2201    {
2202        crate::common::RegisterField::<1,0x3,1,0,u8,u8,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2203    }
2204
2205    #[doc = "0 = DMA channel is off, clocks are disabled\n1 = DMA channel is enabled. This bit will be automatically cleared after the completion of a transfer, if circular mode is not enabled. In circular mode, this bit stays set."]
2206    #[inline(always)]
2207    pub fn dma_on(
2208        self,
2209    ) -> crate::common::RegisterFieldBool<0, 1, 0, Dma3CtrlReg_SPEC, crate::common::RW> {
2210        crate::common::RegisterFieldBool::<0,1,0,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2211    }
2212}
2213impl ::core::default::Default for Dma3CtrlReg {
2214    #[inline(always)]
2215    fn default() -> Dma3CtrlReg {
2216        <crate::RegValueT<Dma3CtrlReg_SPEC> as RegisterValue<_>>::new(0)
2217    }
2218}
2219
2220#[doc(hidden)]
2221#[derive(Copy, Clone, Eq, PartialEq)]
2222pub struct Dma3IdxReg_SPEC;
2223impl crate::sealed::RegSpec for Dma3IdxReg_SPEC {
2224    type DataType = u16;
2225}
2226
2227#[doc = "Index value of DMA channel 3"]
2228pub type Dma3IdxReg = crate::RegValueT<Dma3IdxReg_SPEC>;
2229
2230impl Dma3IdxReg {
2231    #[doc = "This (read-only) register determines the data items currently fetched by the DMA channel, during an on-going transfer. When the transfer is completed, the register is automatically reset to 0.\nThe DMA channel uses this register to form the source/destination address of the next DMA cycle, considering also AINC/BINC and BW."]
2232    #[inline(always)]
2233    pub fn dma3_idx(
2234        self,
2235    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma3IdxReg_SPEC, crate::common::R>
2236    {
2237        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma3IdxReg_SPEC,crate::common::R>::from_register(self,0)
2238    }
2239}
2240impl ::core::default::Default for Dma3IdxReg {
2241    #[inline(always)]
2242    fn default() -> Dma3IdxReg {
2243        <crate::RegValueT<Dma3IdxReg_SPEC> as RegisterValue<_>>::new(0)
2244    }
2245}
2246
2247#[doc(hidden)]
2248#[derive(Copy, Clone, Eq, PartialEq)]
2249pub struct Dma3IntReg_SPEC;
2250impl crate::sealed::RegSpec for Dma3IntReg_SPEC {
2251    type DataType = u16;
2252}
2253
2254#[doc = "DMA receive interrupt register channel 3"]
2255pub type Dma3IntReg = crate::RegValueT<Dma3IntReg_SPEC>;
2256
2257impl Dma3IntReg {
2258    #[doc = "Number of transfers until an interrupt is generated. The interrupt is generated after a transfer, if DMAx_INT_REG is equal to DMAx_IDX_REG and before DMAx_IDX_REG is incremented. The bit-field IRQ_ENABLE of DMAx_CTRL_REG must be set to \'1\' to let the controller generate the interrupt."]
2259    #[inline(always)]
2260    pub fn dma3_int(
2261        self,
2262    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma3IntReg_SPEC, crate::common::RW>
2263    {
2264        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma3IntReg_SPEC,crate::common::RW>::from_register(self,0)
2265    }
2266}
2267impl ::core::default::Default for Dma3IntReg {
2268    #[inline(always)]
2269    fn default() -> Dma3IntReg {
2270        <crate::RegValueT<Dma3IntReg_SPEC> as RegisterValue<_>>::new(0)
2271    }
2272}
2273
2274#[doc(hidden)]
2275#[derive(Copy, Clone, Eq, PartialEq)]
2276pub struct Dma3LenReg_SPEC;
2277impl crate::sealed::RegSpec for Dma3LenReg_SPEC {
2278    type DataType = u16;
2279}
2280
2281#[doc = "DMA receive length register channel 3"]
2282pub type Dma3LenReg = crate::RegValueT<Dma3LenReg_SPEC>;
2283
2284impl Dma3LenReg {
2285    #[doc = "DMA channel\'s transfer length. DMAx_LEN of value 0, 1, 2, ... results into an actual transfer length of 1, 2, 3, ..."]
2286    #[inline(always)]
2287    pub fn dma3_len(
2288        self,
2289    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma3LenReg_SPEC, crate::common::RW>
2290    {
2291        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma3LenReg_SPEC,crate::common::RW>::from_register(self,0)
2292    }
2293}
2294impl ::core::default::Default for Dma3LenReg {
2295    #[inline(always)]
2296    fn default() -> Dma3LenReg {
2297        <crate::RegValueT<Dma3LenReg_SPEC> as RegisterValue<_>>::new(0)
2298    }
2299}
2300
2301#[doc(hidden)]
2302#[derive(Copy, Clone, Eq, PartialEq)]
2303pub struct Dma4AStarthReg_SPEC;
2304impl crate::sealed::RegSpec for Dma4AStarthReg_SPEC {
2305    type DataType = u16;
2306}
2307
2308#[doc = "Start address High A of DMA channel 4"]
2309pub type Dma4AStarthReg = crate::RegValueT<Dma4AStarthReg_SPEC>;
2310
2311impl Dma4AStarthReg {
2312    #[doc = "Source start address, upper 16 bits"]
2313    #[inline(always)]
2314    pub fn dma4_a_starth(
2315        self,
2316    ) -> crate::common::RegisterField<
2317        0,
2318        0xffff,
2319        1,
2320        0,
2321        u16,
2322        u16,
2323        Dma4AStarthReg_SPEC,
2324        crate::common::RW,
2325    > {
2326        crate::common::RegisterField::<
2327            0,
2328            0xffff,
2329            1,
2330            0,
2331            u16,
2332            u16,
2333            Dma4AStarthReg_SPEC,
2334            crate::common::RW,
2335        >::from_register(self, 0)
2336    }
2337}
2338impl ::core::default::Default for Dma4AStarthReg {
2339    #[inline(always)]
2340    fn default() -> Dma4AStarthReg {
2341        <crate::RegValueT<Dma4AStarthReg_SPEC> as RegisterValue<_>>::new(0)
2342    }
2343}
2344
2345#[doc(hidden)]
2346#[derive(Copy, Clone, Eq, PartialEq)]
2347pub struct Dma4AStartlReg_SPEC;
2348impl crate::sealed::RegSpec for Dma4AStartlReg_SPEC {
2349    type DataType = u16;
2350}
2351
2352#[doc = "Start address Low A of DMA channel 4"]
2353pub type Dma4AStartlReg = crate::RegValueT<Dma4AStartlReg_SPEC>;
2354
2355impl Dma4AStartlReg {
2356    #[doc = "Source start address, lower 16 bits"]
2357    #[inline(always)]
2358    pub fn dma4_a_startl(
2359        self,
2360    ) -> crate::common::RegisterField<
2361        0,
2362        0xffff,
2363        1,
2364        0,
2365        u16,
2366        u16,
2367        Dma4AStartlReg_SPEC,
2368        crate::common::RW,
2369    > {
2370        crate::common::RegisterField::<
2371            0,
2372            0xffff,
2373            1,
2374            0,
2375            u16,
2376            u16,
2377            Dma4AStartlReg_SPEC,
2378            crate::common::RW,
2379        >::from_register(self, 0)
2380    }
2381}
2382impl ::core::default::Default for Dma4AStartlReg {
2383    #[inline(always)]
2384    fn default() -> Dma4AStartlReg {
2385        <crate::RegValueT<Dma4AStartlReg_SPEC> as RegisterValue<_>>::new(0)
2386    }
2387}
2388
2389#[doc(hidden)]
2390#[derive(Copy, Clone, Eq, PartialEq)]
2391pub struct Dma4BStarthReg_SPEC;
2392impl crate::sealed::RegSpec for Dma4BStarthReg_SPEC {
2393    type DataType = u16;
2394}
2395
2396#[doc = "Start address High B of DMA channel 4"]
2397pub type Dma4BStarthReg = crate::RegValueT<Dma4BStarthReg_SPEC>;
2398
2399impl Dma4BStarthReg {
2400    #[doc = "Destination start address, upper 16 bits"]
2401    #[inline(always)]
2402    pub fn dma4_b_starth(
2403        self,
2404    ) -> crate::common::RegisterField<
2405        0,
2406        0xffff,
2407        1,
2408        0,
2409        u16,
2410        u16,
2411        Dma4BStarthReg_SPEC,
2412        crate::common::RW,
2413    > {
2414        crate::common::RegisterField::<
2415            0,
2416            0xffff,
2417            1,
2418            0,
2419            u16,
2420            u16,
2421            Dma4BStarthReg_SPEC,
2422            crate::common::RW,
2423        >::from_register(self, 0)
2424    }
2425}
2426impl ::core::default::Default for Dma4BStarthReg {
2427    #[inline(always)]
2428    fn default() -> Dma4BStarthReg {
2429        <crate::RegValueT<Dma4BStarthReg_SPEC> as RegisterValue<_>>::new(0)
2430    }
2431}
2432
2433#[doc(hidden)]
2434#[derive(Copy, Clone, Eq, PartialEq)]
2435pub struct Dma4BStartlReg_SPEC;
2436impl crate::sealed::RegSpec for Dma4BStartlReg_SPEC {
2437    type DataType = u16;
2438}
2439
2440#[doc = "Start address Low B of DMA channel 4"]
2441pub type Dma4BStartlReg = crate::RegValueT<Dma4BStartlReg_SPEC>;
2442
2443impl Dma4BStartlReg {
2444    #[doc = "Destination start address, lower 16 bits"]
2445    #[inline(always)]
2446    pub fn dma4_b_startl(
2447        self,
2448    ) -> crate::common::RegisterField<
2449        0,
2450        0xffff,
2451        1,
2452        0,
2453        u16,
2454        u16,
2455        Dma4BStartlReg_SPEC,
2456        crate::common::RW,
2457    > {
2458        crate::common::RegisterField::<
2459            0,
2460            0xffff,
2461            1,
2462            0,
2463            u16,
2464            u16,
2465            Dma4BStartlReg_SPEC,
2466            crate::common::RW,
2467        >::from_register(self, 0)
2468    }
2469}
2470impl ::core::default::Default for Dma4BStartlReg {
2471    #[inline(always)]
2472    fn default() -> Dma4BStartlReg {
2473        <crate::RegValueT<Dma4BStartlReg_SPEC> as RegisterValue<_>>::new(0)
2474    }
2475}
2476
2477#[doc(hidden)]
2478#[derive(Copy, Clone, Eq, PartialEq)]
2479pub struct Dma4CtrlReg_SPEC;
2480impl crate::sealed::RegSpec for Dma4CtrlReg_SPEC {
2481    type DataType = u16;
2482}
2483
2484#[doc = "Control register for the DMA channel 4"]
2485pub type Dma4CtrlReg = crate::RegValueT<Dma4CtrlReg_SPEC>;
2486
2487impl Dma4CtrlReg {
2488    #[doc = "0 = DMA operates with level-sensitive peripheral requests (default)\n1 = DMA operates with (positive) edge-sensitive peripheral requests"]
2489    #[inline(always)]
2490    pub fn req_sense(
2491        self,
2492    ) -> crate::common::RegisterFieldBool<13, 1, 0, Dma4CtrlReg_SPEC, crate::common::RW> {
2493        crate::common::RegisterFieldBool::<13,1,0,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2494    }
2495
2496    #[doc = "0 = DMA performs copy A1 to B1, A2 to B2, etc ...\n1 = DMA performs copy of A1 to B1, B2, etc ...\nThis feature is useful for memory initialization to any value. Thus, BINC must be set to \'1\', while AINC is don\'t care, as only one fetch from A is done. This process cannot be interrupted by other DMA channels. It is also noted that DMA_INIT should not be used when DREQ_MODE=\'1\'."]
2497    #[inline(always)]
2498    pub fn dma_init(
2499        self,
2500    ) -> crate::common::RegisterFieldBool<12, 1, 0, Dma4CtrlReg_SPEC, crate::common::RW> {
2501        crate::common::RegisterFieldBool::<12,1,0,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2502    }
2503
2504    #[doc = "0 = Blocking mode, the DMA performs a fast back-to-back copy, disabling bus access for any bus master with lower priority.\n1 = Interrupting mode, the DMA inserts a wait cycle after each store allowing the CPU to steal cycles or cache to perform a burst read. If DREQ_MODE=\'1\', DMA_IDLE is don\'t care."]
2505    #[inline(always)]
2506    pub fn dma_idle(
2507        self,
2508    ) -> crate::common::RegisterFieldBool<11, 1, 0, Dma4CtrlReg_SPEC, crate::common::RW> {
2509        crate::common::RegisterFieldBool::<11,1,0,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2510    }
2511
2512    #[doc = "The priority level determines which DMA channel will be granted access for transferring data, in case more than one channels are active and request the bus at the same time. The greater the value, the higher the priority. In specific:\n000 = lowest priority\n111 = highest priority\nIf different channels with equal priority level values request the bus at the same time, an inherent priority mechanism is applied. According to this mechanism, if, for example, both the DMA0 and DMA1 channels have the same priority level, then DMA0 will first be granted access to the bus."]
2513    #[inline(always)]
2514    pub fn dma_prio(
2515        self,
2516    ) -> crate::common::RegisterField<8, 0x7, 1, 0, u8, u8, Dma4CtrlReg_SPEC, crate::common::RW>
2517    {
2518        crate::common::RegisterField::<8,0x7,1,0,u8,u8,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2519    }
2520
2521    #[doc = "0 = Normal mode. The DMA channel stops after having completed the transfer of length determined by DMAx_LEN_REG. DMA_ON automatically deasserts when the transfer is completed.\n1 = Circular mode (applicable only if DREQ_MODE = \'1\'). In this mode, DMA_ON never deasserts, as the DMA channel automatically resets DMAx_IDX_REG and starts a new transfer."]
2522    #[inline(always)]
2523    pub fn circular(
2524        self,
2525    ) -> crate::common::RegisterFieldBool<7, 1, 0, Dma4CtrlReg_SPEC, crate::common::RW> {
2526        crate::common::RegisterFieldBool::<7,1,0,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2527    }
2528
2529    #[doc = "Enable increment of source address.\n0 = do not increment (source address stays the same during the transfer)\n1 = increment according to the value of BW bit-field (by 1, when BW=\"00\" ; by 2, when BW=\"01\" ; by 4, when BW=\"10\")"]
2530    #[inline(always)]
2531    pub fn ainc(
2532        self,
2533    ) -> crate::common::RegisterFieldBool<6, 1, 0, Dma4CtrlReg_SPEC, crate::common::RW> {
2534        crate::common::RegisterFieldBool::<6,1,0,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2535    }
2536
2537    #[doc = "Enable increment of destination address.\n0 = do not increment (destination address stays the same during the transfer)\n1 = increment according to the value of BW bit-field (by 1, when BW=\"00\" ; by 2, when BW=\"01\" ; by 4, when BW=\"10\")"]
2538    #[inline(always)]
2539    pub fn binc(
2540        self,
2541    ) -> crate::common::RegisterFieldBool<5, 1, 0, Dma4CtrlReg_SPEC, crate::common::RW> {
2542        crate::common::RegisterFieldBool::<5,1,0,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2543    }
2544
2545    #[doc = "0 = DMA channel starts immediately\n1 = DMA channel must be triggered by peripheral DMA request (see also the description of DMA_REQ_MUX_REG)"]
2546    #[inline(always)]
2547    pub fn dreq_mode(
2548        self,
2549    ) -> crate::common::RegisterFieldBool<4, 1, 0, Dma4CtrlReg_SPEC, crate::common::RW> {
2550        crate::common::RegisterFieldBool::<4,1,0,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2551    }
2552
2553    #[doc = "0 = disable interrupt on this channel\n1 = enable interrupt on this channel"]
2554    #[inline(always)]
2555    pub fn irq_enable(
2556        self,
2557    ) -> crate::common::RegisterFieldBool<3, 1, 0, Dma4CtrlReg_SPEC, crate::common::RW> {
2558        crate::common::RegisterFieldBool::<3,1,0,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2559    }
2560
2561    #[doc = "Bus transfer width:\n00 = 1 Byte (suggested for peripherals like UART and 8-bit SPI)\n01 = 2 Bytes (suggested for peripherals like I2C and 16-bit SPI)\n10 = 4 Bytes (suggested for Memory-to-Memory transfers)\n11 = Reserved"]
2562    #[inline(always)]
2563    pub fn bw(
2564        self,
2565    ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, Dma4CtrlReg_SPEC, crate::common::RW>
2566    {
2567        crate::common::RegisterField::<1,0x3,1,0,u8,u8,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2568    }
2569
2570    #[doc = "0 = DMA channel is off, clocks are disabled\n1 = DMA channel is enabled. This bit will be automatically cleared after the completion of a transfer, if circular mode is not enabled. In circular mode, this bit stays set."]
2571    #[inline(always)]
2572    pub fn dma_on(
2573        self,
2574    ) -> crate::common::RegisterFieldBool<0, 1, 0, Dma4CtrlReg_SPEC, crate::common::RW> {
2575        crate::common::RegisterFieldBool::<0,1,0,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2576    }
2577}
2578impl ::core::default::Default for Dma4CtrlReg {
2579    #[inline(always)]
2580    fn default() -> Dma4CtrlReg {
2581        <crate::RegValueT<Dma4CtrlReg_SPEC> as RegisterValue<_>>::new(0)
2582    }
2583}
2584
2585#[doc(hidden)]
2586#[derive(Copy, Clone, Eq, PartialEq)]
2587pub struct Dma4IdxReg_SPEC;
2588impl crate::sealed::RegSpec for Dma4IdxReg_SPEC {
2589    type DataType = u16;
2590}
2591
2592#[doc = "Index value of DMA channel 4"]
2593pub type Dma4IdxReg = crate::RegValueT<Dma4IdxReg_SPEC>;
2594
2595impl Dma4IdxReg {
2596    #[doc = "This (read-only) register determines the data items currently fetched by the DMA channel, during an on-going transfer. When the transfer is completed, the register is automatically reset to 0.\nThe DMA channel uses this register to form the source/destination address of the next DMA cycle, considering also AINC/BINC and BW."]
2597    #[inline(always)]
2598    pub fn dma4_idx(
2599        self,
2600    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma4IdxReg_SPEC, crate::common::R>
2601    {
2602        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma4IdxReg_SPEC,crate::common::R>::from_register(self,0)
2603    }
2604}
2605impl ::core::default::Default for Dma4IdxReg {
2606    #[inline(always)]
2607    fn default() -> Dma4IdxReg {
2608        <crate::RegValueT<Dma4IdxReg_SPEC> as RegisterValue<_>>::new(0)
2609    }
2610}
2611
2612#[doc(hidden)]
2613#[derive(Copy, Clone, Eq, PartialEq)]
2614pub struct Dma4IntReg_SPEC;
2615impl crate::sealed::RegSpec for Dma4IntReg_SPEC {
2616    type DataType = u16;
2617}
2618
2619#[doc = "DMA receive interrupt register channel 4"]
2620pub type Dma4IntReg = crate::RegValueT<Dma4IntReg_SPEC>;
2621
2622impl Dma4IntReg {
2623    #[doc = "Number of transfers until an interrupt is generated. The interrupt is generated after a transfer, if DMAx_INT_REG is equal to DMAx_IDX_REG and before DMAx_IDX_REG is incremented. The bit-field IRQ_ENABLE of DMAx_CTRL_REG must be set to \'1\' to let the controller generate the interrupt."]
2624    #[inline(always)]
2625    pub fn dma4_int(
2626        self,
2627    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma4IntReg_SPEC, crate::common::RW>
2628    {
2629        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma4IntReg_SPEC,crate::common::RW>::from_register(self,0)
2630    }
2631}
2632impl ::core::default::Default for Dma4IntReg {
2633    #[inline(always)]
2634    fn default() -> Dma4IntReg {
2635        <crate::RegValueT<Dma4IntReg_SPEC> as RegisterValue<_>>::new(0)
2636    }
2637}
2638
2639#[doc(hidden)]
2640#[derive(Copy, Clone, Eq, PartialEq)]
2641pub struct Dma4LenReg_SPEC;
2642impl crate::sealed::RegSpec for Dma4LenReg_SPEC {
2643    type DataType = u16;
2644}
2645
2646#[doc = "DMA receive length register channel 4"]
2647pub type Dma4LenReg = crate::RegValueT<Dma4LenReg_SPEC>;
2648
2649impl Dma4LenReg {
2650    #[doc = "DMA channel\'s transfer length. DMAx_LEN of value 0, 1, 2, ... results into an actual transfer length of 1, 2, 3, ..."]
2651    #[inline(always)]
2652    pub fn dma4_len(
2653        self,
2654    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma4LenReg_SPEC, crate::common::RW>
2655    {
2656        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma4LenReg_SPEC,crate::common::RW>::from_register(self,0)
2657    }
2658}
2659impl ::core::default::Default for Dma4LenReg {
2660    #[inline(always)]
2661    fn default() -> Dma4LenReg {
2662        <crate::RegValueT<Dma4LenReg_SPEC> as RegisterValue<_>>::new(0)
2663    }
2664}
2665
2666#[doc(hidden)]
2667#[derive(Copy, Clone, Eq, PartialEq)]
2668pub struct Dma5AStarthReg_SPEC;
2669impl crate::sealed::RegSpec for Dma5AStarthReg_SPEC {
2670    type DataType = u16;
2671}
2672
2673#[doc = "Start address High A of DMA channel 5"]
2674pub type Dma5AStarthReg = crate::RegValueT<Dma5AStarthReg_SPEC>;
2675
2676impl Dma5AStarthReg {
2677    #[doc = "Source start address, upper 16 bits"]
2678    #[inline(always)]
2679    pub fn dma5_a_starth(
2680        self,
2681    ) -> crate::common::RegisterField<
2682        0,
2683        0xffff,
2684        1,
2685        0,
2686        u16,
2687        u16,
2688        Dma5AStarthReg_SPEC,
2689        crate::common::RW,
2690    > {
2691        crate::common::RegisterField::<
2692            0,
2693            0xffff,
2694            1,
2695            0,
2696            u16,
2697            u16,
2698            Dma5AStarthReg_SPEC,
2699            crate::common::RW,
2700        >::from_register(self, 0)
2701    }
2702}
2703impl ::core::default::Default for Dma5AStarthReg {
2704    #[inline(always)]
2705    fn default() -> Dma5AStarthReg {
2706        <crate::RegValueT<Dma5AStarthReg_SPEC> as RegisterValue<_>>::new(0)
2707    }
2708}
2709
2710#[doc(hidden)]
2711#[derive(Copy, Clone, Eq, PartialEq)]
2712pub struct Dma5AStartlReg_SPEC;
2713impl crate::sealed::RegSpec for Dma5AStartlReg_SPEC {
2714    type DataType = u16;
2715}
2716
2717#[doc = "Start address Low A of DMA channel 5"]
2718pub type Dma5AStartlReg = crate::RegValueT<Dma5AStartlReg_SPEC>;
2719
2720impl Dma5AStartlReg {
2721    #[doc = "Source start address, lower 16 bits"]
2722    #[inline(always)]
2723    pub fn dma5_a_startl(
2724        self,
2725    ) -> crate::common::RegisterField<
2726        0,
2727        0xffff,
2728        1,
2729        0,
2730        u16,
2731        u16,
2732        Dma5AStartlReg_SPEC,
2733        crate::common::RW,
2734    > {
2735        crate::common::RegisterField::<
2736            0,
2737            0xffff,
2738            1,
2739            0,
2740            u16,
2741            u16,
2742            Dma5AStartlReg_SPEC,
2743            crate::common::RW,
2744        >::from_register(self, 0)
2745    }
2746}
2747impl ::core::default::Default for Dma5AStartlReg {
2748    #[inline(always)]
2749    fn default() -> Dma5AStartlReg {
2750        <crate::RegValueT<Dma5AStartlReg_SPEC> as RegisterValue<_>>::new(0)
2751    }
2752}
2753
2754#[doc(hidden)]
2755#[derive(Copy, Clone, Eq, PartialEq)]
2756pub struct Dma5BStarthReg_SPEC;
2757impl crate::sealed::RegSpec for Dma5BStarthReg_SPEC {
2758    type DataType = u16;
2759}
2760
2761#[doc = "Start address High B of DMA channel 5"]
2762pub type Dma5BStarthReg = crate::RegValueT<Dma5BStarthReg_SPEC>;
2763
2764impl Dma5BStarthReg {
2765    #[doc = "Destination start address, upper 16 bits"]
2766    #[inline(always)]
2767    pub fn dma5_b_starth(
2768        self,
2769    ) -> crate::common::RegisterField<
2770        0,
2771        0xffff,
2772        1,
2773        0,
2774        u16,
2775        u16,
2776        Dma5BStarthReg_SPEC,
2777        crate::common::RW,
2778    > {
2779        crate::common::RegisterField::<
2780            0,
2781            0xffff,
2782            1,
2783            0,
2784            u16,
2785            u16,
2786            Dma5BStarthReg_SPEC,
2787            crate::common::RW,
2788        >::from_register(self, 0)
2789    }
2790}
2791impl ::core::default::Default for Dma5BStarthReg {
2792    #[inline(always)]
2793    fn default() -> Dma5BStarthReg {
2794        <crate::RegValueT<Dma5BStarthReg_SPEC> as RegisterValue<_>>::new(0)
2795    }
2796}
2797
2798#[doc(hidden)]
2799#[derive(Copy, Clone, Eq, PartialEq)]
2800pub struct Dma5BStartlReg_SPEC;
2801impl crate::sealed::RegSpec for Dma5BStartlReg_SPEC {
2802    type DataType = u16;
2803}
2804
2805#[doc = "Start address Low B of DMA channel 5"]
2806pub type Dma5BStartlReg = crate::RegValueT<Dma5BStartlReg_SPEC>;
2807
2808impl Dma5BStartlReg {
2809    #[doc = "Destination start address, lower 16 bits"]
2810    #[inline(always)]
2811    pub fn dma5_b_startl(
2812        self,
2813    ) -> crate::common::RegisterField<
2814        0,
2815        0xffff,
2816        1,
2817        0,
2818        u16,
2819        u16,
2820        Dma5BStartlReg_SPEC,
2821        crate::common::RW,
2822    > {
2823        crate::common::RegisterField::<
2824            0,
2825            0xffff,
2826            1,
2827            0,
2828            u16,
2829            u16,
2830            Dma5BStartlReg_SPEC,
2831            crate::common::RW,
2832        >::from_register(self, 0)
2833    }
2834}
2835impl ::core::default::Default for Dma5BStartlReg {
2836    #[inline(always)]
2837    fn default() -> Dma5BStartlReg {
2838        <crate::RegValueT<Dma5BStartlReg_SPEC> as RegisterValue<_>>::new(0)
2839    }
2840}
2841
2842#[doc(hidden)]
2843#[derive(Copy, Clone, Eq, PartialEq)]
2844pub struct Dma5CtrlReg_SPEC;
2845impl crate::sealed::RegSpec for Dma5CtrlReg_SPEC {
2846    type DataType = u16;
2847}
2848
2849#[doc = "Control register for the DMA channel 5"]
2850pub type Dma5CtrlReg = crate::RegValueT<Dma5CtrlReg_SPEC>;
2851
2852impl Dma5CtrlReg {
2853    #[doc = "0 = DMA operates with level-sensitive peripheral requests (default)\n1 = DMA operates with (positive) edge-sensitive peripheral requests"]
2854    #[inline(always)]
2855    pub fn req_sense(
2856        self,
2857    ) -> crate::common::RegisterFieldBool<13, 1, 0, Dma5CtrlReg_SPEC, crate::common::RW> {
2858        crate::common::RegisterFieldBool::<13,1,0,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2859    }
2860
2861    #[doc = "0 = DMA performs copy A1 to B1, A2 to B2, etc ...\n1 = DMA performs copy of A1 to B1, B2, etc ...\nThis feature is useful for memory initialization to any value. Thus, BINC must be set to \'1\', while AINC is don\'t care, as only one fetch from A is done. This process cannot be interrupted by other DMA channels. It is also noted that DMA_INIT should not be used when DREQ_MODE=\'1\'."]
2862    #[inline(always)]
2863    pub fn dma_init(
2864        self,
2865    ) -> crate::common::RegisterFieldBool<12, 1, 0, Dma5CtrlReg_SPEC, crate::common::RW> {
2866        crate::common::RegisterFieldBool::<12,1,0,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2867    }
2868
2869    #[doc = "0 = Blocking mode, the DMA performs a fast back-to-back copy, disabling bus access for any bus master with lower priority.\n1 = Interrupting mode, the DMA inserts a wait cycle after each store allowing the CPU to steal cycles or cache to perform a burst read. If DREQ_MODE=\'1\', DMA_IDLE is don\'t care."]
2870    #[inline(always)]
2871    pub fn dma_idle(
2872        self,
2873    ) -> crate::common::RegisterFieldBool<11, 1, 0, Dma5CtrlReg_SPEC, crate::common::RW> {
2874        crate::common::RegisterFieldBool::<11,1,0,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2875    }
2876
2877    #[doc = "The priority level determines which DMA channel will be granted access for transferring data, in case more than one channels are active and request the bus at the same time. The greater the value, the higher the priority. In specific:\n000 = lowest priority\n111 = highest priority\nIf different channels with equal priority level values request the bus at the same time, an inherent priority mechanism is applied. According to this mechanism, if, for example, both the DMA0 and DMA1 channels have the same priority level, then DMA0 will first be granted access to the bus."]
2878    #[inline(always)]
2879    pub fn dma_prio(
2880        self,
2881    ) -> crate::common::RegisterField<8, 0x7, 1, 0, u8, u8, Dma5CtrlReg_SPEC, crate::common::RW>
2882    {
2883        crate::common::RegisterField::<8,0x7,1,0,u8,u8,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2884    }
2885
2886    #[doc = "0 = Normal mode. The DMA channel stops after having completed the transfer of length determined by DMAx_LEN_REG. DMA_ON automatically deasserts when the transfer is completed.\n1 = Circular mode (applicable only if DREQ_MODE = \'1\'). In this mode, DMA_ON never deasserts, as the DMA channel automatically resets DMAx_IDX_REG and starts a new transfer."]
2887    #[inline(always)]
2888    pub fn circular(
2889        self,
2890    ) -> crate::common::RegisterFieldBool<7, 1, 0, Dma5CtrlReg_SPEC, crate::common::RW> {
2891        crate::common::RegisterFieldBool::<7,1,0,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2892    }
2893
2894    #[doc = "Enable increment of source address.\n0 = do not increment (source address stays the same during the transfer)\n1 = increment according to the value of BW bit-field (by 1, when BW=\"00\" ; by 2, when BW=\"01\" ; by 4, when BW=\"10\")"]
2895    #[inline(always)]
2896    pub fn ainc(
2897        self,
2898    ) -> crate::common::RegisterFieldBool<6, 1, 0, Dma5CtrlReg_SPEC, crate::common::RW> {
2899        crate::common::RegisterFieldBool::<6,1,0,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2900    }
2901
2902    #[doc = "Enable increment of destination address.\n0 = do not increment (destination address stays the same during the transfer)\n1 = increment according to the value of BW bit-field (by 1, when BW=\"00\" ; by 2, when BW=\"01\" ; by 4, when BW=\"10\")"]
2903    #[inline(always)]
2904    pub fn binc(
2905        self,
2906    ) -> crate::common::RegisterFieldBool<5, 1, 0, Dma5CtrlReg_SPEC, crate::common::RW> {
2907        crate::common::RegisterFieldBool::<5,1,0,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2908    }
2909
2910    #[doc = "0 = DMA channel starts immediately\n1 = DMA channel must be triggered by peripheral DMA request (see also the description of DMA_REQ_MUX_REG)"]
2911    #[inline(always)]
2912    pub fn dreq_mode(
2913        self,
2914    ) -> crate::common::RegisterFieldBool<4, 1, 0, Dma5CtrlReg_SPEC, crate::common::RW> {
2915        crate::common::RegisterFieldBool::<4,1,0,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2916    }
2917
2918    #[doc = "0 = disable interrupt on this channel\n1 = enable interrupt on this channel"]
2919    #[inline(always)]
2920    pub fn irq_enable(
2921        self,
2922    ) -> crate::common::RegisterFieldBool<3, 1, 0, Dma5CtrlReg_SPEC, crate::common::RW> {
2923        crate::common::RegisterFieldBool::<3,1,0,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2924    }
2925
2926    #[doc = "Bus transfer width:\n00 = 1 Byte (suggested for peripherals like UART and 8-bit SPI)\n01 = 2 Bytes (suggested for peripherals like I2C and 16-bit SPI)\n10 = 4 Bytes (suggested for Memory-to-Memory transfers)\n11 = Reserved"]
2927    #[inline(always)]
2928    pub fn bw(
2929        self,
2930    ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, Dma5CtrlReg_SPEC, crate::common::RW>
2931    {
2932        crate::common::RegisterField::<1,0x3,1,0,u8,u8,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2933    }
2934
2935    #[doc = "0 = DMA channel is off, clocks are disabled\n1 = DMA channel is enabled. This bit will be automatically cleared after the completion of a transfer, if circular mode is not enabled. In circular mode, this bit stays set."]
2936    #[inline(always)]
2937    pub fn dma_on(
2938        self,
2939    ) -> crate::common::RegisterFieldBool<0, 1, 0, Dma5CtrlReg_SPEC, crate::common::RW> {
2940        crate::common::RegisterFieldBool::<0,1,0,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2941    }
2942}
2943impl ::core::default::Default for Dma5CtrlReg {
2944    #[inline(always)]
2945    fn default() -> Dma5CtrlReg {
2946        <crate::RegValueT<Dma5CtrlReg_SPEC> as RegisterValue<_>>::new(0)
2947    }
2948}
2949
2950#[doc(hidden)]
2951#[derive(Copy, Clone, Eq, PartialEq)]
2952pub struct Dma5IdxReg_SPEC;
2953impl crate::sealed::RegSpec for Dma5IdxReg_SPEC {
2954    type DataType = u16;
2955}
2956
2957#[doc = "Index value of DMA channel 5"]
2958pub type Dma5IdxReg = crate::RegValueT<Dma5IdxReg_SPEC>;
2959
2960impl Dma5IdxReg {
2961    #[doc = "This (read-only) register determines the data items currently fetched by the DMA channel, during an on-going transfer. When the transfer is completed, the register is automatically reset to 0.\nThe DMA channel uses this register to form the source/destination address of the next DMA cycle, considering also AINC/BINC and BW."]
2962    #[inline(always)]
2963    pub fn dma5_idx(
2964        self,
2965    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma5IdxReg_SPEC, crate::common::R>
2966    {
2967        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma5IdxReg_SPEC,crate::common::R>::from_register(self,0)
2968    }
2969}
2970impl ::core::default::Default for Dma5IdxReg {
2971    #[inline(always)]
2972    fn default() -> Dma5IdxReg {
2973        <crate::RegValueT<Dma5IdxReg_SPEC> as RegisterValue<_>>::new(0)
2974    }
2975}
2976
2977#[doc(hidden)]
2978#[derive(Copy, Clone, Eq, PartialEq)]
2979pub struct Dma5IntReg_SPEC;
2980impl crate::sealed::RegSpec for Dma5IntReg_SPEC {
2981    type DataType = u16;
2982}
2983
2984#[doc = "DMA receive interrupt register channel 5"]
2985pub type Dma5IntReg = crate::RegValueT<Dma5IntReg_SPEC>;
2986
2987impl Dma5IntReg {
2988    #[doc = "Number of transfers until an interrupt is generated. The interrupt is generated after a transfer, if DMAx_INT_REG is equal to DMAx_IDX_REG and before DMAx_IDX_REG is incremented. The bit-field IRQ_ENABLE of DMAx_CTRL_REG must be set to \'1\' to let the controller generate the interrupt."]
2989    #[inline(always)]
2990    pub fn dma5_int(
2991        self,
2992    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma5IntReg_SPEC, crate::common::RW>
2993    {
2994        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma5IntReg_SPEC,crate::common::RW>::from_register(self,0)
2995    }
2996}
2997impl ::core::default::Default for Dma5IntReg {
2998    #[inline(always)]
2999    fn default() -> Dma5IntReg {
3000        <crate::RegValueT<Dma5IntReg_SPEC> as RegisterValue<_>>::new(0)
3001    }
3002}
3003
3004#[doc(hidden)]
3005#[derive(Copy, Clone, Eq, PartialEq)]
3006pub struct Dma5LenReg_SPEC;
3007impl crate::sealed::RegSpec for Dma5LenReg_SPEC {
3008    type DataType = u16;
3009}
3010
3011#[doc = "DMA receive length register channel 5"]
3012pub type Dma5LenReg = crate::RegValueT<Dma5LenReg_SPEC>;
3013
3014impl Dma5LenReg {
3015    #[doc = "DMA channel\'s transfer length. DMAx_LEN of value 0, 1, 2, ... results into an actual transfer length of 1, 2, 3, ..."]
3016    #[inline(always)]
3017    pub fn dma5_len(
3018        self,
3019    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma5LenReg_SPEC, crate::common::RW>
3020    {
3021        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma5LenReg_SPEC,crate::common::RW>::from_register(self,0)
3022    }
3023}
3024impl ::core::default::Default for Dma5LenReg {
3025    #[inline(always)]
3026    fn default() -> Dma5LenReg {
3027        <crate::RegValueT<Dma5LenReg_SPEC> as RegisterValue<_>>::new(0)
3028    }
3029}
3030
3031#[doc(hidden)]
3032#[derive(Copy, Clone, Eq, PartialEq)]
3033pub struct Dma6AStarthReg_SPEC;
3034impl crate::sealed::RegSpec for Dma6AStarthReg_SPEC {
3035    type DataType = u16;
3036}
3037
3038#[doc = "Start address High A of DMA channel 6"]
3039pub type Dma6AStarthReg = crate::RegValueT<Dma6AStarthReg_SPEC>;
3040
3041impl Dma6AStarthReg {
3042    #[doc = "Source start address, upper 16 bits"]
3043    #[inline(always)]
3044    pub fn dma6_a_starth(
3045        self,
3046    ) -> crate::common::RegisterField<
3047        0,
3048        0xffff,
3049        1,
3050        0,
3051        u16,
3052        u16,
3053        Dma6AStarthReg_SPEC,
3054        crate::common::RW,
3055    > {
3056        crate::common::RegisterField::<
3057            0,
3058            0xffff,
3059            1,
3060            0,
3061            u16,
3062            u16,
3063            Dma6AStarthReg_SPEC,
3064            crate::common::RW,
3065        >::from_register(self, 0)
3066    }
3067}
3068impl ::core::default::Default for Dma6AStarthReg {
3069    #[inline(always)]
3070    fn default() -> Dma6AStarthReg {
3071        <crate::RegValueT<Dma6AStarthReg_SPEC> as RegisterValue<_>>::new(0)
3072    }
3073}
3074
3075#[doc(hidden)]
3076#[derive(Copy, Clone, Eq, PartialEq)]
3077pub struct Dma6AStartlReg_SPEC;
3078impl crate::sealed::RegSpec for Dma6AStartlReg_SPEC {
3079    type DataType = u16;
3080}
3081
3082#[doc = "Start address Low A of DMA channel 6"]
3083pub type Dma6AStartlReg = crate::RegValueT<Dma6AStartlReg_SPEC>;
3084
3085impl Dma6AStartlReg {
3086    #[doc = "Source start address, lower 16 bits"]
3087    #[inline(always)]
3088    pub fn dma6_a_startl(
3089        self,
3090    ) -> crate::common::RegisterField<
3091        0,
3092        0xffff,
3093        1,
3094        0,
3095        u16,
3096        u16,
3097        Dma6AStartlReg_SPEC,
3098        crate::common::RW,
3099    > {
3100        crate::common::RegisterField::<
3101            0,
3102            0xffff,
3103            1,
3104            0,
3105            u16,
3106            u16,
3107            Dma6AStartlReg_SPEC,
3108            crate::common::RW,
3109        >::from_register(self, 0)
3110    }
3111}
3112impl ::core::default::Default for Dma6AStartlReg {
3113    #[inline(always)]
3114    fn default() -> Dma6AStartlReg {
3115        <crate::RegValueT<Dma6AStartlReg_SPEC> as RegisterValue<_>>::new(0)
3116    }
3117}
3118
3119#[doc(hidden)]
3120#[derive(Copy, Clone, Eq, PartialEq)]
3121pub struct Dma6BStarthReg_SPEC;
3122impl crate::sealed::RegSpec for Dma6BStarthReg_SPEC {
3123    type DataType = u16;
3124}
3125
3126#[doc = "Start address High B of DMA channel 6"]
3127pub type Dma6BStarthReg = crate::RegValueT<Dma6BStarthReg_SPEC>;
3128
3129impl Dma6BStarthReg {
3130    #[doc = "Destination start address, upper 16 bits"]
3131    #[inline(always)]
3132    pub fn dma6_b_starth(
3133        self,
3134    ) -> crate::common::RegisterField<
3135        0,
3136        0xffff,
3137        1,
3138        0,
3139        u16,
3140        u16,
3141        Dma6BStarthReg_SPEC,
3142        crate::common::RW,
3143    > {
3144        crate::common::RegisterField::<
3145            0,
3146            0xffff,
3147            1,
3148            0,
3149            u16,
3150            u16,
3151            Dma6BStarthReg_SPEC,
3152            crate::common::RW,
3153        >::from_register(self, 0)
3154    }
3155}
3156impl ::core::default::Default for Dma6BStarthReg {
3157    #[inline(always)]
3158    fn default() -> Dma6BStarthReg {
3159        <crate::RegValueT<Dma6BStarthReg_SPEC> as RegisterValue<_>>::new(0)
3160    }
3161}
3162
3163#[doc(hidden)]
3164#[derive(Copy, Clone, Eq, PartialEq)]
3165pub struct Dma6BStartlReg_SPEC;
3166impl crate::sealed::RegSpec for Dma6BStartlReg_SPEC {
3167    type DataType = u16;
3168}
3169
3170#[doc = "Start address Low B of DMA channel 6"]
3171pub type Dma6BStartlReg = crate::RegValueT<Dma6BStartlReg_SPEC>;
3172
3173impl Dma6BStartlReg {
3174    #[doc = "Destination start address, lower 16 bits"]
3175    #[inline(always)]
3176    pub fn dma6_b_startl(
3177        self,
3178    ) -> crate::common::RegisterField<
3179        0,
3180        0xffff,
3181        1,
3182        0,
3183        u16,
3184        u16,
3185        Dma6BStartlReg_SPEC,
3186        crate::common::RW,
3187    > {
3188        crate::common::RegisterField::<
3189            0,
3190            0xffff,
3191            1,
3192            0,
3193            u16,
3194            u16,
3195            Dma6BStartlReg_SPEC,
3196            crate::common::RW,
3197        >::from_register(self, 0)
3198    }
3199}
3200impl ::core::default::Default for Dma6BStartlReg {
3201    #[inline(always)]
3202    fn default() -> Dma6BStartlReg {
3203        <crate::RegValueT<Dma6BStartlReg_SPEC> as RegisterValue<_>>::new(0)
3204    }
3205}
3206
3207#[doc(hidden)]
3208#[derive(Copy, Clone, Eq, PartialEq)]
3209pub struct Dma6CtrlReg_SPEC;
3210impl crate::sealed::RegSpec for Dma6CtrlReg_SPEC {
3211    type DataType = u16;
3212}
3213
3214#[doc = "Control register for the DMA channel 6"]
3215pub type Dma6CtrlReg = crate::RegValueT<Dma6CtrlReg_SPEC>;
3216
3217impl Dma6CtrlReg {
3218    #[doc = "0 = DMA operates with level-sensitive peripheral requests (default)\n1 = DMA operates with (positive) edge-sensitive peripheral requests"]
3219    #[inline(always)]
3220    pub fn req_sense(
3221        self,
3222    ) -> crate::common::RegisterFieldBool<13, 1, 0, Dma6CtrlReg_SPEC, crate::common::RW> {
3223        crate::common::RegisterFieldBool::<13,1,0,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3224    }
3225
3226    #[doc = "0 = DMA performs copy A1 to B1, A2 to B2, etc ...\n1 = DMA performs copy of A1 to B1, B2, etc ...\nThis feature is useful for memory initialization to any value. Thus, BINC must be set to \'1\', while AINC is don\'t care, as only one fetch from A is done. This process cannot be interrupted by other DMA channels. It is also noted that DMA_INIT should not be used when DREQ_MODE=\'1\'."]
3227    #[inline(always)]
3228    pub fn dma_init(
3229        self,
3230    ) -> crate::common::RegisterFieldBool<12, 1, 0, Dma6CtrlReg_SPEC, crate::common::RW> {
3231        crate::common::RegisterFieldBool::<12,1,0,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3232    }
3233
3234    #[doc = "0 = Blocking mode, the DMA performs a fast back-to-back copy, disabling bus access for any bus master with lower priority.\n1 = Interrupting mode, the DMA inserts a wait cycle after each store allowing the CPU to steal cycles or cache to perform a burst read. If DREQ_MODE=\'1\', DMA_IDLE is don\'t care."]
3235    #[inline(always)]
3236    pub fn dma_idle(
3237        self,
3238    ) -> crate::common::RegisterFieldBool<11, 1, 0, Dma6CtrlReg_SPEC, crate::common::RW> {
3239        crate::common::RegisterFieldBool::<11,1,0,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3240    }
3241
3242    #[doc = "The priority level determines which DMA channel will be granted access for transferring data, in case more than one channels are active and request the bus at the same time. The greater the value, the higher the priority. In specific:\n000 = lowest priority\n111 = highest priority\nIf different channels with equal priority level values request the bus at the same time, an inherent priority mechanism is applied. According to this mechanism, if, for example, both the DMA0 and DMA1 channels have the same priority level, then DMA0 will first be granted access to the bus."]
3243    #[inline(always)]
3244    pub fn dma_prio(
3245        self,
3246    ) -> crate::common::RegisterField<8, 0x7, 1, 0, u8, u8, Dma6CtrlReg_SPEC, crate::common::RW>
3247    {
3248        crate::common::RegisterField::<8,0x7,1,0,u8,u8,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3249    }
3250
3251    #[doc = "0 = Normal mode. The DMA channel stops after having completed the transfer of length determined by DMAx_LEN_REG. DMA_ON automatically deasserts when the transfer is completed.\n1 = Circular mode (applicable only if DREQ_MODE = \'1\'). In this mode, DMA_ON never deasserts, as the DMA channel automatically resets DMAx_IDX_REG and starts a new transfer."]
3252    #[inline(always)]
3253    pub fn circular(
3254        self,
3255    ) -> crate::common::RegisterFieldBool<7, 1, 0, Dma6CtrlReg_SPEC, crate::common::RW> {
3256        crate::common::RegisterFieldBool::<7,1,0,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3257    }
3258
3259    #[doc = "Enable increment of source address.\n0 = do not increment (source address stays the same during the transfer)\n1 = increment according to the value of BW bit-field (by 1, when BW=\"00\" ; by 2, when BW=\"01\" ; by 4, when BW=\"10\")"]
3260    #[inline(always)]
3261    pub fn ainc(
3262        self,
3263    ) -> crate::common::RegisterFieldBool<6, 1, 0, Dma6CtrlReg_SPEC, crate::common::RW> {
3264        crate::common::RegisterFieldBool::<6,1,0,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3265    }
3266
3267    #[doc = "Enable increment of destination address.\n0 = do not increment (destination address stays the same during the transfer)\n1 = increment according to the value of BW bit-field (by 1, when BW=\"00\" ; by 2, when BW=\"01\" ; by 4, when BW=\"10\")"]
3268    #[inline(always)]
3269    pub fn binc(
3270        self,
3271    ) -> crate::common::RegisterFieldBool<5, 1, 0, Dma6CtrlReg_SPEC, crate::common::RW> {
3272        crate::common::RegisterFieldBool::<5,1,0,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3273    }
3274
3275    #[doc = "0 = DMA channel starts immediately\n1 = DMA channel must be triggered by peripheral DMA request (see also the description of DMA_REQ_MUX_REG)"]
3276    #[inline(always)]
3277    pub fn dreq_mode(
3278        self,
3279    ) -> crate::common::RegisterFieldBool<4, 1, 0, Dma6CtrlReg_SPEC, crate::common::RW> {
3280        crate::common::RegisterFieldBool::<4,1,0,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3281    }
3282
3283    #[doc = "0 = disable interrupt on this channel\n1 = enable interrupt on this channel"]
3284    #[inline(always)]
3285    pub fn irq_enable(
3286        self,
3287    ) -> crate::common::RegisterFieldBool<3, 1, 0, Dma6CtrlReg_SPEC, crate::common::RW> {
3288        crate::common::RegisterFieldBool::<3,1,0,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3289    }
3290
3291    #[doc = "Bus transfer width:\n00 = 1 Byte (suggested for peripherals like UART and 8-bit SPI)\n01 = 2 Bytes (suggested for peripherals like I2C and 16-bit SPI)\n10 = 4 Bytes (suggested for Memory-to-Memory transfers)\n11 = Reserved"]
3292    #[inline(always)]
3293    pub fn bw(
3294        self,
3295    ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, Dma6CtrlReg_SPEC, crate::common::RW>
3296    {
3297        crate::common::RegisterField::<1,0x3,1,0,u8,u8,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3298    }
3299
3300    #[doc = "0 = DMA channel is off, clocks are disabled\n1 = DMA channel is enabled. This bit will be automatically cleared after the completion of a transfer, if circular mode is not enabled. In circular mode, this bit stays set."]
3301    #[inline(always)]
3302    pub fn dma_on(
3303        self,
3304    ) -> crate::common::RegisterFieldBool<0, 1, 0, Dma6CtrlReg_SPEC, crate::common::RW> {
3305        crate::common::RegisterFieldBool::<0,1,0,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3306    }
3307}
3308impl ::core::default::Default for Dma6CtrlReg {
3309    #[inline(always)]
3310    fn default() -> Dma6CtrlReg {
3311        <crate::RegValueT<Dma6CtrlReg_SPEC> as RegisterValue<_>>::new(0)
3312    }
3313}
3314
3315#[doc(hidden)]
3316#[derive(Copy, Clone, Eq, PartialEq)]
3317pub struct Dma6IdxReg_SPEC;
3318impl crate::sealed::RegSpec for Dma6IdxReg_SPEC {
3319    type DataType = u16;
3320}
3321
3322#[doc = "Index value of DMA channel 6"]
3323pub type Dma6IdxReg = crate::RegValueT<Dma6IdxReg_SPEC>;
3324
3325impl Dma6IdxReg {
3326    #[doc = "This (read-only) register determines the data items currently fetched by the DMA channel, during an on-going transfer. When the transfer is completed, the register is automatically reset to 0.\nThe DMA channel uses this register to form the source/destination address of the next DMA cycle, considering also AINC/BINC and BW."]
3327    #[inline(always)]
3328    pub fn dma6_idx(
3329        self,
3330    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma6IdxReg_SPEC, crate::common::R>
3331    {
3332        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma6IdxReg_SPEC,crate::common::R>::from_register(self,0)
3333    }
3334}
3335impl ::core::default::Default for Dma6IdxReg {
3336    #[inline(always)]
3337    fn default() -> Dma6IdxReg {
3338        <crate::RegValueT<Dma6IdxReg_SPEC> as RegisterValue<_>>::new(0)
3339    }
3340}
3341
3342#[doc(hidden)]
3343#[derive(Copy, Clone, Eq, PartialEq)]
3344pub struct Dma6IntReg_SPEC;
3345impl crate::sealed::RegSpec for Dma6IntReg_SPEC {
3346    type DataType = u16;
3347}
3348
3349#[doc = "DMA receive interrupt register channel 6"]
3350pub type Dma6IntReg = crate::RegValueT<Dma6IntReg_SPEC>;
3351
3352impl Dma6IntReg {
3353    #[doc = "Number of transfers until an interrupt is generated. The interrupt is generated after a transfer, if DMAx_INT_REG is equal to DMAx_IDX_REG and before DMAx_IDX_REG is incremented. The bit-field IRQ_ENABLE of DMAx_CTRL_REG must be set to \'1\' to let the controller generate the interrupt."]
3354    #[inline(always)]
3355    pub fn dma6_int(
3356        self,
3357    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma6IntReg_SPEC, crate::common::RW>
3358    {
3359        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma6IntReg_SPEC,crate::common::RW>::from_register(self,0)
3360    }
3361}
3362impl ::core::default::Default for Dma6IntReg {
3363    #[inline(always)]
3364    fn default() -> Dma6IntReg {
3365        <crate::RegValueT<Dma6IntReg_SPEC> as RegisterValue<_>>::new(0)
3366    }
3367}
3368
3369#[doc(hidden)]
3370#[derive(Copy, Clone, Eq, PartialEq)]
3371pub struct Dma6LenReg_SPEC;
3372impl crate::sealed::RegSpec for Dma6LenReg_SPEC {
3373    type DataType = u16;
3374}
3375
3376#[doc = "DMA receive length register channel 6"]
3377pub type Dma6LenReg = crate::RegValueT<Dma6LenReg_SPEC>;
3378
3379impl Dma6LenReg {
3380    #[doc = "DMA channel\'s transfer length. DMAx_LEN of value 0, 1, 2, ... results into an actual transfer length of 1, 2, 3, ..."]
3381    #[inline(always)]
3382    pub fn dma6_len(
3383        self,
3384    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma6LenReg_SPEC, crate::common::RW>
3385    {
3386        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma6LenReg_SPEC,crate::common::RW>::from_register(self,0)
3387    }
3388}
3389impl ::core::default::Default for Dma6LenReg {
3390    #[inline(always)]
3391    fn default() -> Dma6LenReg {
3392        <crate::RegValueT<Dma6LenReg_SPEC> as RegisterValue<_>>::new(0)
3393    }
3394}
3395
3396#[doc(hidden)]
3397#[derive(Copy, Clone, Eq, PartialEq)]
3398pub struct Dma7AStarthReg_SPEC;
3399impl crate::sealed::RegSpec for Dma7AStarthReg_SPEC {
3400    type DataType = u16;
3401}
3402
3403#[doc = "Start address High A of DMA channel 7"]
3404pub type Dma7AStarthReg = crate::RegValueT<Dma7AStarthReg_SPEC>;
3405
3406impl Dma7AStarthReg {
3407    #[doc = "Source start address, upper 16 bits\nNOTE: See also the DMA chapter of the Datasheet for the allowed range of the DMA7 source address in Secure Boot mode."]
3408    #[inline(always)]
3409    pub fn dma7_a_starth(
3410        self,
3411    ) -> crate::common::RegisterField<
3412        0,
3413        0xffff,
3414        1,
3415        0,
3416        u16,
3417        u16,
3418        Dma7AStarthReg_SPEC,
3419        crate::common::RW,
3420    > {
3421        crate::common::RegisterField::<
3422            0,
3423            0xffff,
3424            1,
3425            0,
3426            u16,
3427            u16,
3428            Dma7AStarthReg_SPEC,
3429            crate::common::RW,
3430        >::from_register(self, 0)
3431    }
3432}
3433impl ::core::default::Default for Dma7AStarthReg {
3434    #[inline(always)]
3435    fn default() -> Dma7AStarthReg {
3436        <crate::RegValueT<Dma7AStarthReg_SPEC> as RegisterValue<_>>::new(0)
3437    }
3438}
3439
3440#[doc(hidden)]
3441#[derive(Copy, Clone, Eq, PartialEq)]
3442pub struct Dma7AStartlReg_SPEC;
3443impl crate::sealed::RegSpec for Dma7AStartlReg_SPEC {
3444    type DataType = u16;
3445}
3446
3447#[doc = "Start address Low A of DMA channel 7"]
3448pub type Dma7AStartlReg = crate::RegValueT<Dma7AStartlReg_SPEC>;
3449
3450impl Dma7AStartlReg {
3451    #[doc = "Source start address, lower 16 bits\nNOTE: See also the DMA chapter of the Datasheet for the allowed range of the DMA7 source address in Secure Boot mode."]
3452    #[inline(always)]
3453    pub fn dma7_a_startl(
3454        self,
3455    ) -> crate::common::RegisterField<
3456        0,
3457        0xffff,
3458        1,
3459        0,
3460        u16,
3461        u16,
3462        Dma7AStartlReg_SPEC,
3463        crate::common::RW,
3464    > {
3465        crate::common::RegisterField::<
3466            0,
3467            0xffff,
3468            1,
3469            0,
3470            u16,
3471            u16,
3472            Dma7AStartlReg_SPEC,
3473            crate::common::RW,
3474        >::from_register(self, 0)
3475    }
3476}
3477impl ::core::default::Default for Dma7AStartlReg {
3478    #[inline(always)]
3479    fn default() -> Dma7AStartlReg {
3480        <crate::RegValueT<Dma7AStartlReg_SPEC> as RegisterValue<_>>::new(0)
3481    }
3482}
3483
3484#[doc(hidden)]
3485#[derive(Copy, Clone, Eq, PartialEq)]
3486pub struct Dma7BStarthReg_SPEC;
3487impl crate::sealed::RegSpec for Dma7BStarthReg_SPEC {
3488    type DataType = u16;
3489}
3490
3491#[doc = "Start address High B of DMA channel 7"]
3492pub type Dma7BStarthReg = crate::RegValueT<Dma7BStarthReg_SPEC>;
3493
3494impl Dma7BStarthReg {
3495    #[doc = "Destination start address, upper 16 bits\nNOTE: In Secure Boot mode, this register is overruled to the higher 16 bits of address CRYPTO_KEYS_START_ADDR."]
3496    #[inline(always)]
3497    pub fn dma7_b_starth(
3498        self,
3499    ) -> crate::common::RegisterField<
3500        0,
3501        0xffff,
3502        1,
3503        0,
3504        u16,
3505        u16,
3506        Dma7BStarthReg_SPEC,
3507        crate::common::RW,
3508    > {
3509        crate::common::RegisterField::<
3510            0,
3511            0xffff,
3512            1,
3513            0,
3514            u16,
3515            u16,
3516            Dma7BStarthReg_SPEC,
3517            crate::common::RW,
3518        >::from_register(self, 0)
3519    }
3520}
3521impl ::core::default::Default for Dma7BStarthReg {
3522    #[inline(always)]
3523    fn default() -> Dma7BStarthReg {
3524        <crate::RegValueT<Dma7BStarthReg_SPEC> as RegisterValue<_>>::new(0)
3525    }
3526}
3527
3528#[doc(hidden)]
3529#[derive(Copy, Clone, Eq, PartialEq)]
3530pub struct Dma7BStartlReg_SPEC;
3531impl crate::sealed::RegSpec for Dma7BStartlReg_SPEC {
3532    type DataType = u16;
3533}
3534
3535#[doc = "Start address Low B of DMA channel 7"]
3536pub type Dma7BStartlReg = crate::RegValueT<Dma7BStartlReg_SPEC>;
3537
3538impl Dma7BStartlReg {
3539    #[doc = "Destination start address, lower 16 bits\nNOTE: In Secure Boot mode, this register is overruled to the lower 16 bits of address CRYPTO_KEYS_START_ADDR."]
3540    #[inline(always)]
3541    pub fn dma7_b_startl(
3542        self,
3543    ) -> crate::common::RegisterField<
3544        0,
3545        0xffff,
3546        1,
3547        0,
3548        u16,
3549        u16,
3550        Dma7BStartlReg_SPEC,
3551        crate::common::RW,
3552    > {
3553        crate::common::RegisterField::<
3554            0,
3555            0xffff,
3556            1,
3557            0,
3558            u16,
3559            u16,
3560            Dma7BStartlReg_SPEC,
3561            crate::common::RW,
3562        >::from_register(self, 0)
3563    }
3564}
3565impl ::core::default::Default for Dma7BStartlReg {
3566    #[inline(always)]
3567    fn default() -> Dma7BStartlReg {
3568        <crate::RegValueT<Dma7BStartlReg_SPEC> as RegisterValue<_>>::new(0)
3569    }
3570}
3571
3572#[doc(hidden)]
3573#[derive(Copy, Clone, Eq, PartialEq)]
3574pub struct Dma7CtrlReg_SPEC;
3575impl crate::sealed::RegSpec for Dma7CtrlReg_SPEC {
3576    type DataType = u16;
3577}
3578
3579#[doc = "Control register for the DMA channel 7"]
3580pub type Dma7CtrlReg = crate::RegValueT<Dma7CtrlReg_SPEC>;
3581
3582impl Dma7CtrlReg {
3583    #[doc = "0 = DMA operates with level-sensitive peripheral requests (default)\n1 = DMA operates with (positive) edge-sensitive peripheral requests"]
3584    #[inline(always)]
3585    pub fn req_sense(
3586        self,
3587    ) -> crate::common::RegisterFieldBool<13, 1, 0, Dma7CtrlReg_SPEC, crate::common::RW> {
3588        crate::common::RegisterFieldBool::<13,1,0,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3589    }
3590
3591    #[doc = "0 = DMA performs copy A1 to B1, A2 to B2, etc ...\n1 = DMA performs copy of A1 to B1, B2, etc ...\nThis feature is useful for memory initialization to any value. Thus, BINC must be set to \'1\', while AINC is don\'t care, as only one fetch from A is done. This process cannot be interrupted by other DMA channels. It is also noted that DMA_INIT should not be used when DREQ_MODE=\'1\'.\nNOTE: This bit-field is overruled to \'0\' when the DMA7 channel is configured as \"trusted\" channel (in Secure Boot mode)."]
3592    #[inline(always)]
3593    pub fn dma_init(
3594        self,
3595    ) -> crate::common::RegisterFieldBool<12, 1, 0, Dma7CtrlReg_SPEC, crate::common::RW> {
3596        crate::common::RegisterFieldBool::<12,1,0,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3597    }
3598
3599    #[doc = "0 = Blocking mode, the DMA performs a fast back-to-back copy, disabling bus access for any bus master with lower priority.\n1 = Interrupting mode, the DMA inserts a wait cycle after each store allowing the CPU to steal cycles or cache to perform a burst read. If DREQ_MODE=\'1\', DMA_IDLE is don\'t care.\n*NOTE: This bit-field is overruled to \'0\' when the DMA7 channel is configured as \"trusted\" channel (in Secure Boot mode)."]
3600    #[inline(always)]
3601    pub fn dma_idle(
3602        self,
3603    ) -> crate::common::RegisterFieldBool<11, 1, 0, Dma7CtrlReg_SPEC, crate::common::RW> {
3604        crate::common::RegisterFieldBool::<11,1,0,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3605    }
3606
3607    #[doc = "The priority level determines which DMA channel will be granted access for transferring data, in case more than one channels are active and request the bus at the same time. The greater the value, the higher the priority. In specific:\n000 = lowest priority\n111 = highest priority\nIf different channels with equal priority level values request the bus at the same time, an inherent priority mechanism is applied. According to this mechanism, if, for example, both the DMA0 and DMA1 channels have the same priority level, then DMA0 will first be granted access to the bus."]
3608    #[inline(always)]
3609    pub fn dma_prio(
3610        self,
3611    ) -> crate::common::RegisterField<8, 0x7, 1, 0, u8, u8, Dma7CtrlReg_SPEC, crate::common::RW>
3612    {
3613        crate::common::RegisterField::<8,0x7,1,0,u8,u8,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3614    }
3615
3616    #[doc = "0 = Normal mode. The DMA channel stops after having completed the transfer of length determined by DMAx_LEN_REG. DMA_ON automatically deasserts when the transfer is completed.\n1 = Circular mode (applicable only if DREQ_MODE = \'1\'). In this mode, DMA_ON never deasserts, as the DMA channel automatically resets DMAx_IDX_REG and starts a new transfer."]
3617    #[inline(always)]
3618    pub fn circular(
3619        self,
3620    ) -> crate::common::RegisterFieldBool<7, 1, 0, Dma7CtrlReg_SPEC, crate::common::RW> {
3621        crate::common::RegisterFieldBool::<7,1,0,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3622    }
3623
3624    #[doc = "Enable increment of source address.\n0 = do not increment (source address stays the same during the transfer)\n1 = increment according to the value of BW bit-field (by 1, when BW=\"00\" ; by 2, when BW=\"01\" ; by 4, when BW=\"10\")"]
3625    #[inline(always)]
3626    pub fn ainc(
3627        self,
3628    ) -> crate::common::RegisterFieldBool<6, 1, 0, Dma7CtrlReg_SPEC, crate::common::RW> {
3629        crate::common::RegisterFieldBool::<6,1,0,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3630    }
3631
3632    #[doc = "Enable increment of destination address.\n0 = do not increment (destination address stays the same during the transfer)\n1 = increment according to the value of BW bit-field (by 1, when BW=\"00\" ; by 2, when BW=\"01\" ; by 4, when BW=\"10\")"]
3633    #[inline(always)]
3634    pub fn binc(
3635        self,
3636    ) -> crate::common::RegisterFieldBool<5, 1, 0, Dma7CtrlReg_SPEC, crate::common::RW> {
3637        crate::common::RegisterFieldBool::<5,1,0,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3638    }
3639
3640    #[doc = "0 = DMA channel starts immediately\n1 = DMA channel must be triggered by peripheral DMA request (see also the description of DMA_REQ_MUX_REG)\n*NOTE: This bit-field is overruled to \'0\' when channel DMA7 is configured as \"trusted\" channel (in Secure Boot mode)."]
3641    #[inline(always)]
3642    pub fn dreq_mode(
3643        self,
3644    ) -> crate::common::RegisterFieldBool<4, 1, 0, Dma7CtrlReg_SPEC, crate::common::RW> {
3645        crate::common::RegisterFieldBool::<4,1,0,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3646    }
3647
3648    #[doc = "0 = disable interrupt on this channel\n1 = enable interrupt on this channel"]
3649    #[inline(always)]
3650    pub fn irq_enable(
3651        self,
3652    ) -> crate::common::RegisterFieldBool<3, 1, 0, Dma7CtrlReg_SPEC, crate::common::RW> {
3653        crate::common::RegisterFieldBool::<3,1,0,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3654    }
3655
3656    #[doc = "Bus transfer width:\n00 = 1 Byte (suggested for peripherals like UART and 8-bit SPI)\n01 = 2 Bytes (suggested for peripherals like I2C and 16-bit SPI)\n10 = 4 Bytes (suggested for Memory-to-Memory transfers)\n11 = Reserved\nNOTE: This bit-field is overruled to \"10\" when channel DMA7 is configured as \"trusted\" channel (in Secure Boot mode)."]
3657    #[inline(always)]
3658    pub fn bw(
3659        self,
3660    ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, Dma7CtrlReg_SPEC, crate::common::RW>
3661    {
3662        crate::common::RegisterField::<1,0x3,1,0,u8,u8,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3663    }
3664
3665    #[doc = "0 = DMA channel is off, clocks are disabled\n1 = DMA channel is enabled. This bit will be automatically cleared after the completion of a transfer, if circular mode is not enabled. In circular mode, this bit stays set."]
3666    #[inline(always)]
3667    pub fn dma_on(
3668        self,
3669    ) -> crate::common::RegisterFieldBool<0, 1, 0, Dma7CtrlReg_SPEC, crate::common::RW> {
3670        crate::common::RegisterFieldBool::<0,1,0,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
3671    }
3672}
3673impl ::core::default::Default for Dma7CtrlReg {
3674    #[inline(always)]
3675    fn default() -> Dma7CtrlReg {
3676        <crate::RegValueT<Dma7CtrlReg_SPEC> as RegisterValue<_>>::new(0)
3677    }
3678}
3679
3680#[doc(hidden)]
3681#[derive(Copy, Clone, Eq, PartialEq)]
3682pub struct Dma7IdxReg_SPEC;
3683impl crate::sealed::RegSpec for Dma7IdxReg_SPEC {
3684    type DataType = u16;
3685}
3686
3687#[doc = "Index value of DMA channel 7"]
3688pub type Dma7IdxReg = crate::RegValueT<Dma7IdxReg_SPEC>;
3689
3690impl Dma7IdxReg {
3691    #[doc = "This (read-only) register determines the data items currently fetched by the DMA channel, during an on-going transfer. When the transfer is completed, the register is automatically reset to 0.\nThe DMA channel uses this register to form the source/destination address of the next DMA cycle, considering also AINC/BINC and BW."]
3692    #[inline(always)]
3693    pub fn dma7_idx(
3694        self,
3695    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma7IdxReg_SPEC, crate::common::R>
3696    {
3697        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma7IdxReg_SPEC,crate::common::R>::from_register(self,0)
3698    }
3699}
3700impl ::core::default::Default for Dma7IdxReg {
3701    #[inline(always)]
3702    fn default() -> Dma7IdxReg {
3703        <crate::RegValueT<Dma7IdxReg_SPEC> as RegisterValue<_>>::new(0)
3704    }
3705}
3706
3707#[doc(hidden)]
3708#[derive(Copy, Clone, Eq, PartialEq)]
3709pub struct Dma7IntReg_SPEC;
3710impl crate::sealed::RegSpec for Dma7IntReg_SPEC {
3711    type DataType = u16;
3712}
3713
3714#[doc = "DMA receive interrupt register channel 7"]
3715pub type Dma7IntReg = crate::RegValueT<Dma7IntReg_SPEC>;
3716
3717impl Dma7IntReg {
3718    #[doc = "Number of transfers until an interrupt is generated. The interrupt is generated after a transfer, if DMAx_INT_REG is equal to DMAx_IDX_REG and before DMAx_IDX_REG is incremented. The bit-field IRQ_ENABLE of DMAx_CTRL_REG must be set to \'1\' to let the controller generate the interrupt."]
3719    #[inline(always)]
3720    pub fn dma7_int(
3721        self,
3722    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma7IntReg_SPEC, crate::common::RW>
3723    {
3724        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma7IntReg_SPEC,crate::common::RW>::from_register(self,0)
3725    }
3726}
3727impl ::core::default::Default for Dma7IntReg {
3728    #[inline(always)]
3729    fn default() -> Dma7IntReg {
3730        <crate::RegValueT<Dma7IntReg_SPEC> as RegisterValue<_>>::new(0)
3731    }
3732}
3733
3734#[doc(hidden)]
3735#[derive(Copy, Clone, Eq, PartialEq)]
3736pub struct Dma7LenReg_SPEC;
3737impl crate::sealed::RegSpec for Dma7LenReg_SPEC {
3738    type DataType = u16;
3739}
3740
3741#[doc = "DMA receive length register channel 7"]
3742pub type Dma7LenReg = crate::RegValueT<Dma7LenReg_SPEC>;
3743
3744impl Dma7LenReg {
3745    #[doc = "DMA channel\'s transfer length. DMAx_LEN of value 0, 1, 2, ... results into an actual transfer length of 1, 2, 3, ..."]
3746    #[inline(always)]
3747    pub fn dma7_len(
3748        self,
3749    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma7LenReg_SPEC, crate::common::RW>
3750    {
3751        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma7LenReg_SPEC,crate::common::RW>::from_register(self,0)
3752    }
3753}
3754impl ::core::default::Default for Dma7LenReg {
3755    #[inline(always)]
3756    fn default() -> Dma7LenReg {
3757        <crate::RegValueT<Dma7LenReg_SPEC> as RegisterValue<_>>::new(0)
3758    }
3759}
3760
3761#[doc(hidden)]
3762#[derive(Copy, Clone, Eq, PartialEq)]
3763pub struct DmaClearIntReg_SPEC;
3764impl crate::sealed::RegSpec for DmaClearIntReg_SPEC {
3765    type DataType = u16;
3766}
3767
3768#[doc = "DMA clear interrupt register"]
3769pub type DmaClearIntReg = crate::RegValueT<DmaClearIntReg_SPEC>;
3770
3771impl DmaClearIntReg {
3772    #[doc = "Writing a 1 will reset the status bit of DMA_INT_STATUS_REG for channel 7 ; writing a 0 will have no effect"]
3773    #[inline(always)]
3774    pub fn dma_rst_irq_ch7(
3775        self,
3776    ) -> crate::common::RegisterFieldBool<7, 1, 0, DmaClearIntReg_SPEC, crate::common::W> {
3777        crate::common::RegisterFieldBool::<7,1,0,DmaClearIntReg_SPEC,crate::common::W>::from_register(self,0)
3778    }
3779
3780    #[doc = "Writing a 1 will reset the status bit of DMA_INT_STATUS_REG for channel 6 ; writing a 0 will have no effect"]
3781    #[inline(always)]
3782    pub fn dma_rst_irq_ch6(
3783        self,
3784    ) -> crate::common::RegisterFieldBool<6, 1, 0, DmaClearIntReg_SPEC, crate::common::W> {
3785        crate::common::RegisterFieldBool::<6,1,0,DmaClearIntReg_SPEC,crate::common::W>::from_register(self,0)
3786    }
3787
3788    #[doc = "Writing a 1 will reset the status bit of DMA_INT_STATUS_REG for channel 5 ; writing a 0 will have no effect"]
3789    #[inline(always)]
3790    pub fn dma_rst_irq_ch5(
3791        self,
3792    ) -> crate::common::RegisterFieldBool<5, 1, 0, DmaClearIntReg_SPEC, crate::common::W> {
3793        crate::common::RegisterFieldBool::<5,1,0,DmaClearIntReg_SPEC,crate::common::W>::from_register(self,0)
3794    }
3795
3796    #[doc = "Writing a 1 will reset the status bit of DMA_INT_STATUS_REG for channel 4 ; writing a 0 will have no effect"]
3797    #[inline(always)]
3798    pub fn dma_rst_irq_ch4(
3799        self,
3800    ) -> crate::common::RegisterFieldBool<4, 1, 0, DmaClearIntReg_SPEC, crate::common::W> {
3801        crate::common::RegisterFieldBool::<4,1,0,DmaClearIntReg_SPEC,crate::common::W>::from_register(self,0)
3802    }
3803
3804    #[doc = "Writing a 1 will reset the status bit of DMA_INT_STATUS_REG for channel 3 ; writing a 0 will have no effect"]
3805    #[inline(always)]
3806    pub fn dma_rst_irq_ch3(
3807        self,
3808    ) -> crate::common::RegisterFieldBool<3, 1, 0, DmaClearIntReg_SPEC, crate::common::W> {
3809        crate::common::RegisterFieldBool::<3,1,0,DmaClearIntReg_SPEC,crate::common::W>::from_register(self,0)
3810    }
3811
3812    #[doc = "Writing a 1 will reset the status bit of DMA_INT_STATUS_REG for channel 2 ; writing a 0 will have no effect"]
3813    #[inline(always)]
3814    pub fn dma_rst_irq_ch2(
3815        self,
3816    ) -> crate::common::RegisterFieldBool<2, 1, 0, DmaClearIntReg_SPEC, crate::common::W> {
3817        crate::common::RegisterFieldBool::<2,1,0,DmaClearIntReg_SPEC,crate::common::W>::from_register(self,0)
3818    }
3819
3820    #[doc = "Writing a 1 will reset the status bit of DMA_INT_STATUS_REG for channel 1 ; writing a 0 will have no effect"]
3821    #[inline(always)]
3822    pub fn dma_rst_irq_ch1(
3823        self,
3824    ) -> crate::common::RegisterFieldBool<1, 1, 0, DmaClearIntReg_SPEC, crate::common::W> {
3825        crate::common::RegisterFieldBool::<1,1,0,DmaClearIntReg_SPEC,crate::common::W>::from_register(self,0)
3826    }
3827
3828    #[doc = "Writing a 1 will reset the status bit of DMA_INT_STATUS_REG for channel 0 ; writing a 0 will have no effect"]
3829    #[inline(always)]
3830    pub fn dma_rst_irq_ch0(
3831        self,
3832    ) -> crate::common::RegisterFieldBool<0, 1, 0, DmaClearIntReg_SPEC, crate::common::W> {
3833        crate::common::RegisterFieldBool::<0,1,0,DmaClearIntReg_SPEC,crate::common::W>::from_register(self,0)
3834    }
3835}
3836impl ::core::default::Default for DmaClearIntReg {
3837    #[inline(always)]
3838    fn default() -> DmaClearIntReg {
3839        <crate::RegValueT<DmaClearIntReg_SPEC> as RegisterValue<_>>::new(0)
3840    }
3841}
3842
3843#[doc(hidden)]
3844#[derive(Copy, Clone, Eq, PartialEq)]
3845pub struct DmaIntStatusReg_SPEC;
3846impl crate::sealed::RegSpec for DmaIntStatusReg_SPEC {
3847    type DataType = u16;
3848}
3849
3850#[doc = "DMA interrupt status register"]
3851pub type DmaIntStatusReg = crate::RegValueT<DmaIntStatusReg_SPEC>;
3852
3853impl DmaIntStatusReg {
3854    #[doc = "0: IRQ on channel 7 is not set\n1: IRQ on channel 7 is set"]
3855    #[inline(always)]
3856    pub fn dma_irq_ch7(
3857        self,
3858    ) -> crate::common::RegisterFieldBool<7, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3859        crate::common::RegisterFieldBool::<7,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3860    }
3861
3862    #[doc = "0: IRQ on channel 6 is not set\n1: IRQ on channel 6 is set"]
3863    #[inline(always)]
3864    pub fn dma_irq_ch6(
3865        self,
3866    ) -> crate::common::RegisterFieldBool<6, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3867        crate::common::RegisterFieldBool::<6,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3868    }
3869
3870    #[doc = "0: IRQ on channel 5 is not set\n1: IRQ on channel 5 is set"]
3871    #[inline(always)]
3872    pub fn dma_irq_ch5(
3873        self,
3874    ) -> crate::common::RegisterFieldBool<5, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3875        crate::common::RegisterFieldBool::<5,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3876    }
3877
3878    #[doc = "0: IRQ on channel 4 is not set\n1: IRQ on channel 4 is set"]
3879    #[inline(always)]
3880    pub fn dma_irq_ch4(
3881        self,
3882    ) -> crate::common::RegisterFieldBool<4, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3883        crate::common::RegisterFieldBool::<4,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3884    }
3885
3886    #[doc = "0: IRQ on channel 3 is not set\n1: IRQ on channel 3 is set"]
3887    #[inline(always)]
3888    pub fn dma_irq_ch3(
3889        self,
3890    ) -> crate::common::RegisterFieldBool<3, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3891        crate::common::RegisterFieldBool::<3,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3892    }
3893
3894    #[doc = "0: IRQ on channel 2 is not set\n1: IRQ on channel 2 is set"]
3895    #[inline(always)]
3896    pub fn dma_irq_ch2(
3897        self,
3898    ) -> crate::common::RegisterFieldBool<2, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3899        crate::common::RegisterFieldBool::<2,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3900    }
3901
3902    #[doc = "0: IRQ on channel 1 is not set\n1: IRQ on channel 1 is set"]
3903    #[inline(always)]
3904    pub fn dma_irq_ch1(
3905        self,
3906    ) -> crate::common::RegisterFieldBool<1, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3907        crate::common::RegisterFieldBool::<1,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3908    }
3909
3910    #[doc = "0: IRQ on channel 0 is not set\n1: IRQ on channel 0 is set"]
3911    #[inline(always)]
3912    pub fn dma_irq_ch0(
3913        self,
3914    ) -> crate::common::RegisterFieldBool<0, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3915        crate::common::RegisterFieldBool::<0,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3916    }
3917}
3918impl ::core::default::Default for DmaIntStatusReg {
3919    #[inline(always)]
3920    fn default() -> DmaIntStatusReg {
3921        <crate::RegValueT<DmaIntStatusReg_SPEC> as RegisterValue<_>>::new(0)
3922    }
3923}
3924
3925#[doc(hidden)]
3926#[derive(Copy, Clone, Eq, PartialEq)]
3927pub struct DmaReqMuxReg_SPEC;
3928impl crate::sealed::RegSpec for DmaReqMuxReg_SPEC {
3929    type DataType = u16;
3930}
3931
3932#[doc = "DMA channel assignments"]
3933pub type DmaReqMuxReg = crate::RegValueT<DmaReqMuxReg_SPEC>;
3934
3935impl DmaReqMuxReg {
3936    #[doc = "Select which combination of peripherals are mapped on the DMA channels. The peripherals are mapped as pairs on two channels.\nHere, the first DMA request is mapped on channel 6 and the second on channel 7.\nSee DMA01_SEL for the peripheral mapping."]
3937    #[inline(always)]
3938    pub fn dma67_sel(
3939        self,
3940    ) -> crate::common::RegisterField<12, 0xf, 1, 0, u8, u8, DmaReqMuxReg_SPEC, crate::common::RW>
3941    {
3942        crate::common::RegisterField::<12,0xf,1,0,u8,u8,DmaReqMuxReg_SPEC,crate::common::RW>::from_register(self,0)
3943    }
3944
3945    #[doc = "Select which combination of peripherals are mapped on the DMA channels. The peripherals are mapped as pairs on two channels.\nHere, the first DMA request is mapped on channel 4 and the second on channel 5.\nSee DMA01_SEL for the peripherals\' mapping."]
3946    #[inline(always)]
3947    pub fn dma45_sel(
3948        self,
3949    ) -> crate::common::RegisterField<8, 0xf, 1, 0, u8, u8, DmaReqMuxReg_SPEC, crate::common::RW>
3950    {
3951        crate::common::RegisterField::<8,0xf,1,0,u8,u8,DmaReqMuxReg_SPEC,crate::common::RW>::from_register(self,0)
3952    }
3953
3954    #[doc = "Select which combination of peripherals are mapped on the DMA channels. The peripherals are mapped as pairs on two channels.\nHere, the first DMA request is mapped on channel 2 and the second on channel 3.\nSee DMA01_SEL for the peripherals\' mapping."]
3955    #[inline(always)]
3956    pub fn dma23_sel(
3957        self,
3958    ) -> crate::common::RegisterField<4, 0xf, 1, 0, u8, u8, DmaReqMuxReg_SPEC, crate::common::RW>
3959    {
3960        crate::common::RegisterField::<4,0xf,1,0,u8,u8,DmaReqMuxReg_SPEC,crate::common::RW>::from_register(self,0)
3961    }
3962
3963    #[doc = "Select which combination of peripherals are mapped on the DMA channels. The peripherals are mapped as pairs on two channels.\nHere, the first DMA request is mapped on channel 0 and the second on channel 1.\n0x0: SPI_rx / SPI_tx\n0x1: SPI2_rx / SPI2_tx\n0x2: UART_rx / UART_tx\n0x3: UART2_rx / UART2_tx\n0x4: I2C_rx / I2C_tx\n0x5: I2C2_rx / I2C2_tx\n0x6: USB_rx / USB_tx\n0x7: Reserved\n0x8: PCM_rx / PCM_tx\n0x9: SRC_rx / SRC_tx (for all the supported conversions)\n0xA: FTDF_rx / FTDF_tx\n0xB: Reserved\n0xC: ADC / -\n0xD: Reserved\n0xE: Reserved\n0xF: None\n\nNote: If any of the four available peripheral selector fields (DMA01_SEL, DMA23_SEL, DMA45_SEL, DMA67_SEL) have the same value, the lesser significant selector has higher priority and will control the dma acknowledge. Hence, if DMA01_SEL = DMA23_SEL, the channels 0 and 1 will generate the DMA acknowledge signals for the selected peripheral. Consequently, it is suggested to assign the intended peripheral value to a unique selector field."]
3964    #[inline(always)]
3965    pub fn dma01_sel(
3966        self,
3967    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, DmaReqMuxReg_SPEC, crate::common::RW>
3968    {
3969        crate::common::RegisterField::<0,0xf,1,0,u8,u8,DmaReqMuxReg_SPEC,crate::common::RW>::from_register(self,0)
3970    }
3971}
3972impl ::core::default::Default for DmaReqMuxReg {
3973    #[inline(always)]
3974    fn default() -> DmaReqMuxReg {
3975        <crate::RegValueT<DmaReqMuxReg_SPEC> as RegisterValue<_>>::new(65535)
3976    }
3977}