stm32f3/stm32f373/tim12/
cnt.rs

1///Register `CNT` reader
2pub type R = crate::R<CNTrs>;
3///Register `CNT` writer
4pub type W = crate::W<CNTrs>;
5///Field `CNT` reader - counter value
6pub type CNT_R = crate::FieldReader<u16>;
7///Field `CNT` writer - counter value
8pub type CNT_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16, crate::Safe>;
9impl R {
10    ///Bits 0:15 - counter value
11    #[inline(always)]
12    pub fn cnt(&self) -> CNT_R {
13        CNT_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("CNT").field("cnt", &self.cnt()).finish()
19    }
20}
21impl W {
22    ///Bits 0:15 - counter value
23    #[inline(always)]
24    pub fn cnt(&mut self) -> CNT_W<CNTrs> {
25        CNT_W::new(self, 0)
26    }
27}
28/**counter
29
30You can [`read`](crate::Reg::read) this register and get [`cnt::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cnt::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/STM32F373.html#TIM12:CNT)*/
33pub struct CNTrs;
34impl crate::RegisterSpec for CNTrs {
35    type Ux = u32;
36}
37///`read()` method returns [`cnt::R`](R) reader structure
38impl crate::Readable for CNTrs {}
39///`write(|w| ..)` method takes [`cnt::W`](W) writer structure
40impl crate::Writable for CNTrs {
41    type Safety = crate::Unsafe;
42}
43///`reset()` method sets CNT to value 0
44impl crate::Resettable for CNTrs {}