bl602_pac/glb/
gpio_cfgctl2.rs

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