efm32gg12b830_pac/sdio/
fevterrstat.rs

1#[doc = "Register `FEVTERRSTAT` reader"]
2pub struct R(crate::R<FEVTERRSTAT_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<FEVTERRSTAT_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<FEVTERRSTAT_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<FEVTERRSTAT_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `FEVTERRSTAT` writer"]
17pub struct W(crate::W<FEVTERRSTAT_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<FEVTERRSTAT_SPEC>;
20    #[inline(always)]
21    fn deref(&self) -> &Self::Target {
22        &self.0
23    }
24}
25impl core::ops::DerefMut for W {
26    #[inline(always)]
27    fn deref_mut(&mut self) -> &mut Self::Target {
28        &mut self.0
29    }
30}
31impl From<crate::W<FEVTERRSTAT_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<FEVTERRSTAT_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `AC12NEX` reader - Force Event for Command Not Issued By Auto CM12 Not Executed"]
38pub type AC12NEX_R = crate::BitReader<bool>;
39#[doc = "Field `AC12NEX` writer - Force Event for Command Not Issued By Auto CM12 Not Executed"]
40pub type AC12NEX_W<'a> = crate::BitWriter<'a, u32, FEVTERRSTAT_SPEC, bool, 0>;
41#[doc = "Field `AC12TOE` reader - Force Event for Auto CMD Timeout Error"]
42pub type AC12TOE_R = crate::BitReader<bool>;
43#[doc = "Field `AC12TOE` writer - Force Event for Auto CMD Timeout Error"]
44pub type AC12TOE_W<'a> = crate::BitWriter<'a, u32, FEVTERRSTAT_SPEC, bool, 1>;
45#[doc = "Field `AC12CRCE` reader - Force Event for Auto CMD CRC Error"]
46pub type AC12CRCE_R = crate::BitReader<bool>;
47#[doc = "Field `AC12CRCE` writer - Force Event for Auto CMD CRC Error"]
48pub type AC12CRCE_W<'a> = crate::BitWriter<'a, u32, FEVTERRSTAT_SPEC, bool, 2>;
49#[doc = "Field `AC12EBE` reader - Force Event for Auto CMD End Bit Error"]
50pub type AC12EBE_R = crate::BitReader<bool>;
51#[doc = "Field `AC12EBE` writer - Force Event for Auto CMD End Bit Error"]
52pub type AC12EBE_W<'a> = crate::BitWriter<'a, u32, FEVTERRSTAT_SPEC, bool, 3>;
53#[doc = "Field `AC12INDXE` reader - Force Event for Auto CMD Index Error"]
54pub type AC12INDXE_R = crate::BitReader<bool>;
55#[doc = "Field `AC12INDXE` writer - Force Event for Auto CMD Index Error"]
56pub type AC12INDXE_W<'a> = crate::BitWriter<'a, u32, FEVTERRSTAT_SPEC, bool, 4>;
57#[doc = "Field `CNIBAC12E` reader - Force Event for Command Not Issued By Auto CMD12 Error"]
58pub type CNIBAC12E_R = crate::BitReader<bool>;
59#[doc = "Field `CNIBAC12E` writer - Force Event for Command Not Issued By Auto CMD12 Error"]
60pub type CNIBAC12E_W<'a> = crate::BitWriter<'a, u32, FEVTERRSTAT_SPEC, bool, 7>;
61#[doc = "Field `CMDTOE` reader - Force Event for Command Timeout Error"]
62pub type CMDTOE_R = crate::BitReader<bool>;
63#[doc = "Field `CMDTOE` writer - Force Event for Command Timeout Error"]
64pub type CMDTOE_W<'a> = crate::BitWriter<'a, u32, FEVTERRSTAT_SPEC, bool, 16>;
65#[doc = "Field `CMDCRCE` reader - Force Event for Command CRC Error"]
66pub type CMDCRCE_R = crate::BitReader<bool>;
67#[doc = "Field `CMDCRCE` writer - Force Event for Command CRC Error"]
68pub type CMDCRCE_W<'a> = crate::BitWriter<'a, u32, FEVTERRSTAT_SPEC, bool, 17>;
69#[doc = "Field `CMDEBE` reader - Force Event for Command End Bit Error"]
70pub type CMDEBE_R = crate::BitReader<bool>;
71#[doc = "Field `CMDEBE` writer - Force Event for Command End Bit Error"]
72pub type CMDEBE_W<'a> = crate::BitWriter<'a, u32, FEVTERRSTAT_SPEC, bool, 18>;
73#[doc = "Field `CMDINDXE` reader - Force Event for Command Index Error"]
74pub type CMDINDXE_R = crate::BitReader<bool>;
75#[doc = "Field `CMDINDXE` writer - Force Event for Command Index Error"]
76pub type CMDINDXE_W<'a> = crate::BitWriter<'a, u32, FEVTERRSTAT_SPEC, bool, 19>;
77#[doc = "Field `DATTOE` reader - Force Event for Data Timeout Error"]
78pub type DATTOE_R = crate::BitReader<bool>;
79#[doc = "Field `DATTOE` writer - Force Event for Data Timeout Error"]
80pub type DATTOE_W<'a> = crate::BitWriter<'a, u32, FEVTERRSTAT_SPEC, bool, 20>;
81#[doc = "Field `DATCRCE` reader - Force Event for Data CRC Error"]
82pub type DATCRCE_R = crate::BitReader<bool>;
83#[doc = "Field `DATCRCE` writer - Force Event for Data CRC Error"]
84pub type DATCRCE_W<'a> = crate::BitWriter<'a, u32, FEVTERRSTAT_SPEC, bool, 21>;
85#[doc = "Field `DATEBE` reader - Force Event for Data End Bit Error"]
86pub type DATEBE_R = crate::BitReader<bool>;
87#[doc = "Field `DATEBE` writer - Force Event for Data End Bit Error"]
88pub type DATEBE_W<'a> = crate::BitWriter<'a, u32, FEVTERRSTAT_SPEC, bool, 22>;
89#[doc = "Field `CURLIMITE` reader - Force Event for Current Limit Error"]
90pub type CURLIMITE_R = crate::BitReader<bool>;
91#[doc = "Field `CURLIMITE` writer - Force Event for Current Limit Error"]
92pub type CURLIMITE_W<'a> = crate::BitWriter<'a, u32, FEVTERRSTAT_SPEC, bool, 23>;
93#[doc = "Field `AC12E` reader - Force Event for Auto CMD Error"]
94pub type AC12E_R = crate::BitReader<bool>;
95#[doc = "Field `AC12E` writer - Force Event for Auto CMD Error"]
96pub type AC12E_W<'a> = crate::BitWriter<'a, u32, FEVTERRSTAT_SPEC, bool, 24>;
97#[doc = "Field `ADMAE` reader - Force Event for ADMA Error"]
98pub type ADMAE_R = crate::BitReader<bool>;
99#[doc = "Field `ADMAE` writer - Force Event for ADMA Error"]
100pub type ADMAE_W<'a> = crate::BitWriter<'a, u32, FEVTERRSTAT_SPEC, bool, 25>;
101#[doc = "Field `TUNINGE` reader - Force Event for Tuning Errro"]
102pub type TUNINGE_R = crate::BitReader<bool>;
103#[doc = "Field `VENSPECE` reader - Force Event for Vendox Specific Error Status"]
104pub type VENSPECE_R = crate::FieldReader<u8, u8>;
105impl R {
106    #[doc = "Bit 0 - Force Event for Command Not Issued By Auto CM12 Not Executed"]
107    #[inline(always)]
108    pub fn ac12nex(&self) -> AC12NEX_R {
109        AC12NEX_R::new((self.bits & 1) != 0)
110    }
111    #[doc = "Bit 1 - Force Event for Auto CMD Timeout Error"]
112    #[inline(always)]
113    pub fn ac12toe(&self) -> AC12TOE_R {
114        AC12TOE_R::new(((self.bits >> 1) & 1) != 0)
115    }
116    #[doc = "Bit 2 - Force Event for Auto CMD CRC Error"]
117    #[inline(always)]
118    pub fn ac12crce(&self) -> AC12CRCE_R {
119        AC12CRCE_R::new(((self.bits >> 2) & 1) != 0)
120    }
121    #[doc = "Bit 3 - Force Event for Auto CMD End Bit Error"]
122    #[inline(always)]
123    pub fn ac12ebe(&self) -> AC12EBE_R {
124        AC12EBE_R::new(((self.bits >> 3) & 1) != 0)
125    }
126    #[doc = "Bit 4 - Force Event for Auto CMD Index Error"]
127    #[inline(always)]
128    pub fn ac12indxe(&self) -> AC12INDXE_R {
129        AC12INDXE_R::new(((self.bits >> 4) & 1) != 0)
130    }
131    #[doc = "Bit 7 - Force Event for Command Not Issued By Auto CMD12 Error"]
132    #[inline(always)]
133    pub fn cnibac12e(&self) -> CNIBAC12E_R {
134        CNIBAC12E_R::new(((self.bits >> 7) & 1) != 0)
135    }
136    #[doc = "Bit 16 - Force Event for Command Timeout Error"]
137    #[inline(always)]
138    pub fn cmdtoe(&self) -> CMDTOE_R {
139        CMDTOE_R::new(((self.bits >> 16) & 1) != 0)
140    }
141    #[doc = "Bit 17 - Force Event for Command CRC Error"]
142    #[inline(always)]
143    pub fn cmdcrce(&self) -> CMDCRCE_R {
144        CMDCRCE_R::new(((self.bits >> 17) & 1) != 0)
145    }
146    #[doc = "Bit 18 - Force Event for Command End Bit Error"]
147    #[inline(always)]
148    pub fn cmdebe(&self) -> CMDEBE_R {
149        CMDEBE_R::new(((self.bits >> 18) & 1) != 0)
150    }
151    #[doc = "Bit 19 - Force Event for Command Index Error"]
152    #[inline(always)]
153    pub fn cmdindxe(&self) -> CMDINDXE_R {
154        CMDINDXE_R::new(((self.bits >> 19) & 1) != 0)
155    }
156    #[doc = "Bit 20 - Force Event for Data Timeout Error"]
157    #[inline(always)]
158    pub fn dattoe(&self) -> DATTOE_R {
159        DATTOE_R::new(((self.bits >> 20) & 1) != 0)
160    }
161    #[doc = "Bit 21 - Force Event for Data CRC Error"]
162    #[inline(always)]
163    pub fn datcrce(&self) -> DATCRCE_R {
164        DATCRCE_R::new(((self.bits >> 21) & 1) != 0)
165    }
166    #[doc = "Bit 22 - Force Event for Data End Bit Error"]
167    #[inline(always)]
168    pub fn datebe(&self) -> DATEBE_R {
169        DATEBE_R::new(((self.bits >> 22) & 1) != 0)
170    }
171    #[doc = "Bit 23 - Force Event for Current Limit Error"]
172    #[inline(always)]
173    pub fn curlimite(&self) -> CURLIMITE_R {
174        CURLIMITE_R::new(((self.bits >> 23) & 1) != 0)
175    }
176    #[doc = "Bit 24 - Force Event for Auto CMD Error"]
177    #[inline(always)]
178    pub fn ac12e(&self) -> AC12E_R {
179        AC12E_R::new(((self.bits >> 24) & 1) != 0)
180    }
181    #[doc = "Bit 25 - Force Event for ADMA Error"]
182    #[inline(always)]
183    pub fn admae(&self) -> ADMAE_R {
184        ADMAE_R::new(((self.bits >> 25) & 1) != 0)
185    }
186    #[doc = "Bit 26 - Force Event for Tuning Errro"]
187    #[inline(always)]
188    pub fn tuninge(&self) -> TUNINGE_R {
189        TUNINGE_R::new(((self.bits >> 26) & 1) != 0)
190    }
191    #[doc = "Bits 28:31 - Force Event for Vendox Specific Error Status"]
192    #[inline(always)]
193    pub fn venspece(&self) -> VENSPECE_R {
194        VENSPECE_R::new(((self.bits >> 28) & 0x0f) as u8)
195    }
196}
197impl W {
198    #[doc = "Bit 0 - Force Event for Command Not Issued By Auto CM12 Not Executed"]
199    #[inline(always)]
200    pub fn ac12nex(&mut self) -> AC12NEX_W {
201        AC12NEX_W::new(self)
202    }
203    #[doc = "Bit 1 - Force Event for Auto CMD Timeout Error"]
204    #[inline(always)]
205    pub fn ac12toe(&mut self) -> AC12TOE_W {
206        AC12TOE_W::new(self)
207    }
208    #[doc = "Bit 2 - Force Event for Auto CMD CRC Error"]
209    #[inline(always)]
210    pub fn ac12crce(&mut self) -> AC12CRCE_W {
211        AC12CRCE_W::new(self)
212    }
213    #[doc = "Bit 3 - Force Event for Auto CMD End Bit Error"]
214    #[inline(always)]
215    pub fn ac12ebe(&mut self) -> AC12EBE_W {
216        AC12EBE_W::new(self)
217    }
218    #[doc = "Bit 4 - Force Event for Auto CMD Index Error"]
219    #[inline(always)]
220    pub fn ac12indxe(&mut self) -> AC12INDXE_W {
221        AC12INDXE_W::new(self)
222    }
223    #[doc = "Bit 7 - Force Event for Command Not Issued By Auto CMD12 Error"]
224    #[inline(always)]
225    pub fn cnibac12e(&mut self) -> CNIBAC12E_W {
226        CNIBAC12E_W::new(self)
227    }
228    #[doc = "Bit 16 - Force Event for Command Timeout Error"]
229    #[inline(always)]
230    pub fn cmdtoe(&mut self) -> CMDTOE_W {
231        CMDTOE_W::new(self)
232    }
233    #[doc = "Bit 17 - Force Event for Command CRC Error"]
234    #[inline(always)]
235    pub fn cmdcrce(&mut self) -> CMDCRCE_W {
236        CMDCRCE_W::new(self)
237    }
238    #[doc = "Bit 18 - Force Event for Command End Bit Error"]
239    #[inline(always)]
240    pub fn cmdebe(&mut self) -> CMDEBE_W {
241        CMDEBE_W::new(self)
242    }
243    #[doc = "Bit 19 - Force Event for Command Index Error"]
244    #[inline(always)]
245    pub fn cmdindxe(&mut self) -> CMDINDXE_W {
246        CMDINDXE_W::new(self)
247    }
248    #[doc = "Bit 20 - Force Event for Data Timeout Error"]
249    #[inline(always)]
250    pub fn dattoe(&mut self) -> DATTOE_W {
251        DATTOE_W::new(self)
252    }
253    #[doc = "Bit 21 - Force Event for Data CRC Error"]
254    #[inline(always)]
255    pub fn datcrce(&mut self) -> DATCRCE_W {
256        DATCRCE_W::new(self)
257    }
258    #[doc = "Bit 22 - Force Event for Data End Bit Error"]
259    #[inline(always)]
260    pub fn datebe(&mut self) -> DATEBE_W {
261        DATEBE_W::new(self)
262    }
263    #[doc = "Bit 23 - Force Event for Current Limit Error"]
264    #[inline(always)]
265    pub fn curlimite(&mut self) -> CURLIMITE_W {
266        CURLIMITE_W::new(self)
267    }
268    #[doc = "Bit 24 - Force Event for Auto CMD Error"]
269    #[inline(always)]
270    pub fn ac12e(&mut self) -> AC12E_W {
271        AC12E_W::new(self)
272    }
273    #[doc = "Bit 25 - Force Event for ADMA Error"]
274    #[inline(always)]
275    pub fn admae(&mut self) -> ADMAE_W {
276        ADMAE_W::new(self)
277    }
278    #[doc = "Writes raw bits to the register."]
279    #[inline(always)]
280    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
281        self.0.bits(bits);
282        self
283    }
284}
285#[doc = "Force Event Register for Auto CMD Error Status\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fevterrstat](index.html) module"]
286pub struct FEVTERRSTAT_SPEC;
287impl crate::RegisterSpec for FEVTERRSTAT_SPEC {
288    type Ux = u32;
289}
290#[doc = "`read()` method returns [fevterrstat::R](R) reader structure"]
291impl crate::Readable for FEVTERRSTAT_SPEC {
292    type Reader = R;
293}
294#[doc = "`write(|w| ..)` method takes [fevterrstat::W](W) writer structure"]
295impl crate::Writable for FEVTERRSTAT_SPEC {
296    type Writer = W;
297}
298#[doc = "`reset()` method sets FEVTERRSTAT to value 0"]
299impl crate::Resettable for FEVTERRSTAT_SPEC {
300    #[inline(always)]
301    fn reset_value() -> Self::Ux {
302        0
303    }
304}