stm32f4_staging/stm32f469/dsi/
wcfgr.rs1pub type R = crate::R<WCFGRrs>;
3pub type W = crate::W<WCFGRrs>;
5#[cfg_attr(feature = "defmt", derive(defmt::Format))]
9#[derive(Clone, Copy, Debug, PartialEq, Eq)]
10pub enum DSIM {
11 B0x0 = 0,
13 B0x1 = 1,
15}
16impl From<DSIM> for bool {
17 #[inline(always)]
18 fn from(variant: DSIM) -> Self {
19 variant as u8 != 0
20 }
21}
22pub type DSIM_R = crate::BitReader<DSIM>;
24impl DSIM_R {
25 #[inline(always)]
27 pub const fn variant(&self) -> DSIM {
28 match self.bits {
29 false => DSIM::B0x0,
30 true => DSIM::B0x1,
31 }
32 }
33 #[inline(always)]
35 pub fn is_b_0x0(&self) -> bool {
36 *self == DSIM::B0x0
37 }
38 #[inline(always)]
40 pub fn is_b_0x1(&self) -> bool {
41 *self == DSIM::B0x1
42 }
43}
44pub type DSIM_W<'a, REG> = crate::BitWriter<'a, REG, DSIM>;
46impl<'a, REG> DSIM_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(DSIM::B0x0)
54 }
55 #[inline(always)]
57 pub fn b_0x1(self) -> &'a mut crate::W<REG> {
58 self.variant(DSIM::B0x1)
59 }
60}
61#[cfg_attr(feature = "defmt", derive(defmt::Format))]
65#[derive(Clone, Copy, Debug, PartialEq, Eq)]
66#[repr(u8)]
67pub enum COLMUX {
68 B0x0 = 0,
70 B0x1 = 1,
72 B0x2 = 2,
74 B0x3 = 3,
76 B0x4 = 4,
78 B0x5 = 5,
80}
81impl From<COLMUX> for u8 {
82 #[inline(always)]
83 fn from(variant: COLMUX) -> Self {
84 variant as _
85 }
86}
87impl crate::FieldSpec for COLMUX {
88 type Ux = u8;
89}
90impl crate::IsEnum for COLMUX {}
91pub type COLMUX_R = crate::FieldReader<COLMUX>;
93impl COLMUX_R {
94 #[inline(always)]
96 pub const fn variant(&self) -> Option<COLMUX> {
97 match self.bits {
98 0 => Some(COLMUX::B0x0),
99 1 => Some(COLMUX::B0x1),
100 2 => Some(COLMUX::B0x2),
101 3 => Some(COLMUX::B0x3),
102 4 => Some(COLMUX::B0x4),
103 5 => Some(COLMUX::B0x5),
104 _ => None,
105 }
106 }
107 #[inline(always)]
109 pub fn is_b_0x0(&self) -> bool {
110 *self == COLMUX::B0x0
111 }
112 #[inline(always)]
114 pub fn is_b_0x1(&self) -> bool {
115 *self == COLMUX::B0x1
116 }
117 #[inline(always)]
119 pub fn is_b_0x2(&self) -> bool {
120 *self == COLMUX::B0x2
121 }
122 #[inline(always)]
124 pub fn is_b_0x3(&self) -> bool {
125 *self == COLMUX::B0x3
126 }
127 #[inline(always)]
129 pub fn is_b_0x4(&self) -> bool {
130 *self == COLMUX::B0x4
131 }
132 #[inline(always)]
134 pub fn is_b_0x5(&self) -> bool {
135 *self == COLMUX::B0x5
136 }
137}
138pub type COLMUX_W<'a, REG> = crate::FieldWriter<'a, REG, 3, COLMUX>;
140impl<'a, REG> COLMUX_W<'a, REG>
141where
142 REG: crate::Writable + crate::RegisterSpec,
143 REG::Ux: From<u8>,
144{
145 #[inline(always)]
147 pub fn b_0x0(self) -> &'a mut crate::W<REG> {
148 self.variant(COLMUX::B0x0)
149 }
150 #[inline(always)]
152 pub fn b_0x1(self) -> &'a mut crate::W<REG> {
153 self.variant(COLMUX::B0x1)
154 }
155 #[inline(always)]
157 pub fn b_0x2(self) -> &'a mut crate::W<REG> {
158 self.variant(COLMUX::B0x2)
159 }
160 #[inline(always)]
162 pub fn b_0x3(self) -> &'a mut crate::W<REG> {
163 self.variant(COLMUX::B0x3)
164 }
165 #[inline(always)]
167 pub fn b_0x4(self) -> &'a mut crate::W<REG> {
168 self.variant(COLMUX::B0x4)
169 }
170 #[inline(always)]
172 pub fn b_0x5(self) -> &'a mut crate::W<REG> {
173 self.variant(COLMUX::B0x5)
174 }
175}
176#[cfg_attr(feature = "defmt", derive(defmt::Format))]
180#[derive(Clone, Copy, Debug, PartialEq, Eq)]
181pub enum TESRC {
182 B0x0 = 0,
184 B0x1 = 1,
186}
187impl From<TESRC> for bool {
188 #[inline(always)]
189 fn from(variant: TESRC) -> Self {
190 variant as u8 != 0
191 }
192}
193pub type TESRC_R = crate::BitReader<TESRC>;
195impl TESRC_R {
196 #[inline(always)]
198 pub const fn variant(&self) -> TESRC {
199 match self.bits {
200 false => TESRC::B0x0,
201 true => TESRC::B0x1,
202 }
203 }
204 #[inline(always)]
206 pub fn is_b_0x0(&self) -> bool {
207 *self == TESRC::B0x0
208 }
209 #[inline(always)]
211 pub fn is_b_0x1(&self) -> bool {
212 *self == TESRC::B0x1
213 }
214}
215pub type TESRC_W<'a, REG> = crate::BitWriter<'a, REG, TESRC>;
217impl<'a, REG> TESRC_W<'a, REG>
218where
219 REG: crate::Writable + crate::RegisterSpec,
220{
221 #[inline(always)]
223 pub fn b_0x0(self) -> &'a mut crate::W<REG> {
224 self.variant(TESRC::B0x0)
225 }
226 #[inline(always)]
228 pub fn b_0x1(self) -> &'a mut crate::W<REG> {
229 self.variant(TESRC::B0x1)
230 }
231}
232#[cfg_attr(feature = "defmt", derive(defmt::Format))]
236#[derive(Clone, Copy, Debug, PartialEq, Eq)]
237pub enum TEPOL {
238 B0x0 = 0,
240 B0x1 = 1,
242}
243impl From<TEPOL> for bool {
244 #[inline(always)]
245 fn from(variant: TEPOL) -> Self {
246 variant as u8 != 0
247 }
248}
249pub type TEPOL_R = crate::BitReader<TEPOL>;
251impl TEPOL_R {
252 #[inline(always)]
254 pub const fn variant(&self) -> TEPOL {
255 match self.bits {
256 false => TEPOL::B0x0,
257 true => TEPOL::B0x1,
258 }
259 }
260 #[inline(always)]
262 pub fn is_b_0x0(&self) -> bool {
263 *self == TEPOL::B0x0
264 }
265 #[inline(always)]
267 pub fn is_b_0x1(&self) -> bool {
268 *self == TEPOL::B0x1
269 }
270}
271pub type TEPOL_W<'a, REG> = crate::BitWriter<'a, REG, TEPOL>;
273impl<'a, REG> TEPOL_W<'a, REG>
274where
275 REG: crate::Writable + crate::RegisterSpec,
276{
277 #[inline(always)]
279 pub fn b_0x0(self) -> &'a mut crate::W<REG> {
280 self.variant(TEPOL::B0x0)
281 }
282 #[inline(always)]
284 pub fn b_0x1(self) -> &'a mut crate::W<REG> {
285 self.variant(TEPOL::B0x1)
286 }
287}
288#[cfg_attr(feature = "defmt", derive(defmt::Format))]
292#[derive(Clone, Copy, Debug, PartialEq, Eq)]
293pub enum AR {
294 B0x0 = 0,
296 B0x1 = 1,
298}
299impl From<AR> for bool {
300 #[inline(always)]
301 fn from(variant: AR) -> Self {
302 variant as u8 != 0
303 }
304}
305pub type AR_R = crate::BitReader<AR>;
307impl AR_R {
308 #[inline(always)]
310 pub const fn variant(&self) -> AR {
311 match self.bits {
312 false => AR::B0x0,
313 true => AR::B0x1,
314 }
315 }
316 #[inline(always)]
318 pub fn is_b_0x0(&self) -> bool {
319 *self == AR::B0x0
320 }
321 #[inline(always)]
323 pub fn is_b_0x1(&self) -> bool {
324 *self == AR::B0x1
325 }
326}
327pub type AR_W<'a, REG> = crate::BitWriter<'a, REG, AR>;
329impl<'a, REG> AR_W<'a, REG>
330where
331 REG: crate::Writable + crate::RegisterSpec,
332{
333 #[inline(always)]
335 pub fn b_0x0(self) -> &'a mut crate::W<REG> {
336 self.variant(AR::B0x0)
337 }
338 #[inline(always)]
340 pub fn b_0x1(self) -> &'a mut crate::W<REG> {
341 self.variant(AR::B0x1)
342 }
343}
344#[cfg_attr(feature = "defmt", derive(defmt::Format))]
348#[derive(Clone, Copy, Debug, PartialEq, Eq)]
349pub enum VSPOL {
350 B0x0 = 0,
352 B0x1 = 1,
354}
355impl From<VSPOL> for bool {
356 #[inline(always)]
357 fn from(variant: VSPOL) -> Self {
358 variant as u8 != 0
359 }
360}
361pub type VSPOL_R = crate::BitReader<VSPOL>;
363impl VSPOL_R {
364 #[inline(always)]
366 pub const fn variant(&self) -> VSPOL {
367 match self.bits {
368 false => VSPOL::B0x0,
369 true => VSPOL::B0x1,
370 }
371 }
372 #[inline(always)]
374 pub fn is_b_0x0(&self) -> bool {
375 *self == VSPOL::B0x0
376 }
377 #[inline(always)]
379 pub fn is_b_0x1(&self) -> bool {
380 *self == VSPOL::B0x1
381 }
382}
383pub type VSPOL_W<'a, REG> = crate::BitWriter<'a, REG, VSPOL>;
385impl<'a, REG> VSPOL_W<'a, REG>
386where
387 REG: crate::Writable + crate::RegisterSpec,
388{
389 #[inline(always)]
391 pub fn b_0x0(self) -> &'a mut crate::W<REG> {
392 self.variant(VSPOL::B0x0)
393 }
394 #[inline(always)]
396 pub fn b_0x1(self) -> &'a mut crate::W<REG> {
397 self.variant(VSPOL::B0x1)
398 }
399}
400impl R {
401 #[inline(always)]
403 pub fn dsim(&self) -> DSIM_R {
404 DSIM_R::new((self.bits & 1) != 0)
405 }
406 #[inline(always)]
408 pub fn colmux(&self) -> COLMUX_R {
409 COLMUX_R::new(((self.bits >> 1) & 7) as u8)
410 }
411 #[inline(always)]
413 pub fn tesrc(&self) -> TESRC_R {
414 TESRC_R::new(((self.bits >> 4) & 1) != 0)
415 }
416 #[inline(always)]
418 pub fn tepol(&self) -> TEPOL_R {
419 TEPOL_R::new(((self.bits >> 5) & 1) != 0)
420 }
421 #[inline(always)]
423 pub fn ar(&self) -> AR_R {
424 AR_R::new(((self.bits >> 6) & 1) != 0)
425 }
426 #[inline(always)]
428 pub fn vspol(&self) -> VSPOL_R {
429 VSPOL_R::new(((self.bits >> 7) & 1) != 0)
430 }
431}
432impl core::fmt::Debug for R {
433 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
434 f.debug_struct("WCFGR")
435 .field("dsim", &self.dsim())
436 .field("colmux", &self.colmux())
437 .field("tesrc", &self.tesrc())
438 .field("tepol", &self.tepol())
439 .field("ar", &self.ar())
440 .field("vspol", &self.vspol())
441 .finish()
442 }
443}
444impl W {
445 #[inline(always)]
447 pub fn dsim(&mut self) -> DSIM_W<WCFGRrs> {
448 DSIM_W::new(self, 0)
449 }
450 #[inline(always)]
452 pub fn colmux(&mut self) -> COLMUX_W<WCFGRrs> {
453 COLMUX_W::new(self, 1)
454 }
455 #[inline(always)]
457 pub fn tesrc(&mut self) -> TESRC_W<WCFGRrs> {
458 TESRC_W::new(self, 4)
459 }
460 #[inline(always)]
462 pub fn tepol(&mut self) -> TEPOL_W<WCFGRrs> {
463 TEPOL_W::new(self, 5)
464 }
465 #[inline(always)]
467 pub fn ar(&mut self) -> AR_W<WCFGRrs> {
468 AR_W::new(self, 6)
469 }
470 #[inline(always)]
472 pub fn vspol(&mut self) -> VSPOL_W<WCFGRrs> {
473 VSPOL_W::new(self, 7)
474 }
475}
476pub struct WCFGRrs;
482impl crate::RegisterSpec for WCFGRrs {
483 type Ux = u32;
484}
485impl crate::Readable for WCFGRrs {}
487impl crate::Writable for WCFGRrs {
489 type Safety = crate::Unsafe;
490}
491impl crate::Resettable for WCFGRrs {}