ra4e2_pac/
fcache.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"SYSTEM/FLASH"]
28unsafe impl ::core::marker::Send for super::Fcache {}
29unsafe impl ::core::marker::Sync for super::Fcache {}
30impl super::Fcache {
31    #[allow(unused)]
32    #[inline(always)]
33    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34        self.ptr
35    }
36
37    #[doc = "Flash Cache Enable Register"]
38    #[inline(always)]
39    pub const fn fcachee(
40        &self,
41    ) -> &'static crate::common::Reg<self::Fcachee_SPEC, crate::common::RW> {
42        unsafe {
43            crate::common::Reg::<self::Fcachee_SPEC, crate::common::RW>::from_ptr(
44                self._svd2pac_as_ptr().add(0usize),
45            )
46        }
47    }
48
49    #[doc = "Flash Cache Invalidate Register"]
50    #[inline(always)]
51    pub const fn fcacheiv(
52        &self,
53    ) -> &'static crate::common::Reg<self::Fcacheiv_SPEC, crate::common::RW> {
54        unsafe {
55            crate::common::Reg::<self::Fcacheiv_SPEC, crate::common::RW>::from_ptr(
56                self._svd2pac_as_ptr().add(4usize),
57            )
58        }
59    }
60
61    #[doc = "Flash Wait Cycle Register"]
62    #[inline(always)]
63    pub const fn flwt(&self) -> &'static crate::common::Reg<self::Flwt_SPEC, crate::common::RW> {
64        unsafe {
65            crate::common::Reg::<self::Flwt_SPEC, crate::common::RW>::from_ptr(
66                self._svd2pac_as_ptr().add(28usize),
67            )
68        }
69    }
70
71    #[doc = "Flash Security Attribution Register"]
72    #[inline(always)]
73    pub const fn fsar(&self) -> &'static crate::common::Reg<self::Fsar_SPEC, crate::common::RW> {
74        unsafe {
75            crate::common::Reg::<self::Fsar_SPEC, crate::common::RW>::from_ptr(
76                self._svd2pac_as_ptr().add(64usize),
77            )
78        }
79    }
80}
81#[doc(hidden)]
82#[derive(Copy, Clone, Eq, PartialEq)]
83pub struct Fcachee_SPEC;
84impl crate::sealed::RegSpec for Fcachee_SPEC {
85    type DataType = u16;
86}
87
88#[doc = "Flash Cache Enable Register"]
89pub type Fcachee = crate::RegValueT<Fcachee_SPEC>;
90
91impl Fcachee {
92    #[doc = "Flash Cache Enable"]
93    #[inline(always)]
94    pub fn fcacheen(
95        self,
96    ) -> crate::common::RegisterField<
97        0,
98        0x1,
99        1,
100        0,
101        fcachee::Fcacheen,
102        fcachee::Fcacheen,
103        Fcachee_SPEC,
104        crate::common::RW,
105    > {
106        crate::common::RegisterField::<
107            0,
108            0x1,
109            1,
110            0,
111            fcachee::Fcacheen,
112            fcachee::Fcacheen,
113            Fcachee_SPEC,
114            crate::common::RW,
115        >::from_register(self, 0)
116    }
117}
118impl ::core::default::Default for Fcachee {
119    #[inline(always)]
120    fn default() -> Fcachee {
121        <crate::RegValueT<Fcachee_SPEC> as RegisterValue<_>>::new(0)
122    }
123}
124pub mod fcachee {
125
126    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
127    pub struct Fcacheen_SPEC;
128    pub type Fcacheen = crate::EnumBitfieldStruct<u8, Fcacheen_SPEC>;
129    impl Fcacheen {
130        #[doc = "FCACHE is disabled"]
131        pub const _0: Self = Self::new(0);
132
133        #[doc = "FCACHE is enabled"]
134        pub const _1: Self = Self::new(1);
135    }
136}
137#[doc(hidden)]
138#[derive(Copy, Clone, Eq, PartialEq)]
139pub struct Fcacheiv_SPEC;
140impl crate::sealed::RegSpec for Fcacheiv_SPEC {
141    type DataType = u16;
142}
143
144#[doc = "Flash Cache Invalidate Register"]
145pub type Fcacheiv = crate::RegValueT<Fcacheiv_SPEC>;
146
147impl Fcacheiv {
148    #[doc = "Flash Cache Invalidate"]
149    #[inline(always)]
150    pub fn fcacheiv(
151        self,
152    ) -> crate::common::RegisterField<
153        0,
154        0x1,
155        1,
156        0,
157        fcacheiv::Fcacheiv,
158        fcacheiv::Fcacheiv,
159        Fcacheiv_SPEC,
160        crate::common::RW,
161    > {
162        crate::common::RegisterField::<
163            0,
164            0x1,
165            1,
166            0,
167            fcacheiv::Fcacheiv,
168            fcacheiv::Fcacheiv,
169            Fcacheiv_SPEC,
170            crate::common::RW,
171        >::from_register(self, 0)
172    }
173}
174impl ::core::default::Default for Fcacheiv {
175    #[inline(always)]
176    fn default() -> Fcacheiv {
177        <crate::RegValueT<Fcacheiv_SPEC> as RegisterValue<_>>::new(0)
178    }
179}
180pub mod fcacheiv {
181
182    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
183    pub struct Fcacheiv_SPEC;
184    pub type Fcacheiv = crate::EnumBitfieldStruct<u8, Fcacheiv_SPEC>;
185    impl Fcacheiv {
186        #[doc = "Read: Do not invalidate. Write: The setting is ignored."]
187        pub const _0: Self = Self::new(0);
188
189        #[doc = "Invalidate FCACHE is invalidated."]
190        pub const _1: Self = Self::new(1);
191    }
192}
193#[doc(hidden)]
194#[derive(Copy, Clone, Eq, PartialEq)]
195pub struct Flwt_SPEC;
196impl crate::sealed::RegSpec for Flwt_SPEC {
197    type DataType = u8;
198}
199
200#[doc = "Flash Wait Cycle Register"]
201pub type Flwt = crate::RegValueT<Flwt_SPEC>;
202
203impl Flwt {
204    #[doc = "Flash Wait Cycle"]
205    #[inline(always)]
206    pub fn flwt(
207        self,
208    ) -> crate::common::RegisterField<
209        0,
210        0x7,
211        1,
212        0,
213        flwt::Flwt,
214        flwt::Flwt,
215        Flwt_SPEC,
216        crate::common::RW,
217    > {
218        crate::common::RegisterField::<
219            0,
220            0x7,
221            1,
222            0,
223            flwt::Flwt,
224            flwt::Flwt,
225            Flwt_SPEC,
226            crate::common::RW,
227        >::from_register(self, 0)
228    }
229}
230impl ::core::default::Default for Flwt {
231    #[inline(always)]
232    fn default() -> Flwt {
233        <crate::RegValueT<Flwt_SPEC> as RegisterValue<_>>::new(0)
234    }
235}
236pub mod flwt {
237
238    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
239    pub struct Flwt_SPEC;
240    pub type Flwt = crate::EnumBitfieldStruct<u8, Flwt_SPEC>;
241    impl Flwt {
242        #[doc = "0 wait (ICLK ≤ 50 MHz)"]
243        pub const _000: Self = Self::new(0);
244
245        #[doc = "1 wait (ICLK > 50 MHz)"]
246        pub const _001: Self = Self::new(1);
247
248        #[doc = "2 wait Not specified"]
249        pub const _010: Self = Self::new(2);
250
251        #[doc = "3 wait Not specified"]
252        pub const _011: Self = Self::new(3);
253
254        #[doc = "Setting prohibited"]
255        pub const OTHERS: Self = Self::new(0);
256    }
257}
258#[doc(hidden)]
259#[derive(Copy, Clone, Eq, PartialEq)]
260pub struct Fsar_SPEC;
261impl crate::sealed::RegSpec for Fsar_SPEC {
262    type DataType = u16;
263}
264
265#[doc = "Flash Security Attribution Register"]
266pub type Fsar = crate::RegValueT<Fsar_SPEC>;
267
268impl Fsar {
269    #[doc = "FLWT Security Attribution"]
270    #[inline(always)]
271    pub fn flwtsa(
272        self,
273    ) -> crate::common::RegisterField<
274        0,
275        0x1,
276        1,
277        0,
278        fsar::Flwtsa,
279        fsar::Flwtsa,
280        Fsar_SPEC,
281        crate::common::RW,
282    > {
283        crate::common::RegisterField::<
284            0,
285            0x1,
286            1,
287            0,
288            fsar::Flwtsa,
289            fsar::Flwtsa,
290            Fsar_SPEC,
291            crate::common::RW,
292        >::from_register(self, 0)
293    }
294
295    #[doc = "FCKMHZ Security Attribution"]
296    #[inline(always)]
297    pub fn fckmhzsa(
298        self,
299    ) -> crate::common::RegisterField<
300        8,
301        0x1,
302        1,
303        0,
304        fsar::Fckmhzsa,
305        fsar::Fckmhzsa,
306        Fsar_SPEC,
307        crate::common::RW,
308    > {
309        crate::common::RegisterField::<
310            8,
311            0x1,
312            1,
313            0,
314            fsar::Fckmhzsa,
315            fsar::Fckmhzsa,
316            Fsar_SPEC,
317            crate::common::RW,
318        >::from_register(self, 0)
319    }
320}
321impl ::core::default::Default for Fsar {
322    #[inline(always)]
323    fn default() -> Fsar {
324        <crate::RegValueT<Fsar_SPEC> as RegisterValue<_>>::new(65535)
325    }
326}
327pub mod fsar {
328
329    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
330    pub struct Flwtsa_SPEC;
331    pub type Flwtsa = crate::EnumBitfieldStruct<u8, Flwtsa_SPEC>;
332    impl Flwtsa {
333        #[doc = "Secure"]
334        pub const _0: Self = Self::new(0);
335
336        #[doc = "Non-Secure"]
337        pub const _1: Self = Self::new(1);
338    }
339    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
340    pub struct Fckmhzsa_SPEC;
341    pub type Fckmhzsa = crate::EnumBitfieldStruct<u8, Fckmhzsa_SPEC>;
342    impl Fckmhzsa {
343        #[doc = "Secure"]
344        pub const _0: Self = Self::new(0);
345
346        #[doc = "Non-Secure"]
347        pub const _1: Self = Self::new(1);
348    }
349}