1#[doc = "Register `SCR3L` reader"]
2pub type R = crate::R<Scr3lSpec>;
3#[doc = "Register `SCR3L` writer"]
4pub type W = crate::W<Scr3lSpec>;
5#[doc = "Field `RUN3_MAX` reader - Run Length 3 Maximum Limit"]
6pub type Run3MaxR = crate::FieldReader<u16>;
7#[doc = "Field `RUN3_MAX` writer - Run Length 3 Maximum Limit"]
8pub type Run3MaxW<'a, REG> = crate::FieldWriter<'a, REG, 13, u16>;
9#[doc = "Field `RUN3_RNG` reader - Run Length 3 Range"]
10pub type Run3RngR = crate::FieldReader<u16>;
11#[doc = "Field `RUN3_RNG` writer - Run Length 3 Range"]
12pub type Run3RngW<'a, REG> = crate::FieldWriter<'a, REG, 13, u16>;
13impl R {
14 #[doc = "Bits 0:12 - Run Length 3 Maximum Limit"]
15 #[inline(always)]
16 pub fn run3_max(&self) -> Run3MaxR {
17 Run3MaxR::new((self.bits & 0x1fff) as u16)
18 }
19 #[doc = "Bits 16:28 - Run Length 3 Range"]
20 #[inline(always)]
21 pub fn run3_rng(&self) -> Run3RngR {
22 Run3RngR::new(((self.bits >> 16) & 0x1fff) 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("SCR3L")
29 .field("run3_max", &self.run3_max())
30 .field("run3_rng", &self.run3_rng())
31 .finish()
32 }
33}
34impl W {
35 #[doc = "Bits 0:12 - Run Length 3 Maximum Limit"]
36 #[inline(always)]
37 pub fn run3_max(&mut self) -> Run3MaxW<'_, Scr3lSpec> {
38 Run3MaxW::new(self, 0)
39 }
40 #[doc = "Bits 16:28 - Run Length 3 Range"]
41 #[inline(always)]
42 pub fn run3_rng(&mut self) -> Run3RngW<'_, Scr3lSpec> {
43 Run3RngW::new(self, 16)
44 }
45}
46#[doc = "Statistical Check Run Length 3 Limit Register\n\nYou can [`read`](crate::Reg::read) this register and get [`scr3l::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`scr3l::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
47pub struct Scr3lSpec;
48impl crate::RegisterSpec for Scr3lSpec {
49 type Ux = u32;
50}
51#[doc = "`read()` method returns [`scr3l::R`](R) reader structure"]
52impl crate::Readable for Scr3lSpec {}
53#[doc = "`write(|w| ..)` method takes [`scr3l::W`](W) writer structure"]
54impl crate::Writable for Scr3lSpec {
55 type Safety = crate::Unsafe;
56}
57#[doc = "`reset()` method sets SCR3L to value 0x002d_0037"]
58impl crate::Resettable for Scr3lSpec {
59 const RESET_VALUE: u32 = 0x002d_0037;
60}