1#[doc = "Register `SFMSST` reader"]
2pub struct R(crate::R<SFMSST_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<SFMSST_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<SFMSST_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<SFMSST_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `PFCNT` reader - Number of bytes of prefetched data"]
17pub type PFCNT_R = crate::FieldReader<u8, PFCNT_A>;
18#[doc = "Number of bytes of prefetched data\n\nValue on reset: 0"]
19#[derive(Clone, Copy, Debug, PartialEq, Eq)]
20#[repr(u8)]
21pub enum PFCNT_A {
22 #[doc = "0: 0 byte"]
23 _0X00 = 0,
24 #[doc = "1: 1 byte"]
25 _0X01 = 1,
26 #[doc = "2: 2 bytes"]
27 _0X02 = 2,
28 #[doc = "3: 3 bytes"]
29 _0X03 = 3,
30 #[doc = "4: 4 bytes"]
31 _0X04 = 4,
32 #[doc = "5: 5 bytes"]
33 _0X05 = 5,
34 #[doc = "6: 6 bytes"]
35 _0X06 = 6,
36 #[doc = "7: 7 bytes"]
37 _0X07 = 7,
38 #[doc = "8: 8 bytes"]
39 _0X08 = 8,
40 #[doc = "9: 9 bytes"]
41 _0X09 = 9,
42 #[doc = "10: 10 bytes"]
43 _0X0A = 10,
44 #[doc = "11: 11 bytes"]
45 _0X0B = 11,
46 #[doc = "12: 12 bytes"]
47 _0X0C = 12,
48 #[doc = "13: 13 bytes"]
49 _0X0D = 13,
50 #[doc = "14: 14 bytes"]
51 _0X0E = 14,
52 #[doc = "15: 15 bytes"]
53 _0X0F = 15,
54 #[doc = "16: 16 bytes"]
55 _0X10 = 16,
56 #[doc = "17: 17 bytes"]
57 _0X11 = 17,
58 #[doc = "18: 18 bytes"]
59 _0X12 = 18,
60}
61impl From<PFCNT_A> for u8 {
62 #[inline(always)]
63 fn from(variant: PFCNT_A) -> Self {
64 variant as _
65 }
66}
67impl PFCNT_R {
68 #[doc = "Get enumerated values variant"]
69 #[inline(always)]
70 pub fn variant(&self) -> Option<PFCNT_A> {
71 match self.bits {
72 0 => Some(PFCNT_A::_0X00),
73 1 => Some(PFCNT_A::_0X01),
74 2 => Some(PFCNT_A::_0X02),
75 3 => Some(PFCNT_A::_0X03),
76 4 => Some(PFCNT_A::_0X04),
77 5 => Some(PFCNT_A::_0X05),
78 6 => Some(PFCNT_A::_0X06),
79 7 => Some(PFCNT_A::_0X07),
80 8 => Some(PFCNT_A::_0X08),
81 9 => Some(PFCNT_A::_0X09),
82 10 => Some(PFCNT_A::_0X0A),
83 11 => Some(PFCNT_A::_0X0B),
84 12 => Some(PFCNT_A::_0X0C),
85 13 => Some(PFCNT_A::_0X0D),
86 14 => Some(PFCNT_A::_0X0E),
87 15 => Some(PFCNT_A::_0X0F),
88 16 => Some(PFCNT_A::_0X10),
89 17 => Some(PFCNT_A::_0X11),
90 18 => Some(PFCNT_A::_0X12),
91 _ => None,
92 }
93 }
94 #[doc = "Checks if the value of the field is `_0X00`"]
95 #[inline(always)]
96 pub fn is_0x00(&self) -> bool {
97 *self == PFCNT_A::_0X00
98 }
99 #[doc = "Checks if the value of the field is `_0X01`"]
100 #[inline(always)]
101 pub fn is_0x01(&self) -> bool {
102 *self == PFCNT_A::_0X01
103 }
104 #[doc = "Checks if the value of the field is `_0X02`"]
105 #[inline(always)]
106 pub fn is_0x02(&self) -> bool {
107 *self == PFCNT_A::_0X02
108 }
109 #[doc = "Checks if the value of the field is `_0X03`"]
110 #[inline(always)]
111 pub fn is_0x03(&self) -> bool {
112 *self == PFCNT_A::_0X03
113 }
114 #[doc = "Checks if the value of the field is `_0X04`"]
115 #[inline(always)]
116 pub fn is_0x04(&self) -> bool {
117 *self == PFCNT_A::_0X04
118 }
119 #[doc = "Checks if the value of the field is `_0X05`"]
120 #[inline(always)]
121 pub fn is_0x05(&self) -> bool {
122 *self == PFCNT_A::_0X05
123 }
124 #[doc = "Checks if the value of the field is `_0X06`"]
125 #[inline(always)]
126 pub fn is_0x06(&self) -> bool {
127 *self == PFCNT_A::_0X06
128 }
129 #[doc = "Checks if the value of the field is `_0X07`"]
130 #[inline(always)]
131 pub fn is_0x07(&self) -> bool {
132 *self == PFCNT_A::_0X07
133 }
134 #[doc = "Checks if the value of the field is `_0X08`"]
135 #[inline(always)]
136 pub fn is_0x08(&self) -> bool {
137 *self == PFCNT_A::_0X08
138 }
139 #[doc = "Checks if the value of the field is `_0X09`"]
140 #[inline(always)]
141 pub fn is_0x09(&self) -> bool {
142 *self == PFCNT_A::_0X09
143 }
144 #[doc = "Checks if the value of the field is `_0X0A`"]
145 #[inline(always)]
146 pub fn is_0x0a(&self) -> bool {
147 *self == PFCNT_A::_0X0A
148 }
149 #[doc = "Checks if the value of the field is `_0X0B`"]
150 #[inline(always)]
151 pub fn is_0x0b(&self) -> bool {
152 *self == PFCNT_A::_0X0B
153 }
154 #[doc = "Checks if the value of the field is `_0X0C`"]
155 #[inline(always)]
156 pub fn is_0x0c(&self) -> bool {
157 *self == PFCNT_A::_0X0C
158 }
159 #[doc = "Checks if the value of the field is `_0X0D`"]
160 #[inline(always)]
161 pub fn is_0x0d(&self) -> bool {
162 *self == PFCNT_A::_0X0D
163 }
164 #[doc = "Checks if the value of the field is `_0X0E`"]
165 #[inline(always)]
166 pub fn is_0x0e(&self) -> bool {
167 *self == PFCNT_A::_0X0E
168 }
169 #[doc = "Checks if the value of the field is `_0X0F`"]
170 #[inline(always)]
171 pub fn is_0x0f(&self) -> bool {
172 *self == PFCNT_A::_0X0F
173 }
174 #[doc = "Checks if the value of the field is `_0X10`"]
175 #[inline(always)]
176 pub fn is_0x10(&self) -> bool {
177 *self == PFCNT_A::_0X10
178 }
179 #[doc = "Checks if the value of the field is `_0X11`"]
180 #[inline(always)]
181 pub fn is_0x11(&self) -> bool {
182 *self == PFCNT_A::_0X11
183 }
184 #[doc = "Checks if the value of the field is `_0X12`"]
185 #[inline(always)]
186 pub fn is_0x12(&self) -> bool {
187 *self == PFCNT_A::_0X12
188 }
189}
190#[doc = "Field `PFFUL` reader - Prefetch buffer state"]
191pub type PFFUL_R = crate::BitReader<PFFUL_A>;
192#[doc = "Prefetch buffer state\n\nValue on reset: 0"]
193#[derive(Clone, Copy, Debug, PartialEq, Eq)]
194pub enum PFFUL_A {
195 #[doc = "0: Prefetch buffer has free space"]
196 _0 = 0,
197 #[doc = "1: Prefetch buffer is full"]
198 _1 = 1,
199}
200impl From<PFFUL_A> for bool {
201 #[inline(always)]
202 fn from(variant: PFFUL_A) -> Self {
203 variant as u8 != 0
204 }
205}
206impl PFFUL_R {
207 #[doc = "Get enumerated values variant"]
208 #[inline(always)]
209 pub fn variant(&self) -> PFFUL_A {
210 match self.bits {
211 false => PFFUL_A::_0,
212 true => PFFUL_A::_1,
213 }
214 }
215 #[doc = "Checks if the value of the field is `_0`"]
216 #[inline(always)]
217 pub fn is_0(&self) -> bool {
218 *self == PFFUL_A::_0
219 }
220 #[doc = "Checks if the value of the field is `_1`"]
221 #[inline(always)]
222 pub fn is_1(&self) -> bool {
223 *self == PFFUL_A::_1
224 }
225}
226#[doc = "Field `PFOFF` reader - Prefetch function operating state"]
227pub type PFOFF_R = crate::BitReader<PFOFF_A>;
228#[doc = "Prefetch function operating state\n\nValue on reset: 1"]
229#[derive(Clone, Copy, Debug, PartialEq, Eq)]
230pub enum PFOFF_A {
231 #[doc = "0: Prefetch function operating"]
232 _0 = 0,
233 #[doc = "1: Prefetch function not enabled or not operating"]
234 _1 = 1,
235}
236impl From<PFOFF_A> for bool {
237 #[inline(always)]
238 fn from(variant: PFOFF_A) -> Self {
239 variant as u8 != 0
240 }
241}
242impl PFOFF_R {
243 #[doc = "Get enumerated values variant"]
244 #[inline(always)]
245 pub fn variant(&self) -> PFOFF_A {
246 match self.bits {
247 false => PFOFF_A::_0,
248 true => PFOFF_A::_1,
249 }
250 }
251 #[doc = "Checks if the value of the field is `_0`"]
252 #[inline(always)]
253 pub fn is_0(&self) -> bool {
254 *self == PFOFF_A::_0
255 }
256 #[doc = "Checks if the value of the field is `_1`"]
257 #[inline(always)]
258 pub fn is_1(&self) -> bool {
259 *self == PFOFF_A::_1
260 }
261}
262impl R {
263 #[doc = "Bits 0:4 - Number of bytes of prefetched data"]
264 #[inline(always)]
265 pub fn pfcnt(&self) -> PFCNT_R {
266 PFCNT_R::new((self.bits & 0x1f) as u8)
267 }
268 #[doc = "Bit 6 - Prefetch buffer state"]
269 #[inline(always)]
270 pub fn pfful(&self) -> PFFUL_R {
271 PFFUL_R::new(((self.bits >> 6) & 1) != 0)
272 }
273 #[doc = "Bit 7 - Prefetch function operating state"]
274 #[inline(always)]
275 pub fn pfoff(&self) -> PFOFF_R {
276 PFOFF_R::new(((self.bits >> 7) & 1) != 0)
277 }
278}
279#[doc = "Status Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [sfmsst](index.html) module"]
280pub struct SFMSST_SPEC;
281impl crate::RegisterSpec for SFMSST_SPEC {
282 type Ux = u32;
283}
284#[doc = "`read()` method returns [sfmsst::R](R) reader structure"]
285impl crate::Readable for SFMSST_SPEC {
286 type Reader = R;
287}
288#[doc = "`reset()` method sets SFMSST to value 0x80"]
289impl crate::Resettable for SFMSST_SPEC {
290 const RESET_VALUE: Self::Ux = 0x80;
291}