efm32jg12b_pac/efm32jg12b500/emu/
ien.rs1#[doc = "Register `IEN` reader"]
2pub struct R(crate::R<IEN_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<IEN_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<IEN_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<IEN_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `IEN` writer"]
17pub struct W(crate::W<IEN_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<IEN_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<IEN_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<IEN_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `VMONAVDDFALL` reader - VMONAVDDFALL Interrupt Enable"]
38pub type VMONAVDDFALL_R = crate::BitReader<bool>;
39#[doc = "Field `VMONAVDDFALL` writer - VMONAVDDFALL Interrupt Enable"]
40pub type VMONAVDDFALL_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
41#[doc = "Field `VMONAVDDRISE` reader - VMONAVDDRISE Interrupt Enable"]
42pub type VMONAVDDRISE_R = crate::BitReader<bool>;
43#[doc = "Field `VMONAVDDRISE` writer - VMONAVDDRISE Interrupt Enable"]
44pub type VMONAVDDRISE_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
45#[doc = "Field `VMONALTAVDDFALL` reader - VMONALTAVDDFALL Interrupt Enable"]
46pub type VMONALTAVDDFALL_R = crate::BitReader<bool>;
47#[doc = "Field `VMONALTAVDDFALL` writer - VMONALTAVDDFALL Interrupt Enable"]
48pub type VMONALTAVDDFALL_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
49#[doc = "Field `VMONALTAVDDRISE` reader - VMONALTAVDDRISE Interrupt Enable"]
50pub type VMONALTAVDDRISE_R = crate::BitReader<bool>;
51#[doc = "Field `VMONALTAVDDRISE` writer - VMONALTAVDDRISE Interrupt Enable"]
52pub type VMONALTAVDDRISE_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
53#[doc = "Field `VMONDVDDFALL` reader - VMONDVDDFALL Interrupt Enable"]
54pub type VMONDVDDFALL_R = crate::BitReader<bool>;
55#[doc = "Field `VMONDVDDFALL` writer - VMONDVDDFALL Interrupt Enable"]
56pub type VMONDVDDFALL_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
57#[doc = "Field `VMONDVDDRISE` reader - VMONDVDDRISE Interrupt Enable"]
58pub type VMONDVDDRISE_R = crate::BitReader<bool>;
59#[doc = "Field `VMONDVDDRISE` writer - VMONDVDDRISE Interrupt Enable"]
60pub type VMONDVDDRISE_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
61#[doc = "Field `VMONIO0FALL` reader - VMONIO0FALL Interrupt Enable"]
62pub type VMONIO0FALL_R = crate::BitReader<bool>;
63#[doc = "Field `VMONIO0FALL` writer - VMONIO0FALL Interrupt Enable"]
64pub type VMONIO0FALL_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
65#[doc = "Field `VMONIO0RISE` reader - VMONIO0RISE Interrupt Enable"]
66pub type VMONIO0RISE_R = crate::BitReader<bool>;
67#[doc = "Field `VMONIO0RISE` writer - VMONIO0RISE Interrupt Enable"]
68pub type VMONIO0RISE_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
69#[doc = "Field `VMONFVDDFALL` reader - VMONFVDDFALL Interrupt Enable"]
70pub type VMONFVDDFALL_R = crate::BitReader<bool>;
71#[doc = "Field `VMONFVDDFALL` writer - VMONFVDDFALL Interrupt Enable"]
72pub type VMONFVDDFALL_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
73#[doc = "Field `VMONFVDDRISE` reader - VMONFVDDRISE Interrupt Enable"]
74pub type VMONFVDDRISE_R = crate::BitReader<bool>;
75#[doc = "Field `VMONFVDDRISE` writer - VMONFVDDRISE Interrupt Enable"]
76pub type VMONFVDDRISE_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
77#[doc = "Field `PFETOVERCURRENTLIMIT` reader - PFETOVERCURRENTLIMIT Interrupt Enable"]
78pub type PFETOVERCURRENTLIMIT_R = crate::BitReader<bool>;
79#[doc = "Field `PFETOVERCURRENTLIMIT` writer - PFETOVERCURRENTLIMIT Interrupt Enable"]
80pub type PFETOVERCURRENTLIMIT_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
81#[doc = "Field `NFETOVERCURRENTLIMIT` reader - NFETOVERCURRENTLIMIT Interrupt Enable"]
82pub type NFETOVERCURRENTLIMIT_R = crate::BitReader<bool>;
83#[doc = "Field `NFETOVERCURRENTLIMIT` writer - NFETOVERCURRENTLIMIT Interrupt Enable"]
84pub type NFETOVERCURRENTLIMIT_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
85#[doc = "Field `DCDCLPRUNNING` reader - DCDCLPRUNNING Interrupt Enable"]
86pub type DCDCLPRUNNING_R = crate::BitReader<bool>;
87#[doc = "Field `DCDCLPRUNNING` writer - DCDCLPRUNNING Interrupt Enable"]
88pub type DCDCLPRUNNING_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
89#[doc = "Field `DCDCLNRUNNING` reader - DCDCLNRUNNING Interrupt Enable"]
90pub type DCDCLNRUNNING_R = crate::BitReader<bool>;
91#[doc = "Field `DCDCLNRUNNING` writer - DCDCLNRUNNING Interrupt Enable"]
92pub type DCDCLNRUNNING_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
93#[doc = "Field `DCDCINBYPASS` reader - DCDCINBYPASS Interrupt Enable"]
94pub type DCDCINBYPASS_R = crate::BitReader<bool>;
95#[doc = "Field `DCDCINBYPASS` writer - DCDCINBYPASS Interrupt Enable"]
96pub type DCDCINBYPASS_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
97#[doc = "Field `EM23WAKEUP` reader - EM23WAKEUP Interrupt Enable"]
98pub type EM23WAKEUP_R = crate::BitReader<bool>;
99#[doc = "Field `EM23WAKEUP` writer - EM23WAKEUP Interrupt Enable"]
100pub type EM23WAKEUP_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
101#[doc = "Field `VSCALEDONE` reader - VSCALEDONE Interrupt Enable"]
102pub type VSCALEDONE_R = crate::BitReader<bool>;
103#[doc = "Field `VSCALEDONE` writer - VSCALEDONE Interrupt Enable"]
104pub type VSCALEDONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
105#[doc = "Field `TEMP` reader - TEMP Interrupt Enable"]
106pub type TEMP_R = crate::BitReader<bool>;
107#[doc = "Field `TEMP` writer - TEMP Interrupt Enable"]
108pub type TEMP_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
109#[doc = "Field `TEMPLOW` reader - TEMPLOW Interrupt Enable"]
110pub type TEMPLOW_R = crate::BitReader<bool>;
111#[doc = "Field `TEMPLOW` writer - TEMPLOW Interrupt Enable"]
112pub type TEMPLOW_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
113#[doc = "Field `TEMPHIGH` reader - TEMPHIGH Interrupt Enable"]
114pub type TEMPHIGH_R = crate::BitReader<bool>;
115#[doc = "Field `TEMPHIGH` writer - TEMPHIGH Interrupt Enable"]
116pub type TEMPHIGH_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
117impl R {
118 #[doc = "Bit 0 - VMONAVDDFALL Interrupt Enable"]
119 #[inline(always)]
120 pub fn vmonavddfall(&self) -> VMONAVDDFALL_R {
121 VMONAVDDFALL_R::new((self.bits & 1) != 0)
122 }
123 #[doc = "Bit 1 - VMONAVDDRISE Interrupt Enable"]
124 #[inline(always)]
125 pub fn vmonavddrise(&self) -> VMONAVDDRISE_R {
126 VMONAVDDRISE_R::new(((self.bits >> 1) & 1) != 0)
127 }
128 #[doc = "Bit 2 - VMONALTAVDDFALL Interrupt Enable"]
129 #[inline(always)]
130 pub fn vmonaltavddfall(&self) -> VMONALTAVDDFALL_R {
131 VMONALTAVDDFALL_R::new(((self.bits >> 2) & 1) != 0)
132 }
133 #[doc = "Bit 3 - VMONALTAVDDRISE Interrupt Enable"]
134 #[inline(always)]
135 pub fn vmonaltavddrise(&self) -> VMONALTAVDDRISE_R {
136 VMONALTAVDDRISE_R::new(((self.bits >> 3) & 1) != 0)
137 }
138 #[doc = "Bit 4 - VMONDVDDFALL Interrupt Enable"]
139 #[inline(always)]
140 pub fn vmondvddfall(&self) -> VMONDVDDFALL_R {
141 VMONDVDDFALL_R::new(((self.bits >> 4) & 1) != 0)
142 }
143 #[doc = "Bit 5 - VMONDVDDRISE Interrupt Enable"]
144 #[inline(always)]
145 pub fn vmondvddrise(&self) -> VMONDVDDRISE_R {
146 VMONDVDDRISE_R::new(((self.bits >> 5) & 1) != 0)
147 }
148 #[doc = "Bit 6 - VMONIO0FALL Interrupt Enable"]
149 #[inline(always)]
150 pub fn vmonio0fall(&self) -> VMONIO0FALL_R {
151 VMONIO0FALL_R::new(((self.bits >> 6) & 1) != 0)
152 }
153 #[doc = "Bit 7 - VMONIO0RISE Interrupt Enable"]
154 #[inline(always)]
155 pub fn vmonio0rise(&self) -> VMONIO0RISE_R {
156 VMONIO0RISE_R::new(((self.bits >> 7) & 1) != 0)
157 }
158 #[doc = "Bit 14 - VMONFVDDFALL Interrupt Enable"]
159 #[inline(always)]
160 pub fn vmonfvddfall(&self) -> VMONFVDDFALL_R {
161 VMONFVDDFALL_R::new(((self.bits >> 14) & 1) != 0)
162 }
163 #[doc = "Bit 15 - VMONFVDDRISE Interrupt Enable"]
164 #[inline(always)]
165 pub fn vmonfvddrise(&self) -> VMONFVDDRISE_R {
166 VMONFVDDRISE_R::new(((self.bits >> 15) & 1) != 0)
167 }
168 #[doc = "Bit 16 - PFETOVERCURRENTLIMIT Interrupt Enable"]
169 #[inline(always)]
170 pub fn pfetovercurrentlimit(&self) -> PFETOVERCURRENTLIMIT_R {
171 PFETOVERCURRENTLIMIT_R::new(((self.bits >> 16) & 1) != 0)
172 }
173 #[doc = "Bit 17 - NFETOVERCURRENTLIMIT Interrupt Enable"]
174 #[inline(always)]
175 pub fn nfetovercurrentlimit(&self) -> NFETOVERCURRENTLIMIT_R {
176 NFETOVERCURRENTLIMIT_R::new(((self.bits >> 17) & 1) != 0)
177 }
178 #[doc = "Bit 18 - DCDCLPRUNNING Interrupt Enable"]
179 #[inline(always)]
180 pub fn dcdclprunning(&self) -> DCDCLPRUNNING_R {
181 DCDCLPRUNNING_R::new(((self.bits >> 18) & 1) != 0)
182 }
183 #[doc = "Bit 19 - DCDCLNRUNNING Interrupt Enable"]
184 #[inline(always)]
185 pub fn dcdclnrunning(&self) -> DCDCLNRUNNING_R {
186 DCDCLNRUNNING_R::new(((self.bits >> 19) & 1) != 0)
187 }
188 #[doc = "Bit 20 - DCDCINBYPASS Interrupt Enable"]
189 #[inline(always)]
190 pub fn dcdcinbypass(&self) -> DCDCINBYPASS_R {
191 DCDCINBYPASS_R::new(((self.bits >> 20) & 1) != 0)
192 }
193 #[doc = "Bit 24 - EM23WAKEUP Interrupt Enable"]
194 #[inline(always)]
195 pub fn em23wakeup(&self) -> EM23WAKEUP_R {
196 EM23WAKEUP_R::new(((self.bits >> 24) & 1) != 0)
197 }
198 #[doc = "Bit 25 - VSCALEDONE Interrupt Enable"]
199 #[inline(always)]
200 pub fn vscaledone(&self) -> VSCALEDONE_R {
201 VSCALEDONE_R::new(((self.bits >> 25) & 1) != 0)
202 }
203 #[doc = "Bit 29 - TEMP Interrupt Enable"]
204 #[inline(always)]
205 pub fn temp(&self) -> TEMP_R {
206 TEMP_R::new(((self.bits >> 29) & 1) != 0)
207 }
208 #[doc = "Bit 30 - TEMPLOW Interrupt Enable"]
209 #[inline(always)]
210 pub fn templow(&self) -> TEMPLOW_R {
211 TEMPLOW_R::new(((self.bits >> 30) & 1) != 0)
212 }
213 #[doc = "Bit 31 - TEMPHIGH Interrupt Enable"]
214 #[inline(always)]
215 pub fn temphigh(&self) -> TEMPHIGH_R {
216 TEMPHIGH_R::new(((self.bits >> 31) & 1) != 0)
217 }
218}
219impl W {
220 #[doc = "Bit 0 - VMONAVDDFALL Interrupt Enable"]
221 #[inline(always)]
222 #[must_use]
223 pub fn vmonavddfall(&mut self) -> VMONAVDDFALL_W<0> {
224 VMONAVDDFALL_W::new(self)
225 }
226 #[doc = "Bit 1 - VMONAVDDRISE Interrupt Enable"]
227 #[inline(always)]
228 #[must_use]
229 pub fn vmonavddrise(&mut self) -> VMONAVDDRISE_W<1> {
230 VMONAVDDRISE_W::new(self)
231 }
232 #[doc = "Bit 2 - VMONALTAVDDFALL Interrupt Enable"]
233 #[inline(always)]
234 #[must_use]
235 pub fn vmonaltavddfall(&mut self) -> VMONALTAVDDFALL_W<2> {
236 VMONALTAVDDFALL_W::new(self)
237 }
238 #[doc = "Bit 3 - VMONALTAVDDRISE Interrupt Enable"]
239 #[inline(always)]
240 #[must_use]
241 pub fn vmonaltavddrise(&mut self) -> VMONALTAVDDRISE_W<3> {
242 VMONALTAVDDRISE_W::new(self)
243 }
244 #[doc = "Bit 4 - VMONDVDDFALL Interrupt Enable"]
245 #[inline(always)]
246 #[must_use]
247 pub fn vmondvddfall(&mut self) -> VMONDVDDFALL_W<4> {
248 VMONDVDDFALL_W::new(self)
249 }
250 #[doc = "Bit 5 - VMONDVDDRISE Interrupt Enable"]
251 #[inline(always)]
252 #[must_use]
253 pub fn vmondvddrise(&mut self) -> VMONDVDDRISE_W<5> {
254 VMONDVDDRISE_W::new(self)
255 }
256 #[doc = "Bit 6 - VMONIO0FALL Interrupt Enable"]
257 #[inline(always)]
258 #[must_use]
259 pub fn vmonio0fall(&mut self) -> VMONIO0FALL_W<6> {
260 VMONIO0FALL_W::new(self)
261 }
262 #[doc = "Bit 7 - VMONIO0RISE Interrupt Enable"]
263 #[inline(always)]
264 #[must_use]
265 pub fn vmonio0rise(&mut self) -> VMONIO0RISE_W<7> {
266 VMONIO0RISE_W::new(self)
267 }
268 #[doc = "Bit 14 - VMONFVDDFALL Interrupt Enable"]
269 #[inline(always)]
270 #[must_use]
271 pub fn vmonfvddfall(&mut self) -> VMONFVDDFALL_W<14> {
272 VMONFVDDFALL_W::new(self)
273 }
274 #[doc = "Bit 15 - VMONFVDDRISE Interrupt Enable"]
275 #[inline(always)]
276 #[must_use]
277 pub fn vmonfvddrise(&mut self) -> VMONFVDDRISE_W<15> {
278 VMONFVDDRISE_W::new(self)
279 }
280 #[doc = "Bit 16 - PFETOVERCURRENTLIMIT Interrupt Enable"]
281 #[inline(always)]
282 #[must_use]
283 pub fn pfetovercurrentlimit(&mut self) -> PFETOVERCURRENTLIMIT_W<16> {
284 PFETOVERCURRENTLIMIT_W::new(self)
285 }
286 #[doc = "Bit 17 - NFETOVERCURRENTLIMIT Interrupt Enable"]
287 #[inline(always)]
288 #[must_use]
289 pub fn nfetovercurrentlimit(&mut self) -> NFETOVERCURRENTLIMIT_W<17> {
290 NFETOVERCURRENTLIMIT_W::new(self)
291 }
292 #[doc = "Bit 18 - DCDCLPRUNNING Interrupt Enable"]
293 #[inline(always)]
294 #[must_use]
295 pub fn dcdclprunning(&mut self) -> DCDCLPRUNNING_W<18> {
296 DCDCLPRUNNING_W::new(self)
297 }
298 #[doc = "Bit 19 - DCDCLNRUNNING Interrupt Enable"]
299 #[inline(always)]
300 #[must_use]
301 pub fn dcdclnrunning(&mut self) -> DCDCLNRUNNING_W<19> {
302 DCDCLNRUNNING_W::new(self)
303 }
304 #[doc = "Bit 20 - DCDCINBYPASS Interrupt Enable"]
305 #[inline(always)]
306 #[must_use]
307 pub fn dcdcinbypass(&mut self) -> DCDCINBYPASS_W<20> {
308 DCDCINBYPASS_W::new(self)
309 }
310 #[doc = "Bit 24 - EM23WAKEUP Interrupt Enable"]
311 #[inline(always)]
312 #[must_use]
313 pub fn em23wakeup(&mut self) -> EM23WAKEUP_W<24> {
314 EM23WAKEUP_W::new(self)
315 }
316 #[doc = "Bit 25 - VSCALEDONE Interrupt Enable"]
317 #[inline(always)]
318 #[must_use]
319 pub fn vscaledone(&mut self) -> VSCALEDONE_W<25> {
320 VSCALEDONE_W::new(self)
321 }
322 #[doc = "Bit 29 - TEMP Interrupt Enable"]
323 #[inline(always)]
324 #[must_use]
325 pub fn temp(&mut self) -> TEMP_W<29> {
326 TEMP_W::new(self)
327 }
328 #[doc = "Bit 30 - TEMPLOW Interrupt Enable"]
329 #[inline(always)]
330 #[must_use]
331 pub fn templow(&mut self) -> TEMPLOW_W<30> {
332 TEMPLOW_W::new(self)
333 }
334 #[doc = "Bit 31 - TEMPHIGH Interrupt Enable"]
335 #[inline(always)]
336 #[must_use]
337 pub fn temphigh(&mut self) -> TEMPHIGH_W<31> {
338 TEMPHIGH_W::new(self)
339 }
340 #[doc = "Writes raw bits to the register."]
341 #[inline(always)]
342 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
343 self.0.bits(bits);
344 self
345 }
346}
347#[doc = "Interrupt Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ien](index.html) module"]
348pub struct IEN_SPEC;
349impl crate::RegisterSpec for IEN_SPEC {
350 type Ux = u32;
351}
352#[doc = "`read()` method returns [ien::R](R) reader structure"]
353impl crate::Readable for IEN_SPEC {
354 type Reader = R;
355}
356#[doc = "`write(|w| ..)` method takes [ien::W](W) writer structure"]
357impl crate::Writable for IEN_SPEC {
358 type Writer = W;
359 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
360 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
361}
362#[doc = "`reset()` method sets IEN to value 0"]
363impl crate::Resettable for IEN_SPEC {
364 const RESET_VALUE: Self::Ux = 0;
365}