1#[doc = "Register `SETUP3` reader"]
2pub type R = crate::R<Setup3Spec>;
3#[doc = "Register `SETUP3` writer"]
4pub type W = crate::W<Setup3Spec>;
5#[doc = "Field `NWE_SETUP` reader - NWE Setup Length"]
6pub type NweSetupR = crate::FieldReader;
7#[doc = "Field `NWE_SETUP` writer - NWE Setup Length"]
8pub type NweSetupW<'a, REG> = crate::FieldWriter<'a, REG, 6>;
9#[doc = "Field `NCS_WR_SETUP` reader - NCS Setup Length in Write Access"]
10pub type NcsWrSetupR = crate::FieldReader;
11#[doc = "Field `NCS_WR_SETUP` writer - NCS Setup Length in Write Access"]
12pub type NcsWrSetupW<'a, REG> = crate::FieldWriter<'a, REG, 6>;
13#[doc = "Field `NRD_SETUP` reader - NRD Setup Length"]
14pub type NrdSetupR = crate::FieldReader;
15#[doc = "Field `NRD_SETUP` writer - NRD Setup Length"]
16pub type NrdSetupW<'a, REG> = crate::FieldWriter<'a, REG, 6>;
17#[doc = "Field `NCS_RD_SETUP` reader - NCS Setup Length in Read Access"]
18pub type NcsRdSetupR = crate::FieldReader;
19#[doc = "Field `NCS_RD_SETUP` writer - NCS Setup Length in Read Access"]
20pub type NcsRdSetupW<'a, REG> = crate::FieldWriter<'a, REG, 6>;
21impl R {
22    #[doc = "Bits 0:5 - NWE Setup Length"]
23    #[inline(always)]
24    pub fn nwe_setup(&self) -> NweSetupR {
25        NweSetupR::new((self.bits & 0x3f) as u8)
26    }
27    #[doc = "Bits 8:13 - NCS Setup Length in Write Access"]
28    #[inline(always)]
29    pub fn ncs_wr_setup(&self) -> NcsWrSetupR {
30        NcsWrSetupR::new(((self.bits >> 8) & 0x3f) as u8)
31    }
32    #[doc = "Bits 16:21 - NRD Setup Length"]
33    #[inline(always)]
34    pub fn nrd_setup(&self) -> NrdSetupR {
35        NrdSetupR::new(((self.bits >> 16) & 0x3f) as u8)
36    }
37    #[doc = "Bits 24:29 - NCS Setup Length in Read Access"]
38    #[inline(always)]
39    pub fn ncs_rd_setup(&self) -> NcsRdSetupR {
40        NcsRdSetupR::new(((self.bits >> 24) & 0x3f) as u8)
41    }
42}
43impl W {
44    #[doc = "Bits 0:5 - NWE Setup Length"]
45    #[inline(always)]
46    #[must_use]
47    pub fn nwe_setup(&mut self) -> NweSetupW<Setup3Spec> {
48        NweSetupW::new(self, 0)
49    }
50    #[doc = "Bits 8:13 - NCS Setup Length in Write Access"]
51    #[inline(always)]
52    #[must_use]
53    pub fn ncs_wr_setup(&mut self) -> NcsWrSetupW<Setup3Spec> {
54        NcsWrSetupW::new(self, 8)
55    }
56    #[doc = "Bits 16:21 - NRD Setup Length"]
57    #[inline(always)]
58    #[must_use]
59    pub fn nrd_setup(&mut self) -> NrdSetupW<Setup3Spec> {
60        NrdSetupW::new(self, 16)
61    }
62    #[doc = "Bits 24:29 - NCS Setup Length in Read Access"]
63    #[inline(always)]
64    #[must_use]
65    pub fn ncs_rd_setup(&mut self) -> NcsRdSetupW<Setup3Spec> {
66        NcsRdSetupW::new(self, 24)
67    }
68}
69#[doc = "SMC Setup Register (CS_number = 3)\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`setup3::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 [`setup3::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
70pub struct Setup3Spec;
71impl crate::RegisterSpec for Setup3Spec {
72    type Ux = u32;
73}
74#[doc = "`read()` method returns [`setup3::R`](R) reader structure"]
75impl crate::Readable for Setup3Spec {}
76#[doc = "`write(|w| ..)` method takes [`setup3::W`](W) writer structure"]
77impl crate::Writable for Setup3Spec {
78    type Safety = crate::Unsafe;
79    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
80    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
81}
82#[doc = "`reset()` method sets SETUP3 to value 0x0101_0101"]
83impl crate::Resettable for Setup3Spec {
84    const RESET_VALUE: u32 = 0x0101_0101;
85}