1#![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<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 = "FCKMHZ Security Attribution"]
257 #[inline(always)]
258 pub fn fckmhzsa(
259 self,
260 ) -> crate::common::RegisterField<
261 8,
262 0x1,
263 1,
264 0,
265 fsar::Fckmhzsa,
266 fsar::Fckmhzsa,
267 Fsar_SPEC,
268 crate::common::RW,
269 > {
270 crate::common::RegisterField::<
271 8,
272 0x1,
273 1,
274 0,
275 fsar::Fckmhzsa,
276 fsar::Fckmhzsa,
277 Fsar_SPEC,
278 crate::common::RW,
279 >::from_register(self, 0)
280 }
281}
282impl ::core::default::Default for Fsar {
283 #[inline(always)]
284 fn default() -> Fsar {
285 <crate::RegValueT<Fsar_SPEC> as RegisterValue<_>>::new(65535)
286 }
287}
288pub mod fsar {
289
290 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
291 pub struct Flwtsa_SPEC;
292 pub type Flwtsa = crate::EnumBitfieldStruct<u8, Flwtsa_SPEC>;
293 impl Flwtsa {
294 #[doc = "Secure"]
295 pub const _0: Self = Self::new(0);
296
297 #[doc = "Non-Secure"]
298 pub const _1: Self = Self::new(1);
299 }
300 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
301 pub struct Fckmhzsa_SPEC;
302 pub type Fckmhzsa = crate::EnumBitfieldStruct<u8, Fckmhzsa_SPEC>;
303 impl Fckmhzsa {
304 #[doc = "Secure"]
305 pub const _0: Self = Self::new(0);
306
307 #[doc = "Non-Secure"]
308 pub const _1: Self = Self::new(1);
309 }
310}