Skip to main content

mcxa_pac/trng0/
pkrcntba.rs

1#[doc = "Register `PKRCNTBA` reader"]
2pub type R = crate::R<PkrcntbaSpec>;
3#[doc = "Field `PKR_A_CT` reader - Poker Ah Count"]
4pub type PkrACtR = crate::FieldReader<u16>;
5#[doc = "Field `PKR_B_CT` reader - Poker Bh Count"]
6pub type PkrBCtR = crate::FieldReader<u16>;
7impl R {
8    #[doc = "Bits 0:15 - Poker Ah Count"]
9    #[inline(always)]
10    pub fn pkr_a_ct(&self) -> PkrACtR {
11        PkrACtR::new((self.bits & 0xffff) as u16)
12    }
13    #[doc = "Bits 16:31 - Poker Bh Count"]
14    #[inline(always)]
15    pub fn pkr_b_ct(&self) -> PkrBCtR {
16        PkrBCtR::new(((self.bits >> 16) & 0xffff) 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("PKRCNTBA")
23            .field("pkr_a_ct", &self.pkr_a_ct())
24            .field("pkr_b_ct", &self.pkr_b_ct())
25            .finish()
26    }
27}
28#[doc = "Statistical Check Poker Count B and A Register\n\nYou can [`read`](crate::Reg::read) this register and get [`pkrcntba::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
29pub struct PkrcntbaSpec;
30impl crate::RegisterSpec for PkrcntbaSpec {
31    type Ux = u32;
32}
33#[doc = "`read()` method returns [`pkrcntba::R`](R) reader structure"]
34impl crate::Readable for PkrcntbaSpec {}
35#[doc = "`reset()` method sets PKRCNTBA to value 0"]
36impl crate::Resettable for PkrcntbaSpec {}