mimxrt685s_pac/trng/
scr4l.rs1#[doc = "Register `SCR4L` reader"]
2pub type R = crate::R<Scr4lSpec>;
3#[doc = "Register `SCR4L` writer"]
4pub type W = crate::W<Scr4lSpec>;
5#[doc = "Field `RUN4_MAX` reader - Run Length 4 Maximum Limit"]
6pub type Run4MaxR = crate::FieldReader<u16>;
7#[doc = "Field `RUN4_MAX` writer - Run Length 4 Maximum Limit"]
8pub type Run4MaxW<'a, REG> = crate::FieldWriter<'a, REG, 12, u16>;
9#[doc = "Field `RUN4_RNG` reader - Run Length 4 Range"]
10pub type Run4RngR = crate::FieldReader<u16>;
11#[doc = "Field `RUN4_RNG` writer - Run Length 4 Range"]
12pub type Run4RngW<'a, REG> = crate::FieldWriter<'a, REG, 12, u16>;
13impl R {
14 #[doc = "Bits 0:11 - Run Length 4 Maximum Limit"]
15 #[inline(always)]
16 pub fn run4_max(&self) -> Run4MaxR {
17 Run4MaxR::new((self.bits & 0x0fff) as u16)
18 }
19 #[doc = "Bits 16:27 - Run Length 4 Range"]
20 #[inline(always)]
21 pub fn run4_rng(&self) -> Run4RngR {
22 Run4RngR::new(((self.bits >> 16) & 0x0fff) as u16)
23 }
24}
25#[cfg(feature = "debug")]
26impl core::fmt::Debug for R {
27 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
28 f.debug_struct("SCR4L")
29 .field("run4_max", &self.run4_max())
30 .field("run4_rng", &self.run4_rng())
31 .finish()
32 }
33}
34impl W {
35 #[doc = "Bits 0:11 - Run Length 4 Maximum Limit"]
36 #[inline(always)]
37 pub fn run4_max(&mut self) -> Run4MaxW<Scr4lSpec> {
38 Run4MaxW::new(self, 0)
39 }
40 #[doc = "Bits 16:27 - Run Length 4 Range"]
41 #[inline(always)]
42 pub fn run4_rng(&mut self) -> Run4RngW<Scr4lSpec> {
43 Run4RngW::new(self, 16)
44 }
45}
46#[doc = "Statistical Check Run Length 4 Limit Register\n\nYou can [`read`](crate::Reg::read) this register and get [`scr4l::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`scr4l::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
47pub struct Scr4lSpec;
48impl crate::RegisterSpec for Scr4lSpec {
49 type Ux = u32;
50}
51#[doc = "`read()` method returns [`scr4l::R`](R) reader structure"]
52impl crate::Readable for Scr4lSpec {}
53#[doc = "`write(|w| ..)` method takes [`scr4l::W`](W) writer structure"]
54impl crate::Writable for Scr4lSpec {
55 type Safety = crate::Unsafe;
56 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
57 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
58}
59#[doc = "`reset()` method sets SCR4L to value 0x0040_004b"]
60impl crate::Resettable for Scr4lSpec {
61 const RESET_VALUE: u32 = 0x0040_004b;
62}