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