efm32pg12b500_pac/vdac0/
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 `CH0CD` reader - CH0CD Interrupt Enable"]
38pub type CH0CD_R = crate::BitReader<bool>;
39#[doc = "Field `CH0CD` writer - CH0CD Interrupt Enable"]
40pub type CH0CD_W<'a> = crate::BitWriter<'a, u32, IEN_SPEC, bool, 0>;
41#[doc = "Field `CH1CD` reader - CH1CD Interrupt Enable"]
42pub type CH1CD_R = crate::BitReader<bool>;
43#[doc = "Field `CH1CD` writer - CH1CD Interrupt Enable"]
44pub type CH1CD_W<'a> = crate::BitWriter<'a, u32, IEN_SPEC, bool, 1>;
45#[doc = "Field `CH0OF` reader - CH0OF Interrupt Enable"]
46pub type CH0OF_R = crate::BitReader<bool>;
47#[doc = "Field `CH0OF` writer - CH0OF Interrupt Enable"]
48pub type CH0OF_W<'a> = crate::BitWriter<'a, u32, IEN_SPEC, bool, 2>;
49#[doc = "Field `CH1OF` reader - CH1OF Interrupt Enable"]
50pub type CH1OF_R = crate::BitReader<bool>;
51#[doc = "Field `CH1OF` writer - CH1OF Interrupt Enable"]
52pub type CH1OF_W<'a> = crate::BitWriter<'a, u32, IEN_SPEC, bool, 3>;
53#[doc = "Field `CH0UF` reader - CH0UF Interrupt Enable"]
54pub type CH0UF_R = crate::BitReader<bool>;
55#[doc = "Field `CH0UF` writer - CH0UF Interrupt Enable"]
56pub type CH0UF_W<'a> = crate::BitWriter<'a, u32, IEN_SPEC, bool, 4>;
57#[doc = "Field `CH1UF` reader - CH1UF Interrupt Enable"]
58pub type CH1UF_R = crate::BitReader<bool>;
59#[doc = "Field `CH1UF` writer - CH1UF Interrupt Enable"]
60pub type CH1UF_W<'a> = crate::BitWriter<'a, u32, IEN_SPEC, bool, 5>;
61#[doc = "Field `CH0BL` reader - CH0BL Interrupt Enable"]
62pub type CH0BL_R = crate::BitReader<bool>;
63#[doc = "Field `CH0BL` writer - CH0BL Interrupt Enable"]
64pub type CH0BL_W<'a> = crate::BitWriter<'a, u32, IEN_SPEC, bool, 6>;
65#[doc = "Field `CH1BL` reader - CH1BL Interrupt Enable"]
66pub type CH1BL_R = crate::BitReader<bool>;
67#[doc = "Field `CH1BL` writer - CH1BL Interrupt Enable"]
68pub type CH1BL_W<'a> = crate::BitWriter<'a, u32, IEN_SPEC, bool, 7>;
69#[doc = "Field `EM23ERR` reader - EM23ERR Interrupt Enable"]
70pub type EM23ERR_R = crate::BitReader<bool>;
71#[doc = "Field `EM23ERR` writer - EM23ERR Interrupt Enable"]
72pub type EM23ERR_W<'a> = crate::BitWriter<'a, u32, IEN_SPEC, bool, 15>;
73#[doc = "Field `OPA0APORTCONFLICT` reader - OPA0APORTCONFLICT Interrupt Enable"]
74pub type OPA0APORTCONFLICT_R = crate::BitReader<bool>;
75#[doc = "Field `OPA0APORTCONFLICT` writer - OPA0APORTCONFLICT Interrupt Enable"]
76pub type OPA0APORTCONFLICT_W<'a> = crate::BitWriter<'a, u32, IEN_SPEC, bool, 16>;
77#[doc = "Field `OPA1APORTCONFLICT` reader - OPA1APORTCONFLICT Interrupt Enable"]
78pub type OPA1APORTCONFLICT_R = crate::BitReader<bool>;
79#[doc = "Field `OPA1APORTCONFLICT` writer - OPA1APORTCONFLICT Interrupt Enable"]
80pub type OPA1APORTCONFLICT_W<'a> = crate::BitWriter<'a, u32, IEN_SPEC, bool, 17>;
81#[doc = "Field `OPA2APORTCONFLICT` reader - OPA2APORTCONFLICT Interrupt Enable"]
82pub type OPA2APORTCONFLICT_R = crate::BitReader<bool>;
83#[doc = "Field `OPA2APORTCONFLICT` writer - OPA2APORTCONFLICT Interrupt Enable"]
84pub type OPA2APORTCONFLICT_W<'a> = crate::BitWriter<'a, u32, IEN_SPEC, bool, 18>;
85#[doc = "Field `OPA0PRSTIMEDERR` reader - OPA0PRSTIMEDERR Interrupt Enable"]
86pub type OPA0PRSTIMEDERR_R = crate::BitReader<bool>;
87#[doc = "Field `OPA0PRSTIMEDERR` writer - OPA0PRSTIMEDERR Interrupt Enable"]
88pub type OPA0PRSTIMEDERR_W<'a> = crate::BitWriter<'a, u32, IEN_SPEC, bool, 20>;
89#[doc = "Field `OPA1PRSTIMEDERR` reader - OPA1PRSTIMEDERR Interrupt Enable"]
90pub type OPA1PRSTIMEDERR_R = crate::BitReader<bool>;
91#[doc = "Field `OPA1PRSTIMEDERR` writer - OPA1PRSTIMEDERR Interrupt Enable"]
92pub type OPA1PRSTIMEDERR_W<'a> = crate::BitWriter<'a, u32, IEN_SPEC, bool, 21>;
93#[doc = "Field `OPA2PRSTIMEDERR` reader - OPA2PRSTIMEDERR Interrupt Enable"]
94pub type OPA2PRSTIMEDERR_R = crate::BitReader<bool>;
95#[doc = "Field `OPA2PRSTIMEDERR` writer - OPA2PRSTIMEDERR Interrupt Enable"]
96pub type OPA2PRSTIMEDERR_W<'a> = crate::BitWriter<'a, u32, IEN_SPEC, bool, 22>;
97#[doc = "Field `OPA0OUTVALID` reader - OPA0OUTVALID Interrupt Enable"]
98pub type OPA0OUTVALID_R = crate::BitReader<bool>;
99#[doc = "Field `OPA0OUTVALID` writer - OPA0OUTVALID Interrupt Enable"]
100pub type OPA0OUTVALID_W<'a> = crate::BitWriter<'a, u32, IEN_SPEC, bool, 28>;
101#[doc = "Field `OPA1OUTVALID` reader - OPA1OUTVALID Interrupt Enable"]
102pub type OPA1OUTVALID_R = crate::BitReader<bool>;
103#[doc = "Field `OPA1OUTVALID` writer - OPA1OUTVALID Interrupt Enable"]
104pub type OPA1OUTVALID_W<'a> = crate::BitWriter<'a, u32, IEN_SPEC, bool, 29>;
105#[doc = "Field `OPA2OUTVALID` reader - OPA2OUTVALID Interrupt Enable"]
106pub type OPA2OUTVALID_R = crate::BitReader<bool>;
107#[doc = "Field `OPA2OUTVALID` writer - OPA2OUTVALID Interrupt Enable"]
108pub type OPA2OUTVALID_W<'a> = crate::BitWriter<'a, u32, IEN_SPEC, bool, 30>;
109impl R {
110    #[doc = "Bit 0 - CH0CD Interrupt Enable"]
111    #[inline(always)]
112    pub fn ch0cd(&self) -> CH0CD_R {
113        CH0CD_R::new((self.bits & 1) != 0)
114    }
115    #[doc = "Bit 1 - CH1CD Interrupt Enable"]
116    #[inline(always)]
117    pub fn ch1cd(&self) -> CH1CD_R {
118        CH1CD_R::new(((self.bits >> 1) & 1) != 0)
119    }
120    #[doc = "Bit 2 - CH0OF Interrupt Enable"]
121    #[inline(always)]
122    pub fn ch0of(&self) -> CH0OF_R {
123        CH0OF_R::new(((self.bits >> 2) & 1) != 0)
124    }
125    #[doc = "Bit 3 - CH1OF Interrupt Enable"]
126    #[inline(always)]
127    pub fn ch1of(&self) -> CH1OF_R {
128        CH1OF_R::new(((self.bits >> 3) & 1) != 0)
129    }
130    #[doc = "Bit 4 - CH0UF Interrupt Enable"]
131    #[inline(always)]
132    pub fn ch0uf(&self) -> CH0UF_R {
133        CH0UF_R::new(((self.bits >> 4) & 1) != 0)
134    }
135    #[doc = "Bit 5 - CH1UF Interrupt Enable"]
136    #[inline(always)]
137    pub fn ch1uf(&self) -> CH1UF_R {
138        CH1UF_R::new(((self.bits >> 5) & 1) != 0)
139    }
140    #[doc = "Bit 6 - CH0BL Interrupt Enable"]
141    #[inline(always)]
142    pub fn ch0bl(&self) -> CH0BL_R {
143        CH0BL_R::new(((self.bits >> 6) & 1) != 0)
144    }
145    #[doc = "Bit 7 - CH1BL Interrupt Enable"]
146    #[inline(always)]
147    pub fn ch1bl(&self) -> CH1BL_R {
148        CH1BL_R::new(((self.bits >> 7) & 1) != 0)
149    }
150    #[doc = "Bit 15 - EM23ERR Interrupt Enable"]
151    #[inline(always)]
152    pub fn em23err(&self) -> EM23ERR_R {
153        EM23ERR_R::new(((self.bits >> 15) & 1) != 0)
154    }
155    #[doc = "Bit 16 - OPA0APORTCONFLICT Interrupt Enable"]
156    #[inline(always)]
157    pub fn opa0aportconflict(&self) -> OPA0APORTCONFLICT_R {
158        OPA0APORTCONFLICT_R::new(((self.bits >> 16) & 1) != 0)
159    }
160    #[doc = "Bit 17 - OPA1APORTCONFLICT Interrupt Enable"]
161    #[inline(always)]
162    pub fn opa1aportconflict(&self) -> OPA1APORTCONFLICT_R {
163        OPA1APORTCONFLICT_R::new(((self.bits >> 17) & 1) != 0)
164    }
165    #[doc = "Bit 18 - OPA2APORTCONFLICT Interrupt Enable"]
166    #[inline(always)]
167    pub fn opa2aportconflict(&self) -> OPA2APORTCONFLICT_R {
168        OPA2APORTCONFLICT_R::new(((self.bits >> 18) & 1) != 0)
169    }
170    #[doc = "Bit 20 - OPA0PRSTIMEDERR Interrupt Enable"]
171    #[inline(always)]
172    pub fn opa0prstimederr(&self) -> OPA0PRSTIMEDERR_R {
173        OPA0PRSTIMEDERR_R::new(((self.bits >> 20) & 1) != 0)
174    }
175    #[doc = "Bit 21 - OPA1PRSTIMEDERR Interrupt Enable"]
176    #[inline(always)]
177    pub fn opa1prstimederr(&self) -> OPA1PRSTIMEDERR_R {
178        OPA1PRSTIMEDERR_R::new(((self.bits >> 21) & 1) != 0)
179    }
180    #[doc = "Bit 22 - OPA2PRSTIMEDERR Interrupt Enable"]
181    #[inline(always)]
182    pub fn opa2prstimederr(&self) -> OPA2PRSTIMEDERR_R {
183        OPA2PRSTIMEDERR_R::new(((self.bits >> 22) & 1) != 0)
184    }
185    #[doc = "Bit 28 - OPA0OUTVALID Interrupt Enable"]
186    #[inline(always)]
187    pub fn opa0outvalid(&self) -> OPA0OUTVALID_R {
188        OPA0OUTVALID_R::new(((self.bits >> 28) & 1) != 0)
189    }
190    #[doc = "Bit 29 - OPA1OUTVALID Interrupt Enable"]
191    #[inline(always)]
192    pub fn opa1outvalid(&self) -> OPA1OUTVALID_R {
193        OPA1OUTVALID_R::new(((self.bits >> 29) & 1) != 0)
194    }
195    #[doc = "Bit 30 - OPA2OUTVALID Interrupt Enable"]
196    #[inline(always)]
197    pub fn opa2outvalid(&self) -> OPA2OUTVALID_R {
198        OPA2OUTVALID_R::new(((self.bits >> 30) & 1) != 0)
199    }
200}
201impl W {
202    #[doc = "Bit 0 - CH0CD Interrupt Enable"]
203    #[inline(always)]
204    pub fn ch0cd(&mut self) -> CH0CD_W {
205        CH0CD_W::new(self)
206    }
207    #[doc = "Bit 1 - CH1CD Interrupt Enable"]
208    #[inline(always)]
209    pub fn ch1cd(&mut self) -> CH1CD_W {
210        CH1CD_W::new(self)
211    }
212    #[doc = "Bit 2 - CH0OF Interrupt Enable"]
213    #[inline(always)]
214    pub fn ch0of(&mut self) -> CH0OF_W {
215        CH0OF_W::new(self)
216    }
217    #[doc = "Bit 3 - CH1OF Interrupt Enable"]
218    #[inline(always)]
219    pub fn ch1of(&mut self) -> CH1OF_W {
220        CH1OF_W::new(self)
221    }
222    #[doc = "Bit 4 - CH0UF Interrupt Enable"]
223    #[inline(always)]
224    pub fn ch0uf(&mut self) -> CH0UF_W {
225        CH0UF_W::new(self)
226    }
227    #[doc = "Bit 5 - CH1UF Interrupt Enable"]
228    #[inline(always)]
229    pub fn ch1uf(&mut self) -> CH1UF_W {
230        CH1UF_W::new(self)
231    }
232    #[doc = "Bit 6 - CH0BL Interrupt Enable"]
233    #[inline(always)]
234    pub fn ch0bl(&mut self) -> CH0BL_W {
235        CH0BL_W::new(self)
236    }
237    #[doc = "Bit 7 - CH1BL Interrupt Enable"]
238    #[inline(always)]
239    pub fn ch1bl(&mut self) -> CH1BL_W {
240        CH1BL_W::new(self)
241    }
242    #[doc = "Bit 15 - EM23ERR Interrupt Enable"]
243    #[inline(always)]
244    pub fn em23err(&mut self) -> EM23ERR_W {
245        EM23ERR_W::new(self)
246    }
247    #[doc = "Bit 16 - OPA0APORTCONFLICT Interrupt Enable"]
248    #[inline(always)]
249    pub fn opa0aportconflict(&mut self) -> OPA0APORTCONFLICT_W {
250        OPA0APORTCONFLICT_W::new(self)
251    }
252    #[doc = "Bit 17 - OPA1APORTCONFLICT Interrupt Enable"]
253    #[inline(always)]
254    pub fn opa1aportconflict(&mut self) -> OPA1APORTCONFLICT_W {
255        OPA1APORTCONFLICT_W::new(self)
256    }
257    #[doc = "Bit 18 - OPA2APORTCONFLICT Interrupt Enable"]
258    #[inline(always)]
259    pub fn opa2aportconflict(&mut self) -> OPA2APORTCONFLICT_W {
260        OPA2APORTCONFLICT_W::new(self)
261    }
262    #[doc = "Bit 20 - OPA0PRSTIMEDERR Interrupt Enable"]
263    #[inline(always)]
264    pub fn opa0prstimederr(&mut self) -> OPA0PRSTIMEDERR_W {
265        OPA0PRSTIMEDERR_W::new(self)
266    }
267    #[doc = "Bit 21 - OPA1PRSTIMEDERR Interrupt Enable"]
268    #[inline(always)]
269    pub fn opa1prstimederr(&mut self) -> OPA1PRSTIMEDERR_W {
270        OPA1PRSTIMEDERR_W::new(self)
271    }
272    #[doc = "Bit 22 - OPA2PRSTIMEDERR Interrupt Enable"]
273    #[inline(always)]
274    pub fn opa2prstimederr(&mut self) -> OPA2PRSTIMEDERR_W {
275        OPA2PRSTIMEDERR_W::new(self)
276    }
277    #[doc = "Bit 28 - OPA0OUTVALID Interrupt Enable"]
278    #[inline(always)]
279    pub fn opa0outvalid(&mut self) -> OPA0OUTVALID_W {
280        OPA0OUTVALID_W::new(self)
281    }
282    #[doc = "Bit 29 - OPA1OUTVALID Interrupt Enable"]
283    #[inline(always)]
284    pub fn opa1outvalid(&mut self) -> OPA1OUTVALID_W {
285        OPA1OUTVALID_W::new(self)
286    }
287    #[doc = "Bit 30 - OPA2OUTVALID Interrupt Enable"]
288    #[inline(always)]
289    pub fn opa2outvalid(&mut self) -> OPA2OUTVALID_W {
290        OPA2OUTVALID_W::new(self)
291    }
292    #[doc = "Writes raw bits to the register."]
293    #[inline(always)]
294    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
295        self.0.bits(bits);
296        self
297    }
298}
299#[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"]
300pub struct IEN_SPEC;
301impl crate::RegisterSpec for IEN_SPEC {
302    type Ux = u32;
303}
304#[doc = "`read()` method returns [ien::R](R) reader structure"]
305impl crate::Readable for IEN_SPEC {
306    type Reader = R;
307}
308#[doc = "`write(|w| ..)` method takes [ien::W](W) writer structure"]
309impl crate::Writable for IEN_SPEC {
310    type Writer = W;
311}
312#[doc = "`reset()` method sets IEN to value 0"]
313impl crate::Resettable for IEN_SPEC {
314    #[inline(always)]
315    fn reset_value() -> Self::Ux {
316        0
317    }
318}