1#[doc = "Register `CTRL` reader"]
2pub struct R(crate::R<CTRL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<CTRL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<CTRL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<CTRL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `CTRL` writer"]
17pub struct W(crate::W<CTRL_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<CTRL_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<CTRL_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<CTRL_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `STRUCTTYPE` reader - DMA Structure Type"]
38pub type STRUCTTYPE_R = crate::FieldReader<u8, STRUCTTYPE_A>;
39#[doc = "DMA Structure Type\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41#[repr(u8)]
42pub enum STRUCTTYPE_A {
43 #[doc = "0: DMA transfer structure type selected."]
44 TRANSFER = 0,
45 #[doc = "1: Synchronization structure type selected."]
46 SYNCHRONIZE = 1,
47 #[doc = "2: Write immediate value structure type selected."]
48 WRITE = 2,
49}
50impl From<STRUCTTYPE_A> for u8 {
51 #[inline(always)]
52 fn from(variant: STRUCTTYPE_A) -> Self {
53 variant as _
54 }
55}
56impl STRUCTTYPE_R {
57 #[doc = "Get enumerated values variant"]
58 #[inline(always)]
59 pub fn variant(&self) -> Option<STRUCTTYPE_A> {
60 match self.bits {
61 0 => Some(STRUCTTYPE_A::TRANSFER),
62 1 => Some(STRUCTTYPE_A::SYNCHRONIZE),
63 2 => Some(STRUCTTYPE_A::WRITE),
64 _ => None,
65 }
66 }
67 #[doc = "Checks if the value of the field is `TRANSFER`"]
68 #[inline(always)]
69 pub fn is_transfer(&self) -> bool {
70 *self == STRUCTTYPE_A::TRANSFER
71 }
72 #[doc = "Checks if the value of the field is `SYNCHRONIZE`"]
73 #[inline(always)]
74 pub fn is_synchronize(&self) -> bool {
75 *self == STRUCTTYPE_A::SYNCHRONIZE
76 }
77 #[doc = "Checks if the value of the field is `WRITE`"]
78 #[inline(always)]
79 pub fn is_write(&self) -> bool {
80 *self == STRUCTTYPE_A::WRITE
81 }
82}
83#[doc = "Field `STRUCTREQ` writer - Structure DMA Transfer Request"]
84pub type STRUCTREQ_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, O>;
85#[doc = "Field `XFERCNT` reader - DMA Unit Data Transfer Count"]
86pub type XFERCNT_R = crate::FieldReader<u16, u16>;
87#[doc = "Field `XFERCNT` writer - DMA Unit Data Transfer Count"]
88pub type XFERCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CTRL_SPEC, u16, u16, 11, O>;
89#[doc = "Field `BYTESWAP` reader - Endian Byte Swap"]
90pub type BYTESWAP_R = crate::BitReader<bool>;
91#[doc = "Field `BYTESWAP` writer - Endian Byte Swap"]
92pub type BYTESWAP_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, O>;
93#[doc = "Field `BLOCKSIZE` reader - Block Transfer Size"]
94pub type BLOCKSIZE_R = crate::FieldReader<u8, BLOCKSIZE_A>;
95#[doc = "Block Transfer Size\n\nValue on reset: 0"]
96#[derive(Clone, Copy, Debug, PartialEq, Eq)]
97#[repr(u8)]
98pub enum BLOCKSIZE_A {
99 #[doc = "0: One unit transfer per arbitration"]
100 UNIT1 = 0,
101 #[doc = "1: Two unit transfers per arbitration"]
102 UNIT2 = 1,
103 #[doc = "2: Three unit transfers per arbitration"]
104 UNIT3 = 2,
105 #[doc = "3: Four unit transfers per arbitration"]
106 UNIT4 = 3,
107 #[doc = "4: Six unit transfers per arbitration"]
108 UNIT6 = 4,
109 #[doc = "5: Eight unit transfers per arbitration"]
110 UNIT8 = 5,
111 #[doc = "7: Sixteen unit transfers per arbitration"]
112 UNIT16 = 7,
113 #[doc = "9: 32 unit transfers per arbitration"]
114 UNIT32 = 9,
115 #[doc = "10: 64 unit transfers per arbitration"]
116 UNIT64 = 10,
117 #[doc = "11: 128 unit transfers per arbitration"]
118 UNIT128 = 11,
119 #[doc = "12: 256 unit transfers per arbitration"]
120 UNIT256 = 12,
121 #[doc = "13: 512 unit transfers per arbitration"]
122 UNIT512 = 13,
123 #[doc = "14: 1024 unit transfers per arbitration"]
124 UNIT1024 = 14,
125 #[doc = "15: Transfer all units as specified by the XFRCNT field"]
126 ALL = 15,
127}
128impl From<BLOCKSIZE_A> for u8 {
129 #[inline(always)]
130 fn from(variant: BLOCKSIZE_A) -> Self {
131 variant as _
132 }
133}
134impl BLOCKSIZE_R {
135 #[doc = "Get enumerated values variant"]
136 #[inline(always)]
137 pub fn variant(&self) -> Option<BLOCKSIZE_A> {
138 match self.bits {
139 0 => Some(BLOCKSIZE_A::UNIT1),
140 1 => Some(BLOCKSIZE_A::UNIT2),
141 2 => Some(BLOCKSIZE_A::UNIT3),
142 3 => Some(BLOCKSIZE_A::UNIT4),
143 4 => Some(BLOCKSIZE_A::UNIT6),
144 5 => Some(BLOCKSIZE_A::UNIT8),
145 7 => Some(BLOCKSIZE_A::UNIT16),
146 9 => Some(BLOCKSIZE_A::UNIT32),
147 10 => Some(BLOCKSIZE_A::UNIT64),
148 11 => Some(BLOCKSIZE_A::UNIT128),
149 12 => Some(BLOCKSIZE_A::UNIT256),
150 13 => Some(BLOCKSIZE_A::UNIT512),
151 14 => Some(BLOCKSIZE_A::UNIT1024),
152 15 => Some(BLOCKSIZE_A::ALL),
153 _ => None,
154 }
155 }
156 #[doc = "Checks if the value of the field is `UNIT1`"]
157 #[inline(always)]
158 pub fn is_unit1(&self) -> bool {
159 *self == BLOCKSIZE_A::UNIT1
160 }
161 #[doc = "Checks if the value of the field is `UNIT2`"]
162 #[inline(always)]
163 pub fn is_unit2(&self) -> bool {
164 *self == BLOCKSIZE_A::UNIT2
165 }
166 #[doc = "Checks if the value of the field is `UNIT3`"]
167 #[inline(always)]
168 pub fn is_unit3(&self) -> bool {
169 *self == BLOCKSIZE_A::UNIT3
170 }
171 #[doc = "Checks if the value of the field is `UNIT4`"]
172 #[inline(always)]
173 pub fn is_unit4(&self) -> bool {
174 *self == BLOCKSIZE_A::UNIT4
175 }
176 #[doc = "Checks if the value of the field is `UNIT6`"]
177 #[inline(always)]
178 pub fn is_unit6(&self) -> bool {
179 *self == BLOCKSIZE_A::UNIT6
180 }
181 #[doc = "Checks if the value of the field is `UNIT8`"]
182 #[inline(always)]
183 pub fn is_unit8(&self) -> bool {
184 *self == BLOCKSIZE_A::UNIT8
185 }
186 #[doc = "Checks if the value of the field is `UNIT16`"]
187 #[inline(always)]
188 pub fn is_unit16(&self) -> bool {
189 *self == BLOCKSIZE_A::UNIT16
190 }
191 #[doc = "Checks if the value of the field is `UNIT32`"]
192 #[inline(always)]
193 pub fn is_unit32(&self) -> bool {
194 *self == BLOCKSIZE_A::UNIT32
195 }
196 #[doc = "Checks if the value of the field is `UNIT64`"]
197 #[inline(always)]
198 pub fn is_unit64(&self) -> bool {
199 *self == BLOCKSIZE_A::UNIT64
200 }
201 #[doc = "Checks if the value of the field is `UNIT128`"]
202 #[inline(always)]
203 pub fn is_unit128(&self) -> bool {
204 *self == BLOCKSIZE_A::UNIT128
205 }
206 #[doc = "Checks if the value of the field is `UNIT256`"]
207 #[inline(always)]
208 pub fn is_unit256(&self) -> bool {
209 *self == BLOCKSIZE_A::UNIT256
210 }
211 #[doc = "Checks if the value of the field is `UNIT512`"]
212 #[inline(always)]
213 pub fn is_unit512(&self) -> bool {
214 *self == BLOCKSIZE_A::UNIT512
215 }
216 #[doc = "Checks if the value of the field is `UNIT1024`"]
217 #[inline(always)]
218 pub fn is_unit1024(&self) -> bool {
219 *self == BLOCKSIZE_A::UNIT1024
220 }
221 #[doc = "Checks if the value of the field is `ALL`"]
222 #[inline(always)]
223 pub fn is_all(&self) -> bool {
224 *self == BLOCKSIZE_A::ALL
225 }
226}
227#[doc = "Field `BLOCKSIZE` writer - Block Transfer Size"]
228pub type BLOCKSIZE_W<'a, const O: u8> =
229 crate::FieldWriter<'a, u32, CTRL_SPEC, u8, BLOCKSIZE_A, 4, O>;
230impl<'a, const O: u8> BLOCKSIZE_W<'a, O> {
231 #[doc = "One unit transfer per arbitration"]
232 #[inline(always)]
233 pub fn unit1(self) -> &'a mut W {
234 self.variant(BLOCKSIZE_A::UNIT1)
235 }
236 #[doc = "Two unit transfers per arbitration"]
237 #[inline(always)]
238 pub fn unit2(self) -> &'a mut W {
239 self.variant(BLOCKSIZE_A::UNIT2)
240 }
241 #[doc = "Three unit transfers per arbitration"]
242 #[inline(always)]
243 pub fn unit3(self) -> &'a mut W {
244 self.variant(BLOCKSIZE_A::UNIT3)
245 }
246 #[doc = "Four unit transfers per arbitration"]
247 #[inline(always)]
248 pub fn unit4(self) -> &'a mut W {
249 self.variant(BLOCKSIZE_A::UNIT4)
250 }
251 #[doc = "Six unit transfers per arbitration"]
252 #[inline(always)]
253 pub fn unit6(self) -> &'a mut W {
254 self.variant(BLOCKSIZE_A::UNIT6)
255 }
256 #[doc = "Eight unit transfers per arbitration"]
257 #[inline(always)]
258 pub fn unit8(self) -> &'a mut W {
259 self.variant(BLOCKSIZE_A::UNIT8)
260 }
261 #[doc = "Sixteen unit transfers per arbitration"]
262 #[inline(always)]
263 pub fn unit16(self) -> &'a mut W {
264 self.variant(BLOCKSIZE_A::UNIT16)
265 }
266 #[doc = "32 unit transfers per arbitration"]
267 #[inline(always)]
268 pub fn unit32(self) -> &'a mut W {
269 self.variant(BLOCKSIZE_A::UNIT32)
270 }
271 #[doc = "64 unit transfers per arbitration"]
272 #[inline(always)]
273 pub fn unit64(self) -> &'a mut W {
274 self.variant(BLOCKSIZE_A::UNIT64)
275 }
276 #[doc = "128 unit transfers per arbitration"]
277 #[inline(always)]
278 pub fn unit128(self) -> &'a mut W {
279 self.variant(BLOCKSIZE_A::UNIT128)
280 }
281 #[doc = "256 unit transfers per arbitration"]
282 #[inline(always)]
283 pub fn unit256(self) -> &'a mut W {
284 self.variant(BLOCKSIZE_A::UNIT256)
285 }
286 #[doc = "512 unit transfers per arbitration"]
287 #[inline(always)]
288 pub fn unit512(self) -> &'a mut W {
289 self.variant(BLOCKSIZE_A::UNIT512)
290 }
291 #[doc = "1024 unit transfers per arbitration"]
292 #[inline(always)]
293 pub fn unit1024(self) -> &'a mut W {
294 self.variant(BLOCKSIZE_A::UNIT1024)
295 }
296 #[doc = "Transfer all units as specified by the XFRCNT field"]
297 #[inline(always)]
298 pub fn all(self) -> &'a mut W {
299 self.variant(BLOCKSIZE_A::ALL)
300 }
301}
302#[doc = "Field `DONEIFSEN` reader - DMA Operation Done Interrupt Flag Set Enable"]
303pub type DONEIFSEN_R = crate::BitReader<bool>;
304#[doc = "Field `DONEIFSEN` writer - DMA Operation Done Interrupt Flag Set Enable"]
305pub type DONEIFSEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, O>;
306#[doc = "Field `REQMODE` reader - DMA Request Transfer Mode Select"]
307pub type REQMODE_R = crate::BitReader<bool>;
308#[doc = "Field `REQMODE` writer - DMA Request Transfer Mode Select"]
309pub type REQMODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, O>;
310#[doc = "Field `DECLOOPCNT` reader - Decrement Loop Count"]
311pub type DECLOOPCNT_R = crate::BitReader<bool>;
312#[doc = "Field `DECLOOPCNT` writer - Decrement Loop Count"]
313pub type DECLOOPCNT_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, O>;
314#[doc = "Field `IGNORESREQ` reader - Ignore Sreq"]
315pub type IGNORESREQ_R = crate::BitReader<bool>;
316#[doc = "Field `IGNORESREQ` writer - Ignore Sreq"]
317pub type IGNORESREQ_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, O>;
318#[doc = "Field `SRCINC` reader - Source Address Increment Size"]
319pub type SRCINC_R = crate::FieldReader<u8, SRCINC_A>;
320#[doc = "Source Address Increment Size\n\nValue on reset: 0"]
321#[derive(Clone, Copy, Debug, PartialEq, Eq)]
322#[repr(u8)]
323pub enum SRCINC_A {
324 #[doc = "0: Increment source address by one unit data size after each read"]
325 ONE = 0,
326 #[doc = "1: Increment source address by two unit data sizes after each read"]
327 TWO = 1,
328 #[doc = "2: Increment source address by four unit data sizes after each read"]
329 FOUR = 2,
330 #[doc = "3: Do not increment the source address. In this mode reads are made from a fixed source address, for example reading FIFO."]
331 NONE = 3,
332}
333impl From<SRCINC_A> for u8 {
334 #[inline(always)]
335 fn from(variant: SRCINC_A) -> Self {
336 variant as _
337 }
338}
339impl SRCINC_R {
340 #[doc = "Get enumerated values variant"]
341 #[inline(always)]
342 pub fn variant(&self) -> SRCINC_A {
343 match self.bits {
344 0 => SRCINC_A::ONE,
345 1 => SRCINC_A::TWO,
346 2 => SRCINC_A::FOUR,
347 3 => SRCINC_A::NONE,
348 _ => unreachable!(),
349 }
350 }
351 #[doc = "Checks if the value of the field is `ONE`"]
352 #[inline(always)]
353 pub fn is_one(&self) -> bool {
354 *self == SRCINC_A::ONE
355 }
356 #[doc = "Checks if the value of the field is `TWO`"]
357 #[inline(always)]
358 pub fn is_two(&self) -> bool {
359 *self == SRCINC_A::TWO
360 }
361 #[doc = "Checks if the value of the field is `FOUR`"]
362 #[inline(always)]
363 pub fn is_four(&self) -> bool {
364 *self == SRCINC_A::FOUR
365 }
366 #[doc = "Checks if the value of the field is `NONE`"]
367 #[inline(always)]
368 pub fn is_none(&self) -> bool {
369 *self == SRCINC_A::NONE
370 }
371}
372#[doc = "Field `SRCINC` writer - Source Address Increment Size"]
373pub type SRCINC_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, CTRL_SPEC, u8, SRCINC_A, 2, O>;
374impl<'a, const O: u8> SRCINC_W<'a, O> {
375 #[doc = "Increment source address by one unit data size after each read"]
376 #[inline(always)]
377 pub fn one(self) -> &'a mut W {
378 self.variant(SRCINC_A::ONE)
379 }
380 #[doc = "Increment source address by two unit data sizes after each read"]
381 #[inline(always)]
382 pub fn two(self) -> &'a mut W {
383 self.variant(SRCINC_A::TWO)
384 }
385 #[doc = "Increment source address by four unit data sizes after each read"]
386 #[inline(always)]
387 pub fn four(self) -> &'a mut W {
388 self.variant(SRCINC_A::FOUR)
389 }
390 #[doc = "Do not increment the source address. In this mode reads are made from a fixed source address, for example reading FIFO."]
391 #[inline(always)]
392 pub fn none(self) -> &'a mut W {
393 self.variant(SRCINC_A::NONE)
394 }
395}
396#[doc = "Field `SIZE` reader - Unit Data Transfer Size"]
397pub type SIZE_R = crate::FieldReader<u8, SIZE_A>;
398#[doc = "Unit Data Transfer Size\n\nValue on reset: 0"]
399#[derive(Clone, Copy, Debug, PartialEq, Eq)]
400#[repr(u8)]
401pub enum SIZE_A {
402 #[doc = "0: Each unit transfer is a byte"]
403 BYTE = 0,
404 #[doc = "1: Each unit transfer is a half-word"]
405 HALFWORD = 1,
406 #[doc = "2: Each unit transfer is a word"]
407 WORD = 2,
408}
409impl From<SIZE_A> for u8 {
410 #[inline(always)]
411 fn from(variant: SIZE_A) -> Self {
412 variant as _
413 }
414}
415impl SIZE_R {
416 #[doc = "Get enumerated values variant"]
417 #[inline(always)]
418 pub fn variant(&self) -> Option<SIZE_A> {
419 match self.bits {
420 0 => Some(SIZE_A::BYTE),
421 1 => Some(SIZE_A::HALFWORD),
422 2 => Some(SIZE_A::WORD),
423 _ => None,
424 }
425 }
426 #[doc = "Checks if the value of the field is `BYTE`"]
427 #[inline(always)]
428 pub fn is_byte(&self) -> bool {
429 *self == SIZE_A::BYTE
430 }
431 #[doc = "Checks if the value of the field is `HALFWORD`"]
432 #[inline(always)]
433 pub fn is_halfword(&self) -> bool {
434 *self == SIZE_A::HALFWORD
435 }
436 #[doc = "Checks if the value of the field is `WORD`"]
437 #[inline(always)]
438 pub fn is_word(&self) -> bool {
439 *self == SIZE_A::WORD
440 }
441}
442#[doc = "Field `SIZE` writer - Unit Data Transfer Size"]
443pub type SIZE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CTRL_SPEC, u8, SIZE_A, 2, O>;
444impl<'a, const O: u8> SIZE_W<'a, O> {
445 #[doc = "Each unit transfer is a byte"]
446 #[inline(always)]
447 pub fn byte(self) -> &'a mut W {
448 self.variant(SIZE_A::BYTE)
449 }
450 #[doc = "Each unit transfer is a half-word"]
451 #[inline(always)]
452 pub fn halfword(self) -> &'a mut W {
453 self.variant(SIZE_A::HALFWORD)
454 }
455 #[doc = "Each unit transfer is a word"]
456 #[inline(always)]
457 pub fn word(self) -> &'a mut W {
458 self.variant(SIZE_A::WORD)
459 }
460}
461#[doc = "Field `DSTINC` reader - Destination Address Increment Size"]
462pub type DSTINC_R = crate::FieldReader<u8, DSTINC_A>;
463#[doc = "Destination Address Increment Size\n\nValue on reset: 0"]
464#[derive(Clone, Copy, Debug, PartialEq, Eq)]
465#[repr(u8)]
466pub enum DSTINC_A {
467 #[doc = "0: Increment destination address by one unit data size after each write"]
468 ONE = 0,
469 #[doc = "1: Increment destination address by two unit data sizes after each write"]
470 TWO = 1,
471 #[doc = "2: Increment destination address by four unit data sizes after each write"]
472 FOUR = 2,
473 #[doc = "3: Do not increment the destination address. Writes are made to a fixed destination address, for example writing to a FIFO."]
474 NONE = 3,
475}
476impl From<DSTINC_A> for u8 {
477 #[inline(always)]
478 fn from(variant: DSTINC_A) -> Self {
479 variant as _
480 }
481}
482impl DSTINC_R {
483 #[doc = "Get enumerated values variant"]
484 #[inline(always)]
485 pub fn variant(&self) -> DSTINC_A {
486 match self.bits {
487 0 => DSTINC_A::ONE,
488 1 => DSTINC_A::TWO,
489 2 => DSTINC_A::FOUR,
490 3 => DSTINC_A::NONE,
491 _ => unreachable!(),
492 }
493 }
494 #[doc = "Checks if the value of the field is `ONE`"]
495 #[inline(always)]
496 pub fn is_one(&self) -> bool {
497 *self == DSTINC_A::ONE
498 }
499 #[doc = "Checks if the value of the field is `TWO`"]
500 #[inline(always)]
501 pub fn is_two(&self) -> bool {
502 *self == DSTINC_A::TWO
503 }
504 #[doc = "Checks if the value of the field is `FOUR`"]
505 #[inline(always)]
506 pub fn is_four(&self) -> bool {
507 *self == DSTINC_A::FOUR
508 }
509 #[doc = "Checks if the value of the field is `NONE`"]
510 #[inline(always)]
511 pub fn is_none(&self) -> bool {
512 *self == DSTINC_A::NONE
513 }
514}
515#[doc = "Field `DSTINC` writer - Destination Address Increment Size"]
516pub type DSTINC_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, CTRL_SPEC, u8, DSTINC_A, 2, O>;
517impl<'a, const O: u8> DSTINC_W<'a, O> {
518 #[doc = "Increment destination address by one unit data size after each write"]
519 #[inline(always)]
520 pub fn one(self) -> &'a mut W {
521 self.variant(DSTINC_A::ONE)
522 }
523 #[doc = "Increment destination address by two unit data sizes after each write"]
524 #[inline(always)]
525 pub fn two(self) -> &'a mut W {
526 self.variant(DSTINC_A::TWO)
527 }
528 #[doc = "Increment destination address by four unit data sizes after each write"]
529 #[inline(always)]
530 pub fn four(self) -> &'a mut W {
531 self.variant(DSTINC_A::FOUR)
532 }
533 #[doc = "Do not increment the destination address. Writes are made to a fixed destination address, for example writing to a FIFO."]
534 #[inline(always)]
535 pub fn none(self) -> &'a mut W {
536 self.variant(DSTINC_A::NONE)
537 }
538}
539#[doc = "Field `SRCMODE` reader - Source Addressing Mode"]
540pub type SRCMODE_R = crate::BitReader<bool>;
541#[doc = "Field `DSTMODE` reader - Destination Addressing Mode"]
542pub type DSTMODE_R = crate::BitReader<bool>;
543impl R {
544 #[doc = "Bits 0:1 - DMA Structure Type"]
545 #[inline(always)]
546 pub fn structtype(&self) -> STRUCTTYPE_R {
547 STRUCTTYPE_R::new((self.bits & 3) as u8)
548 }
549 #[doc = "Bits 4:14 - DMA Unit Data Transfer Count"]
550 #[inline(always)]
551 pub fn xfercnt(&self) -> XFERCNT_R {
552 XFERCNT_R::new(((self.bits >> 4) & 0x07ff) as u16)
553 }
554 #[doc = "Bit 15 - Endian Byte Swap"]
555 #[inline(always)]
556 pub fn byteswap(&self) -> BYTESWAP_R {
557 BYTESWAP_R::new(((self.bits >> 15) & 1) != 0)
558 }
559 #[doc = "Bits 16:19 - Block Transfer Size"]
560 #[inline(always)]
561 pub fn blocksize(&self) -> BLOCKSIZE_R {
562 BLOCKSIZE_R::new(((self.bits >> 16) & 0x0f) as u8)
563 }
564 #[doc = "Bit 20 - DMA Operation Done Interrupt Flag Set Enable"]
565 #[inline(always)]
566 pub fn doneifsen(&self) -> DONEIFSEN_R {
567 DONEIFSEN_R::new(((self.bits >> 20) & 1) != 0)
568 }
569 #[doc = "Bit 21 - DMA Request Transfer Mode Select"]
570 #[inline(always)]
571 pub fn reqmode(&self) -> REQMODE_R {
572 REQMODE_R::new(((self.bits >> 21) & 1) != 0)
573 }
574 #[doc = "Bit 22 - Decrement Loop Count"]
575 #[inline(always)]
576 pub fn decloopcnt(&self) -> DECLOOPCNT_R {
577 DECLOOPCNT_R::new(((self.bits >> 22) & 1) != 0)
578 }
579 #[doc = "Bit 23 - Ignore Sreq"]
580 #[inline(always)]
581 pub fn ignoresreq(&self) -> IGNORESREQ_R {
582 IGNORESREQ_R::new(((self.bits >> 23) & 1) != 0)
583 }
584 #[doc = "Bits 24:25 - Source Address Increment Size"]
585 #[inline(always)]
586 pub fn srcinc(&self) -> SRCINC_R {
587 SRCINC_R::new(((self.bits >> 24) & 3) as u8)
588 }
589 #[doc = "Bits 26:27 - Unit Data Transfer Size"]
590 #[inline(always)]
591 pub fn size(&self) -> SIZE_R {
592 SIZE_R::new(((self.bits >> 26) & 3) as u8)
593 }
594 #[doc = "Bits 28:29 - Destination Address Increment Size"]
595 #[inline(always)]
596 pub fn dstinc(&self) -> DSTINC_R {
597 DSTINC_R::new(((self.bits >> 28) & 3) as u8)
598 }
599 #[doc = "Bit 30 - Source Addressing Mode"]
600 #[inline(always)]
601 pub fn srcmode(&self) -> SRCMODE_R {
602 SRCMODE_R::new(((self.bits >> 30) & 1) != 0)
603 }
604 #[doc = "Bit 31 - Destination Addressing Mode"]
605 #[inline(always)]
606 pub fn dstmode(&self) -> DSTMODE_R {
607 DSTMODE_R::new(((self.bits >> 31) & 1) != 0)
608 }
609}
610impl W {
611 #[doc = "Bit 3 - Structure DMA Transfer Request"]
612 #[inline(always)]
613 #[must_use]
614 pub fn structreq(&mut self) -> STRUCTREQ_W<3> {
615 STRUCTREQ_W::new(self)
616 }
617 #[doc = "Bits 4:14 - DMA Unit Data Transfer Count"]
618 #[inline(always)]
619 #[must_use]
620 pub fn xfercnt(&mut self) -> XFERCNT_W<4> {
621 XFERCNT_W::new(self)
622 }
623 #[doc = "Bit 15 - Endian Byte Swap"]
624 #[inline(always)]
625 #[must_use]
626 pub fn byteswap(&mut self) -> BYTESWAP_W<15> {
627 BYTESWAP_W::new(self)
628 }
629 #[doc = "Bits 16:19 - Block Transfer Size"]
630 #[inline(always)]
631 #[must_use]
632 pub fn blocksize(&mut self) -> BLOCKSIZE_W<16> {
633 BLOCKSIZE_W::new(self)
634 }
635 #[doc = "Bit 20 - DMA Operation Done Interrupt Flag Set Enable"]
636 #[inline(always)]
637 #[must_use]
638 pub fn doneifsen(&mut self) -> DONEIFSEN_W<20> {
639 DONEIFSEN_W::new(self)
640 }
641 #[doc = "Bit 21 - DMA Request Transfer Mode Select"]
642 #[inline(always)]
643 #[must_use]
644 pub fn reqmode(&mut self) -> REQMODE_W<21> {
645 REQMODE_W::new(self)
646 }
647 #[doc = "Bit 22 - Decrement Loop Count"]
648 #[inline(always)]
649 #[must_use]
650 pub fn decloopcnt(&mut self) -> DECLOOPCNT_W<22> {
651 DECLOOPCNT_W::new(self)
652 }
653 #[doc = "Bit 23 - Ignore Sreq"]
654 #[inline(always)]
655 #[must_use]
656 pub fn ignoresreq(&mut self) -> IGNORESREQ_W<23> {
657 IGNORESREQ_W::new(self)
658 }
659 #[doc = "Bits 24:25 - Source Address Increment Size"]
660 #[inline(always)]
661 #[must_use]
662 pub fn srcinc(&mut self) -> SRCINC_W<24> {
663 SRCINC_W::new(self)
664 }
665 #[doc = "Bits 26:27 - Unit Data Transfer Size"]
666 #[inline(always)]
667 #[must_use]
668 pub fn size(&mut self) -> SIZE_W<26> {
669 SIZE_W::new(self)
670 }
671 #[doc = "Bits 28:29 - Destination Address Increment Size"]
672 #[inline(always)]
673 #[must_use]
674 pub fn dstinc(&mut self) -> DSTINC_W<28> {
675 DSTINC_W::new(self)
676 }
677 #[doc = "Writes raw bits to the register."]
678 #[inline(always)]
679 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
680 self.0.bits(bits);
681 self
682 }
683}
684#[doc = "Channel Descriptor Control Word Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctrl](index.html) module"]
685pub struct CTRL_SPEC;
686impl crate::RegisterSpec for CTRL_SPEC {
687 type Ux = u32;
688}
689#[doc = "`read()` method returns [ctrl::R](R) reader structure"]
690impl crate::Readable for CTRL_SPEC {
691 type Reader = R;
692}
693#[doc = "`write(|w| ..)` method takes [ctrl::W](W) writer structure"]
694impl crate::Writable for CTRL_SPEC {
695 type Writer = W;
696 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
697 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
698}
699#[doc = "`reset()` method sets CTRL to value 0"]
700impl crate::Resettable for CTRL_SPEC {
701 const RESET_VALUE: Self::Ux = 0;
702}