efm32gg12b410_pac/sdio/
prsstat.rs

1#[doc = "Register `PRSSTAT` reader"]
2pub struct R(crate::R<PRSSTAT_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<PRSSTAT_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<PRSSTAT_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<PRSSTAT_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `CMDINHIBITCMD` reader - Command Inhibit (CMD)"]
17pub type CMDINHIBITCMD_R = crate::BitReader<bool>;
18#[doc = "Field `CMDINHIBITDAT` reader - Command Inhibit (DAT)"]
19pub type CMDINHIBITDAT_R = crate::BitReader<bool>;
20#[doc = "Field `DATLINEACTIVE` reader - DAT Line Active"]
21pub type DATLINEACTIVE_R = crate::BitReader<bool>;
22#[doc = "Field `RETUNINGREQ` reader - Re-Tuning Request"]
23pub type RETUNINGREQ_R = crate::BitReader<bool>;
24#[doc = "Field `WRTRANACT` reader - Write Transfer Active"]
25pub type WRTRANACT_R = crate::BitReader<bool>;
26#[doc = "Field `RDTRANACT` reader - Read Transfer Active"]
27pub type RDTRANACT_R = crate::BitReader<bool>;
28#[doc = "Field `BUFFERWRITEENABLE` reader - Buffer Write Enable"]
29pub type BUFFERWRITEENABLE_R = crate::BitReader<bool>;
30#[doc = "Field `BUFRDEN` reader - Buffer Read Enable"]
31pub type BUFRDEN_R = crate::BitReader<bool>;
32#[doc = "Field `CARDINS` reader - Card Inserted Status"]
33pub type CARDINS_R = crate::BitReader<bool>;
34#[doc = "Field `CARDSTATESTABLE` reader - Card State Stable Status"]
35pub type CARDSTATESTABLE_R = crate::BitReader<bool>;
36#[doc = "Field `CARDDETPINLVL` reader - Card Detect Pin Level"]
37pub type CARDDETPINLVL_R = crate::BitReader<bool>;
38#[doc = "Field `WRPROTSWPINLVL` reader - Write Protect Switch Pin Level"]
39pub type WRPROTSWPINLVL_R = crate::BitReader<bool>;
40#[doc = "Field `DAT3TO0SIGLVL` reader - DAT\\[3:0\\]
41Line Signal Level"]
42pub type DAT3TO0SIGLVL_R = crate::FieldReader<u8, u8>;
43#[doc = "Field `CMDSIGLVL` reader - Command Line Signal Level"]
44pub type CMDSIGLVL_R = crate::BitReader<bool>;
45#[doc = "Field `DAT7TO4SIGLVL` reader - DAT\\[7:4\\]
46Line Signal Level"]
47pub type DAT7TO4SIGLVL_R = crate::FieldReader<u8, u8>;
48impl R {
49    #[doc = "Bit 0 - Command Inhibit (CMD)"]
50    #[inline(always)]
51    pub fn cmdinhibitcmd(&self) -> CMDINHIBITCMD_R {
52        CMDINHIBITCMD_R::new((self.bits & 1) != 0)
53    }
54    #[doc = "Bit 1 - Command Inhibit (DAT)"]
55    #[inline(always)]
56    pub fn cmdinhibitdat(&self) -> CMDINHIBITDAT_R {
57        CMDINHIBITDAT_R::new(((self.bits >> 1) & 1) != 0)
58    }
59    #[doc = "Bit 2 - DAT Line Active"]
60    #[inline(always)]
61    pub fn datlineactive(&self) -> DATLINEACTIVE_R {
62        DATLINEACTIVE_R::new(((self.bits >> 2) & 1) != 0)
63    }
64    #[doc = "Bit 3 - Re-Tuning Request"]
65    #[inline(always)]
66    pub fn retuningreq(&self) -> RETUNINGREQ_R {
67        RETUNINGREQ_R::new(((self.bits >> 3) & 1) != 0)
68    }
69    #[doc = "Bit 8 - Write Transfer Active"]
70    #[inline(always)]
71    pub fn wrtranact(&self) -> WRTRANACT_R {
72        WRTRANACT_R::new(((self.bits >> 8) & 1) != 0)
73    }
74    #[doc = "Bit 9 - Read Transfer Active"]
75    #[inline(always)]
76    pub fn rdtranact(&self) -> RDTRANACT_R {
77        RDTRANACT_R::new(((self.bits >> 9) & 1) != 0)
78    }
79    #[doc = "Bit 10 - Buffer Write Enable"]
80    #[inline(always)]
81    pub fn bufferwriteenable(&self) -> BUFFERWRITEENABLE_R {
82        BUFFERWRITEENABLE_R::new(((self.bits >> 10) & 1) != 0)
83    }
84    #[doc = "Bit 11 - Buffer Read Enable"]
85    #[inline(always)]
86    pub fn bufrden(&self) -> BUFRDEN_R {
87        BUFRDEN_R::new(((self.bits >> 11) & 1) != 0)
88    }
89    #[doc = "Bit 16 - Card Inserted Status"]
90    #[inline(always)]
91    pub fn cardins(&self) -> CARDINS_R {
92        CARDINS_R::new(((self.bits >> 16) & 1) != 0)
93    }
94    #[doc = "Bit 17 - Card State Stable Status"]
95    #[inline(always)]
96    pub fn cardstatestable(&self) -> CARDSTATESTABLE_R {
97        CARDSTATESTABLE_R::new(((self.bits >> 17) & 1) != 0)
98    }
99    #[doc = "Bit 18 - Card Detect Pin Level"]
100    #[inline(always)]
101    pub fn carddetpinlvl(&self) -> CARDDETPINLVL_R {
102        CARDDETPINLVL_R::new(((self.bits >> 18) & 1) != 0)
103    }
104    #[doc = "Bit 19 - Write Protect Switch Pin Level"]
105    #[inline(always)]
106    pub fn wrprotswpinlvl(&self) -> WRPROTSWPINLVL_R {
107        WRPROTSWPINLVL_R::new(((self.bits >> 19) & 1) != 0)
108    }
109    #[doc = "Bits 20:23 - DAT\\[3:0\\]
110Line Signal Level"]
111    #[inline(always)]
112    pub fn dat3to0siglvl(&self) -> DAT3TO0SIGLVL_R {
113        DAT3TO0SIGLVL_R::new(((self.bits >> 20) & 0x0f) as u8)
114    }
115    #[doc = "Bit 24 - Command Line Signal Level"]
116    #[inline(always)]
117    pub fn cmdsiglvl(&self) -> CMDSIGLVL_R {
118        CMDSIGLVL_R::new(((self.bits >> 24) & 1) != 0)
119    }
120    #[doc = "Bits 25:28 - DAT\\[7:4\\]
121Line Signal Level"]
122    #[inline(always)]
123    pub fn dat7to4siglvl(&self) -> DAT7TO4SIGLVL_R {
124        DAT7TO4SIGLVL_R::new(((self.bits >> 25) & 0x0f) as u8)
125    }
126}
127#[doc = "Present State Register\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 [prsstat](index.html) module"]
128pub struct PRSSTAT_SPEC;
129impl crate::RegisterSpec for PRSSTAT_SPEC {
130    type Ux = u32;
131}
132#[doc = "`read()` method returns [prsstat::R](R) reader structure"]
133impl crate::Readable for PRSSTAT_SPEC {
134    type Reader = R;
135}
136#[doc = "`reset()` method sets PRSSTAT to value 0"]
137impl crate::Resettable for PRSSTAT_SPEC {
138    #[inline(always)]
139    fn reset_value() -> Self::Ux {
140        0
141    }
142}