efm32jg12b_pac/efm32jg12b500/lesense/
ctrl.rs1#[doc = "Register `CTRL` reader"]
2pub struct R(crate::R<CTRL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<CTRL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<CTRL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<CTRL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `CTRL` writer"]
17pub struct W(crate::W<CTRL_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<CTRL_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<CTRL_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<CTRL_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `SCANMODE` reader - Configure Scan Mode"]
38pub type SCANMODE_R = crate::FieldReader<u8, SCANMODE_A>;
39#[doc = "Configure Scan Mode\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41#[repr(u8)]
42pub enum SCANMODE_A {
43 #[doc = "0: A new scan is started each time the period counter overflows"]
44 PERIODIC = 0,
45 #[doc = "1: A single scan is performed when START in CMD is set"]
46 ONESHOT = 1,
47 #[doc = "2: Pulse on PRS channel"]
48 PRS = 2,
49}
50impl From<SCANMODE_A> for u8 {
51 #[inline(always)]
52 fn from(variant: SCANMODE_A) -> Self {
53 variant as _
54 }
55}
56impl SCANMODE_R {
57 #[doc = "Get enumerated values variant"]
58 #[inline(always)]
59 pub fn variant(&self) -> Option<SCANMODE_A> {
60 match self.bits {
61 0 => Some(SCANMODE_A::PERIODIC),
62 1 => Some(SCANMODE_A::ONESHOT),
63 2 => Some(SCANMODE_A::PRS),
64 _ => None,
65 }
66 }
67 #[doc = "Checks if the value of the field is `PERIODIC`"]
68 #[inline(always)]
69 pub fn is_periodic(&self) -> bool {
70 *self == SCANMODE_A::PERIODIC
71 }
72 #[doc = "Checks if the value of the field is `ONESHOT`"]
73 #[inline(always)]
74 pub fn is_oneshot(&self) -> bool {
75 *self == SCANMODE_A::ONESHOT
76 }
77 #[doc = "Checks if the value of the field is `PRS`"]
78 #[inline(always)]
79 pub fn is_prs(&self) -> bool {
80 *self == SCANMODE_A::PRS
81 }
82}
83#[doc = "Field `SCANMODE` writer - Configure Scan Mode"]
84pub type SCANMODE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CTRL_SPEC, u8, SCANMODE_A, 2, O>;
85impl<'a, const O: u8> SCANMODE_W<'a, O> {
86 #[doc = "A new scan is started each time the period counter overflows"]
87 #[inline(always)]
88 pub fn periodic(self) -> &'a mut W {
89 self.variant(SCANMODE_A::PERIODIC)
90 }
91 #[doc = "A single scan is performed when START in CMD is set"]
92 #[inline(always)]
93 pub fn oneshot(self) -> &'a mut W {
94 self.variant(SCANMODE_A::ONESHOT)
95 }
96 #[doc = "Pulse on PRS channel"]
97 #[inline(always)]
98 pub fn prs(self) -> &'a mut W {
99 self.variant(SCANMODE_A::PRS)
100 }
101}
102#[doc = "Field `PRSSEL` reader - Scan Start PRS Select"]
103pub type PRSSEL_R = crate::FieldReader<u8, PRSSEL_A>;
104#[doc = "Scan Start PRS Select\n\nValue on reset: 0"]
105#[derive(Clone, Copy, Debug, PartialEq, Eq)]
106#[repr(u8)]
107pub enum PRSSEL_A {
108 #[doc = "0: PRS Channel 0 selected as input"]
109 PRSCH0 = 0,
110 #[doc = "1: PRS Channel 1 selected as input"]
111 PRSCH1 = 1,
112 #[doc = "2: PRS Channel 2 selected as input"]
113 PRSCH2 = 2,
114 #[doc = "3: PRS Channel 3 selected as input"]
115 PRSCH3 = 3,
116 #[doc = "4: PRS Channel 4 selected as input"]
117 PRSCH4 = 4,
118 #[doc = "5: PRS Channel 5 selected as input"]
119 PRSCH5 = 5,
120 #[doc = "6: PRS Channel 6 selected as input"]
121 PRSCH6 = 6,
122 #[doc = "7: PRS Channel 7 selected as input"]
123 PRSCH7 = 7,
124 #[doc = "8: PRS Channel 8 selected as input"]
125 PRSCH8 = 8,
126 #[doc = "9: PRS Channel 9 selected as input"]
127 PRSCH9 = 9,
128 #[doc = "10: PRS Channel 10 selected as input"]
129 PRSCH10 = 10,
130 #[doc = "11: PRS Channel 11 selected as input"]
131 PRSCH11 = 11,
132}
133impl From<PRSSEL_A> for u8 {
134 #[inline(always)]
135 fn from(variant: PRSSEL_A) -> Self {
136 variant as _
137 }
138}
139impl PRSSEL_R {
140 #[doc = "Get enumerated values variant"]
141 #[inline(always)]
142 pub fn variant(&self) -> Option<PRSSEL_A> {
143 match self.bits {
144 0 => Some(PRSSEL_A::PRSCH0),
145 1 => Some(PRSSEL_A::PRSCH1),
146 2 => Some(PRSSEL_A::PRSCH2),
147 3 => Some(PRSSEL_A::PRSCH3),
148 4 => Some(PRSSEL_A::PRSCH4),
149 5 => Some(PRSSEL_A::PRSCH5),
150 6 => Some(PRSSEL_A::PRSCH6),
151 7 => Some(PRSSEL_A::PRSCH7),
152 8 => Some(PRSSEL_A::PRSCH8),
153 9 => Some(PRSSEL_A::PRSCH9),
154 10 => Some(PRSSEL_A::PRSCH10),
155 11 => Some(PRSSEL_A::PRSCH11),
156 _ => None,
157 }
158 }
159 #[doc = "Checks if the value of the field is `PRSCH0`"]
160 #[inline(always)]
161 pub fn is_prsch0(&self) -> bool {
162 *self == PRSSEL_A::PRSCH0
163 }
164 #[doc = "Checks if the value of the field is `PRSCH1`"]
165 #[inline(always)]
166 pub fn is_prsch1(&self) -> bool {
167 *self == PRSSEL_A::PRSCH1
168 }
169 #[doc = "Checks if the value of the field is `PRSCH2`"]
170 #[inline(always)]
171 pub fn is_prsch2(&self) -> bool {
172 *self == PRSSEL_A::PRSCH2
173 }
174 #[doc = "Checks if the value of the field is `PRSCH3`"]
175 #[inline(always)]
176 pub fn is_prsch3(&self) -> bool {
177 *self == PRSSEL_A::PRSCH3
178 }
179 #[doc = "Checks if the value of the field is `PRSCH4`"]
180 #[inline(always)]
181 pub fn is_prsch4(&self) -> bool {
182 *self == PRSSEL_A::PRSCH4
183 }
184 #[doc = "Checks if the value of the field is `PRSCH5`"]
185 #[inline(always)]
186 pub fn is_prsch5(&self) -> bool {
187 *self == PRSSEL_A::PRSCH5
188 }
189 #[doc = "Checks if the value of the field is `PRSCH6`"]
190 #[inline(always)]
191 pub fn is_prsch6(&self) -> bool {
192 *self == PRSSEL_A::PRSCH6
193 }
194 #[doc = "Checks if the value of the field is `PRSCH7`"]
195 #[inline(always)]
196 pub fn is_prsch7(&self) -> bool {
197 *self == PRSSEL_A::PRSCH7
198 }
199 #[doc = "Checks if the value of the field is `PRSCH8`"]
200 #[inline(always)]
201 pub fn is_prsch8(&self) -> bool {
202 *self == PRSSEL_A::PRSCH8
203 }
204 #[doc = "Checks if the value of the field is `PRSCH9`"]
205 #[inline(always)]
206 pub fn is_prsch9(&self) -> bool {
207 *self == PRSSEL_A::PRSCH9
208 }
209 #[doc = "Checks if the value of the field is `PRSCH10`"]
210 #[inline(always)]
211 pub fn is_prsch10(&self) -> bool {
212 *self == PRSSEL_A::PRSCH10
213 }
214 #[doc = "Checks if the value of the field is `PRSCH11`"]
215 #[inline(always)]
216 pub fn is_prsch11(&self) -> bool {
217 *self == PRSSEL_A::PRSCH11
218 }
219}
220#[doc = "Field `PRSSEL` writer - Scan Start PRS Select"]
221pub type PRSSEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CTRL_SPEC, u8, PRSSEL_A, 4, O>;
222impl<'a, const O: u8> PRSSEL_W<'a, O> {
223 #[doc = "PRS Channel 0 selected as input"]
224 #[inline(always)]
225 pub fn prsch0(self) -> &'a mut W {
226 self.variant(PRSSEL_A::PRSCH0)
227 }
228 #[doc = "PRS Channel 1 selected as input"]
229 #[inline(always)]
230 pub fn prsch1(self) -> &'a mut W {
231 self.variant(PRSSEL_A::PRSCH1)
232 }
233 #[doc = "PRS Channel 2 selected as input"]
234 #[inline(always)]
235 pub fn prsch2(self) -> &'a mut W {
236 self.variant(PRSSEL_A::PRSCH2)
237 }
238 #[doc = "PRS Channel 3 selected as input"]
239 #[inline(always)]
240 pub fn prsch3(self) -> &'a mut W {
241 self.variant(PRSSEL_A::PRSCH3)
242 }
243 #[doc = "PRS Channel 4 selected as input"]
244 #[inline(always)]
245 pub fn prsch4(self) -> &'a mut W {
246 self.variant(PRSSEL_A::PRSCH4)
247 }
248 #[doc = "PRS Channel 5 selected as input"]
249 #[inline(always)]
250 pub fn prsch5(self) -> &'a mut W {
251 self.variant(PRSSEL_A::PRSCH5)
252 }
253 #[doc = "PRS Channel 6 selected as input"]
254 #[inline(always)]
255 pub fn prsch6(self) -> &'a mut W {
256 self.variant(PRSSEL_A::PRSCH6)
257 }
258 #[doc = "PRS Channel 7 selected as input"]
259 #[inline(always)]
260 pub fn prsch7(self) -> &'a mut W {
261 self.variant(PRSSEL_A::PRSCH7)
262 }
263 #[doc = "PRS Channel 8 selected as input"]
264 #[inline(always)]
265 pub fn prsch8(self) -> &'a mut W {
266 self.variant(PRSSEL_A::PRSCH8)
267 }
268 #[doc = "PRS Channel 9 selected as input"]
269 #[inline(always)]
270 pub fn prsch9(self) -> &'a mut W {
271 self.variant(PRSSEL_A::PRSCH9)
272 }
273 #[doc = "PRS Channel 10 selected as input"]
274 #[inline(always)]
275 pub fn prsch10(self) -> &'a mut W {
276 self.variant(PRSSEL_A::PRSCH10)
277 }
278 #[doc = "PRS Channel 11 selected as input"]
279 #[inline(always)]
280 pub fn prsch11(self) -> &'a mut W {
281 self.variant(PRSSEL_A::PRSCH11)
282 }
283}
284#[doc = "Field `SCANCONF` reader - Select Scan Configuration"]
285pub type SCANCONF_R = crate::FieldReader<u8, SCANCONF_A>;
286#[doc = "Select Scan Configuration\n\nValue on reset: 0"]
287#[derive(Clone, Copy, Debug, PartialEq, Eq)]
288#[repr(u8)]
289pub enum SCANCONF_A {
290 #[doc = "0: The channel configuration register registers used are directly mapped to the channel number."]
291 DIRMAP = 0,
292 #[doc = "1: The channel configuration register registers used are CHX+8_CONF for channels 0-7 and CHX-8_CONF for channels 8-15."]
293 INVMAP = 1,
294 #[doc = "2: The channel configuration register registers used toggles between CHX_CONF and CHX+8_CONF when channel x triggers"]
295 TOGGLE = 2,
296 #[doc = "3: The decoder state defines the CONF registers to be used."]
297 DECDEF = 3,
298}
299impl From<SCANCONF_A> for u8 {
300 #[inline(always)]
301 fn from(variant: SCANCONF_A) -> Self {
302 variant as _
303 }
304}
305impl SCANCONF_R {
306 #[doc = "Get enumerated values variant"]
307 #[inline(always)]
308 pub fn variant(&self) -> SCANCONF_A {
309 match self.bits {
310 0 => SCANCONF_A::DIRMAP,
311 1 => SCANCONF_A::INVMAP,
312 2 => SCANCONF_A::TOGGLE,
313 3 => SCANCONF_A::DECDEF,
314 _ => unreachable!(),
315 }
316 }
317 #[doc = "Checks if the value of the field is `DIRMAP`"]
318 #[inline(always)]
319 pub fn is_dirmap(&self) -> bool {
320 *self == SCANCONF_A::DIRMAP
321 }
322 #[doc = "Checks if the value of the field is `INVMAP`"]
323 #[inline(always)]
324 pub fn is_invmap(&self) -> bool {
325 *self == SCANCONF_A::INVMAP
326 }
327 #[doc = "Checks if the value of the field is `TOGGLE`"]
328 #[inline(always)]
329 pub fn is_toggle(&self) -> bool {
330 *self == SCANCONF_A::TOGGLE
331 }
332 #[doc = "Checks if the value of the field is `DECDEF`"]
333 #[inline(always)]
334 pub fn is_decdef(&self) -> bool {
335 *self == SCANCONF_A::DECDEF
336 }
337}
338#[doc = "Field `SCANCONF` writer - Select Scan Configuration"]
339pub type SCANCONF_W<'a, const O: u8> =
340 crate::FieldWriterSafe<'a, u32, CTRL_SPEC, u8, SCANCONF_A, 2, O>;
341impl<'a, const O: u8> SCANCONF_W<'a, O> {
342 #[doc = "The channel configuration register registers used are directly mapped to the channel number."]
343 #[inline(always)]
344 pub fn dirmap(self) -> &'a mut W {
345 self.variant(SCANCONF_A::DIRMAP)
346 }
347 #[doc = "The channel configuration register registers used are CHX+8_CONF for channels 0-7 and CHX-8_CONF for channels 8-15."]
348 #[inline(always)]
349 pub fn invmap(self) -> &'a mut W {
350 self.variant(SCANCONF_A::INVMAP)
351 }
352 #[doc = "The channel configuration register registers used toggles between CHX_CONF and CHX+8_CONF when channel x triggers"]
353 #[inline(always)]
354 pub fn toggle(self) -> &'a mut W {
355 self.variant(SCANCONF_A::TOGGLE)
356 }
357 #[doc = "The decoder state defines the CONF registers to be used."]
358 #[inline(always)]
359 pub fn decdef(self) -> &'a mut W {
360 self.variant(SCANCONF_A::DECDEF)
361 }
362}
363#[doc = "Field `ALTEXMAP` reader - Alternative Excitation Map"]
364pub type ALTEXMAP_R = crate::BitReader<bool>;
365#[doc = "Field `ALTEXMAP` writer - Alternative Excitation Map"]
366pub type ALTEXMAP_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, O>;
367#[doc = "Field `DUALSAMPLE` reader - Enable Dual Sample Mode"]
368pub type DUALSAMPLE_R = crate::BitReader<bool>;
369#[doc = "Field `DUALSAMPLE` writer - Enable Dual Sample Mode"]
370pub type DUALSAMPLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, O>;
371#[doc = "Field `BUFOW` reader - Result Buffer Overwrite"]
372pub type BUFOW_R = crate::BitReader<bool>;
373#[doc = "Field `BUFOW` writer - Result Buffer Overwrite"]
374pub type BUFOW_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, O>;
375#[doc = "Field `STRSCANRES` reader - Enable Storing of SCANRES"]
376pub type STRSCANRES_R = crate::BitReader<bool>;
377#[doc = "Field `STRSCANRES` writer - Enable Storing of SCANRES"]
378pub type STRSCANRES_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, O>;
379#[doc = "Field `BUFIDL` reader - Result Buffer Interrupt and DMA Trigger Level"]
380pub type BUFIDL_R = crate::BitReader<bool>;
381#[doc = "Field `BUFIDL` writer - Result Buffer Interrupt and DMA Trigger Level"]
382pub type BUFIDL_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, O>;
383#[doc = "Field `DMAWU` reader - DMA Wake-up From EM2"]
384pub type DMAWU_R = crate::FieldReader<u8, DMAWU_A>;
385#[doc = "DMA Wake-up From EM2\n\nValue on reset: 0"]
386#[derive(Clone, Copy, Debug, PartialEq, Eq)]
387#[repr(u8)]
388pub enum DMAWU_A {
389 #[doc = "0: No DMA wake-up from EM2"]
390 DISABLE = 0,
391 #[doc = "1: DMA wake-up from EM2 when data is valid in the result buffer"]
392 BUFDATAV = 1,
393 #[doc = "2: DMA wake-up from EM2 when the result buffer is full/half-full depending on BUFIDL configuration"]
394 BUFLEVEL = 2,
395}
396impl From<DMAWU_A> for u8 {
397 #[inline(always)]
398 fn from(variant: DMAWU_A) -> Self {
399 variant as _
400 }
401}
402impl DMAWU_R {
403 #[doc = "Get enumerated values variant"]
404 #[inline(always)]
405 pub fn variant(&self) -> Option<DMAWU_A> {
406 match self.bits {
407 0 => Some(DMAWU_A::DISABLE),
408 1 => Some(DMAWU_A::BUFDATAV),
409 2 => Some(DMAWU_A::BUFLEVEL),
410 _ => None,
411 }
412 }
413 #[doc = "Checks if the value of the field is `DISABLE`"]
414 #[inline(always)]
415 pub fn is_disable(&self) -> bool {
416 *self == DMAWU_A::DISABLE
417 }
418 #[doc = "Checks if the value of the field is `BUFDATAV`"]
419 #[inline(always)]
420 pub fn is_bufdatav(&self) -> bool {
421 *self == DMAWU_A::BUFDATAV
422 }
423 #[doc = "Checks if the value of the field is `BUFLEVEL`"]
424 #[inline(always)]
425 pub fn is_buflevel(&self) -> bool {
426 *self == DMAWU_A::BUFLEVEL
427 }
428}
429#[doc = "Field `DMAWU` writer - DMA Wake-up From EM2"]
430pub type DMAWU_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CTRL_SPEC, u8, DMAWU_A, 2, O>;
431impl<'a, const O: u8> DMAWU_W<'a, O> {
432 #[doc = "No DMA wake-up from EM2"]
433 #[inline(always)]
434 pub fn disable(self) -> &'a mut W {
435 self.variant(DMAWU_A::DISABLE)
436 }
437 #[doc = "DMA wake-up from EM2 when data is valid in the result buffer"]
438 #[inline(always)]
439 pub fn bufdatav(self) -> &'a mut W {
440 self.variant(DMAWU_A::BUFDATAV)
441 }
442 #[doc = "DMA wake-up from EM2 when the result buffer is full/half-full depending on BUFIDL configuration"]
443 #[inline(always)]
444 pub fn buflevel(self) -> &'a mut W {
445 self.variant(DMAWU_A::BUFLEVEL)
446 }
447}
448#[doc = "Field `DEBUGRUN` reader - Debug Mode Run Enable"]
449pub type DEBUGRUN_R = crate::BitReader<bool>;
450#[doc = "Field `DEBUGRUN` writer - Debug Mode Run Enable"]
451pub type DEBUGRUN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CTRL_SPEC, bool, O>;
452impl R {
453 #[doc = "Bits 0:1 - Configure Scan Mode"]
454 #[inline(always)]
455 pub fn scanmode(&self) -> SCANMODE_R {
456 SCANMODE_R::new((self.bits & 3) as u8)
457 }
458 #[doc = "Bits 2:5 - Scan Start PRS Select"]
459 #[inline(always)]
460 pub fn prssel(&self) -> PRSSEL_R {
461 PRSSEL_R::new(((self.bits >> 2) & 0x0f) as u8)
462 }
463 #[doc = "Bits 7:8 - Select Scan Configuration"]
464 #[inline(always)]
465 pub fn scanconf(&self) -> SCANCONF_R {
466 SCANCONF_R::new(((self.bits >> 7) & 3) as u8)
467 }
468 #[doc = "Bit 11 - Alternative Excitation Map"]
469 #[inline(always)]
470 pub fn altexmap(&self) -> ALTEXMAP_R {
471 ALTEXMAP_R::new(((self.bits >> 11) & 1) != 0)
472 }
473 #[doc = "Bit 13 - Enable Dual Sample Mode"]
474 #[inline(always)]
475 pub fn dualsample(&self) -> DUALSAMPLE_R {
476 DUALSAMPLE_R::new(((self.bits >> 13) & 1) != 0)
477 }
478 #[doc = "Bit 16 - Result Buffer Overwrite"]
479 #[inline(always)]
480 pub fn bufow(&self) -> BUFOW_R {
481 BUFOW_R::new(((self.bits >> 16) & 1) != 0)
482 }
483 #[doc = "Bit 17 - Enable Storing of SCANRES"]
484 #[inline(always)]
485 pub fn strscanres(&self) -> STRSCANRES_R {
486 STRSCANRES_R::new(((self.bits >> 17) & 1) != 0)
487 }
488 #[doc = "Bit 19 - Result Buffer Interrupt and DMA Trigger Level"]
489 #[inline(always)]
490 pub fn bufidl(&self) -> BUFIDL_R {
491 BUFIDL_R::new(((self.bits >> 19) & 1) != 0)
492 }
493 #[doc = "Bits 20:21 - DMA Wake-up From EM2"]
494 #[inline(always)]
495 pub fn dmawu(&self) -> DMAWU_R {
496 DMAWU_R::new(((self.bits >> 20) & 3) as u8)
497 }
498 #[doc = "Bit 22 - Debug Mode Run Enable"]
499 #[inline(always)]
500 pub fn debugrun(&self) -> DEBUGRUN_R {
501 DEBUGRUN_R::new(((self.bits >> 22) & 1) != 0)
502 }
503}
504impl W {
505 #[doc = "Bits 0:1 - Configure Scan Mode"]
506 #[inline(always)]
507 #[must_use]
508 pub fn scanmode(&mut self) -> SCANMODE_W<0> {
509 SCANMODE_W::new(self)
510 }
511 #[doc = "Bits 2:5 - Scan Start PRS Select"]
512 #[inline(always)]
513 #[must_use]
514 pub fn prssel(&mut self) -> PRSSEL_W<2> {
515 PRSSEL_W::new(self)
516 }
517 #[doc = "Bits 7:8 - Select Scan Configuration"]
518 #[inline(always)]
519 #[must_use]
520 pub fn scanconf(&mut self) -> SCANCONF_W<7> {
521 SCANCONF_W::new(self)
522 }
523 #[doc = "Bit 11 - Alternative Excitation Map"]
524 #[inline(always)]
525 #[must_use]
526 pub fn altexmap(&mut self) -> ALTEXMAP_W<11> {
527 ALTEXMAP_W::new(self)
528 }
529 #[doc = "Bit 13 - Enable Dual Sample Mode"]
530 #[inline(always)]
531 #[must_use]
532 pub fn dualsample(&mut self) -> DUALSAMPLE_W<13> {
533 DUALSAMPLE_W::new(self)
534 }
535 #[doc = "Bit 16 - Result Buffer Overwrite"]
536 #[inline(always)]
537 #[must_use]
538 pub fn bufow(&mut self) -> BUFOW_W<16> {
539 BUFOW_W::new(self)
540 }
541 #[doc = "Bit 17 - Enable Storing of SCANRES"]
542 #[inline(always)]
543 #[must_use]
544 pub fn strscanres(&mut self) -> STRSCANRES_W<17> {
545 STRSCANRES_W::new(self)
546 }
547 #[doc = "Bit 19 - Result Buffer Interrupt and DMA Trigger Level"]
548 #[inline(always)]
549 #[must_use]
550 pub fn bufidl(&mut self) -> BUFIDL_W<19> {
551 BUFIDL_W::new(self)
552 }
553 #[doc = "Bits 20:21 - DMA Wake-up From EM2"]
554 #[inline(always)]
555 #[must_use]
556 pub fn dmawu(&mut self) -> DMAWU_W<20> {
557 DMAWU_W::new(self)
558 }
559 #[doc = "Bit 22 - Debug Mode Run Enable"]
560 #[inline(always)]
561 #[must_use]
562 pub fn debugrun(&mut self) -> DEBUGRUN_W<22> {
563 DEBUGRUN_W::new(self)
564 }
565 #[doc = "Writes raw bits to the register."]
566 #[inline(always)]
567 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
568 self.0.bits(bits);
569 self
570 }
571}
572#[doc = "Control 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 [ctrl](index.html) module"]
573pub struct CTRL_SPEC;
574impl crate::RegisterSpec for CTRL_SPEC {
575 type Ux = u32;
576}
577#[doc = "`read()` method returns [ctrl::R](R) reader structure"]
578impl crate::Readable for CTRL_SPEC {
579 type Reader = R;
580}
581#[doc = "`write(|w| ..)` method takes [ctrl::W](W) writer structure"]
582impl crate::Writable for CTRL_SPEC {
583 type Writer = W;
584 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
585 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
586}
587#[doc = "`reset()` method sets CTRL to value 0"]
588impl crate::Resettable for CTRL_SPEC {
589 const RESET_VALUE: Self::Ux = 0;
590}