1#[doc = "Register `PDC2` reader"]
2pub type R = crate::R<Pdc2Spec>;
3#[doc = "Register `PDC2` writer"]
4pub type W = crate::W<Pdc2Spec>;
5#[doc = "Wake-up Pin Configuration for WUU_Pn\n\nValue on reset: 0"]
6#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8#[repr(u8)]
9pub enum Wupdc16 {
10 #[doc = "0: Interrupt"]
11 Interrupt = 0,
12 #[doc = "1: DMA request"]
13 DmaReq = 1,
14 #[doc = "2: Trigger event"]
15 Trigger = 2,
16 #[doc = "3: Reserved"]
17 Res = 3,
18}
19impl From<Wupdc16> for u8 {
20 #[inline(always)]
21 fn from(variant: Wupdc16) -> Self {
22 variant as _
23 }
24}
25impl crate::FieldSpec for Wupdc16 {
26 type Ux = u8;
27}
28impl crate::IsEnum for Wupdc16 {}
29#[doc = "Field `WUPDC16` reader - Wake-up Pin Configuration for WUU_Pn"]
30pub type Wupdc16R = crate::FieldReader<Wupdc16>;
31impl Wupdc16R {
32 #[doc = "Get enumerated values variant"]
33 #[inline(always)]
34 pub const fn variant(&self) -> Wupdc16 {
35 match self.bits {
36 0 => Wupdc16::Interrupt,
37 1 => Wupdc16::DmaReq,
38 2 => Wupdc16::Trigger,
39 3 => Wupdc16::Res,
40 _ => unreachable!(),
41 }
42 }
43 #[doc = "Interrupt"]
44 #[inline(always)]
45 pub fn is_interrupt(&self) -> bool {
46 *self == Wupdc16::Interrupt
47 }
48 #[doc = "DMA request"]
49 #[inline(always)]
50 pub fn is_dma_req(&self) -> bool {
51 *self == Wupdc16::DmaReq
52 }
53 #[doc = "Trigger event"]
54 #[inline(always)]
55 pub fn is_trigger(&self) -> bool {
56 *self == Wupdc16::Trigger
57 }
58 #[doc = "Reserved"]
59 #[inline(always)]
60 pub fn is_res(&self) -> bool {
61 *self == Wupdc16::Res
62 }
63}
64#[doc = "Field `WUPDC16` writer - Wake-up Pin Configuration for WUU_Pn"]
65pub type Wupdc16W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupdc16, crate::Safe>;
66impl<'a, REG> Wupdc16W<'a, REG>
67where
68 REG: crate::Writable + crate::RegisterSpec,
69 REG::Ux: From<u8>,
70{
71 #[doc = "Interrupt"]
72 #[inline(always)]
73 pub fn interrupt(self) -> &'a mut crate::W<REG> {
74 self.variant(Wupdc16::Interrupt)
75 }
76 #[doc = "DMA request"]
77 #[inline(always)]
78 pub fn dma_req(self) -> &'a mut crate::W<REG> {
79 self.variant(Wupdc16::DmaReq)
80 }
81 #[doc = "Trigger event"]
82 #[inline(always)]
83 pub fn trigger(self) -> &'a mut crate::W<REG> {
84 self.variant(Wupdc16::Trigger)
85 }
86 #[doc = "Reserved"]
87 #[inline(always)]
88 pub fn res(self) -> &'a mut crate::W<REG> {
89 self.variant(Wupdc16::Res)
90 }
91}
92#[doc = "Wake-up Pin Configuration for WUU_Pn\n\nValue on reset: 0"]
93#[cfg_attr(feature = "defmt", derive(defmt::Format))]
94#[derive(Clone, Copy, Debug, PartialEq, Eq)]
95#[repr(u8)]
96pub enum Wupdc17 {
97 #[doc = "0: Interrupt"]
98 Interrupt = 0,
99 #[doc = "1: DMA request"]
100 DmaReq = 1,
101 #[doc = "2: Trigger event"]
102 Trigger = 2,
103 #[doc = "3: Reserved"]
104 Res = 3,
105}
106impl From<Wupdc17> for u8 {
107 #[inline(always)]
108 fn from(variant: Wupdc17) -> Self {
109 variant as _
110 }
111}
112impl crate::FieldSpec for Wupdc17 {
113 type Ux = u8;
114}
115impl crate::IsEnum for Wupdc17 {}
116#[doc = "Field `WUPDC17` reader - Wake-up Pin Configuration for WUU_Pn"]
117pub type Wupdc17R = crate::FieldReader<Wupdc17>;
118impl Wupdc17R {
119 #[doc = "Get enumerated values variant"]
120 #[inline(always)]
121 pub const fn variant(&self) -> Wupdc17 {
122 match self.bits {
123 0 => Wupdc17::Interrupt,
124 1 => Wupdc17::DmaReq,
125 2 => Wupdc17::Trigger,
126 3 => Wupdc17::Res,
127 _ => unreachable!(),
128 }
129 }
130 #[doc = "Interrupt"]
131 #[inline(always)]
132 pub fn is_interrupt(&self) -> bool {
133 *self == Wupdc17::Interrupt
134 }
135 #[doc = "DMA request"]
136 #[inline(always)]
137 pub fn is_dma_req(&self) -> bool {
138 *self == Wupdc17::DmaReq
139 }
140 #[doc = "Trigger event"]
141 #[inline(always)]
142 pub fn is_trigger(&self) -> bool {
143 *self == Wupdc17::Trigger
144 }
145 #[doc = "Reserved"]
146 #[inline(always)]
147 pub fn is_res(&self) -> bool {
148 *self == Wupdc17::Res
149 }
150}
151#[doc = "Field `WUPDC17` writer - Wake-up Pin Configuration for WUU_Pn"]
152pub type Wupdc17W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupdc17, crate::Safe>;
153impl<'a, REG> Wupdc17W<'a, REG>
154where
155 REG: crate::Writable + crate::RegisterSpec,
156 REG::Ux: From<u8>,
157{
158 #[doc = "Interrupt"]
159 #[inline(always)]
160 pub fn interrupt(self) -> &'a mut crate::W<REG> {
161 self.variant(Wupdc17::Interrupt)
162 }
163 #[doc = "DMA request"]
164 #[inline(always)]
165 pub fn dma_req(self) -> &'a mut crate::W<REG> {
166 self.variant(Wupdc17::DmaReq)
167 }
168 #[doc = "Trigger event"]
169 #[inline(always)]
170 pub fn trigger(self) -> &'a mut crate::W<REG> {
171 self.variant(Wupdc17::Trigger)
172 }
173 #[doc = "Reserved"]
174 #[inline(always)]
175 pub fn res(self) -> &'a mut crate::W<REG> {
176 self.variant(Wupdc17::Res)
177 }
178}
179#[doc = "Wake-up Pin Configuration for WUU_Pn\n\nValue on reset: 0"]
180#[cfg_attr(feature = "defmt", derive(defmt::Format))]
181#[derive(Clone, Copy, Debug, PartialEq, Eq)]
182#[repr(u8)]
183pub enum Wupdc18 {
184 #[doc = "0: Interrupt"]
185 Interrupt = 0,
186 #[doc = "1: DMA request"]
187 DmaReq = 1,
188 #[doc = "2: Trigger event"]
189 Trigger = 2,
190 #[doc = "3: Reserved"]
191 Res = 3,
192}
193impl From<Wupdc18> for u8 {
194 #[inline(always)]
195 fn from(variant: Wupdc18) -> Self {
196 variant as _
197 }
198}
199impl crate::FieldSpec for Wupdc18 {
200 type Ux = u8;
201}
202impl crate::IsEnum for Wupdc18 {}
203#[doc = "Field `WUPDC18` reader - Wake-up Pin Configuration for WUU_Pn"]
204pub type Wupdc18R = crate::FieldReader<Wupdc18>;
205impl Wupdc18R {
206 #[doc = "Get enumerated values variant"]
207 #[inline(always)]
208 pub const fn variant(&self) -> Wupdc18 {
209 match self.bits {
210 0 => Wupdc18::Interrupt,
211 1 => Wupdc18::DmaReq,
212 2 => Wupdc18::Trigger,
213 3 => Wupdc18::Res,
214 _ => unreachable!(),
215 }
216 }
217 #[doc = "Interrupt"]
218 #[inline(always)]
219 pub fn is_interrupt(&self) -> bool {
220 *self == Wupdc18::Interrupt
221 }
222 #[doc = "DMA request"]
223 #[inline(always)]
224 pub fn is_dma_req(&self) -> bool {
225 *self == Wupdc18::DmaReq
226 }
227 #[doc = "Trigger event"]
228 #[inline(always)]
229 pub fn is_trigger(&self) -> bool {
230 *self == Wupdc18::Trigger
231 }
232 #[doc = "Reserved"]
233 #[inline(always)]
234 pub fn is_res(&self) -> bool {
235 *self == Wupdc18::Res
236 }
237}
238#[doc = "Field `WUPDC18` writer - Wake-up Pin Configuration for WUU_Pn"]
239pub type Wupdc18W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupdc18, crate::Safe>;
240impl<'a, REG> Wupdc18W<'a, REG>
241where
242 REG: crate::Writable + crate::RegisterSpec,
243 REG::Ux: From<u8>,
244{
245 #[doc = "Interrupt"]
246 #[inline(always)]
247 pub fn interrupt(self) -> &'a mut crate::W<REG> {
248 self.variant(Wupdc18::Interrupt)
249 }
250 #[doc = "DMA request"]
251 #[inline(always)]
252 pub fn dma_req(self) -> &'a mut crate::W<REG> {
253 self.variant(Wupdc18::DmaReq)
254 }
255 #[doc = "Trigger event"]
256 #[inline(always)]
257 pub fn trigger(self) -> &'a mut crate::W<REG> {
258 self.variant(Wupdc18::Trigger)
259 }
260 #[doc = "Reserved"]
261 #[inline(always)]
262 pub fn res(self) -> &'a mut crate::W<REG> {
263 self.variant(Wupdc18::Res)
264 }
265}
266#[doc = "Wake-up Pin Configuration for WUU_Pn\n\nValue on reset: 0"]
267#[cfg_attr(feature = "defmt", derive(defmt::Format))]
268#[derive(Clone, Copy, Debug, PartialEq, Eq)]
269#[repr(u8)]
270pub enum Wupdc19 {
271 #[doc = "0: Interrupt"]
272 Interrupt = 0,
273 #[doc = "1: DMA request"]
274 DmaReq = 1,
275 #[doc = "2: Trigger event"]
276 Trigger = 2,
277 #[doc = "3: Reserved"]
278 Res = 3,
279}
280impl From<Wupdc19> for u8 {
281 #[inline(always)]
282 fn from(variant: Wupdc19) -> Self {
283 variant as _
284 }
285}
286impl crate::FieldSpec for Wupdc19 {
287 type Ux = u8;
288}
289impl crate::IsEnum for Wupdc19 {}
290#[doc = "Field `WUPDC19` reader - Wake-up Pin Configuration for WUU_Pn"]
291pub type Wupdc19R = crate::FieldReader<Wupdc19>;
292impl Wupdc19R {
293 #[doc = "Get enumerated values variant"]
294 #[inline(always)]
295 pub const fn variant(&self) -> Wupdc19 {
296 match self.bits {
297 0 => Wupdc19::Interrupt,
298 1 => Wupdc19::DmaReq,
299 2 => Wupdc19::Trigger,
300 3 => Wupdc19::Res,
301 _ => unreachable!(),
302 }
303 }
304 #[doc = "Interrupt"]
305 #[inline(always)]
306 pub fn is_interrupt(&self) -> bool {
307 *self == Wupdc19::Interrupt
308 }
309 #[doc = "DMA request"]
310 #[inline(always)]
311 pub fn is_dma_req(&self) -> bool {
312 *self == Wupdc19::DmaReq
313 }
314 #[doc = "Trigger event"]
315 #[inline(always)]
316 pub fn is_trigger(&self) -> bool {
317 *self == Wupdc19::Trigger
318 }
319 #[doc = "Reserved"]
320 #[inline(always)]
321 pub fn is_res(&self) -> bool {
322 *self == Wupdc19::Res
323 }
324}
325#[doc = "Field `WUPDC19` writer - Wake-up Pin Configuration for WUU_Pn"]
326pub type Wupdc19W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupdc19, crate::Safe>;
327impl<'a, REG> Wupdc19W<'a, REG>
328where
329 REG: crate::Writable + crate::RegisterSpec,
330 REG::Ux: From<u8>,
331{
332 #[doc = "Interrupt"]
333 #[inline(always)]
334 pub fn interrupt(self) -> &'a mut crate::W<REG> {
335 self.variant(Wupdc19::Interrupt)
336 }
337 #[doc = "DMA request"]
338 #[inline(always)]
339 pub fn dma_req(self) -> &'a mut crate::W<REG> {
340 self.variant(Wupdc19::DmaReq)
341 }
342 #[doc = "Trigger event"]
343 #[inline(always)]
344 pub fn trigger(self) -> &'a mut crate::W<REG> {
345 self.variant(Wupdc19::Trigger)
346 }
347 #[doc = "Reserved"]
348 #[inline(always)]
349 pub fn res(self) -> &'a mut crate::W<REG> {
350 self.variant(Wupdc19::Res)
351 }
352}
353#[doc = "Wake-up Pin Configuration for WUU_Pn\n\nValue on reset: 0"]
354#[cfg_attr(feature = "defmt", derive(defmt::Format))]
355#[derive(Clone, Copy, Debug, PartialEq, Eq)]
356#[repr(u8)]
357pub enum Wupdc20 {
358 #[doc = "0: Interrupt"]
359 Interrupt = 0,
360 #[doc = "1: DMA request"]
361 DmaReq = 1,
362 #[doc = "2: Trigger event"]
363 Trigger = 2,
364 #[doc = "3: Reserved"]
365 Res = 3,
366}
367impl From<Wupdc20> for u8 {
368 #[inline(always)]
369 fn from(variant: Wupdc20) -> Self {
370 variant as _
371 }
372}
373impl crate::FieldSpec for Wupdc20 {
374 type Ux = u8;
375}
376impl crate::IsEnum for Wupdc20 {}
377#[doc = "Field `WUPDC20` reader - Wake-up Pin Configuration for WUU_Pn"]
378pub type Wupdc20R = crate::FieldReader<Wupdc20>;
379impl Wupdc20R {
380 #[doc = "Get enumerated values variant"]
381 #[inline(always)]
382 pub const fn variant(&self) -> Wupdc20 {
383 match self.bits {
384 0 => Wupdc20::Interrupt,
385 1 => Wupdc20::DmaReq,
386 2 => Wupdc20::Trigger,
387 3 => Wupdc20::Res,
388 _ => unreachable!(),
389 }
390 }
391 #[doc = "Interrupt"]
392 #[inline(always)]
393 pub fn is_interrupt(&self) -> bool {
394 *self == Wupdc20::Interrupt
395 }
396 #[doc = "DMA request"]
397 #[inline(always)]
398 pub fn is_dma_req(&self) -> bool {
399 *self == Wupdc20::DmaReq
400 }
401 #[doc = "Trigger event"]
402 #[inline(always)]
403 pub fn is_trigger(&self) -> bool {
404 *self == Wupdc20::Trigger
405 }
406 #[doc = "Reserved"]
407 #[inline(always)]
408 pub fn is_res(&self) -> bool {
409 *self == Wupdc20::Res
410 }
411}
412#[doc = "Field `WUPDC20` writer - Wake-up Pin Configuration for WUU_Pn"]
413pub type Wupdc20W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupdc20, crate::Safe>;
414impl<'a, REG> Wupdc20W<'a, REG>
415where
416 REG: crate::Writable + crate::RegisterSpec,
417 REG::Ux: From<u8>,
418{
419 #[doc = "Interrupt"]
420 #[inline(always)]
421 pub fn interrupt(self) -> &'a mut crate::W<REG> {
422 self.variant(Wupdc20::Interrupt)
423 }
424 #[doc = "DMA request"]
425 #[inline(always)]
426 pub fn dma_req(self) -> &'a mut crate::W<REG> {
427 self.variant(Wupdc20::DmaReq)
428 }
429 #[doc = "Trigger event"]
430 #[inline(always)]
431 pub fn trigger(self) -> &'a mut crate::W<REG> {
432 self.variant(Wupdc20::Trigger)
433 }
434 #[doc = "Reserved"]
435 #[inline(always)]
436 pub fn res(self) -> &'a mut crate::W<REG> {
437 self.variant(Wupdc20::Res)
438 }
439}
440#[doc = "Wake-up Pin Configuration for WUU_Pn\n\nValue on reset: 0"]
441#[cfg_attr(feature = "defmt", derive(defmt::Format))]
442#[derive(Clone, Copy, Debug, PartialEq, Eq)]
443#[repr(u8)]
444pub enum Wupdc21 {
445 #[doc = "0: Interrupt"]
446 Interrupt = 0,
447 #[doc = "1: DMA request"]
448 DmaReq = 1,
449 #[doc = "2: Trigger event"]
450 Trigger = 2,
451 #[doc = "3: Reserved"]
452 Res = 3,
453}
454impl From<Wupdc21> for u8 {
455 #[inline(always)]
456 fn from(variant: Wupdc21) -> Self {
457 variant as _
458 }
459}
460impl crate::FieldSpec for Wupdc21 {
461 type Ux = u8;
462}
463impl crate::IsEnum for Wupdc21 {}
464#[doc = "Field `WUPDC21` reader - Wake-up Pin Configuration for WUU_Pn"]
465pub type Wupdc21R = crate::FieldReader<Wupdc21>;
466impl Wupdc21R {
467 #[doc = "Get enumerated values variant"]
468 #[inline(always)]
469 pub const fn variant(&self) -> Wupdc21 {
470 match self.bits {
471 0 => Wupdc21::Interrupt,
472 1 => Wupdc21::DmaReq,
473 2 => Wupdc21::Trigger,
474 3 => Wupdc21::Res,
475 _ => unreachable!(),
476 }
477 }
478 #[doc = "Interrupt"]
479 #[inline(always)]
480 pub fn is_interrupt(&self) -> bool {
481 *self == Wupdc21::Interrupt
482 }
483 #[doc = "DMA request"]
484 #[inline(always)]
485 pub fn is_dma_req(&self) -> bool {
486 *self == Wupdc21::DmaReq
487 }
488 #[doc = "Trigger event"]
489 #[inline(always)]
490 pub fn is_trigger(&self) -> bool {
491 *self == Wupdc21::Trigger
492 }
493 #[doc = "Reserved"]
494 #[inline(always)]
495 pub fn is_res(&self) -> bool {
496 *self == Wupdc21::Res
497 }
498}
499#[doc = "Field `WUPDC21` writer - Wake-up Pin Configuration for WUU_Pn"]
500pub type Wupdc21W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupdc21, crate::Safe>;
501impl<'a, REG> Wupdc21W<'a, REG>
502where
503 REG: crate::Writable + crate::RegisterSpec,
504 REG::Ux: From<u8>,
505{
506 #[doc = "Interrupt"]
507 #[inline(always)]
508 pub fn interrupt(self) -> &'a mut crate::W<REG> {
509 self.variant(Wupdc21::Interrupt)
510 }
511 #[doc = "DMA request"]
512 #[inline(always)]
513 pub fn dma_req(self) -> &'a mut crate::W<REG> {
514 self.variant(Wupdc21::DmaReq)
515 }
516 #[doc = "Trigger event"]
517 #[inline(always)]
518 pub fn trigger(self) -> &'a mut crate::W<REG> {
519 self.variant(Wupdc21::Trigger)
520 }
521 #[doc = "Reserved"]
522 #[inline(always)]
523 pub fn res(self) -> &'a mut crate::W<REG> {
524 self.variant(Wupdc21::Res)
525 }
526}
527#[doc = "Wake-up Pin Configuration for WUU_Pn\n\nValue on reset: 0"]
528#[cfg_attr(feature = "defmt", derive(defmt::Format))]
529#[derive(Clone, Copy, Debug, PartialEq, Eq)]
530#[repr(u8)]
531pub enum Wupdc22 {
532 #[doc = "0: Interrupt"]
533 Interrupt = 0,
534 #[doc = "1: DMA request"]
535 DmaReq = 1,
536 #[doc = "2: Trigger event"]
537 Trigger = 2,
538 #[doc = "3: Reserved"]
539 Res = 3,
540}
541impl From<Wupdc22> for u8 {
542 #[inline(always)]
543 fn from(variant: Wupdc22) -> Self {
544 variant as _
545 }
546}
547impl crate::FieldSpec for Wupdc22 {
548 type Ux = u8;
549}
550impl crate::IsEnum for Wupdc22 {}
551#[doc = "Field `WUPDC22` reader - Wake-up Pin Configuration for WUU_Pn"]
552pub type Wupdc22R = crate::FieldReader<Wupdc22>;
553impl Wupdc22R {
554 #[doc = "Get enumerated values variant"]
555 #[inline(always)]
556 pub const fn variant(&self) -> Wupdc22 {
557 match self.bits {
558 0 => Wupdc22::Interrupt,
559 1 => Wupdc22::DmaReq,
560 2 => Wupdc22::Trigger,
561 3 => Wupdc22::Res,
562 _ => unreachable!(),
563 }
564 }
565 #[doc = "Interrupt"]
566 #[inline(always)]
567 pub fn is_interrupt(&self) -> bool {
568 *self == Wupdc22::Interrupt
569 }
570 #[doc = "DMA request"]
571 #[inline(always)]
572 pub fn is_dma_req(&self) -> bool {
573 *self == Wupdc22::DmaReq
574 }
575 #[doc = "Trigger event"]
576 #[inline(always)]
577 pub fn is_trigger(&self) -> bool {
578 *self == Wupdc22::Trigger
579 }
580 #[doc = "Reserved"]
581 #[inline(always)]
582 pub fn is_res(&self) -> bool {
583 *self == Wupdc22::Res
584 }
585}
586#[doc = "Field `WUPDC22` writer - Wake-up Pin Configuration for WUU_Pn"]
587pub type Wupdc22W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupdc22, crate::Safe>;
588impl<'a, REG> Wupdc22W<'a, REG>
589where
590 REG: crate::Writable + crate::RegisterSpec,
591 REG::Ux: From<u8>,
592{
593 #[doc = "Interrupt"]
594 #[inline(always)]
595 pub fn interrupt(self) -> &'a mut crate::W<REG> {
596 self.variant(Wupdc22::Interrupt)
597 }
598 #[doc = "DMA request"]
599 #[inline(always)]
600 pub fn dma_req(self) -> &'a mut crate::W<REG> {
601 self.variant(Wupdc22::DmaReq)
602 }
603 #[doc = "Trigger event"]
604 #[inline(always)]
605 pub fn trigger(self) -> &'a mut crate::W<REG> {
606 self.variant(Wupdc22::Trigger)
607 }
608 #[doc = "Reserved"]
609 #[inline(always)]
610 pub fn res(self) -> &'a mut crate::W<REG> {
611 self.variant(Wupdc22::Res)
612 }
613}
614#[doc = "Wake-up Pin Configuration for WUU_Pn\n\nValue on reset: 0"]
615#[cfg_attr(feature = "defmt", derive(defmt::Format))]
616#[derive(Clone, Copy, Debug, PartialEq, Eq)]
617#[repr(u8)]
618pub enum Wupdc23 {
619 #[doc = "0: Interrupt"]
620 Interrupt = 0,
621 #[doc = "1: DMA request"]
622 DmaReq = 1,
623 #[doc = "2: Trigger event"]
624 Trigger = 2,
625 #[doc = "3: Reserved"]
626 Res = 3,
627}
628impl From<Wupdc23> for u8 {
629 #[inline(always)]
630 fn from(variant: Wupdc23) -> Self {
631 variant as _
632 }
633}
634impl crate::FieldSpec for Wupdc23 {
635 type Ux = u8;
636}
637impl crate::IsEnum for Wupdc23 {}
638#[doc = "Field `WUPDC23` reader - Wake-up Pin Configuration for WUU_Pn"]
639pub type Wupdc23R = crate::FieldReader<Wupdc23>;
640impl Wupdc23R {
641 #[doc = "Get enumerated values variant"]
642 #[inline(always)]
643 pub const fn variant(&self) -> Wupdc23 {
644 match self.bits {
645 0 => Wupdc23::Interrupt,
646 1 => Wupdc23::DmaReq,
647 2 => Wupdc23::Trigger,
648 3 => Wupdc23::Res,
649 _ => unreachable!(),
650 }
651 }
652 #[doc = "Interrupt"]
653 #[inline(always)]
654 pub fn is_interrupt(&self) -> bool {
655 *self == Wupdc23::Interrupt
656 }
657 #[doc = "DMA request"]
658 #[inline(always)]
659 pub fn is_dma_req(&self) -> bool {
660 *self == Wupdc23::DmaReq
661 }
662 #[doc = "Trigger event"]
663 #[inline(always)]
664 pub fn is_trigger(&self) -> bool {
665 *self == Wupdc23::Trigger
666 }
667 #[doc = "Reserved"]
668 #[inline(always)]
669 pub fn is_res(&self) -> bool {
670 *self == Wupdc23::Res
671 }
672}
673#[doc = "Field `WUPDC23` writer - Wake-up Pin Configuration for WUU_Pn"]
674pub type Wupdc23W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupdc23, crate::Safe>;
675impl<'a, REG> Wupdc23W<'a, REG>
676where
677 REG: crate::Writable + crate::RegisterSpec,
678 REG::Ux: From<u8>,
679{
680 #[doc = "Interrupt"]
681 #[inline(always)]
682 pub fn interrupt(self) -> &'a mut crate::W<REG> {
683 self.variant(Wupdc23::Interrupt)
684 }
685 #[doc = "DMA request"]
686 #[inline(always)]
687 pub fn dma_req(self) -> &'a mut crate::W<REG> {
688 self.variant(Wupdc23::DmaReq)
689 }
690 #[doc = "Trigger event"]
691 #[inline(always)]
692 pub fn trigger(self) -> &'a mut crate::W<REG> {
693 self.variant(Wupdc23::Trigger)
694 }
695 #[doc = "Reserved"]
696 #[inline(always)]
697 pub fn res(self) -> &'a mut crate::W<REG> {
698 self.variant(Wupdc23::Res)
699 }
700}
701#[doc = "Wake-up Pin Configuration for WUU_Pn\n\nValue on reset: 0"]
702#[cfg_attr(feature = "defmt", derive(defmt::Format))]
703#[derive(Clone, Copy, Debug, PartialEq, Eq)]
704#[repr(u8)]
705pub enum Wupdc24 {
706 #[doc = "0: Interrupt"]
707 Interrupt = 0,
708 #[doc = "1: DMA request"]
709 DmaReq = 1,
710 #[doc = "2: Trigger event"]
711 Trigger = 2,
712 #[doc = "3: Reserved"]
713 Res = 3,
714}
715impl From<Wupdc24> for u8 {
716 #[inline(always)]
717 fn from(variant: Wupdc24) -> Self {
718 variant as _
719 }
720}
721impl crate::FieldSpec for Wupdc24 {
722 type Ux = u8;
723}
724impl crate::IsEnum for Wupdc24 {}
725#[doc = "Field `WUPDC24` reader - Wake-up Pin Configuration for WUU_Pn"]
726pub type Wupdc24R = crate::FieldReader<Wupdc24>;
727impl Wupdc24R {
728 #[doc = "Get enumerated values variant"]
729 #[inline(always)]
730 pub const fn variant(&self) -> Wupdc24 {
731 match self.bits {
732 0 => Wupdc24::Interrupt,
733 1 => Wupdc24::DmaReq,
734 2 => Wupdc24::Trigger,
735 3 => Wupdc24::Res,
736 _ => unreachable!(),
737 }
738 }
739 #[doc = "Interrupt"]
740 #[inline(always)]
741 pub fn is_interrupt(&self) -> bool {
742 *self == Wupdc24::Interrupt
743 }
744 #[doc = "DMA request"]
745 #[inline(always)]
746 pub fn is_dma_req(&self) -> bool {
747 *self == Wupdc24::DmaReq
748 }
749 #[doc = "Trigger event"]
750 #[inline(always)]
751 pub fn is_trigger(&self) -> bool {
752 *self == Wupdc24::Trigger
753 }
754 #[doc = "Reserved"]
755 #[inline(always)]
756 pub fn is_res(&self) -> bool {
757 *self == Wupdc24::Res
758 }
759}
760#[doc = "Field `WUPDC24` writer - Wake-up Pin Configuration for WUU_Pn"]
761pub type Wupdc24W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupdc24, crate::Safe>;
762impl<'a, REG> Wupdc24W<'a, REG>
763where
764 REG: crate::Writable + crate::RegisterSpec,
765 REG::Ux: From<u8>,
766{
767 #[doc = "Interrupt"]
768 #[inline(always)]
769 pub fn interrupt(self) -> &'a mut crate::W<REG> {
770 self.variant(Wupdc24::Interrupt)
771 }
772 #[doc = "DMA request"]
773 #[inline(always)]
774 pub fn dma_req(self) -> &'a mut crate::W<REG> {
775 self.variant(Wupdc24::DmaReq)
776 }
777 #[doc = "Trigger event"]
778 #[inline(always)]
779 pub fn trigger(self) -> &'a mut crate::W<REG> {
780 self.variant(Wupdc24::Trigger)
781 }
782 #[doc = "Reserved"]
783 #[inline(always)]
784 pub fn res(self) -> &'a mut crate::W<REG> {
785 self.variant(Wupdc24::Res)
786 }
787}
788#[doc = "Wake-up Pin Configuration for WUU_Pn\n\nValue on reset: 0"]
789#[cfg_attr(feature = "defmt", derive(defmt::Format))]
790#[derive(Clone, Copy, Debug, PartialEq, Eq)]
791#[repr(u8)]
792pub enum Wupdc25 {
793 #[doc = "0: Interrupt"]
794 Interrupt = 0,
795 #[doc = "1: DMA request"]
796 DmaReq = 1,
797 #[doc = "2: Trigger event"]
798 Trigger = 2,
799 #[doc = "3: Reserved"]
800 Res = 3,
801}
802impl From<Wupdc25> for u8 {
803 #[inline(always)]
804 fn from(variant: Wupdc25) -> Self {
805 variant as _
806 }
807}
808impl crate::FieldSpec for Wupdc25 {
809 type Ux = u8;
810}
811impl crate::IsEnum for Wupdc25 {}
812#[doc = "Field `WUPDC25` reader - Wake-up Pin Configuration for WUU_Pn"]
813pub type Wupdc25R = crate::FieldReader<Wupdc25>;
814impl Wupdc25R {
815 #[doc = "Get enumerated values variant"]
816 #[inline(always)]
817 pub const fn variant(&self) -> Wupdc25 {
818 match self.bits {
819 0 => Wupdc25::Interrupt,
820 1 => Wupdc25::DmaReq,
821 2 => Wupdc25::Trigger,
822 3 => Wupdc25::Res,
823 _ => unreachable!(),
824 }
825 }
826 #[doc = "Interrupt"]
827 #[inline(always)]
828 pub fn is_interrupt(&self) -> bool {
829 *self == Wupdc25::Interrupt
830 }
831 #[doc = "DMA request"]
832 #[inline(always)]
833 pub fn is_dma_req(&self) -> bool {
834 *self == Wupdc25::DmaReq
835 }
836 #[doc = "Trigger event"]
837 #[inline(always)]
838 pub fn is_trigger(&self) -> bool {
839 *self == Wupdc25::Trigger
840 }
841 #[doc = "Reserved"]
842 #[inline(always)]
843 pub fn is_res(&self) -> bool {
844 *self == Wupdc25::Res
845 }
846}
847#[doc = "Field `WUPDC25` writer - Wake-up Pin Configuration for WUU_Pn"]
848pub type Wupdc25W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupdc25, crate::Safe>;
849impl<'a, REG> Wupdc25W<'a, REG>
850where
851 REG: crate::Writable + crate::RegisterSpec,
852 REG::Ux: From<u8>,
853{
854 #[doc = "Interrupt"]
855 #[inline(always)]
856 pub fn interrupt(self) -> &'a mut crate::W<REG> {
857 self.variant(Wupdc25::Interrupt)
858 }
859 #[doc = "DMA request"]
860 #[inline(always)]
861 pub fn dma_req(self) -> &'a mut crate::W<REG> {
862 self.variant(Wupdc25::DmaReq)
863 }
864 #[doc = "Trigger event"]
865 #[inline(always)]
866 pub fn trigger(self) -> &'a mut crate::W<REG> {
867 self.variant(Wupdc25::Trigger)
868 }
869 #[doc = "Reserved"]
870 #[inline(always)]
871 pub fn res(self) -> &'a mut crate::W<REG> {
872 self.variant(Wupdc25::Res)
873 }
874}
875#[doc = "Wake-up Pin Configuration for WUU_Pn\n\nValue on reset: 0"]
876#[cfg_attr(feature = "defmt", derive(defmt::Format))]
877#[derive(Clone, Copy, Debug, PartialEq, Eq)]
878#[repr(u8)]
879pub enum Wupdc26 {
880 #[doc = "0: Interrupt"]
881 Interrupt = 0,
882 #[doc = "1: DMA request"]
883 DmaReq = 1,
884 #[doc = "2: Trigger event"]
885 Trigger = 2,
886 #[doc = "3: Reserved"]
887 Res = 3,
888}
889impl From<Wupdc26> for u8 {
890 #[inline(always)]
891 fn from(variant: Wupdc26) -> Self {
892 variant as _
893 }
894}
895impl crate::FieldSpec for Wupdc26 {
896 type Ux = u8;
897}
898impl crate::IsEnum for Wupdc26 {}
899#[doc = "Field `WUPDC26` reader - Wake-up Pin Configuration for WUU_Pn"]
900pub type Wupdc26R = crate::FieldReader<Wupdc26>;
901impl Wupdc26R {
902 #[doc = "Get enumerated values variant"]
903 #[inline(always)]
904 pub const fn variant(&self) -> Wupdc26 {
905 match self.bits {
906 0 => Wupdc26::Interrupt,
907 1 => Wupdc26::DmaReq,
908 2 => Wupdc26::Trigger,
909 3 => Wupdc26::Res,
910 _ => unreachable!(),
911 }
912 }
913 #[doc = "Interrupt"]
914 #[inline(always)]
915 pub fn is_interrupt(&self) -> bool {
916 *self == Wupdc26::Interrupt
917 }
918 #[doc = "DMA request"]
919 #[inline(always)]
920 pub fn is_dma_req(&self) -> bool {
921 *self == Wupdc26::DmaReq
922 }
923 #[doc = "Trigger event"]
924 #[inline(always)]
925 pub fn is_trigger(&self) -> bool {
926 *self == Wupdc26::Trigger
927 }
928 #[doc = "Reserved"]
929 #[inline(always)]
930 pub fn is_res(&self) -> bool {
931 *self == Wupdc26::Res
932 }
933}
934#[doc = "Field `WUPDC26` writer - Wake-up Pin Configuration for WUU_Pn"]
935pub type Wupdc26W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupdc26, crate::Safe>;
936impl<'a, REG> Wupdc26W<'a, REG>
937where
938 REG: crate::Writable + crate::RegisterSpec,
939 REG::Ux: From<u8>,
940{
941 #[doc = "Interrupt"]
942 #[inline(always)]
943 pub fn interrupt(self) -> &'a mut crate::W<REG> {
944 self.variant(Wupdc26::Interrupt)
945 }
946 #[doc = "DMA request"]
947 #[inline(always)]
948 pub fn dma_req(self) -> &'a mut crate::W<REG> {
949 self.variant(Wupdc26::DmaReq)
950 }
951 #[doc = "Trigger event"]
952 #[inline(always)]
953 pub fn trigger(self) -> &'a mut crate::W<REG> {
954 self.variant(Wupdc26::Trigger)
955 }
956 #[doc = "Reserved"]
957 #[inline(always)]
958 pub fn res(self) -> &'a mut crate::W<REG> {
959 self.variant(Wupdc26::Res)
960 }
961}
962#[doc = "Wake-up Pin Configuration for WUU_Pn\n\nValue on reset: 0"]
963#[cfg_attr(feature = "defmt", derive(defmt::Format))]
964#[derive(Clone, Copy, Debug, PartialEq, Eq)]
965#[repr(u8)]
966pub enum Wupdc27 {
967 #[doc = "0: Interrupt"]
968 Interrupt = 0,
969 #[doc = "1: DMA request"]
970 DmaReq = 1,
971 #[doc = "2: Trigger event"]
972 Trigger = 2,
973 #[doc = "3: Reserved"]
974 Res = 3,
975}
976impl From<Wupdc27> for u8 {
977 #[inline(always)]
978 fn from(variant: Wupdc27) -> Self {
979 variant as _
980 }
981}
982impl crate::FieldSpec for Wupdc27 {
983 type Ux = u8;
984}
985impl crate::IsEnum for Wupdc27 {}
986#[doc = "Field `WUPDC27` reader - Wake-up Pin Configuration for WUU_Pn"]
987pub type Wupdc27R = crate::FieldReader<Wupdc27>;
988impl Wupdc27R {
989 #[doc = "Get enumerated values variant"]
990 #[inline(always)]
991 pub const fn variant(&self) -> Wupdc27 {
992 match self.bits {
993 0 => Wupdc27::Interrupt,
994 1 => Wupdc27::DmaReq,
995 2 => Wupdc27::Trigger,
996 3 => Wupdc27::Res,
997 _ => unreachable!(),
998 }
999 }
1000 #[doc = "Interrupt"]
1001 #[inline(always)]
1002 pub fn is_interrupt(&self) -> bool {
1003 *self == Wupdc27::Interrupt
1004 }
1005 #[doc = "DMA request"]
1006 #[inline(always)]
1007 pub fn is_dma_req(&self) -> bool {
1008 *self == Wupdc27::DmaReq
1009 }
1010 #[doc = "Trigger event"]
1011 #[inline(always)]
1012 pub fn is_trigger(&self) -> bool {
1013 *self == Wupdc27::Trigger
1014 }
1015 #[doc = "Reserved"]
1016 #[inline(always)]
1017 pub fn is_res(&self) -> bool {
1018 *self == Wupdc27::Res
1019 }
1020}
1021#[doc = "Field `WUPDC27` writer - Wake-up Pin Configuration for WUU_Pn"]
1022pub type Wupdc27W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupdc27, crate::Safe>;
1023impl<'a, REG> Wupdc27W<'a, REG>
1024where
1025 REG: crate::Writable + crate::RegisterSpec,
1026 REG::Ux: From<u8>,
1027{
1028 #[doc = "Interrupt"]
1029 #[inline(always)]
1030 pub fn interrupt(self) -> &'a mut crate::W<REG> {
1031 self.variant(Wupdc27::Interrupt)
1032 }
1033 #[doc = "DMA request"]
1034 #[inline(always)]
1035 pub fn dma_req(self) -> &'a mut crate::W<REG> {
1036 self.variant(Wupdc27::DmaReq)
1037 }
1038 #[doc = "Trigger event"]
1039 #[inline(always)]
1040 pub fn trigger(self) -> &'a mut crate::W<REG> {
1041 self.variant(Wupdc27::Trigger)
1042 }
1043 #[doc = "Reserved"]
1044 #[inline(always)]
1045 pub fn res(self) -> &'a mut crate::W<REG> {
1046 self.variant(Wupdc27::Res)
1047 }
1048}
1049#[doc = "Wake-up Pin Configuration for WUU_Pn\n\nValue on reset: 0"]
1050#[cfg_attr(feature = "defmt", derive(defmt::Format))]
1051#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1052#[repr(u8)]
1053pub enum Wupdc28 {
1054 #[doc = "0: Interrupt"]
1055 Interrupt = 0,
1056 #[doc = "1: DMA request"]
1057 DmaReq = 1,
1058 #[doc = "2: Trigger event"]
1059 Trigger = 2,
1060 #[doc = "3: Reserved"]
1061 Res = 3,
1062}
1063impl From<Wupdc28> for u8 {
1064 #[inline(always)]
1065 fn from(variant: Wupdc28) -> Self {
1066 variant as _
1067 }
1068}
1069impl crate::FieldSpec for Wupdc28 {
1070 type Ux = u8;
1071}
1072impl crate::IsEnum for Wupdc28 {}
1073#[doc = "Field `WUPDC28` reader - Wake-up Pin Configuration for WUU_Pn"]
1074pub type Wupdc28R = crate::FieldReader<Wupdc28>;
1075impl Wupdc28R {
1076 #[doc = "Get enumerated values variant"]
1077 #[inline(always)]
1078 pub const fn variant(&self) -> Wupdc28 {
1079 match self.bits {
1080 0 => Wupdc28::Interrupt,
1081 1 => Wupdc28::DmaReq,
1082 2 => Wupdc28::Trigger,
1083 3 => Wupdc28::Res,
1084 _ => unreachable!(),
1085 }
1086 }
1087 #[doc = "Interrupt"]
1088 #[inline(always)]
1089 pub fn is_interrupt(&self) -> bool {
1090 *self == Wupdc28::Interrupt
1091 }
1092 #[doc = "DMA request"]
1093 #[inline(always)]
1094 pub fn is_dma_req(&self) -> bool {
1095 *self == Wupdc28::DmaReq
1096 }
1097 #[doc = "Trigger event"]
1098 #[inline(always)]
1099 pub fn is_trigger(&self) -> bool {
1100 *self == Wupdc28::Trigger
1101 }
1102 #[doc = "Reserved"]
1103 #[inline(always)]
1104 pub fn is_res(&self) -> bool {
1105 *self == Wupdc28::Res
1106 }
1107}
1108#[doc = "Field `WUPDC28` writer - Wake-up Pin Configuration for WUU_Pn"]
1109pub type Wupdc28W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupdc28, crate::Safe>;
1110impl<'a, REG> Wupdc28W<'a, REG>
1111where
1112 REG: crate::Writable + crate::RegisterSpec,
1113 REG::Ux: From<u8>,
1114{
1115 #[doc = "Interrupt"]
1116 #[inline(always)]
1117 pub fn interrupt(self) -> &'a mut crate::W<REG> {
1118 self.variant(Wupdc28::Interrupt)
1119 }
1120 #[doc = "DMA request"]
1121 #[inline(always)]
1122 pub fn dma_req(self) -> &'a mut crate::W<REG> {
1123 self.variant(Wupdc28::DmaReq)
1124 }
1125 #[doc = "Trigger event"]
1126 #[inline(always)]
1127 pub fn trigger(self) -> &'a mut crate::W<REG> {
1128 self.variant(Wupdc28::Trigger)
1129 }
1130 #[doc = "Reserved"]
1131 #[inline(always)]
1132 pub fn res(self) -> &'a mut crate::W<REG> {
1133 self.variant(Wupdc28::Res)
1134 }
1135}
1136#[doc = "Wake-up Pin Configuration for WUU_Pn\n\nValue on reset: 0"]
1137#[cfg_attr(feature = "defmt", derive(defmt::Format))]
1138#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1139#[repr(u8)]
1140pub enum Wupdc29 {
1141 #[doc = "0: Interrupt"]
1142 Interrupt = 0,
1143 #[doc = "1: DMA request"]
1144 DmaReq = 1,
1145 #[doc = "2: Trigger event"]
1146 Trigger = 2,
1147 #[doc = "3: Reserved"]
1148 Res = 3,
1149}
1150impl From<Wupdc29> for u8 {
1151 #[inline(always)]
1152 fn from(variant: Wupdc29) -> Self {
1153 variant as _
1154 }
1155}
1156impl crate::FieldSpec for Wupdc29 {
1157 type Ux = u8;
1158}
1159impl crate::IsEnum for Wupdc29 {}
1160#[doc = "Field `WUPDC29` reader - Wake-up Pin Configuration for WUU_Pn"]
1161pub type Wupdc29R = crate::FieldReader<Wupdc29>;
1162impl Wupdc29R {
1163 #[doc = "Get enumerated values variant"]
1164 #[inline(always)]
1165 pub const fn variant(&self) -> Wupdc29 {
1166 match self.bits {
1167 0 => Wupdc29::Interrupt,
1168 1 => Wupdc29::DmaReq,
1169 2 => Wupdc29::Trigger,
1170 3 => Wupdc29::Res,
1171 _ => unreachable!(),
1172 }
1173 }
1174 #[doc = "Interrupt"]
1175 #[inline(always)]
1176 pub fn is_interrupt(&self) -> bool {
1177 *self == Wupdc29::Interrupt
1178 }
1179 #[doc = "DMA request"]
1180 #[inline(always)]
1181 pub fn is_dma_req(&self) -> bool {
1182 *self == Wupdc29::DmaReq
1183 }
1184 #[doc = "Trigger event"]
1185 #[inline(always)]
1186 pub fn is_trigger(&self) -> bool {
1187 *self == Wupdc29::Trigger
1188 }
1189 #[doc = "Reserved"]
1190 #[inline(always)]
1191 pub fn is_res(&self) -> bool {
1192 *self == Wupdc29::Res
1193 }
1194}
1195#[doc = "Field `WUPDC29` writer - Wake-up Pin Configuration for WUU_Pn"]
1196pub type Wupdc29W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupdc29, crate::Safe>;
1197impl<'a, REG> Wupdc29W<'a, REG>
1198where
1199 REG: crate::Writable + crate::RegisterSpec,
1200 REG::Ux: From<u8>,
1201{
1202 #[doc = "Interrupt"]
1203 #[inline(always)]
1204 pub fn interrupt(self) -> &'a mut crate::W<REG> {
1205 self.variant(Wupdc29::Interrupt)
1206 }
1207 #[doc = "DMA request"]
1208 #[inline(always)]
1209 pub fn dma_req(self) -> &'a mut crate::W<REG> {
1210 self.variant(Wupdc29::DmaReq)
1211 }
1212 #[doc = "Trigger event"]
1213 #[inline(always)]
1214 pub fn trigger(self) -> &'a mut crate::W<REG> {
1215 self.variant(Wupdc29::Trigger)
1216 }
1217 #[doc = "Reserved"]
1218 #[inline(always)]
1219 pub fn res(self) -> &'a mut crate::W<REG> {
1220 self.variant(Wupdc29::Res)
1221 }
1222}
1223#[doc = "Wake-up Pin Configuration for WUU_Pn\n\nValue on reset: 0"]
1224#[cfg_attr(feature = "defmt", derive(defmt::Format))]
1225#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1226#[repr(u8)]
1227pub enum Wupdc30 {
1228 #[doc = "0: Interrupt"]
1229 Interrupt = 0,
1230 #[doc = "1: DMA request"]
1231 DmaReq = 1,
1232 #[doc = "2: Trigger event"]
1233 Trigger = 2,
1234 #[doc = "3: Reserved"]
1235 Res = 3,
1236}
1237impl From<Wupdc30> for u8 {
1238 #[inline(always)]
1239 fn from(variant: Wupdc30) -> Self {
1240 variant as _
1241 }
1242}
1243impl crate::FieldSpec for Wupdc30 {
1244 type Ux = u8;
1245}
1246impl crate::IsEnum for Wupdc30 {}
1247#[doc = "Field `WUPDC30` reader - Wake-up Pin Configuration for WUU_Pn"]
1248pub type Wupdc30R = crate::FieldReader<Wupdc30>;
1249impl Wupdc30R {
1250 #[doc = "Get enumerated values variant"]
1251 #[inline(always)]
1252 pub const fn variant(&self) -> Wupdc30 {
1253 match self.bits {
1254 0 => Wupdc30::Interrupt,
1255 1 => Wupdc30::DmaReq,
1256 2 => Wupdc30::Trigger,
1257 3 => Wupdc30::Res,
1258 _ => unreachable!(),
1259 }
1260 }
1261 #[doc = "Interrupt"]
1262 #[inline(always)]
1263 pub fn is_interrupt(&self) -> bool {
1264 *self == Wupdc30::Interrupt
1265 }
1266 #[doc = "DMA request"]
1267 #[inline(always)]
1268 pub fn is_dma_req(&self) -> bool {
1269 *self == Wupdc30::DmaReq
1270 }
1271 #[doc = "Trigger event"]
1272 #[inline(always)]
1273 pub fn is_trigger(&self) -> bool {
1274 *self == Wupdc30::Trigger
1275 }
1276 #[doc = "Reserved"]
1277 #[inline(always)]
1278 pub fn is_res(&self) -> bool {
1279 *self == Wupdc30::Res
1280 }
1281}
1282#[doc = "Field `WUPDC30` writer - Wake-up Pin Configuration for WUU_Pn"]
1283pub type Wupdc30W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupdc30, crate::Safe>;
1284impl<'a, REG> Wupdc30W<'a, REG>
1285where
1286 REG: crate::Writable + crate::RegisterSpec,
1287 REG::Ux: From<u8>,
1288{
1289 #[doc = "Interrupt"]
1290 #[inline(always)]
1291 pub fn interrupt(self) -> &'a mut crate::W<REG> {
1292 self.variant(Wupdc30::Interrupt)
1293 }
1294 #[doc = "DMA request"]
1295 #[inline(always)]
1296 pub fn dma_req(self) -> &'a mut crate::W<REG> {
1297 self.variant(Wupdc30::DmaReq)
1298 }
1299 #[doc = "Trigger event"]
1300 #[inline(always)]
1301 pub fn trigger(self) -> &'a mut crate::W<REG> {
1302 self.variant(Wupdc30::Trigger)
1303 }
1304 #[doc = "Reserved"]
1305 #[inline(always)]
1306 pub fn res(self) -> &'a mut crate::W<REG> {
1307 self.variant(Wupdc30::Res)
1308 }
1309}
1310#[doc = "Wake-up Pin Configuration for WUU_Pn\n\nValue on reset: 0"]
1311#[cfg_attr(feature = "defmt", derive(defmt::Format))]
1312#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1313#[repr(u8)]
1314pub enum Wupdc31 {
1315 #[doc = "0: Interrupt"]
1316 Interrupt = 0,
1317 #[doc = "1: DMA request"]
1318 DmaReq = 1,
1319 #[doc = "2: Trigger event"]
1320 Trigger = 2,
1321 #[doc = "3: Reserved"]
1322 Res = 3,
1323}
1324impl From<Wupdc31> for u8 {
1325 #[inline(always)]
1326 fn from(variant: Wupdc31) -> Self {
1327 variant as _
1328 }
1329}
1330impl crate::FieldSpec for Wupdc31 {
1331 type Ux = u8;
1332}
1333impl crate::IsEnum for Wupdc31 {}
1334#[doc = "Field `WUPDC31` reader - Wake-up Pin Configuration for WUU_Pn"]
1335pub type Wupdc31R = crate::FieldReader<Wupdc31>;
1336impl Wupdc31R {
1337 #[doc = "Get enumerated values variant"]
1338 #[inline(always)]
1339 pub const fn variant(&self) -> Wupdc31 {
1340 match self.bits {
1341 0 => Wupdc31::Interrupt,
1342 1 => Wupdc31::DmaReq,
1343 2 => Wupdc31::Trigger,
1344 3 => Wupdc31::Res,
1345 _ => unreachable!(),
1346 }
1347 }
1348 #[doc = "Interrupt"]
1349 #[inline(always)]
1350 pub fn is_interrupt(&self) -> bool {
1351 *self == Wupdc31::Interrupt
1352 }
1353 #[doc = "DMA request"]
1354 #[inline(always)]
1355 pub fn is_dma_req(&self) -> bool {
1356 *self == Wupdc31::DmaReq
1357 }
1358 #[doc = "Trigger event"]
1359 #[inline(always)]
1360 pub fn is_trigger(&self) -> bool {
1361 *self == Wupdc31::Trigger
1362 }
1363 #[doc = "Reserved"]
1364 #[inline(always)]
1365 pub fn is_res(&self) -> bool {
1366 *self == Wupdc31::Res
1367 }
1368}
1369#[doc = "Field `WUPDC31` writer - Wake-up Pin Configuration for WUU_Pn"]
1370pub type Wupdc31W<'a, REG> = crate::FieldWriter<'a, REG, 2, Wupdc31, crate::Safe>;
1371impl<'a, REG> Wupdc31W<'a, REG>
1372where
1373 REG: crate::Writable + crate::RegisterSpec,
1374 REG::Ux: From<u8>,
1375{
1376 #[doc = "Interrupt"]
1377 #[inline(always)]
1378 pub fn interrupt(self) -> &'a mut crate::W<REG> {
1379 self.variant(Wupdc31::Interrupt)
1380 }
1381 #[doc = "DMA request"]
1382 #[inline(always)]
1383 pub fn dma_req(self) -> &'a mut crate::W<REG> {
1384 self.variant(Wupdc31::DmaReq)
1385 }
1386 #[doc = "Trigger event"]
1387 #[inline(always)]
1388 pub fn trigger(self) -> &'a mut crate::W<REG> {
1389 self.variant(Wupdc31::Trigger)
1390 }
1391 #[doc = "Reserved"]
1392 #[inline(always)]
1393 pub fn res(self) -> &'a mut crate::W<REG> {
1394 self.variant(Wupdc31::Res)
1395 }
1396}
1397impl R {
1398 #[doc = "Bits 0:1 - Wake-up Pin Configuration for WUU_Pn"]
1399 #[inline(always)]
1400 pub fn wupdc16(&self) -> Wupdc16R {
1401 Wupdc16R::new((self.bits & 3) as u8)
1402 }
1403 #[doc = "Bits 2:3 - Wake-up Pin Configuration for WUU_Pn"]
1404 #[inline(always)]
1405 pub fn wupdc17(&self) -> Wupdc17R {
1406 Wupdc17R::new(((self.bits >> 2) & 3) as u8)
1407 }
1408 #[doc = "Bits 4:5 - Wake-up Pin Configuration for WUU_Pn"]
1409 #[inline(always)]
1410 pub fn wupdc18(&self) -> Wupdc18R {
1411 Wupdc18R::new(((self.bits >> 4) & 3) as u8)
1412 }
1413 #[doc = "Bits 6:7 - Wake-up Pin Configuration for WUU_Pn"]
1414 #[inline(always)]
1415 pub fn wupdc19(&self) -> Wupdc19R {
1416 Wupdc19R::new(((self.bits >> 6) & 3) as u8)
1417 }
1418 #[doc = "Bits 8:9 - Wake-up Pin Configuration for WUU_Pn"]
1419 #[inline(always)]
1420 pub fn wupdc20(&self) -> Wupdc20R {
1421 Wupdc20R::new(((self.bits >> 8) & 3) as u8)
1422 }
1423 #[doc = "Bits 10:11 - Wake-up Pin Configuration for WUU_Pn"]
1424 #[inline(always)]
1425 pub fn wupdc21(&self) -> Wupdc21R {
1426 Wupdc21R::new(((self.bits >> 10) & 3) as u8)
1427 }
1428 #[doc = "Bits 12:13 - Wake-up Pin Configuration for WUU_Pn"]
1429 #[inline(always)]
1430 pub fn wupdc22(&self) -> Wupdc22R {
1431 Wupdc22R::new(((self.bits >> 12) & 3) as u8)
1432 }
1433 #[doc = "Bits 14:15 - Wake-up Pin Configuration for WUU_Pn"]
1434 #[inline(always)]
1435 pub fn wupdc23(&self) -> Wupdc23R {
1436 Wupdc23R::new(((self.bits >> 14) & 3) as u8)
1437 }
1438 #[doc = "Bits 16:17 - Wake-up Pin Configuration for WUU_Pn"]
1439 #[inline(always)]
1440 pub fn wupdc24(&self) -> Wupdc24R {
1441 Wupdc24R::new(((self.bits >> 16) & 3) as u8)
1442 }
1443 #[doc = "Bits 18:19 - Wake-up Pin Configuration for WUU_Pn"]
1444 #[inline(always)]
1445 pub fn wupdc25(&self) -> Wupdc25R {
1446 Wupdc25R::new(((self.bits >> 18) & 3) as u8)
1447 }
1448 #[doc = "Bits 20:21 - Wake-up Pin Configuration for WUU_Pn"]
1449 #[inline(always)]
1450 pub fn wupdc26(&self) -> Wupdc26R {
1451 Wupdc26R::new(((self.bits >> 20) & 3) as u8)
1452 }
1453 #[doc = "Bits 22:23 - Wake-up Pin Configuration for WUU_Pn"]
1454 #[inline(always)]
1455 pub fn wupdc27(&self) -> Wupdc27R {
1456 Wupdc27R::new(((self.bits >> 22) & 3) as u8)
1457 }
1458 #[doc = "Bits 24:25 - Wake-up Pin Configuration for WUU_Pn"]
1459 #[inline(always)]
1460 pub fn wupdc28(&self) -> Wupdc28R {
1461 Wupdc28R::new(((self.bits >> 24) & 3) as u8)
1462 }
1463 #[doc = "Bits 26:27 - Wake-up Pin Configuration for WUU_Pn"]
1464 #[inline(always)]
1465 pub fn wupdc29(&self) -> Wupdc29R {
1466 Wupdc29R::new(((self.bits >> 26) & 3) as u8)
1467 }
1468 #[doc = "Bits 28:29 - Wake-up Pin Configuration for WUU_Pn"]
1469 #[inline(always)]
1470 pub fn wupdc30(&self) -> Wupdc30R {
1471 Wupdc30R::new(((self.bits >> 28) & 3) as u8)
1472 }
1473 #[doc = "Bits 30:31 - Wake-up Pin Configuration for WUU_Pn"]
1474 #[inline(always)]
1475 pub fn wupdc31(&self) -> Wupdc31R {
1476 Wupdc31R::new(((self.bits >> 30) & 3) as u8)
1477 }
1478}
1479#[cfg(feature = "debug")]
1480impl core::fmt::Debug for R {
1481 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1482 f.debug_struct("PDC2")
1483 .field("wupdc16", &self.wupdc16())
1484 .field("wupdc17", &self.wupdc17())
1485 .field("wupdc18", &self.wupdc18())
1486 .field("wupdc19", &self.wupdc19())
1487 .field("wupdc20", &self.wupdc20())
1488 .field("wupdc21", &self.wupdc21())
1489 .field("wupdc22", &self.wupdc22())
1490 .field("wupdc23", &self.wupdc23())
1491 .field("wupdc24", &self.wupdc24())
1492 .field("wupdc25", &self.wupdc25())
1493 .field("wupdc26", &self.wupdc26())
1494 .field("wupdc27", &self.wupdc27())
1495 .field("wupdc28", &self.wupdc28())
1496 .field("wupdc29", &self.wupdc29())
1497 .field("wupdc30", &self.wupdc30())
1498 .field("wupdc31", &self.wupdc31())
1499 .finish()
1500 }
1501}
1502impl W {
1503 #[doc = "Bits 0:1 - Wake-up Pin Configuration for WUU_Pn"]
1504 #[inline(always)]
1505 pub fn wupdc16(&mut self) -> Wupdc16W<'_, Pdc2Spec> {
1506 Wupdc16W::new(self, 0)
1507 }
1508 #[doc = "Bits 2:3 - Wake-up Pin Configuration for WUU_Pn"]
1509 #[inline(always)]
1510 pub fn wupdc17(&mut self) -> Wupdc17W<'_, Pdc2Spec> {
1511 Wupdc17W::new(self, 2)
1512 }
1513 #[doc = "Bits 4:5 - Wake-up Pin Configuration for WUU_Pn"]
1514 #[inline(always)]
1515 pub fn wupdc18(&mut self) -> Wupdc18W<'_, Pdc2Spec> {
1516 Wupdc18W::new(self, 4)
1517 }
1518 #[doc = "Bits 6:7 - Wake-up Pin Configuration for WUU_Pn"]
1519 #[inline(always)]
1520 pub fn wupdc19(&mut self) -> Wupdc19W<'_, Pdc2Spec> {
1521 Wupdc19W::new(self, 6)
1522 }
1523 #[doc = "Bits 8:9 - Wake-up Pin Configuration for WUU_Pn"]
1524 #[inline(always)]
1525 pub fn wupdc20(&mut self) -> Wupdc20W<'_, Pdc2Spec> {
1526 Wupdc20W::new(self, 8)
1527 }
1528 #[doc = "Bits 10:11 - Wake-up Pin Configuration for WUU_Pn"]
1529 #[inline(always)]
1530 pub fn wupdc21(&mut self) -> Wupdc21W<'_, Pdc2Spec> {
1531 Wupdc21W::new(self, 10)
1532 }
1533 #[doc = "Bits 12:13 - Wake-up Pin Configuration for WUU_Pn"]
1534 #[inline(always)]
1535 pub fn wupdc22(&mut self) -> Wupdc22W<'_, Pdc2Spec> {
1536 Wupdc22W::new(self, 12)
1537 }
1538 #[doc = "Bits 14:15 - Wake-up Pin Configuration for WUU_Pn"]
1539 #[inline(always)]
1540 pub fn wupdc23(&mut self) -> Wupdc23W<'_, Pdc2Spec> {
1541 Wupdc23W::new(self, 14)
1542 }
1543 #[doc = "Bits 16:17 - Wake-up Pin Configuration for WUU_Pn"]
1544 #[inline(always)]
1545 pub fn wupdc24(&mut self) -> Wupdc24W<'_, Pdc2Spec> {
1546 Wupdc24W::new(self, 16)
1547 }
1548 #[doc = "Bits 18:19 - Wake-up Pin Configuration for WUU_Pn"]
1549 #[inline(always)]
1550 pub fn wupdc25(&mut self) -> Wupdc25W<'_, Pdc2Spec> {
1551 Wupdc25W::new(self, 18)
1552 }
1553 #[doc = "Bits 20:21 - Wake-up Pin Configuration for WUU_Pn"]
1554 #[inline(always)]
1555 pub fn wupdc26(&mut self) -> Wupdc26W<'_, Pdc2Spec> {
1556 Wupdc26W::new(self, 20)
1557 }
1558 #[doc = "Bits 22:23 - Wake-up Pin Configuration for WUU_Pn"]
1559 #[inline(always)]
1560 pub fn wupdc27(&mut self) -> Wupdc27W<'_, Pdc2Spec> {
1561 Wupdc27W::new(self, 22)
1562 }
1563 #[doc = "Bits 24:25 - Wake-up Pin Configuration for WUU_Pn"]
1564 #[inline(always)]
1565 pub fn wupdc28(&mut self) -> Wupdc28W<'_, Pdc2Spec> {
1566 Wupdc28W::new(self, 24)
1567 }
1568 #[doc = "Bits 26:27 - Wake-up Pin Configuration for WUU_Pn"]
1569 #[inline(always)]
1570 pub fn wupdc29(&mut self) -> Wupdc29W<'_, Pdc2Spec> {
1571 Wupdc29W::new(self, 26)
1572 }
1573 #[doc = "Bits 28:29 - Wake-up Pin Configuration for WUU_Pn"]
1574 #[inline(always)]
1575 pub fn wupdc30(&mut self) -> Wupdc30W<'_, Pdc2Spec> {
1576 Wupdc30W::new(self, 28)
1577 }
1578 #[doc = "Bits 30:31 - Wake-up Pin Configuration for WUU_Pn"]
1579 #[inline(always)]
1580 pub fn wupdc31(&mut self) -> Wupdc31W<'_, Pdc2Spec> {
1581 Wupdc31W::new(self, 30)
1582 }
1583}
1584#[doc = "Pin DMA/Trigger Configuration 2\n\nYou can [`read`](crate::Reg::read) this register and get [`pdc2::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pdc2::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
1585pub struct Pdc2Spec;
1586impl crate::RegisterSpec for Pdc2Spec {
1587 type Ux = u32;
1588}
1589#[doc = "`read()` method returns [`pdc2::R`](R) reader structure"]
1590impl crate::Readable for Pdc2Spec {}
1591#[doc = "`write(|w| ..)` method takes [`pdc2::W`](W) writer structure"]
1592impl crate::Writable for Pdc2Spec {
1593 type Safety = crate::Unsafe;
1594}
1595#[doc = "`reset()` method sets PDC2 to value 0"]
1596impl crate::Resettable for Pdc2Spec {}