bl602_pac/glb/
gpio_cfgctl1.rs

1#[doc = "Register `GPIO_CFGCTL1` reader"]
2pub struct R(crate::R<GPIO_CFGCTL1_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<GPIO_CFGCTL1_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<GPIO_CFGCTL1_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<GPIO_CFGCTL1_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `GPIO_CFGCTL1` writer"]
17pub struct W(crate::W<GPIO_CFGCTL1_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<GPIO_CFGCTL1_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_CFGCTL1_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<GPIO_CFGCTL1_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `reg_gpio_2_ie` reader - Input enable for GPIO2."]
38pub type REG_GPIO_2_IE_R = crate::BitReader<GPIO2INPUT_ENABLED_A>;
39#[doc = "Input enable for GPIO2.\n\nValue on reset: 1"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum GPIO2INPUT_ENABLED_A {
42    #[doc = "0: `0`"]
43    DISABLED = 0,
44    #[doc = "1: `1`"]
45    ENABLED = 1,
46}
47impl From<GPIO2INPUT_ENABLED_A> for bool {
48    #[inline(always)]
49    fn from(variant: GPIO2INPUT_ENABLED_A) -> Self {
50        variant as u8 != 0
51    }
52}
53impl REG_GPIO_2_IE_R {
54    #[doc = "Get enumerated values variant"]
55    #[inline(always)]
56    pub fn variant(&self) -> GPIO2INPUT_ENABLED_A {
57        match self.bits {
58            false => GPIO2INPUT_ENABLED_A::DISABLED,
59            true => GPIO2INPUT_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 == GPIO2INPUT_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 == GPIO2INPUT_ENABLED_A::ENABLED
71    }
72}
73#[doc = "Field `reg_gpio_2_ie` writer - Input enable for GPIO2."]
74pub type REG_GPIO_2_IE_W<'a, const O: u8> =
75    crate::BitWriter<'a, u32, GPIO_CFGCTL1_SPEC, GPIO2INPUT_ENABLED_A, O>;
76impl<'a, const O: u8> REG_GPIO_2_IE_W<'a, O> {
77    #[doc = "`0`"]
78    #[inline(always)]
79    pub fn disabled(self) -> &'a mut W {
80        self.variant(GPIO2INPUT_ENABLED_A::DISABLED)
81    }
82    #[doc = "`1`"]
83    #[inline(always)]
84    pub fn enabled(self) -> &'a mut W {
85        self.variant(GPIO2INPUT_ENABLED_A::ENABLED)
86    }
87}
88#[doc = "Field `reg_gpio_2_smt` reader - Schmitt trigger enabled for GPIO2."]
89pub type REG_GPIO_2_SMT_R = crate::BitReader<GPIO2SCHMITT_A>;
90#[doc = "Schmitt trigger enabled for GPIO2.\n\nValue on reset: 1"]
91#[derive(Clone, Copy, Debug, PartialEq, Eq)]
92pub enum GPIO2SCHMITT_A {
93    #[doc = "0: `0`"]
94    DISABLED = 0,
95    #[doc = "1: `1`"]
96    ENABLED = 1,
97}
98impl From<GPIO2SCHMITT_A> for bool {
99    #[inline(always)]
100    fn from(variant: GPIO2SCHMITT_A) -> Self {
101        variant as u8 != 0
102    }
103}
104impl REG_GPIO_2_SMT_R {
105    #[doc = "Get enumerated values variant"]
106    #[inline(always)]
107    pub fn variant(&self) -> GPIO2SCHMITT_A {
108        match self.bits {
109            false => GPIO2SCHMITT_A::DISABLED,
110            true => GPIO2SCHMITT_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 == GPIO2SCHMITT_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 == GPIO2SCHMITT_A::ENABLED
122    }
123}
124#[doc = "Field `reg_gpio_2_smt` writer - Schmitt trigger enabled for GPIO2."]
125pub type REG_GPIO_2_SMT_W<'a, const O: u8> =
126    crate::BitWriter<'a, u32, GPIO_CFGCTL1_SPEC, GPIO2SCHMITT_A, O>;
127impl<'a, const O: u8> REG_GPIO_2_SMT_W<'a, O> {
128    #[doc = "`0`"]
129    #[inline(always)]
130    pub fn disabled(self) -> &'a mut W {
131        self.variant(GPIO2SCHMITT_A::DISABLED)
132    }
133    #[doc = "`1`"]
134    #[inline(always)]
135    pub fn enabled(self) -> &'a mut W {
136        self.variant(GPIO2SCHMITT_A::ENABLED)
137    }
138}
139#[doc = "Field `reg_gpio_2_drv` reader - Driving control enabled for GPIO2."]
140pub type REG_GPIO_2_DRV_R = crate::FieldReader<u8, GPIO2DRIVING_A>;
141#[doc = "Driving control enabled for GPIO2.\n\nValue on reset: 0"]
142#[derive(Clone, Copy, Debug, PartialEq, Eq)]
143#[repr(u8)]
144pub enum GPIO2DRIVING_A {
145    #[doc = "0: `0`"]
146    DISABLED = 0,
147    #[doc = "1: `1`"]
148    ENABLED = 1,
149}
150impl From<GPIO2DRIVING_A> for u8 {
151    #[inline(always)]
152    fn from(variant: GPIO2DRIVING_A) -> Self {
153        variant as _
154    }
155}
156impl REG_GPIO_2_DRV_R {
157    #[doc = "Get enumerated values variant"]
158    #[inline(always)]
159    pub fn variant(&self) -> Option<GPIO2DRIVING_A> {
160        match self.bits {
161            0 => Some(GPIO2DRIVING_A::DISABLED),
162            1 => Some(GPIO2DRIVING_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 == GPIO2DRIVING_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 == GPIO2DRIVING_A::ENABLED
175    }
176}
177#[doc = "Field `reg_gpio_2_drv` writer - Driving control enabled for GPIO2."]
178pub type REG_GPIO_2_DRV_W<'a, const O: u8> =
179    crate::FieldWriter<'a, u32, GPIO_CFGCTL1_SPEC, u8, GPIO2DRIVING_A, 2, O>;
180impl<'a, const O: u8> REG_GPIO_2_DRV_W<'a, O> {
181    #[doc = "`0`"]
182    #[inline(always)]
183    pub fn disabled(self) -> &'a mut W {
184        self.variant(GPIO2DRIVING_A::DISABLED)
185    }
186    #[doc = "`1`"]
187    #[inline(always)]
188    pub fn enabled(self) -> &'a mut W {
189        self.variant(GPIO2DRIVING_A::ENABLED)
190    }
191}
192#[doc = "Field `reg_gpio_2_pu` reader - Pull Up Resistor for GPIO2."]
193pub type REG_GPIO_2_PU_R = crate::BitReader<GPIO2PULL_UP_RESISTOR_A>;
194#[doc = "Pull Up Resistor for GPIO2.\n\nValue on reset: 0"]
195#[derive(Clone, Copy, Debug, PartialEq, Eq)]
196pub enum GPIO2PULL_UP_RESISTOR_A {
197    #[doc = "0: `0`"]
198    DISABLED = 0,
199    #[doc = "1: `1`"]
200    ENABLED = 1,
201}
202impl From<GPIO2PULL_UP_RESISTOR_A> for bool {
203    #[inline(always)]
204    fn from(variant: GPIO2PULL_UP_RESISTOR_A) -> Self {
205        variant as u8 != 0
206    }
207}
208impl REG_GPIO_2_PU_R {
209    #[doc = "Get enumerated values variant"]
210    #[inline(always)]
211    pub fn variant(&self) -> GPIO2PULL_UP_RESISTOR_A {
212        match self.bits {
213            false => GPIO2PULL_UP_RESISTOR_A::DISABLED,
214            true => GPIO2PULL_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 == GPIO2PULL_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 == GPIO2PULL_UP_RESISTOR_A::ENABLED
226    }
227}
228#[doc = "Field `reg_gpio_2_pu` writer - Pull Up Resistor for GPIO2."]
229pub type REG_GPIO_2_PU_W<'a, const O: u8> =
230    crate::BitWriter<'a, u32, GPIO_CFGCTL1_SPEC, GPIO2PULL_UP_RESISTOR_A, O>;
231impl<'a, const O: u8> REG_GPIO_2_PU_W<'a, O> {
232    #[doc = "`0`"]
233    #[inline(always)]
234    pub fn disabled(self) -> &'a mut W {
235        self.variant(GPIO2PULL_UP_RESISTOR_A::DISABLED)
236    }
237    #[doc = "`1`"]
238    #[inline(always)]
239    pub fn enabled(self) -> &'a mut W {
240        self.variant(GPIO2PULL_UP_RESISTOR_A::ENABLED)
241    }
242}
243#[doc = "Field `reg_gpio_2_pd` reader - Pull Down Resistor for GPIO2."]
244pub type REG_GPIO_2_PD_R = crate::BitReader<GPIO2PULL_DOWN_RESISTOR_A>;
245#[doc = "Pull Down Resistor for GPIO2.\n\nValue on reset: 0"]
246#[derive(Clone, Copy, Debug, PartialEq, Eq)]
247pub enum GPIO2PULL_DOWN_RESISTOR_A {
248    #[doc = "0: `0`"]
249    DISABLED = 0,
250    #[doc = "1: `1`"]
251    ENABLED = 1,
252}
253impl From<GPIO2PULL_DOWN_RESISTOR_A> for bool {
254    #[inline(always)]
255    fn from(variant: GPIO2PULL_DOWN_RESISTOR_A) -> Self {
256        variant as u8 != 0
257    }
258}
259impl REG_GPIO_2_PD_R {
260    #[doc = "Get enumerated values variant"]
261    #[inline(always)]
262    pub fn variant(&self) -> GPIO2PULL_DOWN_RESISTOR_A {
263        match self.bits {
264            false => GPIO2PULL_DOWN_RESISTOR_A::DISABLED,
265            true => GPIO2PULL_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 == GPIO2PULL_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 == GPIO2PULL_DOWN_RESISTOR_A::ENABLED
277    }
278}
279#[doc = "Field `reg_gpio_2_pd` writer - Pull Down Resistor for GPIO2."]
280pub type REG_GPIO_2_PD_W<'a, const O: u8> =
281    crate::BitWriter<'a, u32, GPIO_CFGCTL1_SPEC, GPIO2PULL_DOWN_RESISTOR_A, O>;
282impl<'a, const O: u8> REG_GPIO_2_PD_W<'a, O> {
283    #[doc = "`0`"]
284    #[inline(always)]
285    pub fn disabled(self) -> &'a mut W {
286        self.variant(GPIO2PULL_DOWN_RESISTOR_A::DISABLED)
287    }
288    #[doc = "`1`"]
289    #[inline(always)]
290    pub fn enabled(self) -> &'a mut W {
291        self.variant(GPIO2PULL_DOWN_RESISTOR_A::ENABLED)
292    }
293}
294#[doc = "Field `reg_gpio_2_func_sel` reader - Function select for GPIO2."]
295pub type REG_GPIO_2_FUNC_SEL_R = crate::FieldReader<u8, GPIO2FUNCTION_SELECT_A>;
296#[doc = "Function select for GPIO2.\n\nValue on reset: 1"]
297#[derive(Clone, Copy, Debug, PartialEq, Eq)]
298#[repr(u8)]
299pub enum GPIO2FUNCTION_SELECT_A {
300    #[doc = "1: `1`"]
301    SDIO_DAT0 = 1,
302    #[doc = "2: `10`"]
303    SF_D3 = 2,
304    #[doc = "4: `100`"]
305    SPI_SS = 4,
306    #[doc = "6: `110`"]
307    I2C_SCL = 6,
308    #[doc = "7: `111`"]
309    UART_SIG2 = 7,
310    #[doc = "8: `1000`"]
311    PWM_CH2 = 8,
312    #[doc = "9: `1001`"]
313    FEM_GPIO_2 = 9,
314    #[doc = "10: `1010`"]
315    ATEST_QN = 10,
316    #[doc = "11: `1011`"]
317    SWGPIO_2 = 11,
318    #[doc = "14: `1110`"]
319    E21_TCK = 14,
320}
321impl From<GPIO2FUNCTION_SELECT_A> for u8 {
322    #[inline(always)]
323    fn from(variant: GPIO2FUNCTION_SELECT_A) -> Self {
324        variant as _
325    }
326}
327impl REG_GPIO_2_FUNC_SEL_R {
328    #[doc = "Get enumerated values variant"]
329    #[inline(always)]
330    pub fn variant(&self) -> Option<GPIO2FUNCTION_SELECT_A> {
331        match self.bits {
332            1 => Some(GPIO2FUNCTION_SELECT_A::SDIO_DAT0),
333            2 => Some(GPIO2FUNCTION_SELECT_A::SF_D3),
334            4 => Some(GPIO2FUNCTION_SELECT_A::SPI_SS),
335            6 => Some(GPIO2FUNCTION_SELECT_A::I2C_SCL),
336            7 => Some(GPIO2FUNCTION_SELECT_A::UART_SIG2),
337            8 => Some(GPIO2FUNCTION_SELECT_A::PWM_CH2),
338            9 => Some(GPIO2FUNCTION_SELECT_A::FEM_GPIO_2),
339            10 => Some(GPIO2FUNCTION_SELECT_A::ATEST_QN),
340            11 => Some(GPIO2FUNCTION_SELECT_A::SWGPIO_2),
341            14 => Some(GPIO2FUNCTION_SELECT_A::E21_TCK),
342            _ => None,
343        }
344    }
345    #[doc = "Checks if the value of the field is `SDIO_DAT0`"]
346    #[inline(always)]
347    pub fn is_sdio_dat0(&self) -> bool {
348        *self == GPIO2FUNCTION_SELECT_A::SDIO_DAT0
349    }
350    #[doc = "Checks if the value of the field is `SF_D3`"]
351    #[inline(always)]
352    pub fn is_sf_d3(&self) -> bool {
353        *self == GPIO2FUNCTION_SELECT_A::SF_D3
354    }
355    #[doc = "Checks if the value of the field is `SPI_SS`"]
356    #[inline(always)]
357    pub fn is_spi_ss(&self) -> bool {
358        *self == GPIO2FUNCTION_SELECT_A::SPI_SS
359    }
360    #[doc = "Checks if the value of the field is `I2C_SCL`"]
361    #[inline(always)]
362    pub fn is_i2c_scl(&self) -> bool {
363        *self == GPIO2FUNCTION_SELECT_A::I2C_SCL
364    }
365    #[doc = "Checks if the value of the field is `UART_SIG2`"]
366    #[inline(always)]
367    pub fn is_uart_sig2(&self) -> bool {
368        *self == GPIO2FUNCTION_SELECT_A::UART_SIG2
369    }
370    #[doc = "Checks if the value of the field is `PWM_CH2`"]
371    #[inline(always)]
372    pub fn is_pwm_ch2(&self) -> bool {
373        *self == GPIO2FUNCTION_SELECT_A::PWM_CH2
374    }
375    #[doc = "Checks if the value of the field is `FEM_GPIO_2`"]
376    #[inline(always)]
377    pub fn is_fem_gpio_2(&self) -> bool {
378        *self == GPIO2FUNCTION_SELECT_A::FEM_GPIO_2
379    }
380    #[doc = "Checks if the value of the field is `ATEST_QN`"]
381    #[inline(always)]
382    pub fn is_atest_qn(&self) -> bool {
383        *self == GPIO2FUNCTION_SELECT_A::ATEST_QN
384    }
385    #[doc = "Checks if the value of the field is `SWGPIO_2`"]
386    #[inline(always)]
387    pub fn is_swgpio_2(&self) -> bool {
388        *self == GPIO2FUNCTION_SELECT_A::SWGPIO_2
389    }
390    #[doc = "Checks if the value of the field is `E21_TCK`"]
391    #[inline(always)]
392    pub fn is_e21_tck(&self) -> bool {
393        *self == GPIO2FUNCTION_SELECT_A::E21_TCK
394    }
395}
396#[doc = "Field `reg_gpio_2_func_sel` writer - Function select for GPIO2."]
397pub type REG_GPIO_2_FUNC_SEL_W<'a, const O: u8> =
398    crate::FieldWriter<'a, u32, GPIO_CFGCTL1_SPEC, u8, GPIO2FUNCTION_SELECT_A, 4, O>;
399impl<'a, const O: u8> REG_GPIO_2_FUNC_SEL_W<'a, O> {
400    #[doc = "`1`"]
401    #[inline(always)]
402    pub fn sdio_dat0(self) -> &'a mut W {
403        self.variant(GPIO2FUNCTION_SELECT_A::SDIO_DAT0)
404    }
405    #[doc = "`10`"]
406    #[inline(always)]
407    pub fn sf_d3(self) -> &'a mut W {
408        self.variant(GPIO2FUNCTION_SELECT_A::SF_D3)
409    }
410    #[doc = "`100`"]
411    #[inline(always)]
412    pub fn spi_ss(self) -> &'a mut W {
413        self.variant(GPIO2FUNCTION_SELECT_A::SPI_SS)
414    }
415    #[doc = "`110`"]
416    #[inline(always)]
417    pub fn i2c_scl(self) -> &'a mut W {
418        self.variant(GPIO2FUNCTION_SELECT_A::I2C_SCL)
419    }
420    #[doc = "`111`"]
421    #[inline(always)]
422    pub fn uart_sig2(self) -> &'a mut W {
423        self.variant(GPIO2FUNCTION_SELECT_A::UART_SIG2)
424    }
425    #[doc = "`1000`"]
426    #[inline(always)]
427    pub fn pwm_ch2(self) -> &'a mut W {
428        self.variant(GPIO2FUNCTION_SELECT_A::PWM_CH2)
429    }
430    #[doc = "`1001`"]
431    #[inline(always)]
432    pub fn fem_gpio_2(self) -> &'a mut W {
433        self.variant(GPIO2FUNCTION_SELECT_A::FEM_GPIO_2)
434    }
435    #[doc = "`1010`"]
436    #[inline(always)]
437    pub fn atest_qn(self) -> &'a mut W {
438        self.variant(GPIO2FUNCTION_SELECT_A::ATEST_QN)
439    }
440    #[doc = "`1011`"]
441    #[inline(always)]
442    pub fn swgpio_2(self) -> &'a mut W {
443        self.variant(GPIO2FUNCTION_SELECT_A::SWGPIO_2)
444    }
445    #[doc = "`1110`"]
446    #[inline(always)]
447    pub fn e21_tck(self) -> &'a mut W {
448        self.variant(GPIO2FUNCTION_SELECT_A::E21_TCK)
449    }
450}
451#[doc = "Field `real_gpio_2_func_sel` reader - "]
452pub type REAL_GPIO_2_FUNC_SEL_R = crate::FieldReader<u8, GPIO2REAL_FUNCTION_SELECT_A>;
453#[doc = "\n\nValue on reset: 1"]
454#[derive(Clone, Copy, Debug, PartialEq, Eq)]
455#[repr(u8)]
456pub enum GPIO2REAL_FUNCTION_SELECT_A {
457    #[doc = "0: Function select is reg_gpio_2_func_sel"]
458    GLB_GPIO_REAL_MODE_REG = 0,
459    #[doc = "1: `1`"]
460    GLB_GPIO_REAL_MODE_SDIO = 1,
461    #[doc = "12: `1100`"]
462    GLB_GPIO_REAL_MODE_RF = 12,
463    #[doc = "14: `1110`"]
464    GLB_GPIO_REAL_MODE_JTAG = 14,
465    #[doc = "15: `1111`"]
466    GLB_GPIO_REAL_MODE_CCI = 15,
467}
468impl From<GPIO2REAL_FUNCTION_SELECT_A> for u8 {
469    #[inline(always)]
470    fn from(variant: GPIO2REAL_FUNCTION_SELECT_A) -> Self {
471        variant as _
472    }
473}
474impl REAL_GPIO_2_FUNC_SEL_R {
475    #[doc = "Get enumerated values variant"]
476    #[inline(always)]
477    pub fn variant(&self) -> Option<GPIO2REAL_FUNCTION_SELECT_A> {
478        match self.bits {
479            0 => Some(GPIO2REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_REG),
480            1 => Some(GPIO2REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_SDIO),
481            12 => Some(GPIO2REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_RF),
482            14 => Some(GPIO2REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_JTAG),
483            15 => Some(GPIO2REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_CCI),
484            _ => None,
485        }
486    }
487    #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_REG`"]
488    #[inline(always)]
489    pub fn is_glb_gpio_real_mode_reg(&self) -> bool {
490        *self == GPIO2REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_REG
491    }
492    #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_SDIO`"]
493    #[inline(always)]
494    pub fn is_glb_gpio_real_mode_sdio(&self) -> bool {
495        *self == GPIO2REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_SDIO
496    }
497    #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_RF`"]
498    #[inline(always)]
499    pub fn is_glb_gpio_real_mode_rf(&self) -> bool {
500        *self == GPIO2REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_RF
501    }
502    #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_JTAG`"]
503    #[inline(always)]
504    pub fn is_glb_gpio_real_mode_jtag(&self) -> bool {
505        *self == GPIO2REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_JTAG
506    }
507    #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_CCI`"]
508    #[inline(always)]
509    pub fn is_glb_gpio_real_mode_cci(&self) -> bool {
510        *self == GPIO2REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_CCI
511    }
512}
513#[doc = "Field `reg_gpio_3_ie` reader - Input enable for GPIO3."]
514pub type REG_GPIO_3_IE_R = crate::BitReader<GPIO3INPUT_ENABLED_A>;
515#[doc = "Input enable for GPIO3.\n\nValue on reset: 1"]
516#[derive(Clone, Copy, Debug, PartialEq, Eq)]
517pub enum GPIO3INPUT_ENABLED_A {
518    #[doc = "0: `0`"]
519    DISABLED = 0,
520    #[doc = "1: `1`"]
521    ENABLED = 1,
522}
523impl From<GPIO3INPUT_ENABLED_A> for bool {
524    #[inline(always)]
525    fn from(variant: GPIO3INPUT_ENABLED_A) -> Self {
526        variant as u8 != 0
527    }
528}
529impl REG_GPIO_3_IE_R {
530    #[doc = "Get enumerated values variant"]
531    #[inline(always)]
532    pub fn variant(&self) -> GPIO3INPUT_ENABLED_A {
533        match self.bits {
534            false => GPIO3INPUT_ENABLED_A::DISABLED,
535            true => GPIO3INPUT_ENABLED_A::ENABLED,
536        }
537    }
538    #[doc = "Checks if the value of the field is `DISABLED`"]
539    #[inline(always)]
540    pub fn is_disabled(&self) -> bool {
541        *self == GPIO3INPUT_ENABLED_A::DISABLED
542    }
543    #[doc = "Checks if the value of the field is `ENABLED`"]
544    #[inline(always)]
545    pub fn is_enabled(&self) -> bool {
546        *self == GPIO3INPUT_ENABLED_A::ENABLED
547    }
548}
549#[doc = "Field `reg_gpio_3_ie` writer - Input enable for GPIO3."]
550pub type REG_GPIO_3_IE_W<'a, const O: u8> =
551    crate::BitWriter<'a, u32, GPIO_CFGCTL1_SPEC, GPIO3INPUT_ENABLED_A, O>;
552impl<'a, const O: u8> REG_GPIO_3_IE_W<'a, O> {
553    #[doc = "`0`"]
554    #[inline(always)]
555    pub fn disabled(self) -> &'a mut W {
556        self.variant(GPIO3INPUT_ENABLED_A::DISABLED)
557    }
558    #[doc = "`1`"]
559    #[inline(always)]
560    pub fn enabled(self) -> &'a mut W {
561        self.variant(GPIO3INPUT_ENABLED_A::ENABLED)
562    }
563}
564#[doc = "Field `reg_gpio_3_smt` reader - Schmitt trigger enabled for GPIO3."]
565pub type REG_GPIO_3_SMT_R = crate::BitReader<GPIO3SCHMITT_A>;
566#[doc = "Schmitt trigger enabled for GPIO3.\n\nValue on reset: 1"]
567#[derive(Clone, Copy, Debug, PartialEq, Eq)]
568pub enum GPIO3SCHMITT_A {
569    #[doc = "0: `0`"]
570    DISABLED = 0,
571    #[doc = "1: `1`"]
572    ENABLED = 1,
573}
574impl From<GPIO3SCHMITT_A> for bool {
575    #[inline(always)]
576    fn from(variant: GPIO3SCHMITT_A) -> Self {
577        variant as u8 != 0
578    }
579}
580impl REG_GPIO_3_SMT_R {
581    #[doc = "Get enumerated values variant"]
582    #[inline(always)]
583    pub fn variant(&self) -> GPIO3SCHMITT_A {
584        match self.bits {
585            false => GPIO3SCHMITT_A::DISABLED,
586            true => GPIO3SCHMITT_A::ENABLED,
587        }
588    }
589    #[doc = "Checks if the value of the field is `DISABLED`"]
590    #[inline(always)]
591    pub fn is_disabled(&self) -> bool {
592        *self == GPIO3SCHMITT_A::DISABLED
593    }
594    #[doc = "Checks if the value of the field is `ENABLED`"]
595    #[inline(always)]
596    pub fn is_enabled(&self) -> bool {
597        *self == GPIO3SCHMITT_A::ENABLED
598    }
599}
600#[doc = "Field `reg_gpio_3_smt` writer - Schmitt trigger enabled for GPIO3."]
601pub type REG_GPIO_3_SMT_W<'a, const O: u8> =
602    crate::BitWriter<'a, u32, GPIO_CFGCTL1_SPEC, GPIO3SCHMITT_A, O>;
603impl<'a, const O: u8> REG_GPIO_3_SMT_W<'a, O> {
604    #[doc = "`0`"]
605    #[inline(always)]
606    pub fn disabled(self) -> &'a mut W {
607        self.variant(GPIO3SCHMITT_A::DISABLED)
608    }
609    #[doc = "`1`"]
610    #[inline(always)]
611    pub fn enabled(self) -> &'a mut W {
612        self.variant(GPIO3SCHMITT_A::ENABLED)
613    }
614}
615#[doc = "Field `reg_gpio_3_drv` reader - Driving control enabled for GPIO3."]
616pub type REG_GPIO_3_DRV_R = crate::FieldReader<u8, GPIO3DRIVING_A>;
617#[doc = "Driving control enabled for GPIO3.\n\nValue on reset: 0"]
618#[derive(Clone, Copy, Debug, PartialEq, Eq)]
619#[repr(u8)]
620pub enum GPIO3DRIVING_A {
621    #[doc = "0: `0`"]
622    DISABLED = 0,
623    #[doc = "1: `1`"]
624    ENABLED = 1,
625}
626impl From<GPIO3DRIVING_A> for u8 {
627    #[inline(always)]
628    fn from(variant: GPIO3DRIVING_A) -> Self {
629        variant as _
630    }
631}
632impl REG_GPIO_3_DRV_R {
633    #[doc = "Get enumerated values variant"]
634    #[inline(always)]
635    pub fn variant(&self) -> Option<GPIO3DRIVING_A> {
636        match self.bits {
637            0 => Some(GPIO3DRIVING_A::DISABLED),
638            1 => Some(GPIO3DRIVING_A::ENABLED),
639            _ => None,
640        }
641    }
642    #[doc = "Checks if the value of the field is `DISABLED`"]
643    #[inline(always)]
644    pub fn is_disabled(&self) -> bool {
645        *self == GPIO3DRIVING_A::DISABLED
646    }
647    #[doc = "Checks if the value of the field is `ENABLED`"]
648    #[inline(always)]
649    pub fn is_enabled(&self) -> bool {
650        *self == GPIO3DRIVING_A::ENABLED
651    }
652}
653#[doc = "Field `reg_gpio_3_drv` writer - Driving control enabled for GPIO3."]
654pub type REG_GPIO_3_DRV_W<'a, const O: u8> =
655    crate::FieldWriter<'a, u32, GPIO_CFGCTL1_SPEC, u8, GPIO3DRIVING_A, 2, O>;
656impl<'a, const O: u8> REG_GPIO_3_DRV_W<'a, O> {
657    #[doc = "`0`"]
658    #[inline(always)]
659    pub fn disabled(self) -> &'a mut W {
660        self.variant(GPIO3DRIVING_A::DISABLED)
661    }
662    #[doc = "`1`"]
663    #[inline(always)]
664    pub fn enabled(self) -> &'a mut W {
665        self.variant(GPIO3DRIVING_A::ENABLED)
666    }
667}
668#[doc = "Field `reg_gpio_3_pu` reader - Pull Up Resistor for GPIO3."]
669pub type REG_GPIO_3_PU_R = crate::BitReader<GPIO3PULL_UP_RESISTOR_A>;
670#[doc = "Pull Up Resistor for GPIO3.\n\nValue on reset: 0"]
671#[derive(Clone, Copy, Debug, PartialEq, Eq)]
672pub enum GPIO3PULL_UP_RESISTOR_A {
673    #[doc = "0: `0`"]
674    DISABLED = 0,
675    #[doc = "1: `1`"]
676    ENABLED = 1,
677}
678impl From<GPIO3PULL_UP_RESISTOR_A> for bool {
679    #[inline(always)]
680    fn from(variant: GPIO3PULL_UP_RESISTOR_A) -> Self {
681        variant as u8 != 0
682    }
683}
684impl REG_GPIO_3_PU_R {
685    #[doc = "Get enumerated values variant"]
686    #[inline(always)]
687    pub fn variant(&self) -> GPIO3PULL_UP_RESISTOR_A {
688        match self.bits {
689            false => GPIO3PULL_UP_RESISTOR_A::DISABLED,
690            true => GPIO3PULL_UP_RESISTOR_A::ENABLED,
691        }
692    }
693    #[doc = "Checks if the value of the field is `DISABLED`"]
694    #[inline(always)]
695    pub fn is_disabled(&self) -> bool {
696        *self == GPIO3PULL_UP_RESISTOR_A::DISABLED
697    }
698    #[doc = "Checks if the value of the field is `ENABLED`"]
699    #[inline(always)]
700    pub fn is_enabled(&self) -> bool {
701        *self == GPIO3PULL_UP_RESISTOR_A::ENABLED
702    }
703}
704#[doc = "Field `reg_gpio_3_pu` writer - Pull Up Resistor for GPIO3."]
705pub type REG_GPIO_3_PU_W<'a, const O: u8> =
706    crate::BitWriter<'a, u32, GPIO_CFGCTL1_SPEC, GPIO3PULL_UP_RESISTOR_A, O>;
707impl<'a, const O: u8> REG_GPIO_3_PU_W<'a, O> {
708    #[doc = "`0`"]
709    #[inline(always)]
710    pub fn disabled(self) -> &'a mut W {
711        self.variant(GPIO3PULL_UP_RESISTOR_A::DISABLED)
712    }
713    #[doc = "`1`"]
714    #[inline(always)]
715    pub fn enabled(self) -> &'a mut W {
716        self.variant(GPIO3PULL_UP_RESISTOR_A::ENABLED)
717    }
718}
719#[doc = "Field `reg_gpio_3_pd` reader - Pull Down Resistor for GPIO3."]
720pub type REG_GPIO_3_PD_R = crate::BitReader<GPIO3PULL_DOWN_RESISTOR_A>;
721#[doc = "Pull Down Resistor for GPIO3.\n\nValue on reset: 0"]
722#[derive(Clone, Copy, Debug, PartialEq, Eq)]
723pub enum GPIO3PULL_DOWN_RESISTOR_A {
724    #[doc = "0: `0`"]
725    DISABLED = 0,
726    #[doc = "1: `1`"]
727    ENABLED = 1,
728}
729impl From<GPIO3PULL_DOWN_RESISTOR_A> for bool {
730    #[inline(always)]
731    fn from(variant: GPIO3PULL_DOWN_RESISTOR_A) -> Self {
732        variant as u8 != 0
733    }
734}
735impl REG_GPIO_3_PD_R {
736    #[doc = "Get enumerated values variant"]
737    #[inline(always)]
738    pub fn variant(&self) -> GPIO3PULL_DOWN_RESISTOR_A {
739        match self.bits {
740            false => GPIO3PULL_DOWN_RESISTOR_A::DISABLED,
741            true => GPIO3PULL_DOWN_RESISTOR_A::ENABLED,
742        }
743    }
744    #[doc = "Checks if the value of the field is `DISABLED`"]
745    #[inline(always)]
746    pub fn is_disabled(&self) -> bool {
747        *self == GPIO3PULL_DOWN_RESISTOR_A::DISABLED
748    }
749    #[doc = "Checks if the value of the field is `ENABLED`"]
750    #[inline(always)]
751    pub fn is_enabled(&self) -> bool {
752        *self == GPIO3PULL_DOWN_RESISTOR_A::ENABLED
753    }
754}
755#[doc = "Field `reg_gpio_3_pd` writer - Pull Down Resistor for GPIO3."]
756pub type REG_GPIO_3_PD_W<'a, const O: u8> =
757    crate::BitWriter<'a, u32, GPIO_CFGCTL1_SPEC, GPIO3PULL_DOWN_RESISTOR_A, O>;
758impl<'a, const O: u8> REG_GPIO_3_PD_W<'a, O> {
759    #[doc = "`0`"]
760    #[inline(always)]
761    pub fn disabled(self) -> &'a mut W {
762        self.variant(GPIO3PULL_DOWN_RESISTOR_A::DISABLED)
763    }
764    #[doc = "`1`"]
765    #[inline(always)]
766    pub fn enabled(self) -> &'a mut W {
767        self.variant(GPIO3PULL_DOWN_RESISTOR_A::ENABLED)
768    }
769}
770#[doc = "Field `reg_gpio_3_func_sel` reader - Function select for GPIO3."]
771pub type REG_GPIO_3_FUNC_SEL_R = crate::FieldReader<u8, GPIO3FUNCTION_SELECT_A>;
772#[doc = "Function select for GPIO3.\n\nValue on reset: 1"]
773#[derive(Clone, Copy, Debug, PartialEq, Eq)]
774#[repr(u8)]
775pub enum GPIO3FUNCTION_SELECT_A {
776    #[doc = "1: `1`"]
777    SDIO_DAT1 = 1,
778    #[doc = "4: `100`"]
779    SPI_SCLK = 4,
780    #[doc = "6: `110`"]
781    I2C_SDA = 6,
782    #[doc = "7: `111`"]
783    UART_SIG3 = 7,
784    #[doc = "8: `1000`"]
785    PWM_CH3 = 8,
786    #[doc = "9: `1001`"]
787    FEM_GPIO_3 = 9,
788    #[doc = "10: `1010`"]
789    ATEST_QP = 10,
790    #[doc = "11: `1011`"]
791    SWGPIO_3 = 11,
792    #[doc = "14: `1110`"]
793    E21_TDO = 14,
794}
795impl From<GPIO3FUNCTION_SELECT_A> for u8 {
796    #[inline(always)]
797    fn from(variant: GPIO3FUNCTION_SELECT_A) -> Self {
798        variant as _
799    }
800}
801impl REG_GPIO_3_FUNC_SEL_R {
802    #[doc = "Get enumerated values variant"]
803    #[inline(always)]
804    pub fn variant(&self) -> Option<GPIO3FUNCTION_SELECT_A> {
805        match self.bits {
806            1 => Some(GPIO3FUNCTION_SELECT_A::SDIO_DAT1),
807            4 => Some(GPIO3FUNCTION_SELECT_A::SPI_SCLK),
808            6 => Some(GPIO3FUNCTION_SELECT_A::I2C_SDA),
809            7 => Some(GPIO3FUNCTION_SELECT_A::UART_SIG3),
810            8 => Some(GPIO3FUNCTION_SELECT_A::PWM_CH3),
811            9 => Some(GPIO3FUNCTION_SELECT_A::FEM_GPIO_3),
812            10 => Some(GPIO3FUNCTION_SELECT_A::ATEST_QP),
813            11 => Some(GPIO3FUNCTION_SELECT_A::SWGPIO_3),
814            14 => Some(GPIO3FUNCTION_SELECT_A::E21_TDO),
815            _ => None,
816        }
817    }
818    #[doc = "Checks if the value of the field is `SDIO_DAT1`"]
819    #[inline(always)]
820    pub fn is_sdio_dat1(&self) -> bool {
821        *self == GPIO3FUNCTION_SELECT_A::SDIO_DAT1
822    }
823    #[doc = "Checks if the value of the field is `SPI_SCLK`"]
824    #[inline(always)]
825    pub fn is_spi_sclk(&self) -> bool {
826        *self == GPIO3FUNCTION_SELECT_A::SPI_SCLK
827    }
828    #[doc = "Checks if the value of the field is `I2C_SDA`"]
829    #[inline(always)]
830    pub fn is_i2c_sda(&self) -> bool {
831        *self == GPIO3FUNCTION_SELECT_A::I2C_SDA
832    }
833    #[doc = "Checks if the value of the field is `UART_SIG3`"]
834    #[inline(always)]
835    pub fn is_uart_sig3(&self) -> bool {
836        *self == GPIO3FUNCTION_SELECT_A::UART_SIG3
837    }
838    #[doc = "Checks if the value of the field is `PWM_CH3`"]
839    #[inline(always)]
840    pub fn is_pwm_ch3(&self) -> bool {
841        *self == GPIO3FUNCTION_SELECT_A::PWM_CH3
842    }
843    #[doc = "Checks if the value of the field is `FEM_GPIO_3`"]
844    #[inline(always)]
845    pub fn is_fem_gpio_3(&self) -> bool {
846        *self == GPIO3FUNCTION_SELECT_A::FEM_GPIO_3
847    }
848    #[doc = "Checks if the value of the field is `ATEST_QP`"]
849    #[inline(always)]
850    pub fn is_atest_qp(&self) -> bool {
851        *self == GPIO3FUNCTION_SELECT_A::ATEST_QP
852    }
853    #[doc = "Checks if the value of the field is `SWGPIO_3`"]
854    #[inline(always)]
855    pub fn is_swgpio_3(&self) -> bool {
856        *self == GPIO3FUNCTION_SELECT_A::SWGPIO_3
857    }
858    #[doc = "Checks if the value of the field is `E21_TDO`"]
859    #[inline(always)]
860    pub fn is_e21_tdo(&self) -> bool {
861        *self == GPIO3FUNCTION_SELECT_A::E21_TDO
862    }
863}
864#[doc = "Field `reg_gpio_3_func_sel` writer - Function select for GPIO3."]
865pub type REG_GPIO_3_FUNC_SEL_W<'a, const O: u8> =
866    crate::FieldWriter<'a, u32, GPIO_CFGCTL1_SPEC, u8, GPIO3FUNCTION_SELECT_A, 4, O>;
867impl<'a, const O: u8> REG_GPIO_3_FUNC_SEL_W<'a, O> {
868    #[doc = "`1`"]
869    #[inline(always)]
870    pub fn sdio_dat1(self) -> &'a mut W {
871        self.variant(GPIO3FUNCTION_SELECT_A::SDIO_DAT1)
872    }
873    #[doc = "`100`"]
874    #[inline(always)]
875    pub fn spi_sclk(self) -> &'a mut W {
876        self.variant(GPIO3FUNCTION_SELECT_A::SPI_SCLK)
877    }
878    #[doc = "`110`"]
879    #[inline(always)]
880    pub fn i2c_sda(self) -> &'a mut W {
881        self.variant(GPIO3FUNCTION_SELECT_A::I2C_SDA)
882    }
883    #[doc = "`111`"]
884    #[inline(always)]
885    pub fn uart_sig3(self) -> &'a mut W {
886        self.variant(GPIO3FUNCTION_SELECT_A::UART_SIG3)
887    }
888    #[doc = "`1000`"]
889    #[inline(always)]
890    pub fn pwm_ch3(self) -> &'a mut W {
891        self.variant(GPIO3FUNCTION_SELECT_A::PWM_CH3)
892    }
893    #[doc = "`1001`"]
894    #[inline(always)]
895    pub fn fem_gpio_3(self) -> &'a mut W {
896        self.variant(GPIO3FUNCTION_SELECT_A::FEM_GPIO_3)
897    }
898    #[doc = "`1010`"]
899    #[inline(always)]
900    pub fn atest_qp(self) -> &'a mut W {
901        self.variant(GPIO3FUNCTION_SELECT_A::ATEST_QP)
902    }
903    #[doc = "`1011`"]
904    #[inline(always)]
905    pub fn swgpio_3(self) -> &'a mut W {
906        self.variant(GPIO3FUNCTION_SELECT_A::SWGPIO_3)
907    }
908    #[doc = "`1110`"]
909    #[inline(always)]
910    pub fn e21_tdo(self) -> &'a mut W {
911        self.variant(GPIO3FUNCTION_SELECT_A::E21_TDO)
912    }
913}
914#[doc = "Field `real_gpio_3_func_sel` reader - "]
915pub type REAL_GPIO_3_FUNC_SEL_R = crate::FieldReader<u8, GPIO3REAL_FUNCTION_SELECT_A>;
916#[doc = "\n\nValue on reset: 1"]
917#[derive(Clone, Copy, Debug, PartialEq, Eq)]
918#[repr(u8)]
919pub enum GPIO3REAL_FUNCTION_SELECT_A {
920    #[doc = "0: Function select is reg_gpio_3_func_sel"]
921    GLB_GPIO_REAL_MODE_REG = 0,
922    #[doc = "1: `1`"]
923    GLB_GPIO_REAL_MODE_SDIO = 1,
924    #[doc = "12: `1100`"]
925    GLB_GPIO_REAL_MODE_RF = 12,
926    #[doc = "14: `1110`"]
927    GLB_GPIO_REAL_MODE_JTAG = 14,
928    #[doc = "15: `1111`"]
929    GLB_GPIO_REAL_MODE_CCI = 15,
930}
931impl From<GPIO3REAL_FUNCTION_SELECT_A> for u8 {
932    #[inline(always)]
933    fn from(variant: GPIO3REAL_FUNCTION_SELECT_A) -> Self {
934        variant as _
935    }
936}
937impl REAL_GPIO_3_FUNC_SEL_R {
938    #[doc = "Get enumerated values variant"]
939    #[inline(always)]
940    pub fn variant(&self) -> Option<GPIO3REAL_FUNCTION_SELECT_A> {
941        match self.bits {
942            0 => Some(GPIO3REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_REG),
943            1 => Some(GPIO3REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_SDIO),
944            12 => Some(GPIO3REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_RF),
945            14 => Some(GPIO3REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_JTAG),
946            15 => Some(GPIO3REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_CCI),
947            _ => None,
948        }
949    }
950    #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_REG`"]
951    #[inline(always)]
952    pub fn is_glb_gpio_real_mode_reg(&self) -> bool {
953        *self == GPIO3REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_REG
954    }
955    #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_SDIO`"]
956    #[inline(always)]
957    pub fn is_glb_gpio_real_mode_sdio(&self) -> bool {
958        *self == GPIO3REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_SDIO
959    }
960    #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_RF`"]
961    #[inline(always)]
962    pub fn is_glb_gpio_real_mode_rf(&self) -> bool {
963        *self == GPIO3REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_RF
964    }
965    #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_JTAG`"]
966    #[inline(always)]
967    pub fn is_glb_gpio_real_mode_jtag(&self) -> bool {
968        *self == GPIO3REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_JTAG
969    }
970    #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_CCI`"]
971    #[inline(always)]
972    pub fn is_glb_gpio_real_mode_cci(&self) -> bool {
973        *self == GPIO3REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_CCI
974    }
975}
976impl R {
977    #[doc = "Bit 0 - Input enable for GPIO2."]
978    #[inline(always)]
979    pub fn reg_gpio_2_ie(&self) -> REG_GPIO_2_IE_R {
980        REG_GPIO_2_IE_R::new((self.bits & 1) != 0)
981    }
982    #[doc = "Bit 1 - Schmitt trigger enabled for GPIO2."]
983    #[inline(always)]
984    pub fn reg_gpio_2_smt(&self) -> REG_GPIO_2_SMT_R {
985        REG_GPIO_2_SMT_R::new(((self.bits >> 1) & 1) != 0)
986    }
987    #[doc = "Bits 2:3 - Driving control enabled for GPIO2."]
988    #[inline(always)]
989    pub fn reg_gpio_2_drv(&self) -> REG_GPIO_2_DRV_R {
990        REG_GPIO_2_DRV_R::new(((self.bits >> 2) & 3) as u8)
991    }
992    #[doc = "Bit 4 - Pull Up Resistor for GPIO2."]
993    #[inline(always)]
994    pub fn reg_gpio_2_pu(&self) -> REG_GPIO_2_PU_R {
995        REG_GPIO_2_PU_R::new(((self.bits >> 4) & 1) != 0)
996    }
997    #[doc = "Bit 5 - Pull Down Resistor for GPIO2."]
998    #[inline(always)]
999    pub fn reg_gpio_2_pd(&self) -> REG_GPIO_2_PD_R {
1000        REG_GPIO_2_PD_R::new(((self.bits >> 5) & 1) != 0)
1001    }
1002    #[doc = "Bits 8:11 - Function select for GPIO2."]
1003    #[inline(always)]
1004    pub fn reg_gpio_2_func_sel(&self) -> REG_GPIO_2_FUNC_SEL_R {
1005        REG_GPIO_2_FUNC_SEL_R::new(((self.bits >> 8) & 0x0f) as u8)
1006    }
1007    #[doc = "Bits 12:15"]
1008    #[inline(always)]
1009    pub fn real_gpio_2_func_sel(&self) -> REAL_GPIO_2_FUNC_SEL_R {
1010        REAL_GPIO_2_FUNC_SEL_R::new(((self.bits >> 12) & 0x0f) as u8)
1011    }
1012    #[doc = "Bit 16 - Input enable for GPIO3."]
1013    #[inline(always)]
1014    pub fn reg_gpio_3_ie(&self) -> REG_GPIO_3_IE_R {
1015        REG_GPIO_3_IE_R::new(((self.bits >> 16) & 1) != 0)
1016    }
1017    #[doc = "Bit 17 - Schmitt trigger enabled for GPIO3."]
1018    #[inline(always)]
1019    pub fn reg_gpio_3_smt(&self) -> REG_GPIO_3_SMT_R {
1020        REG_GPIO_3_SMT_R::new(((self.bits >> 17) & 1) != 0)
1021    }
1022    #[doc = "Bits 18:19 - Driving control enabled for GPIO3."]
1023    #[inline(always)]
1024    pub fn reg_gpio_3_drv(&self) -> REG_GPIO_3_DRV_R {
1025        REG_GPIO_3_DRV_R::new(((self.bits >> 18) & 3) as u8)
1026    }
1027    #[doc = "Bit 20 - Pull Up Resistor for GPIO3."]
1028    #[inline(always)]
1029    pub fn reg_gpio_3_pu(&self) -> REG_GPIO_3_PU_R {
1030        REG_GPIO_3_PU_R::new(((self.bits >> 20) & 1) != 0)
1031    }
1032    #[doc = "Bit 21 - Pull Down Resistor for GPIO3."]
1033    #[inline(always)]
1034    pub fn reg_gpio_3_pd(&self) -> REG_GPIO_3_PD_R {
1035        REG_GPIO_3_PD_R::new(((self.bits >> 21) & 1) != 0)
1036    }
1037    #[doc = "Bits 24:27 - Function select for GPIO3."]
1038    #[inline(always)]
1039    pub fn reg_gpio_3_func_sel(&self) -> REG_GPIO_3_FUNC_SEL_R {
1040        REG_GPIO_3_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8)
1041    }
1042    #[doc = "Bits 28:31"]
1043    #[inline(always)]
1044    pub fn real_gpio_3_func_sel(&self) -> REAL_GPIO_3_FUNC_SEL_R {
1045        REAL_GPIO_3_FUNC_SEL_R::new(((self.bits >> 28) & 0x0f) as u8)
1046    }
1047}
1048impl W {
1049    #[doc = "Bit 0 - Input enable for GPIO2."]
1050    #[inline(always)]
1051    #[must_use]
1052    pub fn reg_gpio_2_ie(&mut self) -> REG_GPIO_2_IE_W<0> {
1053        REG_GPIO_2_IE_W::new(self)
1054    }
1055    #[doc = "Bit 1 - Schmitt trigger enabled for GPIO2."]
1056    #[inline(always)]
1057    #[must_use]
1058    pub fn reg_gpio_2_smt(&mut self) -> REG_GPIO_2_SMT_W<1> {
1059        REG_GPIO_2_SMT_W::new(self)
1060    }
1061    #[doc = "Bits 2:3 - Driving control enabled for GPIO2."]
1062    #[inline(always)]
1063    #[must_use]
1064    pub fn reg_gpio_2_drv(&mut self) -> REG_GPIO_2_DRV_W<2> {
1065        REG_GPIO_2_DRV_W::new(self)
1066    }
1067    #[doc = "Bit 4 - Pull Up Resistor for GPIO2."]
1068    #[inline(always)]
1069    #[must_use]
1070    pub fn reg_gpio_2_pu(&mut self) -> REG_GPIO_2_PU_W<4> {
1071        REG_GPIO_2_PU_W::new(self)
1072    }
1073    #[doc = "Bit 5 - Pull Down Resistor for GPIO2."]
1074    #[inline(always)]
1075    #[must_use]
1076    pub fn reg_gpio_2_pd(&mut self) -> REG_GPIO_2_PD_W<5> {
1077        REG_GPIO_2_PD_W::new(self)
1078    }
1079    #[doc = "Bits 8:11 - Function select for GPIO2."]
1080    #[inline(always)]
1081    #[must_use]
1082    pub fn reg_gpio_2_func_sel(&mut self) -> REG_GPIO_2_FUNC_SEL_W<8> {
1083        REG_GPIO_2_FUNC_SEL_W::new(self)
1084    }
1085    #[doc = "Bit 16 - Input enable for GPIO3."]
1086    #[inline(always)]
1087    #[must_use]
1088    pub fn reg_gpio_3_ie(&mut self) -> REG_GPIO_3_IE_W<16> {
1089        REG_GPIO_3_IE_W::new(self)
1090    }
1091    #[doc = "Bit 17 - Schmitt trigger enabled for GPIO3."]
1092    #[inline(always)]
1093    #[must_use]
1094    pub fn reg_gpio_3_smt(&mut self) -> REG_GPIO_3_SMT_W<17> {
1095        REG_GPIO_3_SMT_W::new(self)
1096    }
1097    #[doc = "Bits 18:19 - Driving control enabled for GPIO3."]
1098    #[inline(always)]
1099    #[must_use]
1100    pub fn reg_gpio_3_drv(&mut self) -> REG_GPIO_3_DRV_W<18> {
1101        REG_GPIO_3_DRV_W::new(self)
1102    }
1103    #[doc = "Bit 20 - Pull Up Resistor for GPIO3."]
1104    #[inline(always)]
1105    #[must_use]
1106    pub fn reg_gpio_3_pu(&mut self) -> REG_GPIO_3_PU_W<20> {
1107        REG_GPIO_3_PU_W::new(self)
1108    }
1109    #[doc = "Bit 21 - Pull Down Resistor for GPIO3."]
1110    #[inline(always)]
1111    #[must_use]
1112    pub fn reg_gpio_3_pd(&mut self) -> REG_GPIO_3_PD_W<21> {
1113        REG_GPIO_3_PD_W::new(self)
1114    }
1115    #[doc = "Bits 24:27 - Function select for GPIO3."]
1116    #[inline(always)]
1117    #[must_use]
1118    pub fn reg_gpio_3_func_sel(&mut self) -> REG_GPIO_3_FUNC_SEL_W<24> {
1119        REG_GPIO_3_FUNC_SEL_W::new(self)
1120    }
1121    #[doc = "Writes raw bits to the register."]
1122    #[inline(always)]
1123    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1124        self.0.bits(bits);
1125        self
1126    }
1127}
1128#[doc = "GPIO2, GPIO3 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_cfgctl1](index.html) module"]
1129pub struct GPIO_CFGCTL1_SPEC;
1130impl crate::RegisterSpec for GPIO_CFGCTL1_SPEC {
1131    type Ux = u32;
1132}
1133#[doc = "`read()` method returns [gpio_cfgctl1::R](R) reader structure"]
1134impl crate::Readable for GPIO_CFGCTL1_SPEC {
1135    type Reader = R;
1136}
1137#[doc = "`write(|w| ..)` method takes [gpio_cfgctl1::W](W) writer structure"]
1138impl crate::Writable for GPIO_CFGCTL1_SPEC {
1139    type Writer = W;
1140    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
1141    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
1142}
1143#[doc = "`reset()` method sets GPIO_CFGCTL1 to value 0x1103_1103"]
1144impl crate::Resettable for GPIO_CFGCTL1_SPEC {
1145    const RESET_VALUE: Self::Ux = 0x1103_1103;
1146}