stm32g0_staging/stm32g0c1/rtc/
ssr.rs

1///Register `SSR` reader
2pub type R = crate::R<SSRrs>;
3/**Field `SS` reader - Sub second value SS\[15:0\]
4is the value in the synchronous prescaler counter. The fraction of a second is given by the formula below: Second fraction = (PREDIV_S - SS) / (PREDIV_S + 1) Note: SS can be larger than PREDIV_S only after a shift operation. In that case, the correct time/date is one second less than as indicated by RTC_TR/RTC_DR.*/
5pub type SS_R = crate::FieldReader<u16>;
6impl R {
7    /**Bits 0:15 - Sub second value SS\[15:0\]
8is the value in the synchronous prescaler counter. The fraction of a second is given by the formula below: Second fraction = (PREDIV_S - SS) / (PREDIV_S + 1) Note: SS can be larger than PREDIV_S only after a shift operation. In that case, the correct time/date is one second less than as indicated by RTC_TR/RTC_DR.*/
9    #[inline(always)]
10    pub fn ss(&self) -> SS_R {
11        SS_R::new((self.bits & 0xffff) as u16)
12    }
13}
14impl core::fmt::Debug for R {
15    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
16        f.debug_struct("SSR").field("ss", &self.ss()).finish()
17    }
18}
19/**RTC sub second register
20
21You can [`read`](crate::Reg::read) this register and get [`ssr::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api).
22
23See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#RTC:SSR)*/
24pub struct SSRrs;
25impl crate::RegisterSpec for SSRrs {
26    type Ux = u32;
27}
28///`read()` method returns [`ssr::R`](R) reader structure
29impl crate::Readable for SSRrs {}
30///`reset()` method sets SSR to value 0
31impl crate::Resettable for SSRrs {
32    const RESET_VALUE: u32 = 0;
33}