1#[doc = "Register `CYCLE1` reader"]
2pub type R = crate::R<Cycle1Spec>;
3#[doc = "Register `CYCLE1` writer"]
4pub type W = crate::W<Cycle1Spec>;
5#[doc = "Field `NWE_CYCLE` reader - Total Write Cycle Length"]
6pub type NweCycleR = crate::FieldReader<u16>;
7#[doc = "Field `NWE_CYCLE` writer - Total Write Cycle Length"]
8pub type NweCycleW<'a, REG> = crate::FieldWriter<'a, REG, 9, u16>;
9#[doc = "Field `NRD_CYCLE` reader - Total Read Cycle Length"]
10pub type NrdCycleR = crate::FieldReader<u16>;
11#[doc = "Field `NRD_CYCLE` writer - Total Read Cycle Length"]
12pub type NrdCycleW<'a, REG> = crate::FieldWriter<'a, REG, 9, u16>;
13impl R {
14 #[doc = "Bits 0:8 - Total Write Cycle Length"]
15 #[inline(always)]
16 pub fn nwe_cycle(&self) -> NweCycleR {
17 NweCycleR::new((self.bits & 0x01ff) as u16)
18 }
19 #[doc = "Bits 16:24 - Total Read Cycle Length"]
20 #[inline(always)]
21 pub fn nrd_cycle(&self) -> NrdCycleR {
22 NrdCycleR::new(((self.bits >> 16) & 0x01ff) as u16)
23 }
24}
25impl W {
26 #[doc = "Bits 0:8 - Total Write Cycle Length"]
27 #[inline(always)]
28 #[must_use]
29 pub fn nwe_cycle(&mut self) -> NweCycleW<Cycle1Spec> {
30 NweCycleW::new(self, 0)
31 }
32 #[doc = "Bits 16:24 - Total Read Cycle Length"]
33 #[inline(always)]
34 #[must_use]
35 pub fn nrd_cycle(&mut self) -> NrdCycleW<Cycle1Spec> {
36 NrdCycleW::new(self, 16)
37 }
38}
39#[doc = "SMC Cycle Register (CS_number = 1)\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`cycle1::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`cycle1::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
40pub struct Cycle1Spec;
41impl crate::RegisterSpec for Cycle1Spec {
42 type Ux = u32;
43}
44#[doc = "`read()` method returns [`cycle1::R`](R) reader structure"]
45impl crate::Readable for Cycle1Spec {}
46#[doc = "`write(|w| ..)` method takes [`cycle1::W`](W) writer structure"]
47impl crate::Writable for Cycle1Spec {
48 type Safety = crate::Unsafe;
49 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
50 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
51}
52#[doc = "`reset()` method sets CYCLE1 to value 0x0003_0003"]
53impl crate::Resettable for Cycle1Spec {
54 const RESET_VALUE: u32 = 0x0003_0003;
55}