stm32f1_staging/stm32f103/dma1/
ifcr.rs1pub type W = crate::W<IFCRrs>;
3#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8pub enum CGIF1 {
9 Clear = 1,
11}
12impl From<CGIF1> for bool {
13 #[inline(always)]
14 fn from(variant: CGIF1) -> Self {
15 variant as u8 != 0
16 }
17}
18pub type CGIF_W<'a, REG> = crate::BitWriter<'a, REG, CGIF1>;
20impl<'a, REG> CGIF_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(CGIF1::Clear)
28 }
29}
30#[cfg_attr(feature = "defmt", derive(defmt::Format))]
34#[derive(Clone, Copy, Debug, PartialEq, Eq)]
35pub enum CTCIF1 {
36 Clear = 1,
38}
39impl From<CTCIF1> for bool {
40 #[inline(always)]
41 fn from(variant: CTCIF1) -> Self {
42 variant as u8 != 0
43 }
44}
45pub type CTCIF_W<'a, REG> = crate::BitWriter<'a, REG, CTCIF1>;
47impl<'a, REG> CTCIF_W<'a, REG>
48where
49 REG: crate::Writable + crate::RegisterSpec,
50{
51 #[inline(always)]
53 pub fn clear(self) -> &'a mut crate::W<REG> {
54 self.variant(CTCIF1::Clear)
55 }
56}
57#[cfg_attr(feature = "defmt", derive(defmt::Format))]
61#[derive(Clone, Copy, Debug, PartialEq, Eq)]
62pub enum CHTIF1 {
63 Clear = 1,
65}
66impl From<CHTIF1> for bool {
67 #[inline(always)]
68 fn from(variant: CHTIF1) -> Self {
69 variant as u8 != 0
70 }
71}
72pub type CHTIF_W<'a, REG> = crate::BitWriter<'a, REG, CHTIF1>;
74impl<'a, REG> CHTIF_W<'a, REG>
75where
76 REG: crate::Writable + crate::RegisterSpec,
77{
78 #[inline(always)]
80 pub fn clear(self) -> &'a mut crate::W<REG> {
81 self.variant(CHTIF1::Clear)
82 }
83}
84#[cfg_attr(feature = "defmt", derive(defmt::Format))]
88#[derive(Clone, Copy, Debug, PartialEq, Eq)]
89pub enum CTEIF1 {
90 Clear = 1,
92}
93impl From<CTEIF1> for bool {
94 #[inline(always)]
95 fn from(variant: CTEIF1) -> Self {
96 variant as u8 != 0
97 }
98}
99pub type CTEIF_W<'a, REG> = crate::BitWriter<'a, REG, CTEIF1>;
101impl<'a, REG> CTEIF_W<'a, REG>
102where
103 REG: crate::Writable + crate::RegisterSpec,
104{
105 #[inline(always)]
107 pub fn clear(self) -> &'a mut crate::W<REG> {
108 self.variant(CTEIF1::Clear)
109 }
110}
111impl core::fmt::Debug for crate::generic::Reg<IFCRrs> {
112 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
113 write!(f, "(not readable)")
114 }
115}
116impl W {
117 #[inline(always)]
121 pub fn cgif(&mut self, n: u8) -> CGIF_W<IFCRrs> {
122 #[allow(clippy::no_effect)] [(); 7][n as usize];
123 CGIF_W::new(self, n * 4)
124 }
125 #[inline(always)]
127 pub fn cgif1(&mut self) -> CGIF_W<IFCRrs> {
128 CGIF_W::new(self, 0)
129 }
130 #[inline(always)]
132 pub fn cgif2(&mut self) -> CGIF_W<IFCRrs> {
133 CGIF_W::new(self, 4)
134 }
135 #[inline(always)]
137 pub fn cgif3(&mut self) -> CGIF_W<IFCRrs> {
138 CGIF_W::new(self, 8)
139 }
140 #[inline(always)]
142 pub fn cgif4(&mut self) -> CGIF_W<IFCRrs> {
143 CGIF_W::new(self, 12)
144 }
145 #[inline(always)]
147 pub fn cgif5(&mut self) -> CGIF_W<IFCRrs> {
148 CGIF_W::new(self, 16)
149 }
150 #[inline(always)]
152 pub fn cgif6(&mut self) -> CGIF_W<IFCRrs> {
153 CGIF_W::new(self, 20)
154 }
155 #[inline(always)]
157 pub fn cgif7(&mut self) -> CGIF_W<IFCRrs> {
158 CGIF_W::new(self, 24)
159 }
160 #[inline(always)]
164 pub fn ctcif(&mut self, n: u8) -> CTCIF_W<IFCRrs> {
165 #[allow(clippy::no_effect)] [(); 7][n as usize];
166 CTCIF_W::new(self, n * 4 + 1)
167 }
168 #[inline(always)]
170 pub fn ctcif1(&mut self) -> CTCIF_W<IFCRrs> {
171 CTCIF_W::new(self, 1)
172 }
173 #[inline(always)]
175 pub fn ctcif2(&mut self) -> CTCIF_W<IFCRrs> {
176 CTCIF_W::new(self, 5)
177 }
178 #[inline(always)]
180 pub fn ctcif3(&mut self) -> CTCIF_W<IFCRrs> {
181 CTCIF_W::new(self, 9)
182 }
183 #[inline(always)]
185 pub fn ctcif4(&mut self) -> CTCIF_W<IFCRrs> {
186 CTCIF_W::new(self, 13)
187 }
188 #[inline(always)]
190 pub fn ctcif5(&mut self) -> CTCIF_W<IFCRrs> {
191 CTCIF_W::new(self, 17)
192 }
193 #[inline(always)]
195 pub fn ctcif6(&mut self) -> CTCIF_W<IFCRrs> {
196 CTCIF_W::new(self, 21)
197 }
198 #[inline(always)]
200 pub fn ctcif7(&mut self) -> CTCIF_W<IFCRrs> {
201 CTCIF_W::new(self, 25)
202 }
203 #[inline(always)]
207 pub fn chtif(&mut self, n: u8) -> CHTIF_W<IFCRrs> {
208 #[allow(clippy::no_effect)] [(); 7][n as usize];
209 CHTIF_W::new(self, n * 4 + 2)
210 }
211 #[inline(always)]
213 pub fn chtif1(&mut self) -> CHTIF_W<IFCRrs> {
214 CHTIF_W::new(self, 2)
215 }
216 #[inline(always)]
218 pub fn chtif2(&mut self) -> CHTIF_W<IFCRrs> {
219 CHTIF_W::new(self, 6)
220 }
221 #[inline(always)]
223 pub fn chtif3(&mut self) -> CHTIF_W<IFCRrs> {
224 CHTIF_W::new(self, 10)
225 }
226 #[inline(always)]
228 pub fn chtif4(&mut self) -> CHTIF_W<IFCRrs> {
229 CHTIF_W::new(self, 14)
230 }
231 #[inline(always)]
233 pub fn chtif5(&mut self) -> CHTIF_W<IFCRrs> {
234 CHTIF_W::new(self, 18)
235 }
236 #[inline(always)]
238 pub fn chtif6(&mut self) -> CHTIF_W<IFCRrs> {
239 CHTIF_W::new(self, 22)
240 }
241 #[inline(always)]
243 pub fn chtif7(&mut self) -> CHTIF_W<IFCRrs> {
244 CHTIF_W::new(self, 26)
245 }
246 #[inline(always)]
250 pub fn cteif(&mut self, n: u8) -> CTEIF_W<IFCRrs> {
251 #[allow(clippy::no_effect)] [(); 7][n as usize];
252 CTEIF_W::new(self, n * 4 + 3)
253 }
254 #[inline(always)]
256 pub fn cteif1(&mut self) -> CTEIF_W<IFCRrs> {
257 CTEIF_W::new(self, 3)
258 }
259 #[inline(always)]
261 pub fn cteif2(&mut self) -> CTEIF_W<IFCRrs> {
262 CTEIF_W::new(self, 7)
263 }
264 #[inline(always)]
266 pub fn cteif3(&mut self) -> CTEIF_W<IFCRrs> {
267 CTEIF_W::new(self, 11)
268 }
269 #[inline(always)]
271 pub fn cteif4(&mut self) -> CTEIF_W<IFCRrs> {
272 CTEIF_W::new(self, 15)
273 }
274 #[inline(always)]
276 pub fn cteif5(&mut self) -> CTEIF_W<IFCRrs> {
277 CTEIF_W::new(self, 19)
278 }
279 #[inline(always)]
281 pub fn cteif6(&mut self) -> CTEIF_W<IFCRrs> {
282 CTEIF_W::new(self, 23)
283 }
284 #[inline(always)]
286 pub fn cteif7(&mut self) -> CTEIF_W<IFCRrs> {
287 CTEIF_W::new(self, 27)
288 }
289}
290pub struct IFCRrs;
296impl crate::RegisterSpec for IFCRrs {
297 type Ux = u32;
298}
299impl crate::Writable for IFCRrs {
301 type Safety = crate::Unsafe;
302}
303impl crate::Resettable for IFCRrs {}