Skip to main content

ra2a1_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.1, with svd2pac 0.6.1 on Sun, 15 Mar 2026 07:00:31 +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::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(256usize),
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(260usize),
57            )
58        }
59    }
60}
61#[doc(hidden)]
62#[derive(Copy, Clone, Eq, PartialEq)]
63pub struct Fcachee_SPEC;
64impl crate::sealed::RegSpec for Fcachee_SPEC {
65    type DataType = u16;
66}
67
68#[doc = "Flash Cache Enable Register"]
69pub type Fcachee = crate::RegValueT<Fcachee_SPEC>;
70
71impl Fcachee {
72    #[doc = "These bits are read as 000000000000000. The write value should be 000000000000000."]
73    #[inline(always)]
74    pub fn reserved(
75        self,
76    ) -> crate::common::RegisterField<1, 0x7fff, 1, 0, u16, u16, Fcachee_SPEC, crate::common::RW>
77    {
78        crate::common::RegisterField::<1,0x7fff,1,0,u16,u16,Fcachee_SPEC,crate::common::RW>::from_register(self,0)
79    }
80
81    #[doc = "FCACHE Enable"]
82    #[inline(always)]
83    pub fn fcacheen(
84        self,
85    ) -> crate::common::RegisterField<
86        0,
87        0x1,
88        1,
89        0,
90        fcachee::Fcacheen,
91        fcachee::Fcacheen,
92        Fcachee_SPEC,
93        crate::common::RW,
94    > {
95        crate::common::RegisterField::<
96            0,
97            0x1,
98            1,
99            0,
100            fcachee::Fcacheen,
101            fcachee::Fcacheen,
102            Fcachee_SPEC,
103            crate::common::RW,
104        >::from_register(self, 0)
105    }
106}
107impl ::core::default::Default for Fcachee {
108    #[inline(always)]
109    fn default() -> Fcachee {
110        <crate::RegValueT<Fcachee_SPEC> as RegisterValue<_>>::new(0)
111    }
112}
113pub mod fcachee {
114
115    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
116    pub struct Fcacheen_SPEC;
117    pub type Fcacheen = crate::EnumBitfieldStruct<u8, Fcacheen_SPEC>;
118    impl Fcacheen {
119        #[doc = "FCACHE is disabled"]
120        pub const _0: Self = Self::new(0);
121
122        #[doc = "FCACHE is enabled"]
123        pub const _1: Self = Self::new(1);
124    }
125}
126#[doc(hidden)]
127#[derive(Copy, Clone, Eq, PartialEq)]
128pub struct Fcacheiv_SPEC;
129impl crate::sealed::RegSpec for Fcacheiv_SPEC {
130    type DataType = u16;
131}
132
133#[doc = "Flash Cache Invalidate Register"]
134pub type Fcacheiv = crate::RegValueT<Fcacheiv_SPEC>;
135
136impl Fcacheiv {
137    #[doc = "These bits are read as 000000000000000. The write value should be 000000000000000."]
138    #[inline(always)]
139    pub fn reserved(
140        self,
141    ) -> crate::common::RegisterField<1, 0x7fff, 1, 0, u16, u16, Fcacheiv_SPEC, crate::common::RW>
142    {
143        crate::common::RegisterField::<1,0x7fff,1,0,u16,u16,Fcacheiv_SPEC,crate::common::RW>::from_register(self,0)
144    }
145
146    #[doc = "FCACHE Invalidation"]
147    #[inline(always)]
148    pub fn fcacheiv(
149        self,
150    ) -> crate::common::RegisterField<
151        0,
152        0x1,
153        1,
154        0,
155        fcacheiv::Fcacheiv,
156        fcacheiv::Fcacheiv,
157        Fcacheiv_SPEC,
158        crate::common::RW,
159    > {
160        crate::common::RegisterField::<
161            0,
162            0x1,
163            1,
164            0,
165            fcacheiv::Fcacheiv,
166            fcacheiv::Fcacheiv,
167            Fcacheiv_SPEC,
168            crate::common::RW,
169        >::from_register(self, 0)
170    }
171}
172impl ::core::default::Default for Fcacheiv {
173    #[inline(always)]
174    fn default() -> Fcacheiv {
175        <crate::RegValueT<Fcacheiv_SPEC> as RegisterValue<_>>::new(0)
176    }
177}
178pub mod fcacheiv {
179
180    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
181    pub struct Fcacheiv_SPEC;
182    pub type Fcacheiv = crate::EnumBitfieldStruct<u8, Fcacheiv_SPEC>;
183    impl Fcacheiv {
184        #[doc = "(Read)not in progress / (Write) no effect."]
185        pub const _0: Self = Self::new(0);
186
187        #[doc = "(Read)in progress /(Write)  Starting Cache Invalidation"]
188        pub const _1: Self = Self::new(1);
189    }
190}