Skip to main content

mcxa_pac/trng0/
totsam.rs

1#[doc = "Register `TOTSAM` reader"]
2pub type R = crate::R<TotsamSpec>;
3#[doc = "Field `TOT_SAM` reader - Total Samples"]
4pub type TotSamR = crate::FieldReader<u32>;
5impl R {
6    #[doc = "Bits 0:19 - Total Samples"]
7    #[inline(always)]
8    pub fn tot_sam(&self) -> TotSamR {
9        TotSamR::new(self.bits & 0x000f_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("TOTSAM").field("tot_sam", &self.tot_sam()).finish()
16    }
17}
18#[doc = "Total Samples Register\n\nYou can [`read`](crate::Reg::read) this register and get [`totsam::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
19pub struct TotsamSpec;
20impl crate::RegisterSpec for TotsamSpec {
21    type Ux = u32;
22}
23#[doc = "`read()` method returns [`totsam::R`](R) reader structure"]
24impl crate::Readable for TotsamSpec {}
25#[doc = "`reset()` method sets TOTSAM to value 0"]
26impl crate::Resettable for TotsamSpec {}