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 = "Usage of Key Interrupt Flags(KR0 to KR7)"]
79 #[inline(always)]
80 pub fn krmd(
81 self,
82 ) -> crate::common::RegisterField<
83 7,
84 0x1,
85 1,
86 0,
87 krctl::Krmd,
88 krctl::Krmd,
89 Krctl_SPEC,
90 crate::common::RW,
91 > {
92 crate::common::RegisterField::<
93 7,
94 0x1,
95 1,
96 0,
97 krctl::Krmd,
98 krctl::Krmd,
99 Krctl_SPEC,
100 crate::common::RW,
101 >::from_register(self, 0)
102 }
103
104 #[doc = "Detection Edge Selection (KRF0 to KRF7)"]
105 #[inline(always)]
106 pub fn kreg(
107 self,
108 ) -> crate::common::RegisterField<
109 0,
110 0x1,
111 1,
112 0,
113 krctl::Kreg,
114 krctl::Kreg,
115 Krctl_SPEC,
116 crate::common::RW,
117 > {
118 crate::common::RegisterField::<
119 0,
120 0x1,
121 1,
122 0,
123 krctl::Kreg,
124 krctl::Kreg,
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 Krmd_SPEC;
140 pub type Krmd = crate::EnumBitfieldStruct<u8, Krmd_SPEC>;
141 impl Krmd {
142 #[doc = "Do not use key interrupt flags"]
143 pub const _0: Self = Self::new(0);
144
145 #[doc = "Use key interrupt flags."]
146 pub const _1: Self = Self::new(1);
147 }
148 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
149 pub struct Kreg_SPEC;
150 pub type Kreg = crate::EnumBitfieldStruct<u8, Kreg_SPEC>;
151 impl Kreg {
152 #[doc = "Falling edge"]
153 pub const _0: Self = Self::new(0);
154
155 #[doc = "Rising edge"]
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 7"]
171 #[inline(always)]
172 pub fn krf7(
173 self,
174 ) -> crate::common::RegisterField<7, 0x1, 1, 0, krf::Krf7, krf::Krf7, Krf_SPEC, crate::common::RW>
175 {
176 crate::common::RegisterField::<
177 7,
178 0x1,
179 1,
180 0,
181 krf::Krf7,
182 krf::Krf7,
183 Krf_SPEC,
184 crate::common::RW,
185 >::from_register(self, 0)
186 }
187
188 #[doc = "Key interrupt flag 6"]
189 #[inline(always)]
190 pub fn krf6(
191 self,
192 ) -> crate::common::RegisterField<6, 0x1, 1, 0, krf::Krf6, krf::Krf6, Krf_SPEC, crate::common::RW>
193 {
194 crate::common::RegisterField::<
195 6,
196 0x1,
197 1,
198 0,
199 krf::Krf6,
200 krf::Krf6,
201 Krf_SPEC,
202 crate::common::RW,
203 >::from_register(self, 0)
204 }
205
206 #[doc = "Key interrupt flag 5"]
207 #[inline(always)]
208 pub fn krf5(
209 self,
210 ) -> crate::common::RegisterField<5, 0x1, 1, 0, krf::Krf5, krf::Krf5, Krf_SPEC, crate::common::RW>
211 {
212 crate::common::RegisterField::<
213 5,
214 0x1,
215 1,
216 0,
217 krf::Krf5,
218 krf::Krf5,
219 Krf_SPEC,
220 crate::common::RW,
221 >::from_register(self, 0)
222 }
223
224 #[doc = "Key interrupt flag 4"]
225 #[inline(always)]
226 pub fn krf4(
227 self,
228 ) -> crate::common::RegisterField<4, 0x1, 1, 0, krf::Krf4, krf::Krf4, Krf_SPEC, crate::common::RW>
229 {
230 crate::common::RegisterField::<
231 4,
232 0x1,
233 1,
234 0,
235 krf::Krf4,
236 krf::Krf4,
237 Krf_SPEC,
238 crate::common::RW,
239 >::from_register(self, 0)
240 }
241
242 #[doc = "Key interrupt flag 3"]
243 #[inline(always)]
244 pub fn krf3(
245 self,
246 ) -> crate::common::RegisterField<3, 0x1, 1, 0, krf::Krf3, krf::Krf3, Krf_SPEC, crate::common::RW>
247 {
248 crate::common::RegisterField::<
249 3,
250 0x1,
251 1,
252 0,
253 krf::Krf3,
254 krf::Krf3,
255 Krf_SPEC,
256 crate::common::RW,
257 >::from_register(self, 0)
258 }
259
260 #[doc = "Key interrupt flag 2"]
261 #[inline(always)]
262 pub fn krf2(
263 self,
264 ) -> crate::common::RegisterField<2, 0x1, 1, 0, krf::Krf2, krf::Krf2, Krf_SPEC, crate::common::RW>
265 {
266 crate::common::RegisterField::<
267 2,
268 0x1,
269 1,
270 0,
271 krf::Krf2,
272 krf::Krf2,
273 Krf_SPEC,
274 crate::common::RW,
275 >::from_register(self, 0)
276 }
277
278 #[doc = "Key interrupt flag 1"]
279 #[inline(always)]
280 pub fn krf1(
281 self,
282 ) -> crate::common::RegisterField<1, 0x1, 1, 0, krf::Krf1, krf::Krf1, Krf_SPEC, crate::common::RW>
283 {
284 crate::common::RegisterField::<
285 1,
286 0x1,
287 1,
288 0,
289 krf::Krf1,
290 krf::Krf1,
291 Krf_SPEC,
292 crate::common::RW,
293 >::from_register(self, 0)
294 }
295
296 #[doc = "Key interrupt flag 0"]
297 #[inline(always)]
298 pub fn krf0(
299 self,
300 ) -> crate::common::RegisterField<0, 0x1, 1, 0, krf::Krf0, krf::Krf0, Krf_SPEC, crate::common::RW>
301 {
302 crate::common::RegisterField::<
303 0,
304 0x1,
305 1,
306 0,
307 krf::Krf0,
308 krf::Krf0,
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 Krf7_SPEC;
324 pub type Krf7 = crate::EnumBitfieldStruct<u8, Krf7_SPEC>;
325 impl Krf7 {
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 Krf6_SPEC;
334 pub type Krf6 = crate::EnumBitfieldStruct<u8, Krf6_SPEC>;
335 impl Krf6 {
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 Krf5_SPEC;
344 pub type Krf5 = crate::EnumBitfieldStruct<u8, Krf5_SPEC>;
345 impl Krf5 {
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 Krf4_SPEC;
354 pub type Krf4 = crate::EnumBitfieldStruct<u8, Krf4_SPEC>;
355 impl Krf4 {
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 Krf3_SPEC;
364 pub type Krf3 = crate::EnumBitfieldStruct<u8, Krf3_SPEC>;
365 impl Krf3 {
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 Krf2_SPEC;
374 pub type Krf2 = crate::EnumBitfieldStruct<u8, Krf2_SPEC>;
375 impl Krf2 {
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 Krf1_SPEC;
384 pub type Krf1 = crate::EnumBitfieldStruct<u8, Krf1_SPEC>;
385 impl Krf1 {
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 Krf0_SPEC;
394 pub type Krf0 = crate::EnumBitfieldStruct<u8, Krf0_SPEC>;
395 impl Krf0 {
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 7"]
415 #[inline(always)]
416 pub fn krm7(
417 self,
418 ) -> crate::common::RegisterField<7, 0x1, 1, 0, krm::Krm7, krm::Krm7, Krm_SPEC, crate::common::RW>
419 {
420 crate::common::RegisterField::<
421 7,
422 0x1,
423 1,
424 0,
425 krm::Krm7,
426 krm::Krm7,
427 Krm_SPEC,
428 crate::common::RW,
429 >::from_register(self, 0)
430 }
431
432 #[doc = "Key interrupt mode control 6"]
433 #[inline(always)]
434 pub fn krm6(
435 self,
436 ) -> crate::common::RegisterField<6, 0x1, 1, 0, krm::Krm6, krm::Krm6, Krm_SPEC, crate::common::RW>
437 {
438 crate::common::RegisterField::<
439 6,
440 0x1,
441 1,
442 0,
443 krm::Krm6,
444 krm::Krm6,
445 Krm_SPEC,
446 crate::common::RW,
447 >::from_register(self, 0)
448 }
449
450 #[doc = "Key interrupt mode control 5"]
451 #[inline(always)]
452 pub fn krm5(
453 self,
454 ) -> crate::common::RegisterField<5, 0x1, 1, 0, krm::Krm5, krm::Krm5, Krm_SPEC, crate::common::RW>
455 {
456 crate::common::RegisterField::<
457 5,
458 0x1,
459 1,
460 0,
461 krm::Krm5,
462 krm::Krm5,
463 Krm_SPEC,
464 crate::common::RW,
465 >::from_register(self, 0)
466 }
467
468 #[doc = "Key interrupt mode control 4"]
469 #[inline(always)]
470 pub fn krm4(
471 self,
472 ) -> crate::common::RegisterField<4, 0x1, 1, 0, krm::Krm4, krm::Krm4, Krm_SPEC, crate::common::RW>
473 {
474 crate::common::RegisterField::<
475 4,
476 0x1,
477 1,
478 0,
479 krm::Krm4,
480 krm::Krm4,
481 Krm_SPEC,
482 crate::common::RW,
483 >::from_register(self, 0)
484 }
485
486 #[doc = "Key interrupt mode control 3"]
487 #[inline(always)]
488 pub fn krm3(
489 self,
490 ) -> crate::common::RegisterField<3, 0x1, 1, 0, krm::Krm3, krm::Krm3, Krm_SPEC, crate::common::RW>
491 {
492 crate::common::RegisterField::<
493 3,
494 0x1,
495 1,
496 0,
497 krm::Krm3,
498 krm::Krm3,
499 Krm_SPEC,
500 crate::common::RW,
501 >::from_register(self, 0)
502 }
503
504 #[doc = "Key interrupt mode control 2"]
505 #[inline(always)]
506 pub fn krm2(
507 self,
508 ) -> crate::common::RegisterField<2, 0x1, 1, 0, krm::Krm2, krm::Krm2, Krm_SPEC, crate::common::RW>
509 {
510 crate::common::RegisterField::<
511 2,
512 0x1,
513 1,
514 0,
515 krm::Krm2,
516 krm::Krm2,
517 Krm_SPEC,
518 crate::common::RW,
519 >::from_register(self, 0)
520 }
521
522 #[doc = "Key interrupt mode control 1"]
523 #[inline(always)]
524 pub fn krm1(
525 self,
526 ) -> crate::common::RegisterField<1, 0x1, 1, 0, krm::Krm1, krm::Krm1, Krm_SPEC, crate::common::RW>
527 {
528 crate::common::RegisterField::<
529 1,
530 0x1,
531 1,
532 0,
533 krm::Krm1,
534 krm::Krm1,
535 Krm_SPEC,
536 crate::common::RW,
537 >::from_register(self, 0)
538 }
539
540 #[doc = "Key interrupt mode control 0"]
541 #[inline(always)]
542 pub fn krm0(
543 self,
544 ) -> crate::common::RegisterField<0, 0x1, 1, 0, krm::Krm0, krm::Krm0, Krm_SPEC, crate::common::RW>
545 {
546 crate::common::RegisterField::<
547 0,
548 0x1,
549 1,
550 0,
551 krm::Krm0,
552 krm::Krm0,
553 Krm_SPEC,
554 crate::common::RW,
555 >::from_register(self, 0)
556 }
557}
558impl ::core::default::Default for Krm {
559 #[inline(always)]
560 fn default() -> Krm {
561 <crate::RegValueT<Krm_SPEC> as RegisterValue<_>>::new(0)
562 }
563}
564pub mod krm {
565
566 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
567 pub struct Krm7_SPEC;
568 pub type Krm7 = crate::EnumBitfieldStruct<u8, Krm7_SPEC>;
569 impl Krm7 {
570 #[doc = "Does not detect key interrupt signal"]
571 pub const _0: Self = Self::new(0);
572
573 #[doc = "Detect key interrupt signal."]
574 pub const _1: Self = Self::new(1);
575 }
576 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
577 pub struct Krm6_SPEC;
578 pub type Krm6 = crate::EnumBitfieldStruct<u8, Krm6_SPEC>;
579 impl Krm6 {
580 #[doc = "Does not detect key interrupt signal"]
581 pub const _0: Self = Self::new(0);
582
583 #[doc = "Detect key interrupt signal."]
584 pub const _1: Self = Self::new(1);
585 }
586 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
587 pub struct Krm5_SPEC;
588 pub type Krm5 = crate::EnumBitfieldStruct<u8, Krm5_SPEC>;
589 impl Krm5 {
590 #[doc = "Does not detect key interrupt signal"]
591 pub const _0: Self = Self::new(0);
592
593 #[doc = "Detect key interrupt signal."]
594 pub const _1: Self = Self::new(1);
595 }
596 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
597 pub struct Krm4_SPEC;
598 pub type Krm4 = crate::EnumBitfieldStruct<u8, Krm4_SPEC>;
599 impl Krm4 {
600 #[doc = "Does not detect key interrupt signal"]
601 pub const _0: Self = Self::new(0);
602
603 #[doc = "Detect key interrupt signal."]
604 pub const _1: Self = Self::new(1);
605 }
606 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
607 pub struct Krm3_SPEC;
608 pub type Krm3 = crate::EnumBitfieldStruct<u8, Krm3_SPEC>;
609 impl Krm3 {
610 #[doc = "Does not detect key interrupt signal"]
611 pub const _0: Self = Self::new(0);
612
613 #[doc = "Detect key interrupt signal."]
614 pub const _1: Self = Self::new(1);
615 }
616 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
617 pub struct Krm2_SPEC;
618 pub type Krm2 = crate::EnumBitfieldStruct<u8, Krm2_SPEC>;
619 impl Krm2 {
620 #[doc = "Does not detect key interrupt signal"]
621 pub const _0: Self = Self::new(0);
622
623 #[doc = "Detect key interrupt signal."]
624 pub const _1: Self = Self::new(1);
625 }
626 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
627 pub struct Krm1_SPEC;
628 pub type Krm1 = crate::EnumBitfieldStruct<u8, Krm1_SPEC>;
629 impl Krm1 {
630 #[doc = "Does not detect key interrupt signal"]
631 pub const _0: Self = Self::new(0);
632
633 #[doc = "Detect key interrupt signal."]
634 pub const _1: Self = Self::new(1);
635 }
636 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
637 pub struct Krm0_SPEC;
638 pub type Krm0 = crate::EnumBitfieldStruct<u8, Krm0_SPEC>;
639 impl Krm0 {
640 #[doc = "Does not detect key interrupt signal"]
641 pub const _0: Self = Self::new(0);
642
643 #[doc = "Detect key interrupt signal."]
644 pub const _1: Self = Self::new(1);
645 }
646}