efm32gg12b830_pac/sdio/
capab2.rs1#[doc = "Register `CAPAB2` reader"]
2pub struct R(crate::R<CAPAB2_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<CAPAB2_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<CAPAB2_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<CAPAB2_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `SDR50SUP` reader - SDR50 Support"]
17pub type SDR50SUP_R = crate::BitReader<bool>;
18#[doc = "Field `SDR104SUP` reader - SDR104 Support"]
19pub type SDR104SUP_R = crate::BitReader<bool>;
20#[doc = "Field `DDR50SUP` reader - DDR50 Support"]
21pub type DDR50SUP_R = crate::BitReader<bool>;
22#[doc = "Field `DRVTYPASUP` reader - Driver Type a Support"]
23pub type DRVTYPASUP_R = crate::BitReader<bool>;
24#[doc = "Field `DRVTYPCSUP` reader - Driver Type C Support"]
25pub type DRVTYPCSUP_R = crate::BitReader<bool>;
26#[doc = "Field `DRVTYPDSUP` reader - Driver Type D Support"]
27pub type DRVTYPDSUP_R = crate::BitReader<bool>;
28#[doc = "Field `TIMCNTRETUN` reader - Timer Count for Re-Tuning"]
29pub type TIMCNTRETUN_R = crate::FieldReader<u8, u8>;
30#[doc = "Field `USETUNSDR50` reader - Use Tuning for SDR50"]
31pub type USETUNSDR50_R = crate::BitReader<bool>;
32#[doc = "Field `RETUNEMODES` reader - Re-tuning Modes"]
33pub type RETUNEMODES_R = crate::FieldReader<u8, u8>;
34#[doc = "Field `CLOCKKMUL` reader - Clock Multiplier"]
35pub type CLOCKKMUL_R = crate::FieldReader<u8, u8>;
36#[doc = "Field `SPIMODE` reader - SPI Mode Support"]
37pub type SPIMODE_R = crate::BitReader<bool>;
38#[doc = "Field `SPIBLOCKMODE` reader - SPI Block Mode Support"]
39pub type SPIBLOCKMODE_R = crate::BitReader<bool>;
40impl R {
41 #[doc = "Bit 0 - SDR50 Support"]
42 #[inline(always)]
43 pub fn sdr50sup(&self) -> SDR50SUP_R {
44 SDR50SUP_R::new((self.bits & 1) != 0)
45 }
46 #[doc = "Bit 1 - SDR104 Support"]
47 #[inline(always)]
48 pub fn sdr104sup(&self) -> SDR104SUP_R {
49 SDR104SUP_R::new(((self.bits >> 1) & 1) != 0)
50 }
51 #[doc = "Bit 2 - DDR50 Support"]
52 #[inline(always)]
53 pub fn ddr50sup(&self) -> DDR50SUP_R {
54 DDR50SUP_R::new(((self.bits >> 2) & 1) != 0)
55 }
56 #[doc = "Bit 4 - Driver Type a Support"]
57 #[inline(always)]
58 pub fn drvtypasup(&self) -> DRVTYPASUP_R {
59 DRVTYPASUP_R::new(((self.bits >> 4) & 1) != 0)
60 }
61 #[doc = "Bit 5 - Driver Type C Support"]
62 #[inline(always)]
63 pub fn drvtypcsup(&self) -> DRVTYPCSUP_R {
64 DRVTYPCSUP_R::new(((self.bits >> 5) & 1) != 0)
65 }
66 #[doc = "Bit 6 - Driver Type D Support"]
67 #[inline(always)]
68 pub fn drvtypdsup(&self) -> DRVTYPDSUP_R {
69 DRVTYPDSUP_R::new(((self.bits >> 6) & 1) != 0)
70 }
71 #[doc = "Bits 8:11 - Timer Count for Re-Tuning"]
72 #[inline(always)]
73 pub fn timcntretun(&self) -> TIMCNTRETUN_R {
74 TIMCNTRETUN_R::new(((self.bits >> 8) & 0x0f) as u8)
75 }
76 #[doc = "Bit 13 - Use Tuning for SDR50"]
77 #[inline(always)]
78 pub fn usetunsdr50(&self) -> USETUNSDR50_R {
79 USETUNSDR50_R::new(((self.bits >> 13) & 1) != 0)
80 }
81 #[doc = "Bits 14:15 - Re-tuning Modes"]
82 #[inline(always)]
83 pub fn retunemodes(&self) -> RETUNEMODES_R {
84 RETUNEMODES_R::new(((self.bits >> 14) & 3) as u8)
85 }
86 #[doc = "Bits 16:23 - Clock Multiplier"]
87 #[inline(always)]
88 pub fn clockkmul(&self) -> CLOCKKMUL_R {
89 CLOCKKMUL_R::new(((self.bits >> 16) & 0xff) as u8)
90 }
91 #[doc = "Bit 24 - SPI Mode Support"]
92 #[inline(always)]
93 pub fn spimode(&self) -> SPIMODE_R {
94 SPIMODE_R::new(((self.bits >> 24) & 1) != 0)
95 }
96 #[doc = "Bit 25 - SPI Block Mode Support"]
97 #[inline(always)]
98 pub fn spiblockmode(&self) -> SPIBLOCKMODE_R {
99 SPIBLOCKMODE_R::new(((self.bits >> 25) & 1) != 0)
100 }
101}
102#[doc = "Capabilities Register to Hold Bits 63~32\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [capab2](index.html) module"]
103pub struct CAPAB2_SPEC;
104impl crate::RegisterSpec for CAPAB2_SPEC {
105 type Ux = u32;
106}
107#[doc = "`read()` method returns [capab2::R](R) reader structure"]
108impl crate::Readable for CAPAB2_SPEC {
109 type Reader = R;
110}
111#[doc = "`reset()` method sets CAPAB2 to value 0"]
112impl crate::Resettable for CAPAB2_SPEC {
113 #[inline(always)]
114 fn reset_value() -> Self::Ux {
115 0
116 }
117}