1#[doc = "Register `SCANCTRL` reader"]
2pub struct R(crate::R<SCANCTRL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<SCANCTRL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<SCANCTRL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<SCANCTRL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `SCANCTRL` writer"]
17pub struct W(crate::W<SCANCTRL_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<SCANCTRL_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<SCANCTRL_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<SCANCTRL_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `REP` reader - Scan Sequence Repetitive Mode"]
38pub type REP_R = crate::BitReader<bool>;
39#[doc = "Field `REP` writer - Scan Sequence Repetitive Mode"]
40pub type REP_W<'a> = crate::BitWriter<'a, u32, SCANCTRL_SPEC, bool, 0>;
41#[doc = "Field `DIFF` reader - Scan Sequence Differential Mode"]
42pub type DIFF_R = crate::BitReader<bool>;
43#[doc = "Field `DIFF` writer - Scan Sequence Differential Mode"]
44pub type DIFF_W<'a> = crate::BitWriter<'a, u32, SCANCTRL_SPEC, bool, 1>;
45#[doc = "Field `ADJ` reader - Scan Sequence Result Adjustment"]
46pub type ADJ_R = crate::BitReader<bool>;
47#[doc = "Field `ADJ` writer - Scan Sequence Result Adjustment"]
48pub type ADJ_W<'a> = crate::BitWriter<'a, u32, SCANCTRL_SPEC, bool, 2>;
49#[doc = "Scan Sequence Resolution Select\n\nValue on reset: 0"]
50#[derive(Clone, Copy, Debug, PartialEq)]
51#[repr(u8)]
52pub enum RES_A {
53 #[doc = "0: 12-bit resolution"]
54 _12BIT = 0,
55 #[doc = "1: 8-bit resolution"]
56 _8BIT = 1,
57 #[doc = "2: 6-bit resolution"]
58 _6BIT = 2,
59 #[doc = "3: Oversampling enabled. Oversampling rate is set in OVSRSEL"]
60 OVS = 3,
61}
62impl From<RES_A> for u8 {
63 #[inline(always)]
64 fn from(variant: RES_A) -> Self {
65 variant as _
66 }
67}
68#[doc = "Field `RES` reader - Scan Sequence Resolution Select"]
69pub type RES_R = crate::FieldReader<u8, RES_A>;
70impl RES_R {
71 #[doc = "Get enumerated values variant"]
72 #[inline(always)]
73 pub fn variant(&self) -> RES_A {
74 match self.bits {
75 0 => RES_A::_12BIT,
76 1 => RES_A::_8BIT,
77 2 => RES_A::_6BIT,
78 3 => RES_A::OVS,
79 _ => unreachable!(),
80 }
81 }
82 #[doc = "Checks if the value of the field is `_12BIT`"]
83 #[inline(always)]
84 pub fn is_12bit(&self) -> bool {
85 *self == RES_A::_12BIT
86 }
87 #[doc = "Checks if the value of the field is `_8BIT`"]
88 #[inline(always)]
89 pub fn is_8bit(&self) -> bool {
90 *self == RES_A::_8BIT
91 }
92 #[doc = "Checks if the value of the field is `_6BIT`"]
93 #[inline(always)]
94 pub fn is_6bit(&self) -> bool {
95 *self == RES_A::_6BIT
96 }
97 #[doc = "Checks if the value of the field is `OVS`"]
98 #[inline(always)]
99 pub fn is_ovs(&self) -> bool {
100 *self == RES_A::OVS
101 }
102}
103#[doc = "Field `RES` writer - Scan Sequence Resolution Select"]
104pub type RES_W<'a> = crate::FieldWriterSafe<'a, u32, SCANCTRL_SPEC, u8, RES_A, 2, 4>;
105impl<'a> RES_W<'a> {
106 #[doc = "12-bit resolution"]
107 #[inline(always)]
108 pub fn _12bit(self) -> &'a mut W {
109 self.variant(RES_A::_12BIT)
110 }
111 #[doc = "8-bit resolution"]
112 #[inline(always)]
113 pub fn _8bit(self) -> &'a mut W {
114 self.variant(RES_A::_8BIT)
115 }
116 #[doc = "6-bit resolution"]
117 #[inline(always)]
118 pub fn _6bit(self) -> &'a mut W {
119 self.variant(RES_A::_6BIT)
120 }
121 #[doc = "Oversampling enabled. Oversampling rate is set in OVSRSEL"]
122 #[inline(always)]
123 pub fn ovs(self) -> &'a mut W {
124 self.variant(RES_A::OVS)
125 }
126}
127#[doc = "Field `INPUTMASK` reader - Scan Sequence Input Mask"]
128pub type INPUTMASK_R = crate::FieldReader<u8, u8>;
129#[doc = "Field `INPUTMASK` writer - Scan Sequence Input Mask"]
130pub type INPUTMASK_W<'a> = crate::FieldWriter<'a, u32, SCANCTRL_SPEC, u8, u8, 8, 8>;
131#[doc = "Scan Sequence Reference Selection\n\nValue on reset: 0"]
132#[derive(Clone, Copy, Debug, PartialEq)]
133#[repr(u8)]
134pub enum REF_A {
135 #[doc = "0: Internal 1.25 V reference"]
136 _1V25 = 0,
137 #[doc = "1: Internal 2.5 V reference"]
138 _2V5 = 1,
139 #[doc = "2: VDD"]
140 VDD = 2,
141 #[doc = "3: Internal differential 5 V reference"]
142 _5VDIFF = 3,
143 #[doc = "4: Single ended external reference from ADCn_CH6"]
144 EXTSINGLE = 4,
145 #[doc = "5: Differential external reference, 2x(ADCn_CH6 - ADCn_CH7)"]
146 _2XEXTDIFF = 5,
147 #[doc = "6: Unbuffered 2xVDD"]
148 _2XVDD = 6,
149}
150impl From<REF_A> for u8 {
151 #[inline(always)]
152 fn from(variant: REF_A) -> Self {
153 variant as _
154 }
155}
156#[doc = "Field `REF` reader - Scan Sequence Reference Selection"]
157pub type REF_R = crate::FieldReader<u8, REF_A>;
158impl REF_R {
159 #[doc = "Get enumerated values variant"]
160 #[inline(always)]
161 pub fn variant(&self) -> Option<REF_A> {
162 match self.bits {
163 0 => Some(REF_A::_1V25),
164 1 => Some(REF_A::_2V5),
165 2 => Some(REF_A::VDD),
166 3 => Some(REF_A::_5VDIFF),
167 4 => Some(REF_A::EXTSINGLE),
168 5 => Some(REF_A::_2XEXTDIFF),
169 6 => Some(REF_A::_2XVDD),
170 _ => None,
171 }
172 }
173 #[doc = "Checks if the value of the field is `_1V25`"]
174 #[inline(always)]
175 pub fn is_1v25(&self) -> bool {
176 *self == REF_A::_1V25
177 }
178 #[doc = "Checks if the value of the field is `_2V5`"]
179 #[inline(always)]
180 pub fn is_2v5(&self) -> bool {
181 *self == REF_A::_2V5
182 }
183 #[doc = "Checks if the value of the field is `VDD`"]
184 #[inline(always)]
185 pub fn is_vdd(&self) -> bool {
186 *self == REF_A::VDD
187 }
188 #[doc = "Checks if the value of the field is `_5VDIFF`"]
189 #[inline(always)]
190 pub fn is_5vdiff(&self) -> bool {
191 *self == REF_A::_5VDIFF
192 }
193 #[doc = "Checks if the value of the field is `EXTSINGLE`"]
194 #[inline(always)]
195 pub fn is_extsingle(&self) -> bool {
196 *self == REF_A::EXTSINGLE
197 }
198 #[doc = "Checks if the value of the field is `_2XEXTDIFF`"]
199 #[inline(always)]
200 pub fn is_2xextdiff(&self) -> bool {
201 *self == REF_A::_2XEXTDIFF
202 }
203 #[doc = "Checks if the value of the field is `_2XVDD`"]
204 #[inline(always)]
205 pub fn is_2xvdd(&self) -> bool {
206 *self == REF_A::_2XVDD
207 }
208}
209#[doc = "Field `REF` writer - Scan Sequence Reference Selection"]
210pub type REF_W<'a> = crate::FieldWriter<'a, u32, SCANCTRL_SPEC, u8, REF_A, 3, 16>;
211impl<'a> REF_W<'a> {
212 #[doc = "Internal 1.25 V reference"]
213 #[inline(always)]
214 pub fn _1v25(self) -> &'a mut W {
215 self.variant(REF_A::_1V25)
216 }
217 #[doc = "Internal 2.5 V reference"]
218 #[inline(always)]
219 pub fn _2v5(self) -> &'a mut W {
220 self.variant(REF_A::_2V5)
221 }
222 #[doc = "VDD"]
223 #[inline(always)]
224 pub fn vdd(self) -> &'a mut W {
225 self.variant(REF_A::VDD)
226 }
227 #[doc = "Internal differential 5 V reference"]
228 #[inline(always)]
229 pub fn _5vdiff(self) -> &'a mut W {
230 self.variant(REF_A::_5VDIFF)
231 }
232 #[doc = "Single ended external reference from ADCn_CH6"]
233 #[inline(always)]
234 pub fn extsingle(self) -> &'a mut W {
235 self.variant(REF_A::EXTSINGLE)
236 }
237 #[doc = "Differential external reference, 2x(ADCn_CH6 - ADCn_CH7)"]
238 #[inline(always)]
239 pub fn _2xextdiff(self) -> &'a mut W {
240 self.variant(REF_A::_2XEXTDIFF)
241 }
242 #[doc = "Unbuffered 2xVDD"]
243 #[inline(always)]
244 pub fn _2xvdd(self) -> &'a mut W {
245 self.variant(REF_A::_2XVDD)
246 }
247}
248#[doc = "Scan Sample Acquisition Time\n\nValue on reset: 0"]
249#[derive(Clone, Copy, Debug, PartialEq)]
250#[repr(u8)]
251pub enum AT_A {
252 #[doc = "0: 1 ADC_CLK cycle acquisition time for scan samples"]
253 _1CYCLE = 0,
254 #[doc = "1: 2 ADC_CLK cycles acquisition time for scan samples"]
255 _2CYCLES = 1,
256 #[doc = "2: 4 ADC_CLK cycles acquisition time for scan samples"]
257 _4CYCLES = 2,
258 #[doc = "3: 8 ADC_CLK cycles acquisition time for scan samples"]
259 _8CYCLES = 3,
260 #[doc = "4: 16 ADC_CLK cycles acquisition time for scan samples"]
261 _16CYCLES = 4,
262 #[doc = "5: 32 ADC_CLK cycles acquisition time for scan samples"]
263 _32CYCLES = 5,
264 #[doc = "6: 64 ADC_CLK cycles acquisition time for scan samples"]
265 _64CYCLES = 6,
266 #[doc = "7: 128 ADC_CLK cycles acquisition time for scan samples"]
267 _128CYCLES = 7,
268 #[doc = "8: 256 ADC_CLK cycles acquisition time for scan samples"]
269 _256CYCLES = 8,
270}
271impl From<AT_A> for u8 {
272 #[inline(always)]
273 fn from(variant: AT_A) -> Self {
274 variant as _
275 }
276}
277#[doc = "Field `AT` reader - Scan Sample Acquisition Time"]
278pub type AT_R = crate::FieldReader<u8, AT_A>;
279impl AT_R {
280 #[doc = "Get enumerated values variant"]
281 #[inline(always)]
282 pub fn variant(&self) -> Option<AT_A> {
283 match self.bits {
284 0 => Some(AT_A::_1CYCLE),
285 1 => Some(AT_A::_2CYCLES),
286 2 => Some(AT_A::_4CYCLES),
287 3 => Some(AT_A::_8CYCLES),
288 4 => Some(AT_A::_16CYCLES),
289 5 => Some(AT_A::_32CYCLES),
290 6 => Some(AT_A::_64CYCLES),
291 7 => Some(AT_A::_128CYCLES),
292 8 => Some(AT_A::_256CYCLES),
293 _ => None,
294 }
295 }
296 #[doc = "Checks if the value of the field is `_1CYCLE`"]
297 #[inline(always)]
298 pub fn is_1cycle(&self) -> bool {
299 *self == AT_A::_1CYCLE
300 }
301 #[doc = "Checks if the value of the field is `_2CYCLES`"]
302 #[inline(always)]
303 pub fn is_2cycles(&self) -> bool {
304 *self == AT_A::_2CYCLES
305 }
306 #[doc = "Checks if the value of the field is `_4CYCLES`"]
307 #[inline(always)]
308 pub fn is_4cycles(&self) -> bool {
309 *self == AT_A::_4CYCLES
310 }
311 #[doc = "Checks if the value of the field is `_8CYCLES`"]
312 #[inline(always)]
313 pub fn is_8cycles(&self) -> bool {
314 *self == AT_A::_8CYCLES
315 }
316 #[doc = "Checks if the value of the field is `_16CYCLES`"]
317 #[inline(always)]
318 pub fn is_16cycles(&self) -> bool {
319 *self == AT_A::_16CYCLES
320 }
321 #[doc = "Checks if the value of the field is `_32CYCLES`"]
322 #[inline(always)]
323 pub fn is_32cycles(&self) -> bool {
324 *self == AT_A::_32CYCLES
325 }
326 #[doc = "Checks if the value of the field is `_64CYCLES`"]
327 #[inline(always)]
328 pub fn is_64cycles(&self) -> bool {
329 *self == AT_A::_64CYCLES
330 }
331 #[doc = "Checks if the value of the field is `_128CYCLES`"]
332 #[inline(always)]
333 pub fn is_128cycles(&self) -> bool {
334 *self == AT_A::_128CYCLES
335 }
336 #[doc = "Checks if the value of the field is `_256CYCLES`"]
337 #[inline(always)]
338 pub fn is_256cycles(&self) -> bool {
339 *self == AT_A::_256CYCLES
340 }
341}
342#[doc = "Field `AT` writer - Scan Sample Acquisition Time"]
343pub type AT_W<'a> = crate::FieldWriter<'a, u32, SCANCTRL_SPEC, u8, AT_A, 4, 20>;
344impl<'a> AT_W<'a> {
345 #[doc = "1 ADC_CLK cycle acquisition time for scan samples"]
346 #[inline(always)]
347 pub fn _1cycle(self) -> &'a mut W {
348 self.variant(AT_A::_1CYCLE)
349 }
350 #[doc = "2 ADC_CLK cycles acquisition time for scan samples"]
351 #[inline(always)]
352 pub fn _2cycles(self) -> &'a mut W {
353 self.variant(AT_A::_2CYCLES)
354 }
355 #[doc = "4 ADC_CLK cycles acquisition time for scan samples"]
356 #[inline(always)]
357 pub fn _4cycles(self) -> &'a mut W {
358 self.variant(AT_A::_4CYCLES)
359 }
360 #[doc = "8 ADC_CLK cycles acquisition time for scan samples"]
361 #[inline(always)]
362 pub fn _8cycles(self) -> &'a mut W {
363 self.variant(AT_A::_8CYCLES)
364 }
365 #[doc = "16 ADC_CLK cycles acquisition time for scan samples"]
366 #[inline(always)]
367 pub fn _16cycles(self) -> &'a mut W {
368 self.variant(AT_A::_16CYCLES)
369 }
370 #[doc = "32 ADC_CLK cycles acquisition time for scan samples"]
371 #[inline(always)]
372 pub fn _32cycles(self) -> &'a mut W {
373 self.variant(AT_A::_32CYCLES)
374 }
375 #[doc = "64 ADC_CLK cycles acquisition time for scan samples"]
376 #[inline(always)]
377 pub fn _64cycles(self) -> &'a mut W {
378 self.variant(AT_A::_64CYCLES)
379 }
380 #[doc = "128 ADC_CLK cycles acquisition time for scan samples"]
381 #[inline(always)]
382 pub fn _128cycles(self) -> &'a mut W {
383 self.variant(AT_A::_128CYCLES)
384 }
385 #[doc = "256 ADC_CLK cycles acquisition time for scan samples"]
386 #[inline(always)]
387 pub fn _256cycles(self) -> &'a mut W {
388 self.variant(AT_A::_256CYCLES)
389 }
390}
391#[doc = "Field `PRSEN` reader - Scan Sequence PRS Trigger Enable"]
392pub type PRSEN_R = crate::BitReader<bool>;
393#[doc = "Field `PRSEN` writer - Scan Sequence PRS Trigger Enable"]
394pub type PRSEN_W<'a> = crate::BitWriter<'a, u32, SCANCTRL_SPEC, bool, 24>;
395#[doc = "Scan Sequence PRS Trigger Select\n\nValue on reset: 0"]
396#[derive(Clone, Copy, Debug, PartialEq)]
397#[repr(u8)]
398pub enum PRSSEL_A {
399 #[doc = "0: PRS ch 0 triggers scan sequence"]
400 PRSCH0 = 0,
401 #[doc = "1: PRS ch 1 triggers scan sequence"]
402 PRSCH1 = 1,
403 #[doc = "2: PRS ch 2 triggers scan sequence"]
404 PRSCH2 = 2,
405 #[doc = "3: PRS ch 3 triggers scan sequence"]
406 PRSCH3 = 3,
407 #[doc = "4: PRS ch 4 triggers scan sequence"]
408 PRSCH4 = 4,
409 #[doc = "5: PRS ch 5 triggers scan sequence"]
410 PRSCH5 = 5,
411 #[doc = "6: PRS ch 6 triggers scan sequence"]
412 PRSCH6 = 6,
413 #[doc = "7: PRS ch 7 triggers scan sequence"]
414 PRSCH7 = 7,
415}
416impl From<PRSSEL_A> for u8 {
417 #[inline(always)]
418 fn from(variant: PRSSEL_A) -> Self {
419 variant as _
420 }
421}
422#[doc = "Field `PRSSEL` reader - Scan Sequence PRS Trigger Select"]
423pub type PRSSEL_R = crate::FieldReader<u8, PRSSEL_A>;
424impl PRSSEL_R {
425 #[doc = "Get enumerated values variant"]
426 #[inline(always)]
427 pub fn variant(&self) -> PRSSEL_A {
428 match self.bits {
429 0 => PRSSEL_A::PRSCH0,
430 1 => PRSSEL_A::PRSCH1,
431 2 => PRSSEL_A::PRSCH2,
432 3 => PRSSEL_A::PRSCH3,
433 4 => PRSSEL_A::PRSCH4,
434 5 => PRSSEL_A::PRSCH5,
435 6 => PRSSEL_A::PRSCH6,
436 7 => PRSSEL_A::PRSCH7,
437 _ => unreachable!(),
438 }
439 }
440 #[doc = "Checks if the value of the field is `PRSCH0`"]
441 #[inline(always)]
442 pub fn is_prsch0(&self) -> bool {
443 *self == PRSSEL_A::PRSCH0
444 }
445 #[doc = "Checks if the value of the field is `PRSCH1`"]
446 #[inline(always)]
447 pub fn is_prsch1(&self) -> bool {
448 *self == PRSSEL_A::PRSCH1
449 }
450 #[doc = "Checks if the value of the field is `PRSCH2`"]
451 #[inline(always)]
452 pub fn is_prsch2(&self) -> bool {
453 *self == PRSSEL_A::PRSCH2
454 }
455 #[doc = "Checks if the value of the field is `PRSCH3`"]
456 #[inline(always)]
457 pub fn is_prsch3(&self) -> bool {
458 *self == PRSSEL_A::PRSCH3
459 }
460 #[doc = "Checks if the value of the field is `PRSCH4`"]
461 #[inline(always)]
462 pub fn is_prsch4(&self) -> bool {
463 *self == PRSSEL_A::PRSCH4
464 }
465 #[doc = "Checks if the value of the field is `PRSCH5`"]
466 #[inline(always)]
467 pub fn is_prsch5(&self) -> bool {
468 *self == PRSSEL_A::PRSCH5
469 }
470 #[doc = "Checks if the value of the field is `PRSCH6`"]
471 #[inline(always)]
472 pub fn is_prsch6(&self) -> bool {
473 *self == PRSSEL_A::PRSCH6
474 }
475 #[doc = "Checks if the value of the field is `PRSCH7`"]
476 #[inline(always)]
477 pub fn is_prsch7(&self) -> bool {
478 *self == PRSSEL_A::PRSCH7
479 }
480}
481#[doc = "Field `PRSSEL` writer - Scan Sequence PRS Trigger Select"]
482pub type PRSSEL_W<'a> = crate::FieldWriterSafe<'a, u32, SCANCTRL_SPEC, u8, PRSSEL_A, 3, 28>;
483impl<'a> PRSSEL_W<'a> {
484 #[doc = "PRS ch 0 triggers scan sequence"]
485 #[inline(always)]
486 pub fn prsch0(self) -> &'a mut W {
487 self.variant(PRSSEL_A::PRSCH0)
488 }
489 #[doc = "PRS ch 1 triggers scan sequence"]
490 #[inline(always)]
491 pub fn prsch1(self) -> &'a mut W {
492 self.variant(PRSSEL_A::PRSCH1)
493 }
494 #[doc = "PRS ch 2 triggers scan sequence"]
495 #[inline(always)]
496 pub fn prsch2(self) -> &'a mut W {
497 self.variant(PRSSEL_A::PRSCH2)
498 }
499 #[doc = "PRS ch 3 triggers scan sequence"]
500 #[inline(always)]
501 pub fn prsch3(self) -> &'a mut W {
502 self.variant(PRSSEL_A::PRSCH3)
503 }
504 #[doc = "PRS ch 4 triggers scan sequence"]
505 #[inline(always)]
506 pub fn prsch4(self) -> &'a mut W {
507 self.variant(PRSSEL_A::PRSCH4)
508 }
509 #[doc = "PRS ch 5 triggers scan sequence"]
510 #[inline(always)]
511 pub fn prsch5(self) -> &'a mut W {
512 self.variant(PRSSEL_A::PRSCH5)
513 }
514 #[doc = "PRS ch 6 triggers scan sequence"]
515 #[inline(always)]
516 pub fn prsch6(self) -> &'a mut W {
517 self.variant(PRSSEL_A::PRSCH6)
518 }
519 #[doc = "PRS ch 7 triggers scan sequence"]
520 #[inline(always)]
521 pub fn prsch7(self) -> &'a mut W {
522 self.variant(PRSSEL_A::PRSCH7)
523 }
524}
525impl R {
526 #[doc = "Bit 0 - Scan Sequence Repetitive Mode"]
527 #[inline(always)]
528 pub fn rep(&self) -> REP_R {
529 REP_R::new((self.bits & 1) != 0)
530 }
531 #[doc = "Bit 1 - Scan Sequence Differential Mode"]
532 #[inline(always)]
533 pub fn diff(&self) -> DIFF_R {
534 DIFF_R::new(((self.bits >> 1) & 1) != 0)
535 }
536 #[doc = "Bit 2 - Scan Sequence Result Adjustment"]
537 #[inline(always)]
538 pub fn adj(&self) -> ADJ_R {
539 ADJ_R::new(((self.bits >> 2) & 1) != 0)
540 }
541 #[doc = "Bits 4:5 - Scan Sequence Resolution Select"]
542 #[inline(always)]
543 pub fn res(&self) -> RES_R {
544 RES_R::new(((self.bits >> 4) & 3) as u8)
545 }
546 #[doc = "Bits 8:15 - Scan Sequence Input Mask"]
547 #[inline(always)]
548 pub fn inputmask(&self) -> INPUTMASK_R {
549 INPUTMASK_R::new(((self.bits >> 8) & 0xff) as u8)
550 }
551 #[doc = "Bits 16:18 - Scan Sequence Reference Selection"]
552 #[inline(always)]
553 pub fn ref_(&self) -> REF_R {
554 REF_R::new(((self.bits >> 16) & 7) as u8)
555 }
556 #[doc = "Bits 20:23 - Scan Sample Acquisition Time"]
557 #[inline(always)]
558 pub fn at(&self) -> AT_R {
559 AT_R::new(((self.bits >> 20) & 0x0f) as u8)
560 }
561 #[doc = "Bit 24 - Scan Sequence PRS Trigger Enable"]
562 #[inline(always)]
563 pub fn prsen(&self) -> PRSEN_R {
564 PRSEN_R::new(((self.bits >> 24) & 1) != 0)
565 }
566 #[doc = "Bits 28:30 - Scan Sequence PRS Trigger Select"]
567 #[inline(always)]
568 pub fn prssel(&self) -> PRSSEL_R {
569 PRSSEL_R::new(((self.bits >> 28) & 7) as u8)
570 }
571}
572impl W {
573 #[doc = "Bit 0 - Scan Sequence Repetitive Mode"]
574 #[inline(always)]
575 pub fn rep(&mut self) -> REP_W {
576 REP_W::new(self)
577 }
578 #[doc = "Bit 1 - Scan Sequence Differential Mode"]
579 #[inline(always)]
580 pub fn diff(&mut self) -> DIFF_W {
581 DIFF_W::new(self)
582 }
583 #[doc = "Bit 2 - Scan Sequence Result Adjustment"]
584 #[inline(always)]
585 pub fn adj(&mut self) -> ADJ_W {
586 ADJ_W::new(self)
587 }
588 #[doc = "Bits 4:5 - Scan Sequence Resolution Select"]
589 #[inline(always)]
590 pub fn res(&mut self) -> RES_W {
591 RES_W::new(self)
592 }
593 #[doc = "Bits 8:15 - Scan Sequence Input Mask"]
594 #[inline(always)]
595 pub fn inputmask(&mut self) -> INPUTMASK_W {
596 INPUTMASK_W::new(self)
597 }
598 #[doc = "Bits 16:18 - Scan Sequence Reference Selection"]
599 #[inline(always)]
600 pub fn ref_(&mut self) -> REF_W {
601 REF_W::new(self)
602 }
603 #[doc = "Bits 20:23 - Scan Sample Acquisition Time"]
604 #[inline(always)]
605 pub fn at(&mut self) -> AT_W {
606 AT_W::new(self)
607 }
608 #[doc = "Bit 24 - Scan Sequence PRS Trigger Enable"]
609 #[inline(always)]
610 pub fn prsen(&mut self) -> PRSEN_W {
611 PRSEN_W::new(self)
612 }
613 #[doc = "Bits 28:30 - Scan Sequence PRS Trigger Select"]
614 #[inline(always)]
615 pub fn prssel(&mut self) -> PRSSEL_W {
616 PRSSEL_W::new(self)
617 }
618 #[doc = "Writes raw bits to the register."]
619 #[inline(always)]
620 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
621 self.0.bits(bits);
622 self
623 }
624}
625#[doc = "Scan 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 [scanctrl](index.html) module"]
626pub struct SCANCTRL_SPEC;
627impl crate::RegisterSpec for SCANCTRL_SPEC {
628 type Ux = u32;
629}
630#[doc = "`read()` method returns [scanctrl::R](R) reader structure"]
631impl crate::Readable for SCANCTRL_SPEC {
632 type Reader = R;
633}
634#[doc = "`write(|w| ..)` method takes [scanctrl::W](W) writer structure"]
635impl crate::Writable for SCANCTRL_SPEC {
636 type Writer = W;
637}
638#[doc = "`reset()` method sets SCANCTRL to value 0"]
639impl crate::Resettable for SCANCTRL_SPEC {
640 #[inline(always)]
641 fn reset_value() -> Self::Ux {
642 0
643 }
644}