stm32f1_staging/stm32f107/rcc/
cir.rs1pub type R = crate::R<CIRrs>;
3pub type W = crate::W<CIRrs>;
5#[cfg_attr(feature = "defmt", derive(defmt::Format))]
9#[derive(Clone, Copy, Debug, PartialEq, Eq)]
10pub enum LSIRDYFR {
11 NotInterrupted = 0,
13 Interrupted = 1,
15}
16impl From<LSIRDYFR> for bool {
17 #[inline(always)]
18 fn from(variant: LSIRDYFR) -> Self {
19 variant as u8 != 0
20 }
21}
22pub type LSIRDYF_R = crate::BitReader<LSIRDYFR>;
24impl LSIRDYF_R {
25 #[inline(always)]
27 pub const fn variant(&self) -> LSIRDYFR {
28 match self.bits {
29 false => LSIRDYFR::NotInterrupted,
30 true => LSIRDYFR::Interrupted,
31 }
32 }
33 #[inline(always)]
35 pub fn is_not_interrupted(&self) -> bool {
36 *self == LSIRDYFR::NotInterrupted
37 }
38 #[inline(always)]
40 pub fn is_interrupted(&self) -> bool {
41 *self == LSIRDYFR::Interrupted
42 }
43}
44pub use LSIRDYF_R as LSERDYF_R;
46pub use LSIRDYF_R as HSIRDYF_R;
48pub use LSIRDYF_R as HSERDYF_R;
50pub use LSIRDYF_R as PLLRDYF_R;
52pub use LSIRDYF_R as PLL2RDYF_R;
54pub use LSIRDYF_R as PLL3RDYF_R;
56#[cfg_attr(feature = "defmt", derive(defmt::Format))]
60#[derive(Clone, Copy, Debug, PartialEq, Eq)]
61pub enum CSSFR {
62 NotInterrupted = 0,
64 Interrupted = 1,
66}
67impl From<CSSFR> for bool {
68 #[inline(always)]
69 fn from(variant: CSSFR) -> Self {
70 variant as u8 != 0
71 }
72}
73pub type CSSF_R = crate::BitReader<CSSFR>;
75impl CSSF_R {
76 #[inline(always)]
78 pub const fn variant(&self) -> CSSFR {
79 match self.bits {
80 false => CSSFR::NotInterrupted,
81 true => CSSFR::Interrupted,
82 }
83 }
84 #[inline(always)]
86 pub fn is_not_interrupted(&self) -> bool {
87 *self == CSSFR::NotInterrupted
88 }
89 #[inline(always)]
91 pub fn is_interrupted(&self) -> bool {
92 *self == CSSFR::Interrupted
93 }
94}
95#[cfg_attr(feature = "defmt", derive(defmt::Format))]
99#[derive(Clone, Copy, Debug, PartialEq, Eq)]
100pub enum LSIRDYIE {
101 Disabled = 0,
103 Enabled = 1,
105}
106impl From<LSIRDYIE> for bool {
107 #[inline(always)]
108 fn from(variant: LSIRDYIE) -> Self {
109 variant as u8 != 0
110 }
111}
112pub type LSIRDYIE_R = crate::BitReader<LSIRDYIE>;
114impl LSIRDYIE_R {
115 #[inline(always)]
117 pub const fn variant(&self) -> LSIRDYIE {
118 match self.bits {
119 false => LSIRDYIE::Disabled,
120 true => LSIRDYIE::Enabled,
121 }
122 }
123 #[inline(always)]
125 pub fn is_disabled(&self) -> bool {
126 *self == LSIRDYIE::Disabled
127 }
128 #[inline(always)]
130 pub fn is_enabled(&self) -> bool {
131 *self == LSIRDYIE::Enabled
132 }
133}
134pub type LSIRDYIE_W<'a, REG> = crate::BitWriter<'a, REG, LSIRDYIE>;
136impl<'a, REG> LSIRDYIE_W<'a, REG>
137where
138 REG: crate::Writable + crate::RegisterSpec,
139{
140 #[inline(always)]
142 pub fn disabled(self) -> &'a mut crate::W<REG> {
143 self.variant(LSIRDYIE::Disabled)
144 }
145 #[inline(always)]
147 pub fn enabled(self) -> &'a mut crate::W<REG> {
148 self.variant(LSIRDYIE::Enabled)
149 }
150}
151pub use LSIRDYIE_R as LSERDYIE_R;
153pub use LSIRDYIE_R as HSIRDYIE_R;
155pub use LSIRDYIE_R as HSERDYIE_R;
157pub use LSIRDYIE_R as PLLRDYIE_R;
159pub use LSIRDYIE_R as PLL2RDYIE_R;
161pub use LSIRDYIE_R as PLL3RDYIE_R;
163pub use LSIRDYIE_W as LSERDYIE_W;
165pub use LSIRDYIE_W as HSIRDYIE_W;
167pub use LSIRDYIE_W as HSERDYIE_W;
169pub use LSIRDYIE_W as PLLRDYIE_W;
171pub use LSIRDYIE_W as PLL2RDYIE_W;
173pub use LSIRDYIE_W as PLL3RDYIE_W;
175#[cfg_attr(feature = "defmt", derive(defmt::Format))]
179#[derive(Clone, Copy, Debug, PartialEq, Eq)]
180pub enum LSIRDYCW {
181 Clear = 1,
183}
184impl From<LSIRDYCW> for bool {
185 #[inline(always)]
186 fn from(variant: LSIRDYCW) -> Self {
187 variant as u8 != 0
188 }
189}
190pub type LSIRDYC_W<'a, REG> = crate::BitWriter<'a, REG, LSIRDYCW>;
192impl<'a, REG> LSIRDYC_W<'a, REG>
193where
194 REG: crate::Writable + crate::RegisterSpec,
195{
196 #[inline(always)]
198 pub fn clear(self) -> &'a mut crate::W<REG> {
199 self.variant(LSIRDYCW::Clear)
200 }
201}
202pub use LSIRDYC_W as LSERDYC_W;
204pub use LSIRDYC_W as HSIRDYC_W;
206pub use LSIRDYC_W as HSERDYC_W;
208pub use LSIRDYC_W as PLLRDYC_W;
210pub use LSIRDYC_W as PLL2RDYC_W;
212pub use LSIRDYC_W as PLL3RDYC_W;
214#[cfg_attr(feature = "defmt", derive(defmt::Format))]
218#[derive(Clone, Copy, Debug, PartialEq, Eq)]
219pub enum CSSCW {
220 Clear = 1,
222}
223impl From<CSSCW> for bool {
224 #[inline(always)]
225 fn from(variant: CSSCW) -> Self {
226 variant as u8 != 0
227 }
228}
229pub type CSSC_W<'a, REG> = crate::BitWriter<'a, REG, CSSCW>;
231impl<'a, REG> CSSC_W<'a, REG>
232where
233 REG: crate::Writable + crate::RegisterSpec,
234{
235 #[inline(always)]
237 pub fn clear(self) -> &'a mut crate::W<REG> {
238 self.variant(CSSCW::Clear)
239 }
240}
241impl R {
242 #[inline(always)]
244 pub fn lsirdyf(&self) -> LSIRDYF_R {
245 LSIRDYF_R::new((self.bits & 1) != 0)
246 }
247 #[inline(always)]
249 pub fn lserdyf(&self) -> LSERDYF_R {
250 LSERDYF_R::new(((self.bits >> 1) & 1) != 0)
251 }
252 #[inline(always)]
254 pub fn hsirdyf(&self) -> HSIRDYF_R {
255 HSIRDYF_R::new(((self.bits >> 2) & 1) != 0)
256 }
257 #[inline(always)]
259 pub fn hserdyf(&self) -> HSERDYF_R {
260 HSERDYF_R::new(((self.bits >> 3) & 1) != 0)
261 }
262 #[inline(always)]
264 pub fn pllrdyf(&self) -> PLLRDYF_R {
265 PLLRDYF_R::new(((self.bits >> 4) & 1) != 0)
266 }
267 #[inline(always)]
269 pub fn pll2rdyf(&self) -> PLL2RDYF_R {
270 PLL2RDYF_R::new(((self.bits >> 5) & 1) != 0)
271 }
272 #[inline(always)]
274 pub fn pll3rdyf(&self) -> PLL3RDYF_R {
275 PLL3RDYF_R::new(((self.bits >> 6) & 1) != 0)
276 }
277 #[inline(always)]
279 pub fn cssf(&self) -> CSSF_R {
280 CSSF_R::new(((self.bits >> 7) & 1) != 0)
281 }
282 #[inline(always)]
284 pub fn lsirdyie(&self) -> LSIRDYIE_R {
285 LSIRDYIE_R::new(((self.bits >> 8) & 1) != 0)
286 }
287 #[inline(always)]
289 pub fn lserdyie(&self) -> LSERDYIE_R {
290 LSERDYIE_R::new(((self.bits >> 9) & 1) != 0)
291 }
292 #[inline(always)]
294 pub fn hsirdyie(&self) -> HSIRDYIE_R {
295 HSIRDYIE_R::new(((self.bits >> 10) & 1) != 0)
296 }
297 #[inline(always)]
299 pub fn hserdyie(&self) -> HSERDYIE_R {
300 HSERDYIE_R::new(((self.bits >> 11) & 1) != 0)
301 }
302 #[inline(always)]
304 pub fn pllrdyie(&self) -> PLLRDYIE_R {
305 PLLRDYIE_R::new(((self.bits >> 12) & 1) != 0)
306 }
307 #[inline(always)]
309 pub fn pll2rdyie(&self) -> PLL2RDYIE_R {
310 PLL2RDYIE_R::new(((self.bits >> 13) & 1) != 0)
311 }
312 #[inline(always)]
314 pub fn pll3rdyie(&self) -> PLL3RDYIE_R {
315 PLL3RDYIE_R::new(((self.bits >> 14) & 1) != 0)
316 }
317}
318impl core::fmt::Debug for R {
319 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
320 f.debug_struct("CIR")
321 .field("lsirdyf", &self.lsirdyf())
322 .field("lserdyf", &self.lserdyf())
323 .field("hsirdyf", &self.hsirdyf())
324 .field("hserdyf", &self.hserdyf())
325 .field("pllrdyf", &self.pllrdyf())
326 .field("pll2rdyf", &self.pll2rdyf())
327 .field("pll3rdyf", &self.pll3rdyf())
328 .field("cssf", &self.cssf())
329 .field("lsirdyie", &self.lsirdyie())
330 .field("lserdyie", &self.lserdyie())
331 .field("hsirdyie", &self.hsirdyie())
332 .field("hserdyie", &self.hserdyie())
333 .field("pllrdyie", &self.pllrdyie())
334 .field("pll2rdyie", &self.pll2rdyie())
335 .field("pll3rdyie", &self.pll3rdyie())
336 .finish()
337 }
338}
339impl W {
340 #[inline(always)]
342 pub fn lsirdyie(&mut self) -> LSIRDYIE_W<CIRrs> {
343 LSIRDYIE_W::new(self, 8)
344 }
345 #[inline(always)]
347 pub fn lserdyie(&mut self) -> LSERDYIE_W<CIRrs> {
348 LSERDYIE_W::new(self, 9)
349 }
350 #[inline(always)]
352 pub fn hsirdyie(&mut self) -> HSIRDYIE_W<CIRrs> {
353 HSIRDYIE_W::new(self, 10)
354 }
355 #[inline(always)]
357 pub fn hserdyie(&mut self) -> HSERDYIE_W<CIRrs> {
358 HSERDYIE_W::new(self, 11)
359 }
360 #[inline(always)]
362 pub fn pllrdyie(&mut self) -> PLLRDYIE_W<CIRrs> {
363 PLLRDYIE_W::new(self, 12)
364 }
365 #[inline(always)]
367 pub fn pll2rdyie(&mut self) -> PLL2RDYIE_W<CIRrs> {
368 PLL2RDYIE_W::new(self, 13)
369 }
370 #[inline(always)]
372 pub fn pll3rdyie(&mut self) -> PLL3RDYIE_W<CIRrs> {
373 PLL3RDYIE_W::new(self, 14)
374 }
375 #[inline(always)]
377 pub fn lsirdyc(&mut self) -> LSIRDYC_W<CIRrs> {
378 LSIRDYC_W::new(self, 16)
379 }
380 #[inline(always)]
382 pub fn lserdyc(&mut self) -> LSERDYC_W<CIRrs> {
383 LSERDYC_W::new(self, 17)
384 }
385 #[inline(always)]
387 pub fn hsirdyc(&mut self) -> HSIRDYC_W<CIRrs> {
388 HSIRDYC_W::new(self, 18)
389 }
390 #[inline(always)]
392 pub fn hserdyc(&mut self) -> HSERDYC_W<CIRrs> {
393 HSERDYC_W::new(self, 19)
394 }
395 #[inline(always)]
397 pub fn pllrdyc(&mut self) -> PLLRDYC_W<CIRrs> {
398 PLLRDYC_W::new(self, 20)
399 }
400 #[inline(always)]
402 pub fn pll2rdyc(&mut self) -> PLL2RDYC_W<CIRrs> {
403 PLL2RDYC_W::new(self, 21)
404 }
405 #[inline(always)]
407 pub fn pll3rdyc(&mut self) -> PLL3RDYC_W<CIRrs> {
408 PLL3RDYC_W::new(self, 22)
409 }
410 #[inline(always)]
412 pub fn cssc(&mut self) -> CSSC_W<CIRrs> {
413 CSSC_W::new(self, 23)
414 }
415}
416pub struct CIRrs;
422impl crate::RegisterSpec for CIRrs {
423 type Ux = u32;
424}
425impl crate::Readable for CIRrs {}
427impl crate::Writable for CIRrs {
429 type Safety = crate::Unsafe;
430}
431impl crate::Resettable for CIRrs {}