Skip to main content

ra2e3_pac/
kint.rs

1/*
2DISCLAIMER
3This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
4No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
5applicable laws, including copyright laws.
6THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
7OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
8NON-INFRINGEMENT.  ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
9LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
10INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
11ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
13of this software. By using this software, you agree to the additional terms and conditions found by accessing the
14following link:
15http://www.renesas.com/disclaimer
16
17*/
18// Generated from SVD 1.20.00, with svd2pac 0.6.1 on Sun, 15 Mar 2026 07:02:40 +0000
19
20#![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 KR04 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.KIF4)"]
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}
260impl ::core::default::Default for Krf {
261    #[inline(always)]
262    fn default() -> Krf {
263        <crate::RegValueT<Krf_SPEC> as RegisterValue<_>>::new(0)
264    }
265}
266pub mod krf {
267
268    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
269    pub struct Kif0_SPEC;
270    pub type Kif0 = crate::EnumBitfieldStruct<u8, Kif0_SPEC>;
271    impl Kif0 {
272        #[doc = "No interrupt detected"]
273        pub const _0: Self = Self::new(0);
274
275        #[doc = "Interrupt detected"]
276        pub const _1: Self = Self::new(1);
277    }
278    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
279    pub struct Kif1_SPEC;
280    pub type Kif1 = crate::EnumBitfieldStruct<u8, Kif1_SPEC>;
281    impl Kif1 {
282        #[doc = "No interrupt detected"]
283        pub const _0: Self = Self::new(0);
284
285        #[doc = "Interrupt detected"]
286        pub const _1: Self = Self::new(1);
287    }
288    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
289    pub struct Kif2_SPEC;
290    pub type Kif2 = crate::EnumBitfieldStruct<u8, Kif2_SPEC>;
291    impl Kif2 {
292        #[doc = "No interrupt detected"]
293        pub const _0: Self = Self::new(0);
294
295        #[doc = "Interrupt detected"]
296        pub const _1: Self = Self::new(1);
297    }
298    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
299    pub struct Kif3_SPEC;
300    pub type Kif3 = crate::EnumBitfieldStruct<u8, Kif3_SPEC>;
301    impl Kif3 {
302        #[doc = "No interrupt detected"]
303        pub const _0: Self = Self::new(0);
304
305        #[doc = "Interrupt detected"]
306        pub const _1: Self = Self::new(1);
307    }
308    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
309    pub struct Kif4_SPEC;
310    pub type Kif4 = crate::EnumBitfieldStruct<u8, Kif4_SPEC>;
311    impl Kif4 {
312        #[doc = "No interrupt detected"]
313        pub const _0: Self = Self::new(0);
314
315        #[doc = "Interrupt detected"]
316        pub const _1: Self = Self::new(1);
317    }
318}
319#[doc(hidden)]
320#[derive(Copy, Clone, Eq, PartialEq)]
321pub struct Krm_SPEC;
322impl crate::sealed::RegSpec for Krm_SPEC {
323    type DataType = u8;
324}
325
326#[doc = "Key Return Mode Register"]
327pub type Krm = crate::RegValueT<Krm_SPEC>;
328
329impl Krm {
330    #[doc = "Key Interrupt Mode Control n"]
331    #[inline(always)]
332    pub fn kimc0(
333        self,
334    ) -> crate::common::RegisterField<
335        0,
336        0x1,
337        1,
338        0,
339        krm::Kimc0,
340        krm::Kimc0,
341        Krm_SPEC,
342        crate::common::RW,
343    > {
344        crate::common::RegisterField::<
345            0,
346            0x1,
347            1,
348            0,
349            krm::Kimc0,
350            krm::Kimc0,
351            Krm_SPEC,
352            crate::common::RW,
353        >::from_register(self, 0)
354    }
355
356    #[doc = "Key Interrupt Mode Control n"]
357    #[inline(always)]
358    pub fn kimc1(
359        self,
360    ) -> crate::common::RegisterField<
361        1,
362        0x1,
363        1,
364        0,
365        krm::Kimc1,
366        krm::Kimc1,
367        Krm_SPEC,
368        crate::common::RW,
369    > {
370        crate::common::RegisterField::<
371            1,
372            0x1,
373            1,
374            0,
375            krm::Kimc1,
376            krm::Kimc1,
377            Krm_SPEC,
378            crate::common::RW,
379        >::from_register(self, 0)
380    }
381
382    #[doc = "Key Interrupt Mode Control n"]
383    #[inline(always)]
384    pub fn kimc2(
385        self,
386    ) -> crate::common::RegisterField<
387        2,
388        0x1,
389        1,
390        0,
391        krm::Kimc2,
392        krm::Kimc2,
393        Krm_SPEC,
394        crate::common::RW,
395    > {
396        crate::common::RegisterField::<
397            2,
398            0x1,
399            1,
400            0,
401            krm::Kimc2,
402            krm::Kimc2,
403            Krm_SPEC,
404            crate::common::RW,
405        >::from_register(self, 0)
406    }
407
408    #[doc = "Key Interrupt Mode Control n"]
409    #[inline(always)]
410    pub fn kimc3(
411        self,
412    ) -> crate::common::RegisterField<
413        3,
414        0x1,
415        1,
416        0,
417        krm::Kimc3,
418        krm::Kimc3,
419        Krm_SPEC,
420        crate::common::RW,
421    > {
422        crate::common::RegisterField::<
423            3,
424            0x1,
425            1,
426            0,
427            krm::Kimc3,
428            krm::Kimc3,
429            Krm_SPEC,
430            crate::common::RW,
431        >::from_register(self, 0)
432    }
433
434    #[doc = "Key Interrupt Mode Control n"]
435    #[inline(always)]
436    pub fn kimc4(
437        self,
438    ) -> crate::common::RegisterField<
439        4,
440        0x1,
441        1,
442        0,
443        krm::Kimc4,
444        krm::Kimc4,
445        Krm_SPEC,
446        crate::common::RW,
447    > {
448        crate::common::RegisterField::<
449            4,
450            0x1,
451            1,
452            0,
453            krm::Kimc4,
454            krm::Kimc4,
455            Krm_SPEC,
456            crate::common::RW,
457        >::from_register(self, 0)
458    }
459}
460impl ::core::default::Default for Krm {
461    #[inline(always)]
462    fn default() -> Krm {
463        <crate::RegValueT<Krm_SPEC> as RegisterValue<_>>::new(0)
464    }
465}
466pub mod krm {
467
468    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
469    pub struct Kimc0_SPEC;
470    pub type Kimc0 = crate::EnumBitfieldStruct<u8, Kimc0_SPEC>;
471    impl Kimc0 {
472        #[doc = "Do not detect key interrupt signals"]
473        pub const _0: Self = Self::new(0);
474
475        #[doc = "Detect key interrupt signals"]
476        pub const _1: Self = Self::new(1);
477    }
478    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
479    pub struct Kimc1_SPEC;
480    pub type Kimc1 = crate::EnumBitfieldStruct<u8, Kimc1_SPEC>;
481    impl Kimc1 {
482        #[doc = "Do not detect key interrupt signals"]
483        pub const _0: Self = Self::new(0);
484
485        #[doc = "Detect key interrupt signals"]
486        pub const _1: Self = Self::new(1);
487    }
488    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
489    pub struct Kimc2_SPEC;
490    pub type Kimc2 = crate::EnumBitfieldStruct<u8, Kimc2_SPEC>;
491    impl Kimc2 {
492        #[doc = "Do not detect key interrupt signals"]
493        pub const _0: Self = Self::new(0);
494
495        #[doc = "Detect key interrupt signals"]
496        pub const _1: Self = Self::new(1);
497    }
498    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
499    pub struct Kimc3_SPEC;
500    pub type Kimc3 = crate::EnumBitfieldStruct<u8, Kimc3_SPEC>;
501    impl Kimc3 {
502        #[doc = "Do not detect key interrupt signals"]
503        pub const _0: Self = Self::new(0);
504
505        #[doc = "Detect key interrupt signals"]
506        pub const _1: Self = Self::new(1);
507    }
508    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
509    pub struct Kimc4_SPEC;
510    pub type Kimc4 = crate::EnumBitfieldStruct<u8, Kimc4_SPEC>;
511    impl Kimc4 {
512        #[doc = "Do not detect key interrupt signals"]
513        pub const _0: Self = Self::new(0);
514
515        #[doc = "Detect key interrupt signals"]
516        pub const _1: Self = Self::new(1);
517    }
518}