stm32f1_staging/stm32f107/fsmc/
bcr1.rs1pub type R = crate::R<BCR1rs>;
3pub type W = crate::W<BCR1rs>;
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 WAITCFG_R = crate::BitReader;
35pub type WAITCFG_W<'a, REG> = crate::BitWriter<'a, REG>;
37pub type WREN_R = crate::BitReader;
39pub type WREN_W<'a, REG> = crate::BitWriter<'a, REG>;
41pub type WAITEN_R = crate::BitReader;
43pub type WAITEN_W<'a, REG> = crate::BitWriter<'a, REG>;
45pub type EXTMOD_R = crate::BitReader;
47pub type EXTMOD_W<'a, REG> = crate::BitWriter<'a, REG>;
49pub type ASYNCWAIT_R = crate::BitReader;
51pub type ASYNCWAIT_W<'a, REG> = crate::BitWriter<'a, REG>;
53pub type CBURSTRW_R = crate::BitReader;
55pub type CBURSTRW_W<'a, REG> = crate::BitWriter<'a, REG>;
57impl R {
58 #[inline(always)]
60 pub fn mbken(&self) -> MBKEN_R {
61 MBKEN_R::new((self.bits & 1) != 0)
62 }
63 #[inline(always)]
65 pub fn muxen(&self) -> MUXEN_R {
66 MUXEN_R::new(((self.bits >> 1) & 1) != 0)
67 }
68 #[inline(always)]
70 pub fn mtyp(&self) -> MTYP_R {
71 MTYP_R::new(((self.bits >> 2) & 3) as u8)
72 }
73 #[inline(always)]
75 pub fn mwid(&self) -> MWID_R {
76 MWID_R::new(((self.bits >> 4) & 3) as u8)
77 }
78 #[inline(always)]
80 pub fn faccen(&self) -> FACCEN_R {
81 FACCEN_R::new(((self.bits >> 6) & 1) != 0)
82 }
83 #[inline(always)]
85 pub fn bursten(&self) -> BURSTEN_R {
86 BURSTEN_R::new(((self.bits >> 8) & 1) != 0)
87 }
88 #[inline(always)]
90 pub fn waitpol(&self) -> WAITPOL_R {
91 WAITPOL_R::new(((self.bits >> 9) & 1) != 0)
92 }
93 #[inline(always)]
95 pub fn waitcfg(&self) -> WAITCFG_R {
96 WAITCFG_R::new(((self.bits >> 11) & 1) != 0)
97 }
98 #[inline(always)]
100 pub fn wren(&self) -> WREN_R {
101 WREN_R::new(((self.bits >> 12) & 1) != 0)
102 }
103 #[inline(always)]
105 pub fn waiten(&self) -> WAITEN_R {
106 WAITEN_R::new(((self.bits >> 13) & 1) != 0)
107 }
108 #[inline(always)]
110 pub fn extmod(&self) -> EXTMOD_R {
111 EXTMOD_R::new(((self.bits >> 14) & 1) != 0)
112 }
113 #[inline(always)]
115 pub fn asyncwait(&self) -> ASYNCWAIT_R {
116 ASYNCWAIT_R::new(((self.bits >> 15) & 1) != 0)
117 }
118 #[inline(always)]
120 pub fn cburstrw(&self) -> CBURSTRW_R {
121 CBURSTRW_R::new(((self.bits >> 19) & 1) != 0)
122 }
123}
124impl core::fmt::Debug for R {
125 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
126 f.debug_struct("BCR1")
127 .field("cburstrw", &self.cburstrw())
128 .field("asyncwait", &self.asyncwait())
129 .field("extmod", &self.extmod())
130 .field("waiten", &self.waiten())
131 .field("wren", &self.wren())
132 .field("waitcfg", &self.waitcfg())
133 .field("waitpol", &self.waitpol())
134 .field("bursten", &self.bursten())
135 .field("faccen", &self.faccen())
136 .field("mwid", &self.mwid())
137 .field("mtyp", &self.mtyp())
138 .field("muxen", &self.muxen())
139 .field("mbken", &self.mbken())
140 .finish()
141 }
142}
143impl W {
144 #[inline(always)]
146 pub fn mbken(&mut self) -> MBKEN_W<BCR1rs> {
147 MBKEN_W::new(self, 0)
148 }
149 #[inline(always)]
151 pub fn muxen(&mut self) -> MUXEN_W<BCR1rs> {
152 MUXEN_W::new(self, 1)
153 }
154 #[inline(always)]
156 pub fn mtyp(&mut self) -> MTYP_W<BCR1rs> {
157 MTYP_W::new(self, 2)
158 }
159 #[inline(always)]
161 pub fn mwid(&mut self) -> MWID_W<BCR1rs> {
162 MWID_W::new(self, 4)
163 }
164 #[inline(always)]
166 pub fn faccen(&mut self) -> FACCEN_W<BCR1rs> {
167 FACCEN_W::new(self, 6)
168 }
169 #[inline(always)]
171 pub fn bursten(&mut self) -> BURSTEN_W<BCR1rs> {
172 BURSTEN_W::new(self, 8)
173 }
174 #[inline(always)]
176 pub fn waitpol(&mut self) -> WAITPOL_W<BCR1rs> {
177 WAITPOL_W::new(self, 9)
178 }
179 #[inline(always)]
181 pub fn waitcfg(&mut self) -> WAITCFG_W<BCR1rs> {
182 WAITCFG_W::new(self, 11)
183 }
184 #[inline(always)]
186 pub fn wren(&mut self) -> WREN_W<BCR1rs> {
187 WREN_W::new(self, 12)
188 }
189 #[inline(always)]
191 pub fn waiten(&mut self) -> WAITEN_W<BCR1rs> {
192 WAITEN_W::new(self, 13)
193 }
194 #[inline(always)]
196 pub fn extmod(&mut self) -> EXTMOD_W<BCR1rs> {
197 EXTMOD_W::new(self, 14)
198 }
199 #[inline(always)]
201 pub fn asyncwait(&mut self) -> ASYNCWAIT_W<BCR1rs> {
202 ASYNCWAIT_W::new(self, 15)
203 }
204 #[inline(always)]
206 pub fn cburstrw(&mut self) -> CBURSTRW_W<BCR1rs> {
207 CBURSTRW_W::new(self, 19)
208 }
209}
210pub struct BCR1rs;
216impl crate::RegisterSpec for BCR1rs {
217 type Ux = u32;
218}
219impl crate::Readable for BCR1rs {}
221impl crate::Writable for BCR1rs {
223 type Safety = crate::Unsafe;
224}
225impl crate::Resettable for BCR1rs {
227 const RESET_VALUE: u32 = 0x30d0;
228}