Skip to main content

mcxa_pac/trng0/
scr4c.rs

1#[doc = "Register `SCR4C` reader"]
2pub type R = crate::R<Scr4cSpec>;
3#[doc = "Field `R4_0_CT` reader - Runs of Zero, Length 4 Count"]
4pub type R4_0CtR = crate::FieldReader<u16>;
5#[doc = "Field `R4_1_CT` reader - Runs of One, Length 4 Count"]
6pub type R4_1CtR = crate::FieldReader<u16>;
7impl R {
8    #[doc = "Bits 0:11 - Runs of Zero, Length 4 Count"]
9    #[inline(always)]
10    pub fn r4_0_ct(&self) -> R4_0CtR {
11        R4_0CtR::new((self.bits & 0x0fff) as u16)
12    }
13    #[doc = "Bits 16:27 - Runs of One, Length 4 Count"]
14    #[inline(always)]
15    pub fn r4_1_ct(&self) -> R4_1CtR {
16        R4_1CtR::new(((self.bits >> 16) & 0x0fff) 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("SCR4C")
23            .field("r4_0_ct", &self.r4_0_ct())
24            .field("r4_1_ct", &self.r4_1_ct())
25            .finish()
26    }
27}
28#[doc = "Statistical Check Run Length 4 Count Register\n\nYou can [`read`](crate::Reg::read) this register and get [`scr4c::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
29pub struct Scr4cSpec;
30impl crate::RegisterSpec for Scr4cSpec {
31    type Ux = u32;
32}
33#[doc = "`read()` method returns [`scr4c::R`](R) reader structure"]
34impl crate::Readable for Scr4cSpec {}
35#[doc = "`reset()` method sets SCR4C to value 0"]
36impl crate::Resettable for Scr4cSpec {}