efm32hg321_pac/adc0/
singlectrl.rs

1#[doc = "Register `SINGLECTRL` reader"]
2pub struct R(crate::R<SINGLECTRL_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SINGLECTRL_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SINGLECTRL_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SINGLECTRL_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `SINGLECTRL` writer"]
17pub struct W(crate::W<SINGLECTRL_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<SINGLECTRL_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<SINGLECTRL_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<SINGLECTRL_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `REP` reader - Single Sample Repetitive Mode"]
38pub type REP_R = crate::BitReader<bool>;
39#[doc = "Field `REP` writer - Single Sample Repetitive Mode"]
40pub type REP_W<'a> = crate::BitWriter<'a, u32, SINGLECTRL_SPEC, bool, 0>;
41#[doc = "Field `DIFF` reader - Single Sample Differential Mode"]
42pub type DIFF_R = crate::BitReader<bool>;
43#[doc = "Field `DIFF` writer - Single Sample Differential Mode"]
44pub type DIFF_W<'a> = crate::BitWriter<'a, u32, SINGLECTRL_SPEC, bool, 1>;
45#[doc = "Field `ADJ` reader - Single Sample Result Adjustment"]
46pub type ADJ_R = crate::BitReader<bool>;
47#[doc = "Field `ADJ` writer - Single Sample Result Adjustment"]
48pub type ADJ_W<'a> = crate::BitWriter<'a, u32, SINGLECTRL_SPEC, bool, 2>;
49#[doc = "Single Sample 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 - Single Sample 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 - Single Sample Resolution Select"]
104pub type RES_W<'a> = crate::FieldWriterSafe<'a, u32, SINGLECTRL_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 `INPUTSEL` reader - Single Sample Input Selection"]
128pub type INPUTSEL_R = crate::FieldReader<u8, u8>;
129#[doc = "Field `INPUTSEL` writer - Single Sample Input Selection"]
130pub type INPUTSEL_W<'a> = crate::FieldWriter<'a, u32, SINGLECTRL_SPEC, u8, u8, 4, 8>;
131#[doc = "Single Sample 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: Buffered 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 - Single Sample 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 - Single Sample Reference Selection"]
210pub type REF_W<'a> = crate::FieldWriter<'a, u32, SINGLECTRL_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 = "Buffered 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 = "Single 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 single sample"]
253    _1CYCLE = 0,
254    #[doc = "1: 2 ADC_CLK cycles acquisition time for single sample"]
255    _2CYCLES = 1,
256    #[doc = "2: 4 ADC_CLK cycles acquisition time for single sample"]
257    _4CYCLES = 2,
258    #[doc = "3: 8 ADC_CLK cycles acquisition time for single sample"]
259    _8CYCLES = 3,
260    #[doc = "4: 16 ADC_CLK cycles acquisition time for single sample"]
261    _16CYCLES = 4,
262    #[doc = "5: 32 ADC_CLK cycles acquisition time for single sample"]
263    _32CYCLES = 5,
264    #[doc = "6: 64 ADC_CLK cycles acquisition time for single sample"]
265    _64CYCLES = 6,
266    #[doc = "7: 128 ADC_CLK cycles acquisition time for single sample"]
267    _128CYCLES = 7,
268    #[doc = "8: 256 ADC_CLK cycles acquisition time for single sample"]
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 - Single 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 - Single Sample Acquisition Time"]
343pub type AT_W<'a> = crate::FieldWriter<'a, u32, SINGLECTRL_SPEC, u8, AT_A, 4, 20>;
344impl<'a> AT_W<'a> {
345    #[doc = "1 ADC_CLK cycle acquisition time for single sample"]
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 single sample"]
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 single sample"]
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 single sample"]
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 single sample"]
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 single sample"]
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 single sample"]
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 single sample"]
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 single sample"]
386    #[inline(always)]
387    pub fn _256cycles(self) -> &'a mut W {
388        self.variant(AT_A::_256CYCLES)
389    }
390}
391#[doc = "Field `PRSEN` reader - Single Sample PRS Trigger Enable"]
392pub type PRSEN_R = crate::BitReader<bool>;
393#[doc = "Field `PRSEN` writer - Single Sample PRS Trigger Enable"]
394pub type PRSEN_W<'a> = crate::BitWriter<'a, u32, SINGLECTRL_SPEC, bool, 24>;
395#[doc = "Single Sample 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 single sample"]
400    PRSCH0 = 0,
401    #[doc = "1: PRS ch 1 triggers single sample"]
402    PRSCH1 = 1,
403    #[doc = "2: PRS ch 2 triggers single sample"]
404    PRSCH2 = 2,
405    #[doc = "3: PRS ch 3 triggers single sample"]
406    PRSCH3 = 3,
407    #[doc = "4: PRS ch 4 triggers single sample"]
408    PRSCH4 = 4,
409    #[doc = "5: PRS ch 5 triggers single sample"]
410    PRSCH5 = 5,
411}
412impl From<PRSSEL_A> for u8 {
413    #[inline(always)]
414    fn from(variant: PRSSEL_A) -> Self {
415        variant as _
416    }
417}
418#[doc = "Field `PRSSEL` reader - Single Sample PRS Trigger Select"]
419pub type PRSSEL_R = crate::FieldReader<u8, PRSSEL_A>;
420impl PRSSEL_R {
421    #[doc = "Get enumerated values variant"]
422    #[inline(always)]
423    pub fn variant(&self) -> Option<PRSSEL_A> {
424        match self.bits {
425            0 => Some(PRSSEL_A::PRSCH0),
426            1 => Some(PRSSEL_A::PRSCH1),
427            2 => Some(PRSSEL_A::PRSCH2),
428            3 => Some(PRSSEL_A::PRSCH3),
429            4 => Some(PRSSEL_A::PRSCH4),
430            5 => Some(PRSSEL_A::PRSCH5),
431            _ => None,
432        }
433    }
434    #[doc = "Checks if the value of the field is `PRSCH0`"]
435    #[inline(always)]
436    pub fn is_prsch0(&self) -> bool {
437        *self == PRSSEL_A::PRSCH0
438    }
439    #[doc = "Checks if the value of the field is `PRSCH1`"]
440    #[inline(always)]
441    pub fn is_prsch1(&self) -> bool {
442        *self == PRSSEL_A::PRSCH1
443    }
444    #[doc = "Checks if the value of the field is `PRSCH2`"]
445    #[inline(always)]
446    pub fn is_prsch2(&self) -> bool {
447        *self == PRSSEL_A::PRSCH2
448    }
449    #[doc = "Checks if the value of the field is `PRSCH3`"]
450    #[inline(always)]
451    pub fn is_prsch3(&self) -> bool {
452        *self == PRSSEL_A::PRSCH3
453    }
454    #[doc = "Checks if the value of the field is `PRSCH4`"]
455    #[inline(always)]
456    pub fn is_prsch4(&self) -> bool {
457        *self == PRSSEL_A::PRSCH4
458    }
459    #[doc = "Checks if the value of the field is `PRSCH5`"]
460    #[inline(always)]
461    pub fn is_prsch5(&self) -> bool {
462        *self == PRSSEL_A::PRSCH5
463    }
464}
465#[doc = "Field `PRSSEL` writer - Single Sample PRS Trigger Select"]
466pub type PRSSEL_W<'a> = crate::FieldWriter<'a, u32, SINGLECTRL_SPEC, u8, PRSSEL_A, 3, 28>;
467impl<'a> PRSSEL_W<'a> {
468    #[doc = "PRS ch 0 triggers single sample"]
469    #[inline(always)]
470    pub fn prsch0(self) -> &'a mut W {
471        self.variant(PRSSEL_A::PRSCH0)
472    }
473    #[doc = "PRS ch 1 triggers single sample"]
474    #[inline(always)]
475    pub fn prsch1(self) -> &'a mut W {
476        self.variant(PRSSEL_A::PRSCH1)
477    }
478    #[doc = "PRS ch 2 triggers single sample"]
479    #[inline(always)]
480    pub fn prsch2(self) -> &'a mut W {
481        self.variant(PRSSEL_A::PRSCH2)
482    }
483    #[doc = "PRS ch 3 triggers single sample"]
484    #[inline(always)]
485    pub fn prsch3(self) -> &'a mut W {
486        self.variant(PRSSEL_A::PRSCH3)
487    }
488    #[doc = "PRS ch 4 triggers single sample"]
489    #[inline(always)]
490    pub fn prsch4(self) -> &'a mut W {
491        self.variant(PRSSEL_A::PRSCH4)
492    }
493    #[doc = "PRS ch 5 triggers single sample"]
494    #[inline(always)]
495    pub fn prsch5(self) -> &'a mut W {
496        self.variant(PRSSEL_A::PRSCH5)
497    }
498}
499impl R {
500    #[doc = "Bit 0 - Single Sample Repetitive Mode"]
501    #[inline(always)]
502    pub fn rep(&self) -> REP_R {
503        REP_R::new((self.bits & 1) != 0)
504    }
505    #[doc = "Bit 1 - Single Sample Differential Mode"]
506    #[inline(always)]
507    pub fn diff(&self) -> DIFF_R {
508        DIFF_R::new(((self.bits >> 1) & 1) != 0)
509    }
510    #[doc = "Bit 2 - Single Sample Result Adjustment"]
511    #[inline(always)]
512    pub fn adj(&self) -> ADJ_R {
513        ADJ_R::new(((self.bits >> 2) & 1) != 0)
514    }
515    #[doc = "Bits 4:5 - Single Sample Resolution Select"]
516    #[inline(always)]
517    pub fn res(&self) -> RES_R {
518        RES_R::new(((self.bits >> 4) & 3) as u8)
519    }
520    #[doc = "Bits 8:11 - Single Sample Input Selection"]
521    #[inline(always)]
522    pub fn inputsel(&self) -> INPUTSEL_R {
523        INPUTSEL_R::new(((self.bits >> 8) & 0x0f) as u8)
524    }
525    #[doc = "Bits 16:18 - Single Sample Reference Selection"]
526    #[inline(always)]
527    pub fn ref_(&self) -> REF_R {
528        REF_R::new(((self.bits >> 16) & 7) as u8)
529    }
530    #[doc = "Bits 20:23 - Single Sample Acquisition Time"]
531    #[inline(always)]
532    pub fn at(&self) -> AT_R {
533        AT_R::new(((self.bits >> 20) & 0x0f) as u8)
534    }
535    #[doc = "Bit 24 - Single Sample PRS Trigger Enable"]
536    #[inline(always)]
537    pub fn prsen(&self) -> PRSEN_R {
538        PRSEN_R::new(((self.bits >> 24) & 1) != 0)
539    }
540    #[doc = "Bits 28:30 - Single Sample PRS Trigger Select"]
541    #[inline(always)]
542    pub fn prssel(&self) -> PRSSEL_R {
543        PRSSEL_R::new(((self.bits >> 28) & 7) as u8)
544    }
545}
546impl W {
547    #[doc = "Bit 0 - Single Sample Repetitive Mode"]
548    #[inline(always)]
549    pub fn rep(&mut self) -> REP_W {
550        REP_W::new(self)
551    }
552    #[doc = "Bit 1 - Single Sample Differential Mode"]
553    #[inline(always)]
554    pub fn diff(&mut self) -> DIFF_W {
555        DIFF_W::new(self)
556    }
557    #[doc = "Bit 2 - Single Sample Result Adjustment"]
558    #[inline(always)]
559    pub fn adj(&mut self) -> ADJ_W {
560        ADJ_W::new(self)
561    }
562    #[doc = "Bits 4:5 - Single Sample Resolution Select"]
563    #[inline(always)]
564    pub fn res(&mut self) -> RES_W {
565        RES_W::new(self)
566    }
567    #[doc = "Bits 8:11 - Single Sample Input Selection"]
568    #[inline(always)]
569    pub fn inputsel(&mut self) -> INPUTSEL_W {
570        INPUTSEL_W::new(self)
571    }
572    #[doc = "Bits 16:18 - Single Sample Reference Selection"]
573    #[inline(always)]
574    pub fn ref_(&mut self) -> REF_W {
575        REF_W::new(self)
576    }
577    #[doc = "Bits 20:23 - Single Sample Acquisition Time"]
578    #[inline(always)]
579    pub fn at(&mut self) -> AT_W {
580        AT_W::new(self)
581    }
582    #[doc = "Bit 24 - Single Sample PRS Trigger Enable"]
583    #[inline(always)]
584    pub fn prsen(&mut self) -> PRSEN_W {
585        PRSEN_W::new(self)
586    }
587    #[doc = "Bits 28:30 - Single Sample PRS Trigger Select"]
588    #[inline(always)]
589    pub fn prssel(&mut self) -> PRSSEL_W {
590        PRSSEL_W::new(self)
591    }
592    #[doc = "Writes raw bits to the register."]
593    #[inline(always)]
594    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
595        self.0.bits(bits);
596        self
597    }
598}
599#[doc = "Single Sample 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 [singlectrl](index.html) module"]
600pub struct SINGLECTRL_SPEC;
601impl crate::RegisterSpec for SINGLECTRL_SPEC {
602    type Ux = u32;
603}
604#[doc = "`read()` method returns [singlectrl::R](R) reader structure"]
605impl crate::Readable for SINGLECTRL_SPEC {
606    type Reader = R;
607}
608#[doc = "`write(|w| ..)` method takes [singlectrl::W](W) writer structure"]
609impl crate::Writable for SINGLECTRL_SPEC {
610    type Writer = W;
611}
612#[doc = "`reset()` method sets SINGLECTRL to value 0"]
613impl crate::Resettable for SINGLECTRL_SPEC {
614    #[inline(always)]
615    fn reset_value() -> Self::Ux {
616        0
617    }
618}