stm32f1_staging/stm32f107/fsmc/
bcr4.rs1pub type R = crate::R<BCR4rs>;
3pub type W = crate::W<BCR4rs>;
5pub type MBKEN_R = crate::BitReader;
7pub type MBKEN_W<'a, REG> = crate::BitWriter<'a, REG>;
9pub type MUXEN_R = crate::BitReader;
11pub type MUXEN_W<'a, REG> = crate::BitWriter<'a, REG>;
13pub type MTYP_R = crate::FieldReader;
15pub type MTYP_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
17pub type MWID_R = crate::FieldReader;
19pub type MWID_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
21pub type FACCEN_R = crate::BitReader;
23pub type FACCEN_W<'a, REG> = crate::BitWriter<'a, REG>;
25pub type BURSTEN_R = crate::BitReader;
27pub type BURSTEN_W<'a, REG> = crate::BitWriter<'a, REG>;
29pub type WAITPOL_R = crate::BitReader;
31pub type WAITPOL_W<'a, REG> = crate::BitWriter<'a, REG>;
33pub type WRAPMOD_R = crate::BitReader;
35pub type WRAPMOD_W<'a, REG> = crate::BitWriter<'a, REG>;
37pub type WAITCFG_R = crate::BitReader;
39pub type WAITCFG_W<'a, REG> = crate::BitWriter<'a, REG>;
41pub type WREN_R = crate::BitReader;
43pub type WREN_W<'a, REG> = crate::BitWriter<'a, REG>;
45pub type WAITEN_R = crate::BitReader;
47pub type WAITEN_W<'a, REG> = crate::BitWriter<'a, REG>;
49pub type EXTMOD_R = crate::BitReader;
51pub type EXTMOD_W<'a, REG> = crate::BitWriter<'a, REG>;
53pub type ASYNCWAIT_R = crate::BitReader;
55pub type ASYNCWAIT_W<'a, REG> = crate::BitWriter<'a, REG>;
57pub type CBURSTRW_R = crate::BitReader;
59pub type CBURSTRW_W<'a, REG> = crate::BitWriter<'a, REG>;
61impl R {
62 #[inline(always)]
64 pub fn mbken(&self) -> MBKEN_R {
65 MBKEN_R::new((self.bits & 1) != 0)
66 }
67 #[inline(always)]
69 pub fn muxen(&self) -> MUXEN_R {
70 MUXEN_R::new(((self.bits >> 1) & 1) != 0)
71 }
72 #[inline(always)]
74 pub fn mtyp(&self) -> MTYP_R {
75 MTYP_R::new(((self.bits >> 2) & 3) as u8)
76 }
77 #[inline(always)]
79 pub fn mwid(&self) -> MWID_R {
80 MWID_R::new(((self.bits >> 4) & 3) as u8)
81 }
82 #[inline(always)]
84 pub fn faccen(&self) -> FACCEN_R {
85 FACCEN_R::new(((self.bits >> 6) & 1) != 0)
86 }
87 #[inline(always)]
89 pub fn bursten(&self) -> BURSTEN_R {
90 BURSTEN_R::new(((self.bits >> 8) & 1) != 0)
91 }
92 #[inline(always)]
94 pub fn waitpol(&self) -> WAITPOL_R {
95 WAITPOL_R::new(((self.bits >> 9) & 1) != 0)
96 }
97 #[inline(always)]
99 pub fn wrapmod(&self) -> WRAPMOD_R {
100 WRAPMOD_R::new(((self.bits >> 10) & 1) != 0)
101 }
102 #[inline(always)]
104 pub fn waitcfg(&self) -> WAITCFG_R {
105 WAITCFG_R::new(((self.bits >> 11) & 1) != 0)
106 }
107 #[inline(always)]
109 pub fn wren(&self) -> WREN_R {
110 WREN_R::new(((self.bits >> 12) & 1) != 0)
111 }
112 #[inline(always)]
114 pub fn waiten(&self) -> WAITEN_R {
115 WAITEN_R::new(((self.bits >> 13) & 1) != 0)
116 }
117 #[inline(always)]
119 pub fn extmod(&self) -> EXTMOD_R {
120 EXTMOD_R::new(((self.bits >> 14) & 1) != 0)
121 }
122 #[inline(always)]
124 pub fn asyncwait(&self) -> ASYNCWAIT_R {
125 ASYNCWAIT_R::new(((self.bits >> 15) & 1) != 0)
126 }
127 #[inline(always)]
129 pub fn cburstrw(&self) -> CBURSTRW_R {
130 CBURSTRW_R::new(((self.bits >> 19) & 1) != 0)
131 }
132}
133impl core::fmt::Debug for R {
134 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
135 f.debug_struct("BCR4")
136 .field("cburstrw", &self.cburstrw())
137 .field("asyncwait", &self.asyncwait())
138 .field("extmod", &self.extmod())
139 .field("waiten", &self.waiten())
140 .field("wren", &self.wren())
141 .field("waitcfg", &self.waitcfg())
142 .field("wrapmod", &self.wrapmod())
143 .field("waitpol", &self.waitpol())
144 .field("bursten", &self.bursten())
145 .field("faccen", &self.faccen())
146 .field("mwid", &self.mwid())
147 .field("mtyp", &self.mtyp())
148 .field("muxen", &self.muxen())
149 .field("mbken", &self.mbken())
150 .finish()
151 }
152}
153impl W {
154 #[inline(always)]
156 pub fn mbken(&mut self) -> MBKEN_W<BCR4rs> {
157 MBKEN_W::new(self, 0)
158 }
159 #[inline(always)]
161 pub fn muxen(&mut self) -> MUXEN_W<BCR4rs> {
162 MUXEN_W::new(self, 1)
163 }
164 #[inline(always)]
166 pub fn mtyp(&mut self) -> MTYP_W<BCR4rs> {
167 MTYP_W::new(self, 2)
168 }
169 #[inline(always)]
171 pub fn mwid(&mut self) -> MWID_W<BCR4rs> {
172 MWID_W::new(self, 4)
173 }
174 #[inline(always)]
176 pub fn faccen(&mut self) -> FACCEN_W<BCR4rs> {
177 FACCEN_W::new(self, 6)
178 }
179 #[inline(always)]
181 pub fn bursten(&mut self) -> BURSTEN_W<BCR4rs> {
182 BURSTEN_W::new(self, 8)
183 }
184 #[inline(always)]
186 pub fn waitpol(&mut self) -> WAITPOL_W<BCR4rs> {
187 WAITPOL_W::new(self, 9)
188 }
189 #[inline(always)]
191 pub fn wrapmod(&mut self) -> WRAPMOD_W<BCR4rs> {
192 WRAPMOD_W::new(self, 10)
193 }
194 #[inline(always)]
196 pub fn waitcfg(&mut self) -> WAITCFG_W<BCR4rs> {
197 WAITCFG_W::new(self, 11)
198 }
199 #[inline(always)]
201 pub fn wren(&mut self) -> WREN_W<BCR4rs> {
202 WREN_W::new(self, 12)
203 }
204 #[inline(always)]
206 pub fn waiten(&mut self) -> WAITEN_W<BCR4rs> {
207 WAITEN_W::new(self, 13)
208 }
209 #[inline(always)]
211 pub fn extmod(&mut self) -> EXTMOD_W<BCR4rs> {
212 EXTMOD_W::new(self, 14)
213 }
214 #[inline(always)]
216 pub fn asyncwait(&mut self) -> ASYNCWAIT_W<BCR4rs> {
217 ASYNCWAIT_W::new(self, 15)
218 }
219 #[inline(always)]
221 pub fn cburstrw(&mut self) -> CBURSTRW_W<BCR4rs> {
222 CBURSTRW_W::new(self, 19)
223 }
224}
225pub struct BCR4rs;
231impl crate::RegisterSpec for BCR4rs {
232 type Ux = u32;
233}
234impl crate::Readable for BCR4rs {}
236impl crate::Writable for BCR4rs {
238 type Safety = crate::Unsafe;
239}
240impl crate::Resettable for BCR4rs {
242 const RESET_VALUE: u32 = 0x30d0;
243}