Skip to main content

mcxa_pac/trng0/
scr6pc.rs

1#[doc = "Register `SCR6PC` reader"]
2pub type R = crate::R<Scr6pcSpec>;
3#[doc = "Field `R6P_0_CT` reader - Runs of Zero, Length 6+ Count"]
4pub type R6p0CtR = crate::FieldReader<u16>;
5#[doc = "Field `R6P_1_CT` reader - Runs of One, Length 6+ Count"]
6pub type R6p1CtR = crate::FieldReader<u16>;
7impl R {
8    #[doc = "Bits 0:10 - Runs of Zero, Length 6+ Count"]
9    #[inline(always)]
10    pub fn r6p_0_ct(&self) -> R6p0CtR {
11        R6p0CtR::new((self.bits & 0x07ff) as u16)
12    }
13    #[doc = "Bits 16:26 - Runs of One, Length 6+ Count"]
14    #[inline(always)]
15    pub fn r6p_1_ct(&self) -> R6p1CtR {
16        R6p1CtR::new(((self.bits >> 16) & 0x07ff) as u16)
17    }
18}
19#[cfg(feature = "debug")]
20impl core::fmt::Debug for R {
21    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
22        f.debug_struct("SCR6PC")
23            .field("r6p_0_ct", &self.r6p_0_ct())
24            .field("r6p_1_ct", &self.r6p_1_ct())
25            .finish()
26    }
27}
28#[doc = "Statistical Check Run Length 6+ Count Register\n\nYou can [`read`](crate::Reg::read) this register and get [`scr6pc::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
29pub struct Scr6pcSpec;
30impl crate::RegisterSpec for Scr6pcSpec {
31    type Ux = u32;
32}
33#[doc = "`read()` method returns [`scr6pc::R`](R) reader structure"]
34impl crate::Readable for Scr6pcSpec {}
35#[doc = "`reset()` method sets SCR6PC to value 0"]
36impl crate::Resettable for Scr6pcSpec {}