1#[doc = "Register `SCMISC` reader"]
2pub type R = crate::R<ScmiscSpec>;
3#[doc = "Register `SCMISC` writer"]
4pub type W = crate::W<ScmiscSpec>;
5#[doc = "Field `LRUN_MAX` reader - Long run max limit"]
6pub type LrunMaxR = crate::FieldReader;
7#[doc = "Field `LRUN_MAX` writer - Long run max limit"]
8pub type LrunMaxW<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9#[doc = "Field `RTY_CT` reader - Retry count"]
10pub type RtyCtR = crate::FieldReader;
11#[doc = "Field `RTY_CT` writer - Retry count"]
12pub type RtyCtW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
13impl R {
14 #[doc = "Bits 0:7 - Long run max limit"]
15 #[inline(always)]
16 pub fn lrun_max(&self) -> LrunMaxR {
17 LrunMaxR::new((self.bits & 0xff) as u8)
18 }
19 #[doc = "Bits 16:19 - Retry count"]
20 #[inline(always)]
21 pub fn rty_ct(&self) -> RtyCtR {
22 RtyCtR::new(((self.bits >> 16) & 0x0f) as u8)
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("SCMISC")
29 .field("lrun_max", &self.lrun_max())
30 .field("rty_ct", &self.rty_ct())
31 .finish()
32 }
33}
34impl W {
35 #[doc = "Bits 0:7 - Long run max limit"]
36 #[inline(always)]
37 pub fn lrun_max(&mut self) -> LrunMaxW<'_, ScmiscSpec> {
38 LrunMaxW::new(self, 0)
39 }
40 #[doc = "Bits 16:19 - Retry count"]
41 #[inline(always)]
42 pub fn rty_ct(&mut self) -> RtyCtW<'_, ScmiscSpec> {
43 RtyCtW::new(self, 16)
44 }
45}
46#[doc = "Statistical Check Miscellaneous Register\n\nYou can [`read`](crate::Reg::read) this register and get [`scmisc::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`scmisc::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
47pub struct ScmiscSpec;
48impl crate::RegisterSpec for ScmiscSpec {
49 type Ux = u32;
50}
51#[doc = "`read()` method returns [`scmisc::R`](R) reader structure"]
52impl crate::Readable for ScmiscSpec {}
53#[doc = "`write(|w| ..)` method takes [`scmisc::W`](W) writer structure"]
54impl crate::Writable for ScmiscSpec {
55 type Safety = crate::Unsafe;
56}
57#[doc = "`reset()` method sets SCMISC to value 0x0001_001f"]
58impl crate::Resettable for ScmiscSpec {
59 const RESET_VALUE: u32 = 0x0001_001f;
60}