1#[doc = "Register `CH3_CTRL` reader"]
2pub struct R(crate::R<CH3_CTRL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<CH3_CTRL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<CH3_CTRL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<CH3_CTRL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `CH3_CTRL` writer"]
17pub struct W(crate::W<CH3_CTRL_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<CH3_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<CH3_CTRL_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<CH3_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, CH3_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, CH3_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, CH3_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, CH3_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, CH3_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, CH3_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, CH3_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, CH3_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> =
374 crate::FieldWriterSafe<'a, u32, CH3_CTRL_SPEC, u8, SRCINC_A, 2, O>;
375impl<'a, const O: u8> SRCINC_W<'a, O> {
376 #[doc = "Increment source address by one unit data size after each read"]
377 #[inline(always)]
378 pub fn one(self) -> &'a mut W {
379 self.variant(SRCINC_A::ONE)
380 }
381 #[doc = "Increment source address by two unit data sizes after each read"]
382 #[inline(always)]
383 pub fn two(self) -> &'a mut W {
384 self.variant(SRCINC_A::TWO)
385 }
386 #[doc = "Increment source address by four unit data sizes after each read"]
387 #[inline(always)]
388 pub fn four(self) -> &'a mut W {
389 self.variant(SRCINC_A::FOUR)
390 }
391 #[doc = "Do not increment the source address. In this mode reads are made from a fixed source address, for example reading FIFO."]
392 #[inline(always)]
393 pub fn none(self) -> &'a mut W {
394 self.variant(SRCINC_A::NONE)
395 }
396}
397#[doc = "Field `SIZE` reader - Unit Data Transfer Size"]
398pub type SIZE_R = crate::FieldReader<u8, SIZE_A>;
399#[doc = "Unit Data Transfer Size\n\nValue on reset: 0"]
400#[derive(Clone, Copy, Debug, PartialEq, Eq)]
401#[repr(u8)]
402pub enum SIZE_A {
403 #[doc = "0: Each unit transfer is a byte"]
404 BYTE = 0,
405 #[doc = "1: Each unit transfer is a half-word"]
406 HALFWORD = 1,
407 #[doc = "2: Each unit transfer is a word"]
408 WORD = 2,
409}
410impl From<SIZE_A> for u8 {
411 #[inline(always)]
412 fn from(variant: SIZE_A) -> Self {
413 variant as _
414 }
415}
416impl SIZE_R {
417 #[doc = "Get enumerated values variant"]
418 #[inline(always)]
419 pub fn variant(&self) -> Option<SIZE_A> {
420 match self.bits {
421 0 => Some(SIZE_A::BYTE),
422 1 => Some(SIZE_A::HALFWORD),
423 2 => Some(SIZE_A::WORD),
424 _ => None,
425 }
426 }
427 #[doc = "Checks if the value of the field is `BYTE`"]
428 #[inline(always)]
429 pub fn is_byte(&self) -> bool {
430 *self == SIZE_A::BYTE
431 }
432 #[doc = "Checks if the value of the field is `HALFWORD`"]
433 #[inline(always)]
434 pub fn is_halfword(&self) -> bool {
435 *self == SIZE_A::HALFWORD
436 }
437 #[doc = "Checks if the value of the field is `WORD`"]
438 #[inline(always)]
439 pub fn is_word(&self) -> bool {
440 *self == SIZE_A::WORD
441 }
442}
443#[doc = "Field `SIZE` writer - Unit Data Transfer Size"]
444pub type SIZE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CH3_CTRL_SPEC, u8, SIZE_A, 2, O>;
445impl<'a, const O: u8> SIZE_W<'a, O> {
446 #[doc = "Each unit transfer is a byte"]
447 #[inline(always)]
448 pub fn byte(self) -> &'a mut W {
449 self.variant(SIZE_A::BYTE)
450 }
451 #[doc = "Each unit transfer is a half-word"]
452 #[inline(always)]
453 pub fn halfword(self) -> &'a mut W {
454 self.variant(SIZE_A::HALFWORD)
455 }
456 #[doc = "Each unit transfer is a word"]
457 #[inline(always)]
458 pub fn word(self) -> &'a mut W {
459 self.variant(SIZE_A::WORD)
460 }
461}
462#[doc = "Field `DSTINC` reader - Destination Address Increment Size"]
463pub type DSTINC_R = crate::FieldReader<u8, DSTINC_A>;
464#[doc = "Destination Address Increment Size\n\nValue on reset: 0"]
465#[derive(Clone, Copy, Debug, PartialEq, Eq)]
466#[repr(u8)]
467pub enum DSTINC_A {
468 #[doc = "0: Increment destination address by one unit data size after each write"]
469 ONE = 0,
470 #[doc = "1: Increment destination address by two unit data sizes after each write"]
471 TWO = 1,
472 #[doc = "2: Increment destination address by four unit data sizes after each write"]
473 FOUR = 2,
474 #[doc = "3: Do not increment the destination address. Writes are made to a fixed destination address, for example writing to a FIFO."]
475 NONE = 3,
476}
477impl From<DSTINC_A> for u8 {
478 #[inline(always)]
479 fn from(variant: DSTINC_A) -> Self {
480 variant as _
481 }
482}
483impl DSTINC_R {
484 #[doc = "Get enumerated values variant"]
485 #[inline(always)]
486 pub fn variant(&self) -> DSTINC_A {
487 match self.bits {
488 0 => DSTINC_A::ONE,
489 1 => DSTINC_A::TWO,
490 2 => DSTINC_A::FOUR,
491 3 => DSTINC_A::NONE,
492 _ => unreachable!(),
493 }
494 }
495 #[doc = "Checks if the value of the field is `ONE`"]
496 #[inline(always)]
497 pub fn is_one(&self) -> bool {
498 *self == DSTINC_A::ONE
499 }
500 #[doc = "Checks if the value of the field is `TWO`"]
501 #[inline(always)]
502 pub fn is_two(&self) -> bool {
503 *self == DSTINC_A::TWO
504 }
505 #[doc = "Checks if the value of the field is `FOUR`"]
506 #[inline(always)]
507 pub fn is_four(&self) -> bool {
508 *self == DSTINC_A::FOUR
509 }
510 #[doc = "Checks if the value of the field is `NONE`"]
511 #[inline(always)]
512 pub fn is_none(&self) -> bool {
513 *self == DSTINC_A::NONE
514 }
515}
516#[doc = "Field `DSTINC` writer - Destination Address Increment Size"]
517pub type DSTINC_W<'a, const O: u8> =
518 crate::FieldWriterSafe<'a, u32, CH3_CTRL_SPEC, u8, DSTINC_A, 2, O>;
519impl<'a, const O: u8> DSTINC_W<'a, O> {
520 #[doc = "Increment destination address by one unit data size after each write"]
521 #[inline(always)]
522 pub fn one(self) -> &'a mut W {
523 self.variant(DSTINC_A::ONE)
524 }
525 #[doc = "Increment destination address by two unit data sizes after each write"]
526 #[inline(always)]
527 pub fn two(self) -> &'a mut W {
528 self.variant(DSTINC_A::TWO)
529 }
530 #[doc = "Increment destination address by four unit data sizes after each write"]
531 #[inline(always)]
532 pub fn four(self) -> &'a mut W {
533 self.variant(DSTINC_A::FOUR)
534 }
535 #[doc = "Do not increment the destination address. Writes are made to a fixed destination address, for example writing to a FIFO."]
536 #[inline(always)]
537 pub fn none(self) -> &'a mut W {
538 self.variant(DSTINC_A::NONE)
539 }
540}
541#[doc = "Field `SRCMODE` reader - Source Addressing Mode"]
542pub type SRCMODE_R = crate::BitReader<bool>;
543#[doc = "Field `DSTMODE` reader - Destination Addressing Mode"]
544pub type DSTMODE_R = crate::BitReader<bool>;
545impl R {
546 #[doc = "Bits 0:1 - DMA Structure Type"]
547 #[inline(always)]
548 pub fn structtype(&self) -> STRUCTTYPE_R {
549 STRUCTTYPE_R::new((self.bits & 3) as u8)
550 }
551 #[doc = "Bits 4:14 - DMA Unit Data Transfer Count"]
552 #[inline(always)]
553 pub fn xfercnt(&self) -> XFERCNT_R {
554 XFERCNT_R::new(((self.bits >> 4) & 0x07ff) as u16)
555 }
556 #[doc = "Bit 15 - Endian Byte Swap"]
557 #[inline(always)]
558 pub fn byteswap(&self) -> BYTESWAP_R {
559 BYTESWAP_R::new(((self.bits >> 15) & 1) != 0)
560 }
561 #[doc = "Bits 16:19 - Block Transfer Size"]
562 #[inline(always)]
563 pub fn blocksize(&self) -> BLOCKSIZE_R {
564 BLOCKSIZE_R::new(((self.bits >> 16) & 0x0f) as u8)
565 }
566 #[doc = "Bit 20 - DMA Operation Done Interrupt Flag Set Enable"]
567 #[inline(always)]
568 pub fn doneifsen(&self) -> DONEIFSEN_R {
569 DONEIFSEN_R::new(((self.bits >> 20) & 1) != 0)
570 }
571 #[doc = "Bit 21 - DMA Request Transfer Mode Select"]
572 #[inline(always)]
573 pub fn reqmode(&self) -> REQMODE_R {
574 REQMODE_R::new(((self.bits >> 21) & 1) != 0)
575 }
576 #[doc = "Bit 22 - Decrement Loop Count"]
577 #[inline(always)]
578 pub fn decloopcnt(&self) -> DECLOOPCNT_R {
579 DECLOOPCNT_R::new(((self.bits >> 22) & 1) != 0)
580 }
581 #[doc = "Bit 23 - Ignore Sreq"]
582 #[inline(always)]
583 pub fn ignoresreq(&self) -> IGNORESREQ_R {
584 IGNORESREQ_R::new(((self.bits >> 23) & 1) != 0)
585 }
586 #[doc = "Bits 24:25 - Source Address Increment Size"]
587 #[inline(always)]
588 pub fn srcinc(&self) -> SRCINC_R {
589 SRCINC_R::new(((self.bits >> 24) & 3) as u8)
590 }
591 #[doc = "Bits 26:27 - Unit Data Transfer Size"]
592 #[inline(always)]
593 pub fn size(&self) -> SIZE_R {
594 SIZE_R::new(((self.bits >> 26) & 3) as u8)
595 }
596 #[doc = "Bits 28:29 - Destination Address Increment Size"]
597 #[inline(always)]
598 pub fn dstinc(&self) -> DSTINC_R {
599 DSTINC_R::new(((self.bits >> 28) & 3) as u8)
600 }
601 #[doc = "Bit 30 - Source Addressing Mode"]
602 #[inline(always)]
603 pub fn srcmode(&self) -> SRCMODE_R {
604 SRCMODE_R::new(((self.bits >> 30) & 1) != 0)
605 }
606 #[doc = "Bit 31 - Destination Addressing Mode"]
607 #[inline(always)]
608 pub fn dstmode(&self) -> DSTMODE_R {
609 DSTMODE_R::new(((self.bits >> 31) & 1) != 0)
610 }
611}
612impl W {
613 #[doc = "Bit 3 - Structure DMA Transfer Request"]
614 #[inline(always)]
615 #[must_use]
616 pub fn structreq(&mut self) -> STRUCTREQ_W<3> {
617 STRUCTREQ_W::new(self)
618 }
619 #[doc = "Bits 4:14 - DMA Unit Data Transfer Count"]
620 #[inline(always)]
621 #[must_use]
622 pub fn xfercnt(&mut self) -> XFERCNT_W<4> {
623 XFERCNT_W::new(self)
624 }
625 #[doc = "Bit 15 - Endian Byte Swap"]
626 #[inline(always)]
627 #[must_use]
628 pub fn byteswap(&mut self) -> BYTESWAP_W<15> {
629 BYTESWAP_W::new(self)
630 }
631 #[doc = "Bits 16:19 - Block Transfer Size"]
632 #[inline(always)]
633 #[must_use]
634 pub fn blocksize(&mut self) -> BLOCKSIZE_W<16> {
635 BLOCKSIZE_W::new(self)
636 }
637 #[doc = "Bit 20 - DMA Operation Done Interrupt Flag Set Enable"]
638 #[inline(always)]
639 #[must_use]
640 pub fn doneifsen(&mut self) -> DONEIFSEN_W<20> {
641 DONEIFSEN_W::new(self)
642 }
643 #[doc = "Bit 21 - DMA Request Transfer Mode Select"]
644 #[inline(always)]
645 #[must_use]
646 pub fn reqmode(&mut self) -> REQMODE_W<21> {
647 REQMODE_W::new(self)
648 }
649 #[doc = "Bit 22 - Decrement Loop Count"]
650 #[inline(always)]
651 #[must_use]
652 pub fn decloopcnt(&mut self) -> DECLOOPCNT_W<22> {
653 DECLOOPCNT_W::new(self)
654 }
655 #[doc = "Bit 23 - Ignore Sreq"]
656 #[inline(always)]
657 #[must_use]
658 pub fn ignoresreq(&mut self) -> IGNORESREQ_W<23> {
659 IGNORESREQ_W::new(self)
660 }
661 #[doc = "Bits 24:25 - Source Address Increment Size"]
662 #[inline(always)]
663 #[must_use]
664 pub fn srcinc(&mut self) -> SRCINC_W<24> {
665 SRCINC_W::new(self)
666 }
667 #[doc = "Bits 26:27 - Unit Data Transfer Size"]
668 #[inline(always)]
669 #[must_use]
670 pub fn size(&mut self) -> SIZE_W<26> {
671 SIZE_W::new(self)
672 }
673 #[doc = "Bits 28:29 - Destination Address Increment Size"]
674 #[inline(always)]
675 #[must_use]
676 pub fn dstinc(&mut self) -> DSTINC_W<28> {
677 DSTINC_W::new(self)
678 }
679 #[doc = "Writes raw bits to the register."]
680 #[inline(always)]
681 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
682 self.0.bits(bits);
683 self
684 }
685}
686#[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 [ch3_ctrl](index.html) module"]
687pub struct CH3_CTRL_SPEC;
688impl crate::RegisterSpec for CH3_CTRL_SPEC {
689 type Ux = u32;
690}
691#[doc = "`read()` method returns [ch3_ctrl::R](R) reader structure"]
692impl crate::Readable for CH3_CTRL_SPEC {
693 type Reader = R;
694}
695#[doc = "`write(|w| ..)` method takes [ch3_ctrl::W](W) writer structure"]
696impl crate::Writable for CH3_CTRL_SPEC {
697 type Writer = W;
698 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
699 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
700}
701#[doc = "`reset()` method sets CH3_CTRL to value 0"]
702impl crate::Resettable for CH3_CTRL_SPEC {
703 const RESET_VALUE: Self::Ux = 0;
704}