stm32g4_staging/stm32g484/dmamux/
cfr.rs1pub type W = crate::W<CFRrs>;
3#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8pub enum CSOF0W {
9 Clear = 1,
11}
12impl From<CSOF0W> for bool {
13 #[inline(always)]
14 fn from(variant: CSOF0W) -> Self {
15 variant as u8 != 0
16 }
17}
18pub type CSOF_W<'a, REG> = crate::BitWriter1C<'a, REG, CSOF0W>;
20impl<'a, REG> CSOF_W<'a, REG>
21where
22 REG: crate::Writable + crate::RegisterSpec,
23{
24 #[inline(always)]
26 pub fn clear(self) -> &'a mut crate::W<REG> {
27 self.variant(CSOF0W::Clear)
28 }
29}
30impl core::fmt::Debug for crate::generic::Reg<CFRrs> {
31 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
32 write!(f, "(not readable)")
33 }
34}
35impl W {
36 #[inline(always)]
40 pub fn csof(&mut self, n: u8) -> CSOF_W<CFRrs> {
41 #[allow(clippy::no_effect)] [(); 16][n as usize];
42 CSOF_W::new(self, n)
43 }
44 #[inline(always)]
46 pub fn csof0(&mut self) -> CSOF_W<CFRrs> {
47 CSOF_W::new(self, 0)
48 }
49 #[inline(always)]
51 pub fn csof1(&mut self) -> CSOF_W<CFRrs> {
52 CSOF_W::new(self, 1)
53 }
54 #[inline(always)]
56 pub fn csof2(&mut self) -> CSOF_W<CFRrs> {
57 CSOF_W::new(self, 2)
58 }
59 #[inline(always)]
61 pub fn csof3(&mut self) -> CSOF_W<CFRrs> {
62 CSOF_W::new(self, 3)
63 }
64 #[inline(always)]
66 pub fn csof4(&mut self) -> CSOF_W<CFRrs> {
67 CSOF_W::new(self, 4)
68 }
69 #[inline(always)]
71 pub fn csof5(&mut self) -> CSOF_W<CFRrs> {
72 CSOF_W::new(self, 5)
73 }
74 #[inline(always)]
76 pub fn csof6(&mut self) -> CSOF_W<CFRrs> {
77 CSOF_W::new(self, 6)
78 }
79 #[inline(always)]
81 pub fn csof7(&mut self) -> CSOF_W<CFRrs> {
82 CSOF_W::new(self, 7)
83 }
84 #[inline(always)]
86 pub fn csof8(&mut self) -> CSOF_W<CFRrs> {
87 CSOF_W::new(self, 8)
88 }
89 #[inline(always)]
91 pub fn csof9(&mut self) -> CSOF_W<CFRrs> {
92 CSOF_W::new(self, 9)
93 }
94 #[inline(always)]
96 pub fn csof10(&mut self) -> CSOF_W<CFRrs> {
97 CSOF_W::new(self, 10)
98 }
99 #[inline(always)]
101 pub fn csof11(&mut self) -> CSOF_W<CFRrs> {
102 CSOF_W::new(self, 11)
103 }
104 #[inline(always)]
106 pub fn csof12(&mut self) -> CSOF_W<CFRrs> {
107 CSOF_W::new(self, 12)
108 }
109 #[inline(always)]
111 pub fn csof13(&mut self) -> CSOF_W<CFRrs> {
112 CSOF_W::new(self, 13)
113 }
114 #[inline(always)]
116 pub fn csof14(&mut self) -> CSOF_W<CFRrs> {
117 CSOF_W::new(self, 14)
118 }
119 #[inline(always)]
121 pub fn csof15(&mut self) -> CSOF_W<CFRrs> {
122 CSOF_W::new(self, 15)
123 }
124}
125pub struct CFRrs;
131impl crate::RegisterSpec for CFRrs {
132 type Ux = u32;
133}
134impl crate::Writable for CFRrs {
136 type Safety = crate::Unsafe;
137 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0xffff;
138}
139impl crate::Resettable for CFRrs {}