stm32f3/stm32f303/fmc/
bcr3.rs1#[doc = "Register `BCR3` reader"]
2pub struct R(crate::R<BCR3_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<BCR3_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<BCR3_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<BCR3_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `BCR3` writer"]
17pub struct W(crate::W<BCR3_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<BCR3_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<BCR3_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<BCR3_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `CBURSTRW` reader - CBURSTRW"]
38pub type CBURSTRW_R = crate::BitReader<bool>;
39#[doc = "Field `CBURSTRW` writer - CBURSTRW"]
40pub type CBURSTRW_W<'a, const O: u8> = crate::BitWriter<'a, u32, BCR3_SPEC, bool, O>;
41#[doc = "Field `ASYNCWAIT` reader - ASYNCWAIT"]
42pub type ASYNCWAIT_R = crate::BitReader<bool>;
43#[doc = "Field `ASYNCWAIT` writer - ASYNCWAIT"]
44pub type ASYNCWAIT_W<'a, const O: u8> = crate::BitWriter<'a, u32, BCR3_SPEC, bool, O>;
45#[doc = "Field `EXTMOD` reader - EXTMOD"]
46pub type EXTMOD_R = crate::BitReader<bool>;
47#[doc = "Field `EXTMOD` writer - EXTMOD"]
48pub type EXTMOD_W<'a, const O: u8> = crate::BitWriter<'a, u32, BCR3_SPEC, bool, O>;
49#[doc = "Field `WAITEN` reader - WAITEN"]
50pub type WAITEN_R = crate::BitReader<bool>;
51#[doc = "Field `WAITEN` writer - WAITEN"]
52pub type WAITEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, BCR3_SPEC, bool, O>;
53#[doc = "Field `WREN` reader - WREN"]
54pub type WREN_R = crate::BitReader<bool>;
55#[doc = "Field `WREN` writer - WREN"]
56pub type WREN_W<'a, const O: u8> = crate::BitWriter<'a, u32, BCR3_SPEC, bool, O>;
57#[doc = "Field `WAITCFG` reader - WAITCFG"]
58pub type WAITCFG_R = crate::BitReader<bool>;
59#[doc = "Field `WAITCFG` writer - WAITCFG"]
60pub type WAITCFG_W<'a, const O: u8> = crate::BitWriter<'a, u32, BCR3_SPEC, bool, O>;
61#[doc = "Field `WRAPMOD` reader - WRAPMOD"]
62pub type WRAPMOD_R = crate::BitReader<bool>;
63#[doc = "Field `WRAPMOD` writer - WRAPMOD"]
64pub type WRAPMOD_W<'a, const O: u8> = crate::BitWriter<'a, u32, BCR3_SPEC, bool, O>;
65#[doc = "Field `WAITPOL` reader - WAITPOL"]
66pub type WAITPOL_R = crate::BitReader<bool>;
67#[doc = "Field `WAITPOL` writer - WAITPOL"]
68pub type WAITPOL_W<'a, const O: u8> = crate::BitWriter<'a, u32, BCR3_SPEC, bool, O>;
69#[doc = "Field `BURSTEN` reader - BURSTEN"]
70pub type BURSTEN_R = crate::BitReader<bool>;
71#[doc = "Field `BURSTEN` writer - BURSTEN"]
72pub type BURSTEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, BCR3_SPEC, bool, O>;
73#[doc = "Field `FACCEN` reader - FACCEN"]
74pub type FACCEN_R = crate::BitReader<bool>;
75#[doc = "Field `FACCEN` writer - FACCEN"]
76pub type FACCEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, BCR3_SPEC, bool, O>;
77#[doc = "Field `MWID` reader - MWID"]
78pub type MWID_R = crate::FieldReader<u8, u8>;
79#[doc = "Field `MWID` writer - MWID"]
80pub type MWID_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BCR3_SPEC, u8, u8, 2, O>;
81#[doc = "Field `MTYP` reader - MTYP"]
82pub type MTYP_R = crate::FieldReader<u8, u8>;
83#[doc = "Field `MTYP` writer - MTYP"]
84pub type MTYP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BCR3_SPEC, u8, u8, 2, O>;
85#[doc = "Field `MUXEN` reader - MUXEN"]
86pub type MUXEN_R = crate::BitReader<bool>;
87#[doc = "Field `MUXEN` writer - MUXEN"]
88pub type MUXEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, BCR3_SPEC, bool, O>;
89#[doc = "Field `MBKEN` reader - MBKEN"]
90pub type MBKEN_R = crate::BitReader<bool>;
91#[doc = "Field `MBKEN` writer - MBKEN"]
92pub type MBKEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, BCR3_SPEC, bool, O>;
93impl R {
94 #[doc = "Bit 19 - CBURSTRW"]
95 #[inline(always)]
96 pub fn cburstrw(&self) -> CBURSTRW_R {
97 CBURSTRW_R::new(((self.bits >> 19) & 1) != 0)
98 }
99 #[doc = "Bit 15 - ASYNCWAIT"]
100 #[inline(always)]
101 pub fn asyncwait(&self) -> ASYNCWAIT_R {
102 ASYNCWAIT_R::new(((self.bits >> 15) & 1) != 0)
103 }
104 #[doc = "Bit 14 - EXTMOD"]
105 #[inline(always)]
106 pub fn extmod(&self) -> EXTMOD_R {
107 EXTMOD_R::new(((self.bits >> 14) & 1) != 0)
108 }
109 #[doc = "Bit 13 - WAITEN"]
110 #[inline(always)]
111 pub fn waiten(&self) -> WAITEN_R {
112 WAITEN_R::new(((self.bits >> 13) & 1) != 0)
113 }
114 #[doc = "Bit 12 - WREN"]
115 #[inline(always)]
116 pub fn wren(&self) -> WREN_R {
117 WREN_R::new(((self.bits >> 12) & 1) != 0)
118 }
119 #[doc = "Bit 11 - WAITCFG"]
120 #[inline(always)]
121 pub fn waitcfg(&self) -> WAITCFG_R {
122 WAITCFG_R::new(((self.bits >> 11) & 1) != 0)
123 }
124 #[doc = "Bit 10 - WRAPMOD"]
125 #[inline(always)]
126 pub fn wrapmod(&self) -> WRAPMOD_R {
127 WRAPMOD_R::new(((self.bits >> 10) & 1) != 0)
128 }
129 #[doc = "Bit 9 - WAITPOL"]
130 #[inline(always)]
131 pub fn waitpol(&self) -> WAITPOL_R {
132 WAITPOL_R::new(((self.bits >> 9) & 1) != 0)
133 }
134 #[doc = "Bit 8 - BURSTEN"]
135 #[inline(always)]
136 pub fn bursten(&self) -> BURSTEN_R {
137 BURSTEN_R::new(((self.bits >> 8) & 1) != 0)
138 }
139 #[doc = "Bit 6 - FACCEN"]
140 #[inline(always)]
141 pub fn faccen(&self) -> FACCEN_R {
142 FACCEN_R::new(((self.bits >> 6) & 1) != 0)
143 }
144 #[doc = "Bits 4:5 - MWID"]
145 #[inline(always)]
146 pub fn mwid(&self) -> MWID_R {
147 MWID_R::new(((self.bits >> 4) & 3) as u8)
148 }
149 #[doc = "Bits 2:3 - MTYP"]
150 #[inline(always)]
151 pub fn mtyp(&self) -> MTYP_R {
152 MTYP_R::new(((self.bits >> 2) & 3) as u8)
153 }
154 #[doc = "Bit 1 - MUXEN"]
155 #[inline(always)]
156 pub fn muxen(&self) -> MUXEN_R {
157 MUXEN_R::new(((self.bits >> 1) & 1) != 0)
158 }
159 #[doc = "Bit 0 - MBKEN"]
160 #[inline(always)]
161 pub fn mbken(&self) -> MBKEN_R {
162 MBKEN_R::new((self.bits & 1) != 0)
163 }
164}
165impl W {
166 #[doc = "Bit 19 - CBURSTRW"]
167 #[inline(always)]
168 pub fn cburstrw(&mut self) -> CBURSTRW_W<19> {
169 CBURSTRW_W::new(self)
170 }
171 #[doc = "Bit 15 - ASYNCWAIT"]
172 #[inline(always)]
173 pub fn asyncwait(&mut self) -> ASYNCWAIT_W<15> {
174 ASYNCWAIT_W::new(self)
175 }
176 #[doc = "Bit 14 - EXTMOD"]
177 #[inline(always)]
178 pub fn extmod(&mut self) -> EXTMOD_W<14> {
179 EXTMOD_W::new(self)
180 }
181 #[doc = "Bit 13 - WAITEN"]
182 #[inline(always)]
183 pub fn waiten(&mut self) -> WAITEN_W<13> {
184 WAITEN_W::new(self)
185 }
186 #[doc = "Bit 12 - WREN"]
187 #[inline(always)]
188 pub fn wren(&mut self) -> WREN_W<12> {
189 WREN_W::new(self)
190 }
191 #[doc = "Bit 11 - WAITCFG"]
192 #[inline(always)]
193 pub fn waitcfg(&mut self) -> WAITCFG_W<11> {
194 WAITCFG_W::new(self)
195 }
196 #[doc = "Bit 10 - WRAPMOD"]
197 #[inline(always)]
198 pub fn wrapmod(&mut self) -> WRAPMOD_W<10> {
199 WRAPMOD_W::new(self)
200 }
201 #[doc = "Bit 9 - WAITPOL"]
202 #[inline(always)]
203 pub fn waitpol(&mut self) -> WAITPOL_W<9> {
204 WAITPOL_W::new(self)
205 }
206 #[doc = "Bit 8 - BURSTEN"]
207 #[inline(always)]
208 pub fn bursten(&mut self) -> BURSTEN_W<8> {
209 BURSTEN_W::new(self)
210 }
211 #[doc = "Bit 6 - FACCEN"]
212 #[inline(always)]
213 pub fn faccen(&mut self) -> FACCEN_W<6> {
214 FACCEN_W::new(self)
215 }
216 #[doc = "Bits 4:5 - MWID"]
217 #[inline(always)]
218 pub fn mwid(&mut self) -> MWID_W<4> {
219 MWID_W::new(self)
220 }
221 #[doc = "Bits 2:3 - MTYP"]
222 #[inline(always)]
223 pub fn mtyp(&mut self) -> MTYP_W<2> {
224 MTYP_W::new(self)
225 }
226 #[doc = "Bit 1 - MUXEN"]
227 #[inline(always)]
228 pub fn muxen(&mut self) -> MUXEN_W<1> {
229 MUXEN_W::new(self)
230 }
231 #[doc = "Bit 0 - MBKEN"]
232 #[inline(always)]
233 pub fn mbken(&mut self) -> MBKEN_W<0> {
234 MBKEN_W::new(self)
235 }
236 #[doc = "Writes raw bits to the register."]
237 #[inline(always)]
238 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
239 self.0.bits(bits);
240 self
241 }
242}
243#[doc = "SRAM/NOR-Flash chip-select control register 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [bcr3](index.html) module"]
244pub struct BCR3_SPEC;
245impl crate::RegisterSpec for BCR3_SPEC {
246 type Ux = u32;
247}
248#[doc = "`read()` method returns [bcr3::R](R) reader structure"]
249impl crate::Readable for BCR3_SPEC {
250 type Reader = R;
251}
252#[doc = "`write(|w| ..)` method takes [bcr3::W](W) writer structure"]
253impl crate::Writable for BCR3_SPEC {
254 type Writer = W;
255}
256#[doc = "`reset()` method sets BCR3 to value 0x30d0"]
257impl crate::Resettable for BCR3_SPEC {
258 #[inline(always)]
259 fn reset_value() -> Self::Ux {
260 0x30d0
261 }
262}