efm32pg22_pac/efm32pg22c200/gpio_s/
ien.rs

1#[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 `EXTIEN0` reader - External Pin Enable"]
38pub type EXTIEN0_R = crate::BitReader<bool>;
39#[doc = "Field `EXTIEN0` writer - External Pin Enable"]
40pub type EXTIEN0_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
41#[doc = "Field `EXTIEN1` reader - External Pin Enable"]
42pub type EXTIEN1_R = crate::BitReader<bool>;
43#[doc = "Field `EXTIEN1` writer - External Pin Enable"]
44pub type EXTIEN1_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
45#[doc = "Field `EXTIEN2` reader - External Pin Enable"]
46pub type EXTIEN2_R = crate::BitReader<bool>;
47#[doc = "Field `EXTIEN2` writer - External Pin Enable"]
48pub type EXTIEN2_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
49#[doc = "Field `EXTIEN3` reader - External Pin Enable"]
50pub type EXTIEN3_R = crate::BitReader<bool>;
51#[doc = "Field `EXTIEN3` writer - External Pin Enable"]
52pub type EXTIEN3_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
53#[doc = "Field `EXTIEN4` reader - External Pin Enable"]
54pub type EXTIEN4_R = crate::BitReader<bool>;
55#[doc = "Field `EXTIEN4` writer - External Pin Enable"]
56pub type EXTIEN4_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
57#[doc = "Field `EXTIEN5` reader - External Pin Enable"]
58pub type EXTIEN5_R = crate::BitReader<bool>;
59#[doc = "Field `EXTIEN5` writer - External Pin Enable"]
60pub type EXTIEN5_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
61#[doc = "Field `EXTIEN6` reader - External Pin Enable"]
62pub type EXTIEN6_R = crate::BitReader<bool>;
63#[doc = "Field `EXTIEN6` writer - External Pin Enable"]
64pub type EXTIEN6_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
65#[doc = "Field `EXTIEN7` reader - External Pin Enable"]
66pub type EXTIEN7_R = crate::BitReader<bool>;
67#[doc = "Field `EXTIEN7` writer - External Pin Enable"]
68pub type EXTIEN7_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
69#[doc = "Field `EXTIEN8` reader - External Pin Enable"]
70pub type EXTIEN8_R = crate::BitReader<bool>;
71#[doc = "Field `EXTIEN8` writer - External Pin Enable"]
72pub type EXTIEN8_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
73#[doc = "Field `EXTIEN9` reader - External Pin Enable"]
74pub type EXTIEN9_R = crate::BitReader<bool>;
75#[doc = "Field `EXTIEN9` writer - External Pin Enable"]
76pub type EXTIEN9_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
77#[doc = "Field `EXTIEN10` reader - External Pin Enable"]
78pub type EXTIEN10_R = crate::BitReader<bool>;
79#[doc = "Field `EXTIEN10` writer - External Pin Enable"]
80pub type EXTIEN10_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
81#[doc = "Field `EXTIEN11` reader - External Pin Enable"]
82pub type EXTIEN11_R = crate::BitReader<bool>;
83#[doc = "Field `EXTIEN11` writer - External Pin Enable"]
84pub type EXTIEN11_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
85#[doc = "Field `EM4WUIEN0` reader - EM4 Wake Up Interrupt En"]
86pub type EM4WUIEN0_R = crate::BitReader<bool>;
87#[doc = "Field `EM4WUIEN0` writer - EM4 Wake Up Interrupt En"]
88pub type EM4WUIEN0_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
89#[doc = "Field `EM4WUIEN1` reader - EM4 Wake Up Interrupt En"]
90pub type EM4WUIEN1_R = crate::BitReader<bool>;
91#[doc = "Field `EM4WUIEN1` writer - EM4 Wake Up Interrupt En"]
92pub type EM4WUIEN1_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
93#[doc = "Field `EM4WUIEN2` reader - EM4 Wake Up Interrupt En"]
94pub type EM4WUIEN2_R = crate::BitReader<bool>;
95#[doc = "Field `EM4WUIEN2` writer - EM4 Wake Up Interrupt En"]
96pub type EM4WUIEN2_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
97#[doc = "Field `EM4WUIEN3` reader - EM4 Wake Up Interrupt En"]
98pub type EM4WUIEN3_R = crate::BitReader<bool>;
99#[doc = "Field `EM4WUIEN3` writer - EM4 Wake Up Interrupt En"]
100pub type EM4WUIEN3_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
101#[doc = "Field `EM4WUIEN4` reader - EM4 Wake Up Interrupt En"]
102pub type EM4WUIEN4_R = crate::BitReader<bool>;
103#[doc = "Field `EM4WUIEN4` writer - EM4 Wake Up Interrupt En"]
104pub type EM4WUIEN4_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
105#[doc = "Field `EM4WUIEN5` reader - EM4 Wake Up Interrupt En"]
106pub type EM4WUIEN5_R = crate::BitReader<bool>;
107#[doc = "Field `EM4WUIEN5` writer - EM4 Wake Up Interrupt En"]
108pub type EM4WUIEN5_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
109#[doc = "Field `EM4WUIEN6` reader - EM4 Wake Up Interrupt En"]
110pub type EM4WUIEN6_R = crate::BitReader<bool>;
111#[doc = "Field `EM4WUIEN6` writer - EM4 Wake Up Interrupt En"]
112pub type EM4WUIEN6_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
113#[doc = "Field `EM4WUIEN7` reader - EM4 Wake Up Interrupt En"]
114pub type EM4WUIEN7_R = crate::BitReader<bool>;
115#[doc = "Field `EM4WUIEN7` writer - EM4 Wake Up Interrupt En"]
116pub type EM4WUIEN7_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
117#[doc = "Field `EM4WUIEN8` reader - EM4 Wake Up Interrupt En"]
118pub type EM4WUIEN8_R = crate::BitReader<bool>;
119#[doc = "Field `EM4WUIEN8` writer - EM4 Wake Up Interrupt En"]
120pub type EM4WUIEN8_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
121#[doc = "Field `EM4WUIEN9` reader - EM4 Wake Up Interrupt En"]
122pub type EM4WUIEN9_R = crate::BitReader<bool>;
123#[doc = "Field `EM4WUIEN9` writer - EM4 Wake Up Interrupt En"]
124pub type EM4WUIEN9_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
125#[doc = "Field `EM4WUIEN10` reader - EM4 Wake Up Interrupt En"]
126pub type EM4WUIEN10_R = crate::BitReader<bool>;
127#[doc = "Field `EM4WUIEN10` writer - EM4 Wake Up Interrupt En"]
128pub type EM4WUIEN10_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
129#[doc = "Field `EM4WUIEN11` reader - EM4 Wake Up Interrupt En"]
130pub type EM4WUIEN11_R = crate::BitReader<bool>;
131#[doc = "Field `EM4WUIEN11` writer - EM4 Wake Up Interrupt En"]
132pub type EM4WUIEN11_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
133impl R {
134    #[doc = "Bit 0 - External Pin Enable"]
135    #[inline(always)]
136    pub fn extien0(&self) -> EXTIEN0_R {
137        EXTIEN0_R::new((self.bits & 1) != 0)
138    }
139    #[doc = "Bit 1 - External Pin Enable"]
140    #[inline(always)]
141    pub fn extien1(&self) -> EXTIEN1_R {
142        EXTIEN1_R::new(((self.bits >> 1) & 1) != 0)
143    }
144    #[doc = "Bit 2 - External Pin Enable"]
145    #[inline(always)]
146    pub fn extien2(&self) -> EXTIEN2_R {
147        EXTIEN2_R::new(((self.bits >> 2) & 1) != 0)
148    }
149    #[doc = "Bit 3 - External Pin Enable"]
150    #[inline(always)]
151    pub fn extien3(&self) -> EXTIEN3_R {
152        EXTIEN3_R::new(((self.bits >> 3) & 1) != 0)
153    }
154    #[doc = "Bit 4 - External Pin Enable"]
155    #[inline(always)]
156    pub fn extien4(&self) -> EXTIEN4_R {
157        EXTIEN4_R::new(((self.bits >> 4) & 1) != 0)
158    }
159    #[doc = "Bit 5 - External Pin Enable"]
160    #[inline(always)]
161    pub fn extien5(&self) -> EXTIEN5_R {
162        EXTIEN5_R::new(((self.bits >> 5) & 1) != 0)
163    }
164    #[doc = "Bit 6 - External Pin Enable"]
165    #[inline(always)]
166    pub fn extien6(&self) -> EXTIEN6_R {
167        EXTIEN6_R::new(((self.bits >> 6) & 1) != 0)
168    }
169    #[doc = "Bit 7 - External Pin Enable"]
170    #[inline(always)]
171    pub fn extien7(&self) -> EXTIEN7_R {
172        EXTIEN7_R::new(((self.bits >> 7) & 1) != 0)
173    }
174    #[doc = "Bit 8 - External Pin Enable"]
175    #[inline(always)]
176    pub fn extien8(&self) -> EXTIEN8_R {
177        EXTIEN8_R::new(((self.bits >> 8) & 1) != 0)
178    }
179    #[doc = "Bit 9 - External Pin Enable"]
180    #[inline(always)]
181    pub fn extien9(&self) -> EXTIEN9_R {
182        EXTIEN9_R::new(((self.bits >> 9) & 1) != 0)
183    }
184    #[doc = "Bit 10 - External Pin Enable"]
185    #[inline(always)]
186    pub fn extien10(&self) -> EXTIEN10_R {
187        EXTIEN10_R::new(((self.bits >> 10) & 1) != 0)
188    }
189    #[doc = "Bit 11 - External Pin Enable"]
190    #[inline(always)]
191    pub fn extien11(&self) -> EXTIEN11_R {
192        EXTIEN11_R::new(((self.bits >> 11) & 1) != 0)
193    }
194    #[doc = "Bit 16 - EM4 Wake Up Interrupt En"]
195    #[inline(always)]
196    pub fn em4wuien0(&self) -> EM4WUIEN0_R {
197        EM4WUIEN0_R::new(((self.bits >> 16) & 1) != 0)
198    }
199    #[doc = "Bit 17 - EM4 Wake Up Interrupt En"]
200    #[inline(always)]
201    pub fn em4wuien1(&self) -> EM4WUIEN1_R {
202        EM4WUIEN1_R::new(((self.bits >> 17) & 1) != 0)
203    }
204    #[doc = "Bit 18 - EM4 Wake Up Interrupt En"]
205    #[inline(always)]
206    pub fn em4wuien2(&self) -> EM4WUIEN2_R {
207        EM4WUIEN2_R::new(((self.bits >> 18) & 1) != 0)
208    }
209    #[doc = "Bit 19 - EM4 Wake Up Interrupt En"]
210    #[inline(always)]
211    pub fn em4wuien3(&self) -> EM4WUIEN3_R {
212        EM4WUIEN3_R::new(((self.bits >> 19) & 1) != 0)
213    }
214    #[doc = "Bit 20 - EM4 Wake Up Interrupt En"]
215    #[inline(always)]
216    pub fn em4wuien4(&self) -> EM4WUIEN4_R {
217        EM4WUIEN4_R::new(((self.bits >> 20) & 1) != 0)
218    }
219    #[doc = "Bit 21 - EM4 Wake Up Interrupt En"]
220    #[inline(always)]
221    pub fn em4wuien5(&self) -> EM4WUIEN5_R {
222        EM4WUIEN5_R::new(((self.bits >> 21) & 1) != 0)
223    }
224    #[doc = "Bit 22 - EM4 Wake Up Interrupt En"]
225    #[inline(always)]
226    pub fn em4wuien6(&self) -> EM4WUIEN6_R {
227        EM4WUIEN6_R::new(((self.bits >> 22) & 1) != 0)
228    }
229    #[doc = "Bit 23 - EM4 Wake Up Interrupt En"]
230    #[inline(always)]
231    pub fn em4wuien7(&self) -> EM4WUIEN7_R {
232        EM4WUIEN7_R::new(((self.bits >> 23) & 1) != 0)
233    }
234    #[doc = "Bit 24 - EM4 Wake Up Interrupt En"]
235    #[inline(always)]
236    pub fn em4wuien8(&self) -> EM4WUIEN8_R {
237        EM4WUIEN8_R::new(((self.bits >> 24) & 1) != 0)
238    }
239    #[doc = "Bit 25 - EM4 Wake Up Interrupt En"]
240    #[inline(always)]
241    pub fn em4wuien9(&self) -> EM4WUIEN9_R {
242        EM4WUIEN9_R::new(((self.bits >> 25) & 1) != 0)
243    }
244    #[doc = "Bit 26 - EM4 Wake Up Interrupt En"]
245    #[inline(always)]
246    pub fn em4wuien10(&self) -> EM4WUIEN10_R {
247        EM4WUIEN10_R::new(((self.bits >> 26) & 1) != 0)
248    }
249    #[doc = "Bit 27 - EM4 Wake Up Interrupt En"]
250    #[inline(always)]
251    pub fn em4wuien11(&self) -> EM4WUIEN11_R {
252        EM4WUIEN11_R::new(((self.bits >> 27) & 1) != 0)
253    }
254}
255impl W {
256    #[doc = "Bit 0 - External Pin Enable"]
257    #[inline(always)]
258    #[must_use]
259    pub fn extien0(&mut self) -> EXTIEN0_W<0> {
260        EXTIEN0_W::new(self)
261    }
262    #[doc = "Bit 1 - External Pin Enable"]
263    #[inline(always)]
264    #[must_use]
265    pub fn extien1(&mut self) -> EXTIEN1_W<1> {
266        EXTIEN1_W::new(self)
267    }
268    #[doc = "Bit 2 - External Pin Enable"]
269    #[inline(always)]
270    #[must_use]
271    pub fn extien2(&mut self) -> EXTIEN2_W<2> {
272        EXTIEN2_W::new(self)
273    }
274    #[doc = "Bit 3 - External Pin Enable"]
275    #[inline(always)]
276    #[must_use]
277    pub fn extien3(&mut self) -> EXTIEN3_W<3> {
278        EXTIEN3_W::new(self)
279    }
280    #[doc = "Bit 4 - External Pin Enable"]
281    #[inline(always)]
282    #[must_use]
283    pub fn extien4(&mut self) -> EXTIEN4_W<4> {
284        EXTIEN4_W::new(self)
285    }
286    #[doc = "Bit 5 - External Pin Enable"]
287    #[inline(always)]
288    #[must_use]
289    pub fn extien5(&mut self) -> EXTIEN5_W<5> {
290        EXTIEN5_W::new(self)
291    }
292    #[doc = "Bit 6 - External Pin Enable"]
293    #[inline(always)]
294    #[must_use]
295    pub fn extien6(&mut self) -> EXTIEN6_W<6> {
296        EXTIEN6_W::new(self)
297    }
298    #[doc = "Bit 7 - External Pin Enable"]
299    #[inline(always)]
300    #[must_use]
301    pub fn extien7(&mut self) -> EXTIEN7_W<7> {
302        EXTIEN7_W::new(self)
303    }
304    #[doc = "Bit 8 - External Pin Enable"]
305    #[inline(always)]
306    #[must_use]
307    pub fn extien8(&mut self) -> EXTIEN8_W<8> {
308        EXTIEN8_W::new(self)
309    }
310    #[doc = "Bit 9 - External Pin Enable"]
311    #[inline(always)]
312    #[must_use]
313    pub fn extien9(&mut self) -> EXTIEN9_W<9> {
314        EXTIEN9_W::new(self)
315    }
316    #[doc = "Bit 10 - External Pin Enable"]
317    #[inline(always)]
318    #[must_use]
319    pub fn extien10(&mut self) -> EXTIEN10_W<10> {
320        EXTIEN10_W::new(self)
321    }
322    #[doc = "Bit 11 - External Pin Enable"]
323    #[inline(always)]
324    #[must_use]
325    pub fn extien11(&mut self) -> EXTIEN11_W<11> {
326        EXTIEN11_W::new(self)
327    }
328    #[doc = "Bit 16 - EM4 Wake Up Interrupt En"]
329    #[inline(always)]
330    #[must_use]
331    pub fn em4wuien0(&mut self) -> EM4WUIEN0_W<16> {
332        EM4WUIEN0_W::new(self)
333    }
334    #[doc = "Bit 17 - EM4 Wake Up Interrupt En"]
335    #[inline(always)]
336    #[must_use]
337    pub fn em4wuien1(&mut self) -> EM4WUIEN1_W<17> {
338        EM4WUIEN1_W::new(self)
339    }
340    #[doc = "Bit 18 - EM4 Wake Up Interrupt En"]
341    #[inline(always)]
342    #[must_use]
343    pub fn em4wuien2(&mut self) -> EM4WUIEN2_W<18> {
344        EM4WUIEN2_W::new(self)
345    }
346    #[doc = "Bit 19 - EM4 Wake Up Interrupt En"]
347    #[inline(always)]
348    #[must_use]
349    pub fn em4wuien3(&mut self) -> EM4WUIEN3_W<19> {
350        EM4WUIEN3_W::new(self)
351    }
352    #[doc = "Bit 20 - EM4 Wake Up Interrupt En"]
353    #[inline(always)]
354    #[must_use]
355    pub fn em4wuien4(&mut self) -> EM4WUIEN4_W<20> {
356        EM4WUIEN4_W::new(self)
357    }
358    #[doc = "Bit 21 - EM4 Wake Up Interrupt En"]
359    #[inline(always)]
360    #[must_use]
361    pub fn em4wuien5(&mut self) -> EM4WUIEN5_W<21> {
362        EM4WUIEN5_W::new(self)
363    }
364    #[doc = "Bit 22 - EM4 Wake Up Interrupt En"]
365    #[inline(always)]
366    #[must_use]
367    pub fn em4wuien6(&mut self) -> EM4WUIEN6_W<22> {
368        EM4WUIEN6_W::new(self)
369    }
370    #[doc = "Bit 23 - EM4 Wake Up Interrupt En"]
371    #[inline(always)]
372    #[must_use]
373    pub fn em4wuien7(&mut self) -> EM4WUIEN7_W<23> {
374        EM4WUIEN7_W::new(self)
375    }
376    #[doc = "Bit 24 - EM4 Wake Up Interrupt En"]
377    #[inline(always)]
378    #[must_use]
379    pub fn em4wuien8(&mut self) -> EM4WUIEN8_W<24> {
380        EM4WUIEN8_W::new(self)
381    }
382    #[doc = "Bit 25 - EM4 Wake Up Interrupt En"]
383    #[inline(always)]
384    #[must_use]
385    pub fn em4wuien9(&mut self) -> EM4WUIEN9_W<25> {
386        EM4WUIEN9_W::new(self)
387    }
388    #[doc = "Bit 26 - EM4 Wake Up Interrupt En"]
389    #[inline(always)]
390    #[must_use]
391    pub fn em4wuien10(&mut self) -> EM4WUIEN10_W<26> {
392        EM4WUIEN10_W::new(self)
393    }
394    #[doc = "Bit 27 - EM4 Wake Up Interrupt En"]
395    #[inline(always)]
396    #[must_use]
397    pub fn em4wuien11(&mut self) -> EM4WUIEN11_W<27> {
398        EM4WUIEN11_W::new(self)
399    }
400    #[doc = "Writes raw bits to the register."]
401    #[inline(always)]
402    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
403        self.0.bits(bits);
404        self
405    }
406}
407#[doc = "Interrupt Enable\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"]
408pub struct IEN_SPEC;
409impl crate::RegisterSpec for IEN_SPEC {
410    type Ux = u32;
411}
412#[doc = "`read()` method returns [ien::R](R) reader structure"]
413impl crate::Readable for IEN_SPEC {
414    type Reader = R;
415}
416#[doc = "`write(|w| ..)` method takes [ien::W](W) writer structure"]
417impl crate::Writable for IEN_SPEC {
418    type Writer = W;
419    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
420    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
421}
422#[doc = "`reset()` method sets IEN to value 0"]
423impl crate::Resettable for IEN_SPEC {
424    const RESET_VALUE: Self::Ux = 0;
425}