stm32f1_staging/stm32f103/sdio/
cmd.rs1pub type R = crate::R<CMDrs>;
3pub type W = crate::W<CMDrs>;
5pub type CMDINDEX_R = crate::FieldReader;
7pub type CMDINDEX_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
9pub type WAITRESP_R = crate::FieldReader;
11pub type WAITRESP_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
13pub type WAITINT_R = crate::BitReader;
15pub type WAITINT_W<'a, REG> = crate::BitWriter<'a, REG>;
17pub type WAITPEND_R = crate::BitReader;
19pub type WAITPEND_W<'a, REG> = crate::BitWriter<'a, REG>;
21pub type CPSMEN_R = crate::BitReader;
23pub type CPSMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
25pub type SDIOSUSPEND_R = crate::BitReader;
27pub type SDIOSUSPEND_W<'a, REG> = crate::BitWriter<'a, REG>;
29pub type ENCMDCOMPL_R = crate::BitReader;
31pub type ENCMDCOMPL_W<'a, REG> = crate::BitWriter<'a, REG>;
33pub type N_IEN_R = crate::BitReader;
35pub type N_IEN_W<'a, REG> = crate::BitWriter<'a, REG>;
37pub type CE_ATACMD_R = crate::BitReader;
39pub type CE_ATACMD_W<'a, REG> = crate::BitWriter<'a, REG>;
41impl R {
42 #[inline(always)]
44 pub fn cmdindex(&self) -> CMDINDEX_R {
45 CMDINDEX_R::new((self.bits & 0x3f) as u8)
46 }
47 #[inline(always)]
49 pub fn waitresp(&self) -> WAITRESP_R {
50 WAITRESP_R::new(((self.bits >> 6) & 3) as u8)
51 }
52 #[inline(always)]
54 pub fn waitint(&self) -> WAITINT_R {
55 WAITINT_R::new(((self.bits >> 8) & 1) != 0)
56 }
57 #[inline(always)]
59 pub fn waitpend(&self) -> WAITPEND_R {
60 WAITPEND_R::new(((self.bits >> 9) & 1) != 0)
61 }
62 #[inline(always)]
64 pub fn cpsmen(&self) -> CPSMEN_R {
65 CPSMEN_R::new(((self.bits >> 10) & 1) != 0)
66 }
67 #[inline(always)]
69 pub fn sdiosuspend(&self) -> SDIOSUSPEND_R {
70 SDIOSUSPEND_R::new(((self.bits >> 11) & 1) != 0)
71 }
72 #[inline(always)]
74 pub fn encmdcompl(&self) -> ENCMDCOMPL_R {
75 ENCMDCOMPL_R::new(((self.bits >> 12) & 1) != 0)
76 }
77 #[inline(always)]
79 pub fn n_ien(&self) -> N_IEN_R {
80 N_IEN_R::new(((self.bits >> 13) & 1) != 0)
81 }
82 #[inline(always)]
84 pub fn ce_atacmd(&self) -> CE_ATACMD_R {
85 CE_ATACMD_R::new(((self.bits >> 14) & 1) != 0)
86 }
87}
88impl core::fmt::Debug for R {
89 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
90 f.debug_struct("CMD")
91 .field("cmdindex", &self.cmdindex())
92 .field("waitresp", &self.waitresp())
93 .field("waitint", &self.waitint())
94 .field("waitpend", &self.waitpend())
95 .field("cpsmen", &self.cpsmen())
96 .field("sdiosuspend", &self.sdiosuspend())
97 .field("encmdcompl", &self.encmdcompl())
98 .field("n_ien", &self.n_ien())
99 .field("ce_atacmd", &self.ce_atacmd())
100 .finish()
101 }
102}
103impl W {
104 #[inline(always)]
106 pub fn cmdindex(&mut self) -> CMDINDEX_W<CMDrs> {
107 CMDINDEX_W::new(self, 0)
108 }
109 #[inline(always)]
111 pub fn waitresp(&mut self) -> WAITRESP_W<CMDrs> {
112 WAITRESP_W::new(self, 6)
113 }
114 #[inline(always)]
116 pub fn waitint(&mut self) -> WAITINT_W<CMDrs> {
117 WAITINT_W::new(self, 8)
118 }
119 #[inline(always)]
121 pub fn waitpend(&mut self) -> WAITPEND_W<CMDrs> {
122 WAITPEND_W::new(self, 9)
123 }
124 #[inline(always)]
126 pub fn cpsmen(&mut self) -> CPSMEN_W<CMDrs> {
127 CPSMEN_W::new(self, 10)
128 }
129 #[inline(always)]
131 pub fn sdiosuspend(&mut self) -> SDIOSUSPEND_W<CMDrs> {
132 SDIOSUSPEND_W::new(self, 11)
133 }
134 #[inline(always)]
136 pub fn encmdcompl(&mut self) -> ENCMDCOMPL_W<CMDrs> {
137 ENCMDCOMPL_W::new(self, 12)
138 }
139 #[inline(always)]
141 pub fn n_ien(&mut self) -> N_IEN_W<CMDrs> {
142 N_IEN_W::new(self, 13)
143 }
144 #[inline(always)]
146 pub fn ce_atacmd(&mut self) -> CE_ATACMD_W<CMDrs> {
147 CE_ATACMD_W::new(self, 14)
148 }
149}
150pub struct CMDrs;
156impl crate::RegisterSpec for CMDrs {
157 type Ux = u32;
158}
159impl crate::Readable for CMDrs {}
161impl crate::Writable for CMDrs {
163 type Safety = crate::Unsafe;
164}
165impl crate::Resettable for CMDrs {}