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"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 = "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(284usize),
67 )
68 }
69 }
70}
71#[doc(hidden)]
72#[derive(Copy, Clone, Eq, PartialEq)]
73pub struct Fcachee_SPEC;
74impl crate::sealed::RegSpec for Fcachee_SPEC {
75 type DataType = u16;
76}
77
78#[doc = "Flash Cache Enable Register"]
79pub type Fcachee = crate::RegValueT<Fcachee_SPEC>;
80
81impl Fcachee {
82 #[doc = "FCACHE Enable"]
83 #[inline(always)]
84 pub fn fcacheen(
85 self,
86 ) -> crate::common::RegisterField<
87 0,
88 0x1,
89 1,
90 0,
91 fcachee::Fcacheen,
92 fcachee::Fcacheen,
93 Fcachee_SPEC,
94 crate::common::RW,
95 > {
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 >::from_register(self, 0)
106 }
107}
108impl ::core::default::Default for Fcachee {
109 #[inline(always)]
110 fn default() -> Fcachee {
111 <crate::RegValueT<Fcachee_SPEC> as RegisterValue<_>>::new(0)
112 }
113}
114pub mod fcachee {
115
116 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
117 pub struct Fcacheen_SPEC;
118 pub type Fcacheen = crate::EnumBitfieldStruct<u8, Fcacheen_SPEC>;
119 impl Fcacheen {
120 #[doc = "FCACHE is disabled"]
121 pub const _0: Self = Self::new(0);
122
123 #[doc = "FCACHE is enabled"]
124 pub const _1: Self = Self::new(1);
125 }
126}
127#[doc(hidden)]
128#[derive(Copy, Clone, Eq, PartialEq)]
129pub struct Fcacheiv_SPEC;
130impl crate::sealed::RegSpec for Fcacheiv_SPEC {
131 type DataType = u16;
132}
133
134#[doc = "Flash Cache Invalidate Register"]
135pub type Fcacheiv = crate::RegValueT<Fcacheiv_SPEC>;
136
137impl Fcacheiv {
138 #[doc = "FCACHE Invalidation"]
139 #[inline(always)]
140 pub fn fcacheiv(
141 self,
142 ) -> crate::common::RegisterField<
143 0,
144 0x1,
145 1,
146 0,
147 fcacheiv::Fcacheiv,
148 fcacheiv::Fcacheiv,
149 Fcacheiv_SPEC,
150 crate::common::RW,
151 > {
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 >::from_register(self, 0)
162 }
163}
164impl ::core::default::Default for Fcacheiv {
165 #[inline(always)]
166 fn default() -> Fcacheiv {
167 <crate::RegValueT<Fcacheiv_SPEC> as RegisterValue<_>>::new(0)
168 }
169}
170pub mod fcacheiv {
171
172 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
173 pub struct Fcacheiv_SPEC;
174 pub type Fcacheiv = crate::EnumBitfieldStruct<u8, Fcacheiv_SPEC>;
175 impl Fcacheiv {
176 #[doc = "(Read)not in progress / (Write) no effect."]
177 pub const _0: Self = Self::new(0);
178
179 #[doc = "(Read)in progress /(Write) Starting Cache Invalidation"]
180 pub const _1: Self = Self::new(1);
181 }
182}
183#[doc(hidden)]
184#[derive(Copy, Clone, Eq, PartialEq)]
185pub struct Flwt_SPEC;
186impl crate::sealed::RegSpec for Flwt_SPEC {
187 type DataType = u8;
188}
189
190#[doc = "Flash Wait Cycle Register"]
191pub type Flwt = crate::RegValueT<Flwt_SPEC>;
192
193impl Flwt {
194 #[doc = "Flash Wait Cycle"]
195 #[inline(always)]
196 pub fn flwt(
197 self,
198 ) -> crate::common::RegisterField<
199 0,
200 0x7,
201 1,
202 0,
203 flwt::Flwt,
204 flwt::Flwt,
205 Flwt_SPEC,
206 crate::common::RW,
207 > {
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 >::from_register(self, 0)
218 }
219}
220impl ::core::default::Default for Flwt {
221 #[inline(always)]
222 fn default() -> Flwt {
223 <crate::RegValueT<Flwt_SPEC> as RegisterValue<_>>::new(0)
224 }
225}
226pub mod flwt {
227
228 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
229 pub struct Flwt_SPEC;
230 pub type Flwt = crate::EnumBitfieldStruct<u8, Flwt_SPEC>;
231 impl Flwt {
232 #[doc = "0 wait (ICLK<=80MHz)"]
233 pub const _000: Self = Self::new(0);
234
235 #[doc = "1 wait (80MHz < ICLK <=160MHz)"]
236 pub const _001: Self = Self::new(1);
237
238 #[doc = "2 waits (160MHz < ICLK <=240MHz)"]
239 pub const _010: Self = Self::new(2);
240 }
241}