stm32f1_staging/stm32f100/dbgmcu/
cr.rs1pub type R = crate::R<CRrs>;
3pub type W = crate::W<CRrs>;
5pub type DBG_SLEEP_R = crate::BitReader;
7pub type DBG_SLEEP_W<'a, REG> = crate::BitWriter<'a, REG>;
9pub type DBG_STOP_R = crate::BitReader;
11pub type DBG_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
13pub type DBG_STANDBY_R = crate::BitReader;
15pub type DBG_STANDBY_W<'a, REG> = crate::BitWriter<'a, REG>;
17pub type TRACE_IOEN_R = crate::BitReader;
19pub type TRACE_IOEN_W<'a, REG> = crate::BitWriter<'a, REG>;
21pub type TRACE_MODE_R = crate::FieldReader;
23pub type TRACE_MODE_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
25pub type DBG_IWDG_STOP_R = crate::BitReader;
27pub type DBG_IWDG_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
29pub type DBG_WWDG_STOP_R = crate::BitReader;
31pub type DBG_WWDG_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
33pub type DBG_TIM1_STOP_R = crate::BitReader;
35pub type DBG_TIM1_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
37pub type DBG_TIM2_STOP_R = crate::BitReader;
39pub type DBG_TIM2_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
41pub type DBG_TIM3_STOP_R = crate::BitReader;
43pub type DBG_TIM3_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
45pub type DBG_TIM4_STOP_R = crate::BitReader;
47pub type DBG_TIM4_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
49pub type DBG_I2C1_SMBUS_TIMEOUT_R = crate::BitReader;
51pub type DBG_I2C1_SMBUS_TIMEOUT_W<'a, REG> = crate::BitWriter<'a, REG>;
53pub type DBG_I2C2_SMBUS_TIMEOUT_R = crate::BitReader;
55pub type DBG_I2C2_SMBUS_TIMEOUT_W<'a, REG> = crate::BitWriter<'a, REG>;
57pub type DBG_TIM5_STOP_R = crate::BitReader;
59pub type DBG_TIM5_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
61pub type DBG_TIM6_STOP_R = crate::BitReader;
63pub type DBG_TIM6_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
65pub type DBG_TIM7_STOP_R = crate::BitReader;
67pub type DBG_TIM7_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
69pub type DBG_TIM15_STOP_R = crate::BitReader;
71pub type DBG_TIM15_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
73pub type DBG_TIM16_STOP_R = crate::BitReader;
75pub type DBG_TIM16_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
77pub type DBG_TIM17_STOP_R = crate::BitReader;
79pub type DBG_TIM17_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
81pub type DBG_TIM12_STOP_R = crate::BitReader;
83pub type DBG_TIM12_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
85pub type DBG_TIM13_STOP_R = crate::BitReader;
87pub type DBG_TIM13_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
89pub type DBG_TIM14_STOP_R = crate::BitReader;
91pub type DBG_TIM14_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
93impl R {
94 #[inline(always)]
96 pub fn dbg_sleep(&self) -> DBG_SLEEP_R {
97 DBG_SLEEP_R::new((self.bits & 1) != 0)
98 }
99 #[inline(always)]
101 pub fn dbg_stop(&self) -> DBG_STOP_R {
102 DBG_STOP_R::new(((self.bits >> 1) & 1) != 0)
103 }
104 #[inline(always)]
106 pub fn dbg_standby(&self) -> DBG_STANDBY_R {
107 DBG_STANDBY_R::new(((self.bits >> 2) & 1) != 0)
108 }
109 #[inline(always)]
111 pub fn trace_ioen(&self) -> TRACE_IOEN_R {
112 TRACE_IOEN_R::new(((self.bits >> 5) & 1) != 0)
113 }
114 #[inline(always)]
116 pub fn trace_mode(&self) -> TRACE_MODE_R {
117 TRACE_MODE_R::new(((self.bits >> 6) & 3) as u8)
118 }
119 #[inline(always)]
121 pub fn dbg_iwdg_stop(&self) -> DBG_IWDG_STOP_R {
122 DBG_IWDG_STOP_R::new(((self.bits >> 8) & 1) != 0)
123 }
124 #[inline(always)]
126 pub fn dbg_wwdg_stop(&self) -> DBG_WWDG_STOP_R {
127 DBG_WWDG_STOP_R::new(((self.bits >> 9) & 1) != 0)
128 }
129 #[inline(always)]
131 pub fn dbg_tim1_stop(&self) -> DBG_TIM1_STOP_R {
132 DBG_TIM1_STOP_R::new(((self.bits >> 10) & 1) != 0)
133 }
134 #[inline(always)]
136 pub fn dbg_tim2_stop(&self) -> DBG_TIM2_STOP_R {
137 DBG_TIM2_STOP_R::new(((self.bits >> 11) & 1) != 0)
138 }
139 #[inline(always)]
141 pub fn dbg_tim3_stop(&self) -> DBG_TIM3_STOP_R {
142 DBG_TIM3_STOP_R::new(((self.bits >> 12) & 1) != 0)
143 }
144 #[inline(always)]
146 pub fn dbg_tim4_stop(&self) -> DBG_TIM4_STOP_R {
147 DBG_TIM4_STOP_R::new(((self.bits >> 13) & 1) != 0)
148 }
149 #[inline(always)]
151 pub fn dbg_i2c1_smbus_timeout(&self) -> DBG_I2C1_SMBUS_TIMEOUT_R {
152 DBG_I2C1_SMBUS_TIMEOUT_R::new(((self.bits >> 15) & 1) != 0)
153 }
154 #[inline(always)]
156 pub fn dbg_i2c2_smbus_timeout(&self) -> DBG_I2C2_SMBUS_TIMEOUT_R {
157 DBG_I2C2_SMBUS_TIMEOUT_R::new(((self.bits >> 16) & 1) != 0)
158 }
159 #[inline(always)]
161 pub fn dbg_tim5_stop(&self) -> DBG_TIM5_STOP_R {
162 DBG_TIM5_STOP_R::new(((self.bits >> 18) & 1) != 0)
163 }
164 #[inline(always)]
166 pub fn dbg_tim6_stop(&self) -> DBG_TIM6_STOP_R {
167 DBG_TIM6_STOP_R::new(((self.bits >> 19) & 1) != 0)
168 }
169 #[inline(always)]
171 pub fn dbg_tim7_stop(&self) -> DBG_TIM7_STOP_R {
172 DBG_TIM7_STOP_R::new(((self.bits >> 20) & 1) != 0)
173 }
174 #[inline(always)]
176 pub fn dbg_tim15_stop(&self) -> DBG_TIM15_STOP_R {
177 DBG_TIM15_STOP_R::new(((self.bits >> 22) & 1) != 0)
178 }
179 #[inline(always)]
181 pub fn dbg_tim16_stop(&self) -> DBG_TIM16_STOP_R {
182 DBG_TIM16_STOP_R::new(((self.bits >> 23) & 1) != 0)
183 }
184 #[inline(always)]
186 pub fn dbg_tim17_stop(&self) -> DBG_TIM17_STOP_R {
187 DBG_TIM17_STOP_R::new(((self.bits >> 24) & 1) != 0)
188 }
189 #[inline(always)]
191 pub fn dbg_tim12_stop(&self) -> DBG_TIM12_STOP_R {
192 DBG_TIM12_STOP_R::new(((self.bits >> 25) & 1) != 0)
193 }
194 #[inline(always)]
196 pub fn dbg_tim13_stop(&self) -> DBG_TIM13_STOP_R {
197 DBG_TIM13_STOP_R::new(((self.bits >> 26) & 1) != 0)
198 }
199 #[inline(always)]
201 pub fn dbg_tim14_stop(&self) -> DBG_TIM14_STOP_R {
202 DBG_TIM14_STOP_R::new(((self.bits >> 27) & 1) != 0)
203 }
204}
205impl core::fmt::Debug for R {
206 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
207 f.debug_struct("CR")
208 .field("dbg_sleep", &self.dbg_sleep())
209 .field("dbg_stop", &self.dbg_stop())
210 .field("dbg_standby", &self.dbg_standby())
211 .field("trace_ioen", &self.trace_ioen())
212 .field("trace_mode", &self.trace_mode())
213 .field("dbg_iwdg_stop", &self.dbg_iwdg_stop())
214 .field("dbg_wwdg_stop", &self.dbg_wwdg_stop())
215 .field("dbg_tim1_stop", &self.dbg_tim1_stop())
216 .field("dbg_tim2_stop", &self.dbg_tim2_stop())
217 .field("dbg_tim3_stop", &self.dbg_tim3_stop())
218 .field("dbg_tim4_stop", &self.dbg_tim4_stop())
219 .field("dbg_i2c1_smbus_timeout", &self.dbg_i2c1_smbus_timeout())
220 .field("dbg_i2c2_smbus_timeout", &self.dbg_i2c2_smbus_timeout())
221 .field("dbg_tim5_stop", &self.dbg_tim5_stop())
222 .field("dbg_tim6_stop", &self.dbg_tim6_stop())
223 .field("dbg_tim7_stop", &self.dbg_tim7_stop())
224 .field("dbg_tim15_stop", &self.dbg_tim15_stop())
225 .field("dbg_tim16_stop", &self.dbg_tim16_stop())
226 .field("dbg_tim17_stop", &self.dbg_tim17_stop())
227 .field("dbg_tim12_stop", &self.dbg_tim12_stop())
228 .field("dbg_tim13_stop", &self.dbg_tim13_stop())
229 .field("dbg_tim14_stop", &self.dbg_tim14_stop())
230 .finish()
231 }
232}
233impl W {
234 #[inline(always)]
236 pub fn dbg_sleep(&mut self) -> DBG_SLEEP_W<CRrs> {
237 DBG_SLEEP_W::new(self, 0)
238 }
239 #[inline(always)]
241 pub fn dbg_stop(&mut self) -> DBG_STOP_W<CRrs> {
242 DBG_STOP_W::new(self, 1)
243 }
244 #[inline(always)]
246 pub fn dbg_standby(&mut self) -> DBG_STANDBY_W<CRrs> {
247 DBG_STANDBY_W::new(self, 2)
248 }
249 #[inline(always)]
251 pub fn trace_ioen(&mut self) -> TRACE_IOEN_W<CRrs> {
252 TRACE_IOEN_W::new(self, 5)
253 }
254 #[inline(always)]
256 pub fn trace_mode(&mut self) -> TRACE_MODE_W<CRrs> {
257 TRACE_MODE_W::new(self, 6)
258 }
259 #[inline(always)]
261 pub fn dbg_iwdg_stop(&mut self) -> DBG_IWDG_STOP_W<CRrs> {
262 DBG_IWDG_STOP_W::new(self, 8)
263 }
264 #[inline(always)]
266 pub fn dbg_wwdg_stop(&mut self) -> DBG_WWDG_STOP_W<CRrs> {
267 DBG_WWDG_STOP_W::new(self, 9)
268 }
269 #[inline(always)]
271 pub fn dbg_tim1_stop(&mut self) -> DBG_TIM1_STOP_W<CRrs> {
272 DBG_TIM1_STOP_W::new(self, 10)
273 }
274 #[inline(always)]
276 pub fn dbg_tim2_stop(&mut self) -> DBG_TIM2_STOP_W<CRrs> {
277 DBG_TIM2_STOP_W::new(self, 11)
278 }
279 #[inline(always)]
281 pub fn dbg_tim3_stop(&mut self) -> DBG_TIM3_STOP_W<CRrs> {
282 DBG_TIM3_STOP_W::new(self, 12)
283 }
284 #[inline(always)]
286 pub fn dbg_tim4_stop(&mut self) -> DBG_TIM4_STOP_W<CRrs> {
287 DBG_TIM4_STOP_W::new(self, 13)
288 }
289 #[inline(always)]
291 pub fn dbg_i2c1_smbus_timeout(&mut self) -> DBG_I2C1_SMBUS_TIMEOUT_W<CRrs> {
292 DBG_I2C1_SMBUS_TIMEOUT_W::new(self, 15)
293 }
294 #[inline(always)]
296 pub fn dbg_i2c2_smbus_timeout(&mut self) -> DBG_I2C2_SMBUS_TIMEOUT_W<CRrs> {
297 DBG_I2C2_SMBUS_TIMEOUT_W::new(self, 16)
298 }
299 #[inline(always)]
301 pub fn dbg_tim5_stop(&mut self) -> DBG_TIM5_STOP_W<CRrs> {
302 DBG_TIM5_STOP_W::new(self, 18)
303 }
304 #[inline(always)]
306 pub fn dbg_tim6_stop(&mut self) -> DBG_TIM6_STOP_W<CRrs> {
307 DBG_TIM6_STOP_W::new(self, 19)
308 }
309 #[inline(always)]
311 pub fn dbg_tim7_stop(&mut self) -> DBG_TIM7_STOP_W<CRrs> {
312 DBG_TIM7_STOP_W::new(self, 20)
313 }
314 #[inline(always)]
316 pub fn dbg_tim15_stop(&mut self) -> DBG_TIM15_STOP_W<CRrs> {
317 DBG_TIM15_STOP_W::new(self, 22)
318 }
319 #[inline(always)]
321 pub fn dbg_tim16_stop(&mut self) -> DBG_TIM16_STOP_W<CRrs> {
322 DBG_TIM16_STOP_W::new(self, 23)
323 }
324 #[inline(always)]
326 pub fn dbg_tim17_stop(&mut self) -> DBG_TIM17_STOP_W<CRrs> {
327 DBG_TIM17_STOP_W::new(self, 24)
328 }
329 #[inline(always)]
331 pub fn dbg_tim12_stop(&mut self) -> DBG_TIM12_STOP_W<CRrs> {
332 DBG_TIM12_STOP_W::new(self, 25)
333 }
334 #[inline(always)]
336 pub fn dbg_tim13_stop(&mut self) -> DBG_TIM13_STOP_W<CRrs> {
337 DBG_TIM13_STOP_W::new(self, 26)
338 }
339 #[inline(always)]
341 pub fn dbg_tim14_stop(&mut self) -> DBG_TIM14_STOP_W<CRrs> {
342 DBG_TIM14_STOP_W::new(self, 27)
343 }
344}
345pub struct CRrs;
351impl crate::RegisterSpec for CRrs {
352 type Ux = u32;
353}
354impl crate::Readable for CRrs {}
356impl crate::Writable for CRrs {
358 type Safety = crate::Unsafe;
359}
360impl crate::Resettable for CRrs {}