1#[doc = "Register `PKC_CFG` reader"]
2pub type R = crate::R<PkcCfgSpec>;
3#[doc = "Register `PKC_CFG` writer"]
4pub type W = crate::W<PkcCfgSpec>;
5#[doc = "Field `IDLEOP` reader - Idle operation feature not available in this version (flag is don't care)."]
6pub type IdleopR = crate::BitReader;
7#[doc = "Field `IDLEOP` writer - Idle operation feature not available in this version (flag is don't care)."]
8pub type IdleopW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `RFU1` reader - RFU"]
10pub type Rfu1R = crate::BitReader;
11#[doc = "Field `RFU1` writer - RFU"]
12pub type Rfu1W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `RFU2` reader - RFU"]
14pub type Rfu2R = crate::BitReader;
15#[doc = "Field `RFU2` writer - RFU"]
16pub type Rfu2W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `CLKRND` reader - Clock randomization feature not available in this version (flag is don't care)."]
18pub type ClkrndR = crate::BitReader;
19#[doc = "Field `CLKRND` writer - Clock randomization feature not available in this version (flag is don't care)."]
20pub type ClkrndW<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `REDMULNOISE` reader - Noise in reduced multiplier mode feature not available in this version (flag is don't care)."]
22pub type RedmulnoiseR = crate::BitReader;
23#[doc = "Field `REDMULNOISE` writer - Noise in reduced multiplier mode feature not available in this version (flag is don't care)."]
24pub type RedmulnoiseW<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `RNDDLY` reader - Random delay feature not available in this version (flag is don't care)."]
26pub type RnddlyR = crate::FieldReader;
27#[doc = "Field `RNDDLY` writer - Random delay feature not available in this version (flag is don't care)."]
28pub type RnddlyW<'a, REG> = crate::FieldWriter<'a, REG, 3>;
29#[doc = "Field `SBXNOISE` reader - Noise feature not available in this version (flag is don't care)."]
30pub type SbxnoiseR = crate::BitReader;
31#[doc = "Field `SBXNOISE` writer - Noise feature not available in this version (flag is don't care)."]
32pub type SbxnoiseW<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `ALPNOISE` reader - Noise feature not available in this version (flag is don't care)."]
34pub type AlpnoiseR = crate::BitReader;
35#[doc = "Field `ALPNOISE` writer - Noise feature not available in this version (flag is don't care)."]
36pub type AlpnoiseW<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `FMULNOISE` reader - Noise feature not available in this version (flag is don't care)."]
38pub type FmulnoiseR = crate::BitReader;
39#[doc = "Field `FMULNOISE` writer - Noise feature not available in this version (flag is don't care)."]
40pub type FmulnoiseW<'a, REG> = crate::BitWriter<'a, REG>;
41impl R {
42 #[doc = "Bit 0 - Idle operation feature not available in this version (flag is don't care)."]
43 #[inline(always)]
44 pub fn idleop(&self) -> IdleopR {
45 IdleopR::new((self.bits & 1) != 0)
46 }
47 #[doc = "Bit 1 - RFU"]
48 #[inline(always)]
49 pub fn rfu1(&self) -> Rfu1R {
50 Rfu1R::new(((self.bits >> 1) & 1) != 0)
51 }
52 #[doc = "Bit 2 - RFU"]
53 #[inline(always)]
54 pub fn rfu2(&self) -> Rfu2R {
55 Rfu2R::new(((self.bits >> 2) & 1) != 0)
56 }
57 #[doc = "Bit 3 - Clock randomization feature not available in this version (flag is don't care)."]
58 #[inline(always)]
59 pub fn clkrnd(&self) -> ClkrndR {
60 ClkrndR::new(((self.bits >> 3) & 1) != 0)
61 }
62 #[doc = "Bit 4 - Noise in reduced multiplier mode feature not available in this version (flag is don't care)."]
63 #[inline(always)]
64 pub fn redmulnoise(&self) -> RedmulnoiseR {
65 RedmulnoiseR::new(((self.bits >> 4) & 1) != 0)
66 }
67 #[doc = "Bits 5:7 - Random delay feature not available in this version (flag is don't care)."]
68 #[inline(always)]
69 pub fn rnddly(&self) -> RnddlyR {
70 RnddlyR::new(((self.bits >> 5) & 7) as u8)
71 }
72 #[doc = "Bit 8 - Noise feature not available in this version (flag is don't care)."]
73 #[inline(always)]
74 pub fn sbxnoise(&self) -> SbxnoiseR {
75 SbxnoiseR::new(((self.bits >> 8) & 1) != 0)
76 }
77 #[doc = "Bit 9 - Noise feature not available in this version (flag is don't care)."]
78 #[inline(always)]
79 pub fn alpnoise(&self) -> AlpnoiseR {
80 AlpnoiseR::new(((self.bits >> 9) & 1) != 0)
81 }
82 #[doc = "Bit 10 - Noise feature not available in this version (flag is don't care)."]
83 #[inline(always)]
84 pub fn fmulnoise(&self) -> FmulnoiseR {
85 FmulnoiseR::new(((self.bits >> 10) & 1) != 0)
86 }
87}
88#[cfg(feature = "debug")]
89impl core::fmt::Debug for R {
90 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
91 f.debug_struct("PKC_CFG")
92 .field("idleop", &self.idleop())
93 .field("rfu1", &self.rfu1())
94 .field("rfu2", &self.rfu2())
95 .field("clkrnd", &self.clkrnd())
96 .field("redmulnoise", &self.redmulnoise())
97 .field("rnddly", &self.rnddly())
98 .field("sbxnoise", &self.sbxnoise())
99 .field("alpnoise", &self.alpnoise())
100 .field("fmulnoise", &self.fmulnoise())
101 .finish()
102 }
103}
104impl W {
105 #[doc = "Bit 0 - Idle operation feature not available in this version (flag is don't care)."]
106 #[inline(always)]
107 pub fn idleop(&mut self) -> IdleopW<'_, PkcCfgSpec> {
108 IdleopW::new(self, 0)
109 }
110 #[doc = "Bit 1 - RFU"]
111 #[inline(always)]
112 pub fn rfu1(&mut self) -> Rfu1W<'_, PkcCfgSpec> {
113 Rfu1W::new(self, 1)
114 }
115 #[doc = "Bit 2 - RFU"]
116 #[inline(always)]
117 pub fn rfu2(&mut self) -> Rfu2W<'_, PkcCfgSpec> {
118 Rfu2W::new(self, 2)
119 }
120 #[doc = "Bit 3 - Clock randomization feature not available in this version (flag is don't care)."]
121 #[inline(always)]
122 pub fn clkrnd(&mut self) -> ClkrndW<'_, PkcCfgSpec> {
123 ClkrndW::new(self, 3)
124 }
125 #[doc = "Bit 4 - Noise in reduced multiplier mode feature not available in this version (flag is don't care)."]
126 #[inline(always)]
127 pub fn redmulnoise(&mut self) -> RedmulnoiseW<'_, PkcCfgSpec> {
128 RedmulnoiseW::new(self, 4)
129 }
130 #[doc = "Bits 5:7 - Random delay feature not available in this version (flag is don't care)."]
131 #[inline(always)]
132 pub fn rnddly(&mut self) -> RnddlyW<'_, PkcCfgSpec> {
133 RnddlyW::new(self, 5)
134 }
135 #[doc = "Bit 8 - Noise feature not available in this version (flag is don't care)."]
136 #[inline(always)]
137 pub fn sbxnoise(&mut self) -> SbxnoiseW<'_, PkcCfgSpec> {
138 SbxnoiseW::new(self, 8)
139 }
140 #[doc = "Bit 9 - Noise feature not available in this version (flag is don't care)."]
141 #[inline(always)]
142 pub fn alpnoise(&mut self) -> AlpnoiseW<'_, PkcCfgSpec> {
143 AlpnoiseW::new(self, 9)
144 }
145 #[doc = "Bit 10 - Noise feature not available in this version (flag is don't care)."]
146 #[inline(always)]
147 pub fn fmulnoise(&mut self) -> FmulnoiseW<'_, PkcCfgSpec> {
148 FmulnoiseW::new(self, 10)
149 }
150}
151#[doc = "Configuration register\n\nYou can [`read`](crate::Reg::read) this register and get [`pkc_cfg::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pkc_cfg::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
152pub struct PkcCfgSpec;
153impl crate::RegisterSpec for PkcCfgSpec {
154 type Ux = u32;
155}
156#[doc = "`read()` method returns [`pkc_cfg::R`](R) reader structure"]
157impl crate::Readable for PkcCfgSpec {}
158#[doc = "`write(|w| ..)` method takes [`pkc_cfg::W`](W) writer structure"]
159impl crate::Writable for PkcCfgSpec {
160 type Safety = crate::Unsafe;
161}
162#[doc = "`reset()` method sets PKC_CFG to value 0x0719"]
163impl crate::Resettable for PkcCfgSpec {
164 const RESET_VALUE: u32 = 0x0719;
165}