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"CACHE"]
28unsafe impl ::core::marker::Send for super::Cache {}
29unsafe impl ::core::marker::Sync for super::Cache {}
30impl super::Cache {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36 #[doc = "C-Cache Control Register"]
37 #[inline(always)]
38 pub const fn ccactl(
39 &self,
40 ) -> &'static crate::common::Reg<self::Ccactl_SPEC, crate::common::RW> {
41 unsafe {
42 crate::common::Reg::<self::Ccactl_SPEC, crate::common::RW>::from_ptr(
43 self._svd2pac_as_ptr().add(0usize),
44 )
45 }
46 }
47
48 #[doc = "C-Cache Flush Control Register"]
49 #[inline(always)]
50 pub const fn ccafct(
51 &self,
52 ) -> &'static crate::common::Reg<self::Ccafct_SPEC, crate::common::RW> {
53 unsafe {
54 crate::common::Reg::<self::Ccafct_SPEC, crate::common::RW>::from_ptr(
55 self._svd2pac_as_ptr().add(4usize),
56 )
57 }
58 }
59
60 #[doc = "C-Cache Line Configuration Register"]
61 #[inline(always)]
62 pub const fn ccalcf(
63 &self,
64 ) -> &'static crate::common::Reg<self::Ccalcf_SPEC, crate::common::RW> {
65 unsafe {
66 crate::common::Reg::<self::Ccalcf_SPEC, crate::common::RW>::from_ptr(
67 self._svd2pac_as_ptr().add(8usize),
68 )
69 }
70 }
71
72 #[doc = "S-Cache Control Register"]
73 #[inline(always)]
74 pub const fn scactl(
75 &self,
76 ) -> &'static crate::common::Reg<self::Scactl_SPEC, crate::common::RW> {
77 unsafe {
78 crate::common::Reg::<self::Scactl_SPEC, crate::common::RW>::from_ptr(
79 self._svd2pac_as_ptr().add(64usize),
80 )
81 }
82 }
83
84 #[doc = "S-Cache Flush Control Register"]
85 #[inline(always)]
86 pub const fn scafct(
87 &self,
88 ) -> &'static crate::common::Reg<self::Scafct_SPEC, crate::common::RW> {
89 unsafe {
90 crate::common::Reg::<self::Scafct_SPEC, crate::common::RW>::from_ptr(
91 self._svd2pac_as_ptr().add(68usize),
92 )
93 }
94 }
95
96 #[doc = "S-Cache Line Configuration Register"]
97 #[inline(always)]
98 pub const fn scalcf(
99 &self,
100 ) -> &'static crate::common::Reg<self::Scalcf_SPEC, crate::common::RW> {
101 unsafe {
102 crate::common::Reg::<self::Scalcf_SPEC, crate::common::RW>::from_ptr(
103 self._svd2pac_as_ptr().add(72usize),
104 )
105 }
106 }
107
108 #[doc = "Cache Parity Error Operation After Detection Register"]
109 #[inline(always)]
110 pub const fn capoad(
111 &self,
112 ) -> &'static crate::common::Reg<self::Capoad_SPEC, crate::common::RW> {
113 unsafe {
114 crate::common::Reg::<self::Capoad_SPEC, crate::common::RW>::from_ptr(
115 self._svd2pac_as_ptr().add(512usize),
116 )
117 }
118 }
119
120 #[doc = "Cache Protection Register"]
121 #[inline(always)]
122 pub const fn caprcr(
123 &self,
124 ) -> &'static crate::common::Reg<self::Caprcr_SPEC, crate::common::RW> {
125 unsafe {
126 crate::common::Reg::<self::Caprcr_SPEC, crate::common::RW>::from_ptr(
127 self._svd2pac_as_ptr().add(516usize),
128 )
129 }
130 }
131}
132#[doc(hidden)]
133#[derive(Copy, Clone, Eq, PartialEq)]
134pub struct Ccactl_SPEC;
135impl crate::sealed::RegSpec for Ccactl_SPEC {
136 type DataType = u32;
137}
138#[doc = "C-Cache Control Register"]
139pub type Ccactl = crate::RegValueT<Ccactl_SPEC>;
140
141impl Ccactl {
142 #[doc = "C-Cache Enable"]
143 #[inline(always)]
144 pub fn enc(
145 self,
146 ) -> crate::common::RegisterField<0, 0x1, 1, 0, ccactl::Enc, Ccactl_SPEC, crate::common::RW>
147 {
148 crate::common::RegisterField::<0,0x1,1,0,ccactl::Enc, Ccactl_SPEC,crate::common::RW>::from_register(self,0)
149 }
150}
151impl ::core::default::Default for Ccactl {
152 #[inline(always)]
153 fn default() -> Ccactl {
154 <crate::RegValueT<Ccactl_SPEC> as RegisterValue<_>>::new(0)
155 }
156}
157pub mod ccactl {
158
159 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
160 pub struct Enc_SPEC;
161 pub type Enc = crate::EnumBitfieldStruct<u8, Enc_SPEC>;
162 impl Enc {
163 #[doc = "Disable C-cache"]
164 pub const _0: Self = Self::new(0);
165 #[doc = "Enable C-cache"]
166 pub const _1: Self = Self::new(1);
167 }
168}
169#[doc(hidden)]
170#[derive(Copy, Clone, Eq, PartialEq)]
171pub struct Ccafct_SPEC;
172impl crate::sealed::RegSpec for Ccafct_SPEC {
173 type DataType = u32;
174}
175#[doc = "C-Cache Flush Control Register"]
176pub type Ccafct = crate::RegValueT<Ccafct_SPEC>;
177
178impl Ccafct {
179 #[doc = "C-Cache Flush"]
180 #[inline(always)]
181 pub fn fc(
182 self,
183 ) -> crate::common::RegisterField<0, 0x1, 1, 0, ccafct::Fc, Ccafct_SPEC, crate::common::RW>
184 {
185 crate::common::RegisterField::<0,0x1,1,0,ccafct::Fc, Ccafct_SPEC,crate::common::RW>::from_register(self,0)
186 }
187}
188impl ::core::default::Default for Ccafct {
189 #[inline(always)]
190 fn default() -> Ccafct {
191 <crate::RegValueT<Ccafct_SPEC> as RegisterValue<_>>::new(0)
192 }
193}
194pub mod ccafct {
195
196 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
197 pub struct Fc_SPEC;
198 pub type Fc = crate::EnumBitfieldStruct<u8, Fc_SPEC>;
199 impl Fc {
200 #[doc = "No action"]
201 pub const _0: Self = Self::new(0);
202 #[doc = "C-cache line flush (all lines invalidated)"]
203 pub const _1: Self = Self::new(1);
204 }
205}
206#[doc(hidden)]
207#[derive(Copy, Clone, Eq, PartialEq)]
208pub struct Ccalcf_SPEC;
209impl crate::sealed::RegSpec for Ccalcf_SPEC {
210 type DataType = u32;
211}
212#[doc = "C-Cache Line Configuration Register"]
213pub type Ccalcf = crate::RegValueT<Ccalcf_SPEC>;
214
215impl Ccalcf {
216 #[doc = "C-Cache Line Size"]
217 #[inline(always)]
218 pub fn cc(
219 self,
220 ) -> crate::common::RegisterField<0, 0x3, 1, 0, ccalcf::Cc, Ccalcf_SPEC, crate::common::RW>
221 {
222 crate::common::RegisterField::<0,0x3,1,0,ccalcf::Cc, Ccalcf_SPEC,crate::common::RW>::from_register(self,0)
223 }
224}
225impl ::core::default::Default for Ccalcf {
226 #[inline(always)]
227 fn default() -> Ccalcf {
228 <crate::RegValueT<Ccalcf_SPEC> as RegisterValue<_>>::new(1)
229 }
230}
231pub mod ccalcf {
232
233 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
234 pub struct Cc_SPEC;
235 pub type Cc = crate::EnumBitfieldStruct<u8, Cc_SPEC>;
236 impl Cc {
237 #[doc = "Prohibited"]
238 pub const _00: Self = Self::new(0);
239 #[doc = "Cache line size 32 bytes"]
240 pub const _01: Self = Self::new(1);
241 #[doc = "Cache line size 64 bytes"]
242 pub const _10: Self = Self::new(2);
243 #[doc = "Prohibited"]
244 pub const _11: Self = Self::new(3);
245 }
246}
247#[doc(hidden)]
248#[derive(Copy, Clone, Eq, PartialEq)]
249pub struct Scactl_SPEC;
250impl crate::sealed::RegSpec for Scactl_SPEC {
251 type DataType = u32;
252}
253#[doc = "S-Cache Control Register"]
254pub type Scactl = crate::RegValueT<Scactl_SPEC>;
255
256impl Scactl {
257 #[doc = "S-Cache Enable"]
258 #[inline(always)]
259 pub fn ens(
260 self,
261 ) -> crate::common::RegisterField<0, 0x1, 1, 0, scactl::Ens, Scactl_SPEC, crate::common::RW>
262 {
263 crate::common::RegisterField::<0,0x1,1,0,scactl::Ens, Scactl_SPEC,crate::common::RW>::from_register(self,0)
264 }
265}
266impl ::core::default::Default for Scactl {
267 #[inline(always)]
268 fn default() -> Scactl {
269 <crate::RegValueT<Scactl_SPEC> as RegisterValue<_>>::new(0)
270 }
271}
272pub mod scactl {
273
274 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
275 pub struct Ens_SPEC;
276 pub type Ens = crate::EnumBitfieldStruct<u8, Ens_SPEC>;
277 impl Ens {
278 #[doc = "Disable S-cache"]
279 pub const _0: Self = Self::new(0);
280 #[doc = "Enable S-cache"]
281 pub const _1: Self = Self::new(1);
282 }
283}
284#[doc(hidden)]
285#[derive(Copy, Clone, Eq, PartialEq)]
286pub struct Scafct_SPEC;
287impl crate::sealed::RegSpec for Scafct_SPEC {
288 type DataType = u32;
289}
290#[doc = "S-Cache Flush Control Register"]
291pub type Scafct = crate::RegValueT<Scafct_SPEC>;
292
293impl Scafct {
294 #[doc = "S-Cache Flush"]
295 #[inline(always)]
296 pub fn fs(
297 self,
298 ) -> crate::common::RegisterField<0, 0x1, 1, 0, scafct::Fs, Scafct_SPEC, crate::common::RW>
299 {
300 crate::common::RegisterField::<0,0x1,1,0,scafct::Fs, Scafct_SPEC,crate::common::RW>::from_register(self,0)
301 }
302}
303impl ::core::default::Default for Scafct {
304 #[inline(always)]
305 fn default() -> Scafct {
306 <crate::RegValueT<Scafct_SPEC> as RegisterValue<_>>::new(0)
307 }
308}
309pub mod scafct {
310
311 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
312 pub struct Fs_SPEC;
313 pub type Fs = crate::EnumBitfieldStruct<u8, Fs_SPEC>;
314 impl Fs {
315 #[doc = "No action"]
316 pub const _0: Self = Self::new(0);
317 #[doc = "S-cache line flush (all lines invalidated)"]
318 pub const _1: Self = Self::new(1);
319 }
320}
321#[doc(hidden)]
322#[derive(Copy, Clone, Eq, PartialEq)]
323pub struct Scalcf_SPEC;
324impl crate::sealed::RegSpec for Scalcf_SPEC {
325 type DataType = u32;
326}
327#[doc = "S-Cache Line Configuration Register"]
328pub type Scalcf = crate::RegValueT<Scalcf_SPEC>;
329
330impl Scalcf {
331 #[doc = "S-Cache Line Size"]
332 #[inline(always)]
333 pub fn cs(
334 self,
335 ) -> crate::common::RegisterField<0, 0x3, 1, 0, scalcf::Cs, Scalcf_SPEC, crate::common::RW>
336 {
337 crate::common::RegisterField::<0,0x3,1,0,scalcf::Cs, Scalcf_SPEC,crate::common::RW>::from_register(self,0)
338 }
339}
340impl ::core::default::Default for Scalcf {
341 #[inline(always)]
342 fn default() -> Scalcf {
343 <crate::RegValueT<Scalcf_SPEC> as RegisterValue<_>>::new(1)
344 }
345}
346pub mod scalcf {
347
348 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
349 pub struct Cs_SPEC;
350 pub type Cs = crate::EnumBitfieldStruct<u8, Cs_SPEC>;
351 impl Cs {
352 #[doc = "Prohibited"]
353 pub const _00: Self = Self::new(0);
354 #[doc = "Cache line size 32 bytes"]
355 pub const _01: Self = Self::new(1);
356 #[doc = "Cache line size 64 bytes"]
357 pub const _10: Self = Self::new(2);
358 #[doc = "Prohibited"]
359 pub const _11: Self = Self::new(3);
360 }
361}
362#[doc(hidden)]
363#[derive(Copy, Clone, Eq, PartialEq)]
364pub struct Capoad_SPEC;
365impl crate::sealed::RegSpec for Capoad_SPEC {
366 type DataType = u32;
367}
368#[doc = "Cache Parity Error Operation After Detection Register"]
369pub type Capoad = crate::RegValueT<Capoad_SPEC>;
370
371impl Capoad {
372 #[doc = "Operation after Detection"]
373 #[inline(always)]
374 pub fn oad(
375 self,
376 ) -> crate::common::RegisterField<0, 0x1, 1, 0, capoad::Oad, Capoad_SPEC, crate::common::RW>
377 {
378 crate::common::RegisterField::<0,0x1,1,0,capoad::Oad, Capoad_SPEC,crate::common::RW>::from_register(self,0)
379 }
380}
381impl ::core::default::Default for Capoad {
382 #[inline(always)]
383 fn default() -> Capoad {
384 <crate::RegValueT<Capoad_SPEC> as RegisterValue<_>>::new(0)
385 }
386}
387pub mod capoad {
388
389 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
390 pub struct Oad_SPEC;
391 pub type Oad = crate::EnumBitfieldStruct<u8, Oad_SPEC>;
392 impl Oad {
393 #[doc = "Non-maskable interrupt"]
394 pub const _0: Self = Self::new(0);
395 #[doc = "Reset"]
396 pub const _1: Self = Self::new(1);
397 }
398}
399#[doc(hidden)]
400#[derive(Copy, Clone, Eq, PartialEq)]
401pub struct Caprcr_SPEC;
402impl crate::sealed::RegSpec for Caprcr_SPEC {
403 type DataType = u32;
404}
405#[doc = "Cache Protection Register"]
406pub type Caprcr = crate::RegValueT<Caprcr_SPEC>;
407
408impl Caprcr {
409 #[doc = "Register Write Control"]
410 #[inline(always)]
411 pub fn prcr(
412 self,
413 ) -> crate::common::RegisterField<0, 0x1, 1, 0, caprcr::Prcr, Caprcr_SPEC, crate::common::RW>
414 {
415 crate::common::RegisterField::<0,0x1,1,0,caprcr::Prcr, Caprcr_SPEC,crate::common::RW>::from_register(self,0)
416 }
417 #[doc = "Write key code"]
418 #[inline(always)]
419 pub fn kw(
420 self,
421 ) -> crate::common::RegisterField<1, 0x7f, 1, 0, u8, Caprcr_SPEC, crate::common::RW> {
422 crate::common::RegisterField::<1,0x7f,1,0,u8, Caprcr_SPEC,crate::common::RW>::from_register(self,0)
423 }
424}
425impl ::core::default::Default for Caprcr {
426 #[inline(always)]
427 fn default() -> Caprcr {
428 <crate::RegValueT<Caprcr_SPEC> as RegisterValue<_>>::new(0)
429 }
430}
431pub mod caprcr {
432
433 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
434 pub struct Prcr_SPEC;
435 pub type Prcr = crate::EnumBitfieldStruct<u8, Prcr_SPEC>;
436 impl Prcr {
437 #[doc = "Disable writes to protected registers"]
438 pub const _0: Self = Self::new(0);
439 #[doc = "Enable writes to protected registers"]
440 pub const _1: Self = Self::new(1);
441 }
442}