1#![allow(clippy::identity_op)]
21#![allow(clippy::module_inception)]
22#![allow(clippy::derivable_impls)]
23#[allow(unused_imports)]
24use crate::common::sealed;
25#[allow(unused_imports)]
26use crate::common::*;
27#[doc = r"Key Interrupt Function"]
28unsafe impl ::core::marker::Send for super::Kint {}
29unsafe impl ::core::marker::Sync for super::Kint {}
30impl super::Kint {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36
37 #[doc = "Key Return Control Register"]
38 #[inline(always)]
39 pub const fn krctl(&self) -> &'static crate::common::Reg<self::Krctl_SPEC, crate::common::RW> {
40 unsafe {
41 crate::common::Reg::<self::Krctl_SPEC, crate::common::RW>::from_ptr(
42 self._svd2pac_as_ptr().add(0usize),
43 )
44 }
45 }
46
47 #[doc = "Key Return Flag Register"]
48 #[inline(always)]
49 pub const fn krf(&self) -> &'static crate::common::Reg<self::Krf_SPEC, crate::common::RW> {
50 unsafe {
51 crate::common::Reg::<self::Krf_SPEC, crate::common::RW>::from_ptr(
52 self._svd2pac_as_ptr().add(4usize),
53 )
54 }
55 }
56
57 #[doc = "Key Return Mode Register"]
58 #[inline(always)]
59 pub const fn krm(&self) -> &'static crate::common::Reg<self::Krm_SPEC, crate::common::RW> {
60 unsafe {
61 crate::common::Reg::<self::Krm_SPEC, crate::common::RW>::from_ptr(
62 self._svd2pac_as_ptr().add(8usize),
63 )
64 }
65 }
66}
67#[doc(hidden)]
68#[derive(Copy, Clone, Eq, PartialEq)]
69pub struct Krctl_SPEC;
70impl crate::sealed::RegSpec for Krctl_SPEC {
71 type DataType = u8;
72}
73
74#[doc = "Key Return Control Register"]
75pub type Krctl = crate::RegValueT<Krctl_SPEC>;
76
77impl Krctl {
78 #[doc = "Detection Edge Selection (KR00 to KR07 pins)"]
79 #[inline(always)]
80 pub fn kreg(
81 self,
82 ) -> crate::common::RegisterField<
83 0,
84 0x1,
85 1,
86 0,
87 krctl::Kreg,
88 krctl::Kreg,
89 Krctl_SPEC,
90 crate::common::RW,
91 > {
92 crate::common::RegisterField::<
93 0,
94 0x1,
95 1,
96 0,
97 krctl::Kreg,
98 krctl::Kreg,
99 Krctl_SPEC,
100 crate::common::RW,
101 >::from_register(self, 0)
102 }
103
104 #[doc = "Usage of Key Interrupt Flags (KRF.KIF0 to KRF.KIF7)"]
105 #[inline(always)]
106 pub fn krmd(
107 self,
108 ) -> crate::common::RegisterField<
109 7,
110 0x1,
111 1,
112 0,
113 krctl::Krmd,
114 krctl::Krmd,
115 Krctl_SPEC,
116 crate::common::RW,
117 > {
118 crate::common::RegisterField::<
119 7,
120 0x1,
121 1,
122 0,
123 krctl::Krmd,
124 krctl::Krmd,
125 Krctl_SPEC,
126 crate::common::RW,
127 >::from_register(self, 0)
128 }
129}
130impl ::core::default::Default for Krctl {
131 #[inline(always)]
132 fn default() -> Krctl {
133 <crate::RegValueT<Krctl_SPEC> as RegisterValue<_>>::new(0)
134 }
135}
136pub mod krctl {
137
138 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
139 pub struct Kreg_SPEC;
140 pub type Kreg = crate::EnumBitfieldStruct<u8, Kreg_SPEC>;
141 impl Kreg {
142 #[doc = "Falling edge"]
143 pub const _0: Self = Self::new(0);
144
145 #[doc = "Rising edge"]
146 pub const _1: Self = Self::new(1);
147 }
148 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
149 pub struct Krmd_SPEC;
150 pub type Krmd = crate::EnumBitfieldStruct<u8, Krmd_SPEC>;
151 impl Krmd {
152 #[doc = "Do not use key interrupt flags"]
153 pub const _0: Self = Self::new(0);
154
155 #[doc = "Use key interrupt flags"]
156 pub const _1: Self = Self::new(1);
157 }
158}
159#[doc(hidden)]
160#[derive(Copy, Clone, Eq, PartialEq)]
161pub struct Krf_SPEC;
162impl crate::sealed::RegSpec for Krf_SPEC {
163 type DataType = u8;
164}
165
166#[doc = "Key Return Flag Register"]
167pub type Krf = crate::RegValueT<Krf_SPEC>;
168
169impl Krf {
170 #[doc = "Key Interrupt Flag n"]
171 #[inline(always)]
172 pub fn kif0(
173 self,
174 ) -> crate::common::RegisterField<0, 0x1, 1, 0, krf::Kif0, krf::Kif0, Krf_SPEC, crate::common::RW>
175 {
176 crate::common::RegisterField::<
177 0,
178 0x1,
179 1,
180 0,
181 krf::Kif0,
182 krf::Kif0,
183 Krf_SPEC,
184 crate::common::RW,
185 >::from_register(self, 0)
186 }
187
188 #[doc = "Key Interrupt Flag n"]
189 #[inline(always)]
190 pub fn kif1(
191 self,
192 ) -> crate::common::RegisterField<1, 0x1, 1, 0, krf::Kif1, krf::Kif1, Krf_SPEC, crate::common::RW>
193 {
194 crate::common::RegisterField::<
195 1,
196 0x1,
197 1,
198 0,
199 krf::Kif1,
200 krf::Kif1,
201 Krf_SPEC,
202 crate::common::RW,
203 >::from_register(self, 0)
204 }
205
206 #[doc = "Key Interrupt Flag n"]
207 #[inline(always)]
208 pub fn kif2(
209 self,
210 ) -> crate::common::RegisterField<2, 0x1, 1, 0, krf::Kif2, krf::Kif2, Krf_SPEC, crate::common::RW>
211 {
212 crate::common::RegisterField::<
213 2,
214 0x1,
215 1,
216 0,
217 krf::Kif2,
218 krf::Kif2,
219 Krf_SPEC,
220 crate::common::RW,
221 >::from_register(self, 0)
222 }
223
224 #[doc = "Key Interrupt Flag n"]
225 #[inline(always)]
226 pub fn kif3(
227 self,
228 ) -> crate::common::RegisterField<3, 0x1, 1, 0, krf::Kif3, krf::Kif3, Krf_SPEC, crate::common::RW>
229 {
230 crate::common::RegisterField::<
231 3,
232 0x1,
233 1,
234 0,
235 krf::Kif3,
236 krf::Kif3,
237 Krf_SPEC,
238 crate::common::RW,
239 >::from_register(self, 0)
240 }
241
242 #[doc = "Key Interrupt Flag n"]
243 #[inline(always)]
244 pub fn kif4(
245 self,
246 ) -> crate::common::RegisterField<4, 0x1, 1, 0, krf::Kif4, krf::Kif4, Krf_SPEC, crate::common::RW>
247 {
248 crate::common::RegisterField::<
249 4,
250 0x1,
251 1,
252 0,
253 krf::Kif4,
254 krf::Kif4,
255 Krf_SPEC,
256 crate::common::RW,
257 >::from_register(self, 0)
258 }
259
260 #[doc = "Key Interrupt Flag n"]
261 #[inline(always)]
262 pub fn kif5(
263 self,
264 ) -> crate::common::RegisterField<5, 0x1, 1, 0, krf::Kif5, krf::Kif5, Krf_SPEC, crate::common::RW>
265 {
266 crate::common::RegisterField::<
267 5,
268 0x1,
269 1,
270 0,
271 krf::Kif5,
272 krf::Kif5,
273 Krf_SPEC,
274 crate::common::RW,
275 >::from_register(self, 0)
276 }
277
278 #[doc = "Key Interrupt Flag n"]
279 #[inline(always)]
280 pub fn kif6(
281 self,
282 ) -> crate::common::RegisterField<6, 0x1, 1, 0, krf::Kif6, krf::Kif6, Krf_SPEC, crate::common::RW>
283 {
284 crate::common::RegisterField::<
285 6,
286 0x1,
287 1,
288 0,
289 krf::Kif6,
290 krf::Kif6,
291 Krf_SPEC,
292 crate::common::RW,
293 >::from_register(self, 0)
294 }
295
296 #[doc = "Key Interrupt Flag n"]
297 #[inline(always)]
298 pub fn kif7(
299 self,
300 ) -> crate::common::RegisterField<7, 0x1, 1, 0, krf::Kif7, krf::Kif7, Krf_SPEC, crate::common::RW>
301 {
302 crate::common::RegisterField::<
303 7,
304 0x1,
305 1,
306 0,
307 krf::Kif7,
308 krf::Kif7,
309 Krf_SPEC,
310 crate::common::RW,
311 >::from_register(self, 0)
312 }
313}
314impl ::core::default::Default for Krf {
315 #[inline(always)]
316 fn default() -> Krf {
317 <crate::RegValueT<Krf_SPEC> as RegisterValue<_>>::new(0)
318 }
319}
320pub mod krf {
321
322 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
323 pub struct Kif0_SPEC;
324 pub type Kif0 = crate::EnumBitfieldStruct<u8, Kif0_SPEC>;
325 impl Kif0 {
326 #[doc = "No interrupt detected"]
327 pub const _0: Self = Self::new(0);
328
329 #[doc = "Interrupt detected"]
330 pub const _1: Self = Self::new(1);
331 }
332 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
333 pub struct Kif1_SPEC;
334 pub type Kif1 = crate::EnumBitfieldStruct<u8, Kif1_SPEC>;
335 impl Kif1 {
336 #[doc = "No interrupt detected"]
337 pub const _0: Self = Self::new(0);
338
339 #[doc = "Interrupt detected"]
340 pub const _1: Self = Self::new(1);
341 }
342 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
343 pub struct Kif2_SPEC;
344 pub type Kif2 = crate::EnumBitfieldStruct<u8, Kif2_SPEC>;
345 impl Kif2 {
346 #[doc = "No interrupt detected"]
347 pub const _0: Self = Self::new(0);
348
349 #[doc = "Interrupt detected"]
350 pub const _1: Self = Self::new(1);
351 }
352 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
353 pub struct Kif3_SPEC;
354 pub type Kif3 = crate::EnumBitfieldStruct<u8, Kif3_SPEC>;
355 impl Kif3 {
356 #[doc = "No interrupt detected"]
357 pub const _0: Self = Self::new(0);
358
359 #[doc = "Interrupt detected"]
360 pub const _1: Self = Self::new(1);
361 }
362 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
363 pub struct Kif4_SPEC;
364 pub type Kif4 = crate::EnumBitfieldStruct<u8, Kif4_SPEC>;
365 impl Kif4 {
366 #[doc = "No interrupt detected"]
367 pub const _0: Self = Self::new(0);
368
369 #[doc = "Interrupt detected"]
370 pub const _1: Self = Self::new(1);
371 }
372 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
373 pub struct Kif5_SPEC;
374 pub type Kif5 = crate::EnumBitfieldStruct<u8, Kif5_SPEC>;
375 impl Kif5 {
376 #[doc = "No interrupt detected"]
377 pub const _0: Self = Self::new(0);
378
379 #[doc = "Interrupt detected"]
380 pub const _1: Self = Self::new(1);
381 }
382 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
383 pub struct Kif6_SPEC;
384 pub type Kif6 = crate::EnumBitfieldStruct<u8, Kif6_SPEC>;
385 impl Kif6 {
386 #[doc = "No interrupt detected"]
387 pub const _0: Self = Self::new(0);
388
389 #[doc = "Interrupt detected"]
390 pub const _1: Self = Self::new(1);
391 }
392 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
393 pub struct Kif7_SPEC;
394 pub type Kif7 = crate::EnumBitfieldStruct<u8, Kif7_SPEC>;
395 impl Kif7 {
396 #[doc = "No interrupt detected"]
397 pub const _0: Self = Self::new(0);
398
399 #[doc = "Interrupt detected"]
400 pub const _1: Self = Self::new(1);
401 }
402}
403#[doc(hidden)]
404#[derive(Copy, Clone, Eq, PartialEq)]
405pub struct Krm_SPEC;
406impl crate::sealed::RegSpec for Krm_SPEC {
407 type DataType = u8;
408}
409
410#[doc = "Key Return Mode Register"]
411pub type Krm = crate::RegValueT<Krm_SPEC>;
412
413impl Krm {
414 #[doc = "Key Interrupt Mode Control n"]
415 #[inline(always)]
416 pub fn kimc0(
417 self,
418 ) -> crate::common::RegisterField<
419 0,
420 0x1,
421 1,
422 0,
423 krm::Kimc0,
424 krm::Kimc0,
425 Krm_SPEC,
426 crate::common::RW,
427 > {
428 crate::common::RegisterField::<
429 0,
430 0x1,
431 1,
432 0,
433 krm::Kimc0,
434 krm::Kimc0,
435 Krm_SPEC,
436 crate::common::RW,
437 >::from_register(self, 0)
438 }
439
440 #[doc = "Key Interrupt Mode Control n"]
441 #[inline(always)]
442 pub fn kimc1(
443 self,
444 ) -> crate::common::RegisterField<
445 1,
446 0x1,
447 1,
448 0,
449 krm::Kimc1,
450 krm::Kimc1,
451 Krm_SPEC,
452 crate::common::RW,
453 > {
454 crate::common::RegisterField::<
455 1,
456 0x1,
457 1,
458 0,
459 krm::Kimc1,
460 krm::Kimc1,
461 Krm_SPEC,
462 crate::common::RW,
463 >::from_register(self, 0)
464 }
465
466 #[doc = "Key Interrupt Mode Control n"]
467 #[inline(always)]
468 pub fn kimc2(
469 self,
470 ) -> crate::common::RegisterField<
471 2,
472 0x1,
473 1,
474 0,
475 krm::Kimc2,
476 krm::Kimc2,
477 Krm_SPEC,
478 crate::common::RW,
479 > {
480 crate::common::RegisterField::<
481 2,
482 0x1,
483 1,
484 0,
485 krm::Kimc2,
486 krm::Kimc2,
487 Krm_SPEC,
488 crate::common::RW,
489 >::from_register(self, 0)
490 }
491
492 #[doc = "Key Interrupt Mode Control n"]
493 #[inline(always)]
494 pub fn kimc3(
495 self,
496 ) -> crate::common::RegisterField<
497 3,
498 0x1,
499 1,
500 0,
501 krm::Kimc3,
502 krm::Kimc3,
503 Krm_SPEC,
504 crate::common::RW,
505 > {
506 crate::common::RegisterField::<
507 3,
508 0x1,
509 1,
510 0,
511 krm::Kimc3,
512 krm::Kimc3,
513 Krm_SPEC,
514 crate::common::RW,
515 >::from_register(self, 0)
516 }
517
518 #[doc = "Key Interrupt Mode Control n"]
519 #[inline(always)]
520 pub fn kimc4(
521 self,
522 ) -> crate::common::RegisterField<
523 4,
524 0x1,
525 1,
526 0,
527 krm::Kimc4,
528 krm::Kimc4,
529 Krm_SPEC,
530 crate::common::RW,
531 > {
532 crate::common::RegisterField::<
533 4,
534 0x1,
535 1,
536 0,
537 krm::Kimc4,
538 krm::Kimc4,
539 Krm_SPEC,
540 crate::common::RW,
541 >::from_register(self, 0)
542 }
543
544 #[doc = "Key Interrupt Mode Control n"]
545 #[inline(always)]
546 pub fn kimc5(
547 self,
548 ) -> crate::common::RegisterField<
549 5,
550 0x1,
551 1,
552 0,
553 krm::Kimc5,
554 krm::Kimc5,
555 Krm_SPEC,
556 crate::common::RW,
557 > {
558 crate::common::RegisterField::<
559 5,
560 0x1,
561 1,
562 0,
563 krm::Kimc5,
564 krm::Kimc5,
565 Krm_SPEC,
566 crate::common::RW,
567 >::from_register(self, 0)
568 }
569
570 #[doc = "Key Interrupt Mode Control n"]
571 #[inline(always)]
572 pub fn kimc6(
573 self,
574 ) -> crate::common::RegisterField<
575 6,
576 0x1,
577 1,
578 0,
579 krm::Kimc6,
580 krm::Kimc6,
581 Krm_SPEC,
582 crate::common::RW,
583 > {
584 crate::common::RegisterField::<
585 6,
586 0x1,
587 1,
588 0,
589 krm::Kimc6,
590 krm::Kimc6,
591 Krm_SPEC,
592 crate::common::RW,
593 >::from_register(self, 0)
594 }
595
596 #[doc = "Key Interrupt Mode Control n"]
597 #[inline(always)]
598 pub fn kimc7(
599 self,
600 ) -> crate::common::RegisterField<
601 7,
602 0x1,
603 1,
604 0,
605 krm::Kimc7,
606 krm::Kimc7,
607 Krm_SPEC,
608 crate::common::RW,
609 > {
610 crate::common::RegisterField::<
611 7,
612 0x1,
613 1,
614 0,
615 krm::Kimc7,
616 krm::Kimc7,
617 Krm_SPEC,
618 crate::common::RW,
619 >::from_register(self, 0)
620 }
621}
622impl ::core::default::Default for Krm {
623 #[inline(always)]
624 fn default() -> Krm {
625 <crate::RegValueT<Krm_SPEC> as RegisterValue<_>>::new(0)
626 }
627}
628pub mod krm {
629
630 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
631 pub struct Kimc0_SPEC;
632 pub type Kimc0 = crate::EnumBitfieldStruct<u8, Kimc0_SPEC>;
633 impl Kimc0 {
634 #[doc = "Do not detect key interrupt signals"]
635 pub const _0: Self = Self::new(0);
636
637 #[doc = "Detect key interrupt signals"]
638 pub const _1: Self = Self::new(1);
639 }
640 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
641 pub struct Kimc1_SPEC;
642 pub type Kimc1 = crate::EnumBitfieldStruct<u8, Kimc1_SPEC>;
643 impl Kimc1 {
644 #[doc = "Do not detect key interrupt signals"]
645 pub const _0: Self = Self::new(0);
646
647 #[doc = "Detect key interrupt signals"]
648 pub const _1: Self = Self::new(1);
649 }
650 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
651 pub struct Kimc2_SPEC;
652 pub type Kimc2 = crate::EnumBitfieldStruct<u8, Kimc2_SPEC>;
653 impl Kimc2 {
654 #[doc = "Do not detect key interrupt signals"]
655 pub const _0: Self = Self::new(0);
656
657 #[doc = "Detect key interrupt signals"]
658 pub const _1: Self = Self::new(1);
659 }
660 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
661 pub struct Kimc3_SPEC;
662 pub type Kimc3 = crate::EnumBitfieldStruct<u8, Kimc3_SPEC>;
663 impl Kimc3 {
664 #[doc = "Do not detect key interrupt signals"]
665 pub const _0: Self = Self::new(0);
666
667 #[doc = "Detect key interrupt signals"]
668 pub const _1: Self = Self::new(1);
669 }
670 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
671 pub struct Kimc4_SPEC;
672 pub type Kimc4 = crate::EnumBitfieldStruct<u8, Kimc4_SPEC>;
673 impl Kimc4 {
674 #[doc = "Do not detect key interrupt signals"]
675 pub const _0: Self = Self::new(0);
676
677 #[doc = "Detect key interrupt signals"]
678 pub const _1: Self = Self::new(1);
679 }
680 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
681 pub struct Kimc5_SPEC;
682 pub type Kimc5 = crate::EnumBitfieldStruct<u8, Kimc5_SPEC>;
683 impl Kimc5 {
684 #[doc = "Do not detect key interrupt signals"]
685 pub const _0: Self = Self::new(0);
686
687 #[doc = "Detect key interrupt signals"]
688 pub const _1: Self = Self::new(1);
689 }
690 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
691 pub struct Kimc6_SPEC;
692 pub type Kimc6 = crate::EnumBitfieldStruct<u8, Kimc6_SPEC>;
693 impl Kimc6 {
694 #[doc = "Do not detect key interrupt signals"]
695 pub const _0: Self = Self::new(0);
696
697 #[doc = "Detect key interrupt signals"]
698 pub const _1: Self = Self::new(1);
699 }
700 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
701 pub struct Kimc7_SPEC;
702 pub type Kimc7 = crate::EnumBitfieldStruct<u8, Kimc7_SPEC>;
703 impl Kimc7 {
704 #[doc = "Do not detect key interrupt signals"]
705 pub const _0: Self = Self::new(0);
706
707 #[doc = "Detect key interrupt signals"]
708 pub const _1: Self = Self::new(1);
709 }
710}