1#[doc = "Register `CONFIG[%s]` reader"]
2pub type R = crate::R<ConfigSpec>;
3#[doc = "Register `CONFIG[%s]` writer"]
4pub type W = crate::W<ConfigSpec>;
5#[doc = "Input Sense Configuration 0\n\nValue on reset: 0"]
6#[derive(Clone, Copy, Debug, PartialEq, Eq)]
7#[repr(u8)]
8pub enum Sense0select {
9 #[doc = "0: No detection"]
10 None = 0,
11 #[doc = "1: Rising edge detection"]
12 Rise = 1,
13 #[doc = "2: Falling edge detection"]
14 Fall = 2,
15 #[doc = "3: Both edges detection"]
16 Both = 3,
17 #[doc = "4: High level detection"]
18 High = 4,
19 #[doc = "5: Low level detection"]
20 Low = 5,
21}
22impl From<Sense0select> for u8 {
23 #[inline(always)]
24 fn from(variant: Sense0select) -> Self {
25 variant as _
26 }
27}
28impl crate::FieldSpec for Sense0select {
29 type Ux = u8;
30}
31impl crate::IsEnum for Sense0select {}
32#[doc = "Field `SENSE0` reader - Input Sense Configuration 0"]
33pub type Sense0R = crate::FieldReader<Sense0select>;
34impl Sense0R {
35 #[doc = "Get enumerated values variant"]
36 #[inline(always)]
37 pub const fn variant(&self) -> Option<Sense0select> {
38 match self.bits {
39 0 => Some(Sense0select::None),
40 1 => Some(Sense0select::Rise),
41 2 => Some(Sense0select::Fall),
42 3 => Some(Sense0select::Both),
43 4 => Some(Sense0select::High),
44 5 => Some(Sense0select::Low),
45 _ => None,
46 }
47 }
48 #[doc = "No detection"]
49 #[inline(always)]
50 pub fn is_none(&self) -> bool {
51 *self == Sense0select::None
52 }
53 #[doc = "Rising edge detection"]
54 #[inline(always)]
55 pub fn is_rise(&self) -> bool {
56 *self == Sense0select::Rise
57 }
58 #[doc = "Falling edge detection"]
59 #[inline(always)]
60 pub fn is_fall(&self) -> bool {
61 *self == Sense0select::Fall
62 }
63 #[doc = "Both edges detection"]
64 #[inline(always)]
65 pub fn is_both(&self) -> bool {
66 *self == Sense0select::Both
67 }
68 #[doc = "High level detection"]
69 #[inline(always)]
70 pub fn is_high(&self) -> bool {
71 *self == Sense0select::High
72 }
73 #[doc = "Low level detection"]
74 #[inline(always)]
75 pub fn is_low(&self) -> bool {
76 *self == Sense0select::Low
77 }
78}
79#[doc = "Field `SENSE0` writer - Input Sense Configuration 0"]
80pub type Sense0W<'a, REG> = crate::FieldWriter<'a, REG, 3, Sense0select>;
81impl<'a, REG> Sense0W<'a, REG>
82where
83 REG: crate::Writable + crate::RegisterSpec,
84 REG::Ux: From<u8>,
85{
86 #[doc = "No detection"]
87 #[inline(always)]
88 pub fn none(self) -> &'a mut crate::W<REG> {
89 self.variant(Sense0select::None)
90 }
91 #[doc = "Rising edge detection"]
92 #[inline(always)]
93 pub fn rise(self) -> &'a mut crate::W<REG> {
94 self.variant(Sense0select::Rise)
95 }
96 #[doc = "Falling edge detection"]
97 #[inline(always)]
98 pub fn fall(self) -> &'a mut crate::W<REG> {
99 self.variant(Sense0select::Fall)
100 }
101 #[doc = "Both edges detection"]
102 #[inline(always)]
103 pub fn both(self) -> &'a mut crate::W<REG> {
104 self.variant(Sense0select::Both)
105 }
106 #[doc = "High level detection"]
107 #[inline(always)]
108 pub fn high(self) -> &'a mut crate::W<REG> {
109 self.variant(Sense0select::High)
110 }
111 #[doc = "Low level detection"]
112 #[inline(always)]
113 pub fn low(self) -> &'a mut crate::W<REG> {
114 self.variant(Sense0select::Low)
115 }
116}
117#[doc = "Field `FILTEN0` reader - Filter Enable 0"]
118pub type Filten0R = crate::BitReader;
119#[doc = "Field `FILTEN0` writer - Filter Enable 0"]
120pub type Filten0W<'a, REG> = crate::BitWriter<'a, REG>;
121#[doc = "Input Sense Configuration 1\n\nValue on reset: 0"]
122#[derive(Clone, Copy, Debug, PartialEq, Eq)]
123#[repr(u8)]
124pub enum Sense1select {
125 #[doc = "0: No detection"]
126 None = 0,
127 #[doc = "1: Rising edge detection"]
128 Rise = 1,
129 #[doc = "2: Falling edge detection"]
130 Fall = 2,
131 #[doc = "3: Both edges detection"]
132 Both = 3,
133 #[doc = "4: High level detection"]
134 High = 4,
135 #[doc = "5: Low level detection"]
136 Low = 5,
137}
138impl From<Sense1select> for u8 {
139 #[inline(always)]
140 fn from(variant: Sense1select) -> Self {
141 variant as _
142 }
143}
144impl crate::FieldSpec for Sense1select {
145 type Ux = u8;
146}
147impl crate::IsEnum for Sense1select {}
148#[doc = "Field `SENSE1` reader - Input Sense Configuration 1"]
149pub type Sense1R = crate::FieldReader<Sense1select>;
150impl Sense1R {
151 #[doc = "Get enumerated values variant"]
152 #[inline(always)]
153 pub const fn variant(&self) -> Option<Sense1select> {
154 match self.bits {
155 0 => Some(Sense1select::None),
156 1 => Some(Sense1select::Rise),
157 2 => Some(Sense1select::Fall),
158 3 => Some(Sense1select::Both),
159 4 => Some(Sense1select::High),
160 5 => Some(Sense1select::Low),
161 _ => None,
162 }
163 }
164 #[doc = "No detection"]
165 #[inline(always)]
166 pub fn is_none(&self) -> bool {
167 *self == Sense1select::None
168 }
169 #[doc = "Rising edge detection"]
170 #[inline(always)]
171 pub fn is_rise(&self) -> bool {
172 *self == Sense1select::Rise
173 }
174 #[doc = "Falling edge detection"]
175 #[inline(always)]
176 pub fn is_fall(&self) -> bool {
177 *self == Sense1select::Fall
178 }
179 #[doc = "Both edges detection"]
180 #[inline(always)]
181 pub fn is_both(&self) -> bool {
182 *self == Sense1select::Both
183 }
184 #[doc = "High level detection"]
185 #[inline(always)]
186 pub fn is_high(&self) -> bool {
187 *self == Sense1select::High
188 }
189 #[doc = "Low level detection"]
190 #[inline(always)]
191 pub fn is_low(&self) -> bool {
192 *self == Sense1select::Low
193 }
194}
195#[doc = "Field `SENSE1` writer - Input Sense Configuration 1"]
196pub type Sense1W<'a, REG> = crate::FieldWriter<'a, REG, 3, Sense1select>;
197impl<'a, REG> Sense1W<'a, REG>
198where
199 REG: crate::Writable + crate::RegisterSpec,
200 REG::Ux: From<u8>,
201{
202 #[doc = "No detection"]
203 #[inline(always)]
204 pub fn none(self) -> &'a mut crate::W<REG> {
205 self.variant(Sense1select::None)
206 }
207 #[doc = "Rising edge detection"]
208 #[inline(always)]
209 pub fn rise(self) -> &'a mut crate::W<REG> {
210 self.variant(Sense1select::Rise)
211 }
212 #[doc = "Falling edge detection"]
213 #[inline(always)]
214 pub fn fall(self) -> &'a mut crate::W<REG> {
215 self.variant(Sense1select::Fall)
216 }
217 #[doc = "Both edges detection"]
218 #[inline(always)]
219 pub fn both(self) -> &'a mut crate::W<REG> {
220 self.variant(Sense1select::Both)
221 }
222 #[doc = "High level detection"]
223 #[inline(always)]
224 pub fn high(self) -> &'a mut crate::W<REG> {
225 self.variant(Sense1select::High)
226 }
227 #[doc = "Low level detection"]
228 #[inline(always)]
229 pub fn low(self) -> &'a mut crate::W<REG> {
230 self.variant(Sense1select::Low)
231 }
232}
233#[doc = "Field `FILTEN1` reader - Filter Enable 1"]
234pub type Filten1R = crate::BitReader;
235#[doc = "Field `FILTEN1` writer - Filter Enable 1"]
236pub type Filten1W<'a, REG> = crate::BitWriter<'a, REG>;
237#[doc = "Input Sense Configuration 2\n\nValue on reset: 0"]
238#[derive(Clone, Copy, Debug, PartialEq, Eq)]
239#[repr(u8)]
240pub enum Sense2select {
241 #[doc = "0: No detection"]
242 None = 0,
243 #[doc = "1: Rising edge detection"]
244 Rise = 1,
245 #[doc = "2: Falling edge detection"]
246 Fall = 2,
247 #[doc = "3: Both edges detection"]
248 Both = 3,
249 #[doc = "4: High level detection"]
250 High = 4,
251 #[doc = "5: Low level detection"]
252 Low = 5,
253}
254impl From<Sense2select> for u8 {
255 #[inline(always)]
256 fn from(variant: Sense2select) -> Self {
257 variant as _
258 }
259}
260impl crate::FieldSpec for Sense2select {
261 type Ux = u8;
262}
263impl crate::IsEnum for Sense2select {}
264#[doc = "Field `SENSE2` reader - Input Sense Configuration 2"]
265pub type Sense2R = crate::FieldReader<Sense2select>;
266impl Sense2R {
267 #[doc = "Get enumerated values variant"]
268 #[inline(always)]
269 pub const fn variant(&self) -> Option<Sense2select> {
270 match self.bits {
271 0 => Some(Sense2select::None),
272 1 => Some(Sense2select::Rise),
273 2 => Some(Sense2select::Fall),
274 3 => Some(Sense2select::Both),
275 4 => Some(Sense2select::High),
276 5 => Some(Sense2select::Low),
277 _ => None,
278 }
279 }
280 #[doc = "No detection"]
281 #[inline(always)]
282 pub fn is_none(&self) -> bool {
283 *self == Sense2select::None
284 }
285 #[doc = "Rising edge detection"]
286 #[inline(always)]
287 pub fn is_rise(&self) -> bool {
288 *self == Sense2select::Rise
289 }
290 #[doc = "Falling edge detection"]
291 #[inline(always)]
292 pub fn is_fall(&self) -> bool {
293 *self == Sense2select::Fall
294 }
295 #[doc = "Both edges detection"]
296 #[inline(always)]
297 pub fn is_both(&self) -> bool {
298 *self == Sense2select::Both
299 }
300 #[doc = "High level detection"]
301 #[inline(always)]
302 pub fn is_high(&self) -> bool {
303 *self == Sense2select::High
304 }
305 #[doc = "Low level detection"]
306 #[inline(always)]
307 pub fn is_low(&self) -> bool {
308 *self == Sense2select::Low
309 }
310}
311#[doc = "Field `SENSE2` writer - Input Sense Configuration 2"]
312pub type Sense2W<'a, REG> = crate::FieldWriter<'a, REG, 3, Sense2select>;
313impl<'a, REG> Sense2W<'a, REG>
314where
315 REG: crate::Writable + crate::RegisterSpec,
316 REG::Ux: From<u8>,
317{
318 #[doc = "No detection"]
319 #[inline(always)]
320 pub fn none(self) -> &'a mut crate::W<REG> {
321 self.variant(Sense2select::None)
322 }
323 #[doc = "Rising edge detection"]
324 #[inline(always)]
325 pub fn rise(self) -> &'a mut crate::W<REG> {
326 self.variant(Sense2select::Rise)
327 }
328 #[doc = "Falling edge detection"]
329 #[inline(always)]
330 pub fn fall(self) -> &'a mut crate::W<REG> {
331 self.variant(Sense2select::Fall)
332 }
333 #[doc = "Both edges detection"]
334 #[inline(always)]
335 pub fn both(self) -> &'a mut crate::W<REG> {
336 self.variant(Sense2select::Both)
337 }
338 #[doc = "High level detection"]
339 #[inline(always)]
340 pub fn high(self) -> &'a mut crate::W<REG> {
341 self.variant(Sense2select::High)
342 }
343 #[doc = "Low level detection"]
344 #[inline(always)]
345 pub fn low(self) -> &'a mut crate::W<REG> {
346 self.variant(Sense2select::Low)
347 }
348}
349#[doc = "Field `FILTEN2` reader - Filter Enable 2"]
350pub type Filten2R = crate::BitReader;
351#[doc = "Field `FILTEN2` writer - Filter Enable 2"]
352pub type Filten2W<'a, REG> = crate::BitWriter<'a, REG>;
353#[doc = "Input Sense Configuration 3\n\nValue on reset: 0"]
354#[derive(Clone, Copy, Debug, PartialEq, Eq)]
355#[repr(u8)]
356pub enum Sense3select {
357 #[doc = "0: No detection"]
358 None = 0,
359 #[doc = "1: Rising edge detection"]
360 Rise = 1,
361 #[doc = "2: Falling edge detection"]
362 Fall = 2,
363 #[doc = "3: Both edges detection"]
364 Both = 3,
365 #[doc = "4: High level detection"]
366 High = 4,
367 #[doc = "5: Low level detection"]
368 Low = 5,
369}
370impl From<Sense3select> for u8 {
371 #[inline(always)]
372 fn from(variant: Sense3select) -> Self {
373 variant as _
374 }
375}
376impl crate::FieldSpec for Sense3select {
377 type Ux = u8;
378}
379impl crate::IsEnum for Sense3select {}
380#[doc = "Field `SENSE3` reader - Input Sense Configuration 3"]
381pub type Sense3R = crate::FieldReader<Sense3select>;
382impl Sense3R {
383 #[doc = "Get enumerated values variant"]
384 #[inline(always)]
385 pub const fn variant(&self) -> Option<Sense3select> {
386 match self.bits {
387 0 => Some(Sense3select::None),
388 1 => Some(Sense3select::Rise),
389 2 => Some(Sense3select::Fall),
390 3 => Some(Sense3select::Both),
391 4 => Some(Sense3select::High),
392 5 => Some(Sense3select::Low),
393 _ => None,
394 }
395 }
396 #[doc = "No detection"]
397 #[inline(always)]
398 pub fn is_none(&self) -> bool {
399 *self == Sense3select::None
400 }
401 #[doc = "Rising edge detection"]
402 #[inline(always)]
403 pub fn is_rise(&self) -> bool {
404 *self == Sense3select::Rise
405 }
406 #[doc = "Falling edge detection"]
407 #[inline(always)]
408 pub fn is_fall(&self) -> bool {
409 *self == Sense3select::Fall
410 }
411 #[doc = "Both edges detection"]
412 #[inline(always)]
413 pub fn is_both(&self) -> bool {
414 *self == Sense3select::Both
415 }
416 #[doc = "High level detection"]
417 #[inline(always)]
418 pub fn is_high(&self) -> bool {
419 *self == Sense3select::High
420 }
421 #[doc = "Low level detection"]
422 #[inline(always)]
423 pub fn is_low(&self) -> bool {
424 *self == Sense3select::Low
425 }
426}
427#[doc = "Field `SENSE3` writer - Input Sense Configuration 3"]
428pub type Sense3W<'a, REG> = crate::FieldWriter<'a, REG, 3, Sense3select>;
429impl<'a, REG> Sense3W<'a, REG>
430where
431 REG: crate::Writable + crate::RegisterSpec,
432 REG::Ux: From<u8>,
433{
434 #[doc = "No detection"]
435 #[inline(always)]
436 pub fn none(self) -> &'a mut crate::W<REG> {
437 self.variant(Sense3select::None)
438 }
439 #[doc = "Rising edge detection"]
440 #[inline(always)]
441 pub fn rise(self) -> &'a mut crate::W<REG> {
442 self.variant(Sense3select::Rise)
443 }
444 #[doc = "Falling edge detection"]
445 #[inline(always)]
446 pub fn fall(self) -> &'a mut crate::W<REG> {
447 self.variant(Sense3select::Fall)
448 }
449 #[doc = "Both edges detection"]
450 #[inline(always)]
451 pub fn both(self) -> &'a mut crate::W<REG> {
452 self.variant(Sense3select::Both)
453 }
454 #[doc = "High level detection"]
455 #[inline(always)]
456 pub fn high(self) -> &'a mut crate::W<REG> {
457 self.variant(Sense3select::High)
458 }
459 #[doc = "Low level detection"]
460 #[inline(always)]
461 pub fn low(self) -> &'a mut crate::W<REG> {
462 self.variant(Sense3select::Low)
463 }
464}
465#[doc = "Field `FILTEN3` reader - Filter Enable 3"]
466pub type Filten3R = crate::BitReader;
467#[doc = "Field `FILTEN3` writer - Filter Enable 3"]
468pub type Filten3W<'a, REG> = crate::BitWriter<'a, REG>;
469#[doc = "Input Sense Configuration 4\n\nValue on reset: 0"]
470#[derive(Clone, Copy, Debug, PartialEq, Eq)]
471#[repr(u8)]
472pub enum Sense4select {
473 #[doc = "0: No detection"]
474 None = 0,
475 #[doc = "1: Rising edge detection"]
476 Rise = 1,
477 #[doc = "2: Falling edge detection"]
478 Fall = 2,
479 #[doc = "3: Both edges detection"]
480 Both = 3,
481 #[doc = "4: High level detection"]
482 High = 4,
483 #[doc = "5: Low level detection"]
484 Low = 5,
485}
486impl From<Sense4select> for u8 {
487 #[inline(always)]
488 fn from(variant: Sense4select) -> Self {
489 variant as _
490 }
491}
492impl crate::FieldSpec for Sense4select {
493 type Ux = u8;
494}
495impl crate::IsEnum for Sense4select {}
496#[doc = "Field `SENSE4` reader - Input Sense Configuration 4"]
497pub type Sense4R = crate::FieldReader<Sense4select>;
498impl Sense4R {
499 #[doc = "Get enumerated values variant"]
500 #[inline(always)]
501 pub const fn variant(&self) -> Option<Sense4select> {
502 match self.bits {
503 0 => Some(Sense4select::None),
504 1 => Some(Sense4select::Rise),
505 2 => Some(Sense4select::Fall),
506 3 => Some(Sense4select::Both),
507 4 => Some(Sense4select::High),
508 5 => Some(Sense4select::Low),
509 _ => None,
510 }
511 }
512 #[doc = "No detection"]
513 #[inline(always)]
514 pub fn is_none(&self) -> bool {
515 *self == Sense4select::None
516 }
517 #[doc = "Rising edge detection"]
518 #[inline(always)]
519 pub fn is_rise(&self) -> bool {
520 *self == Sense4select::Rise
521 }
522 #[doc = "Falling edge detection"]
523 #[inline(always)]
524 pub fn is_fall(&self) -> bool {
525 *self == Sense4select::Fall
526 }
527 #[doc = "Both edges detection"]
528 #[inline(always)]
529 pub fn is_both(&self) -> bool {
530 *self == Sense4select::Both
531 }
532 #[doc = "High level detection"]
533 #[inline(always)]
534 pub fn is_high(&self) -> bool {
535 *self == Sense4select::High
536 }
537 #[doc = "Low level detection"]
538 #[inline(always)]
539 pub fn is_low(&self) -> bool {
540 *self == Sense4select::Low
541 }
542}
543#[doc = "Field `SENSE4` writer - Input Sense Configuration 4"]
544pub type Sense4W<'a, REG> = crate::FieldWriter<'a, REG, 3, Sense4select>;
545impl<'a, REG> Sense4W<'a, REG>
546where
547 REG: crate::Writable + crate::RegisterSpec,
548 REG::Ux: From<u8>,
549{
550 #[doc = "No detection"]
551 #[inline(always)]
552 pub fn none(self) -> &'a mut crate::W<REG> {
553 self.variant(Sense4select::None)
554 }
555 #[doc = "Rising edge detection"]
556 #[inline(always)]
557 pub fn rise(self) -> &'a mut crate::W<REG> {
558 self.variant(Sense4select::Rise)
559 }
560 #[doc = "Falling edge detection"]
561 #[inline(always)]
562 pub fn fall(self) -> &'a mut crate::W<REG> {
563 self.variant(Sense4select::Fall)
564 }
565 #[doc = "Both edges detection"]
566 #[inline(always)]
567 pub fn both(self) -> &'a mut crate::W<REG> {
568 self.variant(Sense4select::Both)
569 }
570 #[doc = "High level detection"]
571 #[inline(always)]
572 pub fn high(self) -> &'a mut crate::W<REG> {
573 self.variant(Sense4select::High)
574 }
575 #[doc = "Low level detection"]
576 #[inline(always)]
577 pub fn low(self) -> &'a mut crate::W<REG> {
578 self.variant(Sense4select::Low)
579 }
580}
581#[doc = "Field `FILTEN4` reader - Filter Enable 4"]
582pub type Filten4R = crate::BitReader;
583#[doc = "Field `FILTEN4` writer - Filter Enable 4"]
584pub type Filten4W<'a, REG> = crate::BitWriter<'a, REG>;
585#[doc = "Input Sense Configuration 5\n\nValue on reset: 0"]
586#[derive(Clone, Copy, Debug, PartialEq, Eq)]
587#[repr(u8)]
588pub enum Sense5select {
589 #[doc = "0: No detection"]
590 None = 0,
591 #[doc = "1: Rising edge detection"]
592 Rise = 1,
593 #[doc = "2: Falling edge detection"]
594 Fall = 2,
595 #[doc = "3: Both edges detection"]
596 Both = 3,
597 #[doc = "4: High level detection"]
598 High = 4,
599 #[doc = "5: Low level detection"]
600 Low = 5,
601}
602impl From<Sense5select> for u8 {
603 #[inline(always)]
604 fn from(variant: Sense5select) -> Self {
605 variant as _
606 }
607}
608impl crate::FieldSpec for Sense5select {
609 type Ux = u8;
610}
611impl crate::IsEnum for Sense5select {}
612#[doc = "Field `SENSE5` reader - Input Sense Configuration 5"]
613pub type Sense5R = crate::FieldReader<Sense5select>;
614impl Sense5R {
615 #[doc = "Get enumerated values variant"]
616 #[inline(always)]
617 pub const fn variant(&self) -> Option<Sense5select> {
618 match self.bits {
619 0 => Some(Sense5select::None),
620 1 => Some(Sense5select::Rise),
621 2 => Some(Sense5select::Fall),
622 3 => Some(Sense5select::Both),
623 4 => Some(Sense5select::High),
624 5 => Some(Sense5select::Low),
625 _ => None,
626 }
627 }
628 #[doc = "No detection"]
629 #[inline(always)]
630 pub fn is_none(&self) -> bool {
631 *self == Sense5select::None
632 }
633 #[doc = "Rising edge detection"]
634 #[inline(always)]
635 pub fn is_rise(&self) -> bool {
636 *self == Sense5select::Rise
637 }
638 #[doc = "Falling edge detection"]
639 #[inline(always)]
640 pub fn is_fall(&self) -> bool {
641 *self == Sense5select::Fall
642 }
643 #[doc = "Both edges detection"]
644 #[inline(always)]
645 pub fn is_both(&self) -> bool {
646 *self == Sense5select::Both
647 }
648 #[doc = "High level detection"]
649 #[inline(always)]
650 pub fn is_high(&self) -> bool {
651 *self == Sense5select::High
652 }
653 #[doc = "Low level detection"]
654 #[inline(always)]
655 pub fn is_low(&self) -> bool {
656 *self == Sense5select::Low
657 }
658}
659#[doc = "Field `SENSE5` writer - Input Sense Configuration 5"]
660pub type Sense5W<'a, REG> = crate::FieldWriter<'a, REG, 3, Sense5select>;
661impl<'a, REG> Sense5W<'a, REG>
662where
663 REG: crate::Writable + crate::RegisterSpec,
664 REG::Ux: From<u8>,
665{
666 #[doc = "No detection"]
667 #[inline(always)]
668 pub fn none(self) -> &'a mut crate::W<REG> {
669 self.variant(Sense5select::None)
670 }
671 #[doc = "Rising edge detection"]
672 #[inline(always)]
673 pub fn rise(self) -> &'a mut crate::W<REG> {
674 self.variant(Sense5select::Rise)
675 }
676 #[doc = "Falling edge detection"]
677 #[inline(always)]
678 pub fn fall(self) -> &'a mut crate::W<REG> {
679 self.variant(Sense5select::Fall)
680 }
681 #[doc = "Both edges detection"]
682 #[inline(always)]
683 pub fn both(self) -> &'a mut crate::W<REG> {
684 self.variant(Sense5select::Both)
685 }
686 #[doc = "High level detection"]
687 #[inline(always)]
688 pub fn high(self) -> &'a mut crate::W<REG> {
689 self.variant(Sense5select::High)
690 }
691 #[doc = "Low level detection"]
692 #[inline(always)]
693 pub fn low(self) -> &'a mut crate::W<REG> {
694 self.variant(Sense5select::Low)
695 }
696}
697#[doc = "Field `FILTEN5` reader - Filter Enable 5"]
698pub type Filten5R = crate::BitReader;
699#[doc = "Field `FILTEN5` writer - Filter Enable 5"]
700pub type Filten5W<'a, REG> = crate::BitWriter<'a, REG>;
701#[doc = "Input Sense Configuration 6\n\nValue on reset: 0"]
702#[derive(Clone, Copy, Debug, PartialEq, Eq)]
703#[repr(u8)]
704pub enum Sense6select {
705 #[doc = "0: No detection"]
706 None = 0,
707 #[doc = "1: Rising edge detection"]
708 Rise = 1,
709 #[doc = "2: Falling edge detection"]
710 Fall = 2,
711 #[doc = "3: Both edges detection"]
712 Both = 3,
713 #[doc = "4: High level detection"]
714 High = 4,
715 #[doc = "5: Low level detection"]
716 Low = 5,
717}
718impl From<Sense6select> for u8 {
719 #[inline(always)]
720 fn from(variant: Sense6select) -> Self {
721 variant as _
722 }
723}
724impl crate::FieldSpec for Sense6select {
725 type Ux = u8;
726}
727impl crate::IsEnum for Sense6select {}
728#[doc = "Field `SENSE6` reader - Input Sense Configuration 6"]
729pub type Sense6R = crate::FieldReader<Sense6select>;
730impl Sense6R {
731 #[doc = "Get enumerated values variant"]
732 #[inline(always)]
733 pub const fn variant(&self) -> Option<Sense6select> {
734 match self.bits {
735 0 => Some(Sense6select::None),
736 1 => Some(Sense6select::Rise),
737 2 => Some(Sense6select::Fall),
738 3 => Some(Sense6select::Both),
739 4 => Some(Sense6select::High),
740 5 => Some(Sense6select::Low),
741 _ => None,
742 }
743 }
744 #[doc = "No detection"]
745 #[inline(always)]
746 pub fn is_none(&self) -> bool {
747 *self == Sense6select::None
748 }
749 #[doc = "Rising edge detection"]
750 #[inline(always)]
751 pub fn is_rise(&self) -> bool {
752 *self == Sense6select::Rise
753 }
754 #[doc = "Falling edge detection"]
755 #[inline(always)]
756 pub fn is_fall(&self) -> bool {
757 *self == Sense6select::Fall
758 }
759 #[doc = "Both edges detection"]
760 #[inline(always)]
761 pub fn is_both(&self) -> bool {
762 *self == Sense6select::Both
763 }
764 #[doc = "High level detection"]
765 #[inline(always)]
766 pub fn is_high(&self) -> bool {
767 *self == Sense6select::High
768 }
769 #[doc = "Low level detection"]
770 #[inline(always)]
771 pub fn is_low(&self) -> bool {
772 *self == Sense6select::Low
773 }
774}
775#[doc = "Field `SENSE6` writer - Input Sense Configuration 6"]
776pub type Sense6W<'a, REG> = crate::FieldWriter<'a, REG, 3, Sense6select>;
777impl<'a, REG> Sense6W<'a, REG>
778where
779 REG: crate::Writable + crate::RegisterSpec,
780 REG::Ux: From<u8>,
781{
782 #[doc = "No detection"]
783 #[inline(always)]
784 pub fn none(self) -> &'a mut crate::W<REG> {
785 self.variant(Sense6select::None)
786 }
787 #[doc = "Rising edge detection"]
788 #[inline(always)]
789 pub fn rise(self) -> &'a mut crate::W<REG> {
790 self.variant(Sense6select::Rise)
791 }
792 #[doc = "Falling edge detection"]
793 #[inline(always)]
794 pub fn fall(self) -> &'a mut crate::W<REG> {
795 self.variant(Sense6select::Fall)
796 }
797 #[doc = "Both edges detection"]
798 #[inline(always)]
799 pub fn both(self) -> &'a mut crate::W<REG> {
800 self.variant(Sense6select::Both)
801 }
802 #[doc = "High level detection"]
803 #[inline(always)]
804 pub fn high(self) -> &'a mut crate::W<REG> {
805 self.variant(Sense6select::High)
806 }
807 #[doc = "Low level detection"]
808 #[inline(always)]
809 pub fn low(self) -> &'a mut crate::W<REG> {
810 self.variant(Sense6select::Low)
811 }
812}
813#[doc = "Field `FILTEN6` reader - Filter Enable 6"]
814pub type Filten6R = crate::BitReader;
815#[doc = "Field `FILTEN6` writer - Filter Enable 6"]
816pub type Filten6W<'a, REG> = crate::BitWriter<'a, REG>;
817#[doc = "Input Sense Configuration 7\n\nValue on reset: 0"]
818#[derive(Clone, Copy, Debug, PartialEq, Eq)]
819#[repr(u8)]
820pub enum Sense7select {
821 #[doc = "0: No detection"]
822 None = 0,
823 #[doc = "1: Rising edge detection"]
824 Rise = 1,
825 #[doc = "2: Falling edge detection"]
826 Fall = 2,
827 #[doc = "3: Both edges detection"]
828 Both = 3,
829 #[doc = "4: High level detection"]
830 High = 4,
831 #[doc = "5: Low level detection"]
832 Low = 5,
833}
834impl From<Sense7select> for u8 {
835 #[inline(always)]
836 fn from(variant: Sense7select) -> Self {
837 variant as _
838 }
839}
840impl crate::FieldSpec for Sense7select {
841 type Ux = u8;
842}
843impl crate::IsEnum for Sense7select {}
844#[doc = "Field `SENSE7` reader - Input Sense Configuration 7"]
845pub type Sense7R = crate::FieldReader<Sense7select>;
846impl Sense7R {
847 #[doc = "Get enumerated values variant"]
848 #[inline(always)]
849 pub const fn variant(&self) -> Option<Sense7select> {
850 match self.bits {
851 0 => Some(Sense7select::None),
852 1 => Some(Sense7select::Rise),
853 2 => Some(Sense7select::Fall),
854 3 => Some(Sense7select::Both),
855 4 => Some(Sense7select::High),
856 5 => Some(Sense7select::Low),
857 _ => None,
858 }
859 }
860 #[doc = "No detection"]
861 #[inline(always)]
862 pub fn is_none(&self) -> bool {
863 *self == Sense7select::None
864 }
865 #[doc = "Rising edge detection"]
866 #[inline(always)]
867 pub fn is_rise(&self) -> bool {
868 *self == Sense7select::Rise
869 }
870 #[doc = "Falling edge detection"]
871 #[inline(always)]
872 pub fn is_fall(&self) -> bool {
873 *self == Sense7select::Fall
874 }
875 #[doc = "Both edges detection"]
876 #[inline(always)]
877 pub fn is_both(&self) -> bool {
878 *self == Sense7select::Both
879 }
880 #[doc = "High level detection"]
881 #[inline(always)]
882 pub fn is_high(&self) -> bool {
883 *self == Sense7select::High
884 }
885 #[doc = "Low level detection"]
886 #[inline(always)]
887 pub fn is_low(&self) -> bool {
888 *self == Sense7select::Low
889 }
890}
891#[doc = "Field `SENSE7` writer - Input Sense Configuration 7"]
892pub type Sense7W<'a, REG> = crate::FieldWriter<'a, REG, 3, Sense7select>;
893impl<'a, REG> Sense7W<'a, REG>
894where
895 REG: crate::Writable + crate::RegisterSpec,
896 REG::Ux: From<u8>,
897{
898 #[doc = "No detection"]
899 #[inline(always)]
900 pub fn none(self) -> &'a mut crate::W<REG> {
901 self.variant(Sense7select::None)
902 }
903 #[doc = "Rising edge detection"]
904 #[inline(always)]
905 pub fn rise(self) -> &'a mut crate::W<REG> {
906 self.variant(Sense7select::Rise)
907 }
908 #[doc = "Falling edge detection"]
909 #[inline(always)]
910 pub fn fall(self) -> &'a mut crate::W<REG> {
911 self.variant(Sense7select::Fall)
912 }
913 #[doc = "Both edges detection"]
914 #[inline(always)]
915 pub fn both(self) -> &'a mut crate::W<REG> {
916 self.variant(Sense7select::Both)
917 }
918 #[doc = "High level detection"]
919 #[inline(always)]
920 pub fn high(self) -> &'a mut crate::W<REG> {
921 self.variant(Sense7select::High)
922 }
923 #[doc = "Low level detection"]
924 #[inline(always)]
925 pub fn low(self) -> &'a mut crate::W<REG> {
926 self.variant(Sense7select::Low)
927 }
928}
929#[doc = "Field `FILTEN7` reader - Filter Enable 7"]
930pub type Filten7R = crate::BitReader;
931#[doc = "Field `FILTEN7` writer - Filter Enable 7"]
932pub type Filten7W<'a, REG> = crate::BitWriter<'a, REG>;
933impl R {
934 #[doc = "Bits 0:2 - Input Sense Configuration 0"]
935 #[inline(always)]
936 pub fn sense0(&self) -> Sense0R {
937 Sense0R::new((self.bits & 7) as u8)
938 }
939 #[doc = "Bit 3 - Filter Enable 0"]
940 #[inline(always)]
941 pub fn filten0(&self) -> Filten0R {
942 Filten0R::new(((self.bits >> 3) & 1) != 0)
943 }
944 #[doc = "Bits 4:6 - Input Sense Configuration 1"]
945 #[inline(always)]
946 pub fn sense1(&self) -> Sense1R {
947 Sense1R::new(((self.bits >> 4) & 7) as u8)
948 }
949 #[doc = "Bit 7 - Filter Enable 1"]
950 #[inline(always)]
951 pub fn filten1(&self) -> Filten1R {
952 Filten1R::new(((self.bits >> 7) & 1) != 0)
953 }
954 #[doc = "Bits 8:10 - Input Sense Configuration 2"]
955 #[inline(always)]
956 pub fn sense2(&self) -> Sense2R {
957 Sense2R::new(((self.bits >> 8) & 7) as u8)
958 }
959 #[doc = "Bit 11 - Filter Enable 2"]
960 #[inline(always)]
961 pub fn filten2(&self) -> Filten2R {
962 Filten2R::new(((self.bits >> 11) & 1) != 0)
963 }
964 #[doc = "Bits 12:14 - Input Sense Configuration 3"]
965 #[inline(always)]
966 pub fn sense3(&self) -> Sense3R {
967 Sense3R::new(((self.bits >> 12) & 7) as u8)
968 }
969 #[doc = "Bit 15 - Filter Enable 3"]
970 #[inline(always)]
971 pub fn filten3(&self) -> Filten3R {
972 Filten3R::new(((self.bits >> 15) & 1) != 0)
973 }
974 #[doc = "Bits 16:18 - Input Sense Configuration 4"]
975 #[inline(always)]
976 pub fn sense4(&self) -> Sense4R {
977 Sense4R::new(((self.bits >> 16) & 7) as u8)
978 }
979 #[doc = "Bit 19 - Filter Enable 4"]
980 #[inline(always)]
981 pub fn filten4(&self) -> Filten4R {
982 Filten4R::new(((self.bits >> 19) & 1) != 0)
983 }
984 #[doc = "Bits 20:22 - Input Sense Configuration 5"]
985 #[inline(always)]
986 pub fn sense5(&self) -> Sense5R {
987 Sense5R::new(((self.bits >> 20) & 7) as u8)
988 }
989 #[doc = "Bit 23 - Filter Enable 5"]
990 #[inline(always)]
991 pub fn filten5(&self) -> Filten5R {
992 Filten5R::new(((self.bits >> 23) & 1) != 0)
993 }
994 #[doc = "Bits 24:26 - Input Sense Configuration 6"]
995 #[inline(always)]
996 pub fn sense6(&self) -> Sense6R {
997 Sense6R::new(((self.bits >> 24) & 7) as u8)
998 }
999 #[doc = "Bit 27 - Filter Enable 6"]
1000 #[inline(always)]
1001 pub fn filten6(&self) -> Filten6R {
1002 Filten6R::new(((self.bits >> 27) & 1) != 0)
1003 }
1004 #[doc = "Bits 28:30 - Input Sense Configuration 7"]
1005 #[inline(always)]
1006 pub fn sense7(&self) -> Sense7R {
1007 Sense7R::new(((self.bits >> 28) & 7) as u8)
1008 }
1009 #[doc = "Bit 31 - Filter Enable 7"]
1010 #[inline(always)]
1011 pub fn filten7(&self) -> Filten7R {
1012 Filten7R::new(((self.bits >> 31) & 1) != 0)
1013 }
1014}
1015impl W {
1016 #[doc = "Bits 0:2 - Input Sense Configuration 0"]
1017 #[inline(always)]
1018 #[must_use]
1019 pub fn sense0(&mut self) -> Sense0W<ConfigSpec> {
1020 Sense0W::new(self, 0)
1021 }
1022 #[doc = "Bit 3 - Filter Enable 0"]
1023 #[inline(always)]
1024 #[must_use]
1025 pub fn filten0(&mut self) -> Filten0W<ConfigSpec> {
1026 Filten0W::new(self, 3)
1027 }
1028 #[doc = "Bits 4:6 - Input Sense Configuration 1"]
1029 #[inline(always)]
1030 #[must_use]
1031 pub fn sense1(&mut self) -> Sense1W<ConfigSpec> {
1032 Sense1W::new(self, 4)
1033 }
1034 #[doc = "Bit 7 - Filter Enable 1"]
1035 #[inline(always)]
1036 #[must_use]
1037 pub fn filten1(&mut self) -> Filten1W<ConfigSpec> {
1038 Filten1W::new(self, 7)
1039 }
1040 #[doc = "Bits 8:10 - Input Sense Configuration 2"]
1041 #[inline(always)]
1042 #[must_use]
1043 pub fn sense2(&mut self) -> Sense2W<ConfigSpec> {
1044 Sense2W::new(self, 8)
1045 }
1046 #[doc = "Bit 11 - Filter Enable 2"]
1047 #[inline(always)]
1048 #[must_use]
1049 pub fn filten2(&mut self) -> Filten2W<ConfigSpec> {
1050 Filten2W::new(self, 11)
1051 }
1052 #[doc = "Bits 12:14 - Input Sense Configuration 3"]
1053 #[inline(always)]
1054 #[must_use]
1055 pub fn sense3(&mut self) -> Sense3W<ConfigSpec> {
1056 Sense3W::new(self, 12)
1057 }
1058 #[doc = "Bit 15 - Filter Enable 3"]
1059 #[inline(always)]
1060 #[must_use]
1061 pub fn filten3(&mut self) -> Filten3W<ConfigSpec> {
1062 Filten3W::new(self, 15)
1063 }
1064 #[doc = "Bits 16:18 - Input Sense Configuration 4"]
1065 #[inline(always)]
1066 #[must_use]
1067 pub fn sense4(&mut self) -> Sense4W<ConfigSpec> {
1068 Sense4W::new(self, 16)
1069 }
1070 #[doc = "Bit 19 - Filter Enable 4"]
1071 #[inline(always)]
1072 #[must_use]
1073 pub fn filten4(&mut self) -> Filten4W<ConfigSpec> {
1074 Filten4W::new(self, 19)
1075 }
1076 #[doc = "Bits 20:22 - Input Sense Configuration 5"]
1077 #[inline(always)]
1078 #[must_use]
1079 pub fn sense5(&mut self) -> Sense5W<ConfigSpec> {
1080 Sense5W::new(self, 20)
1081 }
1082 #[doc = "Bit 23 - Filter Enable 5"]
1083 #[inline(always)]
1084 #[must_use]
1085 pub fn filten5(&mut self) -> Filten5W<ConfigSpec> {
1086 Filten5W::new(self, 23)
1087 }
1088 #[doc = "Bits 24:26 - Input Sense Configuration 6"]
1089 #[inline(always)]
1090 #[must_use]
1091 pub fn sense6(&mut self) -> Sense6W<ConfigSpec> {
1092 Sense6W::new(self, 24)
1093 }
1094 #[doc = "Bit 27 - Filter Enable 6"]
1095 #[inline(always)]
1096 #[must_use]
1097 pub fn filten6(&mut self) -> Filten6W<ConfigSpec> {
1098 Filten6W::new(self, 27)
1099 }
1100 #[doc = "Bits 28:30 - Input Sense Configuration 7"]
1101 #[inline(always)]
1102 #[must_use]
1103 pub fn sense7(&mut self) -> Sense7W<ConfigSpec> {
1104 Sense7W::new(self, 28)
1105 }
1106 #[doc = "Bit 31 - Filter Enable 7"]
1107 #[inline(always)]
1108 #[must_use]
1109 pub fn filten7(&mut self) -> Filten7W<ConfigSpec> {
1110 Filten7W::new(self, 31)
1111 }
1112}
1113#[doc = "External Interrupt Sense Configuration\n\nYou can [`read`](crate::Reg::read) this register and get [`config::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`config::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
1114pub struct ConfigSpec;
1115impl crate::RegisterSpec for ConfigSpec {
1116 type Ux = u32;
1117}
1118#[doc = "`read()` method returns [`config::R`](R) reader structure"]
1119impl crate::Readable for ConfigSpec {}
1120#[doc = "`write(|w| ..)` method takes [`config::W`](W) writer structure"]
1121impl crate::Writable for ConfigSpec {
1122 type Safety = crate::Unsafe;
1123 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
1124 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
1125}
1126#[doc = "`reset()` method sets CONFIG[%s]
1127to value 0"]
1128impl crate::Resettable for ConfigSpec {
1129 const RESET_VALUE: u32 = 0;
1130}