1#[doc = "Register `FEREIS` writer"]
2pub type W = crate::W<FereisSpec>;
3#[doc = "Force Event for Command Timeout Error\n\nValue on reset: 0"]
4#[derive(Clone, Copy, Debug, PartialEq, Eq)]
5pub enum Cmdteoselect {
6 #[doc = "0: No Interrupt"]
7 No = 0,
8 #[doc = "1: Interrupt is generated"]
9 Yes = 1,
10}
11impl From<Cmdteoselect> for bool {
12 #[inline(always)]
13 fn from(variant: Cmdteoselect) -> Self {
14 variant as u8 != 0
15 }
16}
17#[doc = "Field `CMDTEO` writer - Force Event for Command Timeout Error"]
18pub type CmdteoW<'a, REG> = crate::BitWriter<'a, REG, Cmdteoselect>;
19impl<'a, REG> CmdteoW<'a, REG>
20where
21 REG: crate::Writable + crate::RegisterSpec,
22{
23 #[doc = "No Interrupt"]
24 #[inline(always)]
25 pub fn no(self) -> &'a mut crate::W<REG> {
26 self.variant(Cmdteoselect::No)
27 }
28 #[doc = "Interrupt is generated"]
29 #[inline(always)]
30 pub fn yes(self) -> &'a mut crate::W<REG> {
31 self.variant(Cmdteoselect::Yes)
32 }
33}
34#[doc = "Force Event for Command CRC Error\n\nValue on reset: 0"]
35#[derive(Clone, Copy, Debug, PartialEq, Eq)]
36pub enum Cmdcrcselect {
37 #[doc = "0: No Interrupt"]
38 No = 0,
39 #[doc = "1: Interrupt is generated"]
40 Yes = 1,
41}
42impl From<Cmdcrcselect> for bool {
43 #[inline(always)]
44 fn from(variant: Cmdcrcselect) -> Self {
45 variant as u8 != 0
46 }
47}
48#[doc = "Field `CMDCRC` writer - Force Event for Command CRC Error"]
49pub type CmdcrcW<'a, REG> = crate::BitWriter<'a, REG, Cmdcrcselect>;
50impl<'a, REG> CmdcrcW<'a, REG>
51where
52 REG: crate::Writable + crate::RegisterSpec,
53{
54 #[doc = "No Interrupt"]
55 #[inline(always)]
56 pub fn no(self) -> &'a mut crate::W<REG> {
57 self.variant(Cmdcrcselect::No)
58 }
59 #[doc = "Interrupt is generated"]
60 #[inline(always)]
61 pub fn yes(self) -> &'a mut crate::W<REG> {
62 self.variant(Cmdcrcselect::Yes)
63 }
64}
65#[doc = "Force Event for Command End Bit Error\n\nValue on reset: 0"]
66#[derive(Clone, Copy, Debug, PartialEq, Eq)]
67pub enum Cmdendselect {
68 #[doc = "0: No Interrupt"]
69 No = 0,
70 #[doc = "1: Interrupt is generated"]
71 Yes = 1,
72}
73impl From<Cmdendselect> for bool {
74 #[inline(always)]
75 fn from(variant: Cmdendselect) -> Self {
76 variant as u8 != 0
77 }
78}
79#[doc = "Field `CMDEND` writer - Force Event for Command End Bit Error"]
80pub type CmdendW<'a, REG> = crate::BitWriter<'a, REG, Cmdendselect>;
81impl<'a, REG> CmdendW<'a, REG>
82where
83 REG: crate::Writable + crate::RegisterSpec,
84{
85 #[doc = "No Interrupt"]
86 #[inline(always)]
87 pub fn no(self) -> &'a mut crate::W<REG> {
88 self.variant(Cmdendselect::No)
89 }
90 #[doc = "Interrupt is generated"]
91 #[inline(always)]
92 pub fn yes(self) -> &'a mut crate::W<REG> {
93 self.variant(Cmdendselect::Yes)
94 }
95}
96#[doc = "Force Event for Command Index Error\n\nValue on reset: 0"]
97#[derive(Clone, Copy, Debug, PartialEq, Eq)]
98pub enum Cmdidxselect {
99 #[doc = "0: No Interrupt"]
100 No = 0,
101 #[doc = "1: Interrupt is generated"]
102 Yes = 1,
103}
104impl From<Cmdidxselect> for bool {
105 #[inline(always)]
106 fn from(variant: Cmdidxselect) -> Self {
107 variant as u8 != 0
108 }
109}
110#[doc = "Field `CMDIDX` writer - Force Event for Command Index Error"]
111pub type CmdidxW<'a, REG> = crate::BitWriter<'a, REG, Cmdidxselect>;
112impl<'a, REG> CmdidxW<'a, REG>
113where
114 REG: crate::Writable + crate::RegisterSpec,
115{
116 #[doc = "No Interrupt"]
117 #[inline(always)]
118 pub fn no(self) -> &'a mut crate::W<REG> {
119 self.variant(Cmdidxselect::No)
120 }
121 #[doc = "Interrupt is generated"]
122 #[inline(always)]
123 pub fn yes(self) -> &'a mut crate::W<REG> {
124 self.variant(Cmdidxselect::Yes)
125 }
126}
127#[doc = "Force Event for Data Timeout Error\n\nValue on reset: 0"]
128#[derive(Clone, Copy, Debug, PartialEq, Eq)]
129pub enum Datteoselect {
130 #[doc = "0: No Interrupt"]
131 No = 0,
132 #[doc = "1: Interrupt is generated"]
133 Yes = 1,
134}
135impl From<Datteoselect> for bool {
136 #[inline(always)]
137 fn from(variant: Datteoselect) -> Self {
138 variant as u8 != 0
139 }
140}
141#[doc = "Field `DATTEO` writer - Force Event for Data Timeout Error"]
142pub type DatteoW<'a, REG> = crate::BitWriter<'a, REG, Datteoselect>;
143impl<'a, REG> DatteoW<'a, REG>
144where
145 REG: crate::Writable + crate::RegisterSpec,
146{
147 #[doc = "No Interrupt"]
148 #[inline(always)]
149 pub fn no(self) -> &'a mut crate::W<REG> {
150 self.variant(Datteoselect::No)
151 }
152 #[doc = "Interrupt is generated"]
153 #[inline(always)]
154 pub fn yes(self) -> &'a mut crate::W<REG> {
155 self.variant(Datteoselect::Yes)
156 }
157}
158#[doc = "Force Event for Data CRC Error\n\nValue on reset: 0"]
159#[derive(Clone, Copy, Debug, PartialEq, Eq)]
160pub enum Datcrcselect {
161 #[doc = "0: No Interrupt"]
162 No = 0,
163 #[doc = "1: Interrupt is generated"]
164 Yes = 1,
165}
166impl From<Datcrcselect> for bool {
167 #[inline(always)]
168 fn from(variant: Datcrcselect) -> Self {
169 variant as u8 != 0
170 }
171}
172#[doc = "Field `DATCRC` writer - Force Event for Data CRC Error"]
173pub type DatcrcW<'a, REG> = crate::BitWriter<'a, REG, Datcrcselect>;
174impl<'a, REG> DatcrcW<'a, REG>
175where
176 REG: crate::Writable + crate::RegisterSpec,
177{
178 #[doc = "No Interrupt"]
179 #[inline(always)]
180 pub fn no(self) -> &'a mut crate::W<REG> {
181 self.variant(Datcrcselect::No)
182 }
183 #[doc = "Interrupt is generated"]
184 #[inline(always)]
185 pub fn yes(self) -> &'a mut crate::W<REG> {
186 self.variant(Datcrcselect::Yes)
187 }
188}
189#[doc = "Force Event for Data End Bit Error\n\nValue on reset: 0"]
190#[derive(Clone, Copy, Debug, PartialEq, Eq)]
191pub enum Datendselect {
192 #[doc = "0: No Interrupt"]
193 No = 0,
194 #[doc = "1: Interrupt is generated"]
195 Yes = 1,
196}
197impl From<Datendselect> for bool {
198 #[inline(always)]
199 fn from(variant: Datendselect) -> Self {
200 variant as u8 != 0
201 }
202}
203#[doc = "Field `DATEND` writer - Force Event for Data End Bit Error"]
204pub type DatendW<'a, REG> = crate::BitWriter<'a, REG, Datendselect>;
205impl<'a, REG> DatendW<'a, REG>
206where
207 REG: crate::Writable + crate::RegisterSpec,
208{
209 #[doc = "No Interrupt"]
210 #[inline(always)]
211 pub fn no(self) -> &'a mut crate::W<REG> {
212 self.variant(Datendselect::No)
213 }
214 #[doc = "Interrupt is generated"]
215 #[inline(always)]
216 pub fn yes(self) -> &'a mut crate::W<REG> {
217 self.variant(Datendselect::Yes)
218 }
219}
220#[doc = "Force Event for Current Limit Error\n\nValue on reset: 0"]
221#[derive(Clone, Copy, Debug, PartialEq, Eq)]
222pub enum Curlimselect {
223 #[doc = "0: No Interrupt"]
224 No = 0,
225 #[doc = "1: Interrupt is generated"]
226 Yes = 1,
227}
228impl From<Curlimselect> for bool {
229 #[inline(always)]
230 fn from(variant: Curlimselect) -> Self {
231 variant as u8 != 0
232 }
233}
234#[doc = "Field `CURLIM` writer - Force Event for Current Limit Error"]
235pub type CurlimW<'a, REG> = crate::BitWriter<'a, REG, Curlimselect>;
236impl<'a, REG> CurlimW<'a, REG>
237where
238 REG: crate::Writable + crate::RegisterSpec,
239{
240 #[doc = "No Interrupt"]
241 #[inline(always)]
242 pub fn no(self) -> &'a mut crate::W<REG> {
243 self.variant(Curlimselect::No)
244 }
245 #[doc = "Interrupt is generated"]
246 #[inline(always)]
247 pub fn yes(self) -> &'a mut crate::W<REG> {
248 self.variant(Curlimselect::Yes)
249 }
250}
251#[doc = "Force Event for Auto CMD Error\n\nValue on reset: 0"]
252#[derive(Clone, Copy, Debug, PartialEq, Eq)]
253pub enum Acmdselect {
254 #[doc = "0: No Interrupt"]
255 No = 0,
256 #[doc = "1: Interrupt is generated"]
257 Yes = 1,
258}
259impl From<Acmdselect> for bool {
260 #[inline(always)]
261 fn from(variant: Acmdselect) -> Self {
262 variant as u8 != 0
263 }
264}
265#[doc = "Field `ACMD` writer - Force Event for Auto CMD Error"]
266pub type AcmdW<'a, REG> = crate::BitWriter<'a, REG, Acmdselect>;
267impl<'a, REG> AcmdW<'a, REG>
268where
269 REG: crate::Writable + crate::RegisterSpec,
270{
271 #[doc = "No Interrupt"]
272 #[inline(always)]
273 pub fn no(self) -> &'a mut crate::W<REG> {
274 self.variant(Acmdselect::No)
275 }
276 #[doc = "Interrupt is generated"]
277 #[inline(always)]
278 pub fn yes(self) -> &'a mut crate::W<REG> {
279 self.variant(Acmdselect::Yes)
280 }
281}
282#[doc = "Force Event for ADMA Error\n\nValue on reset: 0"]
283#[derive(Clone, Copy, Debug, PartialEq, Eq)]
284pub enum Admaselect {
285 #[doc = "0: No Interrupt"]
286 No = 0,
287 #[doc = "1: Interrupt is generated"]
288 Yes = 1,
289}
290impl From<Admaselect> for bool {
291 #[inline(always)]
292 fn from(variant: Admaselect) -> Self {
293 variant as u8 != 0
294 }
295}
296#[doc = "Field `ADMA` writer - Force Event for ADMA Error"]
297pub type AdmaW<'a, REG> = crate::BitWriter<'a, REG, Admaselect>;
298impl<'a, REG> AdmaW<'a, REG>
299where
300 REG: crate::Writable + crate::RegisterSpec,
301{
302 #[doc = "No Interrupt"]
303 #[inline(always)]
304 pub fn no(self) -> &'a mut crate::W<REG> {
305 self.variant(Admaselect::No)
306 }
307 #[doc = "Interrupt is generated"]
308 #[inline(always)]
309 pub fn yes(self) -> &'a mut crate::W<REG> {
310 self.variant(Admaselect::Yes)
311 }
312}
313#[doc = "Force Event for Boot Acknowledge Error\n\nValue on reset: 0"]
314#[derive(Clone, Copy, Debug, PartialEq, Eq)]
315pub enum Bootaeselect {
316 #[doc = "0: No Interrupt"]
317 No = 0,
318 #[doc = "1: Interrupt is generated"]
319 Yes = 1,
320}
321impl From<Bootaeselect> for bool {
322 #[inline(always)]
323 fn from(variant: Bootaeselect) -> Self {
324 variant as u8 != 0
325 }
326}
327#[doc = "Field `BOOTAE` writer - Force Event for Boot Acknowledge Error"]
328pub type BootaeW<'a, REG> = crate::BitWriter<'a, REG, Bootaeselect>;
329impl<'a, REG> BootaeW<'a, REG>
330where
331 REG: crate::Writable + crate::RegisterSpec,
332{
333 #[doc = "No Interrupt"]
334 #[inline(always)]
335 pub fn no(self) -> &'a mut crate::W<REG> {
336 self.variant(Bootaeselect::No)
337 }
338 #[doc = "Interrupt is generated"]
339 #[inline(always)]
340 pub fn yes(self) -> &'a mut crate::W<REG> {
341 self.variant(Bootaeselect::Yes)
342 }
343}
344impl W {
345 #[doc = "Bit 0 - Force Event for Command Timeout Error"]
346 #[inline(always)]
347 #[must_use]
348 pub fn cmdteo(&mut self) -> CmdteoW<FereisSpec> {
349 CmdteoW::new(self, 0)
350 }
351 #[doc = "Bit 1 - Force Event for Command CRC Error"]
352 #[inline(always)]
353 #[must_use]
354 pub fn cmdcrc(&mut self) -> CmdcrcW<FereisSpec> {
355 CmdcrcW::new(self, 1)
356 }
357 #[doc = "Bit 2 - Force Event for Command End Bit Error"]
358 #[inline(always)]
359 #[must_use]
360 pub fn cmdend(&mut self) -> CmdendW<FereisSpec> {
361 CmdendW::new(self, 2)
362 }
363 #[doc = "Bit 3 - Force Event for Command Index Error"]
364 #[inline(always)]
365 #[must_use]
366 pub fn cmdidx(&mut self) -> CmdidxW<FereisSpec> {
367 CmdidxW::new(self, 3)
368 }
369 #[doc = "Bit 4 - Force Event for Data Timeout Error"]
370 #[inline(always)]
371 #[must_use]
372 pub fn datteo(&mut self) -> DatteoW<FereisSpec> {
373 DatteoW::new(self, 4)
374 }
375 #[doc = "Bit 5 - Force Event for Data CRC Error"]
376 #[inline(always)]
377 #[must_use]
378 pub fn datcrc(&mut self) -> DatcrcW<FereisSpec> {
379 DatcrcW::new(self, 5)
380 }
381 #[doc = "Bit 6 - Force Event for Data End Bit Error"]
382 #[inline(always)]
383 #[must_use]
384 pub fn datend(&mut self) -> DatendW<FereisSpec> {
385 DatendW::new(self, 6)
386 }
387 #[doc = "Bit 7 - Force Event for Current Limit Error"]
388 #[inline(always)]
389 #[must_use]
390 pub fn curlim(&mut self) -> CurlimW<FereisSpec> {
391 CurlimW::new(self, 7)
392 }
393 #[doc = "Bit 8 - Force Event for Auto CMD Error"]
394 #[inline(always)]
395 #[must_use]
396 pub fn acmd(&mut self) -> AcmdW<FereisSpec> {
397 AcmdW::new(self, 8)
398 }
399 #[doc = "Bit 9 - Force Event for ADMA Error"]
400 #[inline(always)]
401 #[must_use]
402 pub fn adma(&mut self) -> AdmaW<FereisSpec> {
403 AdmaW::new(self, 9)
404 }
405 #[doc = "Bit 12 - Force Event for Boot Acknowledge Error"]
406 #[inline(always)]
407 #[must_use]
408 pub fn bootae(&mut self) -> BootaeW<FereisSpec> {
409 BootaeW::new(self, 12)
410 }
411}
412#[doc = "Force Event for Error Interrupt Status\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`fereis::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
413pub struct FereisSpec;
414impl crate::RegisterSpec for FereisSpec {
415 type Ux = u16;
416}
417#[doc = "`write(|w| ..)` method takes [`fereis::W`](W) writer structure"]
418impl crate::Writable for FereisSpec {
419 type Safety = crate::Unsafe;
420 const ZERO_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
421 const ONE_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
422}
423#[doc = "`reset()` method sets FEREIS to value 0"]
424impl crate::Resettable for FereisSpec {
425 const RESET_VALUE: u16 = 0;
426}