1#![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 A of DMA channel 0"]
38 #[inline(always)]
39 pub const fn dma0_a_start_reg(
40 &self,
41 ) -> &'static crate::common::Reg<self::Dma0AStartReg_SPEC, crate::common::RW> {
42 unsafe {
43 crate::common::Reg::<self::Dma0AStartReg_SPEC, crate::common::RW>::from_ptr(
44 self._svd2pac_as_ptr().add(0usize),
45 )
46 }
47 }
48
49 #[doc = "Start address B of DMA channel 0"]
50 #[inline(always)]
51 pub const fn dma0_b_start_reg(
52 &self,
53 ) -> &'static crate::common::Reg<self::Dma0BStartReg_SPEC, crate::common::RW> {
54 unsafe {
55 crate::common::Reg::<self::Dma0BStartReg_SPEC, crate::common::RW>::from_ptr(
56 self._svd2pac_as_ptr().add(4usize),
57 )
58 }
59 }
60
61 #[doc = "Control register for the DMA channel 0"]
62 #[inline(always)]
63 pub const fn dma0_ctrl_reg(
64 &self,
65 ) -> &'static crate::common::Reg<self::Dma0CtrlReg_SPEC, crate::common::RW> {
66 unsafe {
67 crate::common::Reg::<self::Dma0CtrlReg_SPEC, crate::common::RW>::from_ptr(
68 self._svd2pac_as_ptr().add(16usize),
69 )
70 }
71 }
72
73 #[doc = "Index value of DMA channel 0"]
74 #[inline(always)]
75 pub const fn dma0_idx_reg(
76 &self,
77 ) -> &'static crate::common::Reg<self::Dma0IdxReg_SPEC, crate::common::RW> {
78 unsafe {
79 crate::common::Reg::<self::Dma0IdxReg_SPEC, crate::common::RW>::from_ptr(
80 self._svd2pac_as_ptr().add(20usize),
81 )
82 }
83 }
84
85 #[doc = "DMA receive interrupt register channel 0"]
86 #[inline(always)]
87 pub const fn dma0_int_reg(
88 &self,
89 ) -> &'static crate::common::Reg<self::Dma0IntReg_SPEC, crate::common::RW> {
90 unsafe {
91 crate::common::Reg::<self::Dma0IntReg_SPEC, crate::common::RW>::from_ptr(
92 self._svd2pac_as_ptr().add(8usize),
93 )
94 }
95 }
96
97 #[doc = "DMA receive length register channel 0"]
98 #[inline(always)]
99 pub const fn dma0_len_reg(
100 &self,
101 ) -> &'static crate::common::Reg<self::Dma0LenReg_SPEC, crate::common::RW> {
102 unsafe {
103 crate::common::Reg::<self::Dma0LenReg_SPEC, crate::common::RW>::from_ptr(
104 self._svd2pac_as_ptr().add(12usize),
105 )
106 }
107 }
108
109 #[doc = "Start address A of DMA channel 1"]
110 #[inline(always)]
111 pub const fn dma1_a_start_reg(
112 &self,
113 ) -> &'static crate::common::Reg<self::Dma1AStartReg_SPEC, crate::common::RW> {
114 unsafe {
115 crate::common::Reg::<self::Dma1AStartReg_SPEC, crate::common::RW>::from_ptr(
116 self._svd2pac_as_ptr().add(32usize),
117 )
118 }
119 }
120
121 #[doc = "Start address B of DMA channel 1"]
122 #[inline(always)]
123 pub const fn dma1_b_start_reg(
124 &self,
125 ) -> &'static crate::common::Reg<self::Dma1BStartReg_SPEC, crate::common::RW> {
126 unsafe {
127 crate::common::Reg::<self::Dma1BStartReg_SPEC, crate::common::RW>::from_ptr(
128 self._svd2pac_as_ptr().add(36usize),
129 )
130 }
131 }
132
133 #[doc = "Control register for the DMA channel 1"]
134 #[inline(always)]
135 pub const fn dma1_ctrl_reg(
136 &self,
137 ) -> &'static crate::common::Reg<self::Dma1CtrlReg_SPEC, crate::common::RW> {
138 unsafe {
139 crate::common::Reg::<self::Dma1CtrlReg_SPEC, crate::common::RW>::from_ptr(
140 self._svd2pac_as_ptr().add(48usize),
141 )
142 }
143 }
144
145 #[doc = "Index value of DMA channel 1"]
146 #[inline(always)]
147 pub const fn dma1_idx_reg(
148 &self,
149 ) -> &'static crate::common::Reg<self::Dma1IdxReg_SPEC, crate::common::RW> {
150 unsafe {
151 crate::common::Reg::<self::Dma1IdxReg_SPEC, crate::common::RW>::from_ptr(
152 self._svd2pac_as_ptr().add(52usize),
153 )
154 }
155 }
156
157 #[doc = "DMA receive interrupt register channel 1"]
158 #[inline(always)]
159 pub const fn dma1_int_reg(
160 &self,
161 ) -> &'static crate::common::Reg<self::Dma1IntReg_SPEC, crate::common::RW> {
162 unsafe {
163 crate::common::Reg::<self::Dma1IntReg_SPEC, crate::common::RW>::from_ptr(
164 self._svd2pac_as_ptr().add(40usize),
165 )
166 }
167 }
168
169 #[doc = "DMA receive length register channel 1"]
170 #[inline(always)]
171 pub const fn dma1_len_reg(
172 &self,
173 ) -> &'static crate::common::Reg<self::Dma1LenReg_SPEC, crate::common::RW> {
174 unsafe {
175 crate::common::Reg::<self::Dma1LenReg_SPEC, crate::common::RW>::from_ptr(
176 self._svd2pac_as_ptr().add(44usize),
177 )
178 }
179 }
180
181 #[doc = "Start address A of DMA channel 2"]
182 #[inline(always)]
183 pub const fn dma2_a_start_reg(
184 &self,
185 ) -> &'static crate::common::Reg<self::Dma2AStartReg_SPEC, crate::common::RW> {
186 unsafe {
187 crate::common::Reg::<self::Dma2AStartReg_SPEC, crate::common::RW>::from_ptr(
188 self._svd2pac_as_ptr().add(64usize),
189 )
190 }
191 }
192
193 #[doc = "Start address B of DMA channel 2"]
194 #[inline(always)]
195 pub const fn dma2_b_start_reg(
196 &self,
197 ) -> &'static crate::common::Reg<self::Dma2BStartReg_SPEC, crate::common::RW> {
198 unsafe {
199 crate::common::Reg::<self::Dma2BStartReg_SPEC, crate::common::RW>::from_ptr(
200 self._svd2pac_as_ptr().add(68usize),
201 )
202 }
203 }
204
205 #[doc = "Control register for the DMA channel 2"]
206 #[inline(always)]
207 pub const fn dma2_ctrl_reg(
208 &self,
209 ) -> &'static crate::common::Reg<self::Dma2CtrlReg_SPEC, crate::common::RW> {
210 unsafe {
211 crate::common::Reg::<self::Dma2CtrlReg_SPEC, crate::common::RW>::from_ptr(
212 self._svd2pac_as_ptr().add(80usize),
213 )
214 }
215 }
216
217 #[doc = "Index value of DMA channel 2"]
218 #[inline(always)]
219 pub const fn dma2_idx_reg(
220 &self,
221 ) -> &'static crate::common::Reg<self::Dma2IdxReg_SPEC, crate::common::RW> {
222 unsafe {
223 crate::common::Reg::<self::Dma2IdxReg_SPEC, crate::common::RW>::from_ptr(
224 self._svd2pac_as_ptr().add(84usize),
225 )
226 }
227 }
228
229 #[doc = "DMA receive interrupt register channel 2"]
230 #[inline(always)]
231 pub const fn dma2_int_reg(
232 &self,
233 ) -> &'static crate::common::Reg<self::Dma2IntReg_SPEC, crate::common::RW> {
234 unsafe {
235 crate::common::Reg::<self::Dma2IntReg_SPEC, crate::common::RW>::from_ptr(
236 self._svd2pac_as_ptr().add(72usize),
237 )
238 }
239 }
240
241 #[doc = "DMA receive length register channel 2"]
242 #[inline(always)]
243 pub const fn dma2_len_reg(
244 &self,
245 ) -> &'static crate::common::Reg<self::Dma2LenReg_SPEC, crate::common::RW> {
246 unsafe {
247 crate::common::Reg::<self::Dma2LenReg_SPEC, crate::common::RW>::from_ptr(
248 self._svd2pac_as_ptr().add(76usize),
249 )
250 }
251 }
252
253 #[doc = "Start address A of DMA channel 3"]
254 #[inline(always)]
255 pub const fn dma3_a_start_reg(
256 &self,
257 ) -> &'static crate::common::Reg<self::Dma3AStartReg_SPEC, crate::common::RW> {
258 unsafe {
259 crate::common::Reg::<self::Dma3AStartReg_SPEC, crate::common::RW>::from_ptr(
260 self._svd2pac_as_ptr().add(96usize),
261 )
262 }
263 }
264
265 #[doc = "Start address B of DMA channel 3"]
266 #[inline(always)]
267 pub const fn dma3_b_start_reg(
268 &self,
269 ) -> &'static crate::common::Reg<self::Dma3BStartReg_SPEC, crate::common::RW> {
270 unsafe {
271 crate::common::Reg::<self::Dma3BStartReg_SPEC, crate::common::RW>::from_ptr(
272 self._svd2pac_as_ptr().add(100usize),
273 )
274 }
275 }
276
277 #[doc = "Control register for the DMA channel 3"]
278 #[inline(always)]
279 pub const fn dma3_ctrl_reg(
280 &self,
281 ) -> &'static crate::common::Reg<self::Dma3CtrlReg_SPEC, crate::common::RW> {
282 unsafe {
283 crate::common::Reg::<self::Dma3CtrlReg_SPEC, crate::common::RW>::from_ptr(
284 self._svd2pac_as_ptr().add(112usize),
285 )
286 }
287 }
288
289 #[doc = "Index value of DMA channel 3"]
290 #[inline(always)]
291 pub const fn dma3_idx_reg(
292 &self,
293 ) -> &'static crate::common::Reg<self::Dma3IdxReg_SPEC, crate::common::RW> {
294 unsafe {
295 crate::common::Reg::<self::Dma3IdxReg_SPEC, crate::common::RW>::from_ptr(
296 self._svd2pac_as_ptr().add(116usize),
297 )
298 }
299 }
300
301 #[doc = "DMA receive interrupt register channel 3"]
302 #[inline(always)]
303 pub const fn dma3_int_reg(
304 &self,
305 ) -> &'static crate::common::Reg<self::Dma3IntReg_SPEC, crate::common::RW> {
306 unsafe {
307 crate::common::Reg::<self::Dma3IntReg_SPEC, crate::common::RW>::from_ptr(
308 self._svd2pac_as_ptr().add(104usize),
309 )
310 }
311 }
312
313 #[doc = "DMA receive length register channel 3"]
314 #[inline(always)]
315 pub const fn dma3_len_reg(
316 &self,
317 ) -> &'static crate::common::Reg<self::Dma3LenReg_SPEC, crate::common::RW> {
318 unsafe {
319 crate::common::Reg::<self::Dma3LenReg_SPEC, crate::common::RW>::from_ptr(
320 self._svd2pac_as_ptr().add(108usize),
321 )
322 }
323 }
324
325 #[doc = "Start address A of DMA channel 4"]
326 #[inline(always)]
327 pub const fn dma4_a_start_reg(
328 &self,
329 ) -> &'static crate::common::Reg<self::Dma4AStartReg_SPEC, crate::common::RW> {
330 unsafe {
331 crate::common::Reg::<self::Dma4AStartReg_SPEC, crate::common::RW>::from_ptr(
332 self._svd2pac_as_ptr().add(128usize),
333 )
334 }
335 }
336
337 #[doc = "Start address B of DMA channel 4"]
338 #[inline(always)]
339 pub const fn dma4_b_start_reg(
340 &self,
341 ) -> &'static crate::common::Reg<self::Dma4BStartReg_SPEC, crate::common::RW> {
342 unsafe {
343 crate::common::Reg::<self::Dma4BStartReg_SPEC, crate::common::RW>::from_ptr(
344 self._svd2pac_as_ptr().add(132usize),
345 )
346 }
347 }
348
349 #[doc = "Control register for the DMA channel 4"]
350 #[inline(always)]
351 pub const fn dma4_ctrl_reg(
352 &self,
353 ) -> &'static crate::common::Reg<self::Dma4CtrlReg_SPEC, crate::common::RW> {
354 unsafe {
355 crate::common::Reg::<self::Dma4CtrlReg_SPEC, crate::common::RW>::from_ptr(
356 self._svd2pac_as_ptr().add(144usize),
357 )
358 }
359 }
360
361 #[doc = "Index value of DMA channel 4"]
362 #[inline(always)]
363 pub const fn dma4_idx_reg(
364 &self,
365 ) -> &'static crate::common::Reg<self::Dma4IdxReg_SPEC, crate::common::RW> {
366 unsafe {
367 crate::common::Reg::<self::Dma4IdxReg_SPEC, crate::common::RW>::from_ptr(
368 self._svd2pac_as_ptr().add(148usize),
369 )
370 }
371 }
372
373 #[doc = "DMA receive interrupt register channel 4"]
374 #[inline(always)]
375 pub const fn dma4_int_reg(
376 &self,
377 ) -> &'static crate::common::Reg<self::Dma4IntReg_SPEC, crate::common::RW> {
378 unsafe {
379 crate::common::Reg::<self::Dma4IntReg_SPEC, crate::common::RW>::from_ptr(
380 self._svd2pac_as_ptr().add(136usize),
381 )
382 }
383 }
384
385 #[doc = "DMA receive length register channel 4"]
386 #[inline(always)]
387 pub const fn dma4_len_reg(
388 &self,
389 ) -> &'static crate::common::Reg<self::Dma4LenReg_SPEC, crate::common::RW> {
390 unsafe {
391 crate::common::Reg::<self::Dma4LenReg_SPEC, crate::common::RW>::from_ptr(
392 self._svd2pac_as_ptr().add(140usize),
393 )
394 }
395 }
396
397 #[doc = "Start address A of DMA channel 5"]
398 #[inline(always)]
399 pub const fn dma5_a_start_reg(
400 &self,
401 ) -> &'static crate::common::Reg<self::Dma5AStartReg_SPEC, crate::common::RW> {
402 unsafe {
403 crate::common::Reg::<self::Dma5AStartReg_SPEC, crate::common::RW>::from_ptr(
404 self._svd2pac_as_ptr().add(160usize),
405 )
406 }
407 }
408
409 #[doc = "Start address B of DMA channel 5"]
410 #[inline(always)]
411 pub const fn dma5_b_start_reg(
412 &self,
413 ) -> &'static crate::common::Reg<self::Dma5BStartReg_SPEC, crate::common::RW> {
414 unsafe {
415 crate::common::Reg::<self::Dma5BStartReg_SPEC, crate::common::RW>::from_ptr(
416 self._svd2pac_as_ptr().add(164usize),
417 )
418 }
419 }
420
421 #[doc = "Control register for the DMA channel 5"]
422 #[inline(always)]
423 pub const fn dma5_ctrl_reg(
424 &self,
425 ) -> &'static crate::common::Reg<self::Dma5CtrlReg_SPEC, crate::common::RW> {
426 unsafe {
427 crate::common::Reg::<self::Dma5CtrlReg_SPEC, crate::common::RW>::from_ptr(
428 self._svd2pac_as_ptr().add(176usize),
429 )
430 }
431 }
432
433 #[doc = "Index value of DMA channel 5"]
434 #[inline(always)]
435 pub const fn dma5_idx_reg(
436 &self,
437 ) -> &'static crate::common::Reg<self::Dma5IdxReg_SPEC, crate::common::RW> {
438 unsafe {
439 crate::common::Reg::<self::Dma5IdxReg_SPEC, crate::common::RW>::from_ptr(
440 self._svd2pac_as_ptr().add(180usize),
441 )
442 }
443 }
444
445 #[doc = "DMA receive interrupt register channel 5"]
446 #[inline(always)]
447 pub const fn dma5_int_reg(
448 &self,
449 ) -> &'static crate::common::Reg<self::Dma5IntReg_SPEC, crate::common::RW> {
450 unsafe {
451 crate::common::Reg::<self::Dma5IntReg_SPEC, crate::common::RW>::from_ptr(
452 self._svd2pac_as_ptr().add(168usize),
453 )
454 }
455 }
456
457 #[doc = "DMA receive length register channel 5"]
458 #[inline(always)]
459 pub const fn dma5_len_reg(
460 &self,
461 ) -> &'static crate::common::Reg<self::Dma5LenReg_SPEC, crate::common::RW> {
462 unsafe {
463 crate::common::Reg::<self::Dma5LenReg_SPEC, crate::common::RW>::from_ptr(
464 self._svd2pac_as_ptr().add(172usize),
465 )
466 }
467 }
468
469 #[doc = "Start address A of DMA channel 6"]
470 #[inline(always)]
471 pub const fn dma6_a_start_reg(
472 &self,
473 ) -> &'static crate::common::Reg<self::Dma6AStartReg_SPEC, crate::common::RW> {
474 unsafe {
475 crate::common::Reg::<self::Dma6AStartReg_SPEC, crate::common::RW>::from_ptr(
476 self._svd2pac_as_ptr().add(192usize),
477 )
478 }
479 }
480
481 #[doc = "Start address B of DMA channel 6"]
482 #[inline(always)]
483 pub const fn dma6_b_start_reg(
484 &self,
485 ) -> &'static crate::common::Reg<self::Dma6BStartReg_SPEC, crate::common::RW> {
486 unsafe {
487 crate::common::Reg::<self::Dma6BStartReg_SPEC, crate::common::RW>::from_ptr(
488 self._svd2pac_as_ptr().add(196usize),
489 )
490 }
491 }
492
493 #[doc = "Control register for the DMA channel 6"]
494 #[inline(always)]
495 pub const fn dma6_ctrl_reg(
496 &self,
497 ) -> &'static crate::common::Reg<self::Dma6CtrlReg_SPEC, crate::common::RW> {
498 unsafe {
499 crate::common::Reg::<self::Dma6CtrlReg_SPEC, crate::common::RW>::from_ptr(
500 self._svd2pac_as_ptr().add(208usize),
501 )
502 }
503 }
504
505 #[doc = "Index value of DMA channel 6"]
506 #[inline(always)]
507 pub const fn dma6_idx_reg(
508 &self,
509 ) -> &'static crate::common::Reg<self::Dma6IdxReg_SPEC, crate::common::RW> {
510 unsafe {
511 crate::common::Reg::<self::Dma6IdxReg_SPEC, crate::common::RW>::from_ptr(
512 self._svd2pac_as_ptr().add(212usize),
513 )
514 }
515 }
516
517 #[doc = "DMA receive interrupt register channel 6"]
518 #[inline(always)]
519 pub const fn dma6_int_reg(
520 &self,
521 ) -> &'static crate::common::Reg<self::Dma6IntReg_SPEC, crate::common::RW> {
522 unsafe {
523 crate::common::Reg::<self::Dma6IntReg_SPEC, crate::common::RW>::from_ptr(
524 self._svd2pac_as_ptr().add(200usize),
525 )
526 }
527 }
528
529 #[doc = "DMA receive length register channel 6"]
530 #[inline(always)]
531 pub const fn dma6_len_reg(
532 &self,
533 ) -> &'static crate::common::Reg<self::Dma6LenReg_SPEC, crate::common::RW> {
534 unsafe {
535 crate::common::Reg::<self::Dma6LenReg_SPEC, crate::common::RW>::from_ptr(
536 self._svd2pac_as_ptr().add(204usize),
537 )
538 }
539 }
540
541 #[doc = "Start address A of DMA channel 7"]
542 #[inline(always)]
543 pub const fn dma7_a_start_reg(
544 &self,
545 ) -> &'static crate::common::Reg<self::Dma7AStartReg_SPEC, crate::common::RW> {
546 unsafe {
547 crate::common::Reg::<self::Dma7AStartReg_SPEC, crate::common::RW>::from_ptr(
548 self._svd2pac_as_ptr().add(224usize),
549 )
550 }
551 }
552
553 #[doc = "Start address B of DMA channel 7"]
554 #[inline(always)]
555 pub const fn dma7_b_start_reg(
556 &self,
557 ) -> &'static crate::common::Reg<self::Dma7BStartReg_SPEC, crate::common::RW> {
558 unsafe {
559 crate::common::Reg::<self::Dma7BStartReg_SPEC, crate::common::RW>::from_ptr(
560 self._svd2pac_as_ptr().add(228usize),
561 )
562 }
563 }
564
565 #[doc = "Control register for the DMA channel 7"]
566 #[inline(always)]
567 pub const fn dma7_ctrl_reg(
568 &self,
569 ) -> &'static crate::common::Reg<self::Dma7CtrlReg_SPEC, crate::common::RW> {
570 unsafe {
571 crate::common::Reg::<self::Dma7CtrlReg_SPEC, crate::common::RW>::from_ptr(
572 self._svd2pac_as_ptr().add(240usize),
573 )
574 }
575 }
576
577 #[doc = "Index value of DMA channel 7"]
578 #[inline(always)]
579 pub const fn dma7_idx_reg(
580 &self,
581 ) -> &'static crate::common::Reg<self::Dma7IdxReg_SPEC, crate::common::RW> {
582 unsafe {
583 crate::common::Reg::<self::Dma7IdxReg_SPEC, crate::common::RW>::from_ptr(
584 self._svd2pac_as_ptr().add(244usize),
585 )
586 }
587 }
588
589 #[doc = "DMA receive interrupt register channel 7"]
590 #[inline(always)]
591 pub const fn dma7_int_reg(
592 &self,
593 ) -> &'static crate::common::Reg<self::Dma7IntReg_SPEC, crate::common::RW> {
594 unsafe {
595 crate::common::Reg::<self::Dma7IntReg_SPEC, crate::common::RW>::from_ptr(
596 self._svd2pac_as_ptr().add(232usize),
597 )
598 }
599 }
600
601 #[doc = "DMA receive length register channel 7"]
602 #[inline(always)]
603 pub const fn dma7_len_reg(
604 &self,
605 ) -> &'static crate::common::Reg<self::Dma7LenReg_SPEC, crate::common::RW> {
606 unsafe {
607 crate::common::Reg::<self::Dma7LenReg_SPEC, crate::common::RW>::from_ptr(
608 self._svd2pac_as_ptr().add(236usize),
609 )
610 }
611 }
612
613 #[doc = "DMA clear interrupt register"]
614 #[inline(always)]
615 pub const fn dma_clear_int_reg(
616 &self,
617 ) -> &'static crate::common::Reg<self::DmaClearIntReg_SPEC, crate::common::RW> {
618 unsafe {
619 crate::common::Reg::<self::DmaClearIntReg_SPEC, crate::common::RW>::from_ptr(
620 self._svd2pac_as_ptr().add(264usize),
621 )
622 }
623 }
624
625 #[doc = "DMA Interrupt mask register"]
626 #[inline(always)]
627 pub const fn dma_int_mask_reg(
628 &self,
629 ) -> &'static crate::common::Reg<self::DmaIntMaskReg_SPEC, crate::common::RW> {
630 unsafe {
631 crate::common::Reg::<self::DmaIntMaskReg_SPEC, crate::common::RW>::from_ptr(
632 self._svd2pac_as_ptr().add(268usize),
633 )
634 }
635 }
636
637 #[doc = "DMA interrupt status register"]
638 #[inline(always)]
639 pub const fn dma_int_status_reg(
640 &self,
641 ) -> &'static crate::common::Reg<self::DmaIntStatusReg_SPEC, crate::common::RW> {
642 unsafe {
643 crate::common::Reg::<self::DmaIntStatusReg_SPEC, crate::common::RW>::from_ptr(
644 self._svd2pac_as_ptr().add(260usize),
645 )
646 }
647 }
648
649 #[doc = "DMA channel assignments"]
650 #[inline(always)]
651 pub const fn dma_req_mux_reg(
652 &self,
653 ) -> &'static crate::common::Reg<self::DmaReqMuxReg_SPEC, crate::common::RW> {
654 unsafe {
655 crate::common::Reg::<self::DmaReqMuxReg_SPEC, crate::common::RW>::from_ptr(
656 self._svd2pac_as_ptr().add(256usize),
657 )
658 }
659 }
660}
661#[doc(hidden)]
662#[derive(Copy, Clone, Eq, PartialEq)]
663pub struct Dma0AStartReg_SPEC;
664impl crate::sealed::RegSpec for Dma0AStartReg_SPEC {
665 type DataType = u32;
666}
667
668#[doc = "Start address A of DMA channel 0"]
669pub type Dma0AStartReg = crate::RegValueT<Dma0AStartReg_SPEC>;
670
671impl Dma0AStartReg {
672 #[doc = "Source start address"]
673 #[inline(always)]
674 pub fn dma0_a_start(
675 self,
676 ) -> crate::common::RegisterField<
677 0,
678 0xffffffff,
679 1,
680 0,
681 u32,
682 u32,
683 Dma0AStartReg_SPEC,
684 crate::common::RW,
685 > {
686 crate::common::RegisterField::<
687 0,
688 0xffffffff,
689 1,
690 0,
691 u32,
692 u32,
693 Dma0AStartReg_SPEC,
694 crate::common::RW,
695 >::from_register(self, 0)
696 }
697}
698impl ::core::default::Default for Dma0AStartReg {
699 #[inline(always)]
700 fn default() -> Dma0AStartReg {
701 <crate::RegValueT<Dma0AStartReg_SPEC> as RegisterValue<_>>::new(0)
702 }
703}
704
705#[doc(hidden)]
706#[derive(Copy, Clone, Eq, PartialEq)]
707pub struct Dma0BStartReg_SPEC;
708impl crate::sealed::RegSpec for Dma0BStartReg_SPEC {
709 type DataType = u32;
710}
711
712#[doc = "Start address B of DMA channel 0"]
713pub type Dma0BStartReg = crate::RegValueT<Dma0BStartReg_SPEC>;
714
715impl Dma0BStartReg {
716 #[doc = "Destination start address"]
717 #[inline(always)]
718 pub fn dma0_b_start(
719 self,
720 ) -> crate::common::RegisterField<
721 0,
722 0xffffffff,
723 1,
724 0,
725 u32,
726 u32,
727 Dma0BStartReg_SPEC,
728 crate::common::RW,
729 > {
730 crate::common::RegisterField::<
731 0,
732 0xffffffff,
733 1,
734 0,
735 u32,
736 u32,
737 Dma0BStartReg_SPEC,
738 crate::common::RW,
739 >::from_register(self, 0)
740 }
741}
742impl ::core::default::Default for Dma0BStartReg {
743 #[inline(always)]
744 fn default() -> Dma0BStartReg {
745 <crate::RegValueT<Dma0BStartReg_SPEC> as RegisterValue<_>>::new(0)
746 }
747}
748
749#[doc(hidden)]
750#[derive(Copy, Clone, Eq, PartialEq)]
751pub struct Dma0CtrlReg_SPEC;
752impl crate::sealed::RegSpec for Dma0CtrlReg_SPEC {
753 type DataType = u32;
754}
755
756#[doc = "Control register for the DMA channel 0"]
757pub type Dma0CtrlReg = crate::RegValueT<Dma0CtrlReg_SPEC>;
758
759impl Dma0CtrlReg {
760 #[doc = "0 = Ignores bus error response from the AHB bus, so DMA continues normally.\n1 = Detects the bus response and tracks any bus error may occur during the transfer. If a bus error is detected, the channel completes the current read-write DMA cycle (either in burst or single transfers mode) and then closes the transfer, de-asserting DMA_ON bit automatically.\nIt is noted that the respective bus error detection status bit of DMA_INT_STATUS_REG is automatically cleared as soon as the channel is switched-on again, in order to perform a new transfer."]
761 #[inline(always)]
762 pub fn bus_error_detect(
763 self,
764 ) -> crate::common::RegisterFieldBool<15, 1, 0, Dma0CtrlReg_SPEC, crate::common::RW> {
765 crate::common::RegisterFieldBool::<15,1,0,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
766 }
767
768 #[doc = "Enables the DMA read/write bursts, according to the following configuration:\n00 = Bursts are disabled\n01 = Bursts of 4 are enabled\n10 = Bursts of 8 are enabled\n11 = Reserved"]
769 #[inline(always)]
770 pub fn burst_mode(
771 self,
772 ) -> crate::common::RegisterField<13, 0x3, 1, 0, u8, u8, Dma0CtrlReg_SPEC, crate::common::RW>
773 {
774 crate::common::RegisterField::<13,0x3,1,0,u8,u8,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
775 }
776
777 #[doc = "0 = DMA operates with level-sensitive peripheral requests (default)\n1 = DMA operates with (positive) edge-sensitive peripheral requests"]
778 #[inline(always)]
779 pub fn req_sense(
780 self,
781 ) -> crate::common::RegisterFieldBool<12, 1, 0, Dma0CtrlReg_SPEC, crate::common::RW> {
782 crate::common::RegisterFieldBool::<12,1,0,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
783 }
784
785 #[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\'."]
786 #[inline(always)]
787 pub fn dma_init(
788 self,
789 ) -> crate::common::RegisterFieldBool<11, 1, 0, Dma0CtrlReg_SPEC, crate::common::RW> {
790 crate::common::RegisterFieldBool::<11,1,0,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
791 }
792
793 #[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."]
794 #[inline(always)]
795 pub fn dma_idle(
796 self,
797 ) -> crate::common::RegisterFieldBool<10, 1, 0, Dma0CtrlReg_SPEC, crate::common::RW> {
798 crate::common::RegisterFieldBool::<10,1,0,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
799 }
800
801 #[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."]
802 #[inline(always)]
803 pub fn dma_prio(
804 self,
805 ) -> crate::common::RegisterField<7, 0x7, 1, 0, u8, u8, Dma0CtrlReg_SPEC, crate::common::RW>
806 {
807 crate::common::RegisterField::<7,0x7,1,0,u8,u8,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
808 }
809
810 #[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."]
811 #[inline(always)]
812 pub fn circular(
813 self,
814 ) -> crate::common::RegisterFieldBool<6, 1, 0, Dma0CtrlReg_SPEC, crate::common::RW> {
815 crate::common::RegisterFieldBool::<6,1,0,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
816 }
817
818 #[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\")"]
819 #[inline(always)]
820 pub fn ainc(
821 self,
822 ) -> crate::common::RegisterFieldBool<5, 1, 0, Dma0CtrlReg_SPEC, crate::common::RW> {
823 crate::common::RegisterFieldBool::<5,1,0,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
824 }
825
826 #[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\")"]
827 #[inline(always)]
828 pub fn binc(
829 self,
830 ) -> crate::common::RegisterFieldBool<4, 1, 0, Dma0CtrlReg_SPEC, crate::common::RW> {
831 crate::common::RegisterFieldBool::<4,1,0,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
832 }
833
834 #[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)"]
835 #[inline(always)]
836 pub fn dreq_mode(
837 self,
838 ) -> crate::common::RegisterFieldBool<3, 1, 0, Dma0CtrlReg_SPEC, crate::common::RW> {
839 crate::common::RegisterFieldBool::<3,1,0,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
840 }
841
842 #[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"]
843 #[inline(always)]
844 pub fn bw(
845 self,
846 ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, Dma0CtrlReg_SPEC, crate::common::RW>
847 {
848 crate::common::RegisterField::<1,0x3,1,0,u8,u8,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
849 }
850
851 #[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.\nNote: If DMA_ON is disabled by SW while the DMA channel is active, it cannot be enabled again until the channel has completed the last on-going read-write cycle and has stopped. Thus, the SW has to check that the reading of DMAx_CTRL_REG.DMA_ON returns 0, before setting again the specific bit-field."]
852 #[inline(always)]
853 pub fn dma_on(
854 self,
855 ) -> crate::common::RegisterFieldBool<0, 1, 0, Dma0CtrlReg_SPEC, crate::common::RW> {
856 crate::common::RegisterFieldBool::<0,1,0,Dma0CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
857 }
858}
859impl ::core::default::Default for Dma0CtrlReg {
860 #[inline(always)]
861 fn default() -> Dma0CtrlReg {
862 <crate::RegValueT<Dma0CtrlReg_SPEC> as RegisterValue<_>>::new(32768)
863 }
864}
865
866#[doc(hidden)]
867#[derive(Copy, Clone, Eq, PartialEq)]
868pub struct Dma0IdxReg_SPEC;
869impl crate::sealed::RegSpec for Dma0IdxReg_SPEC {
870 type DataType = u32;
871}
872
873#[doc = "Index value of DMA channel 0"]
874pub type Dma0IdxReg = crate::RegValueT<Dma0IdxReg_SPEC>;
875
876impl Dma0IdxReg {
877 #[doc = "This (read-only) register determines the data items already transferred by the DMA channel. Hence, if its value is 1, then the DMA channel has already copied one data item and it is currently performing the next copy. If its value is 2, then two items have already been copied and so on.\nWhen the transfer is completed (so when DMAx_CTRL_REG.DMA_ON has been cleared) and DMAx_CTRL_REG.CIRCULAR is not set, the register keeps its (last) value (which should be equal to DMAx_LEN_REG) and it is automatically reset to 0 upon starting a new transfer. In CIRCULAR mode, the register is automatically initialized to 0 as soon as the DMA channel starts-over again."]
878 #[inline(always)]
879 pub fn dma0_idx(
880 self,
881 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma0IdxReg_SPEC, crate::common::R>
882 {
883 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma0IdxReg_SPEC,crate::common::R>::from_register(self,0)
884 }
885}
886impl ::core::default::Default for Dma0IdxReg {
887 #[inline(always)]
888 fn default() -> Dma0IdxReg {
889 <crate::RegValueT<Dma0IdxReg_SPEC> as RegisterValue<_>>::new(0)
890 }
891}
892
893#[doc(hidden)]
894#[derive(Copy, Clone, Eq, PartialEq)]
895pub struct Dma0IntReg_SPEC;
896impl crate::sealed::RegSpec for Dma0IntReg_SPEC {
897 type DataType = u32;
898}
899
900#[doc = "DMA receive interrupt register channel 0"]
901pub type Dma0IntReg = crate::RegValueT<Dma0IntReg_SPEC>;
902
903impl Dma0IntReg {
904 #[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."]
905 #[inline(always)]
906 pub fn dma0_int(
907 self,
908 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma0IntReg_SPEC, crate::common::RW>
909 {
910 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma0IntReg_SPEC,crate::common::RW>::from_register(self,0)
911 }
912}
913impl ::core::default::Default for Dma0IntReg {
914 #[inline(always)]
915 fn default() -> Dma0IntReg {
916 <crate::RegValueT<Dma0IntReg_SPEC> as RegisterValue<_>>::new(0)
917 }
918}
919
920#[doc(hidden)]
921#[derive(Copy, Clone, Eq, PartialEq)]
922pub struct Dma0LenReg_SPEC;
923impl crate::sealed::RegSpec for Dma0LenReg_SPEC {
924 type DataType = u32;
925}
926
927#[doc = "DMA receive length register channel 0"]
928pub type Dma0LenReg = crate::RegValueT<Dma0LenReg_SPEC>;
929
930impl Dma0LenReg {
931 #[doc = "DMA channel\'s transfer length. DMAx_LEN of value 0, 1, 2, ... results into an actual transfer length of 1, 2, 3, ..."]
932 #[inline(always)]
933 pub fn dma0_len(
934 self,
935 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma0LenReg_SPEC, crate::common::RW>
936 {
937 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma0LenReg_SPEC,crate::common::RW>::from_register(self,0)
938 }
939}
940impl ::core::default::Default for Dma0LenReg {
941 #[inline(always)]
942 fn default() -> Dma0LenReg {
943 <crate::RegValueT<Dma0LenReg_SPEC> as RegisterValue<_>>::new(0)
944 }
945}
946
947#[doc(hidden)]
948#[derive(Copy, Clone, Eq, PartialEq)]
949pub struct Dma1AStartReg_SPEC;
950impl crate::sealed::RegSpec for Dma1AStartReg_SPEC {
951 type DataType = u32;
952}
953
954#[doc = "Start address A of DMA channel 1"]
955pub type Dma1AStartReg = crate::RegValueT<Dma1AStartReg_SPEC>;
956
957impl Dma1AStartReg {
958 #[doc = "Source start address"]
959 #[inline(always)]
960 pub fn dma1_a_start(
961 self,
962 ) -> crate::common::RegisterField<
963 0,
964 0xffffffff,
965 1,
966 0,
967 u32,
968 u32,
969 Dma1AStartReg_SPEC,
970 crate::common::RW,
971 > {
972 crate::common::RegisterField::<
973 0,
974 0xffffffff,
975 1,
976 0,
977 u32,
978 u32,
979 Dma1AStartReg_SPEC,
980 crate::common::RW,
981 >::from_register(self, 0)
982 }
983}
984impl ::core::default::Default for Dma1AStartReg {
985 #[inline(always)]
986 fn default() -> Dma1AStartReg {
987 <crate::RegValueT<Dma1AStartReg_SPEC> as RegisterValue<_>>::new(0)
988 }
989}
990
991#[doc(hidden)]
992#[derive(Copy, Clone, Eq, PartialEq)]
993pub struct Dma1BStartReg_SPEC;
994impl crate::sealed::RegSpec for Dma1BStartReg_SPEC {
995 type DataType = u32;
996}
997
998#[doc = "Start address B of DMA channel 1"]
999pub type Dma1BStartReg = crate::RegValueT<Dma1BStartReg_SPEC>;
1000
1001impl Dma1BStartReg {
1002 #[doc = "Destination start address"]
1003 #[inline(always)]
1004 pub fn dma1_b_start(
1005 self,
1006 ) -> crate::common::RegisterField<
1007 0,
1008 0xffffffff,
1009 1,
1010 0,
1011 u32,
1012 u32,
1013 Dma1BStartReg_SPEC,
1014 crate::common::RW,
1015 > {
1016 crate::common::RegisterField::<
1017 0,
1018 0xffffffff,
1019 1,
1020 0,
1021 u32,
1022 u32,
1023 Dma1BStartReg_SPEC,
1024 crate::common::RW,
1025 >::from_register(self, 0)
1026 }
1027}
1028impl ::core::default::Default for Dma1BStartReg {
1029 #[inline(always)]
1030 fn default() -> Dma1BStartReg {
1031 <crate::RegValueT<Dma1BStartReg_SPEC> as RegisterValue<_>>::new(0)
1032 }
1033}
1034
1035#[doc(hidden)]
1036#[derive(Copy, Clone, Eq, PartialEq)]
1037pub struct Dma1CtrlReg_SPEC;
1038impl crate::sealed::RegSpec for Dma1CtrlReg_SPEC {
1039 type DataType = u32;
1040}
1041
1042#[doc = "Control register for the DMA channel 1"]
1043pub type Dma1CtrlReg = crate::RegValueT<Dma1CtrlReg_SPEC>;
1044
1045impl Dma1CtrlReg {
1046 #[doc = "0 = Ignores bus error response from the AHB bus, so DMA continues normally.\n1 = Detects the bus response and tracks any bus error may occur during the transfer. If a bus error is detected, the channel completes the current read-write DMA cycle (either in burst or single transfers mode) and then closes the transfer, de-asserting DMA_ON bit automatically.\nIt is noted that the respective bus error detection status bit of DMA_INT_STATUS_REG is automatically cleared as soon as the channel is switched-on again, in order to perform a new transfer."]
1047 #[inline(always)]
1048 pub fn bus_error_detect(
1049 self,
1050 ) -> crate::common::RegisterFieldBool<15, 1, 0, Dma1CtrlReg_SPEC, crate::common::RW> {
1051 crate::common::RegisterFieldBool::<15,1,0,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1052 }
1053
1054 #[doc = "Enables the DMA read/write bursts, according to the following configuration:\n00 = Bursts are disabled\n01 = Bursts of 4 are enabled\n10 = Bursts of 8 are enabled\n11 = Reserved"]
1055 #[inline(always)]
1056 pub fn burst_mode(
1057 self,
1058 ) -> crate::common::RegisterField<13, 0x3, 1, 0, u8, u8, Dma1CtrlReg_SPEC, crate::common::RW>
1059 {
1060 crate::common::RegisterField::<13,0x3,1,0,u8,u8,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1061 }
1062
1063 #[doc = "0 = DMA operates with level-sensitive peripheral requests (default)\n1 = DMA operates with (positive) edge-sensitive peripheral requests"]
1064 #[inline(always)]
1065 pub fn req_sense(
1066 self,
1067 ) -> crate::common::RegisterFieldBool<12, 1, 0, Dma1CtrlReg_SPEC, crate::common::RW> {
1068 crate::common::RegisterFieldBool::<12,1,0,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1069 }
1070
1071 #[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\'."]
1072 #[inline(always)]
1073 pub fn dma_init(
1074 self,
1075 ) -> crate::common::RegisterFieldBool<11, 1, 0, Dma1CtrlReg_SPEC, crate::common::RW> {
1076 crate::common::RegisterFieldBool::<11,1,0,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1077 }
1078
1079 #[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."]
1080 #[inline(always)]
1081 pub fn dma_idle(
1082 self,
1083 ) -> crate::common::RegisterFieldBool<10, 1, 0, Dma1CtrlReg_SPEC, crate::common::RW> {
1084 crate::common::RegisterFieldBool::<10,1,0,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1085 }
1086
1087 #[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."]
1088 #[inline(always)]
1089 pub fn dma_prio(
1090 self,
1091 ) -> crate::common::RegisterField<7, 0x7, 1, 0, u8, u8, Dma1CtrlReg_SPEC, crate::common::RW>
1092 {
1093 crate::common::RegisterField::<7,0x7,1,0,u8,u8,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1094 }
1095
1096 #[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."]
1097 #[inline(always)]
1098 pub fn circular(
1099 self,
1100 ) -> crate::common::RegisterFieldBool<6, 1, 0, Dma1CtrlReg_SPEC, crate::common::RW> {
1101 crate::common::RegisterFieldBool::<6,1,0,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1102 }
1103
1104 #[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\")"]
1105 #[inline(always)]
1106 pub fn ainc(
1107 self,
1108 ) -> crate::common::RegisterFieldBool<5, 1, 0, Dma1CtrlReg_SPEC, crate::common::RW> {
1109 crate::common::RegisterFieldBool::<5,1,0,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1110 }
1111
1112 #[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\")"]
1113 #[inline(always)]
1114 pub fn binc(
1115 self,
1116 ) -> crate::common::RegisterFieldBool<4, 1, 0, Dma1CtrlReg_SPEC, crate::common::RW> {
1117 crate::common::RegisterFieldBool::<4,1,0,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1118 }
1119
1120 #[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)"]
1121 #[inline(always)]
1122 pub fn dreq_mode(
1123 self,
1124 ) -> crate::common::RegisterFieldBool<3, 1, 0, Dma1CtrlReg_SPEC, crate::common::RW> {
1125 crate::common::RegisterFieldBool::<3,1,0,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1126 }
1127
1128 #[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"]
1129 #[inline(always)]
1130 pub fn bw(
1131 self,
1132 ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, Dma1CtrlReg_SPEC, crate::common::RW>
1133 {
1134 crate::common::RegisterField::<1,0x3,1,0,u8,u8,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1135 }
1136
1137 #[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.\nNote: If DMA_ON is disabled by SW while the DMA channel is active, it cannot be enabled again until the channel has completed the last on-going read-write cycle and has stopped. Thus, the SW has to check that the reading of DMAx_CTRL_REG.DMA_ON returns 0, before setting again the specific bit-field."]
1138 #[inline(always)]
1139 pub fn dma_on(
1140 self,
1141 ) -> crate::common::RegisterFieldBool<0, 1, 0, Dma1CtrlReg_SPEC, crate::common::RW> {
1142 crate::common::RegisterFieldBool::<0,1,0,Dma1CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1143 }
1144}
1145impl ::core::default::Default for Dma1CtrlReg {
1146 #[inline(always)]
1147 fn default() -> Dma1CtrlReg {
1148 <crate::RegValueT<Dma1CtrlReg_SPEC> as RegisterValue<_>>::new(32768)
1149 }
1150}
1151
1152#[doc(hidden)]
1153#[derive(Copy, Clone, Eq, PartialEq)]
1154pub struct Dma1IdxReg_SPEC;
1155impl crate::sealed::RegSpec for Dma1IdxReg_SPEC {
1156 type DataType = u32;
1157}
1158
1159#[doc = "Index value of DMA channel 1"]
1160pub type Dma1IdxReg = crate::RegValueT<Dma1IdxReg_SPEC>;
1161
1162impl Dma1IdxReg {
1163 #[doc = "This (read-only) register determines the data items already transferred by the DMA channel. Hence, if its value is 1, then the DMA channel has already copied one data item and it is currently performing the next copy. If its value is 2, then two items have already been copied and so on.\nWhen the transfer is completed (so when DMAx_CTRL_REG.DMA_ON has been cleared) and DMAx_CTRL_REG.CIRCULAR is not set, the register keeps its (last) value (which should be equal to DMAx_LEN_REG) and it is automatically reset to 0 upon starting a new transfer. In CIRCULAR mode, the register is automatically initialized to 0 as soon as the DMA channel starts-over again."]
1164 #[inline(always)]
1165 pub fn dma1_idx(
1166 self,
1167 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma1IdxReg_SPEC, crate::common::R>
1168 {
1169 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma1IdxReg_SPEC,crate::common::R>::from_register(self,0)
1170 }
1171}
1172impl ::core::default::Default for Dma1IdxReg {
1173 #[inline(always)]
1174 fn default() -> Dma1IdxReg {
1175 <crate::RegValueT<Dma1IdxReg_SPEC> as RegisterValue<_>>::new(0)
1176 }
1177}
1178
1179#[doc(hidden)]
1180#[derive(Copy, Clone, Eq, PartialEq)]
1181pub struct Dma1IntReg_SPEC;
1182impl crate::sealed::RegSpec for Dma1IntReg_SPEC {
1183 type DataType = u32;
1184}
1185
1186#[doc = "DMA receive interrupt register channel 1"]
1187pub type Dma1IntReg = crate::RegValueT<Dma1IntReg_SPEC>;
1188
1189impl Dma1IntReg {
1190 #[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."]
1191 #[inline(always)]
1192 pub fn dma1_int(
1193 self,
1194 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma1IntReg_SPEC, crate::common::RW>
1195 {
1196 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma1IntReg_SPEC,crate::common::RW>::from_register(self,0)
1197 }
1198}
1199impl ::core::default::Default for Dma1IntReg {
1200 #[inline(always)]
1201 fn default() -> Dma1IntReg {
1202 <crate::RegValueT<Dma1IntReg_SPEC> as RegisterValue<_>>::new(0)
1203 }
1204}
1205
1206#[doc(hidden)]
1207#[derive(Copy, Clone, Eq, PartialEq)]
1208pub struct Dma1LenReg_SPEC;
1209impl crate::sealed::RegSpec for Dma1LenReg_SPEC {
1210 type DataType = u32;
1211}
1212
1213#[doc = "DMA receive length register channel 1"]
1214pub type Dma1LenReg = crate::RegValueT<Dma1LenReg_SPEC>;
1215
1216impl Dma1LenReg {
1217 #[doc = "DMA channel\'s transfer length. DMAx_LEN of value 0, 1, 2, ... results into an actual transfer length of 1, 2, 3, ..."]
1218 #[inline(always)]
1219 pub fn dma1_len(
1220 self,
1221 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma1LenReg_SPEC, crate::common::RW>
1222 {
1223 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma1LenReg_SPEC,crate::common::RW>::from_register(self,0)
1224 }
1225}
1226impl ::core::default::Default for Dma1LenReg {
1227 #[inline(always)]
1228 fn default() -> Dma1LenReg {
1229 <crate::RegValueT<Dma1LenReg_SPEC> as RegisterValue<_>>::new(0)
1230 }
1231}
1232
1233#[doc(hidden)]
1234#[derive(Copy, Clone, Eq, PartialEq)]
1235pub struct Dma2AStartReg_SPEC;
1236impl crate::sealed::RegSpec for Dma2AStartReg_SPEC {
1237 type DataType = u32;
1238}
1239
1240#[doc = "Start address A of DMA channel 2"]
1241pub type Dma2AStartReg = crate::RegValueT<Dma2AStartReg_SPEC>;
1242
1243impl Dma2AStartReg {
1244 #[doc = "Source start address"]
1245 #[inline(always)]
1246 pub fn dma2_a_start(
1247 self,
1248 ) -> crate::common::RegisterField<
1249 0,
1250 0xffffffff,
1251 1,
1252 0,
1253 u32,
1254 u32,
1255 Dma2AStartReg_SPEC,
1256 crate::common::RW,
1257 > {
1258 crate::common::RegisterField::<
1259 0,
1260 0xffffffff,
1261 1,
1262 0,
1263 u32,
1264 u32,
1265 Dma2AStartReg_SPEC,
1266 crate::common::RW,
1267 >::from_register(self, 0)
1268 }
1269}
1270impl ::core::default::Default for Dma2AStartReg {
1271 #[inline(always)]
1272 fn default() -> Dma2AStartReg {
1273 <crate::RegValueT<Dma2AStartReg_SPEC> as RegisterValue<_>>::new(0)
1274 }
1275}
1276
1277#[doc(hidden)]
1278#[derive(Copy, Clone, Eq, PartialEq)]
1279pub struct Dma2BStartReg_SPEC;
1280impl crate::sealed::RegSpec for Dma2BStartReg_SPEC {
1281 type DataType = u32;
1282}
1283
1284#[doc = "Start address B of DMA channel 2"]
1285pub type Dma2BStartReg = crate::RegValueT<Dma2BStartReg_SPEC>;
1286
1287impl Dma2BStartReg {
1288 #[doc = "Destination start address"]
1289 #[inline(always)]
1290 pub fn dma2_b_start(
1291 self,
1292 ) -> crate::common::RegisterField<
1293 0,
1294 0xffffffff,
1295 1,
1296 0,
1297 u32,
1298 u32,
1299 Dma2BStartReg_SPEC,
1300 crate::common::RW,
1301 > {
1302 crate::common::RegisterField::<
1303 0,
1304 0xffffffff,
1305 1,
1306 0,
1307 u32,
1308 u32,
1309 Dma2BStartReg_SPEC,
1310 crate::common::RW,
1311 >::from_register(self, 0)
1312 }
1313}
1314impl ::core::default::Default for Dma2BStartReg {
1315 #[inline(always)]
1316 fn default() -> Dma2BStartReg {
1317 <crate::RegValueT<Dma2BStartReg_SPEC> as RegisterValue<_>>::new(0)
1318 }
1319}
1320
1321#[doc(hidden)]
1322#[derive(Copy, Clone, Eq, PartialEq)]
1323pub struct Dma2CtrlReg_SPEC;
1324impl crate::sealed::RegSpec for Dma2CtrlReg_SPEC {
1325 type DataType = u32;
1326}
1327
1328#[doc = "Control register for the DMA channel 2"]
1329pub type Dma2CtrlReg = crate::RegValueT<Dma2CtrlReg_SPEC>;
1330
1331impl Dma2CtrlReg {
1332 #[doc = "0 = Ignores bus error response from the AHB bus, so DMA continues normally.\n1 = Detects the bus response and tracks any bus error may occur during the transfer. If a bus error is detected, the channel completes the current read-write DMA cycle (either in burst or single transfers mode) and then closes the transfer, de-asserting DMA_ON bit automatically.\nIt is noted that the respective bus error detection status bit of DMA_INT_STATUS_REG is automatically cleared as soon as the channel is switched-on again, in order to perform a new transfer."]
1333 #[inline(always)]
1334 pub fn bus_error_detect(
1335 self,
1336 ) -> crate::common::RegisterFieldBool<15, 1, 0, Dma2CtrlReg_SPEC, crate::common::RW> {
1337 crate::common::RegisterFieldBool::<15,1,0,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1338 }
1339
1340 #[doc = "Enables the DMA read/write bursts, according to the following configuration:\n00 = Bursts are disabled\n01 = Bursts of 4 are enabled\n10 = Bursts of 8 are enabled\n11 = Reserved"]
1341 #[inline(always)]
1342 pub fn burst_mode(
1343 self,
1344 ) -> crate::common::RegisterField<13, 0x3, 1, 0, u8, u8, Dma2CtrlReg_SPEC, crate::common::RW>
1345 {
1346 crate::common::RegisterField::<13,0x3,1,0,u8,u8,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1347 }
1348
1349 #[doc = "0 = DMA operates with level-sensitive peripheral requests (default)\n1 = DMA operates with (positive) edge-sensitive peripheral requests"]
1350 #[inline(always)]
1351 pub fn req_sense(
1352 self,
1353 ) -> crate::common::RegisterFieldBool<12, 1, 0, Dma2CtrlReg_SPEC, crate::common::RW> {
1354 crate::common::RegisterFieldBool::<12,1,0,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1355 }
1356
1357 #[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\'."]
1358 #[inline(always)]
1359 pub fn dma_init(
1360 self,
1361 ) -> crate::common::RegisterFieldBool<11, 1, 0, Dma2CtrlReg_SPEC, crate::common::RW> {
1362 crate::common::RegisterFieldBool::<11,1,0,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1363 }
1364
1365 #[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."]
1366 #[inline(always)]
1367 pub fn dma_idle(
1368 self,
1369 ) -> crate::common::RegisterFieldBool<10, 1, 0, Dma2CtrlReg_SPEC, crate::common::RW> {
1370 crate::common::RegisterFieldBool::<10,1,0,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1371 }
1372
1373 #[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."]
1374 #[inline(always)]
1375 pub fn dma_prio(
1376 self,
1377 ) -> crate::common::RegisterField<7, 0x7, 1, 0, u8, u8, Dma2CtrlReg_SPEC, crate::common::RW>
1378 {
1379 crate::common::RegisterField::<7,0x7,1,0,u8,u8,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1380 }
1381
1382 #[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."]
1383 #[inline(always)]
1384 pub fn circular(
1385 self,
1386 ) -> crate::common::RegisterFieldBool<6, 1, 0, Dma2CtrlReg_SPEC, crate::common::RW> {
1387 crate::common::RegisterFieldBool::<6,1,0,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1388 }
1389
1390 #[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\")"]
1391 #[inline(always)]
1392 pub fn ainc(
1393 self,
1394 ) -> crate::common::RegisterFieldBool<5, 1, 0, Dma2CtrlReg_SPEC, crate::common::RW> {
1395 crate::common::RegisterFieldBool::<5,1,0,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1396 }
1397
1398 #[doc = "Enable increment of destination address\n0 = do not increment\n1 = increment according value of BW"]
1399 #[inline(always)]
1400 pub fn binc(
1401 self,
1402 ) -> crate::common::RegisterFieldBool<4, 1, 0, Dma2CtrlReg_SPEC, crate::common::RW> {
1403 crate::common::RegisterFieldBool::<4,1,0,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1404 }
1405
1406 #[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)"]
1407 #[inline(always)]
1408 pub fn dreq_mode(
1409 self,
1410 ) -> crate::common::RegisterFieldBool<3, 1, 0, Dma2CtrlReg_SPEC, crate::common::RW> {
1411 crate::common::RegisterFieldBool::<3,1,0,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1412 }
1413
1414 #[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"]
1415 #[inline(always)]
1416 pub fn bw(
1417 self,
1418 ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, Dma2CtrlReg_SPEC, crate::common::RW>
1419 {
1420 crate::common::RegisterField::<1,0x3,1,0,u8,u8,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1421 }
1422
1423 #[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.\nNote: If DMA_ON is disabled by SW while the DMA channel is active, it cannot be enabled again until the channel has completed the last on-going read-write cycle and has stopped. Thus, the SW has to check that the reading of DMAx_CTRL_REG.DMA_ON returns 0, before setting again the specific bit-field."]
1424 #[inline(always)]
1425 pub fn dma_on(
1426 self,
1427 ) -> crate::common::RegisterFieldBool<0, 1, 0, Dma2CtrlReg_SPEC, crate::common::RW> {
1428 crate::common::RegisterFieldBool::<0,1,0,Dma2CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1429 }
1430}
1431impl ::core::default::Default for Dma2CtrlReg {
1432 #[inline(always)]
1433 fn default() -> Dma2CtrlReg {
1434 <crate::RegValueT<Dma2CtrlReg_SPEC> as RegisterValue<_>>::new(32768)
1435 }
1436}
1437
1438#[doc(hidden)]
1439#[derive(Copy, Clone, Eq, PartialEq)]
1440pub struct Dma2IdxReg_SPEC;
1441impl crate::sealed::RegSpec for Dma2IdxReg_SPEC {
1442 type DataType = u32;
1443}
1444
1445#[doc = "Index value of DMA channel 2"]
1446pub type Dma2IdxReg = crate::RegValueT<Dma2IdxReg_SPEC>;
1447
1448impl Dma2IdxReg {
1449 #[doc = "This (read-only) register determines the data items already transferred by the DMA channel. Hence, if its value is 1, then the DMA channel has already copied one data item and it is currently performing the next copy. If its value is 2, then two items have already been copied and so on.\nWhen the transfer is completed (so when DMAx_CTRL_REG.DMA_ON has been cleared) and DMAx_CTRL_REG.CIRCULAR is not set, the register keeps its (last) value (which should be equal to DMAx_LEN_REG) and it is automatically reset to 0 upon starting a new transfer. In CIRCULAR mode, the register is automatically initialized to 0 as soon as the DMA channel starts-over again."]
1450 #[inline(always)]
1451 pub fn dma2_idx(
1452 self,
1453 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma2IdxReg_SPEC, crate::common::R>
1454 {
1455 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma2IdxReg_SPEC,crate::common::R>::from_register(self,0)
1456 }
1457}
1458impl ::core::default::Default for Dma2IdxReg {
1459 #[inline(always)]
1460 fn default() -> Dma2IdxReg {
1461 <crate::RegValueT<Dma2IdxReg_SPEC> as RegisterValue<_>>::new(0)
1462 }
1463}
1464
1465#[doc(hidden)]
1466#[derive(Copy, Clone, Eq, PartialEq)]
1467pub struct Dma2IntReg_SPEC;
1468impl crate::sealed::RegSpec for Dma2IntReg_SPEC {
1469 type DataType = u32;
1470}
1471
1472#[doc = "DMA receive interrupt register channel 2"]
1473pub type Dma2IntReg = crate::RegValueT<Dma2IntReg_SPEC>;
1474
1475impl Dma2IntReg {
1476 #[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."]
1477 #[inline(always)]
1478 pub fn dma2_int(
1479 self,
1480 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma2IntReg_SPEC, crate::common::RW>
1481 {
1482 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma2IntReg_SPEC,crate::common::RW>::from_register(self,0)
1483 }
1484}
1485impl ::core::default::Default for Dma2IntReg {
1486 #[inline(always)]
1487 fn default() -> Dma2IntReg {
1488 <crate::RegValueT<Dma2IntReg_SPEC> as RegisterValue<_>>::new(0)
1489 }
1490}
1491
1492#[doc(hidden)]
1493#[derive(Copy, Clone, Eq, PartialEq)]
1494pub struct Dma2LenReg_SPEC;
1495impl crate::sealed::RegSpec for Dma2LenReg_SPEC {
1496 type DataType = u32;
1497}
1498
1499#[doc = "DMA receive length register channel 2"]
1500pub type Dma2LenReg = crate::RegValueT<Dma2LenReg_SPEC>;
1501
1502impl Dma2LenReg {
1503 #[doc = "DMA channel\'s transfer length. DMAx_LEN of value 0, 1, 2, ... results into an actual transfer length of 1, 2, 3, ..."]
1504 #[inline(always)]
1505 pub fn dma2_len(
1506 self,
1507 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma2LenReg_SPEC, crate::common::RW>
1508 {
1509 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma2LenReg_SPEC,crate::common::RW>::from_register(self,0)
1510 }
1511}
1512impl ::core::default::Default for Dma2LenReg {
1513 #[inline(always)]
1514 fn default() -> Dma2LenReg {
1515 <crate::RegValueT<Dma2LenReg_SPEC> as RegisterValue<_>>::new(0)
1516 }
1517}
1518
1519#[doc(hidden)]
1520#[derive(Copy, Clone, Eq, PartialEq)]
1521pub struct Dma3AStartReg_SPEC;
1522impl crate::sealed::RegSpec for Dma3AStartReg_SPEC {
1523 type DataType = u32;
1524}
1525
1526#[doc = "Start address A of DMA channel 3"]
1527pub type Dma3AStartReg = crate::RegValueT<Dma3AStartReg_SPEC>;
1528
1529impl Dma3AStartReg {
1530 #[doc = "Source start address"]
1531 #[inline(always)]
1532 pub fn dma3_a_start(
1533 self,
1534 ) -> crate::common::RegisterField<
1535 0,
1536 0xffffffff,
1537 1,
1538 0,
1539 u32,
1540 u32,
1541 Dma3AStartReg_SPEC,
1542 crate::common::RW,
1543 > {
1544 crate::common::RegisterField::<
1545 0,
1546 0xffffffff,
1547 1,
1548 0,
1549 u32,
1550 u32,
1551 Dma3AStartReg_SPEC,
1552 crate::common::RW,
1553 >::from_register(self, 0)
1554 }
1555}
1556impl ::core::default::Default for Dma3AStartReg {
1557 #[inline(always)]
1558 fn default() -> Dma3AStartReg {
1559 <crate::RegValueT<Dma3AStartReg_SPEC> as RegisterValue<_>>::new(0)
1560 }
1561}
1562
1563#[doc(hidden)]
1564#[derive(Copy, Clone, Eq, PartialEq)]
1565pub struct Dma3BStartReg_SPEC;
1566impl crate::sealed::RegSpec for Dma3BStartReg_SPEC {
1567 type DataType = u32;
1568}
1569
1570#[doc = "Start address B of DMA channel 3"]
1571pub type Dma3BStartReg = crate::RegValueT<Dma3BStartReg_SPEC>;
1572
1573impl Dma3BStartReg {
1574 #[doc = "Destination start address"]
1575 #[inline(always)]
1576 pub fn dma3_b_start(
1577 self,
1578 ) -> crate::common::RegisterField<
1579 0,
1580 0xffffffff,
1581 1,
1582 0,
1583 u32,
1584 u32,
1585 Dma3BStartReg_SPEC,
1586 crate::common::RW,
1587 > {
1588 crate::common::RegisterField::<
1589 0,
1590 0xffffffff,
1591 1,
1592 0,
1593 u32,
1594 u32,
1595 Dma3BStartReg_SPEC,
1596 crate::common::RW,
1597 >::from_register(self, 0)
1598 }
1599}
1600impl ::core::default::Default for Dma3BStartReg {
1601 #[inline(always)]
1602 fn default() -> Dma3BStartReg {
1603 <crate::RegValueT<Dma3BStartReg_SPEC> as RegisterValue<_>>::new(0)
1604 }
1605}
1606
1607#[doc(hidden)]
1608#[derive(Copy, Clone, Eq, PartialEq)]
1609pub struct Dma3CtrlReg_SPEC;
1610impl crate::sealed::RegSpec for Dma3CtrlReg_SPEC {
1611 type DataType = u32;
1612}
1613
1614#[doc = "Control register for the DMA channel 3"]
1615pub type Dma3CtrlReg = crate::RegValueT<Dma3CtrlReg_SPEC>;
1616
1617impl Dma3CtrlReg {
1618 #[doc = "0 = Ignores bus error response from the AHB bus, so DMA continues normally.\n1 = Detects the bus response and tracks any bus error may occur during the transfer. If a bus error is detected, the channel completes the current read-write DMA cycle (either in burst or single transfers mode) and then closes the transfer, de-asserting DMA_ON bit automatically.\nIt is noted that the respective bus error detection status bit of DMA_INT_STATUS_REG is automatically cleared as soon as the channel is switched-on again, in order to perform a new transfer."]
1619 #[inline(always)]
1620 pub fn bus_error_detect(
1621 self,
1622 ) -> crate::common::RegisterFieldBool<15, 1, 0, Dma3CtrlReg_SPEC, crate::common::RW> {
1623 crate::common::RegisterFieldBool::<15,1,0,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1624 }
1625
1626 #[doc = "Enables the DMA read/write bursts, according to the following configuration:\n00 = Bursts are disabled\n01 = Bursts of 4 are enabled\n10 = Bursts of 8 are enabled\n11 = Reserved"]
1627 #[inline(always)]
1628 pub fn burst_mode(
1629 self,
1630 ) -> crate::common::RegisterField<13, 0x3, 1, 0, u8, u8, Dma3CtrlReg_SPEC, crate::common::RW>
1631 {
1632 crate::common::RegisterField::<13,0x3,1,0,u8,u8,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1633 }
1634
1635 #[doc = "0 = DMA operates with level-sensitive peripheral requests (default)\n1 = DMA operates with (positive) edge-sensitive peripheral requests"]
1636 #[inline(always)]
1637 pub fn req_sense(
1638 self,
1639 ) -> crate::common::RegisterFieldBool<12, 1, 0, Dma3CtrlReg_SPEC, crate::common::RW> {
1640 crate::common::RegisterFieldBool::<12,1,0,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1641 }
1642
1643 #[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\'."]
1644 #[inline(always)]
1645 pub fn dma_init(
1646 self,
1647 ) -> crate::common::RegisterFieldBool<11, 1, 0, Dma3CtrlReg_SPEC, crate::common::RW> {
1648 crate::common::RegisterFieldBool::<11,1,0,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1649 }
1650
1651 #[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."]
1652 #[inline(always)]
1653 pub fn dma_idle(
1654 self,
1655 ) -> crate::common::RegisterFieldBool<10, 1, 0, Dma3CtrlReg_SPEC, crate::common::RW> {
1656 crate::common::RegisterFieldBool::<10,1,0,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1657 }
1658
1659 #[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."]
1660 #[inline(always)]
1661 pub fn dma_prio(
1662 self,
1663 ) -> crate::common::RegisterField<7, 0x7, 1, 0, u8, u8, Dma3CtrlReg_SPEC, crate::common::RW>
1664 {
1665 crate::common::RegisterField::<7,0x7,1,0,u8,u8,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1666 }
1667
1668 #[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."]
1669 #[inline(always)]
1670 pub fn circular(
1671 self,
1672 ) -> crate::common::RegisterFieldBool<6, 1, 0, Dma3CtrlReg_SPEC, crate::common::RW> {
1673 crate::common::RegisterFieldBool::<6,1,0,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1674 }
1675
1676 #[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\")"]
1677 #[inline(always)]
1678 pub fn ainc(
1679 self,
1680 ) -> crate::common::RegisterFieldBool<5, 1, 0, Dma3CtrlReg_SPEC, crate::common::RW> {
1681 crate::common::RegisterFieldBool::<5,1,0,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1682 }
1683
1684 #[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\")"]
1685 #[inline(always)]
1686 pub fn binc(
1687 self,
1688 ) -> crate::common::RegisterFieldBool<4, 1, 0, Dma3CtrlReg_SPEC, crate::common::RW> {
1689 crate::common::RegisterFieldBool::<4,1,0,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1690 }
1691
1692 #[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)"]
1693 #[inline(always)]
1694 pub fn dreq_mode(
1695 self,
1696 ) -> crate::common::RegisterFieldBool<3, 1, 0, Dma3CtrlReg_SPEC, crate::common::RW> {
1697 crate::common::RegisterFieldBool::<3,1,0,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1698 }
1699
1700 #[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"]
1701 #[inline(always)]
1702 pub fn bw(
1703 self,
1704 ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, Dma3CtrlReg_SPEC, crate::common::RW>
1705 {
1706 crate::common::RegisterField::<1,0x3,1,0,u8,u8,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1707 }
1708
1709 #[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.\nNote: If DMA_ON is disabled by SW while the DMA channel is active, it cannot be enabled again until the channel has completed the last on-going read-write cycle and has stopped. Thus, the SW has to check that the reading of DMAx_CTRL_REG.DMA_ON returns 0, before setting again the specific bit-field."]
1710 #[inline(always)]
1711 pub fn dma_on(
1712 self,
1713 ) -> crate::common::RegisterFieldBool<0, 1, 0, Dma3CtrlReg_SPEC, crate::common::RW> {
1714 crate::common::RegisterFieldBool::<0,1,0,Dma3CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1715 }
1716}
1717impl ::core::default::Default for Dma3CtrlReg {
1718 #[inline(always)]
1719 fn default() -> Dma3CtrlReg {
1720 <crate::RegValueT<Dma3CtrlReg_SPEC> as RegisterValue<_>>::new(32768)
1721 }
1722}
1723
1724#[doc(hidden)]
1725#[derive(Copy, Clone, Eq, PartialEq)]
1726pub struct Dma3IdxReg_SPEC;
1727impl crate::sealed::RegSpec for Dma3IdxReg_SPEC {
1728 type DataType = u32;
1729}
1730
1731#[doc = "Index value of DMA channel 3"]
1732pub type Dma3IdxReg = crate::RegValueT<Dma3IdxReg_SPEC>;
1733
1734impl Dma3IdxReg {
1735 #[doc = "This (read-only) register determines the data items already transferred by the DMA channel. Hence, if its value is 1, then the DMA channel has already copied one data item and it is currently performing the next copy. If its value is 2, then two items have already been copied and so on.\nWhen the transfer is completed (so when DMAx_CTRL_REG.DMA_ON has been cleared) and DMAx_CTRL_REG.CIRCULAR is not set, the register keeps its (last) value (which should be equal to DMAx_LEN_REG) and it is automatically reset to 0 upon starting a new transfer. In CIRCULAR mode, the register is automatically initialized to 0 as soon as the DMA channel starts-over again."]
1736 #[inline(always)]
1737 pub fn dma3_idx(
1738 self,
1739 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma3IdxReg_SPEC, crate::common::R>
1740 {
1741 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma3IdxReg_SPEC,crate::common::R>::from_register(self,0)
1742 }
1743}
1744impl ::core::default::Default for Dma3IdxReg {
1745 #[inline(always)]
1746 fn default() -> Dma3IdxReg {
1747 <crate::RegValueT<Dma3IdxReg_SPEC> as RegisterValue<_>>::new(0)
1748 }
1749}
1750
1751#[doc(hidden)]
1752#[derive(Copy, Clone, Eq, PartialEq)]
1753pub struct Dma3IntReg_SPEC;
1754impl crate::sealed::RegSpec for Dma3IntReg_SPEC {
1755 type DataType = u32;
1756}
1757
1758#[doc = "DMA receive interrupt register channel 3"]
1759pub type Dma3IntReg = crate::RegValueT<Dma3IntReg_SPEC>;
1760
1761impl Dma3IntReg {
1762 #[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."]
1763 #[inline(always)]
1764 pub fn dma3_int(
1765 self,
1766 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma3IntReg_SPEC, crate::common::RW>
1767 {
1768 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma3IntReg_SPEC,crate::common::RW>::from_register(self,0)
1769 }
1770}
1771impl ::core::default::Default for Dma3IntReg {
1772 #[inline(always)]
1773 fn default() -> Dma3IntReg {
1774 <crate::RegValueT<Dma3IntReg_SPEC> as RegisterValue<_>>::new(0)
1775 }
1776}
1777
1778#[doc(hidden)]
1779#[derive(Copy, Clone, Eq, PartialEq)]
1780pub struct Dma3LenReg_SPEC;
1781impl crate::sealed::RegSpec for Dma3LenReg_SPEC {
1782 type DataType = u32;
1783}
1784
1785#[doc = "DMA receive length register channel 3"]
1786pub type Dma3LenReg = crate::RegValueT<Dma3LenReg_SPEC>;
1787
1788impl Dma3LenReg {
1789 #[doc = "DMA channel\'s transfer length. DMAx_LEN of value 0, 1, 2, ... results into an actual transfer length of 1, 2, 3, ..."]
1790 #[inline(always)]
1791 pub fn dma3_len(
1792 self,
1793 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma3LenReg_SPEC, crate::common::RW>
1794 {
1795 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma3LenReg_SPEC,crate::common::RW>::from_register(self,0)
1796 }
1797}
1798impl ::core::default::Default for Dma3LenReg {
1799 #[inline(always)]
1800 fn default() -> Dma3LenReg {
1801 <crate::RegValueT<Dma3LenReg_SPEC> as RegisterValue<_>>::new(0)
1802 }
1803}
1804
1805#[doc(hidden)]
1806#[derive(Copy, Clone, Eq, PartialEq)]
1807pub struct Dma4AStartReg_SPEC;
1808impl crate::sealed::RegSpec for Dma4AStartReg_SPEC {
1809 type DataType = u32;
1810}
1811
1812#[doc = "Start address A of DMA channel 4"]
1813pub type Dma4AStartReg = crate::RegValueT<Dma4AStartReg_SPEC>;
1814
1815impl Dma4AStartReg {
1816 #[doc = "Source start address"]
1817 #[inline(always)]
1818 pub fn dma4_a_start(
1819 self,
1820 ) -> crate::common::RegisterField<
1821 0,
1822 0xffffffff,
1823 1,
1824 0,
1825 u32,
1826 u32,
1827 Dma4AStartReg_SPEC,
1828 crate::common::RW,
1829 > {
1830 crate::common::RegisterField::<
1831 0,
1832 0xffffffff,
1833 1,
1834 0,
1835 u32,
1836 u32,
1837 Dma4AStartReg_SPEC,
1838 crate::common::RW,
1839 >::from_register(self, 0)
1840 }
1841}
1842impl ::core::default::Default for Dma4AStartReg {
1843 #[inline(always)]
1844 fn default() -> Dma4AStartReg {
1845 <crate::RegValueT<Dma4AStartReg_SPEC> as RegisterValue<_>>::new(0)
1846 }
1847}
1848
1849#[doc(hidden)]
1850#[derive(Copy, Clone, Eq, PartialEq)]
1851pub struct Dma4BStartReg_SPEC;
1852impl crate::sealed::RegSpec for Dma4BStartReg_SPEC {
1853 type DataType = u32;
1854}
1855
1856#[doc = "Start address B of DMA channel 4"]
1857pub type Dma4BStartReg = crate::RegValueT<Dma4BStartReg_SPEC>;
1858
1859impl Dma4BStartReg {
1860 #[doc = "Destination start address"]
1861 #[inline(always)]
1862 pub fn dma4_b_start(
1863 self,
1864 ) -> crate::common::RegisterField<
1865 0,
1866 0xffffffff,
1867 1,
1868 0,
1869 u32,
1870 u32,
1871 Dma4BStartReg_SPEC,
1872 crate::common::RW,
1873 > {
1874 crate::common::RegisterField::<
1875 0,
1876 0xffffffff,
1877 1,
1878 0,
1879 u32,
1880 u32,
1881 Dma4BStartReg_SPEC,
1882 crate::common::RW,
1883 >::from_register(self, 0)
1884 }
1885}
1886impl ::core::default::Default for Dma4BStartReg {
1887 #[inline(always)]
1888 fn default() -> Dma4BStartReg {
1889 <crate::RegValueT<Dma4BStartReg_SPEC> as RegisterValue<_>>::new(0)
1890 }
1891}
1892
1893#[doc(hidden)]
1894#[derive(Copy, Clone, Eq, PartialEq)]
1895pub struct Dma4CtrlReg_SPEC;
1896impl crate::sealed::RegSpec for Dma4CtrlReg_SPEC {
1897 type DataType = u32;
1898}
1899
1900#[doc = "Control register for the DMA channel 4"]
1901pub type Dma4CtrlReg = crate::RegValueT<Dma4CtrlReg_SPEC>;
1902
1903impl Dma4CtrlReg {
1904 #[doc = "0 = Ignores bus error response from the AHB bus, so DMA continues normally.\n1 = Detects the bus response and tracks any bus error may occur during the transfer. If a bus error is detected, the channel completes the current read-write DMA cycle (either in burst or single transfers mode) and then closes the transfer, de-asserting DMA_ON bit automatically.\nIt is noted that the respective bus error detection status bit of DMA_INT_STATUS_REG is automatically cleared as soon as the channel is switched-on again, in order to perform a new transfer."]
1905 #[inline(always)]
1906 pub fn bus_error_detect(
1907 self,
1908 ) -> crate::common::RegisterFieldBool<15, 1, 0, Dma4CtrlReg_SPEC, crate::common::RW> {
1909 crate::common::RegisterFieldBool::<15,1,0,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1910 }
1911
1912 #[doc = "Enables the DMA read/write bursts, according to the following configuration:\n00 = Bursts are disabled\n01 = Bursts of 4 are enabled\n10 = Bursts of 8 are enabled\n11 = Reserved"]
1913 #[inline(always)]
1914 pub fn burst_mode(
1915 self,
1916 ) -> crate::common::RegisterField<13, 0x3, 1, 0, u8, u8, Dma4CtrlReg_SPEC, crate::common::RW>
1917 {
1918 crate::common::RegisterField::<13,0x3,1,0,u8,u8,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1919 }
1920
1921 #[doc = "0 = DMA operates with level-sensitive peripheral requests (default)\n1 = DMA operates with (positive) edge-sensitive peripheral requests"]
1922 #[inline(always)]
1923 pub fn req_sense(
1924 self,
1925 ) -> crate::common::RegisterFieldBool<12, 1, 0, Dma4CtrlReg_SPEC, crate::common::RW> {
1926 crate::common::RegisterFieldBool::<12,1,0,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1927 }
1928
1929 #[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\'."]
1930 #[inline(always)]
1931 pub fn dma_init(
1932 self,
1933 ) -> crate::common::RegisterFieldBool<11, 1, 0, Dma4CtrlReg_SPEC, crate::common::RW> {
1934 crate::common::RegisterFieldBool::<11,1,0,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1935 }
1936
1937 #[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."]
1938 #[inline(always)]
1939 pub fn dma_idle(
1940 self,
1941 ) -> crate::common::RegisterFieldBool<10, 1, 0, Dma4CtrlReg_SPEC, crate::common::RW> {
1942 crate::common::RegisterFieldBool::<10,1,0,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1943 }
1944
1945 #[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."]
1946 #[inline(always)]
1947 pub fn dma_prio(
1948 self,
1949 ) -> crate::common::RegisterField<7, 0x7, 1, 0, u8, u8, Dma4CtrlReg_SPEC, crate::common::RW>
1950 {
1951 crate::common::RegisterField::<7,0x7,1,0,u8,u8,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1952 }
1953
1954 #[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."]
1955 #[inline(always)]
1956 pub fn circular(
1957 self,
1958 ) -> crate::common::RegisterFieldBool<6, 1, 0, Dma4CtrlReg_SPEC, crate::common::RW> {
1959 crate::common::RegisterFieldBool::<6,1,0,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1960 }
1961
1962 #[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\")"]
1963 #[inline(always)]
1964 pub fn ainc(
1965 self,
1966 ) -> crate::common::RegisterFieldBool<5, 1, 0, Dma4CtrlReg_SPEC, crate::common::RW> {
1967 crate::common::RegisterFieldBool::<5,1,0,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1968 }
1969
1970 #[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\")"]
1971 #[inline(always)]
1972 pub fn binc(
1973 self,
1974 ) -> crate::common::RegisterFieldBool<4, 1, 0, Dma4CtrlReg_SPEC, crate::common::RW> {
1975 crate::common::RegisterFieldBool::<4,1,0,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1976 }
1977
1978 #[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)"]
1979 #[inline(always)]
1980 pub fn dreq_mode(
1981 self,
1982 ) -> crate::common::RegisterFieldBool<3, 1, 0, Dma4CtrlReg_SPEC, crate::common::RW> {
1983 crate::common::RegisterFieldBool::<3,1,0,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1984 }
1985
1986 #[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"]
1987 #[inline(always)]
1988 pub fn bw(
1989 self,
1990 ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, Dma4CtrlReg_SPEC, crate::common::RW>
1991 {
1992 crate::common::RegisterField::<1,0x3,1,0,u8,u8,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
1993 }
1994
1995 #[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.\nNote: If DMA_ON is disabled by SW while the DMA channel is active, it cannot be enabled again until the channel has completed the last on-going read-write cycle and has stopped. Thus, the SW has to check that the reading of DMAx_CTRL_REG.DMA_ON returns 0, before setting again the specific bit-field."]
1996 #[inline(always)]
1997 pub fn dma_on(
1998 self,
1999 ) -> crate::common::RegisterFieldBool<0, 1, 0, Dma4CtrlReg_SPEC, crate::common::RW> {
2000 crate::common::RegisterFieldBool::<0,1,0,Dma4CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2001 }
2002}
2003impl ::core::default::Default for Dma4CtrlReg {
2004 #[inline(always)]
2005 fn default() -> Dma4CtrlReg {
2006 <crate::RegValueT<Dma4CtrlReg_SPEC> as RegisterValue<_>>::new(32768)
2007 }
2008}
2009
2010#[doc(hidden)]
2011#[derive(Copy, Clone, Eq, PartialEq)]
2012pub struct Dma4IdxReg_SPEC;
2013impl crate::sealed::RegSpec for Dma4IdxReg_SPEC {
2014 type DataType = u32;
2015}
2016
2017#[doc = "Index value of DMA channel 4"]
2018pub type Dma4IdxReg = crate::RegValueT<Dma4IdxReg_SPEC>;
2019
2020impl Dma4IdxReg {
2021 #[doc = "This (read-only) register determines the data items already transferred by the DMA channel. Hence, if its value is 1, then the DMA channel has already copied one data item and it is currently performing the next copy. If its value is 2, then two items have already been copied and so on.\nWhen the transfer is completed (so when DMAx_CTRL_REG.DMA_ON has been cleared) and DMAx_CTRL_REG.CIRCULAR is not set, the register keeps its (last) value (which should be equal to DMAx_LEN_REG) and it is automatically reset to 0 upon starting a new transfer. In CIRCULAR mode, the register is automatically initialized to 0 as soon as the DMA channel starts-over again."]
2022 #[inline(always)]
2023 pub fn dma4_idx(
2024 self,
2025 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma4IdxReg_SPEC, crate::common::R>
2026 {
2027 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma4IdxReg_SPEC,crate::common::R>::from_register(self,0)
2028 }
2029}
2030impl ::core::default::Default for Dma4IdxReg {
2031 #[inline(always)]
2032 fn default() -> Dma4IdxReg {
2033 <crate::RegValueT<Dma4IdxReg_SPEC> as RegisterValue<_>>::new(0)
2034 }
2035}
2036
2037#[doc(hidden)]
2038#[derive(Copy, Clone, Eq, PartialEq)]
2039pub struct Dma4IntReg_SPEC;
2040impl crate::sealed::RegSpec for Dma4IntReg_SPEC {
2041 type DataType = u32;
2042}
2043
2044#[doc = "DMA receive interrupt register channel 4"]
2045pub type Dma4IntReg = crate::RegValueT<Dma4IntReg_SPEC>;
2046
2047impl Dma4IntReg {
2048 #[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."]
2049 #[inline(always)]
2050 pub fn dma4_int(
2051 self,
2052 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma4IntReg_SPEC, crate::common::RW>
2053 {
2054 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma4IntReg_SPEC,crate::common::RW>::from_register(self,0)
2055 }
2056}
2057impl ::core::default::Default for Dma4IntReg {
2058 #[inline(always)]
2059 fn default() -> Dma4IntReg {
2060 <crate::RegValueT<Dma4IntReg_SPEC> as RegisterValue<_>>::new(0)
2061 }
2062}
2063
2064#[doc(hidden)]
2065#[derive(Copy, Clone, Eq, PartialEq)]
2066pub struct Dma4LenReg_SPEC;
2067impl crate::sealed::RegSpec for Dma4LenReg_SPEC {
2068 type DataType = u32;
2069}
2070
2071#[doc = "DMA receive length register channel 4"]
2072pub type Dma4LenReg = crate::RegValueT<Dma4LenReg_SPEC>;
2073
2074impl Dma4LenReg {
2075 #[doc = "DMA channel\'s transfer length. DMAx_LEN of value 0, 1, 2, ... results into an actual transfer length of 1, 2, 3, ..."]
2076 #[inline(always)]
2077 pub fn dma4_len(
2078 self,
2079 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma4LenReg_SPEC, crate::common::RW>
2080 {
2081 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma4LenReg_SPEC,crate::common::RW>::from_register(self,0)
2082 }
2083}
2084impl ::core::default::Default for Dma4LenReg {
2085 #[inline(always)]
2086 fn default() -> Dma4LenReg {
2087 <crate::RegValueT<Dma4LenReg_SPEC> as RegisterValue<_>>::new(0)
2088 }
2089}
2090
2091#[doc(hidden)]
2092#[derive(Copy, Clone, Eq, PartialEq)]
2093pub struct Dma5AStartReg_SPEC;
2094impl crate::sealed::RegSpec for Dma5AStartReg_SPEC {
2095 type DataType = u32;
2096}
2097
2098#[doc = "Start address A of DMA channel 5"]
2099pub type Dma5AStartReg = crate::RegValueT<Dma5AStartReg_SPEC>;
2100
2101impl Dma5AStartReg {
2102 #[doc = "Source start address"]
2103 #[inline(always)]
2104 pub fn dma5_a_start(
2105 self,
2106 ) -> crate::common::RegisterField<
2107 0,
2108 0xffffffff,
2109 1,
2110 0,
2111 u32,
2112 u32,
2113 Dma5AStartReg_SPEC,
2114 crate::common::RW,
2115 > {
2116 crate::common::RegisterField::<
2117 0,
2118 0xffffffff,
2119 1,
2120 0,
2121 u32,
2122 u32,
2123 Dma5AStartReg_SPEC,
2124 crate::common::RW,
2125 >::from_register(self, 0)
2126 }
2127}
2128impl ::core::default::Default for Dma5AStartReg {
2129 #[inline(always)]
2130 fn default() -> Dma5AStartReg {
2131 <crate::RegValueT<Dma5AStartReg_SPEC> as RegisterValue<_>>::new(0)
2132 }
2133}
2134
2135#[doc(hidden)]
2136#[derive(Copy, Clone, Eq, PartialEq)]
2137pub struct Dma5BStartReg_SPEC;
2138impl crate::sealed::RegSpec for Dma5BStartReg_SPEC {
2139 type DataType = u32;
2140}
2141
2142#[doc = "Start address B of DMA channel 5"]
2143pub type Dma5BStartReg = crate::RegValueT<Dma5BStartReg_SPEC>;
2144
2145impl Dma5BStartReg {
2146 #[doc = "Destination start address"]
2147 #[inline(always)]
2148 pub fn dma5_b_start(
2149 self,
2150 ) -> crate::common::RegisterField<
2151 0,
2152 0xffffffff,
2153 1,
2154 0,
2155 u32,
2156 u32,
2157 Dma5BStartReg_SPEC,
2158 crate::common::RW,
2159 > {
2160 crate::common::RegisterField::<
2161 0,
2162 0xffffffff,
2163 1,
2164 0,
2165 u32,
2166 u32,
2167 Dma5BStartReg_SPEC,
2168 crate::common::RW,
2169 >::from_register(self, 0)
2170 }
2171}
2172impl ::core::default::Default for Dma5BStartReg {
2173 #[inline(always)]
2174 fn default() -> Dma5BStartReg {
2175 <crate::RegValueT<Dma5BStartReg_SPEC> as RegisterValue<_>>::new(0)
2176 }
2177}
2178
2179#[doc(hidden)]
2180#[derive(Copy, Clone, Eq, PartialEq)]
2181pub struct Dma5CtrlReg_SPEC;
2182impl crate::sealed::RegSpec for Dma5CtrlReg_SPEC {
2183 type DataType = u32;
2184}
2185
2186#[doc = "Control register for the DMA channel 5"]
2187pub type Dma5CtrlReg = crate::RegValueT<Dma5CtrlReg_SPEC>;
2188
2189impl Dma5CtrlReg {
2190 #[doc = "0 = Ignores bus error response from the AHB bus, so DMA continues normally.\n1 = Detects the bus response and tracks any bus error may occur during the transfer. If a bus error is detected, the channel completes the current read-write DMA cycle (either in burst or single transfers mode) and then closes the transfer, de-asserting DMA_ON bit automatically.\nIt is noted that the respective bus error detection status bit of DMA_INT_STATUS_REG is automatically cleared as soon as the channel is switched-on again, in order to perform a new transfer."]
2191 #[inline(always)]
2192 pub fn bus_error_detect(
2193 self,
2194 ) -> crate::common::RegisterFieldBool<15, 1, 0, Dma5CtrlReg_SPEC, crate::common::RW> {
2195 crate::common::RegisterFieldBool::<15,1,0,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2196 }
2197
2198 #[doc = "Enables the DMA read/write bursts, according to the following configuration:\n00 = Bursts are disabled\n01 = Bursts of 4 are enabled\n10 = Bursts of 8 are enabled\n11 = Reserved"]
2199 #[inline(always)]
2200 pub fn burst_mode(
2201 self,
2202 ) -> crate::common::RegisterField<13, 0x3, 1, 0, u8, u8, Dma5CtrlReg_SPEC, crate::common::RW>
2203 {
2204 crate::common::RegisterField::<13,0x3,1,0,u8,u8,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2205 }
2206
2207 #[doc = "0 = DMA operates with level-sensitive peripheral requests (default)\n1 = DMA operates with (positive) edge-sensitive peripheral requests"]
2208 #[inline(always)]
2209 pub fn req_sense(
2210 self,
2211 ) -> crate::common::RegisterFieldBool<12, 1, 0, Dma5CtrlReg_SPEC, crate::common::RW> {
2212 crate::common::RegisterFieldBool::<12,1,0,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2213 }
2214
2215 #[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\'."]
2216 #[inline(always)]
2217 pub fn dma_init(
2218 self,
2219 ) -> crate::common::RegisterFieldBool<11, 1, 0, Dma5CtrlReg_SPEC, crate::common::RW> {
2220 crate::common::RegisterFieldBool::<11,1,0,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2221 }
2222
2223 #[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."]
2224 #[inline(always)]
2225 pub fn dma_idle(
2226 self,
2227 ) -> crate::common::RegisterFieldBool<10, 1, 0, Dma5CtrlReg_SPEC, crate::common::RW> {
2228 crate::common::RegisterFieldBool::<10,1,0,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2229 }
2230
2231 #[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."]
2232 #[inline(always)]
2233 pub fn dma_prio(
2234 self,
2235 ) -> crate::common::RegisterField<7, 0x7, 1, 0, u8, u8, Dma5CtrlReg_SPEC, crate::common::RW>
2236 {
2237 crate::common::RegisterField::<7,0x7,1,0,u8,u8,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2238 }
2239
2240 #[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."]
2241 #[inline(always)]
2242 pub fn circular(
2243 self,
2244 ) -> crate::common::RegisterFieldBool<6, 1, 0, Dma5CtrlReg_SPEC, crate::common::RW> {
2245 crate::common::RegisterFieldBool::<6,1,0,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2246 }
2247
2248 #[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\")"]
2249 #[inline(always)]
2250 pub fn ainc(
2251 self,
2252 ) -> crate::common::RegisterFieldBool<5, 1, 0, Dma5CtrlReg_SPEC, crate::common::RW> {
2253 crate::common::RegisterFieldBool::<5,1,0,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2254 }
2255
2256 #[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\")"]
2257 #[inline(always)]
2258 pub fn binc(
2259 self,
2260 ) -> crate::common::RegisterFieldBool<4, 1, 0, Dma5CtrlReg_SPEC, crate::common::RW> {
2261 crate::common::RegisterFieldBool::<4,1,0,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2262 }
2263
2264 #[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)"]
2265 #[inline(always)]
2266 pub fn dreq_mode(
2267 self,
2268 ) -> crate::common::RegisterFieldBool<3, 1, 0, Dma5CtrlReg_SPEC, crate::common::RW> {
2269 crate::common::RegisterFieldBool::<3,1,0,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2270 }
2271
2272 #[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"]
2273 #[inline(always)]
2274 pub fn bw(
2275 self,
2276 ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, Dma5CtrlReg_SPEC, crate::common::RW>
2277 {
2278 crate::common::RegisterField::<1,0x3,1,0,u8,u8,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2279 }
2280
2281 #[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.\nNote: If DMA_ON is disabled by SW while the DMA channel is active, it cannot be enabled again until the channel has completed the last on-going read-write cycle and has stopped. Thus, the SW has to check that the reading of DMAx_CTRL_REG.DMA_ON returns 0, before setting again the specific bit-field."]
2282 #[inline(always)]
2283 pub fn dma_on(
2284 self,
2285 ) -> crate::common::RegisterFieldBool<0, 1, 0, Dma5CtrlReg_SPEC, crate::common::RW> {
2286 crate::common::RegisterFieldBool::<0,1,0,Dma5CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2287 }
2288}
2289impl ::core::default::Default for Dma5CtrlReg {
2290 #[inline(always)]
2291 fn default() -> Dma5CtrlReg {
2292 <crate::RegValueT<Dma5CtrlReg_SPEC> as RegisterValue<_>>::new(32768)
2293 }
2294}
2295
2296#[doc(hidden)]
2297#[derive(Copy, Clone, Eq, PartialEq)]
2298pub struct Dma5IdxReg_SPEC;
2299impl crate::sealed::RegSpec for Dma5IdxReg_SPEC {
2300 type DataType = u32;
2301}
2302
2303#[doc = "Index value of DMA channel 5"]
2304pub type Dma5IdxReg = crate::RegValueT<Dma5IdxReg_SPEC>;
2305
2306impl Dma5IdxReg {
2307 #[doc = "This (read-only) register determines the data items already transferred by the DMA channel. Hence, if its value is 1, then the DMA channel has already copied one data item and it is currently performing the next copy. If its value is 2, then two items have already been copied and so on.\nWhen the transfer is completed (so when DMAx_CTRL_REG.DMA_ON has been cleared) and DMAx_CTRL_REG.CIRCULAR is not set, the register keeps its (last) value (which should be equal to DMAx_LEN_REG) and it is automatically reset to 0 upon starting a new transfer. In CIRCULAR mode, the register is automatically initialized to 0 as soon as the DMA channel starts-over again."]
2308 #[inline(always)]
2309 pub fn dma5_idx(
2310 self,
2311 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma5IdxReg_SPEC, crate::common::R>
2312 {
2313 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma5IdxReg_SPEC,crate::common::R>::from_register(self,0)
2314 }
2315}
2316impl ::core::default::Default for Dma5IdxReg {
2317 #[inline(always)]
2318 fn default() -> Dma5IdxReg {
2319 <crate::RegValueT<Dma5IdxReg_SPEC> as RegisterValue<_>>::new(0)
2320 }
2321}
2322
2323#[doc(hidden)]
2324#[derive(Copy, Clone, Eq, PartialEq)]
2325pub struct Dma5IntReg_SPEC;
2326impl crate::sealed::RegSpec for Dma5IntReg_SPEC {
2327 type DataType = u32;
2328}
2329
2330#[doc = "DMA receive interrupt register channel 5"]
2331pub type Dma5IntReg = crate::RegValueT<Dma5IntReg_SPEC>;
2332
2333impl Dma5IntReg {
2334 #[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."]
2335 #[inline(always)]
2336 pub fn dma5_int(
2337 self,
2338 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma5IntReg_SPEC, crate::common::RW>
2339 {
2340 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma5IntReg_SPEC,crate::common::RW>::from_register(self,0)
2341 }
2342}
2343impl ::core::default::Default for Dma5IntReg {
2344 #[inline(always)]
2345 fn default() -> Dma5IntReg {
2346 <crate::RegValueT<Dma5IntReg_SPEC> as RegisterValue<_>>::new(0)
2347 }
2348}
2349
2350#[doc(hidden)]
2351#[derive(Copy, Clone, Eq, PartialEq)]
2352pub struct Dma5LenReg_SPEC;
2353impl crate::sealed::RegSpec for Dma5LenReg_SPEC {
2354 type DataType = u32;
2355}
2356
2357#[doc = "DMA receive length register channel 5"]
2358pub type Dma5LenReg = crate::RegValueT<Dma5LenReg_SPEC>;
2359
2360impl Dma5LenReg {
2361 #[doc = "DMA channel\'s transfer length. DMAx_LEN of value 0, 1, 2, ... results into an actual transfer length of 1, 2, 3, ..."]
2362 #[inline(always)]
2363 pub fn dma5_len(
2364 self,
2365 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma5LenReg_SPEC, crate::common::RW>
2366 {
2367 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma5LenReg_SPEC,crate::common::RW>::from_register(self,0)
2368 }
2369}
2370impl ::core::default::Default for Dma5LenReg {
2371 #[inline(always)]
2372 fn default() -> Dma5LenReg {
2373 <crate::RegValueT<Dma5LenReg_SPEC> as RegisterValue<_>>::new(0)
2374 }
2375}
2376
2377#[doc(hidden)]
2378#[derive(Copy, Clone, Eq, PartialEq)]
2379pub struct Dma6AStartReg_SPEC;
2380impl crate::sealed::RegSpec for Dma6AStartReg_SPEC {
2381 type DataType = u32;
2382}
2383
2384#[doc = "Start address A of DMA channel 6"]
2385pub type Dma6AStartReg = crate::RegValueT<Dma6AStartReg_SPEC>;
2386
2387impl Dma6AStartReg {
2388 #[doc = "Source start address"]
2389 #[inline(always)]
2390 pub fn dma6_a_start(
2391 self,
2392 ) -> crate::common::RegisterField<
2393 0,
2394 0xffffffff,
2395 1,
2396 0,
2397 u32,
2398 u32,
2399 Dma6AStartReg_SPEC,
2400 crate::common::RW,
2401 > {
2402 crate::common::RegisterField::<
2403 0,
2404 0xffffffff,
2405 1,
2406 0,
2407 u32,
2408 u32,
2409 Dma6AStartReg_SPEC,
2410 crate::common::RW,
2411 >::from_register(self, 0)
2412 }
2413}
2414impl ::core::default::Default for Dma6AStartReg {
2415 #[inline(always)]
2416 fn default() -> Dma6AStartReg {
2417 <crate::RegValueT<Dma6AStartReg_SPEC> as RegisterValue<_>>::new(0)
2418 }
2419}
2420
2421#[doc(hidden)]
2422#[derive(Copy, Clone, Eq, PartialEq)]
2423pub struct Dma6BStartReg_SPEC;
2424impl crate::sealed::RegSpec for Dma6BStartReg_SPEC {
2425 type DataType = u32;
2426}
2427
2428#[doc = "Start address B of DMA channel 6"]
2429pub type Dma6BStartReg = crate::RegValueT<Dma6BStartReg_SPEC>;
2430
2431impl Dma6BStartReg {
2432 #[doc = "Destination start address"]
2433 #[inline(always)]
2434 pub fn dma6_b_start(
2435 self,
2436 ) -> crate::common::RegisterField<
2437 0,
2438 0xffffffff,
2439 1,
2440 0,
2441 u32,
2442 u32,
2443 Dma6BStartReg_SPEC,
2444 crate::common::RW,
2445 > {
2446 crate::common::RegisterField::<
2447 0,
2448 0xffffffff,
2449 1,
2450 0,
2451 u32,
2452 u32,
2453 Dma6BStartReg_SPEC,
2454 crate::common::RW,
2455 >::from_register(self, 0)
2456 }
2457}
2458impl ::core::default::Default for Dma6BStartReg {
2459 #[inline(always)]
2460 fn default() -> Dma6BStartReg {
2461 <crate::RegValueT<Dma6BStartReg_SPEC> as RegisterValue<_>>::new(0)
2462 }
2463}
2464
2465#[doc(hidden)]
2466#[derive(Copy, Clone, Eq, PartialEq)]
2467pub struct Dma6CtrlReg_SPEC;
2468impl crate::sealed::RegSpec for Dma6CtrlReg_SPEC {
2469 type DataType = u32;
2470}
2471
2472#[doc = "Control register for the DMA channel 6"]
2473pub type Dma6CtrlReg = crate::RegValueT<Dma6CtrlReg_SPEC>;
2474
2475impl Dma6CtrlReg {
2476 #[doc = "0 = Ignores bus error response from the AHB bus, so DMA continues normally.\n1 = Detects the bus response and tracks any bus error may occur during the transfer. If a bus error is detected, the channel completes the current read-write DMA cycle (either in burst or single transfers mode) and then closes the transfer, de-asserting DMA_ON bit automatically.\nIt is noted that the respective bus error detection status bit of DMA_INT_STATUS_REG is automatically cleared as soon as the channel is switched-on again, in order to perform a new transfer."]
2477 #[inline(always)]
2478 pub fn bus_error_detect(
2479 self,
2480 ) -> crate::common::RegisterFieldBool<15, 1, 0, Dma6CtrlReg_SPEC, crate::common::RW> {
2481 crate::common::RegisterFieldBool::<15,1,0,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2482 }
2483
2484 #[doc = "Enables the DMA read/write bursts, according to the following configuration:\n00 = Bursts are disabled\n01 = Bursts of 4 are enabled\n10 = Bursts of 8 are enabled\n11 = Reserved"]
2485 #[inline(always)]
2486 pub fn burst_mode(
2487 self,
2488 ) -> crate::common::RegisterField<13, 0x3, 1, 0, u8, u8, Dma6CtrlReg_SPEC, crate::common::RW>
2489 {
2490 crate::common::RegisterField::<13,0x3,1,0,u8,u8,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2491 }
2492
2493 #[doc = "0 = DMA operates with level-sensitive peripheral requests (default)\n1 = DMA operates with (positive) edge-sensitive peripheral requests"]
2494 #[inline(always)]
2495 pub fn req_sense(
2496 self,
2497 ) -> crate::common::RegisterFieldBool<12, 1, 0, Dma6CtrlReg_SPEC, crate::common::RW> {
2498 crate::common::RegisterFieldBool::<12,1,0,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2499 }
2500
2501 #[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\'."]
2502 #[inline(always)]
2503 pub fn dma_init(
2504 self,
2505 ) -> crate::common::RegisterFieldBool<11, 1, 0, Dma6CtrlReg_SPEC, crate::common::RW> {
2506 crate::common::RegisterFieldBool::<11,1,0,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2507 }
2508
2509 #[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."]
2510 #[inline(always)]
2511 pub fn dma_idle(
2512 self,
2513 ) -> crate::common::RegisterFieldBool<10, 1, 0, Dma6CtrlReg_SPEC, crate::common::RW> {
2514 crate::common::RegisterFieldBool::<10,1,0,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2515 }
2516
2517 #[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."]
2518 #[inline(always)]
2519 pub fn dma_prio(
2520 self,
2521 ) -> crate::common::RegisterField<7, 0x7, 1, 0, u8, u8, Dma6CtrlReg_SPEC, crate::common::RW>
2522 {
2523 crate::common::RegisterField::<7,0x7,1,0,u8,u8,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2524 }
2525
2526 #[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."]
2527 #[inline(always)]
2528 pub fn circular(
2529 self,
2530 ) -> crate::common::RegisterFieldBool<6, 1, 0, Dma6CtrlReg_SPEC, crate::common::RW> {
2531 crate::common::RegisterFieldBool::<6,1,0,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2532 }
2533
2534 #[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\")"]
2535 #[inline(always)]
2536 pub fn ainc(
2537 self,
2538 ) -> crate::common::RegisterFieldBool<5, 1, 0, Dma6CtrlReg_SPEC, crate::common::RW> {
2539 crate::common::RegisterFieldBool::<5,1,0,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2540 }
2541
2542 #[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\")"]
2543 #[inline(always)]
2544 pub fn binc(
2545 self,
2546 ) -> crate::common::RegisterFieldBool<4, 1, 0, Dma6CtrlReg_SPEC, crate::common::RW> {
2547 crate::common::RegisterFieldBool::<4,1,0,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2548 }
2549
2550 #[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)"]
2551 #[inline(always)]
2552 pub fn dreq_mode(
2553 self,
2554 ) -> crate::common::RegisterFieldBool<3, 1, 0, Dma6CtrlReg_SPEC, crate::common::RW> {
2555 crate::common::RegisterFieldBool::<3,1,0,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2556 }
2557
2558 #[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"]
2559 #[inline(always)]
2560 pub fn bw(
2561 self,
2562 ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, Dma6CtrlReg_SPEC, crate::common::RW>
2563 {
2564 crate::common::RegisterField::<1,0x3,1,0,u8,u8,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2565 }
2566
2567 #[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.\nNote: If DMA_ON is disabled by SW while the DMA channel is active, it cannot be enabled again until the channel has completed the last on-going read-write cycle and has stopped. Thus, the SW has to check that the reading of DMAx_CTRL_REG.DMA_ON returns 0, before setting again the specific bit-field."]
2568 #[inline(always)]
2569 pub fn dma_on(
2570 self,
2571 ) -> crate::common::RegisterFieldBool<0, 1, 0, Dma6CtrlReg_SPEC, crate::common::RW> {
2572 crate::common::RegisterFieldBool::<0,1,0,Dma6CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2573 }
2574}
2575impl ::core::default::Default for Dma6CtrlReg {
2576 #[inline(always)]
2577 fn default() -> Dma6CtrlReg {
2578 <crate::RegValueT<Dma6CtrlReg_SPEC> as RegisterValue<_>>::new(32768)
2579 }
2580}
2581
2582#[doc(hidden)]
2583#[derive(Copy, Clone, Eq, PartialEq)]
2584pub struct Dma6IdxReg_SPEC;
2585impl crate::sealed::RegSpec for Dma6IdxReg_SPEC {
2586 type DataType = u32;
2587}
2588
2589#[doc = "Index value of DMA channel 6"]
2590pub type Dma6IdxReg = crate::RegValueT<Dma6IdxReg_SPEC>;
2591
2592impl Dma6IdxReg {
2593 #[doc = "This (read-only) register determines the data items already transferred by the DMA channel. Hence, if its value is 1, then the DMA channel has already copied one data item and it is currently performing the next copy. If its value is 2, then two items have already been copied and so on.\nWhen the transfer is completed (so when DMAx_CTRL_REG.DMA_ON has been cleared) and DMAx_CTRL_REG.CIRCULAR is not set, the register keeps its (last) value (which should be equal to DMAx_LEN_REG) and it is automatically reset to 0 upon starting a new transfer. In CIRCULAR mode, the register is automatically initialized to 0 as soon as the DMA channel starts-over again."]
2594 #[inline(always)]
2595 pub fn dma6_idx(
2596 self,
2597 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma6IdxReg_SPEC, crate::common::R>
2598 {
2599 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma6IdxReg_SPEC,crate::common::R>::from_register(self,0)
2600 }
2601}
2602impl ::core::default::Default for Dma6IdxReg {
2603 #[inline(always)]
2604 fn default() -> Dma6IdxReg {
2605 <crate::RegValueT<Dma6IdxReg_SPEC> as RegisterValue<_>>::new(0)
2606 }
2607}
2608
2609#[doc(hidden)]
2610#[derive(Copy, Clone, Eq, PartialEq)]
2611pub struct Dma6IntReg_SPEC;
2612impl crate::sealed::RegSpec for Dma6IntReg_SPEC {
2613 type DataType = u32;
2614}
2615
2616#[doc = "DMA receive interrupt register channel 6"]
2617pub type Dma6IntReg = crate::RegValueT<Dma6IntReg_SPEC>;
2618
2619impl Dma6IntReg {
2620 #[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."]
2621 #[inline(always)]
2622 pub fn dma6_int(
2623 self,
2624 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma6IntReg_SPEC, crate::common::RW>
2625 {
2626 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma6IntReg_SPEC,crate::common::RW>::from_register(self,0)
2627 }
2628}
2629impl ::core::default::Default for Dma6IntReg {
2630 #[inline(always)]
2631 fn default() -> Dma6IntReg {
2632 <crate::RegValueT<Dma6IntReg_SPEC> as RegisterValue<_>>::new(0)
2633 }
2634}
2635
2636#[doc(hidden)]
2637#[derive(Copy, Clone, Eq, PartialEq)]
2638pub struct Dma6LenReg_SPEC;
2639impl crate::sealed::RegSpec for Dma6LenReg_SPEC {
2640 type DataType = u32;
2641}
2642
2643#[doc = "DMA receive length register channel 6"]
2644pub type Dma6LenReg = crate::RegValueT<Dma6LenReg_SPEC>;
2645
2646impl Dma6LenReg {
2647 #[doc = "DMA channel\'s transfer length. DMAx_LEN of value 0, 1, 2, ... results into an actual transfer length of 1, 2, 3, ..."]
2648 #[inline(always)]
2649 pub fn dma6_len(
2650 self,
2651 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma6LenReg_SPEC, crate::common::RW>
2652 {
2653 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma6LenReg_SPEC,crate::common::RW>::from_register(self,0)
2654 }
2655}
2656impl ::core::default::Default for Dma6LenReg {
2657 #[inline(always)]
2658 fn default() -> Dma6LenReg {
2659 <crate::RegValueT<Dma6LenReg_SPEC> as RegisterValue<_>>::new(0)
2660 }
2661}
2662
2663#[doc(hidden)]
2664#[derive(Copy, Clone, Eq, PartialEq)]
2665pub struct Dma7AStartReg_SPEC;
2666impl crate::sealed::RegSpec for Dma7AStartReg_SPEC {
2667 type DataType = u32;
2668}
2669
2670#[doc = "Start address A of DMA channel 7"]
2671pub type Dma7AStartReg = crate::RegValueT<Dma7AStartReg_SPEC>;
2672
2673impl Dma7AStartReg {
2674 #[doc = "Source start address\nNOTE: See also the DMA chapter of the Datasheet for the allowed range of the DMA7 channel\'s source address in Secure Boot mode."]
2675 #[inline(always)]
2676 pub fn dma7_a_start(
2677 self,
2678 ) -> crate::common::RegisterField<
2679 0,
2680 0xffffffff,
2681 1,
2682 0,
2683 u32,
2684 u32,
2685 Dma7AStartReg_SPEC,
2686 crate::common::RW,
2687 > {
2688 crate::common::RegisterField::<
2689 0,
2690 0xffffffff,
2691 1,
2692 0,
2693 u32,
2694 u32,
2695 Dma7AStartReg_SPEC,
2696 crate::common::RW,
2697 >::from_register(self, 0)
2698 }
2699}
2700impl ::core::default::Default for Dma7AStartReg {
2701 #[inline(always)]
2702 fn default() -> Dma7AStartReg {
2703 <crate::RegValueT<Dma7AStartReg_SPEC> as RegisterValue<_>>::new(0)
2704 }
2705}
2706
2707#[doc(hidden)]
2708#[derive(Copy, Clone, Eq, PartialEq)]
2709pub struct Dma7BStartReg_SPEC;
2710impl crate::sealed::RegSpec for Dma7BStartReg_SPEC {
2711 type DataType = u32;
2712}
2713
2714#[doc = "Start address B of DMA channel 7"]
2715pub type Dma7BStartReg = crate::RegValueT<Dma7BStartReg_SPEC>;
2716
2717impl Dma7BStartReg {
2718 #[doc = "Destination start address\nNOTE: See also the DMA chapter of the Datasheet for the allowed range of the DMA7 channel\'s destination address in Secure Boot mode."]
2719 #[inline(always)]
2720 pub fn dma7_b_start(
2721 self,
2722 ) -> crate::common::RegisterField<
2723 0,
2724 0xffffffff,
2725 1,
2726 0,
2727 u32,
2728 u32,
2729 Dma7BStartReg_SPEC,
2730 crate::common::RW,
2731 > {
2732 crate::common::RegisterField::<
2733 0,
2734 0xffffffff,
2735 1,
2736 0,
2737 u32,
2738 u32,
2739 Dma7BStartReg_SPEC,
2740 crate::common::RW,
2741 >::from_register(self, 0)
2742 }
2743}
2744impl ::core::default::Default for Dma7BStartReg {
2745 #[inline(always)]
2746 fn default() -> Dma7BStartReg {
2747 <crate::RegValueT<Dma7BStartReg_SPEC> as RegisterValue<_>>::new(0)
2748 }
2749}
2750
2751#[doc(hidden)]
2752#[derive(Copy, Clone, Eq, PartialEq)]
2753pub struct Dma7CtrlReg_SPEC;
2754impl crate::sealed::RegSpec for Dma7CtrlReg_SPEC {
2755 type DataType = u32;
2756}
2757
2758#[doc = "Control register for the DMA channel 7"]
2759pub type Dma7CtrlReg = crate::RegValueT<Dma7CtrlReg_SPEC>;
2760
2761impl Dma7CtrlReg {
2762 #[doc = "0 = Ignores bus error response from the AHB bus, so DMA continues normally.\n1 = Detects the bus response and tracks any bus error may occur during the transfer. If a bus error is detected, the channel completes the current read-write DMA cycle (either in burst or single transfers mode) and then closes the transfer, de-asserting DMA_ON bit automatically. It is noted that the respective bus error detection status bit of DMA_INT_STATUS_REG is automatically cleared as soon as the channel is switched-on again, in order to perform a new transfer.\nNOTE: In secure boot mode, the bus error detection mode of DMA7 channel is always enabled, overruling the specific bit-field\'s programmed value."]
2763 #[inline(always)]
2764 pub fn bus_error_detect(
2765 self,
2766 ) -> crate::common::RegisterFieldBool<15, 1, 0, Dma7CtrlReg_SPEC, crate::common::RW> {
2767 crate::common::RegisterFieldBool::<15,1,0,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2768 }
2769
2770 #[doc = "Enables the DMA read/write bursts, according to the following configuration:\n00 = Bursts are disabled\n01 = Bursts of 4 are enabled\n10 = Bursts of 8 are enabled\n11 = Reserved"]
2771 #[inline(always)]
2772 pub fn burst_mode(
2773 self,
2774 ) -> crate::common::RegisterField<13, 0x3, 1, 0, u8, u8, Dma7CtrlReg_SPEC, crate::common::RW>
2775 {
2776 crate::common::RegisterField::<13,0x3,1,0,u8,u8,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2777 }
2778
2779 #[doc = "0 = DMA operates with level-sensitive peripheral requests (default)\n1 = DMA operates with (positive) edge-sensitive peripheral requests"]
2780 #[inline(always)]
2781 pub fn req_sense(
2782 self,
2783 ) -> crate::common::RegisterFieldBool<12, 1, 0, Dma7CtrlReg_SPEC, crate::common::RW> {
2784 crate::common::RegisterFieldBool::<12,1,0,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2785 }
2786
2787 #[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)."]
2788 #[inline(always)]
2789 pub fn dma_init(
2790 self,
2791 ) -> crate::common::RegisterFieldBool<11, 1, 0, Dma7CtrlReg_SPEC, crate::common::RW> {
2792 crate::common::RegisterFieldBool::<11,1,0,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2793 }
2794
2795 #[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)."]
2796 #[inline(always)]
2797 pub fn dma_idle(
2798 self,
2799 ) -> crate::common::RegisterFieldBool<10, 1, 0, Dma7CtrlReg_SPEC, crate::common::RW> {
2800 crate::common::RegisterFieldBool::<10,1,0,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2801 }
2802
2803 #[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."]
2804 #[inline(always)]
2805 pub fn dma_prio(
2806 self,
2807 ) -> crate::common::RegisterField<7, 0x7, 1, 0, u8, u8, Dma7CtrlReg_SPEC, crate::common::RW>
2808 {
2809 crate::common::RegisterField::<7,0x7,1,0,u8,u8,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2810 }
2811
2812 #[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."]
2813 #[inline(always)]
2814 pub fn circular(
2815 self,
2816 ) -> crate::common::RegisterFieldBool<6, 1, 0, Dma7CtrlReg_SPEC, crate::common::RW> {
2817 crate::common::RegisterFieldBool::<6,1,0,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2818 }
2819
2820 #[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\")"]
2821 #[inline(always)]
2822 pub fn ainc(
2823 self,
2824 ) -> crate::common::RegisterFieldBool<5, 1, 0, Dma7CtrlReg_SPEC, crate::common::RW> {
2825 crate::common::RegisterFieldBool::<5,1,0,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2826 }
2827
2828 #[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\")"]
2829 #[inline(always)]
2830 pub fn binc(
2831 self,
2832 ) -> crate::common::RegisterFieldBool<4, 1, 0, Dma7CtrlReg_SPEC, crate::common::RW> {
2833 crate::common::RegisterFieldBool::<4,1,0,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2834 }
2835
2836 #[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)."]
2837 #[inline(always)]
2838 pub fn dreq_mode(
2839 self,
2840 ) -> crate::common::RegisterFieldBool<3, 1, 0, Dma7CtrlReg_SPEC, crate::common::RW> {
2841 crate::common::RegisterFieldBool::<3,1,0,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2842 }
2843
2844 #[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)."]
2845 #[inline(always)]
2846 pub fn bw(
2847 self,
2848 ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, Dma7CtrlReg_SPEC, crate::common::RW>
2849 {
2850 crate::common::RegisterField::<1,0x3,1,0,u8,u8,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2851 }
2852
2853 #[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.\nNote: If DMA_ON is disabled by SW while the DMA channel is active, it cannot be enabled again until the channel has completed the last on-going read-write cycle and has stopped. Thus, the SW has to check that the reading of DMAx_CTRL_REG.DMA_ON returns 0, before setting again the specific bit-field."]
2854 #[inline(always)]
2855 pub fn dma_on(
2856 self,
2857 ) -> crate::common::RegisterFieldBool<0, 1, 0, Dma7CtrlReg_SPEC, crate::common::RW> {
2858 crate::common::RegisterFieldBool::<0,1,0,Dma7CtrlReg_SPEC,crate::common::RW>::from_register(self,0)
2859 }
2860}
2861impl ::core::default::Default for Dma7CtrlReg {
2862 #[inline(always)]
2863 fn default() -> Dma7CtrlReg {
2864 <crate::RegValueT<Dma7CtrlReg_SPEC> as RegisterValue<_>>::new(32768)
2865 }
2866}
2867
2868#[doc(hidden)]
2869#[derive(Copy, Clone, Eq, PartialEq)]
2870pub struct Dma7IdxReg_SPEC;
2871impl crate::sealed::RegSpec for Dma7IdxReg_SPEC {
2872 type DataType = u32;
2873}
2874
2875#[doc = "Index value of DMA channel 7"]
2876pub type Dma7IdxReg = crate::RegValueT<Dma7IdxReg_SPEC>;
2877
2878impl Dma7IdxReg {
2879 #[doc = "This (read-only) register determines the data items already transferred by the DMA channel. Hence, if its value is 1, then the DMA channel has already copied one data item and it is currently performing the next copy. If its value is 2, then two items have already been copied and so on.\nWhen the transfer is completed (so when DMAx_CTRL_REG.DMA_ON has been cleared) and DMAx_CTRL_REG.CIRCULAR is not set, the register keeps its (last) value (which should be equal to DMAx_LEN_REG) and it is automatically reset to 0 upon starting a new transfer. In CIRCULAR mode, the register is automatically initialized to 0 as soon as the DMA channel starts-over again."]
2880 #[inline(always)]
2881 pub fn dma7_idx(
2882 self,
2883 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma7IdxReg_SPEC, crate::common::R>
2884 {
2885 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma7IdxReg_SPEC,crate::common::R>::from_register(self,0)
2886 }
2887}
2888impl ::core::default::Default for Dma7IdxReg {
2889 #[inline(always)]
2890 fn default() -> Dma7IdxReg {
2891 <crate::RegValueT<Dma7IdxReg_SPEC> as RegisterValue<_>>::new(0)
2892 }
2893}
2894
2895#[doc(hidden)]
2896#[derive(Copy, Clone, Eq, PartialEq)]
2897pub struct Dma7IntReg_SPEC;
2898impl crate::sealed::RegSpec for Dma7IntReg_SPEC {
2899 type DataType = u32;
2900}
2901
2902#[doc = "DMA receive interrupt register channel 7"]
2903pub type Dma7IntReg = crate::RegValueT<Dma7IntReg_SPEC>;
2904
2905impl Dma7IntReg {
2906 #[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."]
2907 #[inline(always)]
2908 pub fn dma7_int(
2909 self,
2910 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma7IntReg_SPEC, crate::common::RW>
2911 {
2912 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma7IntReg_SPEC,crate::common::RW>::from_register(self,0)
2913 }
2914}
2915impl ::core::default::Default for Dma7IntReg {
2916 #[inline(always)]
2917 fn default() -> Dma7IntReg {
2918 <crate::RegValueT<Dma7IntReg_SPEC> as RegisterValue<_>>::new(0)
2919 }
2920}
2921
2922#[doc(hidden)]
2923#[derive(Copy, Clone, Eq, PartialEq)]
2924pub struct Dma7LenReg_SPEC;
2925impl crate::sealed::RegSpec for Dma7LenReg_SPEC {
2926 type DataType = u32;
2927}
2928
2929#[doc = "DMA receive length register channel 7"]
2930pub type Dma7LenReg = crate::RegValueT<Dma7LenReg_SPEC>;
2931
2932impl Dma7LenReg {
2933 #[doc = "DMA channel\'s transfer length. DMAx_LEN of value 0, 1, 2, ... results into an actual transfer length of 1, 2, 3, ..."]
2934 #[inline(always)]
2935 pub fn dma7_len(
2936 self,
2937 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Dma7LenReg_SPEC, crate::common::RW>
2938 {
2939 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Dma7LenReg_SPEC,crate::common::RW>::from_register(self,0)
2940 }
2941}
2942impl ::core::default::Default for Dma7LenReg {
2943 #[inline(always)]
2944 fn default() -> Dma7LenReg {
2945 <crate::RegValueT<Dma7LenReg_SPEC> as RegisterValue<_>>::new(0)
2946 }
2947}
2948
2949#[doc(hidden)]
2950#[derive(Copy, Clone, Eq, PartialEq)]
2951pub struct DmaClearIntReg_SPEC;
2952impl crate::sealed::RegSpec for DmaClearIntReg_SPEC {
2953 type DataType = u32;
2954}
2955
2956#[doc = "DMA clear interrupt register"]
2957pub type DmaClearIntReg = crate::RegValueT<DmaClearIntReg_SPEC>;
2958
2959impl DmaClearIntReg {
2960 #[doc = "Writing a 1 will reset the status bit of DMA_INT_STATUS_REG for channel 7 ; writing a 0 will have no effect"]
2961 #[inline(always)]
2962 pub fn dma_rst_irq_ch7(
2963 self,
2964 ) -> crate::common::RegisterFieldBool<7, 1, 0, DmaClearIntReg_SPEC, crate::common::W> {
2965 crate::common::RegisterFieldBool::<7,1,0,DmaClearIntReg_SPEC,crate::common::W>::from_register(self,0)
2966 }
2967
2968 #[doc = "Writing a 1 will reset the status bit of DMA_INT_STATUS_REG for channel 6 ; writing a 0 will have no effect"]
2969 #[inline(always)]
2970 pub fn dma_rst_irq_ch6(
2971 self,
2972 ) -> crate::common::RegisterFieldBool<6, 1, 0, DmaClearIntReg_SPEC, crate::common::W> {
2973 crate::common::RegisterFieldBool::<6,1,0,DmaClearIntReg_SPEC,crate::common::W>::from_register(self,0)
2974 }
2975
2976 #[doc = "Writing a 1 will reset the status bit of DMA_INT_STATUS_REG for channel 5 ; writing a 0 will have no effect"]
2977 #[inline(always)]
2978 pub fn dma_rst_irq_ch5(
2979 self,
2980 ) -> crate::common::RegisterFieldBool<5, 1, 0, DmaClearIntReg_SPEC, crate::common::W> {
2981 crate::common::RegisterFieldBool::<5,1,0,DmaClearIntReg_SPEC,crate::common::W>::from_register(self,0)
2982 }
2983
2984 #[doc = "Writing a 1 will reset the status bit of DMA_INT_STATUS_REG for channel 4 ; writing a 0 will have no effect"]
2985 #[inline(always)]
2986 pub fn dma_rst_irq_ch4(
2987 self,
2988 ) -> crate::common::RegisterFieldBool<4, 1, 0, DmaClearIntReg_SPEC, crate::common::W> {
2989 crate::common::RegisterFieldBool::<4,1,0,DmaClearIntReg_SPEC,crate::common::W>::from_register(self,0)
2990 }
2991
2992 #[doc = "Writing a 1 will reset the status bit of DMA_INT_STATUS_REG for channel 3 ; writing a 0 will have no effect"]
2993 #[inline(always)]
2994 pub fn dma_rst_irq_ch3(
2995 self,
2996 ) -> crate::common::RegisterFieldBool<3, 1, 0, DmaClearIntReg_SPEC, crate::common::W> {
2997 crate::common::RegisterFieldBool::<3,1,0,DmaClearIntReg_SPEC,crate::common::W>::from_register(self,0)
2998 }
2999
3000 #[doc = "Writing a 1 will reset the status bit of DMA_INT_STATUS_REG for channel 2 ; writing a 0 will have no effect"]
3001 #[inline(always)]
3002 pub fn dma_rst_irq_ch2(
3003 self,
3004 ) -> crate::common::RegisterFieldBool<2, 1, 0, DmaClearIntReg_SPEC, crate::common::W> {
3005 crate::common::RegisterFieldBool::<2,1,0,DmaClearIntReg_SPEC,crate::common::W>::from_register(self,0)
3006 }
3007
3008 #[doc = "Writing a 1 will reset the status bit of DMA_INT_STATUS_REG for channel 1 ; writing a 0 will have no effect"]
3009 #[inline(always)]
3010 pub fn dma_rst_irq_ch1(
3011 self,
3012 ) -> crate::common::RegisterFieldBool<1, 1, 0, DmaClearIntReg_SPEC, crate::common::W> {
3013 crate::common::RegisterFieldBool::<1,1,0,DmaClearIntReg_SPEC,crate::common::W>::from_register(self,0)
3014 }
3015
3016 #[doc = "Writing a 1 will reset the status bit of DMA_INT_STATUS_REG for channel 0 ; writing a 0 will have no effect"]
3017 #[inline(always)]
3018 pub fn dma_rst_irq_ch0(
3019 self,
3020 ) -> crate::common::RegisterFieldBool<0, 1, 0, DmaClearIntReg_SPEC, crate::common::W> {
3021 crate::common::RegisterFieldBool::<0,1,0,DmaClearIntReg_SPEC,crate::common::W>::from_register(self,0)
3022 }
3023}
3024impl ::core::default::Default for DmaClearIntReg {
3025 #[inline(always)]
3026 fn default() -> DmaClearIntReg {
3027 <crate::RegValueT<DmaClearIntReg_SPEC> as RegisterValue<_>>::new(0)
3028 }
3029}
3030
3031#[doc(hidden)]
3032#[derive(Copy, Clone, Eq, PartialEq)]
3033pub struct DmaIntMaskReg_SPEC;
3034impl crate::sealed::RegSpec for DmaIntMaskReg_SPEC {
3035 type DataType = u32;
3036}
3037
3038#[doc = "DMA Interrupt mask register"]
3039pub type DmaIntMaskReg = crate::RegValueT<DmaIntMaskReg_SPEC>;
3040
3041impl DmaIntMaskReg {
3042 #[doc = "0 = disable interrupts on channel 7\n1 = enable interrupts on channel 7"]
3043 #[inline(always)]
3044 pub fn dma_irq_enable7(
3045 self,
3046 ) -> crate::common::RegisterFieldBool<7, 1, 0, DmaIntMaskReg_SPEC, crate::common::RW> {
3047 crate::common::RegisterFieldBool::<7,1,0,DmaIntMaskReg_SPEC,crate::common::RW>::from_register(self,0)
3048 }
3049
3050 #[doc = "0 = disable interrupts on channel 6\n1 = enable interrupts on channel 6"]
3051 #[inline(always)]
3052 pub fn dma_irq_enable6(
3053 self,
3054 ) -> crate::common::RegisterFieldBool<6, 1, 0, DmaIntMaskReg_SPEC, crate::common::RW> {
3055 crate::common::RegisterFieldBool::<6,1,0,DmaIntMaskReg_SPEC,crate::common::RW>::from_register(self,0)
3056 }
3057
3058 #[doc = "0 = disable interrupts on channel 5\n1 = enable interrupts on channel 5"]
3059 #[inline(always)]
3060 pub fn dma_irq_enable5(
3061 self,
3062 ) -> crate::common::RegisterFieldBool<5, 1, 0, DmaIntMaskReg_SPEC, crate::common::RW> {
3063 crate::common::RegisterFieldBool::<5,1,0,DmaIntMaskReg_SPEC,crate::common::RW>::from_register(self,0)
3064 }
3065
3066 #[doc = "0 = disable interrupts on channel 4\n1 = enable interrupts on channel 4"]
3067 #[inline(always)]
3068 pub fn dma_irq_enable4(
3069 self,
3070 ) -> crate::common::RegisterFieldBool<4, 1, 0, DmaIntMaskReg_SPEC, crate::common::RW> {
3071 crate::common::RegisterFieldBool::<4,1,0,DmaIntMaskReg_SPEC,crate::common::RW>::from_register(self,0)
3072 }
3073
3074 #[doc = "0 = disable interrupts on channel 3\n1 = enable interrupts on channel 3"]
3075 #[inline(always)]
3076 pub fn dma_irq_enable3(
3077 self,
3078 ) -> crate::common::RegisterFieldBool<3, 1, 0, DmaIntMaskReg_SPEC, crate::common::RW> {
3079 crate::common::RegisterFieldBool::<3,1,0,DmaIntMaskReg_SPEC,crate::common::RW>::from_register(self,0)
3080 }
3081
3082 #[doc = "0 = disable interrupts on channel 2\n1 = enable interrupts on channel 2"]
3083 #[inline(always)]
3084 pub fn dma_irq_enable2(
3085 self,
3086 ) -> crate::common::RegisterFieldBool<2, 1, 0, DmaIntMaskReg_SPEC, crate::common::RW> {
3087 crate::common::RegisterFieldBool::<2,1,0,DmaIntMaskReg_SPEC,crate::common::RW>::from_register(self,0)
3088 }
3089
3090 #[doc = "0 = disable interrupts on channel 1\n1 = enable interrupts on channel 1"]
3091 #[inline(always)]
3092 pub fn dma_irq_enable1(
3093 self,
3094 ) -> crate::common::RegisterFieldBool<1, 1, 0, DmaIntMaskReg_SPEC, crate::common::RW> {
3095 crate::common::RegisterFieldBool::<1,1,0,DmaIntMaskReg_SPEC,crate::common::RW>::from_register(self,0)
3096 }
3097
3098 #[doc = "0 = disable interrupts on channel 0\n1 = enable interrupts on channel 0"]
3099 #[inline(always)]
3100 pub fn dma_irq_enable0(
3101 self,
3102 ) -> crate::common::RegisterFieldBool<0, 1, 0, DmaIntMaskReg_SPEC, crate::common::RW> {
3103 crate::common::RegisterFieldBool::<0,1,0,DmaIntMaskReg_SPEC,crate::common::RW>::from_register(self,0)
3104 }
3105}
3106impl ::core::default::Default for DmaIntMaskReg {
3107 #[inline(always)]
3108 fn default() -> DmaIntMaskReg {
3109 <crate::RegValueT<DmaIntMaskReg_SPEC> as RegisterValue<_>>::new(0)
3110 }
3111}
3112
3113#[doc(hidden)]
3114#[derive(Copy, Clone, Eq, PartialEq)]
3115pub struct DmaIntStatusReg_SPEC;
3116impl crate::sealed::RegSpec for DmaIntStatusReg_SPEC {
3117 type DataType = u32;
3118}
3119
3120#[doc = "DMA interrupt status register"]
3121pub type DmaIntStatusReg = crate::RegValueT<DmaIntStatusReg_SPEC>;
3122
3123impl DmaIntStatusReg {
3124 #[doc = "0 = No bus error response is detected for channel 7\n1 = Bus error response detected for channel 7\nNOTE: This bit-field is auto-clear and it is initialized to \'0\' as soon as a new transfer is started.It is also noted that when the specific channel becomes secure (so when either of the PROT_AES_KEY_READ and PROT_QSPI_KEY_READ bits of SECURE_BOOT_REG is set), this bit-field is overruled to \'0\', masking the bus error status reporting to the user."]
3125 #[inline(always)]
3126 pub fn dma_bus_err7(
3127 self,
3128 ) -> crate::common::RegisterFieldBool<15, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3129 crate::common::RegisterFieldBool::<15,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3130 }
3131
3132 #[doc = "0 = No bus error response is detected for channel 6\n1 = Bus error response detected for channel 6\nNOTE: This bit-field is auto-clear and it is initialized to \'0\' as soon as a new transfer is started."]
3133 #[inline(always)]
3134 pub fn dma_bus_err6(
3135 self,
3136 ) -> crate::common::RegisterFieldBool<14, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3137 crate::common::RegisterFieldBool::<14,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3138 }
3139
3140 #[doc = "0 = No bus error response is detected for channel 5\n1 = Bus error response detected for channel 5\nNOTE: This bit-field is auto-clear and it is initialized to \'0\' as soon as a new transfer is started."]
3141 #[inline(always)]
3142 pub fn dma_bus_err5(
3143 self,
3144 ) -> crate::common::RegisterFieldBool<13, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3145 crate::common::RegisterFieldBool::<13,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3146 }
3147
3148 #[doc = "0 = No bus error response is detected for channel 4\n1 = Bus error response detected for channel 4\nNOTE: This bit-field is auto-clear and it is initialized to \'0\' as soon as a new transfer is started."]
3149 #[inline(always)]
3150 pub fn dma_bus_err4(
3151 self,
3152 ) -> crate::common::RegisterFieldBool<12, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3153 crate::common::RegisterFieldBool::<12,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3154 }
3155
3156 #[doc = "0 = No bus error response is detected for channel 3\n1 = Bus error response detected for channel 3\nNOTE: This bit-field is auto-clear and it is initialized to \'0\' as soon as a new transfer is started."]
3157 #[inline(always)]
3158 pub fn dma_bus_err3(
3159 self,
3160 ) -> crate::common::RegisterFieldBool<11, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3161 crate::common::RegisterFieldBool::<11,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3162 }
3163
3164 #[doc = "0 = No bus error response is detected for channel 2\n1 = Bus error response detected for channel 2\nNOTE: This bit-field is auto-clear and it is initialized to \'0\' as soon as a new transfer is started."]
3165 #[inline(always)]
3166 pub fn dma_bus_err2(
3167 self,
3168 ) -> crate::common::RegisterFieldBool<10, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3169 crate::common::RegisterFieldBool::<10,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3170 }
3171
3172 #[doc = "0 = No bus error response is detected for channel 1\n1 = Bus error response detected for channel 1\nNOTE: This bit-field is auto-clear and it is initialized to \'0\' as soon as a new transfer is started."]
3173 #[inline(always)]
3174 pub fn dma_bus_err1(
3175 self,
3176 ) -> crate::common::RegisterFieldBool<9, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3177 crate::common::RegisterFieldBool::<9,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3178 }
3179
3180 #[doc = "0 = No bus error response is detected for channel 0\n1 = Bus error response detected for channel 0\nNOTE: This bit-field is auto-clear and it is initialized to \'0\' as soon as a new transfer is started."]
3181 #[inline(always)]
3182 pub fn dma_bus_err0(
3183 self,
3184 ) -> crate::common::RegisterFieldBool<8, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3185 crate::common::RegisterFieldBool::<8,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3186 }
3187
3188 #[doc = "0 = IRQ on channel 7 is not set\n1 = IRQ on channel 7 is set"]
3189 #[inline(always)]
3190 pub fn dma_irq_ch7(
3191 self,
3192 ) -> crate::common::RegisterFieldBool<7, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3193 crate::common::RegisterFieldBool::<7,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3194 }
3195
3196 #[doc = "0 = IRQ on channel 6 is not set\n1 = IRQ on channel 6 is set"]
3197 #[inline(always)]
3198 pub fn dma_irq_ch6(
3199 self,
3200 ) -> crate::common::RegisterFieldBool<6, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3201 crate::common::RegisterFieldBool::<6,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3202 }
3203
3204 #[doc = "0 = IRQ on channel 5 is not set\n1 = IRQ on channel 5 is set"]
3205 #[inline(always)]
3206 pub fn dma_irq_ch5(
3207 self,
3208 ) -> crate::common::RegisterFieldBool<5, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3209 crate::common::RegisterFieldBool::<5,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3210 }
3211
3212 #[doc = "0 = IRQ on channel 4 is not set\n1 = IRQ on channel 4 is set"]
3213 #[inline(always)]
3214 pub fn dma_irq_ch4(
3215 self,
3216 ) -> crate::common::RegisterFieldBool<4, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3217 crate::common::RegisterFieldBool::<4,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3218 }
3219
3220 #[doc = "0 = IRQ on channel 3 is not set\n1 = IRQ on channel 3 is set"]
3221 #[inline(always)]
3222 pub fn dma_irq_ch3(
3223 self,
3224 ) -> crate::common::RegisterFieldBool<3, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3225 crate::common::RegisterFieldBool::<3,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3226 }
3227
3228 #[doc = "0 = IRQ on channel 2 is not set\n1 = IRQ on channel 2 is set"]
3229 #[inline(always)]
3230 pub fn dma_irq_ch2(
3231 self,
3232 ) -> crate::common::RegisterFieldBool<2, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3233 crate::common::RegisterFieldBool::<2,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3234 }
3235
3236 #[doc = "0 = IRQ on channel 1 is not set\n1 = IRQ on channel 1 is set"]
3237 #[inline(always)]
3238 pub fn dma_irq_ch1(
3239 self,
3240 ) -> crate::common::RegisterFieldBool<1, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3241 crate::common::RegisterFieldBool::<1,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3242 }
3243
3244 #[doc = "0 = IRQ on channel 0 is not set\n1 = IRQ on channel 0 is set"]
3245 #[inline(always)]
3246 pub fn dma_irq_ch0(
3247 self,
3248 ) -> crate::common::RegisterFieldBool<0, 1, 0, DmaIntStatusReg_SPEC, crate::common::R> {
3249 crate::common::RegisterFieldBool::<0,1,0,DmaIntStatusReg_SPEC,crate::common::R>::from_register(self,0)
3250 }
3251}
3252impl ::core::default::Default for DmaIntStatusReg {
3253 #[inline(always)]
3254 fn default() -> DmaIntStatusReg {
3255 <crate::RegValueT<DmaIntStatusReg_SPEC> as RegisterValue<_>>::new(0)
3256 }
3257}
3258
3259#[doc(hidden)]
3260#[derive(Copy, Clone, Eq, PartialEq)]
3261pub struct DmaReqMuxReg_SPEC;
3262impl crate::sealed::RegSpec for DmaReqMuxReg_SPEC {
3263 type DataType = u32;
3264}
3265
3266#[doc = "DMA channel assignments"]
3267pub type DmaReqMuxReg = crate::RegValueT<DmaReqMuxReg_SPEC>;
3268
3269impl DmaReqMuxReg {
3270 #[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."]
3271 #[inline(always)]
3272 pub fn dma67_sel(
3273 self,
3274 ) -> crate::common::RegisterField<12, 0xf, 1, 0, u8, u8, DmaReqMuxReg_SPEC, crate::common::RW>
3275 {
3276 crate::common::RegisterField::<12,0xf,1,0,u8,u8,DmaReqMuxReg_SPEC,crate::common::RW>::from_register(self,0)
3277 }
3278
3279 #[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."]
3280 #[inline(always)]
3281 pub fn dma45_sel(
3282 self,
3283 ) -> crate::common::RegisterField<8, 0xf, 1, 0, u8, u8, DmaReqMuxReg_SPEC, crate::common::RW>
3284 {
3285 crate::common::RegisterField::<8,0xf,1,0,u8,u8,DmaReqMuxReg_SPEC,crate::common::RW>::from_register(self,0)
3286 }
3287
3288 #[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."]
3289 #[inline(always)]
3290 pub fn dma23_sel(
3291 self,
3292 ) -> crate::common::RegisterField<4, 0xf, 1, 0, u8, u8, DmaReqMuxReg_SPEC, crate::common::RW>
3293 {
3294 crate::common::RegisterField::<4,0xf,1,0,u8,u8,DmaReqMuxReg_SPEC,crate::common::RW>::from_register(self,0)
3295 }
3296
3297 #[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: UART3_rx/UART3_tx\n0x8: PCM_rx / PCM_tx\n0x9: SRC_out / SRC_in (for all the supported conversions)\n0xA: Reserved\n0xB: Reserved\n0xC: GP_ADC / -\n0xD: SD_ADC / -\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 signal driven to the selected peripheral. Hence, if DMA01_SEL = DMA23_SEL, the channels 0 and 1 will provide the Rx and Tx DMA acknowledge signals for the selected peripheral. Consequently, it is suggested to assign the intended peripheral value to a unique selector field."]
3298 #[inline(always)]
3299 pub fn dma01_sel(
3300 self,
3301 ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, DmaReqMuxReg_SPEC, crate::common::RW>
3302 {
3303 crate::common::RegisterField::<0,0xf,1,0,u8,u8,DmaReqMuxReg_SPEC,crate::common::RW>::from_register(self,0)
3304 }
3305}
3306impl ::core::default::Default for DmaReqMuxReg {
3307 #[inline(always)]
3308 fn default() -> DmaReqMuxReg {
3309 <crate::RegValueT<DmaReqMuxReg_SPEC> as RegisterValue<_>>::new(65535)
3310 }
3311}