1#[doc = "Register `IF` reader"]
2pub struct R(crate::R<IF_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<IF_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<IF_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<IF_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `IF` writer"]
17pub struct W(crate::W<IF_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<IF_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<IF_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<IF_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `CMDDONE` reader - CMDDONE field"]
38pub type CMDDONE_R = crate::BitReader<bool>;
39#[doc = "Field `CMDDONE` writer - CMDDONE field"]
40pub type CMDDONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
41#[doc = "Field `TRXDONE` reader - TRXDONE field"]
42pub type TRXDONE_R = crate::BitReader<bool>;
43#[doc = "Field `TRXDONE` writer - TRXDONE field"]
44pub type TRXDONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
45#[doc = "Field `BLKGAP` reader - BLKGAP field"]
46pub type BLKGAP_R = crate::BitReader<bool>;
47#[doc = "Field `BLKGAP` writer - BLKGAP field"]
48pub type BLKGAP_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
49#[doc = "Field `DMADONE` reader - DMADONE field"]
50pub type DMADONE_R = crate::BitReader<bool>;
51#[doc = "Field `DMADONE` writer - DMADONE field"]
52pub type DMADONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
53#[doc = "Field `BUFWRRDY` reader - BUFWRRDY field"]
54pub type BUFWRRDY_R = crate::BitReader<bool>;
55#[doc = "Field `BUFWRRDY` writer - BUFWRRDY field"]
56pub type BUFWRRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
57#[doc = "Field `BUFRDRDY` reader - BUFRDRDY field"]
58pub type BUFRDRDY_R = crate::BitReader<bool>;
59#[doc = "Field `BUFRDRDY` writer - BUFRDRDY field"]
60pub type BUFRDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
61#[doc = "Field `CARDINSR` reader - CARDINSR field"]
62pub type CARDINSR_R = crate::BitReader<bool>;
63#[doc = "Field `CARDINSR` writer - CARDINSR field"]
64pub type CARDINSR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
65#[doc = "Field `CARDRMOV` reader - CARDRMOV field"]
66pub type CARDRMOV_R = crate::BitReader<bool>;
67#[doc = "Field `CARDRMOV` writer - CARDRMOV field"]
68pub type CARDRMOV_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
69#[doc = "Field `CARD` reader - CARD field"]
70pub type CARD_R = crate::BitReader<bool>;
71#[doc = "Field `CARD` writer - CARD field"]
72pub type CARD_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
73#[doc = "Field `ERROR` reader - ERROR field"]
74pub type ERROR_R = crate::BitReader<bool>;
75#[doc = "Field `ERROR` writer - ERROR field"]
76pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
77#[doc = "Field `CMDTIMEOUT` reader - CMDTIMEOUT field"]
78pub type CMDTIMEOUT_R = crate::BitReader<bool>;
79#[doc = "Field `CMDTIMEOUT` writer - CMDTIMEOUT field"]
80pub type CMDTIMEOUT_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
81#[doc = "Field `CMDCRCERR` reader - CMDCRCERR field"]
82pub type CMDCRCERR_R = crate::BitReader<bool>;
83#[doc = "Field `CMDCRCERR` writer - CMDCRCERR field"]
84pub type CMDCRCERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
85#[doc = "Field `CMDENDERR` reader - CMDENDERR field"]
86pub type CMDENDERR_R = crate::BitReader<bool>;
87#[doc = "Field `CMDENDERR` writer - CMDENDERR field"]
88pub type CMDENDERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
89#[doc = "Field `CMDIDXERR` reader - CMDIDXERR field"]
90pub type CMDIDXERR_R = crate::BitReader<bool>;
91#[doc = "Field `CMDIDXERR` writer - CMDIDXERR field"]
92pub type CMDIDXERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
93#[doc = "Field `DATTIMEOUT` reader - DATTIMEOUT field"]
94pub type DATTIMEOUT_R = crate::BitReader<bool>;
95#[doc = "Field `DATTIMEOUT` writer - DATTIMEOUT field"]
96pub type DATTIMEOUT_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
97#[doc = "Field `DATCRCERR` reader - DATCRCERR field"]
98pub type DATCRCERR_R = crate::BitReader<bool>;
99#[doc = "Field `DATCRCERR` writer - DATCRCERR field"]
100pub type DATCRCERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
101#[doc = "Field `DATENDERR` reader - DATENDERR field"]
102pub type DATENDERR_R = crate::BitReader<bool>;
103#[doc = "Field `DATENDERR` writer - DATENDERR field"]
104pub type DATENDERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
105#[doc = "Field `CURLIMERR` reader - CURLIMERR field"]
106pub type CURLIMERR_R = crate::BitReader<bool>;
107#[doc = "Field `CURLIMERR` writer - CURLIMERR field"]
108pub type CURLIMERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
109#[doc = "Field `CMD12ERR` reader - CMD12ERR field"]
110pub type CMD12ERR_R = crate::BitReader<bool>;
111#[doc = "Field `CMD12ERR` writer - CMD12ERR field"]
112pub type CMD12ERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
113#[doc = "Field `DMAERR` reader - DMAERR field"]
114pub type DMAERR_R = crate::BitReader<bool>;
115#[doc = "Field `DMAERR` writer - DMAERR field"]
116pub type DMAERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
117#[doc = "Field `RESPERR` reader - RESPERR field"]
118pub type RESPERR_R = crate::BitReader<bool>;
119#[doc = "Field `RESPERR` writer - RESPERR field"]
120pub type RESPERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IF_SPEC, bool, O>;
121impl R {
122 #[doc = "Bit 0 - CMDDONE field"]
123 #[inline(always)]
124 pub fn cmddone(&self) -> CMDDONE_R {
125 CMDDONE_R::new((self.bits & 1) != 0)
126 }
127 #[doc = "Bit 1 - TRXDONE field"]
128 #[inline(always)]
129 pub fn trxdone(&self) -> TRXDONE_R {
130 TRXDONE_R::new(((self.bits >> 1) & 1) != 0)
131 }
132 #[doc = "Bit 2 - BLKGAP field"]
133 #[inline(always)]
134 pub fn blkgap(&self) -> BLKGAP_R {
135 BLKGAP_R::new(((self.bits >> 2) & 1) != 0)
136 }
137 #[doc = "Bit 3 - DMADONE field"]
138 #[inline(always)]
139 pub fn dmadone(&self) -> DMADONE_R {
140 DMADONE_R::new(((self.bits >> 3) & 1) != 0)
141 }
142 #[doc = "Bit 4 - BUFWRRDY field"]
143 #[inline(always)]
144 pub fn bufwrrdy(&self) -> BUFWRRDY_R {
145 BUFWRRDY_R::new(((self.bits >> 4) & 1) != 0)
146 }
147 #[doc = "Bit 5 - BUFRDRDY field"]
148 #[inline(always)]
149 pub fn bufrdrdy(&self) -> BUFRDRDY_R {
150 BUFRDRDY_R::new(((self.bits >> 5) & 1) != 0)
151 }
152 #[doc = "Bit 6 - CARDINSR field"]
153 #[inline(always)]
154 pub fn cardinsr(&self) -> CARDINSR_R {
155 CARDINSR_R::new(((self.bits >> 6) & 1) != 0)
156 }
157 #[doc = "Bit 7 - CARDRMOV field"]
158 #[inline(always)]
159 pub fn cardrmov(&self) -> CARDRMOV_R {
160 CARDRMOV_R::new(((self.bits >> 7) & 1) != 0)
161 }
162 #[doc = "Bit 8 - CARD field"]
163 #[inline(always)]
164 pub fn card(&self) -> CARD_R {
165 CARD_R::new(((self.bits >> 8) & 1) != 0)
166 }
167 #[doc = "Bit 15 - ERROR field"]
168 #[inline(always)]
169 pub fn error(&self) -> ERROR_R {
170 ERROR_R::new(((self.bits >> 15) & 1) != 0)
171 }
172 #[doc = "Bit 16 - CMDTIMEOUT field"]
173 #[inline(always)]
174 pub fn cmdtimeout(&self) -> CMDTIMEOUT_R {
175 CMDTIMEOUT_R::new(((self.bits >> 16) & 1) != 0)
176 }
177 #[doc = "Bit 17 - CMDCRCERR field"]
178 #[inline(always)]
179 pub fn cmdcrcerr(&self) -> CMDCRCERR_R {
180 CMDCRCERR_R::new(((self.bits >> 17) & 1) != 0)
181 }
182 #[doc = "Bit 18 - CMDENDERR field"]
183 #[inline(always)]
184 pub fn cmdenderr(&self) -> CMDENDERR_R {
185 CMDENDERR_R::new(((self.bits >> 18) & 1) != 0)
186 }
187 #[doc = "Bit 19 - CMDIDXERR field"]
188 #[inline(always)]
189 pub fn cmdidxerr(&self) -> CMDIDXERR_R {
190 CMDIDXERR_R::new(((self.bits >> 19) & 1) != 0)
191 }
192 #[doc = "Bit 20 - DATTIMEOUT field"]
193 #[inline(always)]
194 pub fn dattimeout(&self) -> DATTIMEOUT_R {
195 DATTIMEOUT_R::new(((self.bits >> 20) & 1) != 0)
196 }
197 #[doc = "Bit 21 - DATCRCERR field"]
198 #[inline(always)]
199 pub fn datcrcerr(&self) -> DATCRCERR_R {
200 DATCRCERR_R::new(((self.bits >> 21) & 1) != 0)
201 }
202 #[doc = "Bit 22 - DATENDERR field"]
203 #[inline(always)]
204 pub fn datenderr(&self) -> DATENDERR_R {
205 DATENDERR_R::new(((self.bits >> 22) & 1) != 0)
206 }
207 #[doc = "Bit 23 - CURLIMERR field"]
208 #[inline(always)]
209 pub fn curlimerr(&self) -> CURLIMERR_R {
210 CURLIMERR_R::new(((self.bits >> 23) & 1) != 0)
211 }
212 #[doc = "Bit 24 - CMD12ERR field"]
213 #[inline(always)]
214 pub fn cmd12err(&self) -> CMD12ERR_R {
215 CMD12ERR_R::new(((self.bits >> 24) & 1) != 0)
216 }
217 #[doc = "Bit 25 - DMAERR field"]
218 #[inline(always)]
219 pub fn dmaerr(&self) -> DMAERR_R {
220 DMAERR_R::new(((self.bits >> 25) & 1) != 0)
221 }
222 #[doc = "Bit 28 - RESPERR field"]
223 #[inline(always)]
224 pub fn resperr(&self) -> RESPERR_R {
225 RESPERR_R::new(((self.bits >> 28) & 1) != 0)
226 }
227}
228impl W {
229 #[doc = "Bit 0 - CMDDONE field"]
230 #[inline(always)]
231 pub fn cmddone(&mut self) -> CMDDONE_W<0> {
232 CMDDONE_W::new(self)
233 }
234 #[doc = "Bit 1 - TRXDONE field"]
235 #[inline(always)]
236 pub fn trxdone(&mut self) -> TRXDONE_W<1> {
237 TRXDONE_W::new(self)
238 }
239 #[doc = "Bit 2 - BLKGAP field"]
240 #[inline(always)]
241 pub fn blkgap(&mut self) -> BLKGAP_W<2> {
242 BLKGAP_W::new(self)
243 }
244 #[doc = "Bit 3 - DMADONE field"]
245 #[inline(always)]
246 pub fn dmadone(&mut self) -> DMADONE_W<3> {
247 DMADONE_W::new(self)
248 }
249 #[doc = "Bit 4 - BUFWRRDY field"]
250 #[inline(always)]
251 pub fn bufwrrdy(&mut self) -> BUFWRRDY_W<4> {
252 BUFWRRDY_W::new(self)
253 }
254 #[doc = "Bit 5 - BUFRDRDY field"]
255 #[inline(always)]
256 pub fn bufrdrdy(&mut self) -> BUFRDRDY_W<5> {
257 BUFRDRDY_W::new(self)
258 }
259 #[doc = "Bit 6 - CARDINSR field"]
260 #[inline(always)]
261 pub fn cardinsr(&mut self) -> CARDINSR_W<6> {
262 CARDINSR_W::new(self)
263 }
264 #[doc = "Bit 7 - CARDRMOV field"]
265 #[inline(always)]
266 pub fn cardrmov(&mut self) -> CARDRMOV_W<7> {
267 CARDRMOV_W::new(self)
268 }
269 #[doc = "Bit 8 - CARD field"]
270 #[inline(always)]
271 pub fn card(&mut self) -> CARD_W<8> {
272 CARD_W::new(self)
273 }
274 #[doc = "Bit 15 - ERROR field"]
275 #[inline(always)]
276 pub fn error(&mut self) -> ERROR_W<15> {
277 ERROR_W::new(self)
278 }
279 #[doc = "Bit 16 - CMDTIMEOUT field"]
280 #[inline(always)]
281 pub fn cmdtimeout(&mut self) -> CMDTIMEOUT_W<16> {
282 CMDTIMEOUT_W::new(self)
283 }
284 #[doc = "Bit 17 - CMDCRCERR field"]
285 #[inline(always)]
286 pub fn cmdcrcerr(&mut self) -> CMDCRCERR_W<17> {
287 CMDCRCERR_W::new(self)
288 }
289 #[doc = "Bit 18 - CMDENDERR field"]
290 #[inline(always)]
291 pub fn cmdenderr(&mut self) -> CMDENDERR_W<18> {
292 CMDENDERR_W::new(self)
293 }
294 #[doc = "Bit 19 - CMDIDXERR field"]
295 #[inline(always)]
296 pub fn cmdidxerr(&mut self) -> CMDIDXERR_W<19> {
297 CMDIDXERR_W::new(self)
298 }
299 #[doc = "Bit 20 - DATTIMEOUT field"]
300 #[inline(always)]
301 pub fn dattimeout(&mut self) -> DATTIMEOUT_W<20> {
302 DATTIMEOUT_W::new(self)
303 }
304 #[doc = "Bit 21 - DATCRCERR field"]
305 #[inline(always)]
306 pub fn datcrcerr(&mut self) -> DATCRCERR_W<21> {
307 DATCRCERR_W::new(self)
308 }
309 #[doc = "Bit 22 - DATENDERR field"]
310 #[inline(always)]
311 pub fn datenderr(&mut self) -> DATENDERR_W<22> {
312 DATENDERR_W::new(self)
313 }
314 #[doc = "Bit 23 - CURLIMERR field"]
315 #[inline(always)]
316 pub fn curlimerr(&mut self) -> CURLIMERR_W<23> {
317 CURLIMERR_W::new(self)
318 }
319 #[doc = "Bit 24 - CMD12ERR field"]
320 #[inline(always)]
321 pub fn cmd12err(&mut self) -> CMD12ERR_W<24> {
322 CMD12ERR_W::new(self)
323 }
324 #[doc = "Bit 25 - DMAERR field"]
325 #[inline(always)]
326 pub fn dmaerr(&mut self) -> DMAERR_W<25> {
327 DMAERR_W::new(self)
328 }
329 #[doc = "Bit 28 - RESPERR field"]
330 #[inline(always)]
331 pub fn resperr(&mut self) -> RESPERR_W<28> {
332 RESPERR_W::new(self)
333 }
334 #[doc = "Writes raw bits to the register."]
335 #[inline(always)]
336 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
337 self.0.bits(bits);
338 self
339 }
340}
341#[doc = "IF register\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 [if_](index.html) module"]
342pub struct IF_SPEC;
343impl crate::RegisterSpec for IF_SPEC {
344 type Ux = u32;
345}
346#[doc = "`read()` method returns [if_::R](R) reader structure"]
347impl crate::Readable for IF_SPEC {
348 type Reader = R;
349}
350#[doc = "`write(|w| ..)` method takes [if_::W](W) writer structure"]
351impl crate::Writable for IF_SPEC {
352 type Writer = W;
353}
354#[doc = "`reset()` method sets IF to value 0"]
355impl crate::Resettable for IF_SPEC {
356 #[inline(always)]
357 fn reset_value() -> Self::Ux {
358 0
359 }
360}