bl602_pac/glb/
gpio_cfgctl12.rs

1#[doc = "Register `GPIO_CFGCTL12` reader"]
2pub struct R(crate::R<GPIO_CFGCTL12_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<GPIO_CFGCTL12_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<GPIO_CFGCTL12_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<GPIO_CFGCTL12_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `GPIO_CFGCTL12` writer"]
17pub struct W(crate::W<GPIO_CFGCTL12_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<GPIO_CFGCTL12_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<GPIO_CFGCTL12_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<GPIO_CFGCTL12_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `reg_gpio_24_ie` reader - Input enable for GPIO24."]
38pub type REG_GPIO_24_IE_R = crate::BitReader<GPIO24INPUT_ENABLED_A>;
39#[doc = "Input enable for GPIO24.\n\nValue on reset: 1"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum GPIO24INPUT_ENABLED_A {
42    #[doc = "0: `0`"]
43    DISABLED = 0,
44    #[doc = "1: `1`"]
45    ENABLED = 1,
46}
47impl From<GPIO24INPUT_ENABLED_A> for bool {
48    #[inline(always)]
49    fn from(variant: GPIO24INPUT_ENABLED_A) -> Self {
50        variant as u8 != 0
51    }
52}
53impl REG_GPIO_24_IE_R {
54    #[doc = "Get enumerated values variant"]
55    #[inline(always)]
56    pub fn variant(&self) -> GPIO24INPUT_ENABLED_A {
57        match self.bits {
58            false => GPIO24INPUT_ENABLED_A::DISABLED,
59            true => GPIO24INPUT_ENABLED_A::ENABLED,
60        }
61    }
62    #[doc = "Checks if the value of the field is `DISABLED`"]
63    #[inline(always)]
64    pub fn is_disabled(&self) -> bool {
65        *self == GPIO24INPUT_ENABLED_A::DISABLED
66    }
67    #[doc = "Checks if the value of the field is `ENABLED`"]
68    #[inline(always)]
69    pub fn is_enabled(&self) -> bool {
70        *self == GPIO24INPUT_ENABLED_A::ENABLED
71    }
72}
73#[doc = "Field `reg_gpio_24_ie` writer - Input enable for GPIO24."]
74pub type REG_GPIO_24_IE_W<'a, const O: u8> =
75    crate::BitWriter<'a, u32, GPIO_CFGCTL12_SPEC, GPIO24INPUT_ENABLED_A, O>;
76impl<'a, const O: u8> REG_GPIO_24_IE_W<'a, O> {
77    #[doc = "`0`"]
78    #[inline(always)]
79    pub fn disabled(self) -> &'a mut W {
80        self.variant(GPIO24INPUT_ENABLED_A::DISABLED)
81    }
82    #[doc = "`1`"]
83    #[inline(always)]
84    pub fn enabled(self) -> &'a mut W {
85        self.variant(GPIO24INPUT_ENABLED_A::ENABLED)
86    }
87}
88#[doc = "Field `reg_gpio_24_smt` reader - Schmitt trigger enabled for GPIO24."]
89pub type REG_GPIO_24_SMT_R = crate::BitReader<GPIO24SCHMITT_A>;
90#[doc = "Schmitt trigger enabled for GPIO24.\n\nValue on reset: 1"]
91#[derive(Clone, Copy, Debug, PartialEq, Eq)]
92pub enum GPIO24SCHMITT_A {
93    #[doc = "0: `0`"]
94    DISABLED = 0,
95    #[doc = "1: `1`"]
96    ENABLED = 1,
97}
98impl From<GPIO24SCHMITT_A> for bool {
99    #[inline(always)]
100    fn from(variant: GPIO24SCHMITT_A) -> Self {
101        variant as u8 != 0
102    }
103}
104impl REG_GPIO_24_SMT_R {
105    #[doc = "Get enumerated values variant"]
106    #[inline(always)]
107    pub fn variant(&self) -> GPIO24SCHMITT_A {
108        match self.bits {
109            false => GPIO24SCHMITT_A::DISABLED,
110            true => GPIO24SCHMITT_A::ENABLED,
111        }
112    }
113    #[doc = "Checks if the value of the field is `DISABLED`"]
114    #[inline(always)]
115    pub fn is_disabled(&self) -> bool {
116        *self == GPIO24SCHMITT_A::DISABLED
117    }
118    #[doc = "Checks if the value of the field is `ENABLED`"]
119    #[inline(always)]
120    pub fn is_enabled(&self) -> bool {
121        *self == GPIO24SCHMITT_A::ENABLED
122    }
123}
124#[doc = "Field `reg_gpio_24_smt` writer - Schmitt trigger enabled for GPIO24."]
125pub type REG_GPIO_24_SMT_W<'a, const O: u8> =
126    crate::BitWriter<'a, u32, GPIO_CFGCTL12_SPEC, GPIO24SCHMITT_A, O>;
127impl<'a, const O: u8> REG_GPIO_24_SMT_W<'a, O> {
128    #[doc = "`0`"]
129    #[inline(always)]
130    pub fn disabled(self) -> &'a mut W {
131        self.variant(GPIO24SCHMITT_A::DISABLED)
132    }
133    #[doc = "`1`"]
134    #[inline(always)]
135    pub fn enabled(self) -> &'a mut W {
136        self.variant(GPIO24SCHMITT_A::ENABLED)
137    }
138}
139#[doc = "Field `reg_gpio_24_drv` reader - Driving control enabled for GPIO24."]
140pub type REG_GPIO_24_DRV_R = crate::FieldReader<u8, GPIO24DRIVING_A>;
141#[doc = "Driving control enabled for GPIO24.\n\nValue on reset: 0"]
142#[derive(Clone, Copy, Debug, PartialEq, Eq)]
143#[repr(u8)]
144pub enum GPIO24DRIVING_A {
145    #[doc = "0: `0`"]
146    DISABLED = 0,
147    #[doc = "1: `1`"]
148    ENABLED = 1,
149}
150impl From<GPIO24DRIVING_A> for u8 {
151    #[inline(always)]
152    fn from(variant: GPIO24DRIVING_A) -> Self {
153        variant as _
154    }
155}
156impl REG_GPIO_24_DRV_R {
157    #[doc = "Get enumerated values variant"]
158    #[inline(always)]
159    pub fn variant(&self) -> Option<GPIO24DRIVING_A> {
160        match self.bits {
161            0 => Some(GPIO24DRIVING_A::DISABLED),
162            1 => Some(GPIO24DRIVING_A::ENABLED),
163            _ => None,
164        }
165    }
166    #[doc = "Checks if the value of the field is `DISABLED`"]
167    #[inline(always)]
168    pub fn is_disabled(&self) -> bool {
169        *self == GPIO24DRIVING_A::DISABLED
170    }
171    #[doc = "Checks if the value of the field is `ENABLED`"]
172    #[inline(always)]
173    pub fn is_enabled(&self) -> bool {
174        *self == GPIO24DRIVING_A::ENABLED
175    }
176}
177#[doc = "Field `reg_gpio_24_drv` writer - Driving control enabled for GPIO24."]
178pub type REG_GPIO_24_DRV_W<'a, const O: u8> =
179    crate::FieldWriter<'a, u32, GPIO_CFGCTL12_SPEC, u8, GPIO24DRIVING_A, 2, O>;
180impl<'a, const O: u8> REG_GPIO_24_DRV_W<'a, O> {
181    #[doc = "`0`"]
182    #[inline(always)]
183    pub fn disabled(self) -> &'a mut W {
184        self.variant(GPIO24DRIVING_A::DISABLED)
185    }
186    #[doc = "`1`"]
187    #[inline(always)]
188    pub fn enabled(self) -> &'a mut W {
189        self.variant(GPIO24DRIVING_A::ENABLED)
190    }
191}
192#[doc = "Field `reg_gpio_24_pu` reader - Pull Up Resistor for GPIO24."]
193pub type REG_GPIO_24_PU_R = crate::BitReader<GPIO24PULL_UP_RESISTOR_A>;
194#[doc = "Pull Up Resistor for GPIO24.\n\nValue on reset: 0"]
195#[derive(Clone, Copy, Debug, PartialEq, Eq)]
196pub enum GPIO24PULL_UP_RESISTOR_A {
197    #[doc = "0: `0`"]
198    DISABLED = 0,
199    #[doc = "1: `1`"]
200    ENABLED = 1,
201}
202impl From<GPIO24PULL_UP_RESISTOR_A> for bool {
203    #[inline(always)]
204    fn from(variant: GPIO24PULL_UP_RESISTOR_A) -> Self {
205        variant as u8 != 0
206    }
207}
208impl REG_GPIO_24_PU_R {
209    #[doc = "Get enumerated values variant"]
210    #[inline(always)]
211    pub fn variant(&self) -> GPIO24PULL_UP_RESISTOR_A {
212        match self.bits {
213            false => GPIO24PULL_UP_RESISTOR_A::DISABLED,
214            true => GPIO24PULL_UP_RESISTOR_A::ENABLED,
215        }
216    }
217    #[doc = "Checks if the value of the field is `DISABLED`"]
218    #[inline(always)]
219    pub fn is_disabled(&self) -> bool {
220        *self == GPIO24PULL_UP_RESISTOR_A::DISABLED
221    }
222    #[doc = "Checks if the value of the field is `ENABLED`"]
223    #[inline(always)]
224    pub fn is_enabled(&self) -> bool {
225        *self == GPIO24PULL_UP_RESISTOR_A::ENABLED
226    }
227}
228#[doc = "Field `reg_gpio_24_pu` writer - Pull Up Resistor for GPIO24."]
229pub type REG_GPIO_24_PU_W<'a, const O: u8> =
230    crate::BitWriter<'a, u32, GPIO_CFGCTL12_SPEC, GPIO24PULL_UP_RESISTOR_A, O>;
231impl<'a, const O: u8> REG_GPIO_24_PU_W<'a, O> {
232    #[doc = "`0`"]
233    #[inline(always)]
234    pub fn disabled(self) -> &'a mut W {
235        self.variant(GPIO24PULL_UP_RESISTOR_A::DISABLED)
236    }
237    #[doc = "`1`"]
238    #[inline(always)]
239    pub fn enabled(self) -> &'a mut W {
240        self.variant(GPIO24PULL_UP_RESISTOR_A::ENABLED)
241    }
242}
243#[doc = "Field `reg_gpio_24_pd` reader - Pull Down Resistor for GPIO24."]
244pub type REG_GPIO_24_PD_R = crate::BitReader<GPIO24PULL_DOWN_RESISTOR_A>;
245#[doc = "Pull Down Resistor for GPIO24.\n\nValue on reset: 1"]
246#[derive(Clone, Copy, Debug, PartialEq, Eq)]
247pub enum GPIO24PULL_DOWN_RESISTOR_A {
248    #[doc = "0: `0`"]
249    DISABLED = 0,
250    #[doc = "1: `1`"]
251    ENABLED = 1,
252}
253impl From<GPIO24PULL_DOWN_RESISTOR_A> for bool {
254    #[inline(always)]
255    fn from(variant: GPIO24PULL_DOWN_RESISTOR_A) -> Self {
256        variant as u8 != 0
257    }
258}
259impl REG_GPIO_24_PD_R {
260    #[doc = "Get enumerated values variant"]
261    #[inline(always)]
262    pub fn variant(&self) -> GPIO24PULL_DOWN_RESISTOR_A {
263        match self.bits {
264            false => GPIO24PULL_DOWN_RESISTOR_A::DISABLED,
265            true => GPIO24PULL_DOWN_RESISTOR_A::ENABLED,
266        }
267    }
268    #[doc = "Checks if the value of the field is `DISABLED`"]
269    #[inline(always)]
270    pub fn is_disabled(&self) -> bool {
271        *self == GPIO24PULL_DOWN_RESISTOR_A::DISABLED
272    }
273    #[doc = "Checks if the value of the field is `ENABLED`"]
274    #[inline(always)]
275    pub fn is_enabled(&self) -> bool {
276        *self == GPIO24PULL_DOWN_RESISTOR_A::ENABLED
277    }
278}
279#[doc = "Field `reg_gpio_24_pd` writer - Pull Down Resistor for GPIO24."]
280pub type REG_GPIO_24_PD_W<'a, const O: u8> =
281    crate::BitWriter<'a, u32, GPIO_CFGCTL12_SPEC, GPIO24PULL_DOWN_RESISTOR_A, O>;
282impl<'a, const O: u8> REG_GPIO_24_PD_W<'a, O> {
283    #[doc = "`0`"]
284    #[inline(always)]
285    pub fn disabled(self) -> &'a mut W {
286        self.variant(GPIO24PULL_DOWN_RESISTOR_A::DISABLED)
287    }
288    #[doc = "`1`"]
289    #[inline(always)]
290    pub fn enabled(self) -> &'a mut W {
291        self.variant(GPIO24PULL_DOWN_RESISTOR_A::ENABLED)
292    }
293}
294#[doc = "Field `reg_gpio_25_ie` reader - Input enable for GPIO25."]
295pub type REG_GPIO_25_IE_R = crate::BitReader<GPIO25INPUT_ENABLED_A>;
296#[doc = "Input enable for GPIO25.\n\nValue on reset: 1"]
297#[derive(Clone, Copy, Debug, PartialEq, Eq)]
298pub enum GPIO25INPUT_ENABLED_A {
299    #[doc = "0: `0`"]
300    DISABLED = 0,
301    #[doc = "1: `1`"]
302    ENABLED = 1,
303}
304impl From<GPIO25INPUT_ENABLED_A> for bool {
305    #[inline(always)]
306    fn from(variant: GPIO25INPUT_ENABLED_A) -> Self {
307        variant as u8 != 0
308    }
309}
310impl REG_GPIO_25_IE_R {
311    #[doc = "Get enumerated values variant"]
312    #[inline(always)]
313    pub fn variant(&self) -> GPIO25INPUT_ENABLED_A {
314        match self.bits {
315            false => GPIO25INPUT_ENABLED_A::DISABLED,
316            true => GPIO25INPUT_ENABLED_A::ENABLED,
317        }
318    }
319    #[doc = "Checks if the value of the field is `DISABLED`"]
320    #[inline(always)]
321    pub fn is_disabled(&self) -> bool {
322        *self == GPIO25INPUT_ENABLED_A::DISABLED
323    }
324    #[doc = "Checks if the value of the field is `ENABLED`"]
325    #[inline(always)]
326    pub fn is_enabled(&self) -> bool {
327        *self == GPIO25INPUT_ENABLED_A::ENABLED
328    }
329}
330#[doc = "Field `reg_gpio_25_ie` writer - Input enable for GPIO25."]
331pub type REG_GPIO_25_IE_W<'a, const O: u8> =
332    crate::BitWriter<'a, u32, GPIO_CFGCTL12_SPEC, GPIO25INPUT_ENABLED_A, O>;
333impl<'a, const O: u8> REG_GPIO_25_IE_W<'a, O> {
334    #[doc = "`0`"]
335    #[inline(always)]
336    pub fn disabled(self) -> &'a mut W {
337        self.variant(GPIO25INPUT_ENABLED_A::DISABLED)
338    }
339    #[doc = "`1`"]
340    #[inline(always)]
341    pub fn enabled(self) -> &'a mut W {
342        self.variant(GPIO25INPUT_ENABLED_A::ENABLED)
343    }
344}
345#[doc = "Field `reg_gpio_25_smt` reader - Schmitt trigger enabled for GPIO25."]
346pub type REG_GPIO_25_SMT_R = crate::BitReader<GPIO25SCHMITT_A>;
347#[doc = "Schmitt trigger enabled for GPIO25.\n\nValue on reset: 1"]
348#[derive(Clone, Copy, Debug, PartialEq, Eq)]
349pub enum GPIO25SCHMITT_A {
350    #[doc = "0: `0`"]
351    DISABLED = 0,
352    #[doc = "1: `1`"]
353    ENABLED = 1,
354}
355impl From<GPIO25SCHMITT_A> for bool {
356    #[inline(always)]
357    fn from(variant: GPIO25SCHMITT_A) -> Self {
358        variant as u8 != 0
359    }
360}
361impl REG_GPIO_25_SMT_R {
362    #[doc = "Get enumerated values variant"]
363    #[inline(always)]
364    pub fn variant(&self) -> GPIO25SCHMITT_A {
365        match self.bits {
366            false => GPIO25SCHMITT_A::DISABLED,
367            true => GPIO25SCHMITT_A::ENABLED,
368        }
369    }
370    #[doc = "Checks if the value of the field is `DISABLED`"]
371    #[inline(always)]
372    pub fn is_disabled(&self) -> bool {
373        *self == GPIO25SCHMITT_A::DISABLED
374    }
375    #[doc = "Checks if the value of the field is `ENABLED`"]
376    #[inline(always)]
377    pub fn is_enabled(&self) -> bool {
378        *self == GPIO25SCHMITT_A::ENABLED
379    }
380}
381#[doc = "Field `reg_gpio_25_smt` writer - Schmitt trigger enabled for GPIO25."]
382pub type REG_GPIO_25_SMT_W<'a, const O: u8> =
383    crate::BitWriter<'a, u32, GPIO_CFGCTL12_SPEC, GPIO25SCHMITT_A, O>;
384impl<'a, const O: u8> REG_GPIO_25_SMT_W<'a, O> {
385    #[doc = "`0`"]
386    #[inline(always)]
387    pub fn disabled(self) -> &'a mut W {
388        self.variant(GPIO25SCHMITT_A::DISABLED)
389    }
390    #[doc = "`1`"]
391    #[inline(always)]
392    pub fn enabled(self) -> &'a mut W {
393        self.variant(GPIO25SCHMITT_A::ENABLED)
394    }
395}
396#[doc = "Field `reg_gpio_25_drv` reader - Driving control enabled for GPIO25."]
397pub type REG_GPIO_25_DRV_R = crate::FieldReader<u8, GPIO25DRIVING_A>;
398#[doc = "Driving control enabled for GPIO25.\n\nValue on reset: 0"]
399#[derive(Clone, Copy, Debug, PartialEq, Eq)]
400#[repr(u8)]
401pub enum GPIO25DRIVING_A {
402    #[doc = "0: `0`"]
403    DISABLED = 0,
404    #[doc = "1: `1`"]
405    ENABLED = 1,
406}
407impl From<GPIO25DRIVING_A> for u8 {
408    #[inline(always)]
409    fn from(variant: GPIO25DRIVING_A) -> Self {
410        variant as _
411    }
412}
413impl REG_GPIO_25_DRV_R {
414    #[doc = "Get enumerated values variant"]
415    #[inline(always)]
416    pub fn variant(&self) -> Option<GPIO25DRIVING_A> {
417        match self.bits {
418            0 => Some(GPIO25DRIVING_A::DISABLED),
419            1 => Some(GPIO25DRIVING_A::ENABLED),
420            _ => None,
421        }
422    }
423    #[doc = "Checks if the value of the field is `DISABLED`"]
424    #[inline(always)]
425    pub fn is_disabled(&self) -> bool {
426        *self == GPIO25DRIVING_A::DISABLED
427    }
428    #[doc = "Checks if the value of the field is `ENABLED`"]
429    #[inline(always)]
430    pub fn is_enabled(&self) -> bool {
431        *self == GPIO25DRIVING_A::ENABLED
432    }
433}
434#[doc = "Field `reg_gpio_25_drv` writer - Driving control enabled for GPIO25."]
435pub type REG_GPIO_25_DRV_W<'a, const O: u8> =
436    crate::FieldWriter<'a, u32, GPIO_CFGCTL12_SPEC, u8, GPIO25DRIVING_A, 2, O>;
437impl<'a, const O: u8> REG_GPIO_25_DRV_W<'a, O> {
438    #[doc = "`0`"]
439    #[inline(always)]
440    pub fn disabled(self) -> &'a mut W {
441        self.variant(GPIO25DRIVING_A::DISABLED)
442    }
443    #[doc = "`1`"]
444    #[inline(always)]
445    pub fn enabled(self) -> &'a mut W {
446        self.variant(GPIO25DRIVING_A::ENABLED)
447    }
448}
449#[doc = "Field `reg_gpio_25_pu` reader - Pull Up Resistor for GPIO25."]
450pub type REG_GPIO_25_PU_R = crate::BitReader<GPIO25PULL_UP_RESISTOR_A>;
451#[doc = "Pull Up Resistor for GPIO25.\n\nValue on reset: 0"]
452#[derive(Clone, Copy, Debug, PartialEq, Eq)]
453pub enum GPIO25PULL_UP_RESISTOR_A {
454    #[doc = "0: `0`"]
455    DISABLED = 0,
456    #[doc = "1: `1`"]
457    ENABLED = 1,
458}
459impl From<GPIO25PULL_UP_RESISTOR_A> for bool {
460    #[inline(always)]
461    fn from(variant: GPIO25PULL_UP_RESISTOR_A) -> Self {
462        variant as u8 != 0
463    }
464}
465impl REG_GPIO_25_PU_R {
466    #[doc = "Get enumerated values variant"]
467    #[inline(always)]
468    pub fn variant(&self) -> GPIO25PULL_UP_RESISTOR_A {
469        match self.bits {
470            false => GPIO25PULL_UP_RESISTOR_A::DISABLED,
471            true => GPIO25PULL_UP_RESISTOR_A::ENABLED,
472        }
473    }
474    #[doc = "Checks if the value of the field is `DISABLED`"]
475    #[inline(always)]
476    pub fn is_disabled(&self) -> bool {
477        *self == GPIO25PULL_UP_RESISTOR_A::DISABLED
478    }
479    #[doc = "Checks if the value of the field is `ENABLED`"]
480    #[inline(always)]
481    pub fn is_enabled(&self) -> bool {
482        *self == GPIO25PULL_UP_RESISTOR_A::ENABLED
483    }
484}
485#[doc = "Field `reg_gpio_25_pu` writer - Pull Up Resistor for GPIO25."]
486pub type REG_GPIO_25_PU_W<'a, const O: u8> =
487    crate::BitWriter<'a, u32, GPIO_CFGCTL12_SPEC, GPIO25PULL_UP_RESISTOR_A, O>;
488impl<'a, const O: u8> REG_GPIO_25_PU_W<'a, O> {
489    #[doc = "`0`"]
490    #[inline(always)]
491    pub fn disabled(self) -> &'a mut W {
492        self.variant(GPIO25PULL_UP_RESISTOR_A::DISABLED)
493    }
494    #[doc = "`1`"]
495    #[inline(always)]
496    pub fn enabled(self) -> &'a mut W {
497        self.variant(GPIO25PULL_UP_RESISTOR_A::ENABLED)
498    }
499}
500#[doc = "Field `reg_gpio_25_pd` reader - Pull Down Resistor for GPIO25."]
501pub type REG_GPIO_25_PD_R = crate::BitReader<GPIO25PULL_DOWN_RESISTOR_A>;
502#[doc = "Pull Down Resistor for GPIO25.\n\nValue on reset: 0"]
503#[derive(Clone, Copy, Debug, PartialEq, Eq)]
504pub enum GPIO25PULL_DOWN_RESISTOR_A {
505    #[doc = "0: `0`"]
506    DISABLED = 0,
507    #[doc = "1: `1`"]
508    ENABLED = 1,
509}
510impl From<GPIO25PULL_DOWN_RESISTOR_A> for bool {
511    #[inline(always)]
512    fn from(variant: GPIO25PULL_DOWN_RESISTOR_A) -> Self {
513        variant as u8 != 0
514    }
515}
516impl REG_GPIO_25_PD_R {
517    #[doc = "Get enumerated values variant"]
518    #[inline(always)]
519    pub fn variant(&self) -> GPIO25PULL_DOWN_RESISTOR_A {
520        match self.bits {
521            false => GPIO25PULL_DOWN_RESISTOR_A::DISABLED,
522            true => GPIO25PULL_DOWN_RESISTOR_A::ENABLED,
523        }
524    }
525    #[doc = "Checks if the value of the field is `DISABLED`"]
526    #[inline(always)]
527    pub fn is_disabled(&self) -> bool {
528        *self == GPIO25PULL_DOWN_RESISTOR_A::DISABLED
529    }
530    #[doc = "Checks if the value of the field is `ENABLED`"]
531    #[inline(always)]
532    pub fn is_enabled(&self) -> bool {
533        *self == GPIO25PULL_DOWN_RESISTOR_A::ENABLED
534    }
535}
536#[doc = "Field `reg_gpio_25_pd` writer - Pull Down Resistor for GPIO25."]
537pub type REG_GPIO_25_PD_W<'a, const O: u8> =
538    crate::BitWriter<'a, u32, GPIO_CFGCTL12_SPEC, GPIO25PULL_DOWN_RESISTOR_A, O>;
539impl<'a, const O: u8> REG_GPIO_25_PD_W<'a, O> {
540    #[doc = "`0`"]
541    #[inline(always)]
542    pub fn disabled(self) -> &'a mut W {
543        self.variant(GPIO25PULL_DOWN_RESISTOR_A::DISABLED)
544    }
545    #[doc = "`1`"]
546    #[inline(always)]
547    pub fn enabled(self) -> &'a mut W {
548        self.variant(GPIO25PULL_DOWN_RESISTOR_A::ENABLED)
549    }
550}
551impl R {
552    #[doc = "Bit 0 - Input enable for GPIO24."]
553    #[inline(always)]
554    pub fn reg_gpio_24_ie(&self) -> REG_GPIO_24_IE_R {
555        REG_GPIO_24_IE_R::new((self.bits & 1) != 0)
556    }
557    #[doc = "Bit 1 - Schmitt trigger enabled for GPIO24."]
558    #[inline(always)]
559    pub fn reg_gpio_24_smt(&self) -> REG_GPIO_24_SMT_R {
560        REG_GPIO_24_SMT_R::new(((self.bits >> 1) & 1) != 0)
561    }
562    #[doc = "Bits 2:3 - Driving control enabled for GPIO24."]
563    #[inline(always)]
564    pub fn reg_gpio_24_drv(&self) -> REG_GPIO_24_DRV_R {
565        REG_GPIO_24_DRV_R::new(((self.bits >> 2) & 3) as u8)
566    }
567    #[doc = "Bit 4 - Pull Up Resistor for GPIO24."]
568    #[inline(always)]
569    pub fn reg_gpio_24_pu(&self) -> REG_GPIO_24_PU_R {
570        REG_GPIO_24_PU_R::new(((self.bits >> 4) & 1) != 0)
571    }
572    #[doc = "Bit 5 - Pull Down Resistor for GPIO24."]
573    #[inline(always)]
574    pub fn reg_gpio_24_pd(&self) -> REG_GPIO_24_PD_R {
575        REG_GPIO_24_PD_R::new(((self.bits >> 5) & 1) != 0)
576    }
577    #[doc = "Bit 16 - Input enable for GPIO25."]
578    #[inline(always)]
579    pub fn reg_gpio_25_ie(&self) -> REG_GPIO_25_IE_R {
580        REG_GPIO_25_IE_R::new(((self.bits >> 16) & 1) != 0)
581    }
582    #[doc = "Bit 17 - Schmitt trigger enabled for GPIO25."]
583    #[inline(always)]
584    pub fn reg_gpio_25_smt(&self) -> REG_GPIO_25_SMT_R {
585        REG_GPIO_25_SMT_R::new(((self.bits >> 17) & 1) != 0)
586    }
587    #[doc = "Bits 18:19 - Driving control enabled for GPIO25."]
588    #[inline(always)]
589    pub fn reg_gpio_25_drv(&self) -> REG_GPIO_25_DRV_R {
590        REG_GPIO_25_DRV_R::new(((self.bits >> 18) & 3) as u8)
591    }
592    #[doc = "Bit 20 - Pull Up Resistor for GPIO25."]
593    #[inline(always)]
594    pub fn reg_gpio_25_pu(&self) -> REG_GPIO_25_PU_R {
595        REG_GPIO_25_PU_R::new(((self.bits >> 20) & 1) != 0)
596    }
597    #[doc = "Bit 21 - Pull Down Resistor for GPIO25."]
598    #[inline(always)]
599    pub fn reg_gpio_25_pd(&self) -> REG_GPIO_25_PD_R {
600        REG_GPIO_25_PD_R::new(((self.bits >> 21) & 1) != 0)
601    }
602}
603impl W {
604    #[doc = "Bit 0 - Input enable for GPIO24."]
605    #[inline(always)]
606    #[must_use]
607    pub fn reg_gpio_24_ie(&mut self) -> REG_GPIO_24_IE_W<0> {
608        REG_GPIO_24_IE_W::new(self)
609    }
610    #[doc = "Bit 1 - Schmitt trigger enabled for GPIO24."]
611    #[inline(always)]
612    #[must_use]
613    pub fn reg_gpio_24_smt(&mut self) -> REG_GPIO_24_SMT_W<1> {
614        REG_GPIO_24_SMT_W::new(self)
615    }
616    #[doc = "Bits 2:3 - Driving control enabled for GPIO24."]
617    #[inline(always)]
618    #[must_use]
619    pub fn reg_gpio_24_drv(&mut self) -> REG_GPIO_24_DRV_W<2> {
620        REG_GPIO_24_DRV_W::new(self)
621    }
622    #[doc = "Bit 4 - Pull Up Resistor for GPIO24."]
623    #[inline(always)]
624    #[must_use]
625    pub fn reg_gpio_24_pu(&mut self) -> REG_GPIO_24_PU_W<4> {
626        REG_GPIO_24_PU_W::new(self)
627    }
628    #[doc = "Bit 5 - Pull Down Resistor for GPIO24."]
629    #[inline(always)]
630    #[must_use]
631    pub fn reg_gpio_24_pd(&mut self) -> REG_GPIO_24_PD_W<5> {
632        REG_GPIO_24_PD_W::new(self)
633    }
634    #[doc = "Bit 16 - Input enable for GPIO25."]
635    #[inline(always)]
636    #[must_use]
637    pub fn reg_gpio_25_ie(&mut self) -> REG_GPIO_25_IE_W<16> {
638        REG_GPIO_25_IE_W::new(self)
639    }
640    #[doc = "Bit 17 - Schmitt trigger enabled for GPIO25."]
641    #[inline(always)]
642    #[must_use]
643    pub fn reg_gpio_25_smt(&mut self) -> REG_GPIO_25_SMT_W<17> {
644        REG_GPIO_25_SMT_W::new(self)
645    }
646    #[doc = "Bits 18:19 - Driving control enabled for GPIO25."]
647    #[inline(always)]
648    #[must_use]
649    pub fn reg_gpio_25_drv(&mut self) -> REG_GPIO_25_DRV_W<18> {
650        REG_GPIO_25_DRV_W::new(self)
651    }
652    #[doc = "Bit 20 - Pull Up Resistor for GPIO25."]
653    #[inline(always)]
654    #[must_use]
655    pub fn reg_gpio_25_pu(&mut self) -> REG_GPIO_25_PU_W<20> {
656        REG_GPIO_25_PU_W::new(self)
657    }
658    #[doc = "Bit 21 - Pull Down Resistor for GPIO25."]
659    #[inline(always)]
660    #[must_use]
661    pub fn reg_gpio_25_pd(&mut self) -> REG_GPIO_25_PD_W<21> {
662        REG_GPIO_25_PD_W::new(self)
663    }
664    #[doc = "Writes raw bits to the register."]
665    #[inline(always)]
666    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
667        self.0.bits(bits);
668        self
669    }
670}
671#[doc = "GPIO24, GPIO25 configuration\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 [gpio_cfgctl12](index.html) module"]
672pub struct GPIO_CFGCTL12_SPEC;
673impl crate::RegisterSpec for GPIO_CFGCTL12_SPEC {
674    type Ux = u32;
675}
676#[doc = "`read()` method returns [gpio_cfgctl12::R](R) reader structure"]
677impl crate::Readable for GPIO_CFGCTL12_SPEC {
678    type Reader = R;
679}
680#[doc = "`write(|w| ..)` method takes [gpio_cfgctl12::W](W) writer structure"]
681impl crate::Writable for GPIO_CFGCTL12_SPEC {
682    type Writer = W;
683    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
684    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
685}
686#[doc = "`reset()` method sets GPIO_CFGCTL12 to value 0x0003_0023"]
687impl crate::Resettable for GPIO_CFGCTL12_SPEC {
688    const RESET_VALUE: Self::Ux = 0x0003_0023;
689}