efm32pg12_pac/lesense/
altexconf.rs

1#[doc = "Reader of register ALTEXCONF"]
2pub type R = crate::R<u32, super::ALTEXCONF>;
3#[doc = "Writer for register ALTEXCONF"]
4pub type W = crate::W<u32, super::ALTEXCONF>;
5#[doc = "Register ALTEXCONF `reset()`'s with value 0"]
6impl crate::ResetValue for super::ALTEXCONF {
7    type Type = u32;
8    #[inline(always)]
9    fn reset_value() -> Self::Type {
10        0
11    }
12}
13#[doc = "ALTEX0 Idle Phase Configuration\n\nValue on reset: 0"]
14#[derive(Clone, Copy, Debug, PartialEq)]
15#[repr(u8)]
16pub enum IDLECONF0_A {
17    #[doc = "0: ALTEX0 output is disabled in idle phase"]
18    DISABLE = 0,
19    #[doc = "1: ALTEX0 output is high in idle phase"]
20    HIGH = 1,
21    #[doc = "2: ALTEX0 output is low in idle phase"]
22    LOW = 2,
23}
24impl From<IDLECONF0_A> for u8 {
25    #[inline(always)]
26    fn from(variant: IDLECONF0_A) -> Self {
27        variant as _
28    }
29}
30#[doc = "Reader of field `IDLECONF0`"]
31pub type IDLECONF0_R = crate::R<u8, IDLECONF0_A>;
32impl IDLECONF0_R {
33    #[doc = r"Get enumerated values variant"]
34    #[inline(always)]
35    pub fn variant(&self) -> crate::Variant<u8, IDLECONF0_A> {
36        use crate::Variant::*;
37        match self.bits {
38            0 => Val(IDLECONF0_A::DISABLE),
39            1 => Val(IDLECONF0_A::HIGH),
40            2 => Val(IDLECONF0_A::LOW),
41            i => Res(i),
42        }
43    }
44    #[doc = "Checks if the value of the field is `DISABLE`"]
45    #[inline(always)]
46    pub fn is_disable(&self) -> bool {
47        *self == IDLECONF0_A::DISABLE
48    }
49    #[doc = "Checks if the value of the field is `HIGH`"]
50    #[inline(always)]
51    pub fn is_high(&self) -> bool {
52        *self == IDLECONF0_A::HIGH
53    }
54    #[doc = "Checks if the value of the field is `LOW`"]
55    #[inline(always)]
56    pub fn is_low(&self) -> bool {
57        *self == IDLECONF0_A::LOW
58    }
59}
60#[doc = "Write proxy for field `IDLECONF0`"]
61pub struct IDLECONF0_W<'a> {
62    w: &'a mut W,
63}
64impl<'a> IDLECONF0_W<'a> {
65    #[doc = r"Writes `variant` to the field"]
66    #[inline(always)]
67    pub fn variant(self, variant: IDLECONF0_A) -> &'a mut W {
68        unsafe { self.bits(variant.into()) }
69    }
70    #[doc = "ALTEX0 output is disabled in idle phase"]
71    #[inline(always)]
72    pub fn disable(self) -> &'a mut W {
73        self.variant(IDLECONF0_A::DISABLE)
74    }
75    #[doc = "ALTEX0 output is high in idle phase"]
76    #[inline(always)]
77    pub fn high(self) -> &'a mut W {
78        self.variant(IDLECONF0_A::HIGH)
79    }
80    #[doc = "ALTEX0 output is low in idle phase"]
81    #[inline(always)]
82    pub fn low(self) -> &'a mut W {
83        self.variant(IDLECONF0_A::LOW)
84    }
85    #[doc = r"Writes raw bits to the field"]
86    #[inline(always)]
87    pub unsafe fn bits(self, value: u8) -> &'a mut W {
88        self.w.bits = (self.w.bits & !0x03) | ((value as u32) & 0x03);
89        self.w
90    }
91}
92#[doc = "ALTEX1 Idle Phase Configuration\n\nValue on reset: 0"]
93#[derive(Clone, Copy, Debug, PartialEq)]
94#[repr(u8)]
95pub enum IDLECONF1_A {
96    #[doc = "0: ALTEX1 output is disabled in idle phase"]
97    DISABLE = 0,
98    #[doc = "1: ALTEX1 output is high in idle phase"]
99    HIGH = 1,
100    #[doc = "2: ALTEX1 output is low in idle phase"]
101    LOW = 2,
102}
103impl From<IDLECONF1_A> for u8 {
104    #[inline(always)]
105    fn from(variant: IDLECONF1_A) -> Self {
106        variant as _
107    }
108}
109#[doc = "Reader of field `IDLECONF1`"]
110pub type IDLECONF1_R = crate::R<u8, IDLECONF1_A>;
111impl IDLECONF1_R {
112    #[doc = r"Get enumerated values variant"]
113    #[inline(always)]
114    pub fn variant(&self) -> crate::Variant<u8, IDLECONF1_A> {
115        use crate::Variant::*;
116        match self.bits {
117            0 => Val(IDLECONF1_A::DISABLE),
118            1 => Val(IDLECONF1_A::HIGH),
119            2 => Val(IDLECONF1_A::LOW),
120            i => Res(i),
121        }
122    }
123    #[doc = "Checks if the value of the field is `DISABLE`"]
124    #[inline(always)]
125    pub fn is_disable(&self) -> bool {
126        *self == IDLECONF1_A::DISABLE
127    }
128    #[doc = "Checks if the value of the field is `HIGH`"]
129    #[inline(always)]
130    pub fn is_high(&self) -> bool {
131        *self == IDLECONF1_A::HIGH
132    }
133    #[doc = "Checks if the value of the field is `LOW`"]
134    #[inline(always)]
135    pub fn is_low(&self) -> bool {
136        *self == IDLECONF1_A::LOW
137    }
138}
139#[doc = "Write proxy for field `IDLECONF1`"]
140pub struct IDLECONF1_W<'a> {
141    w: &'a mut W,
142}
143impl<'a> IDLECONF1_W<'a> {
144    #[doc = r"Writes `variant` to the field"]
145    #[inline(always)]
146    pub fn variant(self, variant: IDLECONF1_A) -> &'a mut W {
147        unsafe { self.bits(variant.into()) }
148    }
149    #[doc = "ALTEX1 output is disabled in idle phase"]
150    #[inline(always)]
151    pub fn disable(self) -> &'a mut W {
152        self.variant(IDLECONF1_A::DISABLE)
153    }
154    #[doc = "ALTEX1 output is high in idle phase"]
155    #[inline(always)]
156    pub fn high(self) -> &'a mut W {
157        self.variant(IDLECONF1_A::HIGH)
158    }
159    #[doc = "ALTEX1 output is low in idle phase"]
160    #[inline(always)]
161    pub fn low(self) -> &'a mut W {
162        self.variant(IDLECONF1_A::LOW)
163    }
164    #[doc = r"Writes raw bits to the field"]
165    #[inline(always)]
166    pub unsafe fn bits(self, value: u8) -> &'a mut W {
167        self.w.bits = (self.w.bits & !(0x03 << 2)) | (((value as u32) & 0x03) << 2);
168        self.w
169    }
170}
171#[doc = "ALTEX2 Idle Phase Configuration\n\nValue on reset: 0"]
172#[derive(Clone, Copy, Debug, PartialEq)]
173#[repr(u8)]
174pub enum IDLECONF2_A {
175    #[doc = "0: ALTEX2 output is disabled in idle phase"]
176    DISABLE = 0,
177    #[doc = "1: ALTEX2 output is high in idle phase"]
178    HIGH = 1,
179    #[doc = "2: ALTEX2 output is low in idle phase"]
180    LOW = 2,
181}
182impl From<IDLECONF2_A> for u8 {
183    #[inline(always)]
184    fn from(variant: IDLECONF2_A) -> Self {
185        variant as _
186    }
187}
188#[doc = "Reader of field `IDLECONF2`"]
189pub type IDLECONF2_R = crate::R<u8, IDLECONF2_A>;
190impl IDLECONF2_R {
191    #[doc = r"Get enumerated values variant"]
192    #[inline(always)]
193    pub fn variant(&self) -> crate::Variant<u8, IDLECONF2_A> {
194        use crate::Variant::*;
195        match self.bits {
196            0 => Val(IDLECONF2_A::DISABLE),
197            1 => Val(IDLECONF2_A::HIGH),
198            2 => Val(IDLECONF2_A::LOW),
199            i => Res(i),
200        }
201    }
202    #[doc = "Checks if the value of the field is `DISABLE`"]
203    #[inline(always)]
204    pub fn is_disable(&self) -> bool {
205        *self == IDLECONF2_A::DISABLE
206    }
207    #[doc = "Checks if the value of the field is `HIGH`"]
208    #[inline(always)]
209    pub fn is_high(&self) -> bool {
210        *self == IDLECONF2_A::HIGH
211    }
212    #[doc = "Checks if the value of the field is `LOW`"]
213    #[inline(always)]
214    pub fn is_low(&self) -> bool {
215        *self == IDLECONF2_A::LOW
216    }
217}
218#[doc = "Write proxy for field `IDLECONF2`"]
219pub struct IDLECONF2_W<'a> {
220    w: &'a mut W,
221}
222impl<'a> IDLECONF2_W<'a> {
223    #[doc = r"Writes `variant` to the field"]
224    #[inline(always)]
225    pub fn variant(self, variant: IDLECONF2_A) -> &'a mut W {
226        unsafe { self.bits(variant.into()) }
227    }
228    #[doc = "ALTEX2 output is disabled in idle phase"]
229    #[inline(always)]
230    pub fn disable(self) -> &'a mut W {
231        self.variant(IDLECONF2_A::DISABLE)
232    }
233    #[doc = "ALTEX2 output is high in idle phase"]
234    #[inline(always)]
235    pub fn high(self) -> &'a mut W {
236        self.variant(IDLECONF2_A::HIGH)
237    }
238    #[doc = "ALTEX2 output is low in idle phase"]
239    #[inline(always)]
240    pub fn low(self) -> &'a mut W {
241        self.variant(IDLECONF2_A::LOW)
242    }
243    #[doc = r"Writes raw bits to the field"]
244    #[inline(always)]
245    pub unsafe fn bits(self, value: u8) -> &'a mut W {
246        self.w.bits = (self.w.bits & !(0x03 << 4)) | (((value as u32) & 0x03) << 4);
247        self.w
248    }
249}
250#[doc = "ALTEX3 Idle Phase Configuration\n\nValue on reset: 0"]
251#[derive(Clone, Copy, Debug, PartialEq)]
252#[repr(u8)]
253pub enum IDLECONF3_A {
254    #[doc = "0: ALTEX3 output is disabled in idle phase"]
255    DISABLE = 0,
256    #[doc = "1: ALTEX3 output is high in idle phase"]
257    HIGH = 1,
258    #[doc = "2: ALTEX3 output is low in idle phase"]
259    LOW = 2,
260}
261impl From<IDLECONF3_A> for u8 {
262    #[inline(always)]
263    fn from(variant: IDLECONF3_A) -> Self {
264        variant as _
265    }
266}
267#[doc = "Reader of field `IDLECONF3`"]
268pub type IDLECONF3_R = crate::R<u8, IDLECONF3_A>;
269impl IDLECONF3_R {
270    #[doc = r"Get enumerated values variant"]
271    #[inline(always)]
272    pub fn variant(&self) -> crate::Variant<u8, IDLECONF3_A> {
273        use crate::Variant::*;
274        match self.bits {
275            0 => Val(IDLECONF3_A::DISABLE),
276            1 => Val(IDLECONF3_A::HIGH),
277            2 => Val(IDLECONF3_A::LOW),
278            i => Res(i),
279        }
280    }
281    #[doc = "Checks if the value of the field is `DISABLE`"]
282    #[inline(always)]
283    pub fn is_disable(&self) -> bool {
284        *self == IDLECONF3_A::DISABLE
285    }
286    #[doc = "Checks if the value of the field is `HIGH`"]
287    #[inline(always)]
288    pub fn is_high(&self) -> bool {
289        *self == IDLECONF3_A::HIGH
290    }
291    #[doc = "Checks if the value of the field is `LOW`"]
292    #[inline(always)]
293    pub fn is_low(&self) -> bool {
294        *self == IDLECONF3_A::LOW
295    }
296}
297#[doc = "Write proxy for field `IDLECONF3`"]
298pub struct IDLECONF3_W<'a> {
299    w: &'a mut W,
300}
301impl<'a> IDLECONF3_W<'a> {
302    #[doc = r"Writes `variant` to the field"]
303    #[inline(always)]
304    pub fn variant(self, variant: IDLECONF3_A) -> &'a mut W {
305        unsafe { self.bits(variant.into()) }
306    }
307    #[doc = "ALTEX3 output is disabled in idle phase"]
308    #[inline(always)]
309    pub fn disable(self) -> &'a mut W {
310        self.variant(IDLECONF3_A::DISABLE)
311    }
312    #[doc = "ALTEX3 output is high in idle phase"]
313    #[inline(always)]
314    pub fn high(self) -> &'a mut W {
315        self.variant(IDLECONF3_A::HIGH)
316    }
317    #[doc = "ALTEX3 output is low in idle phase"]
318    #[inline(always)]
319    pub fn low(self) -> &'a mut W {
320        self.variant(IDLECONF3_A::LOW)
321    }
322    #[doc = r"Writes raw bits to the field"]
323    #[inline(always)]
324    pub unsafe fn bits(self, value: u8) -> &'a mut W {
325        self.w.bits = (self.w.bits & !(0x03 << 6)) | (((value as u32) & 0x03) << 6);
326        self.w
327    }
328}
329#[doc = "ALTEX4 Idle Phase Configuration\n\nValue on reset: 0"]
330#[derive(Clone, Copy, Debug, PartialEq)]
331#[repr(u8)]
332pub enum IDLECONF4_A {
333    #[doc = "0: ALTEX4 output is disabled in idle phase"]
334    DISABLE = 0,
335    #[doc = "1: ALTEX4 output is high in idle phase"]
336    HIGH = 1,
337    #[doc = "2: ALTEX4 output is low in idle phase"]
338    LOW = 2,
339}
340impl From<IDLECONF4_A> for u8 {
341    #[inline(always)]
342    fn from(variant: IDLECONF4_A) -> Self {
343        variant as _
344    }
345}
346#[doc = "Reader of field `IDLECONF4`"]
347pub type IDLECONF4_R = crate::R<u8, IDLECONF4_A>;
348impl IDLECONF4_R {
349    #[doc = r"Get enumerated values variant"]
350    #[inline(always)]
351    pub fn variant(&self) -> crate::Variant<u8, IDLECONF4_A> {
352        use crate::Variant::*;
353        match self.bits {
354            0 => Val(IDLECONF4_A::DISABLE),
355            1 => Val(IDLECONF4_A::HIGH),
356            2 => Val(IDLECONF4_A::LOW),
357            i => Res(i),
358        }
359    }
360    #[doc = "Checks if the value of the field is `DISABLE`"]
361    #[inline(always)]
362    pub fn is_disable(&self) -> bool {
363        *self == IDLECONF4_A::DISABLE
364    }
365    #[doc = "Checks if the value of the field is `HIGH`"]
366    #[inline(always)]
367    pub fn is_high(&self) -> bool {
368        *self == IDLECONF4_A::HIGH
369    }
370    #[doc = "Checks if the value of the field is `LOW`"]
371    #[inline(always)]
372    pub fn is_low(&self) -> bool {
373        *self == IDLECONF4_A::LOW
374    }
375}
376#[doc = "Write proxy for field `IDLECONF4`"]
377pub struct IDLECONF4_W<'a> {
378    w: &'a mut W,
379}
380impl<'a> IDLECONF4_W<'a> {
381    #[doc = r"Writes `variant` to the field"]
382    #[inline(always)]
383    pub fn variant(self, variant: IDLECONF4_A) -> &'a mut W {
384        unsafe { self.bits(variant.into()) }
385    }
386    #[doc = "ALTEX4 output is disabled in idle phase"]
387    #[inline(always)]
388    pub fn disable(self) -> &'a mut W {
389        self.variant(IDLECONF4_A::DISABLE)
390    }
391    #[doc = "ALTEX4 output is high in idle phase"]
392    #[inline(always)]
393    pub fn high(self) -> &'a mut W {
394        self.variant(IDLECONF4_A::HIGH)
395    }
396    #[doc = "ALTEX4 output is low in idle phase"]
397    #[inline(always)]
398    pub fn low(self) -> &'a mut W {
399        self.variant(IDLECONF4_A::LOW)
400    }
401    #[doc = r"Writes raw bits to the field"]
402    #[inline(always)]
403    pub unsafe fn bits(self, value: u8) -> &'a mut W {
404        self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8);
405        self.w
406    }
407}
408#[doc = "ALTEX5 Idle Phase Configuration\n\nValue on reset: 0"]
409#[derive(Clone, Copy, Debug, PartialEq)]
410#[repr(u8)]
411pub enum IDLECONF5_A {
412    #[doc = "0: ALTEX5 output is disabled in idle phase"]
413    DISABLE = 0,
414    #[doc = "1: ALTEX5 output is high in idle phase"]
415    HIGH = 1,
416    #[doc = "2: ALTEX5 output is low in idle phase"]
417    LOW = 2,
418}
419impl From<IDLECONF5_A> for u8 {
420    #[inline(always)]
421    fn from(variant: IDLECONF5_A) -> Self {
422        variant as _
423    }
424}
425#[doc = "Reader of field `IDLECONF5`"]
426pub type IDLECONF5_R = crate::R<u8, IDLECONF5_A>;
427impl IDLECONF5_R {
428    #[doc = r"Get enumerated values variant"]
429    #[inline(always)]
430    pub fn variant(&self) -> crate::Variant<u8, IDLECONF5_A> {
431        use crate::Variant::*;
432        match self.bits {
433            0 => Val(IDLECONF5_A::DISABLE),
434            1 => Val(IDLECONF5_A::HIGH),
435            2 => Val(IDLECONF5_A::LOW),
436            i => Res(i),
437        }
438    }
439    #[doc = "Checks if the value of the field is `DISABLE`"]
440    #[inline(always)]
441    pub fn is_disable(&self) -> bool {
442        *self == IDLECONF5_A::DISABLE
443    }
444    #[doc = "Checks if the value of the field is `HIGH`"]
445    #[inline(always)]
446    pub fn is_high(&self) -> bool {
447        *self == IDLECONF5_A::HIGH
448    }
449    #[doc = "Checks if the value of the field is `LOW`"]
450    #[inline(always)]
451    pub fn is_low(&self) -> bool {
452        *self == IDLECONF5_A::LOW
453    }
454}
455#[doc = "Write proxy for field `IDLECONF5`"]
456pub struct IDLECONF5_W<'a> {
457    w: &'a mut W,
458}
459impl<'a> IDLECONF5_W<'a> {
460    #[doc = r"Writes `variant` to the field"]
461    #[inline(always)]
462    pub fn variant(self, variant: IDLECONF5_A) -> &'a mut W {
463        unsafe { self.bits(variant.into()) }
464    }
465    #[doc = "ALTEX5 output is disabled in idle phase"]
466    #[inline(always)]
467    pub fn disable(self) -> &'a mut W {
468        self.variant(IDLECONF5_A::DISABLE)
469    }
470    #[doc = "ALTEX5 output is high in idle phase"]
471    #[inline(always)]
472    pub fn high(self) -> &'a mut W {
473        self.variant(IDLECONF5_A::HIGH)
474    }
475    #[doc = "ALTEX5 output is low in idle phase"]
476    #[inline(always)]
477    pub fn low(self) -> &'a mut W {
478        self.variant(IDLECONF5_A::LOW)
479    }
480    #[doc = r"Writes raw bits to the field"]
481    #[inline(always)]
482    pub unsafe fn bits(self, value: u8) -> &'a mut W {
483        self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u32) & 0x03) << 10);
484        self.w
485    }
486}
487#[doc = "ALTEX6 Idle Phase Configuration\n\nValue on reset: 0"]
488#[derive(Clone, Copy, Debug, PartialEq)]
489#[repr(u8)]
490pub enum IDLECONF6_A {
491    #[doc = "0: ALTEX6 output is disabled in idle phase"]
492    DISABLE = 0,
493    #[doc = "1: ALTEX6 output is high in idle phase"]
494    HIGH = 1,
495    #[doc = "2: ALTEX6 output is low in idle phase"]
496    LOW = 2,
497}
498impl From<IDLECONF6_A> for u8 {
499    #[inline(always)]
500    fn from(variant: IDLECONF6_A) -> Self {
501        variant as _
502    }
503}
504#[doc = "Reader of field `IDLECONF6`"]
505pub type IDLECONF6_R = crate::R<u8, IDLECONF6_A>;
506impl IDLECONF6_R {
507    #[doc = r"Get enumerated values variant"]
508    #[inline(always)]
509    pub fn variant(&self) -> crate::Variant<u8, IDLECONF6_A> {
510        use crate::Variant::*;
511        match self.bits {
512            0 => Val(IDLECONF6_A::DISABLE),
513            1 => Val(IDLECONF6_A::HIGH),
514            2 => Val(IDLECONF6_A::LOW),
515            i => Res(i),
516        }
517    }
518    #[doc = "Checks if the value of the field is `DISABLE`"]
519    #[inline(always)]
520    pub fn is_disable(&self) -> bool {
521        *self == IDLECONF6_A::DISABLE
522    }
523    #[doc = "Checks if the value of the field is `HIGH`"]
524    #[inline(always)]
525    pub fn is_high(&self) -> bool {
526        *self == IDLECONF6_A::HIGH
527    }
528    #[doc = "Checks if the value of the field is `LOW`"]
529    #[inline(always)]
530    pub fn is_low(&self) -> bool {
531        *self == IDLECONF6_A::LOW
532    }
533}
534#[doc = "Write proxy for field `IDLECONF6`"]
535pub struct IDLECONF6_W<'a> {
536    w: &'a mut W,
537}
538impl<'a> IDLECONF6_W<'a> {
539    #[doc = r"Writes `variant` to the field"]
540    #[inline(always)]
541    pub fn variant(self, variant: IDLECONF6_A) -> &'a mut W {
542        unsafe { self.bits(variant.into()) }
543    }
544    #[doc = "ALTEX6 output is disabled in idle phase"]
545    #[inline(always)]
546    pub fn disable(self) -> &'a mut W {
547        self.variant(IDLECONF6_A::DISABLE)
548    }
549    #[doc = "ALTEX6 output is high in idle phase"]
550    #[inline(always)]
551    pub fn high(self) -> &'a mut W {
552        self.variant(IDLECONF6_A::HIGH)
553    }
554    #[doc = "ALTEX6 output is low in idle phase"]
555    #[inline(always)]
556    pub fn low(self) -> &'a mut W {
557        self.variant(IDLECONF6_A::LOW)
558    }
559    #[doc = r"Writes raw bits to the field"]
560    #[inline(always)]
561    pub unsafe fn bits(self, value: u8) -> &'a mut W {
562        self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12);
563        self.w
564    }
565}
566#[doc = "ALTEX7 Idle Phase Configuration\n\nValue on reset: 0"]
567#[derive(Clone, Copy, Debug, PartialEq)]
568#[repr(u8)]
569pub enum IDLECONF7_A {
570    #[doc = "0: ALTEX7 output is disabled in idle phase"]
571    DISABLE = 0,
572    #[doc = "1: ALTEX7 output is high in idle phase"]
573    HIGH = 1,
574    #[doc = "2: ALTEX7 output is low in idle phase"]
575    LOW = 2,
576}
577impl From<IDLECONF7_A> for u8 {
578    #[inline(always)]
579    fn from(variant: IDLECONF7_A) -> Self {
580        variant as _
581    }
582}
583#[doc = "Reader of field `IDLECONF7`"]
584pub type IDLECONF7_R = crate::R<u8, IDLECONF7_A>;
585impl IDLECONF7_R {
586    #[doc = r"Get enumerated values variant"]
587    #[inline(always)]
588    pub fn variant(&self) -> crate::Variant<u8, IDLECONF7_A> {
589        use crate::Variant::*;
590        match self.bits {
591            0 => Val(IDLECONF7_A::DISABLE),
592            1 => Val(IDLECONF7_A::HIGH),
593            2 => Val(IDLECONF7_A::LOW),
594            i => Res(i),
595        }
596    }
597    #[doc = "Checks if the value of the field is `DISABLE`"]
598    #[inline(always)]
599    pub fn is_disable(&self) -> bool {
600        *self == IDLECONF7_A::DISABLE
601    }
602    #[doc = "Checks if the value of the field is `HIGH`"]
603    #[inline(always)]
604    pub fn is_high(&self) -> bool {
605        *self == IDLECONF7_A::HIGH
606    }
607    #[doc = "Checks if the value of the field is `LOW`"]
608    #[inline(always)]
609    pub fn is_low(&self) -> bool {
610        *self == IDLECONF7_A::LOW
611    }
612}
613#[doc = "Write proxy for field `IDLECONF7`"]
614pub struct IDLECONF7_W<'a> {
615    w: &'a mut W,
616}
617impl<'a> IDLECONF7_W<'a> {
618    #[doc = r"Writes `variant` to the field"]
619    #[inline(always)]
620    pub fn variant(self, variant: IDLECONF7_A) -> &'a mut W {
621        unsafe { self.bits(variant.into()) }
622    }
623    #[doc = "ALTEX7 output is disabled in idle phase"]
624    #[inline(always)]
625    pub fn disable(self) -> &'a mut W {
626        self.variant(IDLECONF7_A::DISABLE)
627    }
628    #[doc = "ALTEX7 output is high in idle phase"]
629    #[inline(always)]
630    pub fn high(self) -> &'a mut W {
631        self.variant(IDLECONF7_A::HIGH)
632    }
633    #[doc = "ALTEX7 output is low in idle phase"]
634    #[inline(always)]
635    pub fn low(self) -> &'a mut W {
636        self.variant(IDLECONF7_A::LOW)
637    }
638    #[doc = r"Writes raw bits to the field"]
639    #[inline(always)]
640    pub unsafe fn bits(self, value: u8) -> &'a mut W {
641        self.w.bits = (self.w.bits & !(0x03 << 14)) | (((value as u32) & 0x03) << 14);
642        self.w
643    }
644}
645#[doc = "Reader of field `AEX0`"]
646pub type AEX0_R = crate::R<bool, bool>;
647#[doc = "Write proxy for field `AEX0`"]
648pub struct AEX0_W<'a> {
649    w: &'a mut W,
650}
651impl<'a> AEX0_W<'a> {
652    #[doc = r"Sets the field bit"]
653    #[inline(always)]
654    pub fn set_bit(self) -> &'a mut W {
655        self.bit(true)
656    }
657    #[doc = r"Clears the field bit"]
658    #[inline(always)]
659    pub fn clear_bit(self) -> &'a mut W {
660        self.bit(false)
661    }
662    #[doc = r"Writes raw bits to the field"]
663    #[inline(always)]
664    pub fn bit(self, value: bool) -> &'a mut W {
665        self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16);
666        self.w
667    }
668}
669#[doc = "Reader of field `AEX1`"]
670pub type AEX1_R = crate::R<bool, bool>;
671#[doc = "Write proxy for field `AEX1`"]
672pub struct AEX1_W<'a> {
673    w: &'a mut W,
674}
675impl<'a> AEX1_W<'a> {
676    #[doc = r"Sets the field bit"]
677    #[inline(always)]
678    pub fn set_bit(self) -> &'a mut W {
679        self.bit(true)
680    }
681    #[doc = r"Clears the field bit"]
682    #[inline(always)]
683    pub fn clear_bit(self) -> &'a mut W {
684        self.bit(false)
685    }
686    #[doc = r"Writes raw bits to the field"]
687    #[inline(always)]
688    pub fn bit(self, value: bool) -> &'a mut W {
689        self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17);
690        self.w
691    }
692}
693#[doc = "Reader of field `AEX2`"]
694pub type AEX2_R = crate::R<bool, bool>;
695#[doc = "Write proxy for field `AEX2`"]
696pub struct AEX2_W<'a> {
697    w: &'a mut W,
698}
699impl<'a> AEX2_W<'a> {
700    #[doc = r"Sets the field bit"]
701    #[inline(always)]
702    pub fn set_bit(self) -> &'a mut W {
703        self.bit(true)
704    }
705    #[doc = r"Clears the field bit"]
706    #[inline(always)]
707    pub fn clear_bit(self) -> &'a mut W {
708        self.bit(false)
709    }
710    #[doc = r"Writes raw bits to the field"]
711    #[inline(always)]
712    pub fn bit(self, value: bool) -> &'a mut W {
713        self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18);
714        self.w
715    }
716}
717#[doc = "Reader of field `AEX3`"]
718pub type AEX3_R = crate::R<bool, bool>;
719#[doc = "Write proxy for field `AEX3`"]
720pub struct AEX3_W<'a> {
721    w: &'a mut W,
722}
723impl<'a> AEX3_W<'a> {
724    #[doc = r"Sets the field bit"]
725    #[inline(always)]
726    pub fn set_bit(self) -> &'a mut W {
727        self.bit(true)
728    }
729    #[doc = r"Clears the field bit"]
730    #[inline(always)]
731    pub fn clear_bit(self) -> &'a mut W {
732        self.bit(false)
733    }
734    #[doc = r"Writes raw bits to the field"]
735    #[inline(always)]
736    pub fn bit(self, value: bool) -> &'a mut W {
737        self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19);
738        self.w
739    }
740}
741#[doc = "Reader of field `AEX4`"]
742pub type AEX4_R = crate::R<bool, bool>;
743#[doc = "Write proxy for field `AEX4`"]
744pub struct AEX4_W<'a> {
745    w: &'a mut W,
746}
747impl<'a> AEX4_W<'a> {
748    #[doc = r"Sets the field bit"]
749    #[inline(always)]
750    pub fn set_bit(self) -> &'a mut W {
751        self.bit(true)
752    }
753    #[doc = r"Clears the field bit"]
754    #[inline(always)]
755    pub fn clear_bit(self) -> &'a mut W {
756        self.bit(false)
757    }
758    #[doc = r"Writes raw bits to the field"]
759    #[inline(always)]
760    pub fn bit(self, value: bool) -> &'a mut W {
761        self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20);
762        self.w
763    }
764}
765#[doc = "Reader of field `AEX5`"]
766pub type AEX5_R = crate::R<bool, bool>;
767#[doc = "Write proxy for field `AEX5`"]
768pub struct AEX5_W<'a> {
769    w: &'a mut W,
770}
771impl<'a> AEX5_W<'a> {
772    #[doc = r"Sets the field bit"]
773    #[inline(always)]
774    pub fn set_bit(self) -> &'a mut W {
775        self.bit(true)
776    }
777    #[doc = r"Clears the field bit"]
778    #[inline(always)]
779    pub fn clear_bit(self) -> &'a mut W {
780        self.bit(false)
781    }
782    #[doc = r"Writes raw bits to the field"]
783    #[inline(always)]
784    pub fn bit(self, value: bool) -> &'a mut W {
785        self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21);
786        self.w
787    }
788}
789#[doc = "Reader of field `AEX6`"]
790pub type AEX6_R = crate::R<bool, bool>;
791#[doc = "Write proxy for field `AEX6`"]
792pub struct AEX6_W<'a> {
793    w: &'a mut W,
794}
795impl<'a> AEX6_W<'a> {
796    #[doc = r"Sets the field bit"]
797    #[inline(always)]
798    pub fn set_bit(self) -> &'a mut W {
799        self.bit(true)
800    }
801    #[doc = r"Clears the field bit"]
802    #[inline(always)]
803    pub fn clear_bit(self) -> &'a mut W {
804        self.bit(false)
805    }
806    #[doc = r"Writes raw bits to the field"]
807    #[inline(always)]
808    pub fn bit(self, value: bool) -> &'a mut W {
809        self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22);
810        self.w
811    }
812}
813#[doc = "Reader of field `AEX7`"]
814pub type AEX7_R = crate::R<bool, bool>;
815#[doc = "Write proxy for field `AEX7`"]
816pub struct AEX7_W<'a> {
817    w: &'a mut W,
818}
819impl<'a> AEX7_W<'a> {
820    #[doc = r"Sets the field bit"]
821    #[inline(always)]
822    pub fn set_bit(self) -> &'a mut W {
823        self.bit(true)
824    }
825    #[doc = r"Clears the field bit"]
826    #[inline(always)]
827    pub fn clear_bit(self) -> &'a mut W {
828        self.bit(false)
829    }
830    #[doc = r"Writes raw bits to the field"]
831    #[inline(always)]
832    pub fn bit(self, value: bool) -> &'a mut W {
833        self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23);
834        self.w
835    }
836}
837impl R {
838    #[doc = "Bits 0:1 - ALTEX0 Idle Phase Configuration"]
839    #[inline(always)]
840    pub fn idleconf0(&self) -> IDLECONF0_R {
841        IDLECONF0_R::new((self.bits & 0x03) as u8)
842    }
843    #[doc = "Bits 2:3 - ALTEX1 Idle Phase Configuration"]
844    #[inline(always)]
845    pub fn idleconf1(&self) -> IDLECONF1_R {
846        IDLECONF1_R::new(((self.bits >> 2) & 0x03) as u8)
847    }
848    #[doc = "Bits 4:5 - ALTEX2 Idle Phase Configuration"]
849    #[inline(always)]
850    pub fn idleconf2(&self) -> IDLECONF2_R {
851        IDLECONF2_R::new(((self.bits >> 4) & 0x03) as u8)
852    }
853    #[doc = "Bits 6:7 - ALTEX3 Idle Phase Configuration"]
854    #[inline(always)]
855    pub fn idleconf3(&self) -> IDLECONF3_R {
856        IDLECONF3_R::new(((self.bits >> 6) & 0x03) as u8)
857    }
858    #[doc = "Bits 8:9 - ALTEX4 Idle Phase Configuration"]
859    #[inline(always)]
860    pub fn idleconf4(&self) -> IDLECONF4_R {
861        IDLECONF4_R::new(((self.bits >> 8) & 0x03) as u8)
862    }
863    #[doc = "Bits 10:11 - ALTEX5 Idle Phase Configuration"]
864    #[inline(always)]
865    pub fn idleconf5(&self) -> IDLECONF5_R {
866        IDLECONF5_R::new(((self.bits >> 10) & 0x03) as u8)
867    }
868    #[doc = "Bits 12:13 - ALTEX6 Idle Phase Configuration"]
869    #[inline(always)]
870    pub fn idleconf6(&self) -> IDLECONF6_R {
871        IDLECONF6_R::new(((self.bits >> 12) & 0x03) as u8)
872    }
873    #[doc = "Bits 14:15 - ALTEX7 Idle Phase Configuration"]
874    #[inline(always)]
875    pub fn idleconf7(&self) -> IDLECONF7_R {
876        IDLECONF7_R::new(((self.bits >> 14) & 0x03) as u8)
877    }
878    #[doc = "Bit 16 - ALTEX0 Always Excite Enable"]
879    #[inline(always)]
880    pub fn aex0(&self) -> AEX0_R {
881        AEX0_R::new(((self.bits >> 16) & 0x01) != 0)
882    }
883    #[doc = "Bit 17 - ALTEX1 Always Excite Enable"]
884    #[inline(always)]
885    pub fn aex1(&self) -> AEX1_R {
886        AEX1_R::new(((self.bits >> 17) & 0x01) != 0)
887    }
888    #[doc = "Bit 18 - ALTEX2 Always Excite Enable"]
889    #[inline(always)]
890    pub fn aex2(&self) -> AEX2_R {
891        AEX2_R::new(((self.bits >> 18) & 0x01) != 0)
892    }
893    #[doc = "Bit 19 - ALTEX3 Always Excite Enable"]
894    #[inline(always)]
895    pub fn aex3(&self) -> AEX3_R {
896        AEX3_R::new(((self.bits >> 19) & 0x01) != 0)
897    }
898    #[doc = "Bit 20 - ALTEX4 Always Excite Enable"]
899    #[inline(always)]
900    pub fn aex4(&self) -> AEX4_R {
901        AEX4_R::new(((self.bits >> 20) & 0x01) != 0)
902    }
903    #[doc = "Bit 21 - ALTEX5 Always Excite Enable"]
904    #[inline(always)]
905    pub fn aex5(&self) -> AEX5_R {
906        AEX5_R::new(((self.bits >> 21) & 0x01) != 0)
907    }
908    #[doc = "Bit 22 - ALTEX6 Always Excite Enable"]
909    #[inline(always)]
910    pub fn aex6(&self) -> AEX6_R {
911        AEX6_R::new(((self.bits >> 22) & 0x01) != 0)
912    }
913    #[doc = "Bit 23 - ALTEX7 Always Excite Enable"]
914    #[inline(always)]
915    pub fn aex7(&self) -> AEX7_R {
916        AEX7_R::new(((self.bits >> 23) & 0x01) != 0)
917    }
918}
919impl W {
920    #[doc = "Bits 0:1 - ALTEX0 Idle Phase Configuration"]
921    #[inline(always)]
922    pub fn idleconf0(&mut self) -> IDLECONF0_W {
923        IDLECONF0_W { w: self }
924    }
925    #[doc = "Bits 2:3 - ALTEX1 Idle Phase Configuration"]
926    #[inline(always)]
927    pub fn idleconf1(&mut self) -> IDLECONF1_W {
928        IDLECONF1_W { w: self }
929    }
930    #[doc = "Bits 4:5 - ALTEX2 Idle Phase Configuration"]
931    #[inline(always)]
932    pub fn idleconf2(&mut self) -> IDLECONF2_W {
933        IDLECONF2_W { w: self }
934    }
935    #[doc = "Bits 6:7 - ALTEX3 Idle Phase Configuration"]
936    #[inline(always)]
937    pub fn idleconf3(&mut self) -> IDLECONF3_W {
938        IDLECONF3_W { w: self }
939    }
940    #[doc = "Bits 8:9 - ALTEX4 Idle Phase Configuration"]
941    #[inline(always)]
942    pub fn idleconf4(&mut self) -> IDLECONF4_W {
943        IDLECONF4_W { w: self }
944    }
945    #[doc = "Bits 10:11 - ALTEX5 Idle Phase Configuration"]
946    #[inline(always)]
947    pub fn idleconf5(&mut self) -> IDLECONF5_W {
948        IDLECONF5_W { w: self }
949    }
950    #[doc = "Bits 12:13 - ALTEX6 Idle Phase Configuration"]
951    #[inline(always)]
952    pub fn idleconf6(&mut self) -> IDLECONF6_W {
953        IDLECONF6_W { w: self }
954    }
955    #[doc = "Bits 14:15 - ALTEX7 Idle Phase Configuration"]
956    #[inline(always)]
957    pub fn idleconf7(&mut self) -> IDLECONF7_W {
958        IDLECONF7_W { w: self }
959    }
960    #[doc = "Bit 16 - ALTEX0 Always Excite Enable"]
961    #[inline(always)]
962    pub fn aex0(&mut self) -> AEX0_W {
963        AEX0_W { w: self }
964    }
965    #[doc = "Bit 17 - ALTEX1 Always Excite Enable"]
966    #[inline(always)]
967    pub fn aex1(&mut self) -> AEX1_W {
968        AEX1_W { w: self }
969    }
970    #[doc = "Bit 18 - ALTEX2 Always Excite Enable"]
971    #[inline(always)]
972    pub fn aex2(&mut self) -> AEX2_W {
973        AEX2_W { w: self }
974    }
975    #[doc = "Bit 19 - ALTEX3 Always Excite Enable"]
976    #[inline(always)]
977    pub fn aex3(&mut self) -> AEX3_W {
978        AEX3_W { w: self }
979    }
980    #[doc = "Bit 20 - ALTEX4 Always Excite Enable"]
981    #[inline(always)]
982    pub fn aex4(&mut self) -> AEX4_W {
983        AEX4_W { w: self }
984    }
985    #[doc = "Bit 21 - ALTEX5 Always Excite Enable"]
986    #[inline(always)]
987    pub fn aex5(&mut self) -> AEX5_W {
988        AEX5_W { w: self }
989    }
990    #[doc = "Bit 22 - ALTEX6 Always Excite Enable"]
991    #[inline(always)]
992    pub fn aex6(&mut self) -> AEX6_W {
993        AEX6_W { w: self }
994    }
995    #[doc = "Bit 23 - ALTEX7 Always Excite Enable"]
996    #[inline(always)]
997    pub fn aex7(&mut self) -> AEX7_W {
998        AEX7_W { w: self }
999    }
1000}