ra4e2_pac/
tzf.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.30.00, with svd2pac 0.6.0 on Thu, 24 Jul 2025 04:48:35 +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"TrustZone Filter"]
28unsafe impl ::core::marker::Send for super::Tzf {}
29unsafe impl ::core::marker::Sync for super::Tzf {}
30impl super::Tzf {
31    #[allow(unused)]
32    #[inline(always)]
33    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34        self.ptr
35    }
36
37    #[doc = "TrustZone Filter Operation After Detection Register"]
38    #[inline(always)]
39    pub const fn tzfoad(
40        &self,
41    ) -> &'static crate::common::Reg<self::Tzfoad_SPEC, crate::common::RW> {
42        unsafe {
43            crate::common::Reg::<self::Tzfoad_SPEC, crate::common::RW>::from_ptr(
44                self._svd2pac_as_ptr().add(0usize),
45            )
46        }
47    }
48
49    #[doc = "TrustZone Filter Protect Register"]
50    #[inline(always)]
51    pub const fn tzfpt(&self) -> &'static crate::common::Reg<self::Tzfpt_SPEC, crate::common::RW> {
52        unsafe {
53            crate::common::Reg::<self::Tzfpt_SPEC, crate::common::RW>::from_ptr(
54                self._svd2pac_as_ptr().add(4usize),
55            )
56        }
57    }
58}
59#[doc(hidden)]
60#[derive(Copy, Clone, Eq, PartialEq)]
61pub struct Tzfoad_SPEC;
62impl crate::sealed::RegSpec for Tzfoad_SPEC {
63    type DataType = u16;
64}
65
66#[doc = "TrustZone Filter Operation After Detection Register"]
67pub type Tzfoad = crate::RegValueT<Tzfoad_SPEC>;
68
69impl Tzfoad {
70    #[doc = "Operation after detection"]
71    #[inline(always)]
72    pub fn oad(
73        self,
74    ) -> crate::common::RegisterField<
75        0,
76        0x1,
77        1,
78        0,
79        tzfoad::Oad,
80        tzfoad::Oad,
81        Tzfoad_SPEC,
82        crate::common::RW,
83    > {
84        crate::common::RegisterField::<
85            0,
86            0x1,
87            1,
88            0,
89            tzfoad::Oad,
90            tzfoad::Oad,
91            Tzfoad_SPEC,
92            crate::common::RW,
93        >::from_register(self, 0)
94    }
95
96    #[doc = "KeyCode"]
97    #[inline(always)]
98    pub fn key(
99        self,
100    ) -> crate::common::RegisterField<8, 0xff, 1, 0, u8, u8, Tzfoad_SPEC, crate::common::W> {
101        crate::common::RegisterField::<8,0xff,1,0,u8,u8,Tzfoad_SPEC,crate::common::W>::from_register(self,0)
102    }
103}
104impl ::core::default::Default for Tzfoad {
105    #[inline(always)]
106    fn default() -> Tzfoad {
107        <crate::RegValueT<Tzfoad_SPEC> as RegisterValue<_>>::new(0)
108    }
109}
110pub mod tzfoad {
111
112    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
113    pub struct Oad_SPEC;
114    pub type Oad = crate::EnumBitfieldStruct<u8, Oad_SPEC>;
115    impl Oad {
116        #[doc = "Non-maskable interrupt"]
117        pub const _0: Self = Self::new(0);
118
119        #[doc = "Reset"]
120        pub const _1: Self = Self::new(1);
121    }
122}
123#[doc(hidden)]
124#[derive(Copy, Clone, Eq, PartialEq)]
125pub struct Tzfpt_SPEC;
126impl crate::sealed::RegSpec for Tzfpt_SPEC {
127    type DataType = u16;
128}
129
130#[doc = "TrustZone Filter Protect Register"]
131pub type Tzfpt = crate::RegValueT<Tzfpt_SPEC>;
132
133impl Tzfpt {
134    #[doc = "Protection of register"]
135    #[inline(always)]
136    pub fn protect(
137        self,
138    ) -> crate::common::RegisterField<
139        0,
140        0x1,
141        1,
142        0,
143        tzfpt::Protect,
144        tzfpt::Protect,
145        Tzfpt_SPEC,
146        crate::common::RW,
147    > {
148        crate::common::RegisterField::<
149            0,
150            0x1,
151            1,
152            0,
153            tzfpt::Protect,
154            tzfpt::Protect,
155            Tzfpt_SPEC,
156            crate::common::RW,
157        >::from_register(self, 0)
158    }
159
160    #[doc = "KeyCode"]
161    #[inline(always)]
162    pub fn key(
163        self,
164    ) -> crate::common::RegisterField<8, 0xff, 1, 0, u8, u8, Tzfpt_SPEC, crate::common::W> {
165        crate::common::RegisterField::<8,0xff,1,0,u8,u8,Tzfpt_SPEC,crate::common::W>::from_register(self,0)
166    }
167}
168impl ::core::default::Default for Tzfpt {
169    #[inline(always)]
170    fn default() -> Tzfpt {
171        <crate::RegValueT<Tzfpt_SPEC> as RegisterValue<_>>::new(0)
172    }
173}
174pub mod tzfpt {
175
176    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
177    pub struct Protect_SPEC;
178    pub type Protect = crate::EnumBitfieldStruct<u8, Protect_SPEC>;
179    impl Protect {
180        #[doc = "All Bus TrustZone Filter register writing is protected. Read is possible."]
181        pub const _0: Self = Self::new(0);
182
183        #[doc = "All Bus TrustZone Filter register writing is possible."]
184        pub const _1: Self = Self::new(1);
185    }
186}