xmc4400/dsd_ch0/
tstmp.rs

1#[doc = "Register `TSTMP` reader"]
2pub type R = crate::R<TSTMP_SPEC>;
3#[doc = "Field `RESULT` reader - Result of most recent conversion"]
4pub type RESULT_R = crate::FieldReader<u16>;
5#[doc = "Field `CFMDCNT` reader - CIC Filter (Main Chain) Decimation Counter"]
6pub type CFMDCNT_R = crate::FieldReader;
7#[doc = "Field `NVALCNT` reader - Number of Values Counted"]
8pub type NVALCNT_R = crate::FieldReader;
9impl R {
10    #[doc = "Bits 0:15 - Result of most recent conversion"]
11    #[inline(always)]
12    pub fn result(&self) -> RESULT_R {
13        RESULT_R::new((self.bits & 0xffff) as u16)
14    }
15    #[doc = "Bits 16:23 - CIC Filter (Main Chain) Decimation Counter"]
16    #[inline(always)]
17    pub fn cfmdcnt(&self) -> CFMDCNT_R {
18        CFMDCNT_R::new(((self.bits >> 16) & 0xff) as u8)
19    }
20    #[doc = "Bits 24:29 - Number of Values Counted"]
21    #[inline(always)]
22    pub fn nvalcnt(&self) -> NVALCNT_R {
23        NVALCNT_R::new(((self.bits >> 24) & 0x3f) as u8)
24    }
25}
26#[doc = "Time-Stamp Register\n\nYou can [`read`](crate::Reg::read) this register and get [`tstmp::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
27pub struct TSTMP_SPEC;
28impl crate::RegisterSpec for TSTMP_SPEC {
29    type Ux = u32;
30}
31#[doc = "`read()` method returns [`tstmp::R`](R) reader structure"]
32impl crate::Readable for TSTMP_SPEC {}
33#[doc = "`reset()` method sets TSTMP to value 0"]
34impl crate::Resettable for TSTMP_SPEC {
35    const RESET_VALUE: u32 = 0;
36}