stm32f1_staging/stm32f103/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_CAN_STOP_R = crate::BitReader;
51pub type DBG_CAN_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
53pub type DBG_I2C1_SMBUS_TIMEOUT_R = crate::BitReader;
55pub type DBG_I2C1_SMBUS_TIMEOUT_W<'a, REG> = crate::BitWriter<'a, REG>;
57pub type DBG_I2C2_SMBUS_TIMEOUT_R = crate::BitReader;
59pub type DBG_I2C2_SMBUS_TIMEOUT_W<'a, REG> = crate::BitWriter<'a, REG>;
61pub type DBG_TIM8_STOP_R = crate::BitReader;
63pub type DBG_TIM8_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
65pub type DBG_TIM5_STOP_R = crate::BitReader;
67pub type DBG_TIM5_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
69pub type DBG_TIM6_STOP_R = crate::BitReader;
71pub type DBG_TIM6_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
73pub type DBG_TIM7_STOP_R = crate::BitReader;
75pub type DBG_TIM7_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
77impl R {
78 #[inline(always)]
80 pub fn dbg_sleep(&self) -> DBG_SLEEP_R {
81 DBG_SLEEP_R::new((self.bits & 1) != 0)
82 }
83 #[inline(always)]
85 pub fn dbg_stop(&self) -> DBG_STOP_R {
86 DBG_STOP_R::new(((self.bits >> 1) & 1) != 0)
87 }
88 #[inline(always)]
90 pub fn dbg_standby(&self) -> DBG_STANDBY_R {
91 DBG_STANDBY_R::new(((self.bits >> 2) & 1) != 0)
92 }
93 #[inline(always)]
95 pub fn trace_ioen(&self) -> TRACE_IOEN_R {
96 TRACE_IOEN_R::new(((self.bits >> 5) & 1) != 0)
97 }
98 #[inline(always)]
100 pub fn trace_mode(&self) -> TRACE_MODE_R {
101 TRACE_MODE_R::new(((self.bits >> 6) & 3) as u8)
102 }
103 #[inline(always)]
105 pub fn dbg_iwdg_stop(&self) -> DBG_IWDG_STOP_R {
106 DBG_IWDG_STOP_R::new(((self.bits >> 8) & 1) != 0)
107 }
108 #[inline(always)]
110 pub fn dbg_wwdg_stop(&self) -> DBG_WWDG_STOP_R {
111 DBG_WWDG_STOP_R::new(((self.bits >> 9) & 1) != 0)
112 }
113 #[inline(always)]
115 pub fn dbg_tim1_stop(&self) -> DBG_TIM1_STOP_R {
116 DBG_TIM1_STOP_R::new(((self.bits >> 10) & 1) != 0)
117 }
118 #[inline(always)]
120 pub fn dbg_tim2_stop(&self) -> DBG_TIM2_STOP_R {
121 DBG_TIM2_STOP_R::new(((self.bits >> 11) & 1) != 0)
122 }
123 #[inline(always)]
125 pub fn dbg_tim3_stop(&self) -> DBG_TIM3_STOP_R {
126 DBG_TIM3_STOP_R::new(((self.bits >> 12) & 1) != 0)
127 }
128 #[inline(always)]
130 pub fn dbg_tim4_stop(&self) -> DBG_TIM4_STOP_R {
131 DBG_TIM4_STOP_R::new(((self.bits >> 13) & 1) != 0)
132 }
133 #[inline(always)]
135 pub fn dbg_can_stop(&self) -> DBG_CAN_STOP_R {
136 DBG_CAN_STOP_R::new(((self.bits >> 14) & 1) != 0)
137 }
138 #[inline(always)]
140 pub fn dbg_i2c1_smbus_timeout(&self) -> DBG_I2C1_SMBUS_TIMEOUT_R {
141 DBG_I2C1_SMBUS_TIMEOUT_R::new(((self.bits >> 15) & 1) != 0)
142 }
143 #[inline(always)]
145 pub fn dbg_i2c2_smbus_timeout(&self) -> DBG_I2C2_SMBUS_TIMEOUT_R {
146 DBG_I2C2_SMBUS_TIMEOUT_R::new(((self.bits >> 16) & 1) != 0)
147 }
148 #[inline(always)]
150 pub fn dbg_tim8_stop(&self) -> DBG_TIM8_STOP_R {
151 DBG_TIM8_STOP_R::new(((self.bits >> 17) & 1) != 0)
152 }
153 #[inline(always)]
155 pub fn dbg_tim5_stop(&self) -> DBG_TIM5_STOP_R {
156 DBG_TIM5_STOP_R::new(((self.bits >> 18) & 1) != 0)
157 }
158 #[inline(always)]
160 pub fn dbg_tim6_stop(&self) -> DBG_TIM6_STOP_R {
161 DBG_TIM6_STOP_R::new(((self.bits >> 19) & 1) != 0)
162 }
163 #[inline(always)]
165 pub fn dbg_tim7_stop(&self) -> DBG_TIM7_STOP_R {
166 DBG_TIM7_STOP_R::new(((self.bits >> 20) & 1) != 0)
167 }
168}
169impl core::fmt::Debug for R {
170 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
171 f.debug_struct("CR")
172 .field("dbg_sleep", &self.dbg_sleep())
173 .field("dbg_stop", &self.dbg_stop())
174 .field("dbg_standby", &self.dbg_standby())
175 .field("trace_ioen", &self.trace_ioen())
176 .field("trace_mode", &self.trace_mode())
177 .field("dbg_iwdg_stop", &self.dbg_iwdg_stop())
178 .field("dbg_wwdg_stop", &self.dbg_wwdg_stop())
179 .field("dbg_tim1_stop", &self.dbg_tim1_stop())
180 .field("dbg_tim2_stop", &self.dbg_tim2_stop())
181 .field("dbg_tim3_stop", &self.dbg_tim3_stop())
182 .field("dbg_tim4_stop", &self.dbg_tim4_stop())
183 .field("dbg_can_stop", &self.dbg_can_stop())
184 .field("dbg_i2c1_smbus_timeout", &self.dbg_i2c1_smbus_timeout())
185 .field("dbg_i2c2_smbus_timeout", &self.dbg_i2c2_smbus_timeout())
186 .field("dbg_tim8_stop", &self.dbg_tim8_stop())
187 .field("dbg_tim5_stop", &self.dbg_tim5_stop())
188 .field("dbg_tim6_stop", &self.dbg_tim6_stop())
189 .field("dbg_tim7_stop", &self.dbg_tim7_stop())
190 .finish()
191 }
192}
193impl W {
194 #[inline(always)]
196 pub fn dbg_sleep(&mut self) -> DBG_SLEEP_W<CRrs> {
197 DBG_SLEEP_W::new(self, 0)
198 }
199 #[inline(always)]
201 pub fn dbg_stop(&mut self) -> DBG_STOP_W<CRrs> {
202 DBG_STOP_W::new(self, 1)
203 }
204 #[inline(always)]
206 pub fn dbg_standby(&mut self) -> DBG_STANDBY_W<CRrs> {
207 DBG_STANDBY_W::new(self, 2)
208 }
209 #[inline(always)]
211 pub fn trace_ioen(&mut self) -> TRACE_IOEN_W<CRrs> {
212 TRACE_IOEN_W::new(self, 5)
213 }
214 #[inline(always)]
216 pub fn trace_mode(&mut self) -> TRACE_MODE_W<CRrs> {
217 TRACE_MODE_W::new(self, 6)
218 }
219 #[inline(always)]
221 pub fn dbg_iwdg_stop(&mut self) -> DBG_IWDG_STOP_W<CRrs> {
222 DBG_IWDG_STOP_W::new(self, 8)
223 }
224 #[inline(always)]
226 pub fn dbg_wwdg_stop(&mut self) -> DBG_WWDG_STOP_W<CRrs> {
227 DBG_WWDG_STOP_W::new(self, 9)
228 }
229 #[inline(always)]
231 pub fn dbg_tim1_stop(&mut self) -> DBG_TIM1_STOP_W<CRrs> {
232 DBG_TIM1_STOP_W::new(self, 10)
233 }
234 #[inline(always)]
236 pub fn dbg_tim2_stop(&mut self) -> DBG_TIM2_STOP_W<CRrs> {
237 DBG_TIM2_STOP_W::new(self, 11)
238 }
239 #[inline(always)]
241 pub fn dbg_tim3_stop(&mut self) -> DBG_TIM3_STOP_W<CRrs> {
242 DBG_TIM3_STOP_W::new(self, 12)
243 }
244 #[inline(always)]
246 pub fn dbg_tim4_stop(&mut self) -> DBG_TIM4_STOP_W<CRrs> {
247 DBG_TIM4_STOP_W::new(self, 13)
248 }
249 #[inline(always)]
251 pub fn dbg_can_stop(&mut self) -> DBG_CAN_STOP_W<CRrs> {
252 DBG_CAN_STOP_W::new(self, 14)
253 }
254 #[inline(always)]
256 pub fn dbg_i2c1_smbus_timeout(&mut self) -> DBG_I2C1_SMBUS_TIMEOUT_W<CRrs> {
257 DBG_I2C1_SMBUS_TIMEOUT_W::new(self, 15)
258 }
259 #[inline(always)]
261 pub fn dbg_i2c2_smbus_timeout(&mut self) -> DBG_I2C2_SMBUS_TIMEOUT_W<CRrs> {
262 DBG_I2C2_SMBUS_TIMEOUT_W::new(self, 16)
263 }
264 #[inline(always)]
266 pub fn dbg_tim8_stop(&mut self) -> DBG_TIM8_STOP_W<CRrs> {
267 DBG_TIM8_STOP_W::new(self, 17)
268 }
269 #[inline(always)]
271 pub fn dbg_tim5_stop(&mut self) -> DBG_TIM5_STOP_W<CRrs> {
272 DBG_TIM5_STOP_W::new(self, 18)
273 }
274 #[inline(always)]
276 pub fn dbg_tim6_stop(&mut self) -> DBG_TIM6_STOP_W<CRrs> {
277 DBG_TIM6_STOP_W::new(self, 19)
278 }
279 #[inline(always)]
281 pub fn dbg_tim7_stop(&mut self) -> DBG_TIM7_STOP_W<CRrs> {
282 DBG_TIM7_STOP_W::new(self, 20)
283 }
284}
285pub struct CRrs;
291impl crate::RegisterSpec for CRrs {
292 type Ux = u32;
293}
294impl crate::Readable for CRrs {}
296impl crate::Writable for CRrs {
298 type Safety = crate::Unsafe;
299}
300impl crate::Resettable for CRrs {}