Skip to main content

mcxa_pac/wwdt0/
tv.rs

1#[doc = "Register `TV` reader"]
2pub type R = crate::R<TvSpec>;
3#[doc = "Field `COUNT` reader - Counter Timer Value"]
4pub type CountR = crate::FieldReader<u32>;
5impl R {
6    #[doc = "Bits 0:23 - Counter Timer Value"]
7    #[inline(always)]
8    pub fn count(&self) -> CountR {
9        CountR::new(self.bits & 0x00ff_ffff)
10    }
11}
12#[cfg(feature = "debug")]
13impl core::fmt::Debug for R {
14    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
15        f.debug_struct("TV").field("count", &self.count()).finish()
16    }
17}
18#[doc = "Timer Value\n\nYou can [`read`](crate::Reg::read) this register and get [`tv::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
19pub struct TvSpec;
20impl crate::RegisterSpec for TvSpec {
21    type Ux = u32;
22}
23#[doc = "`read()` method returns [`tv::R`](R) reader structure"]
24impl crate::Readable for TvSpec {}
25#[doc = "`reset()` method sets TV to value 0xff"]
26impl crate::Resettable for TvSpec {
27    const RESET_VALUE: u32 = 0xff;
28}