stm32l4x2_pac/sdmmc/
sta.rs1#[doc = r" Value read from the register"]
2pub struct R {
3 bits: u32,
4}
5impl super::STA {
6 #[doc = r" Reads the contents of the register"]
7 #[inline]
8 pub fn read(&self) -> R {
9 R {
10 bits: self.register.get(),
11 }
12 }
13}
14#[doc = r" Value of the field"]
15pub struct CEATAENDR {
16 bits: bool,
17}
18impl CEATAENDR {
19 #[doc = r" Value of the field as raw bits"]
20 #[inline]
21 pub fn bit(&self) -> bool {
22 self.bits
23 }
24 #[doc = r" Returns `true` if the bit is clear (0)"]
25 #[inline]
26 pub fn bit_is_clear(&self) -> bool {
27 !self.bit()
28 }
29 #[doc = r" Returns `true` if the bit is set (1)"]
30 #[inline]
31 pub fn bit_is_set(&self) -> bool {
32 self.bit()
33 }
34}
35#[doc = r" Value of the field"]
36pub struct SDIOITR {
37 bits: bool,
38}
39impl SDIOITR {
40 #[doc = r" Value of the field as raw bits"]
41 #[inline]
42 pub fn bit(&self) -> bool {
43 self.bits
44 }
45 #[doc = r" Returns `true` if the bit is clear (0)"]
46 #[inline]
47 pub fn bit_is_clear(&self) -> bool {
48 !self.bit()
49 }
50 #[doc = r" Returns `true` if the bit is set (1)"]
51 #[inline]
52 pub fn bit_is_set(&self) -> bool {
53 self.bit()
54 }
55}
56#[doc = r" Value of the field"]
57pub struct RXDAVLR {
58 bits: bool,
59}
60impl RXDAVLR {
61 #[doc = r" Value of the field as raw bits"]
62 #[inline]
63 pub fn bit(&self) -> bool {
64 self.bits
65 }
66 #[doc = r" Returns `true` if the bit is clear (0)"]
67 #[inline]
68 pub fn bit_is_clear(&self) -> bool {
69 !self.bit()
70 }
71 #[doc = r" Returns `true` if the bit is set (1)"]
72 #[inline]
73 pub fn bit_is_set(&self) -> bool {
74 self.bit()
75 }
76}
77#[doc = r" Value of the field"]
78pub struct TXDAVLR {
79 bits: bool,
80}
81impl TXDAVLR {
82 #[doc = r" Value of the field as raw bits"]
83 #[inline]
84 pub fn bit(&self) -> bool {
85 self.bits
86 }
87 #[doc = r" Returns `true` if the bit is clear (0)"]
88 #[inline]
89 pub fn bit_is_clear(&self) -> bool {
90 !self.bit()
91 }
92 #[doc = r" Returns `true` if the bit is set (1)"]
93 #[inline]
94 pub fn bit_is_set(&self) -> bool {
95 self.bit()
96 }
97}
98#[doc = r" Value of the field"]
99pub struct RXFIFOER {
100 bits: bool,
101}
102impl RXFIFOER {
103 #[doc = r" Value of the field as raw bits"]
104 #[inline]
105 pub fn bit(&self) -> bool {
106 self.bits
107 }
108 #[doc = r" Returns `true` if the bit is clear (0)"]
109 #[inline]
110 pub fn bit_is_clear(&self) -> bool {
111 !self.bit()
112 }
113 #[doc = r" Returns `true` if the bit is set (1)"]
114 #[inline]
115 pub fn bit_is_set(&self) -> bool {
116 self.bit()
117 }
118}
119#[doc = r" Value of the field"]
120pub struct TXFIFOER {
121 bits: bool,
122}
123impl TXFIFOER {
124 #[doc = r" Value of the field as raw bits"]
125 #[inline]
126 pub fn bit(&self) -> bool {
127 self.bits
128 }
129 #[doc = r" Returns `true` if the bit is clear (0)"]
130 #[inline]
131 pub fn bit_is_clear(&self) -> bool {
132 !self.bit()
133 }
134 #[doc = r" Returns `true` if the bit is set (1)"]
135 #[inline]
136 pub fn bit_is_set(&self) -> bool {
137 self.bit()
138 }
139}
140#[doc = r" Value of the field"]
141pub struct RXFIFOFR {
142 bits: bool,
143}
144impl RXFIFOFR {
145 #[doc = r" Value of the field as raw bits"]
146 #[inline]
147 pub fn bit(&self) -> bool {
148 self.bits
149 }
150 #[doc = r" Returns `true` if the bit is clear (0)"]
151 #[inline]
152 pub fn bit_is_clear(&self) -> bool {
153 !self.bit()
154 }
155 #[doc = r" Returns `true` if the bit is set (1)"]
156 #[inline]
157 pub fn bit_is_set(&self) -> bool {
158 self.bit()
159 }
160}
161#[doc = r" Value of the field"]
162pub struct TXFIFOFR {
163 bits: bool,
164}
165impl TXFIFOFR {
166 #[doc = r" Value of the field as raw bits"]
167 #[inline]
168 pub fn bit(&self) -> bool {
169 self.bits
170 }
171 #[doc = r" Returns `true` if the bit is clear (0)"]
172 #[inline]
173 pub fn bit_is_clear(&self) -> bool {
174 !self.bit()
175 }
176 #[doc = r" Returns `true` if the bit is set (1)"]
177 #[inline]
178 pub fn bit_is_set(&self) -> bool {
179 self.bit()
180 }
181}
182#[doc = r" Value of the field"]
183pub struct RXFIFOHFR {
184 bits: bool,
185}
186impl RXFIFOHFR {
187 #[doc = r" Value of the field as raw bits"]
188 #[inline]
189 pub fn bit(&self) -> bool {
190 self.bits
191 }
192 #[doc = r" Returns `true` if the bit is clear (0)"]
193 #[inline]
194 pub fn bit_is_clear(&self) -> bool {
195 !self.bit()
196 }
197 #[doc = r" Returns `true` if the bit is set (1)"]
198 #[inline]
199 pub fn bit_is_set(&self) -> bool {
200 self.bit()
201 }
202}
203#[doc = r" Value of the field"]
204pub struct TXFIFOHER {
205 bits: bool,
206}
207impl TXFIFOHER {
208 #[doc = r" Value of the field as raw bits"]
209 #[inline]
210 pub fn bit(&self) -> bool {
211 self.bits
212 }
213 #[doc = r" Returns `true` if the bit is clear (0)"]
214 #[inline]
215 pub fn bit_is_clear(&self) -> bool {
216 !self.bit()
217 }
218 #[doc = r" Returns `true` if the bit is set (1)"]
219 #[inline]
220 pub fn bit_is_set(&self) -> bool {
221 self.bit()
222 }
223}
224#[doc = r" Value of the field"]
225pub struct RXACTR {
226 bits: bool,
227}
228impl RXACTR {
229 #[doc = r" Value of the field as raw bits"]
230 #[inline]
231 pub fn bit(&self) -> bool {
232 self.bits
233 }
234 #[doc = r" Returns `true` if the bit is clear (0)"]
235 #[inline]
236 pub fn bit_is_clear(&self) -> bool {
237 !self.bit()
238 }
239 #[doc = r" Returns `true` if the bit is set (1)"]
240 #[inline]
241 pub fn bit_is_set(&self) -> bool {
242 self.bit()
243 }
244}
245#[doc = r" Value of the field"]
246pub struct TXACTR {
247 bits: bool,
248}
249impl TXACTR {
250 #[doc = r" Value of the field as raw bits"]
251 #[inline]
252 pub fn bit(&self) -> bool {
253 self.bits
254 }
255 #[doc = r" Returns `true` if the bit is clear (0)"]
256 #[inline]
257 pub fn bit_is_clear(&self) -> bool {
258 !self.bit()
259 }
260 #[doc = r" Returns `true` if the bit is set (1)"]
261 #[inline]
262 pub fn bit_is_set(&self) -> bool {
263 self.bit()
264 }
265}
266#[doc = r" Value of the field"]
267pub struct CMDACTR {
268 bits: bool,
269}
270impl CMDACTR {
271 #[doc = r" Value of the field as raw bits"]
272 #[inline]
273 pub fn bit(&self) -> bool {
274 self.bits
275 }
276 #[doc = r" Returns `true` if the bit is clear (0)"]
277 #[inline]
278 pub fn bit_is_clear(&self) -> bool {
279 !self.bit()
280 }
281 #[doc = r" Returns `true` if the bit is set (1)"]
282 #[inline]
283 pub fn bit_is_set(&self) -> bool {
284 self.bit()
285 }
286}
287#[doc = r" Value of the field"]
288pub struct DBCKENDR {
289 bits: bool,
290}
291impl DBCKENDR {
292 #[doc = r" Value of the field as raw bits"]
293 #[inline]
294 pub fn bit(&self) -> bool {
295 self.bits
296 }
297 #[doc = r" Returns `true` if the bit is clear (0)"]
298 #[inline]
299 pub fn bit_is_clear(&self) -> bool {
300 !self.bit()
301 }
302 #[doc = r" Returns `true` if the bit is set (1)"]
303 #[inline]
304 pub fn bit_is_set(&self) -> bool {
305 self.bit()
306 }
307}
308#[doc = r" Value of the field"]
309pub struct STBITERRR {
310 bits: bool,
311}
312impl STBITERRR {
313 #[doc = r" Value of the field as raw bits"]
314 #[inline]
315 pub fn bit(&self) -> bool {
316 self.bits
317 }
318 #[doc = r" Returns `true` if the bit is clear (0)"]
319 #[inline]
320 pub fn bit_is_clear(&self) -> bool {
321 !self.bit()
322 }
323 #[doc = r" Returns `true` if the bit is set (1)"]
324 #[inline]
325 pub fn bit_is_set(&self) -> bool {
326 self.bit()
327 }
328}
329#[doc = r" Value of the field"]
330pub struct DATAENDR {
331 bits: bool,
332}
333impl DATAENDR {
334 #[doc = r" Value of the field as raw bits"]
335 #[inline]
336 pub fn bit(&self) -> bool {
337 self.bits
338 }
339 #[doc = r" Returns `true` if the bit is clear (0)"]
340 #[inline]
341 pub fn bit_is_clear(&self) -> bool {
342 !self.bit()
343 }
344 #[doc = r" Returns `true` if the bit is set (1)"]
345 #[inline]
346 pub fn bit_is_set(&self) -> bool {
347 self.bit()
348 }
349}
350#[doc = r" Value of the field"]
351pub struct CMDSENTR {
352 bits: bool,
353}
354impl CMDSENTR {
355 #[doc = r" Value of the field as raw bits"]
356 #[inline]
357 pub fn bit(&self) -> bool {
358 self.bits
359 }
360 #[doc = r" Returns `true` if the bit is clear (0)"]
361 #[inline]
362 pub fn bit_is_clear(&self) -> bool {
363 !self.bit()
364 }
365 #[doc = r" Returns `true` if the bit is set (1)"]
366 #[inline]
367 pub fn bit_is_set(&self) -> bool {
368 self.bit()
369 }
370}
371#[doc = r" Value of the field"]
372pub struct CMDRENDR {
373 bits: bool,
374}
375impl CMDRENDR {
376 #[doc = r" Value of the field as raw bits"]
377 #[inline]
378 pub fn bit(&self) -> bool {
379 self.bits
380 }
381 #[doc = r" Returns `true` if the bit is clear (0)"]
382 #[inline]
383 pub fn bit_is_clear(&self) -> bool {
384 !self.bit()
385 }
386 #[doc = r" Returns `true` if the bit is set (1)"]
387 #[inline]
388 pub fn bit_is_set(&self) -> bool {
389 self.bit()
390 }
391}
392#[doc = r" Value of the field"]
393pub struct RXOVERRR {
394 bits: bool,
395}
396impl RXOVERRR {
397 #[doc = r" Value of the field as raw bits"]
398 #[inline]
399 pub fn bit(&self) -> bool {
400 self.bits
401 }
402 #[doc = r" Returns `true` if the bit is clear (0)"]
403 #[inline]
404 pub fn bit_is_clear(&self) -> bool {
405 !self.bit()
406 }
407 #[doc = r" Returns `true` if the bit is set (1)"]
408 #[inline]
409 pub fn bit_is_set(&self) -> bool {
410 self.bit()
411 }
412}
413#[doc = r" Value of the field"]
414pub struct TXUNDERRR {
415 bits: bool,
416}
417impl TXUNDERRR {
418 #[doc = r" Value of the field as raw bits"]
419 #[inline]
420 pub fn bit(&self) -> bool {
421 self.bits
422 }
423 #[doc = r" Returns `true` if the bit is clear (0)"]
424 #[inline]
425 pub fn bit_is_clear(&self) -> bool {
426 !self.bit()
427 }
428 #[doc = r" Returns `true` if the bit is set (1)"]
429 #[inline]
430 pub fn bit_is_set(&self) -> bool {
431 self.bit()
432 }
433}
434#[doc = r" Value of the field"]
435pub struct DTIMEOUTR {
436 bits: bool,
437}
438impl DTIMEOUTR {
439 #[doc = r" Value of the field as raw bits"]
440 #[inline]
441 pub fn bit(&self) -> bool {
442 self.bits
443 }
444 #[doc = r" Returns `true` if the bit is clear (0)"]
445 #[inline]
446 pub fn bit_is_clear(&self) -> bool {
447 !self.bit()
448 }
449 #[doc = r" Returns `true` if the bit is set (1)"]
450 #[inline]
451 pub fn bit_is_set(&self) -> bool {
452 self.bit()
453 }
454}
455#[doc = r" Value of the field"]
456pub struct CTIMEOUTR {
457 bits: bool,
458}
459impl CTIMEOUTR {
460 #[doc = r" Value of the field as raw bits"]
461 #[inline]
462 pub fn bit(&self) -> bool {
463 self.bits
464 }
465 #[doc = r" Returns `true` if the bit is clear (0)"]
466 #[inline]
467 pub fn bit_is_clear(&self) -> bool {
468 !self.bit()
469 }
470 #[doc = r" Returns `true` if the bit is set (1)"]
471 #[inline]
472 pub fn bit_is_set(&self) -> bool {
473 self.bit()
474 }
475}
476#[doc = r" Value of the field"]
477pub struct DCRCFAILR {
478 bits: bool,
479}
480impl DCRCFAILR {
481 #[doc = r" Value of the field as raw bits"]
482 #[inline]
483 pub fn bit(&self) -> bool {
484 self.bits
485 }
486 #[doc = r" Returns `true` if the bit is clear (0)"]
487 #[inline]
488 pub fn bit_is_clear(&self) -> bool {
489 !self.bit()
490 }
491 #[doc = r" Returns `true` if the bit is set (1)"]
492 #[inline]
493 pub fn bit_is_set(&self) -> bool {
494 self.bit()
495 }
496}
497#[doc = r" Value of the field"]
498pub struct CCRCFAILR {
499 bits: bool,
500}
501impl CCRCFAILR {
502 #[doc = r" Value of the field as raw bits"]
503 #[inline]
504 pub fn bit(&self) -> bool {
505 self.bits
506 }
507 #[doc = r" Returns `true` if the bit is clear (0)"]
508 #[inline]
509 pub fn bit_is_clear(&self) -> bool {
510 !self.bit()
511 }
512 #[doc = r" Returns `true` if the bit is set (1)"]
513 #[inline]
514 pub fn bit_is_set(&self) -> bool {
515 self.bit()
516 }
517}
518impl R {
519 #[doc = r" Value of the register as raw bits"]
520 #[inline]
521 pub fn bits(&self) -> u32 {
522 self.bits
523 }
524 #[doc = "Bit 23 - CE-ATA command completion signal received for CMD61"]
525 #[inline]
526 pub fn ceataend(&self) -> CEATAENDR {
527 let bits = {
528 const MASK: bool = true;
529 const OFFSET: u8 = 23;
530 ((self.bits >> OFFSET) & MASK as u32) != 0
531 };
532 CEATAENDR { bits }
533 }
534 #[doc = "Bit 22 - SDIO interrupt received"]
535 #[inline]
536 pub fn sdioit(&self) -> SDIOITR {
537 let bits = {
538 const MASK: bool = true;
539 const OFFSET: u8 = 22;
540 ((self.bits >> OFFSET) & MASK as u32) != 0
541 };
542 SDIOITR { bits }
543 }
544 #[doc = "Bit 21 - Data available in receive FIFO"]
545 #[inline]
546 pub fn rxdavl(&self) -> RXDAVLR {
547 let bits = {
548 const MASK: bool = true;
549 const OFFSET: u8 = 21;
550 ((self.bits >> OFFSET) & MASK as u32) != 0
551 };
552 RXDAVLR { bits }
553 }
554 #[doc = "Bit 20 - Data available in transmit FIFO"]
555 #[inline]
556 pub fn txdavl(&self) -> TXDAVLR {
557 let bits = {
558 const MASK: bool = true;
559 const OFFSET: u8 = 20;
560 ((self.bits >> OFFSET) & MASK as u32) != 0
561 };
562 TXDAVLR { bits }
563 }
564 #[doc = "Bit 19 - Receive FIFO empty"]
565 #[inline]
566 pub fn rxfifoe(&self) -> RXFIFOER {
567 let bits = {
568 const MASK: bool = true;
569 const OFFSET: u8 = 19;
570 ((self.bits >> OFFSET) & MASK as u32) != 0
571 };
572 RXFIFOER { bits }
573 }
574 #[doc = "Bit 18 - Transmit FIFO empty"]
575 #[inline]
576 pub fn txfifoe(&self) -> TXFIFOER {
577 let bits = {
578 const MASK: bool = true;
579 const OFFSET: u8 = 18;
580 ((self.bits >> OFFSET) & MASK as u32) != 0
581 };
582 TXFIFOER { bits }
583 }
584 #[doc = "Bit 17 - Receive FIFO full"]
585 #[inline]
586 pub fn rxfifof(&self) -> RXFIFOFR {
587 let bits = {
588 const MASK: bool = true;
589 const OFFSET: u8 = 17;
590 ((self.bits >> OFFSET) & MASK as u32) != 0
591 };
592 RXFIFOFR { bits }
593 }
594 #[doc = "Bit 16 - Transmit FIFO full"]
595 #[inline]
596 pub fn txfifof(&self) -> TXFIFOFR {
597 let bits = {
598 const MASK: bool = true;
599 const OFFSET: u8 = 16;
600 ((self.bits >> OFFSET) & MASK as u32) != 0
601 };
602 TXFIFOFR { bits }
603 }
604 #[doc = "Bit 15 - Receive FIFO half full: there are at least 8 words in the FIFO"]
605 #[inline]
606 pub fn rxfifohf(&self) -> RXFIFOHFR {
607 let bits = {
608 const MASK: bool = true;
609 const OFFSET: u8 = 15;
610 ((self.bits >> OFFSET) & MASK as u32) != 0
611 };
612 RXFIFOHFR { bits }
613 }
614 #[doc = "Bit 14 - Transmit FIFO half empty: at least 8 words can be written into the FIFO"]
615 #[inline]
616 pub fn txfifohe(&self) -> TXFIFOHER {
617 let bits = {
618 const MASK: bool = true;
619 const OFFSET: u8 = 14;
620 ((self.bits >> OFFSET) & MASK as u32) != 0
621 };
622 TXFIFOHER { bits }
623 }
624 #[doc = "Bit 13 - Data receive in progress"]
625 #[inline]
626 pub fn rxact(&self) -> RXACTR {
627 let bits = {
628 const MASK: bool = true;
629 const OFFSET: u8 = 13;
630 ((self.bits >> OFFSET) & MASK as u32) != 0
631 };
632 RXACTR { bits }
633 }
634 #[doc = "Bit 12 - Data transmit in progress"]
635 #[inline]
636 pub fn txact(&self) -> TXACTR {
637 let bits = {
638 const MASK: bool = true;
639 const OFFSET: u8 = 12;
640 ((self.bits >> OFFSET) & MASK as u32) != 0
641 };
642 TXACTR { bits }
643 }
644 #[doc = "Bit 11 - Command transfer in progress"]
645 #[inline]
646 pub fn cmdact(&self) -> CMDACTR {
647 let bits = {
648 const MASK: bool = true;
649 const OFFSET: u8 = 11;
650 ((self.bits >> OFFSET) & MASK as u32) != 0
651 };
652 CMDACTR { bits }
653 }
654 #[doc = "Bit 10 - Data block sent/received (CRC check passed)"]
655 #[inline]
656 pub fn dbckend(&self) -> DBCKENDR {
657 let bits = {
658 const MASK: bool = true;
659 const OFFSET: u8 = 10;
660 ((self.bits >> OFFSET) & MASK as u32) != 0
661 };
662 DBCKENDR { bits }
663 }
664 #[doc = "Bit 9 - Start bit not detected on all data signals in wide bus mode"]
665 #[inline]
666 pub fn stbiterr(&self) -> STBITERRR {
667 let bits = {
668 const MASK: bool = true;
669 const OFFSET: u8 = 9;
670 ((self.bits >> OFFSET) & MASK as u32) != 0
671 };
672 STBITERRR { bits }
673 }
674 #[doc = "Bit 8 - Data end (data counter, SDIDCOUNT, is zero)"]
675 #[inline]
676 pub fn dataend(&self) -> DATAENDR {
677 let bits = {
678 const MASK: bool = true;
679 const OFFSET: u8 = 8;
680 ((self.bits >> OFFSET) & MASK as u32) != 0
681 };
682 DATAENDR { bits }
683 }
684 #[doc = "Bit 7 - Command sent (no response required)"]
685 #[inline]
686 pub fn cmdsent(&self) -> CMDSENTR {
687 let bits = {
688 const MASK: bool = true;
689 const OFFSET: u8 = 7;
690 ((self.bits >> OFFSET) & MASK as u32) != 0
691 };
692 CMDSENTR { bits }
693 }
694 #[doc = "Bit 6 - Command response received (CRC check passed)"]
695 #[inline]
696 pub fn cmdrend(&self) -> CMDRENDR {
697 let bits = {
698 const MASK: bool = true;
699 const OFFSET: u8 = 6;
700 ((self.bits >> OFFSET) & MASK as u32) != 0
701 };
702 CMDRENDR { bits }
703 }
704 #[doc = "Bit 5 - Received FIFO overrun error"]
705 #[inline]
706 pub fn rxoverr(&self) -> RXOVERRR {
707 let bits = {
708 const MASK: bool = true;
709 const OFFSET: u8 = 5;
710 ((self.bits >> OFFSET) & MASK as u32) != 0
711 };
712 RXOVERRR { bits }
713 }
714 #[doc = "Bit 4 - Transmit FIFO underrun error"]
715 #[inline]
716 pub fn txunderr(&self) -> TXUNDERRR {
717 let bits = {
718 const MASK: bool = true;
719 const OFFSET: u8 = 4;
720 ((self.bits >> OFFSET) & MASK as u32) != 0
721 };
722 TXUNDERRR { bits }
723 }
724 #[doc = "Bit 3 - Data timeout"]
725 #[inline]
726 pub fn dtimeout(&self) -> DTIMEOUTR {
727 let bits = {
728 const MASK: bool = true;
729 const OFFSET: u8 = 3;
730 ((self.bits >> OFFSET) & MASK as u32) != 0
731 };
732 DTIMEOUTR { bits }
733 }
734 #[doc = "Bit 2 - Command response timeout"]
735 #[inline]
736 pub fn ctimeout(&self) -> CTIMEOUTR {
737 let bits = {
738 const MASK: bool = true;
739 const OFFSET: u8 = 2;
740 ((self.bits >> OFFSET) & MASK as u32) != 0
741 };
742 CTIMEOUTR { bits }
743 }
744 #[doc = "Bit 1 - Data block sent/received (CRC check failed)"]
745 #[inline]
746 pub fn dcrcfail(&self) -> DCRCFAILR {
747 let bits = {
748 const MASK: bool = true;
749 const OFFSET: u8 = 1;
750 ((self.bits >> OFFSET) & MASK as u32) != 0
751 };
752 DCRCFAILR { bits }
753 }
754 #[doc = "Bit 0 - Command response received (CRC check failed)"]
755 #[inline]
756 pub fn ccrcfail(&self) -> CCRCFAILR {
757 let bits = {
758 const MASK: bool = true;
759 const OFFSET: u8 = 0;
760 ((self.bits >> OFFSET) & MASK as u32) != 0
761 };
762 CCRCFAILR { bits }
763 }
764}