s32k142w_pac/smc/
param.rs1#[doc = "Register `PARAM` reader"]
2pub struct R(crate::R<PARAM_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<PARAM_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<PARAM_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<PARAM_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Existence of HSRUN feature\n\nValue on reset: 0"]
17#[derive(Clone, Copy, Debug, PartialEq)]
18pub enum EHSRUN_A {
19 #[doc = "0: The feature is not available."]
20 EHSRUN_0 = 0,
21 #[doc = "1: The feature is available."]
22 EHSRUN_1 = 1,
23}
24impl From<EHSRUN_A> for bool {
25 #[inline(always)]
26 fn from(variant: EHSRUN_A) -> Self {
27 variant as u8 != 0
28 }
29}
30#[doc = "Field `EHSRUN` reader - Existence of HSRUN feature"]
31pub struct EHSRUN_R(crate::FieldReader<bool, EHSRUN_A>);
32impl EHSRUN_R {
33 #[inline(always)]
34 pub(crate) fn new(bits: bool) -> Self {
35 EHSRUN_R(crate::FieldReader::new(bits))
36 }
37 #[doc = r"Get enumerated values variant"]
38 #[inline(always)]
39 pub fn variant(&self) -> EHSRUN_A {
40 match self.bits {
41 false => EHSRUN_A::EHSRUN_0,
42 true => EHSRUN_A::EHSRUN_1,
43 }
44 }
45 #[doc = "Checks if the value of the field is `EHSRUN_0`"]
46 #[inline(always)]
47 pub fn is_ehsrun_0(&self) -> bool {
48 **self == EHSRUN_A::EHSRUN_0
49 }
50 #[doc = "Checks if the value of the field is `EHSRUN_1`"]
51 #[inline(always)]
52 pub fn is_ehsrun_1(&self) -> bool {
53 **self == EHSRUN_A::EHSRUN_1
54 }
55}
56impl core::ops::Deref for EHSRUN_R {
57 type Target = crate::FieldReader<bool, EHSRUN_A>;
58 #[inline(always)]
59 fn deref(&self) -> &Self::Target {
60 &self.0
61 }
62}
63#[doc = "Existence of LLS feature\n\nValue on reset: 0"]
64#[derive(Clone, Copy, Debug, PartialEq)]
65pub enum ELLS_A {
66 #[doc = "0: The feature is not available."]
67 ELLS_0 = 0,
68 #[doc = "1: The feature is available."]
69 ELLS_1 = 1,
70}
71impl From<ELLS_A> for bool {
72 #[inline(always)]
73 fn from(variant: ELLS_A) -> Self {
74 variant as u8 != 0
75 }
76}
77#[doc = "Field `ELLS` reader - Existence of LLS feature"]
78pub struct ELLS_R(crate::FieldReader<bool, ELLS_A>);
79impl ELLS_R {
80 #[inline(always)]
81 pub(crate) fn new(bits: bool) -> Self {
82 ELLS_R(crate::FieldReader::new(bits))
83 }
84 #[doc = r"Get enumerated values variant"]
85 #[inline(always)]
86 pub fn variant(&self) -> ELLS_A {
87 match self.bits {
88 false => ELLS_A::ELLS_0,
89 true => ELLS_A::ELLS_1,
90 }
91 }
92 #[doc = "Checks if the value of the field is `ELLS_0`"]
93 #[inline(always)]
94 pub fn is_ells_0(&self) -> bool {
95 **self == ELLS_A::ELLS_0
96 }
97 #[doc = "Checks if the value of the field is `ELLS_1`"]
98 #[inline(always)]
99 pub fn is_ells_1(&self) -> bool {
100 **self == ELLS_A::ELLS_1
101 }
102}
103impl core::ops::Deref for ELLS_R {
104 type Target = crate::FieldReader<bool, ELLS_A>;
105 #[inline(always)]
106 fn deref(&self) -> &Self::Target {
107 &self.0
108 }
109}
110#[doc = "Existence of LLS2 feature\n\nValue on reset: 0"]
111#[derive(Clone, Copy, Debug, PartialEq)]
112pub enum ELLS2_A {
113 #[doc = "0: The feature is not available."]
114 ELLS2_0 = 0,
115 #[doc = "1: The feature is available."]
116 ELLS2_1 = 1,
117}
118impl From<ELLS2_A> for bool {
119 #[inline(always)]
120 fn from(variant: ELLS2_A) -> Self {
121 variant as u8 != 0
122 }
123}
124#[doc = "Field `ELLS2` reader - Existence of LLS2 feature"]
125pub struct ELLS2_R(crate::FieldReader<bool, ELLS2_A>);
126impl ELLS2_R {
127 #[inline(always)]
128 pub(crate) fn new(bits: bool) -> Self {
129 ELLS2_R(crate::FieldReader::new(bits))
130 }
131 #[doc = r"Get enumerated values variant"]
132 #[inline(always)]
133 pub fn variant(&self) -> ELLS2_A {
134 match self.bits {
135 false => ELLS2_A::ELLS2_0,
136 true => ELLS2_A::ELLS2_1,
137 }
138 }
139 #[doc = "Checks if the value of the field is `ELLS2_0`"]
140 #[inline(always)]
141 pub fn is_ells2_0(&self) -> bool {
142 **self == ELLS2_A::ELLS2_0
143 }
144 #[doc = "Checks if the value of the field is `ELLS2_1`"]
145 #[inline(always)]
146 pub fn is_ells2_1(&self) -> bool {
147 **self == ELLS2_A::ELLS2_1
148 }
149}
150impl core::ops::Deref for ELLS2_R {
151 type Target = crate::FieldReader<bool, ELLS2_A>;
152 #[inline(always)]
153 fn deref(&self) -> &Self::Target {
154 &self.0
155 }
156}
157#[doc = "Existence of VLLS0 feature\n\nValue on reset: 0"]
158#[derive(Clone, Copy, Debug, PartialEq)]
159pub enum EVLLS0_A {
160 #[doc = "0: The feature is not available."]
161 EVLLS0_0 = 0,
162 #[doc = "1: The feature is available."]
163 EVLLS0_1 = 1,
164}
165impl From<EVLLS0_A> for bool {
166 #[inline(always)]
167 fn from(variant: EVLLS0_A) -> Self {
168 variant as u8 != 0
169 }
170}
171#[doc = "Field `EVLLS0` reader - Existence of VLLS0 feature"]
172pub struct EVLLS0_R(crate::FieldReader<bool, EVLLS0_A>);
173impl EVLLS0_R {
174 #[inline(always)]
175 pub(crate) fn new(bits: bool) -> Self {
176 EVLLS0_R(crate::FieldReader::new(bits))
177 }
178 #[doc = r"Get enumerated values variant"]
179 #[inline(always)]
180 pub fn variant(&self) -> EVLLS0_A {
181 match self.bits {
182 false => EVLLS0_A::EVLLS0_0,
183 true => EVLLS0_A::EVLLS0_1,
184 }
185 }
186 #[doc = "Checks if the value of the field is `EVLLS0_0`"]
187 #[inline(always)]
188 pub fn is_evlls0_0(&self) -> bool {
189 **self == EVLLS0_A::EVLLS0_0
190 }
191 #[doc = "Checks if the value of the field is `EVLLS0_1`"]
192 #[inline(always)]
193 pub fn is_evlls0_1(&self) -> bool {
194 **self == EVLLS0_A::EVLLS0_1
195 }
196}
197impl core::ops::Deref for EVLLS0_R {
198 type Target = crate::FieldReader<bool, EVLLS0_A>;
199 #[inline(always)]
200 fn deref(&self) -> &Self::Target {
201 &self.0
202 }
203}
204impl R {
205 #[doc = "Bit 0 - Existence of HSRUN feature"]
206 #[inline(always)]
207 pub fn ehsrun(&self) -> EHSRUN_R {
208 EHSRUN_R::new((self.bits & 0x01) != 0)
209 }
210 #[doc = "Bit 3 - Existence of LLS feature"]
211 #[inline(always)]
212 pub fn ells(&self) -> ELLS_R {
213 ELLS_R::new(((self.bits >> 3) & 0x01) != 0)
214 }
215 #[doc = "Bit 5 - Existence of LLS2 feature"]
216 #[inline(always)]
217 pub fn ells2(&self) -> ELLS2_R {
218 ELLS2_R::new(((self.bits >> 5) & 0x01) != 0)
219 }
220 #[doc = "Bit 6 - Existence of VLLS0 feature"]
221 #[inline(always)]
222 pub fn evlls0(&self) -> EVLLS0_R {
223 EVLLS0_R::new(((self.bits >> 6) & 0x01) != 0)
224 }
225}
226#[doc = "SMC Parameter Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [param](index.html) module"]
227pub struct PARAM_SPEC;
228impl crate::RegisterSpec for PARAM_SPEC {
229 type Ux = u32;
230}
231#[doc = "`read()` method returns [param::R](R) reader structure"]
232impl crate::Readable for PARAM_SPEC {
233 type Reader = R;
234}
235#[doc = "`reset()` method sets PARAM to value 0"]
236impl crate::Resettable for PARAM_SPEC {
237 #[inline(always)]
238 fn reset_value() -> Self::Ux {
239 0
240 }
241}