1#[doc = "Register `GPIO_CFGCTL30` reader"]
2pub struct R(crate::R<GPIO_CFGCTL30_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<GPIO_CFGCTL30_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<GPIO_CFGCTL30_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<GPIO_CFGCTL30_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `reg_gpio_0_i` reader - "]
17pub type REG_GPIO_0_I_R = crate::BitReader<bool>;
18#[doc = "Field `reg_gpio_1_i` reader - Input register for GPIO1."]
19pub type REG_GPIO_1_I_R = crate::BitReader<GPIO1INPUT_A>;
20#[doc = "Input register for GPIO1.\n\nValue on reset: 0"]
21#[derive(Clone, Copy, Debug, PartialEq, Eq)]
22pub enum GPIO1INPUT_A {
23 #[doc = "0: `0`"]
24 DISABLED = 0,
25 #[doc = "1: `1`"]
26 ENABLED = 1,
27}
28impl From<GPIO1INPUT_A> for bool {
29 #[inline(always)]
30 fn from(variant: GPIO1INPUT_A) -> Self {
31 variant as u8 != 0
32 }
33}
34impl REG_GPIO_1_I_R {
35 #[doc = "Get enumerated values variant"]
36 #[inline(always)]
37 pub fn variant(&self) -> GPIO1INPUT_A {
38 match self.bits {
39 false => GPIO1INPUT_A::DISABLED,
40 true => GPIO1INPUT_A::ENABLED,
41 }
42 }
43 #[doc = "Checks if the value of the field is `DISABLED`"]
44 #[inline(always)]
45 pub fn is_disabled(&self) -> bool {
46 *self == GPIO1INPUT_A::DISABLED
47 }
48 #[doc = "Checks if the value of the field is `ENABLED`"]
49 #[inline(always)]
50 pub fn is_enabled(&self) -> bool {
51 *self == GPIO1INPUT_A::ENABLED
52 }
53}
54#[doc = "Field `reg_gpio_2_i` reader - Input register for GPIO2."]
55pub type REG_GPIO_2_I_R = crate::BitReader<GPIO2INPUT_A>;
56#[doc = "Input register for GPIO2.\n\nValue on reset: 0"]
57#[derive(Clone, Copy, Debug, PartialEq, Eq)]
58pub enum GPIO2INPUT_A {
59 #[doc = "0: `0`"]
60 DISABLED = 0,
61 #[doc = "1: `1`"]
62 ENABLED = 1,
63}
64impl From<GPIO2INPUT_A> for bool {
65 #[inline(always)]
66 fn from(variant: GPIO2INPUT_A) -> Self {
67 variant as u8 != 0
68 }
69}
70impl REG_GPIO_2_I_R {
71 #[doc = "Get enumerated values variant"]
72 #[inline(always)]
73 pub fn variant(&self) -> GPIO2INPUT_A {
74 match self.bits {
75 false => GPIO2INPUT_A::DISABLED,
76 true => GPIO2INPUT_A::ENABLED,
77 }
78 }
79 #[doc = "Checks if the value of the field is `DISABLED`"]
80 #[inline(always)]
81 pub fn is_disabled(&self) -> bool {
82 *self == GPIO2INPUT_A::DISABLED
83 }
84 #[doc = "Checks if the value of the field is `ENABLED`"]
85 #[inline(always)]
86 pub fn is_enabled(&self) -> bool {
87 *self == GPIO2INPUT_A::ENABLED
88 }
89}
90#[doc = "Field `reg_gpio_3_i` reader - Input register for GPIO3."]
91pub type REG_GPIO_3_I_R = crate::BitReader<GPIO3INPUT_A>;
92#[doc = "Input register for GPIO3.\n\nValue on reset: 0"]
93#[derive(Clone, Copy, Debug, PartialEq, Eq)]
94pub enum GPIO3INPUT_A {
95 #[doc = "0: `0`"]
96 DISABLED = 0,
97 #[doc = "1: `1`"]
98 ENABLED = 1,
99}
100impl From<GPIO3INPUT_A> for bool {
101 #[inline(always)]
102 fn from(variant: GPIO3INPUT_A) -> Self {
103 variant as u8 != 0
104 }
105}
106impl REG_GPIO_3_I_R {
107 #[doc = "Get enumerated values variant"]
108 #[inline(always)]
109 pub fn variant(&self) -> GPIO3INPUT_A {
110 match self.bits {
111 false => GPIO3INPUT_A::DISABLED,
112 true => GPIO3INPUT_A::ENABLED,
113 }
114 }
115 #[doc = "Checks if the value of the field is `DISABLED`"]
116 #[inline(always)]
117 pub fn is_disabled(&self) -> bool {
118 *self == GPIO3INPUT_A::DISABLED
119 }
120 #[doc = "Checks if the value of the field is `ENABLED`"]
121 #[inline(always)]
122 pub fn is_enabled(&self) -> bool {
123 *self == GPIO3INPUT_A::ENABLED
124 }
125}
126#[doc = "Field `reg_gpio_4_i` reader - Input register for GPIO4."]
127pub type REG_GPIO_4_I_R = crate::BitReader<GPIO4INPUT_A>;
128#[doc = "Input register for GPIO4.\n\nValue on reset: 0"]
129#[derive(Clone, Copy, Debug, PartialEq, Eq)]
130pub enum GPIO4INPUT_A {
131 #[doc = "0: `0`"]
132 DISABLED = 0,
133 #[doc = "1: `1`"]
134 ENABLED = 1,
135}
136impl From<GPIO4INPUT_A> for bool {
137 #[inline(always)]
138 fn from(variant: GPIO4INPUT_A) -> Self {
139 variant as u8 != 0
140 }
141}
142impl REG_GPIO_4_I_R {
143 #[doc = "Get enumerated values variant"]
144 #[inline(always)]
145 pub fn variant(&self) -> GPIO4INPUT_A {
146 match self.bits {
147 false => GPIO4INPUT_A::DISABLED,
148 true => GPIO4INPUT_A::ENABLED,
149 }
150 }
151 #[doc = "Checks if the value of the field is `DISABLED`"]
152 #[inline(always)]
153 pub fn is_disabled(&self) -> bool {
154 *self == GPIO4INPUT_A::DISABLED
155 }
156 #[doc = "Checks if the value of the field is `ENABLED`"]
157 #[inline(always)]
158 pub fn is_enabled(&self) -> bool {
159 *self == GPIO4INPUT_A::ENABLED
160 }
161}
162#[doc = "Field `reg_gpio_5_i` reader - Input register for GPIO5."]
163pub type REG_GPIO_5_I_R = crate::BitReader<GPIO5INPUT_A>;
164#[doc = "Input register for GPIO5.\n\nValue on reset: 0"]
165#[derive(Clone, Copy, Debug, PartialEq, Eq)]
166pub enum GPIO5INPUT_A {
167 #[doc = "0: `0`"]
168 DISABLED = 0,
169 #[doc = "1: `1`"]
170 ENABLED = 1,
171}
172impl From<GPIO5INPUT_A> for bool {
173 #[inline(always)]
174 fn from(variant: GPIO5INPUT_A) -> Self {
175 variant as u8 != 0
176 }
177}
178impl REG_GPIO_5_I_R {
179 #[doc = "Get enumerated values variant"]
180 #[inline(always)]
181 pub fn variant(&self) -> GPIO5INPUT_A {
182 match self.bits {
183 false => GPIO5INPUT_A::DISABLED,
184 true => GPIO5INPUT_A::ENABLED,
185 }
186 }
187 #[doc = "Checks if the value of the field is `DISABLED`"]
188 #[inline(always)]
189 pub fn is_disabled(&self) -> bool {
190 *self == GPIO5INPUT_A::DISABLED
191 }
192 #[doc = "Checks if the value of the field is `ENABLED`"]
193 #[inline(always)]
194 pub fn is_enabled(&self) -> bool {
195 *self == GPIO5INPUT_A::ENABLED
196 }
197}
198#[doc = "Field `reg_gpio_6_i` reader - Input register for GPIO6."]
199pub type REG_GPIO_6_I_R = crate::BitReader<GPIO6INPUT_A>;
200#[doc = "Input register for GPIO6.\n\nValue on reset: 0"]
201#[derive(Clone, Copy, Debug, PartialEq, Eq)]
202pub enum GPIO6INPUT_A {
203 #[doc = "0: `0`"]
204 DISABLED = 0,
205 #[doc = "1: `1`"]
206 ENABLED = 1,
207}
208impl From<GPIO6INPUT_A> for bool {
209 #[inline(always)]
210 fn from(variant: GPIO6INPUT_A) -> Self {
211 variant as u8 != 0
212 }
213}
214impl REG_GPIO_6_I_R {
215 #[doc = "Get enumerated values variant"]
216 #[inline(always)]
217 pub fn variant(&self) -> GPIO6INPUT_A {
218 match self.bits {
219 false => GPIO6INPUT_A::DISABLED,
220 true => GPIO6INPUT_A::ENABLED,
221 }
222 }
223 #[doc = "Checks if the value of the field is `DISABLED`"]
224 #[inline(always)]
225 pub fn is_disabled(&self) -> bool {
226 *self == GPIO6INPUT_A::DISABLED
227 }
228 #[doc = "Checks if the value of the field is `ENABLED`"]
229 #[inline(always)]
230 pub fn is_enabled(&self) -> bool {
231 *self == GPIO6INPUT_A::ENABLED
232 }
233}
234#[doc = "Field `reg_gpio_7_i` reader - Input register for GPIO7."]
235pub type REG_GPIO_7_I_R = crate::BitReader<GPIO7INPUT_A>;
236#[doc = "Input register for GPIO7.\n\nValue on reset: 0"]
237#[derive(Clone, Copy, Debug, PartialEq, Eq)]
238pub enum GPIO7INPUT_A {
239 #[doc = "0: `0`"]
240 DISABLED = 0,
241 #[doc = "1: `1`"]
242 ENABLED = 1,
243}
244impl From<GPIO7INPUT_A> for bool {
245 #[inline(always)]
246 fn from(variant: GPIO7INPUT_A) -> Self {
247 variant as u8 != 0
248 }
249}
250impl REG_GPIO_7_I_R {
251 #[doc = "Get enumerated values variant"]
252 #[inline(always)]
253 pub fn variant(&self) -> GPIO7INPUT_A {
254 match self.bits {
255 false => GPIO7INPUT_A::DISABLED,
256 true => GPIO7INPUT_A::ENABLED,
257 }
258 }
259 #[doc = "Checks if the value of the field is `DISABLED`"]
260 #[inline(always)]
261 pub fn is_disabled(&self) -> bool {
262 *self == GPIO7INPUT_A::DISABLED
263 }
264 #[doc = "Checks if the value of the field is `ENABLED`"]
265 #[inline(always)]
266 pub fn is_enabled(&self) -> bool {
267 *self == GPIO7INPUT_A::ENABLED
268 }
269}
270#[doc = "Field `reg_gpio_8_i` reader - Input register for GPIO8."]
271pub type REG_GPIO_8_I_R = crate::BitReader<GPIO8INPUT_A>;
272#[doc = "Input register for GPIO8.\n\nValue on reset: 0"]
273#[derive(Clone, Copy, Debug, PartialEq, Eq)]
274pub enum GPIO8INPUT_A {
275 #[doc = "0: `0`"]
276 DISABLED = 0,
277 #[doc = "1: `1`"]
278 ENABLED = 1,
279}
280impl From<GPIO8INPUT_A> for bool {
281 #[inline(always)]
282 fn from(variant: GPIO8INPUT_A) -> Self {
283 variant as u8 != 0
284 }
285}
286impl REG_GPIO_8_I_R {
287 #[doc = "Get enumerated values variant"]
288 #[inline(always)]
289 pub fn variant(&self) -> GPIO8INPUT_A {
290 match self.bits {
291 false => GPIO8INPUT_A::DISABLED,
292 true => GPIO8INPUT_A::ENABLED,
293 }
294 }
295 #[doc = "Checks if the value of the field is `DISABLED`"]
296 #[inline(always)]
297 pub fn is_disabled(&self) -> bool {
298 *self == GPIO8INPUT_A::DISABLED
299 }
300 #[doc = "Checks if the value of the field is `ENABLED`"]
301 #[inline(always)]
302 pub fn is_enabled(&self) -> bool {
303 *self == GPIO8INPUT_A::ENABLED
304 }
305}
306#[doc = "Field `reg_gpio_9_i` reader - Input register for GPIO9."]
307pub type REG_GPIO_9_I_R = crate::BitReader<GPIO9INPUT_A>;
308#[doc = "Input register for GPIO9.\n\nValue on reset: 0"]
309#[derive(Clone, Copy, Debug, PartialEq, Eq)]
310pub enum GPIO9INPUT_A {
311 #[doc = "0: `0`"]
312 DISABLED = 0,
313 #[doc = "1: `1`"]
314 ENABLED = 1,
315}
316impl From<GPIO9INPUT_A> for bool {
317 #[inline(always)]
318 fn from(variant: GPIO9INPUT_A) -> Self {
319 variant as u8 != 0
320 }
321}
322impl REG_GPIO_9_I_R {
323 #[doc = "Get enumerated values variant"]
324 #[inline(always)]
325 pub fn variant(&self) -> GPIO9INPUT_A {
326 match self.bits {
327 false => GPIO9INPUT_A::DISABLED,
328 true => GPIO9INPUT_A::ENABLED,
329 }
330 }
331 #[doc = "Checks if the value of the field is `DISABLED`"]
332 #[inline(always)]
333 pub fn is_disabled(&self) -> bool {
334 *self == GPIO9INPUT_A::DISABLED
335 }
336 #[doc = "Checks if the value of the field is `ENABLED`"]
337 #[inline(always)]
338 pub fn is_enabled(&self) -> bool {
339 *self == GPIO9INPUT_A::ENABLED
340 }
341}
342#[doc = "Field `reg_gpio_10_i` reader - Input register for GPIO10."]
343pub type REG_GPIO_10_I_R = crate::BitReader<GPIO10INPUT_A>;
344#[doc = "Input register for GPIO10.\n\nValue on reset: 0"]
345#[derive(Clone, Copy, Debug, PartialEq, Eq)]
346pub enum GPIO10INPUT_A {
347 #[doc = "0: `0`"]
348 DISABLED = 0,
349 #[doc = "1: `1`"]
350 ENABLED = 1,
351}
352impl From<GPIO10INPUT_A> for bool {
353 #[inline(always)]
354 fn from(variant: GPIO10INPUT_A) -> Self {
355 variant as u8 != 0
356 }
357}
358impl REG_GPIO_10_I_R {
359 #[doc = "Get enumerated values variant"]
360 #[inline(always)]
361 pub fn variant(&self) -> GPIO10INPUT_A {
362 match self.bits {
363 false => GPIO10INPUT_A::DISABLED,
364 true => GPIO10INPUT_A::ENABLED,
365 }
366 }
367 #[doc = "Checks if the value of the field is `DISABLED`"]
368 #[inline(always)]
369 pub fn is_disabled(&self) -> bool {
370 *self == GPIO10INPUT_A::DISABLED
371 }
372 #[doc = "Checks if the value of the field is `ENABLED`"]
373 #[inline(always)]
374 pub fn is_enabled(&self) -> bool {
375 *self == GPIO10INPUT_A::ENABLED
376 }
377}
378#[doc = "Field `reg_gpio_11_i` reader - Input register for GPIO11."]
379pub type REG_GPIO_11_I_R = crate::BitReader<GPIO11INPUT_A>;
380#[doc = "Input register for GPIO11.\n\nValue on reset: 0"]
381#[derive(Clone, Copy, Debug, PartialEq, Eq)]
382pub enum GPIO11INPUT_A {
383 #[doc = "0: `0`"]
384 DISABLED = 0,
385 #[doc = "1: `1`"]
386 ENABLED = 1,
387}
388impl From<GPIO11INPUT_A> for bool {
389 #[inline(always)]
390 fn from(variant: GPIO11INPUT_A) -> Self {
391 variant as u8 != 0
392 }
393}
394impl REG_GPIO_11_I_R {
395 #[doc = "Get enumerated values variant"]
396 #[inline(always)]
397 pub fn variant(&self) -> GPIO11INPUT_A {
398 match self.bits {
399 false => GPIO11INPUT_A::DISABLED,
400 true => GPIO11INPUT_A::ENABLED,
401 }
402 }
403 #[doc = "Checks if the value of the field is `DISABLED`"]
404 #[inline(always)]
405 pub fn is_disabled(&self) -> bool {
406 *self == GPIO11INPUT_A::DISABLED
407 }
408 #[doc = "Checks if the value of the field is `ENABLED`"]
409 #[inline(always)]
410 pub fn is_enabled(&self) -> bool {
411 *self == GPIO11INPUT_A::ENABLED
412 }
413}
414#[doc = "Field `reg_gpio_12_i` reader - Input register for GPIO12."]
415pub type REG_GPIO_12_I_R = crate::BitReader<GPIO12INPUT_A>;
416#[doc = "Input register for GPIO12.\n\nValue on reset: 0"]
417#[derive(Clone, Copy, Debug, PartialEq, Eq)]
418pub enum GPIO12INPUT_A {
419 #[doc = "0: `0`"]
420 DISABLED = 0,
421 #[doc = "1: `1`"]
422 ENABLED = 1,
423}
424impl From<GPIO12INPUT_A> for bool {
425 #[inline(always)]
426 fn from(variant: GPIO12INPUT_A) -> Self {
427 variant as u8 != 0
428 }
429}
430impl REG_GPIO_12_I_R {
431 #[doc = "Get enumerated values variant"]
432 #[inline(always)]
433 pub fn variant(&self) -> GPIO12INPUT_A {
434 match self.bits {
435 false => GPIO12INPUT_A::DISABLED,
436 true => GPIO12INPUT_A::ENABLED,
437 }
438 }
439 #[doc = "Checks if the value of the field is `DISABLED`"]
440 #[inline(always)]
441 pub fn is_disabled(&self) -> bool {
442 *self == GPIO12INPUT_A::DISABLED
443 }
444 #[doc = "Checks if the value of the field is `ENABLED`"]
445 #[inline(always)]
446 pub fn is_enabled(&self) -> bool {
447 *self == GPIO12INPUT_A::ENABLED
448 }
449}
450#[doc = "Field `reg_gpio_13_i` reader - Input register for GPIO13."]
451pub type REG_GPIO_13_I_R = crate::BitReader<GPIO13INPUT_A>;
452#[doc = "Input register for GPIO13.\n\nValue on reset: 0"]
453#[derive(Clone, Copy, Debug, PartialEq, Eq)]
454pub enum GPIO13INPUT_A {
455 #[doc = "0: `0`"]
456 DISABLED = 0,
457 #[doc = "1: `1`"]
458 ENABLED = 1,
459}
460impl From<GPIO13INPUT_A> for bool {
461 #[inline(always)]
462 fn from(variant: GPIO13INPUT_A) -> Self {
463 variant as u8 != 0
464 }
465}
466impl REG_GPIO_13_I_R {
467 #[doc = "Get enumerated values variant"]
468 #[inline(always)]
469 pub fn variant(&self) -> GPIO13INPUT_A {
470 match self.bits {
471 false => GPIO13INPUT_A::DISABLED,
472 true => GPIO13INPUT_A::ENABLED,
473 }
474 }
475 #[doc = "Checks if the value of the field is `DISABLED`"]
476 #[inline(always)]
477 pub fn is_disabled(&self) -> bool {
478 *self == GPIO13INPUT_A::DISABLED
479 }
480 #[doc = "Checks if the value of the field is `ENABLED`"]
481 #[inline(always)]
482 pub fn is_enabled(&self) -> bool {
483 *self == GPIO13INPUT_A::ENABLED
484 }
485}
486#[doc = "Field `reg_gpio_14_i` reader - Input register for GPIO14."]
487pub type REG_GPIO_14_I_R = crate::BitReader<GPIO14INPUT_A>;
488#[doc = "Input register for GPIO14.\n\nValue on reset: 0"]
489#[derive(Clone, Copy, Debug, PartialEq, Eq)]
490pub enum GPIO14INPUT_A {
491 #[doc = "0: `0`"]
492 DISABLED = 0,
493 #[doc = "1: `1`"]
494 ENABLED = 1,
495}
496impl From<GPIO14INPUT_A> for bool {
497 #[inline(always)]
498 fn from(variant: GPIO14INPUT_A) -> Self {
499 variant as u8 != 0
500 }
501}
502impl REG_GPIO_14_I_R {
503 #[doc = "Get enumerated values variant"]
504 #[inline(always)]
505 pub fn variant(&self) -> GPIO14INPUT_A {
506 match self.bits {
507 false => GPIO14INPUT_A::DISABLED,
508 true => GPIO14INPUT_A::ENABLED,
509 }
510 }
511 #[doc = "Checks if the value of the field is `DISABLED`"]
512 #[inline(always)]
513 pub fn is_disabled(&self) -> bool {
514 *self == GPIO14INPUT_A::DISABLED
515 }
516 #[doc = "Checks if the value of the field is `ENABLED`"]
517 #[inline(always)]
518 pub fn is_enabled(&self) -> bool {
519 *self == GPIO14INPUT_A::ENABLED
520 }
521}
522#[doc = "Field `reg_gpio_15_i` reader - Input register for GPIO15."]
523pub type REG_GPIO_15_I_R = crate::BitReader<GPIO15INPUT_A>;
524#[doc = "Input register for GPIO15.\n\nValue on reset: 0"]
525#[derive(Clone, Copy, Debug, PartialEq, Eq)]
526pub enum GPIO15INPUT_A {
527 #[doc = "0: `0`"]
528 DISABLED = 0,
529 #[doc = "1: `1`"]
530 ENABLED = 1,
531}
532impl From<GPIO15INPUT_A> for bool {
533 #[inline(always)]
534 fn from(variant: GPIO15INPUT_A) -> Self {
535 variant as u8 != 0
536 }
537}
538impl REG_GPIO_15_I_R {
539 #[doc = "Get enumerated values variant"]
540 #[inline(always)]
541 pub fn variant(&self) -> GPIO15INPUT_A {
542 match self.bits {
543 false => GPIO15INPUT_A::DISABLED,
544 true => GPIO15INPUT_A::ENABLED,
545 }
546 }
547 #[doc = "Checks if the value of the field is `DISABLED`"]
548 #[inline(always)]
549 pub fn is_disabled(&self) -> bool {
550 *self == GPIO15INPUT_A::DISABLED
551 }
552 #[doc = "Checks if the value of the field is `ENABLED`"]
553 #[inline(always)]
554 pub fn is_enabled(&self) -> bool {
555 *self == GPIO15INPUT_A::ENABLED
556 }
557}
558#[doc = "Field `reg_gpio_16_i` reader - Input register for GPIO16."]
559pub type REG_GPIO_16_I_R = crate::BitReader<GPIO16INPUT_A>;
560#[doc = "Input register for GPIO16.\n\nValue on reset: 0"]
561#[derive(Clone, Copy, Debug, PartialEq, Eq)]
562pub enum GPIO16INPUT_A {
563 #[doc = "0: `0`"]
564 DISABLED = 0,
565 #[doc = "1: `1`"]
566 ENABLED = 1,
567}
568impl From<GPIO16INPUT_A> for bool {
569 #[inline(always)]
570 fn from(variant: GPIO16INPUT_A) -> Self {
571 variant as u8 != 0
572 }
573}
574impl REG_GPIO_16_I_R {
575 #[doc = "Get enumerated values variant"]
576 #[inline(always)]
577 pub fn variant(&self) -> GPIO16INPUT_A {
578 match self.bits {
579 false => GPIO16INPUT_A::DISABLED,
580 true => GPIO16INPUT_A::ENABLED,
581 }
582 }
583 #[doc = "Checks if the value of the field is `DISABLED`"]
584 #[inline(always)]
585 pub fn is_disabled(&self) -> bool {
586 *self == GPIO16INPUT_A::DISABLED
587 }
588 #[doc = "Checks if the value of the field is `ENABLED`"]
589 #[inline(always)]
590 pub fn is_enabled(&self) -> bool {
591 *self == GPIO16INPUT_A::ENABLED
592 }
593}
594#[doc = "Field `reg_gpio_17_i` reader - Input register for GPIO17."]
595pub type REG_GPIO_17_I_R = crate::BitReader<GPIO17INPUT_A>;
596#[doc = "Input register for GPIO17.\n\nValue on reset: 0"]
597#[derive(Clone, Copy, Debug, PartialEq, Eq)]
598pub enum GPIO17INPUT_A {
599 #[doc = "0: `0`"]
600 DISABLED = 0,
601 #[doc = "1: `1`"]
602 ENABLED = 1,
603}
604impl From<GPIO17INPUT_A> for bool {
605 #[inline(always)]
606 fn from(variant: GPIO17INPUT_A) -> Self {
607 variant as u8 != 0
608 }
609}
610impl REG_GPIO_17_I_R {
611 #[doc = "Get enumerated values variant"]
612 #[inline(always)]
613 pub fn variant(&self) -> GPIO17INPUT_A {
614 match self.bits {
615 false => GPIO17INPUT_A::DISABLED,
616 true => GPIO17INPUT_A::ENABLED,
617 }
618 }
619 #[doc = "Checks if the value of the field is `DISABLED`"]
620 #[inline(always)]
621 pub fn is_disabled(&self) -> bool {
622 *self == GPIO17INPUT_A::DISABLED
623 }
624 #[doc = "Checks if the value of the field is `ENABLED`"]
625 #[inline(always)]
626 pub fn is_enabled(&self) -> bool {
627 *self == GPIO17INPUT_A::ENABLED
628 }
629}
630#[doc = "Field `reg_gpio_18_i` reader - Input register for GPIO18."]
631pub type REG_GPIO_18_I_R = crate::BitReader<GPIO18INPUT_A>;
632#[doc = "Input register for GPIO18.\n\nValue on reset: 0"]
633#[derive(Clone, Copy, Debug, PartialEq, Eq)]
634pub enum GPIO18INPUT_A {
635 #[doc = "0: `0`"]
636 DISABLED = 0,
637 #[doc = "1: `1`"]
638 ENABLED = 1,
639}
640impl From<GPIO18INPUT_A> for bool {
641 #[inline(always)]
642 fn from(variant: GPIO18INPUT_A) -> Self {
643 variant as u8 != 0
644 }
645}
646impl REG_GPIO_18_I_R {
647 #[doc = "Get enumerated values variant"]
648 #[inline(always)]
649 pub fn variant(&self) -> GPIO18INPUT_A {
650 match self.bits {
651 false => GPIO18INPUT_A::DISABLED,
652 true => GPIO18INPUT_A::ENABLED,
653 }
654 }
655 #[doc = "Checks if the value of the field is `DISABLED`"]
656 #[inline(always)]
657 pub fn is_disabled(&self) -> bool {
658 *self == GPIO18INPUT_A::DISABLED
659 }
660 #[doc = "Checks if the value of the field is `ENABLED`"]
661 #[inline(always)]
662 pub fn is_enabled(&self) -> bool {
663 *self == GPIO18INPUT_A::ENABLED
664 }
665}
666#[doc = "Field `reg_gpio_19_i` reader - Input register for GPIO19."]
667pub type REG_GPIO_19_I_R = crate::BitReader<GPIO19INPUT_A>;
668#[doc = "Input register for GPIO19.\n\nValue on reset: 0"]
669#[derive(Clone, Copy, Debug, PartialEq, Eq)]
670pub enum GPIO19INPUT_A {
671 #[doc = "0: `0`"]
672 DISABLED = 0,
673 #[doc = "1: `1`"]
674 ENABLED = 1,
675}
676impl From<GPIO19INPUT_A> for bool {
677 #[inline(always)]
678 fn from(variant: GPIO19INPUT_A) -> Self {
679 variant as u8 != 0
680 }
681}
682impl REG_GPIO_19_I_R {
683 #[doc = "Get enumerated values variant"]
684 #[inline(always)]
685 pub fn variant(&self) -> GPIO19INPUT_A {
686 match self.bits {
687 false => GPIO19INPUT_A::DISABLED,
688 true => GPIO19INPUT_A::ENABLED,
689 }
690 }
691 #[doc = "Checks if the value of the field is `DISABLED`"]
692 #[inline(always)]
693 pub fn is_disabled(&self) -> bool {
694 *self == GPIO19INPUT_A::DISABLED
695 }
696 #[doc = "Checks if the value of the field is `ENABLED`"]
697 #[inline(always)]
698 pub fn is_enabled(&self) -> bool {
699 *self == GPIO19INPUT_A::ENABLED
700 }
701}
702#[doc = "Field `reg_gpio_20_i` reader - Input register for GPIO20."]
703pub type REG_GPIO_20_I_R = crate::BitReader<GPIO20INPUT_A>;
704#[doc = "Input register for GPIO20.\n\nValue on reset: 0"]
705#[derive(Clone, Copy, Debug, PartialEq, Eq)]
706pub enum GPIO20INPUT_A {
707 #[doc = "0: `0`"]
708 DISABLED = 0,
709 #[doc = "1: `1`"]
710 ENABLED = 1,
711}
712impl From<GPIO20INPUT_A> for bool {
713 #[inline(always)]
714 fn from(variant: GPIO20INPUT_A) -> Self {
715 variant as u8 != 0
716 }
717}
718impl REG_GPIO_20_I_R {
719 #[doc = "Get enumerated values variant"]
720 #[inline(always)]
721 pub fn variant(&self) -> GPIO20INPUT_A {
722 match self.bits {
723 false => GPIO20INPUT_A::DISABLED,
724 true => GPIO20INPUT_A::ENABLED,
725 }
726 }
727 #[doc = "Checks if the value of the field is `DISABLED`"]
728 #[inline(always)]
729 pub fn is_disabled(&self) -> bool {
730 *self == GPIO20INPUT_A::DISABLED
731 }
732 #[doc = "Checks if the value of the field is `ENABLED`"]
733 #[inline(always)]
734 pub fn is_enabled(&self) -> bool {
735 *self == GPIO20INPUT_A::ENABLED
736 }
737}
738#[doc = "Field `reg_gpio_21_i` reader - Input register for GPIO21."]
739pub type REG_GPIO_21_I_R = crate::BitReader<GPIO21INPUT_A>;
740#[doc = "Input register for GPIO21.\n\nValue on reset: 0"]
741#[derive(Clone, Copy, Debug, PartialEq, Eq)]
742pub enum GPIO21INPUT_A {
743 #[doc = "0: `0`"]
744 DISABLED = 0,
745 #[doc = "1: `1`"]
746 ENABLED = 1,
747}
748impl From<GPIO21INPUT_A> for bool {
749 #[inline(always)]
750 fn from(variant: GPIO21INPUT_A) -> Self {
751 variant as u8 != 0
752 }
753}
754impl REG_GPIO_21_I_R {
755 #[doc = "Get enumerated values variant"]
756 #[inline(always)]
757 pub fn variant(&self) -> GPIO21INPUT_A {
758 match self.bits {
759 false => GPIO21INPUT_A::DISABLED,
760 true => GPIO21INPUT_A::ENABLED,
761 }
762 }
763 #[doc = "Checks if the value of the field is `DISABLED`"]
764 #[inline(always)]
765 pub fn is_disabled(&self) -> bool {
766 *self == GPIO21INPUT_A::DISABLED
767 }
768 #[doc = "Checks if the value of the field is `ENABLED`"]
769 #[inline(always)]
770 pub fn is_enabled(&self) -> bool {
771 *self == GPIO21INPUT_A::ENABLED
772 }
773}
774#[doc = "Field `reg_gpio_22_i` reader - Input register for GPIO22."]
775pub type REG_GPIO_22_I_R = crate::BitReader<GPIO22INPUT_A>;
776#[doc = "Input register for GPIO22.\n\nValue on reset: 0"]
777#[derive(Clone, Copy, Debug, PartialEq, Eq)]
778pub enum GPIO22INPUT_A {
779 #[doc = "0: `0`"]
780 DISABLED = 0,
781 #[doc = "1: `1`"]
782 ENABLED = 1,
783}
784impl From<GPIO22INPUT_A> for bool {
785 #[inline(always)]
786 fn from(variant: GPIO22INPUT_A) -> Self {
787 variant as u8 != 0
788 }
789}
790impl REG_GPIO_22_I_R {
791 #[doc = "Get enumerated values variant"]
792 #[inline(always)]
793 pub fn variant(&self) -> GPIO22INPUT_A {
794 match self.bits {
795 false => GPIO22INPUT_A::DISABLED,
796 true => GPIO22INPUT_A::ENABLED,
797 }
798 }
799 #[doc = "Checks if the value of the field is `DISABLED`"]
800 #[inline(always)]
801 pub fn is_disabled(&self) -> bool {
802 *self == GPIO22INPUT_A::DISABLED
803 }
804 #[doc = "Checks if the value of the field is `ENABLED`"]
805 #[inline(always)]
806 pub fn is_enabled(&self) -> bool {
807 *self == GPIO22INPUT_A::ENABLED
808 }
809}
810impl R {
811 #[doc = "Bit 0"]
812 #[inline(always)]
813 pub fn reg_gpio_0_i(&self) -> REG_GPIO_0_I_R {
814 REG_GPIO_0_I_R::new((self.bits & 1) != 0)
815 }
816 #[doc = "Bit 1 - Input register for GPIO1."]
817 #[inline(always)]
818 pub fn reg_gpio_1_i(&self) -> REG_GPIO_1_I_R {
819 REG_GPIO_1_I_R::new(((self.bits >> 1) & 1) != 0)
820 }
821 #[doc = "Bit 2 - Input register for GPIO2."]
822 #[inline(always)]
823 pub fn reg_gpio_2_i(&self) -> REG_GPIO_2_I_R {
824 REG_GPIO_2_I_R::new(((self.bits >> 2) & 1) != 0)
825 }
826 #[doc = "Bit 3 - Input register for GPIO3."]
827 #[inline(always)]
828 pub fn reg_gpio_3_i(&self) -> REG_GPIO_3_I_R {
829 REG_GPIO_3_I_R::new(((self.bits >> 3) & 1) != 0)
830 }
831 #[doc = "Bit 4 - Input register for GPIO4."]
832 #[inline(always)]
833 pub fn reg_gpio_4_i(&self) -> REG_GPIO_4_I_R {
834 REG_GPIO_4_I_R::new(((self.bits >> 4) & 1) != 0)
835 }
836 #[doc = "Bit 5 - Input register for GPIO5."]
837 #[inline(always)]
838 pub fn reg_gpio_5_i(&self) -> REG_GPIO_5_I_R {
839 REG_GPIO_5_I_R::new(((self.bits >> 5) & 1) != 0)
840 }
841 #[doc = "Bit 6 - Input register for GPIO6."]
842 #[inline(always)]
843 pub fn reg_gpio_6_i(&self) -> REG_GPIO_6_I_R {
844 REG_GPIO_6_I_R::new(((self.bits >> 6) & 1) != 0)
845 }
846 #[doc = "Bit 7 - Input register for GPIO7."]
847 #[inline(always)]
848 pub fn reg_gpio_7_i(&self) -> REG_GPIO_7_I_R {
849 REG_GPIO_7_I_R::new(((self.bits >> 7) & 1) != 0)
850 }
851 #[doc = "Bit 8 - Input register for GPIO8."]
852 #[inline(always)]
853 pub fn reg_gpio_8_i(&self) -> REG_GPIO_8_I_R {
854 REG_GPIO_8_I_R::new(((self.bits >> 8) & 1) != 0)
855 }
856 #[doc = "Bit 9 - Input register for GPIO9."]
857 #[inline(always)]
858 pub fn reg_gpio_9_i(&self) -> REG_GPIO_9_I_R {
859 REG_GPIO_9_I_R::new(((self.bits >> 9) & 1) != 0)
860 }
861 #[doc = "Bit 10 - Input register for GPIO10."]
862 #[inline(always)]
863 pub fn reg_gpio_10_i(&self) -> REG_GPIO_10_I_R {
864 REG_GPIO_10_I_R::new(((self.bits >> 10) & 1) != 0)
865 }
866 #[doc = "Bit 11 - Input register for GPIO11."]
867 #[inline(always)]
868 pub fn reg_gpio_11_i(&self) -> REG_GPIO_11_I_R {
869 REG_GPIO_11_I_R::new(((self.bits >> 11) & 1) != 0)
870 }
871 #[doc = "Bit 12 - Input register for GPIO12."]
872 #[inline(always)]
873 pub fn reg_gpio_12_i(&self) -> REG_GPIO_12_I_R {
874 REG_GPIO_12_I_R::new(((self.bits >> 12) & 1) != 0)
875 }
876 #[doc = "Bit 13 - Input register for GPIO13."]
877 #[inline(always)]
878 pub fn reg_gpio_13_i(&self) -> REG_GPIO_13_I_R {
879 REG_GPIO_13_I_R::new(((self.bits >> 13) & 1) != 0)
880 }
881 #[doc = "Bit 14 - Input register for GPIO14."]
882 #[inline(always)]
883 pub fn reg_gpio_14_i(&self) -> REG_GPIO_14_I_R {
884 REG_GPIO_14_I_R::new(((self.bits >> 14) & 1) != 0)
885 }
886 #[doc = "Bit 15 - Input register for GPIO15."]
887 #[inline(always)]
888 pub fn reg_gpio_15_i(&self) -> REG_GPIO_15_I_R {
889 REG_GPIO_15_I_R::new(((self.bits >> 15) & 1) != 0)
890 }
891 #[doc = "Bit 16 - Input register for GPIO16."]
892 #[inline(always)]
893 pub fn reg_gpio_16_i(&self) -> REG_GPIO_16_I_R {
894 REG_GPIO_16_I_R::new(((self.bits >> 16) & 1) != 0)
895 }
896 #[doc = "Bit 17 - Input register for GPIO17."]
897 #[inline(always)]
898 pub fn reg_gpio_17_i(&self) -> REG_GPIO_17_I_R {
899 REG_GPIO_17_I_R::new(((self.bits >> 17) & 1) != 0)
900 }
901 #[doc = "Bit 18 - Input register for GPIO18."]
902 #[inline(always)]
903 pub fn reg_gpio_18_i(&self) -> REG_GPIO_18_I_R {
904 REG_GPIO_18_I_R::new(((self.bits >> 18) & 1) != 0)
905 }
906 #[doc = "Bit 19 - Input register for GPIO19."]
907 #[inline(always)]
908 pub fn reg_gpio_19_i(&self) -> REG_GPIO_19_I_R {
909 REG_GPIO_19_I_R::new(((self.bits >> 19) & 1) != 0)
910 }
911 #[doc = "Bit 20 - Input register for GPIO20."]
912 #[inline(always)]
913 pub fn reg_gpio_20_i(&self) -> REG_GPIO_20_I_R {
914 REG_GPIO_20_I_R::new(((self.bits >> 20) & 1) != 0)
915 }
916 #[doc = "Bit 21 - Input register for GPIO21."]
917 #[inline(always)]
918 pub fn reg_gpio_21_i(&self) -> REG_GPIO_21_I_R {
919 REG_GPIO_21_I_R::new(((self.bits >> 21) & 1) != 0)
920 }
921 #[doc = "Bit 22 - Input register for GPIO22."]
922 #[inline(always)]
923 pub fn reg_gpio_22_i(&self) -> REG_GPIO_22_I_R {
924 REG_GPIO_22_I_R::new(((self.bits >> 22) & 1) != 0)
925 }
926}
927#[doc = "Input register for all GPIO pins. Input Enabled bit must be set in configuration register to work.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [gpio_cfgctl30](index.html) module"]
928pub struct GPIO_CFGCTL30_SPEC;
929impl crate::RegisterSpec for GPIO_CFGCTL30_SPEC {
930 type Ux = u32;
931}
932#[doc = "`read()` method returns [gpio_cfgctl30::R](R) reader structure"]
933impl crate::Readable for GPIO_CFGCTL30_SPEC {
934 type Reader = R;
935}
936#[doc = "`reset()` method sets GPIO_CFGCTL30 to value 0"]
937impl crate::Resettable for GPIO_CFGCTL30_SPEC {
938 const RESET_VALUE: Self::Ux = 0;
939}