stm32f1_staging/stm32f102/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_TIM2_STOP_R = crate::BitReader;
35pub type DBG_TIM2_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
37pub type DBG_TIM3_STOP_R = crate::BitReader;
39pub type DBG_TIM3_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
41pub type DBG_I2C1_SMBUS_TIMEOUT_R = crate::BitReader;
43pub type DBG_I2C1_SMBUS_TIMEOUT_W<'a, REG> = crate::BitWriter<'a, REG>;
45impl R {
46 #[inline(always)]
48 pub fn dbg_sleep(&self) -> DBG_SLEEP_R {
49 DBG_SLEEP_R::new((self.bits & 1) != 0)
50 }
51 #[inline(always)]
53 pub fn dbg_stop(&self) -> DBG_STOP_R {
54 DBG_STOP_R::new(((self.bits >> 1) & 1) != 0)
55 }
56 #[inline(always)]
58 pub fn dbg_standby(&self) -> DBG_STANDBY_R {
59 DBG_STANDBY_R::new(((self.bits >> 2) & 1) != 0)
60 }
61 #[inline(always)]
63 pub fn trace_ioen(&self) -> TRACE_IOEN_R {
64 TRACE_IOEN_R::new(((self.bits >> 5) & 1) != 0)
65 }
66 #[inline(always)]
68 pub fn trace_mode(&self) -> TRACE_MODE_R {
69 TRACE_MODE_R::new(((self.bits >> 6) & 3) as u8)
70 }
71 #[inline(always)]
73 pub fn dbg_iwdg_stop(&self) -> DBG_IWDG_STOP_R {
74 DBG_IWDG_STOP_R::new(((self.bits >> 8) & 1) != 0)
75 }
76 #[inline(always)]
78 pub fn dbg_wwdg_stop(&self) -> DBG_WWDG_STOP_R {
79 DBG_WWDG_STOP_R::new(((self.bits >> 9) & 1) != 0)
80 }
81 #[inline(always)]
83 pub fn dbg_tim2_stop(&self) -> DBG_TIM2_STOP_R {
84 DBG_TIM2_STOP_R::new(((self.bits >> 11) & 1) != 0)
85 }
86 #[inline(always)]
88 pub fn dbg_tim3_stop(&self) -> DBG_TIM3_STOP_R {
89 DBG_TIM3_STOP_R::new(((self.bits >> 12) & 1) != 0)
90 }
91 #[inline(always)]
93 pub fn dbg_i2c1_smbus_timeout(&self) -> DBG_I2C1_SMBUS_TIMEOUT_R {
94 DBG_I2C1_SMBUS_TIMEOUT_R::new(((self.bits >> 15) & 1) != 0)
95 }
96}
97impl core::fmt::Debug for R {
98 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
99 f.debug_struct("CR")
100 .field("dbg_sleep", &self.dbg_sleep())
101 .field("dbg_stop", &self.dbg_stop())
102 .field("dbg_standby", &self.dbg_standby())
103 .field("trace_ioen", &self.trace_ioen())
104 .field("trace_mode", &self.trace_mode())
105 .field("dbg_iwdg_stop", &self.dbg_iwdg_stop())
106 .field("dbg_wwdg_stop", &self.dbg_wwdg_stop())
107 .field("dbg_tim2_stop", &self.dbg_tim2_stop())
108 .field("dbg_tim3_stop", &self.dbg_tim3_stop())
109 .field("dbg_i2c1_smbus_timeout", &self.dbg_i2c1_smbus_timeout())
110 .finish()
111 }
112}
113impl W {
114 #[inline(always)]
116 pub fn dbg_sleep(&mut self) -> DBG_SLEEP_W<CRrs> {
117 DBG_SLEEP_W::new(self, 0)
118 }
119 #[inline(always)]
121 pub fn dbg_stop(&mut self) -> DBG_STOP_W<CRrs> {
122 DBG_STOP_W::new(self, 1)
123 }
124 #[inline(always)]
126 pub fn dbg_standby(&mut self) -> DBG_STANDBY_W<CRrs> {
127 DBG_STANDBY_W::new(self, 2)
128 }
129 #[inline(always)]
131 pub fn trace_ioen(&mut self) -> TRACE_IOEN_W<CRrs> {
132 TRACE_IOEN_W::new(self, 5)
133 }
134 #[inline(always)]
136 pub fn trace_mode(&mut self) -> TRACE_MODE_W<CRrs> {
137 TRACE_MODE_W::new(self, 6)
138 }
139 #[inline(always)]
141 pub fn dbg_iwdg_stop(&mut self) -> DBG_IWDG_STOP_W<CRrs> {
142 DBG_IWDG_STOP_W::new(self, 8)
143 }
144 #[inline(always)]
146 pub fn dbg_wwdg_stop(&mut self) -> DBG_WWDG_STOP_W<CRrs> {
147 DBG_WWDG_STOP_W::new(self, 9)
148 }
149 #[inline(always)]
151 pub fn dbg_tim2_stop(&mut self) -> DBG_TIM2_STOP_W<CRrs> {
152 DBG_TIM2_STOP_W::new(self, 11)
153 }
154 #[inline(always)]
156 pub fn dbg_tim3_stop(&mut self) -> DBG_TIM3_STOP_W<CRrs> {
157 DBG_TIM3_STOP_W::new(self, 12)
158 }
159 #[inline(always)]
161 pub fn dbg_i2c1_smbus_timeout(&mut self) -> DBG_I2C1_SMBUS_TIMEOUT_W<CRrs> {
162 DBG_I2C1_SMBUS_TIMEOUT_W::new(self, 15)
163 }
164}
165pub struct CRrs;
171impl crate::RegisterSpec for CRrs {
172 type Ux = u32;
173}
174impl crate::Readable for CRrs {}
176impl crate::Writable for CRrs {
178 type Safety = crate::Unsafe;
179}
180impl crate::Resettable for CRrs {}