stm32g4/stm32g484/rtc/
scr.rs

1///Register `SCR` writer
2pub type W = crate::W<SCRrs>;
3/**CALRAF
4
5Value on reset: 0*/
6#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8pub enum CALRAF {
9    ///1: Clear interrupt flag
10    Clear = 1,
11}
12impl From<CALRAF> for bool {
13    #[inline(always)]
14    fn from(variant: CALRAF) -> Self {
15        variant as u8 != 0
16    }
17}
18///Field `CALRAF` writer - CALRAF
19pub type CALRAF_W<'a, REG> = crate::BitWriter<'a, REG, CALRAF>;
20impl<'a, REG> CALRAF_W<'a, REG>
21where
22    REG: crate::Writable + crate::RegisterSpec,
23{
24    ///Clear interrupt flag
25    #[inline(always)]
26    pub fn clear(self) -> &'a mut crate::W<REG> {
27        self.variant(CALRAF::Clear)
28    }
29}
30///Field `CALRBF` writer - CALRBF
31pub use CALRAF_W as CALRBF_W;
32///Field `CWUTF` writer - CWUTF
33pub use CALRAF_W as CWUTF_W;
34///Field `CTSF` writer - CTSF
35pub use CALRAF_W as CTSF_W;
36///Field `CTSOVF` writer - CTSOVF
37pub use CALRAF_W as CTSOVF_W;
38///Field `CITSF` writer - CITSF
39pub use CALRAF_W as CITSF_W;
40impl core::fmt::Debug for crate::generic::Reg<SCRrs> {
41    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
42        write!(f, "(not readable)")
43    }
44}
45impl W {
46    ///Bit 0 - CALRAF
47    #[inline(always)]
48    pub fn calraf(&mut self) -> CALRAF_W<SCRrs> {
49        CALRAF_W::new(self, 0)
50    }
51    ///Bit 1 - CALRBF
52    #[inline(always)]
53    pub fn calrbf(&mut self) -> CALRBF_W<SCRrs> {
54        CALRBF_W::new(self, 1)
55    }
56    ///Bit 2 - CWUTF
57    #[inline(always)]
58    pub fn cwutf(&mut self) -> CWUTF_W<SCRrs> {
59        CWUTF_W::new(self, 2)
60    }
61    ///Bit 3 - CTSF
62    #[inline(always)]
63    pub fn ctsf(&mut self) -> CTSF_W<SCRrs> {
64        CTSF_W::new(self, 3)
65    }
66    ///Bit 4 - CTSOVF
67    #[inline(always)]
68    pub fn ctsovf(&mut self) -> CTSOVF_W<SCRrs> {
69        CTSOVF_W::new(self, 4)
70    }
71    ///Bit 5 - CITSF
72    #[inline(always)]
73    pub fn citsf(&mut self) -> CITSF_W<SCRrs> {
74        CITSF_W::new(self, 5)
75    }
76}
77/**status register
78
79You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`scr::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api).
80
81See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G484.html#RTC:SCR)*/
82pub struct SCRrs;
83impl crate::RegisterSpec for SCRrs {
84    type Ux = u32;
85}
86///`write(|w| ..)` method takes [`scr::W`](W) writer structure
87impl crate::Writable for SCRrs {
88    type Safety = crate::Unsafe;
89}
90///`reset()` method sets SCR to value 0
91impl crate::Resettable for SCRrs {}