stm32f1_staging/stm32f100/rtc/
cntl.rs

1///Register `CNTL` reader
2pub type R = crate::R<CNTLrs>;
3///Register `CNTL` writer
4pub type W = crate::W<CNTLrs>;
5///Field `CNTL` reader - RTC counter register Low
6pub type CNTL_R = crate::FieldReader<u16>;
7///Field `CNTL` writer - RTC counter register Low
8pub type CNTL_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16, crate::Safe>;
9impl R {
10    ///Bits 0:15 - RTC counter register Low
11    #[inline(always)]
12    pub fn cntl(&self) -> CNTL_R {
13        CNTL_R::new((self.bits & 0xffff) as u16)
14    }
15}
16impl core::fmt::Debug for R {
17    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
18        f.debug_struct("CNTL").field("cntl", &self.cntl()).finish()
19    }
20}
21impl W {
22    ///Bits 0:15 - RTC counter register Low
23    #[inline(always)]
24    pub fn cntl(&mut self) -> CNTL_W<CNTLrs> {
25        CNTL_W::new(self, 0)
26    }
27}
28/**RTC Counter Register Low
29
30You can [`read`](crate::Reg::read) this register and get [`cntl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cntl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
31
32See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F100.html#RTC:CNTL)*/
33pub struct CNTLrs;
34impl crate::RegisterSpec for CNTLrs {
35    type Ux = u32;
36}
37///`read()` method returns [`cntl::R`](R) reader structure
38impl crate::Readable for CNTLrs {}
39///`write(|w| ..)` method takes [`cntl::W`](W) writer structure
40impl crate::Writable for CNTLrs {
41    type Safety = crate::Unsafe;
42}
43///`reset()` method sets CNTL to value 0
44impl crate::Resettable for CNTLrs {}