stm32f4_staging/stm32f469/dsi/
wier.rs1pub type R = crate::R<WIERrs>;
3pub type W = crate::W<WIERrs>;
5#[cfg_attr(feature = "defmt", derive(defmt::Format))]
9#[derive(Clone, Copy, Debug, PartialEq, Eq)]
10pub enum TEIE {
11 B0x0 = 0,
13 B0x1 = 1,
15}
16impl From<TEIE> for bool {
17 #[inline(always)]
18 fn from(variant: TEIE) -> Self {
19 variant as u8 != 0
20 }
21}
22pub type TEIE_R = crate::BitReader<TEIE>;
24impl TEIE_R {
25 #[inline(always)]
27 pub const fn variant(&self) -> TEIE {
28 match self.bits {
29 false => TEIE::B0x0,
30 true => TEIE::B0x1,
31 }
32 }
33 #[inline(always)]
35 pub fn is_b_0x0(&self) -> bool {
36 *self == TEIE::B0x0
37 }
38 #[inline(always)]
40 pub fn is_b_0x1(&self) -> bool {
41 *self == TEIE::B0x1
42 }
43}
44pub type TEIE_W<'a, REG> = crate::BitWriter<'a, REG, TEIE>;
46impl<'a, REG> TEIE_W<'a, REG>
47where
48 REG: crate::Writable + crate::RegisterSpec,
49{
50 #[inline(always)]
52 pub fn b_0x0(self) -> &'a mut crate::W<REG> {
53 self.variant(TEIE::B0x0)
54 }
55 #[inline(always)]
57 pub fn b_0x1(self) -> &'a mut crate::W<REG> {
58 self.variant(TEIE::B0x1)
59 }
60}
61#[cfg_attr(feature = "defmt", derive(defmt::Format))]
65#[derive(Clone, Copy, Debug, PartialEq, Eq)]
66pub enum ERIE {
67 B0x0 = 0,
69 B0x1 = 1,
71}
72impl From<ERIE> for bool {
73 #[inline(always)]
74 fn from(variant: ERIE) -> Self {
75 variant as u8 != 0
76 }
77}
78pub type ERIE_R = crate::BitReader<ERIE>;
80impl ERIE_R {
81 #[inline(always)]
83 pub const fn variant(&self) -> ERIE {
84 match self.bits {
85 false => ERIE::B0x0,
86 true => ERIE::B0x1,
87 }
88 }
89 #[inline(always)]
91 pub fn is_b_0x0(&self) -> bool {
92 *self == ERIE::B0x0
93 }
94 #[inline(always)]
96 pub fn is_b_0x1(&self) -> bool {
97 *self == ERIE::B0x1
98 }
99}
100pub type ERIE_W<'a, REG> = crate::BitWriter<'a, REG, ERIE>;
102impl<'a, REG> ERIE_W<'a, REG>
103where
104 REG: crate::Writable + crate::RegisterSpec,
105{
106 #[inline(always)]
108 pub fn b_0x0(self) -> &'a mut crate::W<REG> {
109 self.variant(ERIE::B0x0)
110 }
111 #[inline(always)]
113 pub fn b_0x1(self) -> &'a mut crate::W<REG> {
114 self.variant(ERIE::B0x1)
115 }
116}
117#[cfg_attr(feature = "defmt", derive(defmt::Format))]
121#[derive(Clone, Copy, Debug, PartialEq, Eq)]
122pub enum PLLLIE {
123 B0x0 = 0,
125 B0x1 = 1,
127}
128impl From<PLLLIE> for bool {
129 #[inline(always)]
130 fn from(variant: PLLLIE) -> Self {
131 variant as u8 != 0
132 }
133}
134pub type PLLLIE_R = crate::BitReader<PLLLIE>;
136impl PLLLIE_R {
137 #[inline(always)]
139 pub const fn variant(&self) -> PLLLIE {
140 match self.bits {
141 false => PLLLIE::B0x0,
142 true => PLLLIE::B0x1,
143 }
144 }
145 #[inline(always)]
147 pub fn is_b_0x0(&self) -> bool {
148 *self == PLLLIE::B0x0
149 }
150 #[inline(always)]
152 pub fn is_b_0x1(&self) -> bool {
153 *self == PLLLIE::B0x1
154 }
155}
156pub type PLLLIE_W<'a, REG> = crate::BitWriter<'a, REG, PLLLIE>;
158impl<'a, REG> PLLLIE_W<'a, REG>
159where
160 REG: crate::Writable + crate::RegisterSpec,
161{
162 #[inline(always)]
164 pub fn b_0x0(self) -> &'a mut crate::W<REG> {
165 self.variant(PLLLIE::B0x0)
166 }
167 #[inline(always)]
169 pub fn b_0x1(self) -> &'a mut crate::W<REG> {
170 self.variant(PLLLIE::B0x1)
171 }
172}
173#[cfg_attr(feature = "defmt", derive(defmt::Format))]
177#[derive(Clone, Copy, Debug, PartialEq, Eq)]
178pub enum PLLUIE {
179 B0x0 = 0,
181 B0x1 = 1,
183}
184impl From<PLLUIE> for bool {
185 #[inline(always)]
186 fn from(variant: PLLUIE) -> Self {
187 variant as u8 != 0
188 }
189}
190pub type PLLUIE_R = crate::BitReader<PLLUIE>;
192impl PLLUIE_R {
193 #[inline(always)]
195 pub const fn variant(&self) -> PLLUIE {
196 match self.bits {
197 false => PLLUIE::B0x0,
198 true => PLLUIE::B0x1,
199 }
200 }
201 #[inline(always)]
203 pub fn is_b_0x0(&self) -> bool {
204 *self == PLLUIE::B0x0
205 }
206 #[inline(always)]
208 pub fn is_b_0x1(&self) -> bool {
209 *self == PLLUIE::B0x1
210 }
211}
212pub type PLLUIE_W<'a, REG> = crate::BitWriter<'a, REG, PLLUIE>;
214impl<'a, REG> PLLUIE_W<'a, REG>
215where
216 REG: crate::Writable + crate::RegisterSpec,
217{
218 #[inline(always)]
220 pub fn b_0x0(self) -> &'a mut crate::W<REG> {
221 self.variant(PLLUIE::B0x0)
222 }
223 #[inline(always)]
225 pub fn b_0x1(self) -> &'a mut crate::W<REG> {
226 self.variant(PLLUIE::B0x1)
227 }
228}
229#[cfg_attr(feature = "defmt", derive(defmt::Format))]
233#[derive(Clone, Copy, Debug, PartialEq, Eq)]
234pub enum RRIE {
235 B0x0 = 0,
237 B0x1 = 1,
239}
240impl From<RRIE> for bool {
241 #[inline(always)]
242 fn from(variant: RRIE) -> Self {
243 variant as u8 != 0
244 }
245}
246pub type RRIE_R = crate::BitReader<RRIE>;
248impl RRIE_R {
249 #[inline(always)]
251 pub const fn variant(&self) -> RRIE {
252 match self.bits {
253 false => RRIE::B0x0,
254 true => RRIE::B0x1,
255 }
256 }
257 #[inline(always)]
259 pub fn is_b_0x0(&self) -> bool {
260 *self == RRIE::B0x0
261 }
262 #[inline(always)]
264 pub fn is_b_0x1(&self) -> bool {
265 *self == RRIE::B0x1
266 }
267}
268pub type RRIE_W<'a, REG> = crate::BitWriter<'a, REG, RRIE>;
270impl<'a, REG> RRIE_W<'a, REG>
271where
272 REG: crate::Writable + crate::RegisterSpec,
273{
274 #[inline(always)]
276 pub fn b_0x0(self) -> &'a mut crate::W<REG> {
277 self.variant(RRIE::B0x0)
278 }
279 #[inline(always)]
281 pub fn b_0x1(self) -> &'a mut crate::W<REG> {
282 self.variant(RRIE::B0x1)
283 }
284}
285impl R {
286 #[inline(always)]
288 pub fn teie(&self) -> TEIE_R {
289 TEIE_R::new((self.bits & 1) != 0)
290 }
291 #[inline(always)]
293 pub fn erie(&self) -> ERIE_R {
294 ERIE_R::new(((self.bits >> 1) & 1) != 0)
295 }
296 #[inline(always)]
298 pub fn plllie(&self) -> PLLLIE_R {
299 PLLLIE_R::new(((self.bits >> 9) & 1) != 0)
300 }
301 #[inline(always)]
303 pub fn plluie(&self) -> PLLUIE_R {
304 PLLUIE_R::new(((self.bits >> 10) & 1) != 0)
305 }
306 #[inline(always)]
308 pub fn rrie(&self) -> RRIE_R {
309 RRIE_R::new(((self.bits >> 13) & 1) != 0)
310 }
311}
312impl core::fmt::Debug for R {
313 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
314 f.debug_struct("WIER")
315 .field("teie", &self.teie())
316 .field("erie", &self.erie())
317 .field("plllie", &self.plllie())
318 .field("plluie", &self.plluie())
319 .field("rrie", &self.rrie())
320 .finish()
321 }
322}
323impl W {
324 #[inline(always)]
326 pub fn teie(&mut self) -> TEIE_W<WIERrs> {
327 TEIE_W::new(self, 0)
328 }
329 #[inline(always)]
331 pub fn erie(&mut self) -> ERIE_W<WIERrs> {
332 ERIE_W::new(self, 1)
333 }
334 #[inline(always)]
336 pub fn plllie(&mut self) -> PLLLIE_W<WIERrs> {
337 PLLLIE_W::new(self, 9)
338 }
339 #[inline(always)]
341 pub fn plluie(&mut self) -> PLLUIE_W<WIERrs> {
342 PLLUIE_W::new(self, 10)
343 }
344 #[inline(always)]
346 pub fn rrie(&mut self) -> RRIE_W<WIERrs> {
347 RRIE_W::new(self, 13)
348 }
349}
350pub struct WIERrs;
356impl crate::RegisterSpec for WIERrs {
357 type Ux = u32;
358}
359impl crate::Readable for WIERrs {}
361impl crate::Writable for WIERrs {
363 type Safety = crate::Unsafe;
364}
365impl crate::Resettable for WIERrs {}