efm32pg22_pac/efm32pg22c200/iadc0_ns/
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 `SINGLEFIFODVL` reader - Single FIFO Data Valid Level Enable"]
38pub type SINGLEFIFODVL_R = crate::BitReader<bool>;
39#[doc = "Field `SINGLEFIFODVL` writer - Single FIFO Data Valid Level Enable"]
40pub type SINGLEFIFODVL_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
41#[doc = "Field `SCANFIFODVL` reader - Scan FIFO Data Valid Level Enable"]
42pub type SCANFIFODVL_R = crate::BitReader<bool>;
43#[doc = "Field `SCANFIFODVL` writer - Scan FIFO Data Valid Level Enable"]
44pub type SCANFIFODVL_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
45#[doc = "Field `SINGLECMP` reader - Single Result Window Compare Enable"]
46pub type SINGLECMP_R = crate::BitReader<bool>;
47#[doc = "Field `SINGLECMP` writer - Single Result Window Compare Enable"]
48pub type SINGLECMP_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
49#[doc = "Field `SCANCMP` reader - Scan Result Window Compare Enable"]
50pub type SCANCMP_R = crate::BitReader<bool>;
51#[doc = "Field `SCANCMP` writer - Scan Result Window Compare Enable"]
52pub type SCANCMP_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
53#[doc = "Field `SCANENTRYDONE` reader - Scan Entry Done Enable"]
54pub type SCANENTRYDONE_R = crate::BitReader<bool>;
55#[doc = "Field `SCANENTRYDONE` writer - Scan Entry Done Enable"]
56pub type SCANENTRYDONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
57#[doc = "Field `SCANTABLEDONE` reader - Scan Table Done Enable"]
58pub type SCANTABLEDONE_R = crate::BitReader<bool>;
59#[doc = "Field `SCANTABLEDONE` writer - Scan Table Done Enable"]
60pub type SCANTABLEDONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
61#[doc = "Field `SINGLEDONE` reader - Single Conversion Done Enable"]
62pub type SINGLEDONE_R = crate::BitReader<bool>;
63#[doc = "Field `SINGLEDONE` writer - Single Conversion Done Enable"]
64pub type SINGLEDONE_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
65#[doc = "Field `POLARITYERR` reader - Polarity Error Enable"]
66pub type POLARITYERR_R = crate::BitReader<bool>;
67#[doc = "Field `POLARITYERR` writer - Polarity Error Enable"]
68pub type POLARITYERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
69#[doc = "Field `PORTALLOCERR` reader - Port Allocation Error Enable"]
70pub type PORTALLOCERR_R = crate::BitReader<bool>;
71#[doc = "Field `PORTALLOCERR` writer - Port Allocation Error Enable"]
72pub type PORTALLOCERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
73#[doc = "Field `SINGLEFIFOOF` reader - Single FIFO Overflow Enable"]
74pub type SINGLEFIFOOF_R = crate::BitReader<bool>;
75#[doc = "Field `SINGLEFIFOOF` writer - Single FIFO Overflow Enable"]
76pub type SINGLEFIFOOF_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
77#[doc = "Field `SCANFIFOOF` reader - Scan FIFO Overflow Enable"]
78pub type SCANFIFOOF_R = crate::BitReader<bool>;
79#[doc = "Field `SCANFIFOOF` writer - Scan FIFO Overflow Enable"]
80pub type SCANFIFOOF_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
81#[doc = "Field `SINGLEFIFOUF` reader - Single FIFO Underflow Enable"]
82pub type SINGLEFIFOUF_R = crate::BitReader<bool>;
83#[doc = "Field `SINGLEFIFOUF` writer - Single FIFO Underflow Enable"]
84pub type SINGLEFIFOUF_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
85#[doc = "Field `SCANFIFOUF` reader - Scan FIFO Underflow Enable"]
86pub type SCANFIFOUF_R = crate::BitReader<bool>;
87#[doc = "Field `SCANFIFOUF` writer - Scan FIFO Underflow Enable"]
88pub type SCANFIFOUF_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
89#[doc = "Field `EM23ABORTERROR` reader - EM2/3 Abort Error Enable"]
90pub type EM23ABORTERROR_R = crate::BitReader<bool>;
91#[doc = "Field `EM23ABORTERROR` writer - EM2/3 Abort Error Enable"]
92pub type EM23ABORTERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, IEN_SPEC, bool, O>;
93impl R {
94 #[doc = "Bit 0 - Single FIFO Data Valid Level Enable"]
95 #[inline(always)]
96 pub fn singlefifodvl(&self) -> SINGLEFIFODVL_R {
97 SINGLEFIFODVL_R::new((self.bits & 1) != 0)
98 }
99 #[doc = "Bit 1 - Scan FIFO Data Valid Level Enable"]
100 #[inline(always)]
101 pub fn scanfifodvl(&self) -> SCANFIFODVL_R {
102 SCANFIFODVL_R::new(((self.bits >> 1) & 1) != 0)
103 }
104 #[doc = "Bit 2 - Single Result Window Compare Enable"]
105 #[inline(always)]
106 pub fn singlecmp(&self) -> SINGLECMP_R {
107 SINGLECMP_R::new(((self.bits >> 2) & 1) != 0)
108 }
109 #[doc = "Bit 3 - Scan Result Window Compare Enable"]
110 #[inline(always)]
111 pub fn scancmp(&self) -> SCANCMP_R {
112 SCANCMP_R::new(((self.bits >> 3) & 1) != 0)
113 }
114 #[doc = "Bit 7 - Scan Entry Done Enable"]
115 #[inline(always)]
116 pub fn scanentrydone(&self) -> SCANENTRYDONE_R {
117 SCANENTRYDONE_R::new(((self.bits >> 7) & 1) != 0)
118 }
119 #[doc = "Bit 8 - Scan Table Done Enable"]
120 #[inline(always)]
121 pub fn scantabledone(&self) -> SCANTABLEDONE_R {
122 SCANTABLEDONE_R::new(((self.bits >> 8) & 1) != 0)
123 }
124 #[doc = "Bit 9 - Single Conversion Done Enable"]
125 #[inline(always)]
126 pub fn singledone(&self) -> SINGLEDONE_R {
127 SINGLEDONE_R::new(((self.bits >> 9) & 1) != 0)
128 }
129 #[doc = "Bit 12 - Polarity Error Enable"]
130 #[inline(always)]
131 pub fn polarityerr(&self) -> POLARITYERR_R {
132 POLARITYERR_R::new(((self.bits >> 12) & 1) != 0)
133 }
134 #[doc = "Bit 13 - Port Allocation Error Enable"]
135 #[inline(always)]
136 pub fn portallocerr(&self) -> PORTALLOCERR_R {
137 PORTALLOCERR_R::new(((self.bits >> 13) & 1) != 0)
138 }
139 #[doc = "Bit 16 - Single FIFO Overflow Enable"]
140 #[inline(always)]
141 pub fn singlefifoof(&self) -> SINGLEFIFOOF_R {
142 SINGLEFIFOOF_R::new(((self.bits >> 16) & 1) != 0)
143 }
144 #[doc = "Bit 17 - Scan FIFO Overflow Enable"]
145 #[inline(always)]
146 pub fn scanfifoof(&self) -> SCANFIFOOF_R {
147 SCANFIFOOF_R::new(((self.bits >> 17) & 1) != 0)
148 }
149 #[doc = "Bit 18 - Single FIFO Underflow Enable"]
150 #[inline(always)]
151 pub fn singlefifouf(&self) -> SINGLEFIFOUF_R {
152 SINGLEFIFOUF_R::new(((self.bits >> 18) & 1) != 0)
153 }
154 #[doc = "Bit 19 - Scan FIFO Underflow Enable"]
155 #[inline(always)]
156 pub fn scanfifouf(&self) -> SCANFIFOUF_R {
157 SCANFIFOUF_R::new(((self.bits >> 19) & 1) != 0)
158 }
159 #[doc = "Bit 31 - EM2/3 Abort Error Enable"]
160 #[inline(always)]
161 pub fn em23aborterror(&self) -> EM23ABORTERROR_R {
162 EM23ABORTERROR_R::new(((self.bits >> 31) & 1) != 0)
163 }
164}
165impl W {
166 #[doc = "Bit 0 - Single FIFO Data Valid Level Enable"]
167 #[inline(always)]
168 #[must_use]
169 pub fn singlefifodvl(&mut self) -> SINGLEFIFODVL_W<0> {
170 SINGLEFIFODVL_W::new(self)
171 }
172 #[doc = "Bit 1 - Scan FIFO Data Valid Level Enable"]
173 #[inline(always)]
174 #[must_use]
175 pub fn scanfifodvl(&mut self) -> SCANFIFODVL_W<1> {
176 SCANFIFODVL_W::new(self)
177 }
178 #[doc = "Bit 2 - Single Result Window Compare Enable"]
179 #[inline(always)]
180 #[must_use]
181 pub fn singlecmp(&mut self) -> SINGLECMP_W<2> {
182 SINGLECMP_W::new(self)
183 }
184 #[doc = "Bit 3 - Scan Result Window Compare Enable"]
185 #[inline(always)]
186 #[must_use]
187 pub fn scancmp(&mut self) -> SCANCMP_W<3> {
188 SCANCMP_W::new(self)
189 }
190 #[doc = "Bit 7 - Scan Entry Done Enable"]
191 #[inline(always)]
192 #[must_use]
193 pub fn scanentrydone(&mut self) -> SCANENTRYDONE_W<7> {
194 SCANENTRYDONE_W::new(self)
195 }
196 #[doc = "Bit 8 - Scan Table Done Enable"]
197 #[inline(always)]
198 #[must_use]
199 pub fn scantabledone(&mut self) -> SCANTABLEDONE_W<8> {
200 SCANTABLEDONE_W::new(self)
201 }
202 #[doc = "Bit 9 - Single Conversion Done Enable"]
203 #[inline(always)]
204 #[must_use]
205 pub fn singledone(&mut self) -> SINGLEDONE_W<9> {
206 SINGLEDONE_W::new(self)
207 }
208 #[doc = "Bit 12 - Polarity Error Enable"]
209 #[inline(always)]
210 #[must_use]
211 pub fn polarityerr(&mut self) -> POLARITYERR_W<12> {
212 POLARITYERR_W::new(self)
213 }
214 #[doc = "Bit 13 - Port Allocation Error Enable"]
215 #[inline(always)]
216 #[must_use]
217 pub fn portallocerr(&mut self) -> PORTALLOCERR_W<13> {
218 PORTALLOCERR_W::new(self)
219 }
220 #[doc = "Bit 16 - Single FIFO Overflow Enable"]
221 #[inline(always)]
222 #[must_use]
223 pub fn singlefifoof(&mut self) -> SINGLEFIFOOF_W<16> {
224 SINGLEFIFOOF_W::new(self)
225 }
226 #[doc = "Bit 17 - Scan FIFO Overflow Enable"]
227 #[inline(always)]
228 #[must_use]
229 pub fn scanfifoof(&mut self) -> SCANFIFOOF_W<17> {
230 SCANFIFOOF_W::new(self)
231 }
232 #[doc = "Bit 18 - Single FIFO Underflow Enable"]
233 #[inline(always)]
234 #[must_use]
235 pub fn singlefifouf(&mut self) -> SINGLEFIFOUF_W<18> {
236 SINGLEFIFOUF_W::new(self)
237 }
238 #[doc = "Bit 19 - Scan FIFO Underflow Enable"]
239 #[inline(always)]
240 #[must_use]
241 pub fn scanfifouf(&mut self) -> SCANFIFOUF_W<19> {
242 SCANFIFOUF_W::new(self)
243 }
244 #[doc = "Bit 31 - EM2/3 Abort Error Enable"]
245 #[inline(always)]
246 #[must_use]
247 pub fn em23aborterror(&mut self) -> EM23ABORTERROR_W<31> {
248 EM23ABORTERROR_W::new(self)
249 }
250 #[doc = "Writes raw bits to the register."]
251 #[inline(always)]
252 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
253 self.0.bits(bits);
254 self
255 }
256}
257#[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"]
258pub struct IEN_SPEC;
259impl crate::RegisterSpec for IEN_SPEC {
260 type Ux = u32;
261}
262#[doc = "`read()` method returns [ien::R](R) reader structure"]
263impl crate::Readable for IEN_SPEC {
264 type Reader = R;
265}
266#[doc = "`write(|w| ..)` method takes [ien::W](W) writer structure"]
267impl crate::Writable for IEN_SPEC {
268 type Writer = W;
269 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
270 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
271}
272#[doc = "`reset()` method sets IEN to value 0"]
273impl crate::Resettable for IEN_SPEC {
274 const RESET_VALUE: Self::Ux = 0;
275}