ra8e1_pac/
fcache_ns.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.00.01, with svd2pac 0.6.0 on Thu, 24 Jul 2025 04:53:56 +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"Flash Cache"]
28unsafe impl ::core::marker::Send for super::FcacheNs {}
29unsafe impl ::core::marker::Sync for super::FcacheNs {}
30impl super::FcacheNs {
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<0, 0x7, 1, 0, u8, u8, Flwt_SPEC, crate::common::RW> {
209        crate::common::RegisterField::<0,0x7,1,0,u8,u8,Flwt_SPEC,crate::common::RW>::from_register(self,0)
210    }
211}
212impl ::core::default::Default for Flwt {
213    #[inline(always)]
214    fn default() -> Flwt {
215        <crate::RegValueT<Flwt_SPEC> as RegisterValue<_>>::new(0)
216    }
217}
218
219#[doc(hidden)]
220#[derive(Copy, Clone, Eq, PartialEq)]
221pub struct Fsar_SPEC;
222impl crate::sealed::RegSpec for Fsar_SPEC {
223    type DataType = u16;
224}
225
226#[doc = "Flash Security Attribution Register"]
227pub type Fsar = crate::RegValueT<Fsar_SPEC>;
228
229impl Fsar {
230    #[doc = "FLWT Security Attribution"]
231    #[inline(always)]
232    pub fn flwtsa(
233        self,
234    ) -> crate::common::RegisterField<
235        0,
236        0x1,
237        1,
238        0,
239        fsar::Flwtsa,
240        fsar::Flwtsa,
241        Fsar_SPEC,
242        crate::common::RW,
243    > {
244        crate::common::RegisterField::<
245            0,
246            0x1,
247            1,
248            0,
249            fsar::Flwtsa,
250            fsar::Flwtsa,
251            Fsar_SPEC,
252            crate::common::RW,
253        >::from_register(self, 0)
254    }
255
256    #[doc = "FCHACHEEN Security Attribution"]
257    #[inline(always)]
258    pub fn fcachesa(
259        self,
260    ) -> crate::common::RegisterField<
261        1,
262        0x1,
263        1,
264        0,
265        fsar::Fcachesa,
266        fsar::Fcachesa,
267        Fsar_SPEC,
268        crate::common::RW,
269    > {
270        crate::common::RegisterField::<
271            1,
272            0x1,
273            1,
274            0,
275            fsar::Fcachesa,
276            fsar::Fcachesa,
277            Fsar_SPEC,
278            crate::common::RW,
279        >::from_register(self, 0)
280    }
281
282    #[doc = "FCKMHZ Security Attribution"]
283    #[inline(always)]
284    pub fn fckmhzsa(
285        self,
286    ) -> crate::common::RegisterField<
287        8,
288        0x1,
289        1,
290        0,
291        fsar::Fckmhzsa,
292        fsar::Fckmhzsa,
293        Fsar_SPEC,
294        crate::common::RW,
295    > {
296        crate::common::RegisterField::<
297            8,
298            0x1,
299            1,
300            0,
301            fsar::Fckmhzsa,
302            fsar::Fckmhzsa,
303            Fsar_SPEC,
304            crate::common::RW,
305        >::from_register(self, 0)
306    }
307
308    #[doc = "FACI command Issuing Security Attribution"]
309    #[inline(always)]
310    pub fn facicmisa(
311        self,
312    ) -> crate::common::RegisterField<
313        9,
314        0x1,
315        1,
316        0,
317        fsar::Facicmisa,
318        fsar::Facicmisa,
319        Fsar_SPEC,
320        crate::common::RW,
321    > {
322        crate::common::RegisterField::<
323            9,
324            0x1,
325            1,
326            0,
327            fsar::Facicmisa,
328            fsar::Facicmisa,
329            Fsar_SPEC,
330            crate::common::RW,
331        >::from_register(self, 0)
332    }
333
334    #[doc = "FACI command Registers Security Attribution"]
335    #[inline(always)]
336    pub fn facicmrsa(
337        self,
338    ) -> crate::common::RegisterField<
339        10,
340        0x1,
341        1,
342        0,
343        fsar::Facicmrsa,
344        fsar::Facicmrsa,
345        Fsar_SPEC,
346        crate::common::RW,
347    > {
348        crate::common::RegisterField::<
349            10,
350            0x1,
351            1,
352            0,
353            fsar::Facicmrsa,
354            fsar::Facicmrsa,
355            Fsar_SPEC,
356            crate::common::RW,
357        >::from_register(self, 0)
358    }
359}
360impl ::core::default::Default for Fsar {
361    #[inline(always)]
362    fn default() -> Fsar {
363        <crate::RegValueT<Fsar_SPEC> as RegisterValue<_>>::new(0)
364    }
365}
366pub mod fsar {
367
368    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
369    pub struct Flwtsa_SPEC;
370    pub type Flwtsa = crate::EnumBitfieldStruct<u8, Flwtsa_SPEC>;
371    impl Flwtsa {
372        #[doc = "Secure"]
373        pub const _0: Self = Self::new(0);
374
375        #[doc = "Non-secure"]
376        pub const _1: Self = Self::new(1);
377    }
378    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
379    pub struct Fcachesa_SPEC;
380    pub type Fcachesa = crate::EnumBitfieldStruct<u8, Fcachesa_SPEC>;
381    impl Fcachesa {
382        #[doc = "Secure"]
383        pub const _0: Self = Self::new(0);
384
385        #[doc = "Non-secure"]
386        pub const _1: Self = Self::new(1);
387    }
388    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
389    pub struct Fckmhzsa_SPEC;
390    pub type Fckmhzsa = crate::EnumBitfieldStruct<u8, Fckmhzsa_SPEC>;
391    impl Fckmhzsa {
392        #[doc = "Secure"]
393        pub const _0: Self = Self::new(0);
394
395        #[doc = "Non-secure"]
396        pub const _1: Self = Self::new(1);
397    }
398    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
399    pub struct Facicmisa_SPEC;
400    pub type Facicmisa = crate::EnumBitfieldStruct<u8, Facicmisa_SPEC>;
401    impl Facicmisa {
402        #[doc = "Secure"]
403        pub const _0: Self = Self::new(0);
404
405        #[doc = "Non-secure"]
406        pub const _1: Self = Self::new(1);
407    }
408    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
409    pub struct Facicmrsa_SPEC;
410    pub type Facicmrsa = crate::EnumBitfieldStruct<u8, Facicmrsa_SPEC>;
411    impl Facicmrsa {
412        #[doc = "Secure"]
413        pub const _0: Self = Self::new(0);
414
415        #[doc = "Non-secure"]
416        pub const _1: Self = Self::new(1);
417    }
418}