stm32l4/stm32l4x5/tim1/
cnt.rs1pub type R = crate::R<CNTrs>;
3pub type W = crate::W<CNTrs>;
5pub type CNT_R = crate::FieldReader<u16>;
7pub type CNT_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16, crate::Safe>;
9pub type UIFCPY_R = crate::BitReader;
11pub type UIFCPY_W<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14 #[inline(always)]
16 pub fn cnt(&self) -> CNT_R {
17 CNT_R::new((self.bits & 0xffff) as u16)
18 }
19 #[inline(always)]
21 pub fn uifcpy(&self) -> UIFCPY_R {
22 UIFCPY_R::new(((self.bits >> 31) & 1) != 0)
23 }
24}
25impl core::fmt::Debug for R {
26 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
27 f.debug_struct("CNT")
28 .field("uifcpy", &self.uifcpy())
29 .field("cnt", &self.cnt())
30 .finish()
31 }
32}
33impl W {
34 #[inline(always)]
36 pub fn cnt(&mut self) -> CNT_W<CNTrs> {
37 CNT_W::new(self, 0)
38 }
39 #[inline(always)]
41 pub fn uifcpy(&mut self) -> UIFCPY_W<CNTrs> {
42 UIFCPY_W::new(self, 31)
43 }
44}
45pub struct CNTrs;
51impl crate::RegisterSpec for CNTrs {
52 type Ux = u32;
53}
54impl crate::Readable for CNTrs {}
56impl crate::Writable for CNTrs {
58 type Safety = crate::Unsafe;
59}
60impl crate::Resettable for CNTrs {}