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