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 Security Attribution Register"]
38 #[inline(always)]
39 pub const fn fsar(&self) -> &'static crate::common::Reg<self::Fsar_SPEC, crate::common::RW> {
40 unsafe {
41 crate::common::Reg::<self::Fsar_SPEC, crate::common::RW>::from_ptr(
42 self._svd2pac_as_ptr().add(64usize),
43 )
44 }
45 }
46}
47#[doc(hidden)]
48#[derive(Copy, Clone, Eq, PartialEq)]
49pub struct Fsar_SPEC;
50impl crate::sealed::RegSpec for Fsar_SPEC {
51 type DataType = u16;
52}
53
54#[doc = "Flash Security Attribution Register"]
55pub type Fsar = crate::RegValueT<Fsar_SPEC>;
56
57impl Fsar {
58 #[doc = "FLWT Security Attribution"]
59 #[inline(always)]
60 pub fn flwtsa(
61 self,
62 ) -> crate::common::RegisterField<
63 0,
64 0x1,
65 1,
66 0,
67 fsar::Flwtsa,
68 fsar::Flwtsa,
69 Fsar_SPEC,
70 crate::common::RW,
71 > {
72 crate::common::RegisterField::<
73 0,
74 0x1,
75 1,
76 0,
77 fsar::Flwtsa,
78 fsar::Flwtsa,
79 Fsar_SPEC,
80 crate::common::RW,
81 >::from_register(self, 0)
82 }
83
84 #[doc = "FCHACHEEN Security Attribution"]
85 #[inline(always)]
86 pub fn fcachesa(
87 self,
88 ) -> crate::common::RegisterField<
89 1,
90 0x1,
91 1,
92 0,
93 fsar::Fcachesa,
94 fsar::Fcachesa,
95 Fsar_SPEC,
96 crate::common::RW,
97 > {
98 crate::common::RegisterField::<
99 1,
100 0x1,
101 1,
102 0,
103 fsar::Fcachesa,
104 fsar::Fcachesa,
105 Fsar_SPEC,
106 crate::common::RW,
107 >::from_register(self, 0)
108 }
109
110 #[doc = "FCKMHZ Security Attribution"]
111 #[inline(always)]
112 pub fn fckmhzsa(
113 self,
114 ) -> crate::common::RegisterField<
115 8,
116 0x1,
117 1,
118 0,
119 fsar::Fckmhzsa,
120 fsar::Fckmhzsa,
121 Fsar_SPEC,
122 crate::common::RW,
123 > {
124 crate::common::RegisterField::<
125 8,
126 0x1,
127 1,
128 0,
129 fsar::Fckmhzsa,
130 fsar::Fckmhzsa,
131 Fsar_SPEC,
132 crate::common::RW,
133 >::from_register(self, 0)
134 }
135
136 #[doc = "FACI command Issuing Security Attribution"]
137 #[inline(always)]
138 pub fn facicmisa(
139 self,
140 ) -> crate::common::RegisterField<
141 9,
142 0x1,
143 1,
144 0,
145 fsar::Facicmisa,
146 fsar::Facicmisa,
147 Fsar_SPEC,
148 crate::common::RW,
149 > {
150 crate::common::RegisterField::<
151 9,
152 0x1,
153 1,
154 0,
155 fsar::Facicmisa,
156 fsar::Facicmisa,
157 Fsar_SPEC,
158 crate::common::RW,
159 >::from_register(self, 0)
160 }
161
162 #[doc = "FACI command Registers Security Attribution"]
163 #[inline(always)]
164 pub fn facicmrsa(
165 self,
166 ) -> crate::common::RegisterField<
167 10,
168 0x1,
169 1,
170 0,
171 fsar::Facicmrsa,
172 fsar::Facicmrsa,
173 Fsar_SPEC,
174 crate::common::RW,
175 > {
176 crate::common::RegisterField::<
177 10,
178 0x1,
179 1,
180 0,
181 fsar::Facicmrsa,
182 fsar::Facicmrsa,
183 Fsar_SPEC,
184 crate::common::RW,
185 >::from_register(self, 0)
186 }
187}
188impl ::core::default::Default for Fsar {
189 #[inline(always)]
190 fn default() -> Fsar {
191 <crate::RegValueT<Fsar_SPEC> as RegisterValue<_>>::new(0)
192 }
193}
194pub mod fsar {
195
196 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
197 pub struct Flwtsa_SPEC;
198 pub type Flwtsa = crate::EnumBitfieldStruct<u8, Flwtsa_SPEC>;
199 impl Flwtsa {
200 #[doc = "Secure"]
201 pub const _0: Self = Self::new(0);
202
203 #[doc = "Non-secure"]
204 pub const _1: Self = Self::new(1);
205 }
206 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
207 pub struct Fcachesa_SPEC;
208 pub type Fcachesa = crate::EnumBitfieldStruct<u8, Fcachesa_SPEC>;
209 impl Fcachesa {
210 #[doc = "Secure"]
211 pub const _0: Self = Self::new(0);
212
213 #[doc = "Non-secure"]
214 pub const _1: Self = Self::new(1);
215 }
216 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
217 pub struct Fckmhzsa_SPEC;
218 pub type Fckmhzsa = crate::EnumBitfieldStruct<u8, Fckmhzsa_SPEC>;
219 impl Fckmhzsa {
220 #[doc = "Secure"]
221 pub const _0: Self = Self::new(0);
222
223 #[doc = "Non-secure"]
224 pub const _1: Self = Self::new(1);
225 }
226 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
227 pub struct Facicmisa_SPEC;
228 pub type Facicmisa = crate::EnumBitfieldStruct<u8, Facicmisa_SPEC>;
229 impl Facicmisa {
230 #[doc = "Secure"]
231 pub const _0: Self = Self::new(0);
232
233 #[doc = "Non-secure"]
234 pub const _1: Self = Self::new(1);
235 }
236 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
237 pub struct Facicmrsa_SPEC;
238 pub type Facicmrsa = crate::EnumBitfieldStruct<u8, Facicmrsa_SPEC>;
239 impl Facicmrsa {
240 #[doc = "Secure"]
241 pub const _0: Self = Self::new(0);
242
243 #[doc = "Non-secure"]
244 pub const _1: Self = Self::new(1);
245 }
246}