efm32gg11b510_pac/vdac0/
opa1_ctrl.rs

1#[doc = "Register `OPA1_CTRL` reader"]
2pub struct R(crate::R<OPA1_CTRL_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<OPA1_CTRL_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<OPA1_CTRL_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<OPA1_CTRL_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `OPA1_CTRL` writer"]
17pub struct W(crate::W<OPA1_CTRL_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<OPA1_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<OPA1_CTRL_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<OPA1_CTRL_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "OPAx Operation Mode\n\nValue on reset: 2"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39#[repr(u8)]
40pub enum DRIVESTRENGTH_A {
41    #[doc = "0: Lower accuracy with Low drive strength."]
42    _0 = 0,
43    #[doc = "1: Low accuracy with Low drive strength."]
44    _1 = 1,
45    #[doc = "2: High accuracy with High drive strength."]
46    _2 = 2,
47    #[doc = "3: Higher accuracy with High drive strength."]
48    _3 = 3,
49}
50impl From<DRIVESTRENGTH_A> for u8 {
51    #[inline(always)]
52    fn from(variant: DRIVESTRENGTH_A) -> Self {
53        variant as _
54    }
55}
56#[doc = "Field `DRIVESTRENGTH` reader - OPAx Operation Mode"]
57pub type DRIVESTRENGTH_R = crate::FieldReader<u8, DRIVESTRENGTH_A>;
58impl DRIVESTRENGTH_R {
59    #[doc = "Get enumerated values variant"]
60    #[inline(always)]
61    pub fn variant(&self) -> DRIVESTRENGTH_A {
62        match self.bits {
63            0 => DRIVESTRENGTH_A::_0,
64            1 => DRIVESTRENGTH_A::_1,
65            2 => DRIVESTRENGTH_A::_2,
66            3 => DRIVESTRENGTH_A::_3,
67            _ => unreachable!(),
68        }
69    }
70    #[doc = "Checks if the value of the field is `_0`"]
71    #[inline(always)]
72    pub fn is_0(&self) -> bool {
73        *self == DRIVESTRENGTH_A::_0
74    }
75    #[doc = "Checks if the value of the field is `_1`"]
76    #[inline(always)]
77    pub fn is_1(&self) -> bool {
78        *self == DRIVESTRENGTH_A::_1
79    }
80    #[doc = "Checks if the value of the field is `_2`"]
81    #[inline(always)]
82    pub fn is_2(&self) -> bool {
83        *self == DRIVESTRENGTH_A::_2
84    }
85    #[doc = "Checks if the value of the field is `_3`"]
86    #[inline(always)]
87    pub fn is_3(&self) -> bool {
88        *self == DRIVESTRENGTH_A::_3
89    }
90}
91#[doc = "Field `DRIVESTRENGTH` writer - OPAx Operation Mode"]
92pub type DRIVESTRENGTH_W<'a> =
93    crate::FieldWriterSafe<'a, u32, OPA1_CTRL_SPEC, u8, DRIVESTRENGTH_A, 2, 0>;
94impl<'a> DRIVESTRENGTH_W<'a> {
95    #[doc = "Lower accuracy with Low drive strength."]
96    #[inline(always)]
97    pub fn _0(self) -> &'a mut W {
98        self.variant(DRIVESTRENGTH_A::_0)
99    }
100    #[doc = "Low accuracy with Low drive strength."]
101    #[inline(always)]
102    pub fn _1(self) -> &'a mut W {
103        self.variant(DRIVESTRENGTH_A::_1)
104    }
105    #[doc = "High accuracy with High drive strength."]
106    #[inline(always)]
107    pub fn _2(self) -> &'a mut W {
108        self.variant(DRIVESTRENGTH_A::_2)
109    }
110    #[doc = "Higher accuracy with High drive strength."]
111    #[inline(always)]
112    pub fn _3(self) -> &'a mut W {
113        self.variant(DRIVESTRENGTH_A::_3)
114    }
115}
116#[doc = "Field `INCBW` reader - OPAx Unity Gain Bandwidth Scale"]
117pub type INCBW_R = crate::BitReader<bool>;
118#[doc = "Field `INCBW` writer - OPAx Unity Gain Bandwidth Scale"]
119pub type INCBW_W<'a> = crate::BitWriter<'a, u32, OPA1_CTRL_SPEC, bool, 2>;
120#[doc = "Field `HCMDIS` reader - High Common Mode Disable"]
121pub type HCMDIS_R = crate::BitReader<bool>;
122#[doc = "Field `HCMDIS` writer - High Common Mode Disable"]
123pub type HCMDIS_W<'a> = crate::BitWriter<'a, u32, OPA1_CTRL_SPEC, bool, 3>;
124#[doc = "Field `OUTSCALE` reader - Scale OPAx Output Driving Strength"]
125pub type OUTSCALE_R = crate::BitReader<bool>;
126#[doc = "Field `OUTSCALE` writer - Scale OPAx Output Driving Strength"]
127pub type OUTSCALE_W<'a> = crate::BitWriter<'a, u32, OPA1_CTRL_SPEC, bool, 4>;
128#[doc = "Field `PRSEN` reader - OPAx PRS Trigger Enable"]
129pub type PRSEN_R = crate::BitReader<bool>;
130#[doc = "Field `PRSEN` writer - OPAx PRS Trigger Enable"]
131pub type PRSEN_W<'a> = crate::BitWriter<'a, u32, OPA1_CTRL_SPEC, bool, 8>;
132#[doc = "Field `PRSMODE` reader - OPAx PRS Trigger Mode"]
133pub type PRSMODE_R = crate::BitReader<bool>;
134#[doc = "Field `PRSMODE` writer - OPAx PRS Trigger Mode"]
135pub type PRSMODE_W<'a> = crate::BitWriter<'a, u32, OPA1_CTRL_SPEC, bool, 9>;
136#[doc = "OPAx PRS Trigger Select\n\nValue on reset: 0"]
137#[derive(Clone, Copy, Debug, PartialEq)]
138#[repr(u8)]
139pub enum PRSSEL_A {
140    #[doc = "0: PRS ch 0 triggers OPA."]
141    PRSCH0 = 0,
142    #[doc = "1: PRS ch 1 triggers OPA."]
143    PRSCH1 = 1,
144    #[doc = "2: PRS ch 2 triggers OPA."]
145    PRSCH2 = 2,
146    #[doc = "3: PRS ch 3 triggers OPA."]
147    PRSCH3 = 3,
148    #[doc = "4: PRS ch 4 triggers OPA."]
149    PRSCH4 = 4,
150    #[doc = "5: PRS ch 5 triggers OPA."]
151    PRSCH5 = 5,
152    #[doc = "6: PRS ch 6 triggers OPA."]
153    PRSCH6 = 6,
154    #[doc = "7: PRS ch 7 triggers OPA."]
155    PRSCH7 = 7,
156    #[doc = "8: PRS ch 8 triggers OPA."]
157    PRSCH8 = 8,
158    #[doc = "9: PRS ch 9 triggers OPA."]
159    PRSCH9 = 9,
160    #[doc = "10: PRS ch 10 triggers OPA."]
161    PRSCH10 = 10,
162    #[doc = "11: PRS ch 11 triggers OPA."]
163    PRSCH11 = 11,
164    #[doc = "12: PRS ch 12 triggers OPA."]
165    PRSCH12 = 12,
166    #[doc = "13: PRS ch 13 triggers OPA."]
167    PRSCH13 = 13,
168    #[doc = "14: PRS ch 14 triggers OPA."]
169    PRSCH14 = 14,
170    #[doc = "15: PRS ch 15 triggers OPA."]
171    PRSCH15 = 15,
172    #[doc = "16: PRS ch 16 triggers OPA."]
173    PRSCH16 = 16,
174    #[doc = "17: PRS ch 17 triggers OPA."]
175    PRSCH17 = 17,
176    #[doc = "18: PRS ch 18 triggers OPA."]
177    PRSCH18 = 18,
178    #[doc = "19: PRS ch 19 triggers OPA."]
179    PRSCH19 = 19,
180    #[doc = "20: PRS ch 20 triggers OPA."]
181    PRSCH20 = 20,
182    #[doc = "21: PRS ch 21 triggers OPA."]
183    PRSCH21 = 21,
184    #[doc = "22: PRS ch 22 triggers OPA."]
185    PRSCH22 = 22,
186    #[doc = "23: PRS ch 23 triggers OPA."]
187    PRSCH23 = 23,
188}
189impl From<PRSSEL_A> for u8 {
190    #[inline(always)]
191    fn from(variant: PRSSEL_A) -> Self {
192        variant as _
193    }
194}
195#[doc = "Field `PRSSEL` reader - OPAx PRS Trigger Select"]
196pub type PRSSEL_R = crate::FieldReader<u8, PRSSEL_A>;
197impl PRSSEL_R {
198    #[doc = "Get enumerated values variant"]
199    #[inline(always)]
200    pub fn variant(&self) -> Option<PRSSEL_A> {
201        match self.bits {
202            0 => Some(PRSSEL_A::PRSCH0),
203            1 => Some(PRSSEL_A::PRSCH1),
204            2 => Some(PRSSEL_A::PRSCH2),
205            3 => Some(PRSSEL_A::PRSCH3),
206            4 => Some(PRSSEL_A::PRSCH4),
207            5 => Some(PRSSEL_A::PRSCH5),
208            6 => Some(PRSSEL_A::PRSCH6),
209            7 => Some(PRSSEL_A::PRSCH7),
210            8 => Some(PRSSEL_A::PRSCH8),
211            9 => Some(PRSSEL_A::PRSCH9),
212            10 => Some(PRSSEL_A::PRSCH10),
213            11 => Some(PRSSEL_A::PRSCH11),
214            12 => Some(PRSSEL_A::PRSCH12),
215            13 => Some(PRSSEL_A::PRSCH13),
216            14 => Some(PRSSEL_A::PRSCH14),
217            15 => Some(PRSSEL_A::PRSCH15),
218            16 => Some(PRSSEL_A::PRSCH16),
219            17 => Some(PRSSEL_A::PRSCH17),
220            18 => Some(PRSSEL_A::PRSCH18),
221            19 => Some(PRSSEL_A::PRSCH19),
222            20 => Some(PRSSEL_A::PRSCH20),
223            21 => Some(PRSSEL_A::PRSCH21),
224            22 => Some(PRSSEL_A::PRSCH22),
225            23 => Some(PRSSEL_A::PRSCH23),
226            _ => None,
227        }
228    }
229    #[doc = "Checks if the value of the field is `PRSCH0`"]
230    #[inline(always)]
231    pub fn is_prsch0(&self) -> bool {
232        *self == PRSSEL_A::PRSCH0
233    }
234    #[doc = "Checks if the value of the field is `PRSCH1`"]
235    #[inline(always)]
236    pub fn is_prsch1(&self) -> bool {
237        *self == PRSSEL_A::PRSCH1
238    }
239    #[doc = "Checks if the value of the field is `PRSCH2`"]
240    #[inline(always)]
241    pub fn is_prsch2(&self) -> bool {
242        *self == PRSSEL_A::PRSCH2
243    }
244    #[doc = "Checks if the value of the field is `PRSCH3`"]
245    #[inline(always)]
246    pub fn is_prsch3(&self) -> bool {
247        *self == PRSSEL_A::PRSCH3
248    }
249    #[doc = "Checks if the value of the field is `PRSCH4`"]
250    #[inline(always)]
251    pub fn is_prsch4(&self) -> bool {
252        *self == PRSSEL_A::PRSCH4
253    }
254    #[doc = "Checks if the value of the field is `PRSCH5`"]
255    #[inline(always)]
256    pub fn is_prsch5(&self) -> bool {
257        *self == PRSSEL_A::PRSCH5
258    }
259    #[doc = "Checks if the value of the field is `PRSCH6`"]
260    #[inline(always)]
261    pub fn is_prsch6(&self) -> bool {
262        *self == PRSSEL_A::PRSCH6
263    }
264    #[doc = "Checks if the value of the field is `PRSCH7`"]
265    #[inline(always)]
266    pub fn is_prsch7(&self) -> bool {
267        *self == PRSSEL_A::PRSCH7
268    }
269    #[doc = "Checks if the value of the field is `PRSCH8`"]
270    #[inline(always)]
271    pub fn is_prsch8(&self) -> bool {
272        *self == PRSSEL_A::PRSCH8
273    }
274    #[doc = "Checks if the value of the field is `PRSCH9`"]
275    #[inline(always)]
276    pub fn is_prsch9(&self) -> bool {
277        *self == PRSSEL_A::PRSCH9
278    }
279    #[doc = "Checks if the value of the field is `PRSCH10`"]
280    #[inline(always)]
281    pub fn is_prsch10(&self) -> bool {
282        *self == PRSSEL_A::PRSCH10
283    }
284    #[doc = "Checks if the value of the field is `PRSCH11`"]
285    #[inline(always)]
286    pub fn is_prsch11(&self) -> bool {
287        *self == PRSSEL_A::PRSCH11
288    }
289    #[doc = "Checks if the value of the field is `PRSCH12`"]
290    #[inline(always)]
291    pub fn is_prsch12(&self) -> bool {
292        *self == PRSSEL_A::PRSCH12
293    }
294    #[doc = "Checks if the value of the field is `PRSCH13`"]
295    #[inline(always)]
296    pub fn is_prsch13(&self) -> bool {
297        *self == PRSSEL_A::PRSCH13
298    }
299    #[doc = "Checks if the value of the field is `PRSCH14`"]
300    #[inline(always)]
301    pub fn is_prsch14(&self) -> bool {
302        *self == PRSSEL_A::PRSCH14
303    }
304    #[doc = "Checks if the value of the field is `PRSCH15`"]
305    #[inline(always)]
306    pub fn is_prsch15(&self) -> bool {
307        *self == PRSSEL_A::PRSCH15
308    }
309    #[doc = "Checks if the value of the field is `PRSCH16`"]
310    #[inline(always)]
311    pub fn is_prsch16(&self) -> bool {
312        *self == PRSSEL_A::PRSCH16
313    }
314    #[doc = "Checks if the value of the field is `PRSCH17`"]
315    #[inline(always)]
316    pub fn is_prsch17(&self) -> bool {
317        *self == PRSSEL_A::PRSCH17
318    }
319    #[doc = "Checks if the value of the field is `PRSCH18`"]
320    #[inline(always)]
321    pub fn is_prsch18(&self) -> bool {
322        *self == PRSSEL_A::PRSCH18
323    }
324    #[doc = "Checks if the value of the field is `PRSCH19`"]
325    #[inline(always)]
326    pub fn is_prsch19(&self) -> bool {
327        *self == PRSSEL_A::PRSCH19
328    }
329    #[doc = "Checks if the value of the field is `PRSCH20`"]
330    #[inline(always)]
331    pub fn is_prsch20(&self) -> bool {
332        *self == PRSSEL_A::PRSCH20
333    }
334    #[doc = "Checks if the value of the field is `PRSCH21`"]
335    #[inline(always)]
336    pub fn is_prsch21(&self) -> bool {
337        *self == PRSSEL_A::PRSCH21
338    }
339    #[doc = "Checks if the value of the field is `PRSCH22`"]
340    #[inline(always)]
341    pub fn is_prsch22(&self) -> bool {
342        *self == PRSSEL_A::PRSCH22
343    }
344    #[doc = "Checks if the value of the field is `PRSCH23`"]
345    #[inline(always)]
346    pub fn is_prsch23(&self) -> bool {
347        *self == PRSSEL_A::PRSCH23
348    }
349}
350#[doc = "Field `PRSSEL` writer - OPAx PRS Trigger Select"]
351pub type PRSSEL_W<'a> = crate::FieldWriter<'a, u32, OPA1_CTRL_SPEC, u8, PRSSEL_A, 5, 10>;
352impl<'a> PRSSEL_W<'a> {
353    #[doc = "PRS ch 0 triggers OPA."]
354    #[inline(always)]
355    pub fn prsch0(self) -> &'a mut W {
356        self.variant(PRSSEL_A::PRSCH0)
357    }
358    #[doc = "PRS ch 1 triggers OPA."]
359    #[inline(always)]
360    pub fn prsch1(self) -> &'a mut W {
361        self.variant(PRSSEL_A::PRSCH1)
362    }
363    #[doc = "PRS ch 2 triggers OPA."]
364    #[inline(always)]
365    pub fn prsch2(self) -> &'a mut W {
366        self.variant(PRSSEL_A::PRSCH2)
367    }
368    #[doc = "PRS ch 3 triggers OPA."]
369    #[inline(always)]
370    pub fn prsch3(self) -> &'a mut W {
371        self.variant(PRSSEL_A::PRSCH3)
372    }
373    #[doc = "PRS ch 4 triggers OPA."]
374    #[inline(always)]
375    pub fn prsch4(self) -> &'a mut W {
376        self.variant(PRSSEL_A::PRSCH4)
377    }
378    #[doc = "PRS ch 5 triggers OPA."]
379    #[inline(always)]
380    pub fn prsch5(self) -> &'a mut W {
381        self.variant(PRSSEL_A::PRSCH5)
382    }
383    #[doc = "PRS ch 6 triggers OPA."]
384    #[inline(always)]
385    pub fn prsch6(self) -> &'a mut W {
386        self.variant(PRSSEL_A::PRSCH6)
387    }
388    #[doc = "PRS ch 7 triggers OPA."]
389    #[inline(always)]
390    pub fn prsch7(self) -> &'a mut W {
391        self.variant(PRSSEL_A::PRSCH7)
392    }
393    #[doc = "PRS ch 8 triggers OPA."]
394    #[inline(always)]
395    pub fn prsch8(self) -> &'a mut W {
396        self.variant(PRSSEL_A::PRSCH8)
397    }
398    #[doc = "PRS ch 9 triggers OPA."]
399    #[inline(always)]
400    pub fn prsch9(self) -> &'a mut W {
401        self.variant(PRSSEL_A::PRSCH9)
402    }
403    #[doc = "PRS ch 10 triggers OPA."]
404    #[inline(always)]
405    pub fn prsch10(self) -> &'a mut W {
406        self.variant(PRSSEL_A::PRSCH10)
407    }
408    #[doc = "PRS ch 11 triggers OPA."]
409    #[inline(always)]
410    pub fn prsch11(self) -> &'a mut W {
411        self.variant(PRSSEL_A::PRSCH11)
412    }
413    #[doc = "PRS ch 12 triggers OPA."]
414    #[inline(always)]
415    pub fn prsch12(self) -> &'a mut W {
416        self.variant(PRSSEL_A::PRSCH12)
417    }
418    #[doc = "PRS ch 13 triggers OPA."]
419    #[inline(always)]
420    pub fn prsch13(self) -> &'a mut W {
421        self.variant(PRSSEL_A::PRSCH13)
422    }
423    #[doc = "PRS ch 14 triggers OPA."]
424    #[inline(always)]
425    pub fn prsch14(self) -> &'a mut W {
426        self.variant(PRSSEL_A::PRSCH14)
427    }
428    #[doc = "PRS ch 15 triggers OPA."]
429    #[inline(always)]
430    pub fn prsch15(self) -> &'a mut W {
431        self.variant(PRSSEL_A::PRSCH15)
432    }
433    #[doc = "PRS ch 16 triggers OPA."]
434    #[inline(always)]
435    pub fn prsch16(self) -> &'a mut W {
436        self.variant(PRSSEL_A::PRSCH16)
437    }
438    #[doc = "PRS ch 17 triggers OPA."]
439    #[inline(always)]
440    pub fn prsch17(self) -> &'a mut W {
441        self.variant(PRSSEL_A::PRSCH17)
442    }
443    #[doc = "PRS ch 18 triggers OPA."]
444    #[inline(always)]
445    pub fn prsch18(self) -> &'a mut W {
446        self.variant(PRSSEL_A::PRSCH18)
447    }
448    #[doc = "PRS ch 19 triggers OPA."]
449    #[inline(always)]
450    pub fn prsch19(self) -> &'a mut W {
451        self.variant(PRSSEL_A::PRSCH19)
452    }
453    #[doc = "PRS ch 20 triggers OPA."]
454    #[inline(always)]
455    pub fn prsch20(self) -> &'a mut W {
456        self.variant(PRSSEL_A::PRSCH20)
457    }
458    #[doc = "PRS ch 21 triggers OPA."]
459    #[inline(always)]
460    pub fn prsch21(self) -> &'a mut W {
461        self.variant(PRSSEL_A::PRSCH21)
462    }
463    #[doc = "PRS ch 22 triggers OPA."]
464    #[inline(always)]
465    pub fn prsch22(self) -> &'a mut W {
466        self.variant(PRSSEL_A::PRSCH22)
467    }
468    #[doc = "PRS ch 23 triggers OPA."]
469    #[inline(always)]
470    pub fn prsch23(self) -> &'a mut W {
471        self.variant(PRSSEL_A::PRSCH23)
472    }
473}
474#[doc = "Field `PRSOUTMODE` reader - OPAx PRS Output Select"]
475pub type PRSOUTMODE_R = crate::BitReader<bool>;
476#[doc = "Field `PRSOUTMODE` writer - OPAx PRS Output Select"]
477pub type PRSOUTMODE_W<'a> = crate::BitWriter<'a, u32, OPA1_CTRL_SPEC, bool, 16>;
478#[doc = "Field `APORTXMASTERDIS` reader - APORT Bus Master Disable"]
479pub type APORTXMASTERDIS_R = crate::BitReader<bool>;
480#[doc = "Field `APORTXMASTERDIS` writer - APORT Bus Master Disable"]
481pub type APORTXMASTERDIS_W<'a> = crate::BitWriter<'a, u32, OPA1_CTRL_SPEC, bool, 20>;
482#[doc = "Field `APORTYMASTERDIS` reader - APORT Bus Master Disable"]
483pub type APORTYMASTERDIS_R = crate::BitReader<bool>;
484#[doc = "Field `APORTYMASTERDIS` writer - APORT Bus Master Disable"]
485pub type APORTYMASTERDIS_W<'a> = crate::BitWriter<'a, u32, OPA1_CTRL_SPEC, bool, 21>;
486impl R {
487    #[doc = "Bits 0:1 - OPAx Operation Mode"]
488    #[inline(always)]
489    pub fn drivestrength(&self) -> DRIVESTRENGTH_R {
490        DRIVESTRENGTH_R::new((self.bits & 3) as u8)
491    }
492    #[doc = "Bit 2 - OPAx Unity Gain Bandwidth Scale"]
493    #[inline(always)]
494    pub fn incbw(&self) -> INCBW_R {
495        INCBW_R::new(((self.bits >> 2) & 1) != 0)
496    }
497    #[doc = "Bit 3 - High Common Mode Disable"]
498    #[inline(always)]
499    pub fn hcmdis(&self) -> HCMDIS_R {
500        HCMDIS_R::new(((self.bits >> 3) & 1) != 0)
501    }
502    #[doc = "Bit 4 - Scale OPAx Output Driving Strength"]
503    #[inline(always)]
504    pub fn outscale(&self) -> OUTSCALE_R {
505        OUTSCALE_R::new(((self.bits >> 4) & 1) != 0)
506    }
507    #[doc = "Bit 8 - OPAx PRS Trigger Enable"]
508    #[inline(always)]
509    pub fn prsen(&self) -> PRSEN_R {
510        PRSEN_R::new(((self.bits >> 8) & 1) != 0)
511    }
512    #[doc = "Bit 9 - OPAx PRS Trigger Mode"]
513    #[inline(always)]
514    pub fn prsmode(&self) -> PRSMODE_R {
515        PRSMODE_R::new(((self.bits >> 9) & 1) != 0)
516    }
517    #[doc = "Bits 10:14 - OPAx PRS Trigger Select"]
518    #[inline(always)]
519    pub fn prssel(&self) -> PRSSEL_R {
520        PRSSEL_R::new(((self.bits >> 10) & 0x1f) as u8)
521    }
522    #[doc = "Bit 16 - OPAx PRS Output Select"]
523    #[inline(always)]
524    pub fn prsoutmode(&self) -> PRSOUTMODE_R {
525        PRSOUTMODE_R::new(((self.bits >> 16) & 1) != 0)
526    }
527    #[doc = "Bit 20 - APORT Bus Master Disable"]
528    #[inline(always)]
529    pub fn aportxmasterdis(&self) -> APORTXMASTERDIS_R {
530        APORTXMASTERDIS_R::new(((self.bits >> 20) & 1) != 0)
531    }
532    #[doc = "Bit 21 - APORT Bus Master Disable"]
533    #[inline(always)]
534    pub fn aportymasterdis(&self) -> APORTYMASTERDIS_R {
535        APORTYMASTERDIS_R::new(((self.bits >> 21) & 1) != 0)
536    }
537}
538impl W {
539    #[doc = "Bits 0:1 - OPAx Operation Mode"]
540    #[inline(always)]
541    pub fn drivestrength(&mut self) -> DRIVESTRENGTH_W {
542        DRIVESTRENGTH_W::new(self)
543    }
544    #[doc = "Bit 2 - OPAx Unity Gain Bandwidth Scale"]
545    #[inline(always)]
546    pub fn incbw(&mut self) -> INCBW_W {
547        INCBW_W::new(self)
548    }
549    #[doc = "Bit 3 - High Common Mode Disable"]
550    #[inline(always)]
551    pub fn hcmdis(&mut self) -> HCMDIS_W {
552        HCMDIS_W::new(self)
553    }
554    #[doc = "Bit 4 - Scale OPAx Output Driving Strength"]
555    #[inline(always)]
556    pub fn outscale(&mut self) -> OUTSCALE_W {
557        OUTSCALE_W::new(self)
558    }
559    #[doc = "Bit 8 - OPAx PRS Trigger Enable"]
560    #[inline(always)]
561    pub fn prsen(&mut self) -> PRSEN_W {
562        PRSEN_W::new(self)
563    }
564    #[doc = "Bit 9 - OPAx PRS Trigger Mode"]
565    #[inline(always)]
566    pub fn prsmode(&mut self) -> PRSMODE_W {
567        PRSMODE_W::new(self)
568    }
569    #[doc = "Bits 10:14 - OPAx PRS Trigger Select"]
570    #[inline(always)]
571    pub fn prssel(&mut self) -> PRSSEL_W {
572        PRSSEL_W::new(self)
573    }
574    #[doc = "Bit 16 - OPAx PRS Output Select"]
575    #[inline(always)]
576    pub fn prsoutmode(&mut self) -> PRSOUTMODE_W {
577        PRSOUTMODE_W::new(self)
578    }
579    #[doc = "Bit 20 - APORT Bus Master Disable"]
580    #[inline(always)]
581    pub fn aportxmasterdis(&mut self) -> APORTXMASTERDIS_W {
582        APORTXMASTERDIS_W::new(self)
583    }
584    #[doc = "Bit 21 - APORT Bus Master Disable"]
585    #[inline(always)]
586    pub fn aportymasterdis(&mut self) -> APORTYMASTERDIS_W {
587        APORTYMASTERDIS_W::new(self)
588    }
589    #[doc = "Writes raw bits to the register."]
590    #[inline(always)]
591    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
592        self.0.bits(bits);
593        self
594    }
595}
596#[doc = "Operational Amplifier 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 [opa1_ctrl](index.html) module"]
597pub struct OPA1_CTRL_SPEC;
598impl crate::RegisterSpec for OPA1_CTRL_SPEC {
599    type Ux = u32;
600}
601#[doc = "`read()` method returns [opa1_ctrl::R](R) reader structure"]
602impl crate::Readable for OPA1_CTRL_SPEC {
603    type Reader = R;
604}
605#[doc = "`write(|w| ..)` method takes [opa1_ctrl::W](W) writer structure"]
606impl crate::Writable for OPA1_CTRL_SPEC {
607    type Writer = W;
608}
609#[doc = "`reset()` method sets OPA1_CTRL to value 0x0e"]
610impl crate::Resettable for OPA1_CTRL_SPEC {
611    #[inline(always)]
612    fn reset_value() -> Self::Ux {
613        0x0e
614    }
615}