bl602_pac/glb/
gpio_cfgctl7.rs

1#[doc = "Register `GPIO_CFGCTL7` reader"]
2pub struct R(crate::R<GPIO_CFGCTL7_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<GPIO_CFGCTL7_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<GPIO_CFGCTL7_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<GPIO_CFGCTL7_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `GPIO_CFGCTL7` writer"]
17pub struct W(crate::W<GPIO_CFGCTL7_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<GPIO_CFGCTL7_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_CFGCTL7_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<GPIO_CFGCTL7_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `reg_gpio_14_ie` reader - Input enable for GPIO14."]
38pub type REG_GPIO_14_IE_R = crate::BitReader<GPIO14INPUT_ENABLED_A>;
39#[doc = "Input enable for GPIO14.\n\nValue on reset: 1"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum GPIO14INPUT_ENABLED_A {
42    #[doc = "0: `0`"]
43    DISABLED = 0,
44    #[doc = "1: `1`"]
45    ENABLED = 1,
46}
47impl From<GPIO14INPUT_ENABLED_A> for bool {
48    #[inline(always)]
49    fn from(variant: GPIO14INPUT_ENABLED_A) -> Self {
50        variant as u8 != 0
51    }
52}
53impl REG_GPIO_14_IE_R {
54    #[doc = "Get enumerated values variant"]
55    #[inline(always)]
56    pub fn variant(&self) -> GPIO14INPUT_ENABLED_A {
57        match self.bits {
58            false => GPIO14INPUT_ENABLED_A::DISABLED,
59            true => GPIO14INPUT_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 == GPIO14INPUT_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 == GPIO14INPUT_ENABLED_A::ENABLED
71    }
72}
73#[doc = "Field `reg_gpio_14_ie` writer - Input enable for GPIO14."]
74pub type REG_GPIO_14_IE_W<'a, const O: u8> =
75    crate::BitWriter<'a, u32, GPIO_CFGCTL7_SPEC, GPIO14INPUT_ENABLED_A, O>;
76impl<'a, const O: u8> REG_GPIO_14_IE_W<'a, O> {
77    #[doc = "`0`"]
78    #[inline(always)]
79    pub fn disabled(self) -> &'a mut W {
80        self.variant(GPIO14INPUT_ENABLED_A::DISABLED)
81    }
82    #[doc = "`1`"]
83    #[inline(always)]
84    pub fn enabled(self) -> &'a mut W {
85        self.variant(GPIO14INPUT_ENABLED_A::ENABLED)
86    }
87}
88#[doc = "Field `reg_gpio_14_smt` reader - Schmitt trigger enabled for GPIO14."]
89pub type REG_GPIO_14_SMT_R = crate::BitReader<GPIO14SCHMITT_A>;
90#[doc = "Schmitt trigger enabled for GPIO14.\n\nValue on reset: 1"]
91#[derive(Clone, Copy, Debug, PartialEq, Eq)]
92pub enum GPIO14SCHMITT_A {
93    #[doc = "0: `0`"]
94    DISABLED = 0,
95    #[doc = "1: `1`"]
96    ENABLED = 1,
97}
98impl From<GPIO14SCHMITT_A> for bool {
99    #[inline(always)]
100    fn from(variant: GPIO14SCHMITT_A) -> Self {
101        variant as u8 != 0
102    }
103}
104impl REG_GPIO_14_SMT_R {
105    #[doc = "Get enumerated values variant"]
106    #[inline(always)]
107    pub fn variant(&self) -> GPIO14SCHMITT_A {
108        match self.bits {
109            false => GPIO14SCHMITT_A::DISABLED,
110            true => GPIO14SCHMITT_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 == GPIO14SCHMITT_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 == GPIO14SCHMITT_A::ENABLED
122    }
123}
124#[doc = "Field `reg_gpio_14_smt` writer - Schmitt trigger enabled for GPIO14."]
125pub type REG_GPIO_14_SMT_W<'a, const O: u8> =
126    crate::BitWriter<'a, u32, GPIO_CFGCTL7_SPEC, GPIO14SCHMITT_A, O>;
127impl<'a, const O: u8> REG_GPIO_14_SMT_W<'a, O> {
128    #[doc = "`0`"]
129    #[inline(always)]
130    pub fn disabled(self) -> &'a mut W {
131        self.variant(GPIO14SCHMITT_A::DISABLED)
132    }
133    #[doc = "`1`"]
134    #[inline(always)]
135    pub fn enabled(self) -> &'a mut W {
136        self.variant(GPIO14SCHMITT_A::ENABLED)
137    }
138}
139#[doc = "Field `reg_gpio_14_drv` reader - Driving control enabled for GPIO14."]
140pub type REG_GPIO_14_DRV_R = crate::FieldReader<u8, GPIO14DRIVING_A>;
141#[doc = "Driving control enabled for GPIO14.\n\nValue on reset: 0"]
142#[derive(Clone, Copy, Debug, PartialEq, Eq)]
143#[repr(u8)]
144pub enum GPIO14DRIVING_A {
145    #[doc = "0: `0`"]
146    DISABLED = 0,
147    #[doc = "1: `1`"]
148    ENABLED = 1,
149}
150impl From<GPIO14DRIVING_A> for u8 {
151    #[inline(always)]
152    fn from(variant: GPIO14DRIVING_A) -> Self {
153        variant as _
154    }
155}
156impl REG_GPIO_14_DRV_R {
157    #[doc = "Get enumerated values variant"]
158    #[inline(always)]
159    pub fn variant(&self) -> Option<GPIO14DRIVING_A> {
160        match self.bits {
161            0 => Some(GPIO14DRIVING_A::DISABLED),
162            1 => Some(GPIO14DRIVING_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 == GPIO14DRIVING_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 == GPIO14DRIVING_A::ENABLED
175    }
176}
177#[doc = "Field `reg_gpio_14_drv` writer - Driving control enabled for GPIO14."]
178pub type REG_GPIO_14_DRV_W<'a, const O: u8> =
179    crate::FieldWriter<'a, u32, GPIO_CFGCTL7_SPEC, u8, GPIO14DRIVING_A, 2, O>;
180impl<'a, const O: u8> REG_GPIO_14_DRV_W<'a, O> {
181    #[doc = "`0`"]
182    #[inline(always)]
183    pub fn disabled(self) -> &'a mut W {
184        self.variant(GPIO14DRIVING_A::DISABLED)
185    }
186    #[doc = "`1`"]
187    #[inline(always)]
188    pub fn enabled(self) -> &'a mut W {
189        self.variant(GPIO14DRIVING_A::ENABLED)
190    }
191}
192#[doc = "Field `reg_gpio_14_pu` reader - Pull Up Resistor for GPIO14."]
193pub type REG_GPIO_14_PU_R = crate::BitReader<GPIO14PULL_UP_RESISTOR_A>;
194#[doc = "Pull Up Resistor for GPIO14.\n\nValue on reset: 0"]
195#[derive(Clone, Copy, Debug, PartialEq, Eq)]
196pub enum GPIO14PULL_UP_RESISTOR_A {
197    #[doc = "0: `0`"]
198    DISABLED = 0,
199    #[doc = "1: `1`"]
200    ENABLED = 1,
201}
202impl From<GPIO14PULL_UP_RESISTOR_A> for bool {
203    #[inline(always)]
204    fn from(variant: GPIO14PULL_UP_RESISTOR_A) -> Self {
205        variant as u8 != 0
206    }
207}
208impl REG_GPIO_14_PU_R {
209    #[doc = "Get enumerated values variant"]
210    #[inline(always)]
211    pub fn variant(&self) -> GPIO14PULL_UP_RESISTOR_A {
212        match self.bits {
213            false => GPIO14PULL_UP_RESISTOR_A::DISABLED,
214            true => GPIO14PULL_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 == GPIO14PULL_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 == GPIO14PULL_UP_RESISTOR_A::ENABLED
226    }
227}
228#[doc = "Field `reg_gpio_14_pu` writer - Pull Up Resistor for GPIO14."]
229pub type REG_GPIO_14_PU_W<'a, const O: u8> =
230    crate::BitWriter<'a, u32, GPIO_CFGCTL7_SPEC, GPIO14PULL_UP_RESISTOR_A, O>;
231impl<'a, const O: u8> REG_GPIO_14_PU_W<'a, O> {
232    #[doc = "`0`"]
233    #[inline(always)]
234    pub fn disabled(self) -> &'a mut W {
235        self.variant(GPIO14PULL_UP_RESISTOR_A::DISABLED)
236    }
237    #[doc = "`1`"]
238    #[inline(always)]
239    pub fn enabled(self) -> &'a mut W {
240        self.variant(GPIO14PULL_UP_RESISTOR_A::ENABLED)
241    }
242}
243#[doc = "Field `reg_gpio_14_pd` reader - Pull Down Resistor for GPIO14."]
244pub type REG_GPIO_14_PD_R = crate::BitReader<GPIO14PULL_DOWN_RESISTOR_A>;
245#[doc = "Pull Down Resistor for GPIO14.\n\nValue on reset: 0"]
246#[derive(Clone, Copy, Debug, PartialEq, Eq)]
247pub enum GPIO14PULL_DOWN_RESISTOR_A {
248    #[doc = "0: `0`"]
249    DISABLED = 0,
250    #[doc = "1: `1`"]
251    ENABLED = 1,
252}
253impl From<GPIO14PULL_DOWN_RESISTOR_A> for bool {
254    #[inline(always)]
255    fn from(variant: GPIO14PULL_DOWN_RESISTOR_A) -> Self {
256        variant as u8 != 0
257    }
258}
259impl REG_GPIO_14_PD_R {
260    #[doc = "Get enumerated values variant"]
261    #[inline(always)]
262    pub fn variant(&self) -> GPIO14PULL_DOWN_RESISTOR_A {
263        match self.bits {
264            false => GPIO14PULL_DOWN_RESISTOR_A::DISABLED,
265            true => GPIO14PULL_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 == GPIO14PULL_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 == GPIO14PULL_DOWN_RESISTOR_A::ENABLED
277    }
278}
279#[doc = "Field `reg_gpio_14_pd` writer - Pull Down Resistor for GPIO14."]
280pub type REG_GPIO_14_PD_W<'a, const O: u8> =
281    crate::BitWriter<'a, u32, GPIO_CFGCTL7_SPEC, GPIO14PULL_DOWN_RESISTOR_A, O>;
282impl<'a, const O: u8> REG_GPIO_14_PD_W<'a, O> {
283    #[doc = "`0`"]
284    #[inline(always)]
285    pub fn disabled(self) -> &'a mut W {
286        self.variant(GPIO14PULL_DOWN_RESISTOR_A::DISABLED)
287    }
288    #[doc = "`1`"]
289    #[inline(always)]
290    pub fn enabled(self) -> &'a mut W {
291        self.variant(GPIO14PULL_DOWN_RESISTOR_A::ENABLED)
292    }
293}
294#[doc = "Field `reg_gpio_14_func_sel` reader - Function select for GPIO14."]
295pub type REG_GPIO_14_FUNC_SEL_R = crate::FieldReader<u8, GPIO14FUNCTION_SELECT_A>;
296#[doc = "Function select for GPIO14.\n\nValue on reset: 14"]
297#[derive(Clone, Copy, Debug, PartialEq, Eq)]
298#[repr(u8)]
299pub enum GPIO14FUNCTION_SELECT_A {
300    #[doc = "4: `100`"]
301    SPI_SS = 4,
302    #[doc = "6: `110`"]
303    I2C_SCL = 6,
304    #[doc = "7: `111`"]
305    UART_SIG6 = 7,
306    #[doc = "8: `1000`"]
307    PWM_CH4 = 8,
308    #[doc = "9: `1001`"]
309    FEM_GPIO_2 = 9,
310    #[doc = "10: `1010`"]
311    GPIP_CH2 = 10,
312    #[doc = "11: `1011`"]
313    SWGPIO_14 = 11,
314    #[doc = "14: `1110`"]
315    E21_TCK = 14,
316}
317impl From<GPIO14FUNCTION_SELECT_A> for u8 {
318    #[inline(always)]
319    fn from(variant: GPIO14FUNCTION_SELECT_A) -> Self {
320        variant as _
321    }
322}
323impl REG_GPIO_14_FUNC_SEL_R {
324    #[doc = "Get enumerated values variant"]
325    #[inline(always)]
326    pub fn variant(&self) -> Option<GPIO14FUNCTION_SELECT_A> {
327        match self.bits {
328            4 => Some(GPIO14FUNCTION_SELECT_A::SPI_SS),
329            6 => Some(GPIO14FUNCTION_SELECT_A::I2C_SCL),
330            7 => Some(GPIO14FUNCTION_SELECT_A::UART_SIG6),
331            8 => Some(GPIO14FUNCTION_SELECT_A::PWM_CH4),
332            9 => Some(GPIO14FUNCTION_SELECT_A::FEM_GPIO_2),
333            10 => Some(GPIO14FUNCTION_SELECT_A::GPIP_CH2),
334            11 => Some(GPIO14FUNCTION_SELECT_A::SWGPIO_14),
335            14 => Some(GPIO14FUNCTION_SELECT_A::E21_TCK),
336            _ => None,
337        }
338    }
339    #[doc = "Checks if the value of the field is `SPI_SS`"]
340    #[inline(always)]
341    pub fn is_spi_ss(&self) -> bool {
342        *self == GPIO14FUNCTION_SELECT_A::SPI_SS
343    }
344    #[doc = "Checks if the value of the field is `I2C_SCL`"]
345    #[inline(always)]
346    pub fn is_i2c_scl(&self) -> bool {
347        *self == GPIO14FUNCTION_SELECT_A::I2C_SCL
348    }
349    #[doc = "Checks if the value of the field is `UART_SIG6`"]
350    #[inline(always)]
351    pub fn is_uart_sig6(&self) -> bool {
352        *self == GPIO14FUNCTION_SELECT_A::UART_SIG6
353    }
354    #[doc = "Checks if the value of the field is `PWM_CH4`"]
355    #[inline(always)]
356    pub fn is_pwm_ch4(&self) -> bool {
357        *self == GPIO14FUNCTION_SELECT_A::PWM_CH4
358    }
359    #[doc = "Checks if the value of the field is `FEM_GPIO_2`"]
360    #[inline(always)]
361    pub fn is_fem_gpio_2(&self) -> bool {
362        *self == GPIO14FUNCTION_SELECT_A::FEM_GPIO_2
363    }
364    #[doc = "Checks if the value of the field is `GPIP_CH2`"]
365    #[inline(always)]
366    pub fn is_gpip_ch2(&self) -> bool {
367        *self == GPIO14FUNCTION_SELECT_A::GPIP_CH2
368    }
369    #[doc = "Checks if the value of the field is `SWGPIO_14`"]
370    #[inline(always)]
371    pub fn is_swgpio_14(&self) -> bool {
372        *self == GPIO14FUNCTION_SELECT_A::SWGPIO_14
373    }
374    #[doc = "Checks if the value of the field is `E21_TCK`"]
375    #[inline(always)]
376    pub fn is_e21_tck(&self) -> bool {
377        *self == GPIO14FUNCTION_SELECT_A::E21_TCK
378    }
379}
380#[doc = "Field `reg_gpio_14_func_sel` writer - Function select for GPIO14."]
381pub type REG_GPIO_14_FUNC_SEL_W<'a, const O: u8> =
382    crate::FieldWriter<'a, u32, GPIO_CFGCTL7_SPEC, u8, GPIO14FUNCTION_SELECT_A, 4, O>;
383impl<'a, const O: u8> REG_GPIO_14_FUNC_SEL_W<'a, O> {
384    #[doc = "`100`"]
385    #[inline(always)]
386    pub fn spi_ss(self) -> &'a mut W {
387        self.variant(GPIO14FUNCTION_SELECT_A::SPI_SS)
388    }
389    #[doc = "`110`"]
390    #[inline(always)]
391    pub fn i2c_scl(self) -> &'a mut W {
392        self.variant(GPIO14FUNCTION_SELECT_A::I2C_SCL)
393    }
394    #[doc = "`111`"]
395    #[inline(always)]
396    pub fn uart_sig6(self) -> &'a mut W {
397        self.variant(GPIO14FUNCTION_SELECT_A::UART_SIG6)
398    }
399    #[doc = "`1000`"]
400    #[inline(always)]
401    pub fn pwm_ch4(self) -> &'a mut W {
402        self.variant(GPIO14FUNCTION_SELECT_A::PWM_CH4)
403    }
404    #[doc = "`1001`"]
405    #[inline(always)]
406    pub fn fem_gpio_2(self) -> &'a mut W {
407        self.variant(GPIO14FUNCTION_SELECT_A::FEM_GPIO_2)
408    }
409    #[doc = "`1010`"]
410    #[inline(always)]
411    pub fn gpip_ch2(self) -> &'a mut W {
412        self.variant(GPIO14FUNCTION_SELECT_A::GPIP_CH2)
413    }
414    #[doc = "`1011`"]
415    #[inline(always)]
416    pub fn swgpio_14(self) -> &'a mut W {
417        self.variant(GPIO14FUNCTION_SELECT_A::SWGPIO_14)
418    }
419    #[doc = "`1110`"]
420    #[inline(always)]
421    pub fn e21_tck(self) -> &'a mut W {
422        self.variant(GPIO14FUNCTION_SELECT_A::E21_TCK)
423    }
424}
425#[doc = "Field `reg_gpio_15_ie` reader - Input enable for GPIO15."]
426pub type REG_GPIO_15_IE_R = crate::BitReader<GPIO15INPUT_ENABLED_A>;
427#[doc = "Input enable for GPIO15.\n\nValue on reset: 1"]
428#[derive(Clone, Copy, Debug, PartialEq, Eq)]
429pub enum GPIO15INPUT_ENABLED_A {
430    #[doc = "0: `0`"]
431    DISABLED = 0,
432    #[doc = "1: `1`"]
433    ENABLED = 1,
434}
435impl From<GPIO15INPUT_ENABLED_A> for bool {
436    #[inline(always)]
437    fn from(variant: GPIO15INPUT_ENABLED_A) -> Self {
438        variant as u8 != 0
439    }
440}
441impl REG_GPIO_15_IE_R {
442    #[doc = "Get enumerated values variant"]
443    #[inline(always)]
444    pub fn variant(&self) -> GPIO15INPUT_ENABLED_A {
445        match self.bits {
446            false => GPIO15INPUT_ENABLED_A::DISABLED,
447            true => GPIO15INPUT_ENABLED_A::ENABLED,
448        }
449    }
450    #[doc = "Checks if the value of the field is `DISABLED`"]
451    #[inline(always)]
452    pub fn is_disabled(&self) -> bool {
453        *self == GPIO15INPUT_ENABLED_A::DISABLED
454    }
455    #[doc = "Checks if the value of the field is `ENABLED`"]
456    #[inline(always)]
457    pub fn is_enabled(&self) -> bool {
458        *self == GPIO15INPUT_ENABLED_A::ENABLED
459    }
460}
461#[doc = "Field `reg_gpio_15_ie` writer - Input enable for GPIO15."]
462pub type REG_GPIO_15_IE_W<'a, const O: u8> =
463    crate::BitWriter<'a, u32, GPIO_CFGCTL7_SPEC, GPIO15INPUT_ENABLED_A, O>;
464impl<'a, const O: u8> REG_GPIO_15_IE_W<'a, O> {
465    #[doc = "`0`"]
466    #[inline(always)]
467    pub fn disabled(self) -> &'a mut W {
468        self.variant(GPIO15INPUT_ENABLED_A::DISABLED)
469    }
470    #[doc = "`1`"]
471    #[inline(always)]
472    pub fn enabled(self) -> &'a mut W {
473        self.variant(GPIO15INPUT_ENABLED_A::ENABLED)
474    }
475}
476#[doc = "Field `reg_gpio_15_smt` reader - Schmitt trigger enabled for GPIO15."]
477pub type REG_GPIO_15_SMT_R = crate::BitReader<GPIO15SCHMITT_A>;
478#[doc = "Schmitt trigger enabled for GPIO15.\n\nValue on reset: 1"]
479#[derive(Clone, Copy, Debug, PartialEq, Eq)]
480pub enum GPIO15SCHMITT_A {
481    #[doc = "0: `0`"]
482    DISABLED = 0,
483    #[doc = "1: `1`"]
484    ENABLED = 1,
485}
486impl From<GPIO15SCHMITT_A> for bool {
487    #[inline(always)]
488    fn from(variant: GPIO15SCHMITT_A) -> Self {
489        variant as u8 != 0
490    }
491}
492impl REG_GPIO_15_SMT_R {
493    #[doc = "Get enumerated values variant"]
494    #[inline(always)]
495    pub fn variant(&self) -> GPIO15SCHMITT_A {
496        match self.bits {
497            false => GPIO15SCHMITT_A::DISABLED,
498            true => GPIO15SCHMITT_A::ENABLED,
499        }
500    }
501    #[doc = "Checks if the value of the field is `DISABLED`"]
502    #[inline(always)]
503    pub fn is_disabled(&self) -> bool {
504        *self == GPIO15SCHMITT_A::DISABLED
505    }
506    #[doc = "Checks if the value of the field is `ENABLED`"]
507    #[inline(always)]
508    pub fn is_enabled(&self) -> bool {
509        *self == GPIO15SCHMITT_A::ENABLED
510    }
511}
512#[doc = "Field `reg_gpio_15_smt` writer - Schmitt trigger enabled for GPIO15."]
513pub type REG_GPIO_15_SMT_W<'a, const O: u8> =
514    crate::BitWriter<'a, u32, GPIO_CFGCTL7_SPEC, GPIO15SCHMITT_A, O>;
515impl<'a, const O: u8> REG_GPIO_15_SMT_W<'a, O> {
516    #[doc = "`0`"]
517    #[inline(always)]
518    pub fn disabled(self) -> &'a mut W {
519        self.variant(GPIO15SCHMITT_A::DISABLED)
520    }
521    #[doc = "`1`"]
522    #[inline(always)]
523    pub fn enabled(self) -> &'a mut W {
524        self.variant(GPIO15SCHMITT_A::ENABLED)
525    }
526}
527#[doc = "Field `reg_gpio_15_drv` reader - Driving control enabled for GPIO15."]
528pub type REG_GPIO_15_DRV_R = crate::FieldReader<u8, GPIO15DRIVING_A>;
529#[doc = "Driving control enabled for GPIO15.\n\nValue on reset: 0"]
530#[derive(Clone, Copy, Debug, PartialEq, Eq)]
531#[repr(u8)]
532pub enum GPIO15DRIVING_A {
533    #[doc = "0: `0`"]
534    DISABLED = 0,
535    #[doc = "1: `1`"]
536    ENABLED = 1,
537}
538impl From<GPIO15DRIVING_A> for u8 {
539    #[inline(always)]
540    fn from(variant: GPIO15DRIVING_A) -> Self {
541        variant as _
542    }
543}
544impl REG_GPIO_15_DRV_R {
545    #[doc = "Get enumerated values variant"]
546    #[inline(always)]
547    pub fn variant(&self) -> Option<GPIO15DRIVING_A> {
548        match self.bits {
549            0 => Some(GPIO15DRIVING_A::DISABLED),
550            1 => Some(GPIO15DRIVING_A::ENABLED),
551            _ => None,
552        }
553    }
554    #[doc = "Checks if the value of the field is `DISABLED`"]
555    #[inline(always)]
556    pub fn is_disabled(&self) -> bool {
557        *self == GPIO15DRIVING_A::DISABLED
558    }
559    #[doc = "Checks if the value of the field is `ENABLED`"]
560    #[inline(always)]
561    pub fn is_enabled(&self) -> bool {
562        *self == GPIO15DRIVING_A::ENABLED
563    }
564}
565#[doc = "Field `reg_gpio_15_drv` writer - Driving control enabled for GPIO15."]
566pub type REG_GPIO_15_DRV_W<'a, const O: u8> =
567    crate::FieldWriter<'a, u32, GPIO_CFGCTL7_SPEC, u8, GPIO15DRIVING_A, 2, O>;
568impl<'a, const O: u8> REG_GPIO_15_DRV_W<'a, O> {
569    #[doc = "`0`"]
570    #[inline(always)]
571    pub fn disabled(self) -> &'a mut W {
572        self.variant(GPIO15DRIVING_A::DISABLED)
573    }
574    #[doc = "`1`"]
575    #[inline(always)]
576    pub fn enabled(self) -> &'a mut W {
577        self.variant(GPIO15DRIVING_A::ENABLED)
578    }
579}
580#[doc = "Field `reg_gpio_15_pu` reader - Pull Up Resistor for GPIO15."]
581pub type REG_GPIO_15_PU_R = crate::BitReader<GPIO15PULL_UP_RESISTOR_A>;
582#[doc = "Pull Up Resistor for GPIO15.\n\nValue on reset: 0"]
583#[derive(Clone, Copy, Debug, PartialEq, Eq)]
584pub enum GPIO15PULL_UP_RESISTOR_A {
585    #[doc = "0: `0`"]
586    DISABLED = 0,
587    #[doc = "1: `1`"]
588    ENABLED = 1,
589}
590impl From<GPIO15PULL_UP_RESISTOR_A> for bool {
591    #[inline(always)]
592    fn from(variant: GPIO15PULL_UP_RESISTOR_A) -> Self {
593        variant as u8 != 0
594    }
595}
596impl REG_GPIO_15_PU_R {
597    #[doc = "Get enumerated values variant"]
598    #[inline(always)]
599    pub fn variant(&self) -> GPIO15PULL_UP_RESISTOR_A {
600        match self.bits {
601            false => GPIO15PULL_UP_RESISTOR_A::DISABLED,
602            true => GPIO15PULL_UP_RESISTOR_A::ENABLED,
603        }
604    }
605    #[doc = "Checks if the value of the field is `DISABLED`"]
606    #[inline(always)]
607    pub fn is_disabled(&self) -> bool {
608        *self == GPIO15PULL_UP_RESISTOR_A::DISABLED
609    }
610    #[doc = "Checks if the value of the field is `ENABLED`"]
611    #[inline(always)]
612    pub fn is_enabled(&self) -> bool {
613        *self == GPIO15PULL_UP_RESISTOR_A::ENABLED
614    }
615}
616#[doc = "Field `reg_gpio_15_pu` writer - Pull Up Resistor for GPIO15."]
617pub type REG_GPIO_15_PU_W<'a, const O: u8> =
618    crate::BitWriter<'a, u32, GPIO_CFGCTL7_SPEC, GPIO15PULL_UP_RESISTOR_A, O>;
619impl<'a, const O: u8> REG_GPIO_15_PU_W<'a, O> {
620    #[doc = "`0`"]
621    #[inline(always)]
622    pub fn disabled(self) -> &'a mut W {
623        self.variant(GPIO15PULL_UP_RESISTOR_A::DISABLED)
624    }
625    #[doc = "`1`"]
626    #[inline(always)]
627    pub fn enabled(self) -> &'a mut W {
628        self.variant(GPIO15PULL_UP_RESISTOR_A::ENABLED)
629    }
630}
631#[doc = "Field `reg_gpio_15_pd` reader - Pull Down Resistor for GPIO15."]
632pub type REG_GPIO_15_PD_R = crate::BitReader<GPIO15PULL_DOWN_RESISTOR_A>;
633#[doc = "Pull Down Resistor for GPIO15.\n\nValue on reset: 0"]
634#[derive(Clone, Copy, Debug, PartialEq, Eq)]
635pub enum GPIO15PULL_DOWN_RESISTOR_A {
636    #[doc = "0: `0`"]
637    DISABLED = 0,
638    #[doc = "1: `1`"]
639    ENABLED = 1,
640}
641impl From<GPIO15PULL_DOWN_RESISTOR_A> for bool {
642    #[inline(always)]
643    fn from(variant: GPIO15PULL_DOWN_RESISTOR_A) -> Self {
644        variant as u8 != 0
645    }
646}
647impl REG_GPIO_15_PD_R {
648    #[doc = "Get enumerated values variant"]
649    #[inline(always)]
650    pub fn variant(&self) -> GPIO15PULL_DOWN_RESISTOR_A {
651        match self.bits {
652            false => GPIO15PULL_DOWN_RESISTOR_A::DISABLED,
653            true => GPIO15PULL_DOWN_RESISTOR_A::ENABLED,
654        }
655    }
656    #[doc = "Checks if the value of the field is `DISABLED`"]
657    #[inline(always)]
658    pub fn is_disabled(&self) -> bool {
659        *self == GPIO15PULL_DOWN_RESISTOR_A::DISABLED
660    }
661    #[doc = "Checks if the value of the field is `ENABLED`"]
662    #[inline(always)]
663    pub fn is_enabled(&self) -> bool {
664        *self == GPIO15PULL_DOWN_RESISTOR_A::ENABLED
665    }
666}
667#[doc = "Field `reg_gpio_15_pd` writer - Pull Down Resistor for GPIO15."]
668pub type REG_GPIO_15_PD_W<'a, const O: u8> =
669    crate::BitWriter<'a, u32, GPIO_CFGCTL7_SPEC, GPIO15PULL_DOWN_RESISTOR_A, O>;
670impl<'a, const O: u8> REG_GPIO_15_PD_W<'a, O> {
671    #[doc = "`0`"]
672    #[inline(always)]
673    pub fn disabled(self) -> &'a mut W {
674        self.variant(GPIO15PULL_DOWN_RESISTOR_A::DISABLED)
675    }
676    #[doc = "`1`"]
677    #[inline(always)]
678    pub fn enabled(self) -> &'a mut W {
679        self.variant(GPIO15PULL_DOWN_RESISTOR_A::ENABLED)
680    }
681}
682#[doc = "Field `reg_gpio_15_func_sel` reader - Function select for GPIO15."]
683pub type REG_GPIO_15_FUNC_SEL_R = crate::FieldReader<u8, GPIO15FUNCTION_SELECT_A>;
684#[doc = "Function select for GPIO15.\n\nValue on reset: 11"]
685#[derive(Clone, Copy, Debug, PartialEq, Eq)]
686#[repr(u8)]
687pub enum GPIO15FUNCTION_SELECT_A {
688    #[doc = "4: `100`"]
689    SPI_SCLK = 4,
690    #[doc = "6: `110`"]
691    I2C_SDA = 6,
692    #[doc = "7: `111`"]
693    UART_SIG7 = 7,
694    #[doc = "8: `1000`"]
695    PWM_CH0 = 8,
696    #[doc = "9: `1001`"]
697    FEM_GPIO_3 = 9,
698    #[doc = "10: `1010`"]
699    PSW_IRRCV_OUT_GPIP_CH11 = 10,
700    #[doc = "11: `1011`"]
701    SWGPIO_15 = 11,
702    #[doc = "14: `1110`"]
703    E21_TDO = 14,
704}
705impl From<GPIO15FUNCTION_SELECT_A> for u8 {
706    #[inline(always)]
707    fn from(variant: GPIO15FUNCTION_SELECT_A) -> Self {
708        variant as _
709    }
710}
711impl REG_GPIO_15_FUNC_SEL_R {
712    #[doc = "Get enumerated values variant"]
713    #[inline(always)]
714    pub fn variant(&self) -> Option<GPIO15FUNCTION_SELECT_A> {
715        match self.bits {
716            4 => Some(GPIO15FUNCTION_SELECT_A::SPI_SCLK),
717            6 => Some(GPIO15FUNCTION_SELECT_A::I2C_SDA),
718            7 => Some(GPIO15FUNCTION_SELECT_A::UART_SIG7),
719            8 => Some(GPIO15FUNCTION_SELECT_A::PWM_CH0),
720            9 => Some(GPIO15FUNCTION_SELECT_A::FEM_GPIO_3),
721            10 => Some(GPIO15FUNCTION_SELECT_A::PSW_IRRCV_OUT_GPIP_CH11),
722            11 => Some(GPIO15FUNCTION_SELECT_A::SWGPIO_15),
723            14 => Some(GPIO15FUNCTION_SELECT_A::E21_TDO),
724            _ => None,
725        }
726    }
727    #[doc = "Checks if the value of the field is `SPI_SCLK`"]
728    #[inline(always)]
729    pub fn is_spi_sclk(&self) -> bool {
730        *self == GPIO15FUNCTION_SELECT_A::SPI_SCLK
731    }
732    #[doc = "Checks if the value of the field is `I2C_SDA`"]
733    #[inline(always)]
734    pub fn is_i2c_sda(&self) -> bool {
735        *self == GPIO15FUNCTION_SELECT_A::I2C_SDA
736    }
737    #[doc = "Checks if the value of the field is `UART_SIG7`"]
738    #[inline(always)]
739    pub fn is_uart_sig7(&self) -> bool {
740        *self == GPIO15FUNCTION_SELECT_A::UART_SIG7
741    }
742    #[doc = "Checks if the value of the field is `PWM_CH0`"]
743    #[inline(always)]
744    pub fn is_pwm_ch0(&self) -> bool {
745        *self == GPIO15FUNCTION_SELECT_A::PWM_CH0
746    }
747    #[doc = "Checks if the value of the field is `FEM_GPIO_3`"]
748    #[inline(always)]
749    pub fn is_fem_gpio_3(&self) -> bool {
750        *self == GPIO15FUNCTION_SELECT_A::FEM_GPIO_3
751    }
752    #[doc = "Checks if the value of the field is `PSW_IRRCV_OUT_GPIP_CH11`"]
753    #[inline(always)]
754    pub fn is_psw_irrcv_out_gpip_ch11(&self) -> bool {
755        *self == GPIO15FUNCTION_SELECT_A::PSW_IRRCV_OUT_GPIP_CH11
756    }
757    #[doc = "Checks if the value of the field is `SWGPIO_15`"]
758    #[inline(always)]
759    pub fn is_swgpio_15(&self) -> bool {
760        *self == GPIO15FUNCTION_SELECT_A::SWGPIO_15
761    }
762    #[doc = "Checks if the value of the field is `E21_TDO`"]
763    #[inline(always)]
764    pub fn is_e21_tdo(&self) -> bool {
765        *self == GPIO15FUNCTION_SELECT_A::E21_TDO
766    }
767}
768#[doc = "Field `reg_gpio_15_func_sel` writer - Function select for GPIO15."]
769pub type REG_GPIO_15_FUNC_SEL_W<'a, const O: u8> =
770    crate::FieldWriter<'a, u32, GPIO_CFGCTL7_SPEC, u8, GPIO15FUNCTION_SELECT_A, 4, O>;
771impl<'a, const O: u8> REG_GPIO_15_FUNC_SEL_W<'a, O> {
772    #[doc = "`100`"]
773    #[inline(always)]
774    pub fn spi_sclk(self) -> &'a mut W {
775        self.variant(GPIO15FUNCTION_SELECT_A::SPI_SCLK)
776    }
777    #[doc = "`110`"]
778    #[inline(always)]
779    pub fn i2c_sda(self) -> &'a mut W {
780        self.variant(GPIO15FUNCTION_SELECT_A::I2C_SDA)
781    }
782    #[doc = "`111`"]
783    #[inline(always)]
784    pub fn uart_sig7(self) -> &'a mut W {
785        self.variant(GPIO15FUNCTION_SELECT_A::UART_SIG7)
786    }
787    #[doc = "`1000`"]
788    #[inline(always)]
789    pub fn pwm_ch0(self) -> &'a mut W {
790        self.variant(GPIO15FUNCTION_SELECT_A::PWM_CH0)
791    }
792    #[doc = "`1001`"]
793    #[inline(always)]
794    pub fn fem_gpio_3(self) -> &'a mut W {
795        self.variant(GPIO15FUNCTION_SELECT_A::FEM_GPIO_3)
796    }
797    #[doc = "`1010`"]
798    #[inline(always)]
799    pub fn psw_irrcv_out_gpip_ch11(self) -> &'a mut W {
800        self.variant(GPIO15FUNCTION_SELECT_A::PSW_IRRCV_OUT_GPIP_CH11)
801    }
802    #[doc = "`1011`"]
803    #[inline(always)]
804    pub fn swgpio_15(self) -> &'a mut W {
805        self.variant(GPIO15FUNCTION_SELECT_A::SWGPIO_15)
806    }
807    #[doc = "`1110`"]
808    #[inline(always)]
809    pub fn e21_tdo(self) -> &'a mut W {
810        self.variant(GPIO15FUNCTION_SELECT_A::E21_TDO)
811    }
812}
813impl R {
814    #[doc = "Bit 0 - Input enable for GPIO14."]
815    #[inline(always)]
816    pub fn reg_gpio_14_ie(&self) -> REG_GPIO_14_IE_R {
817        REG_GPIO_14_IE_R::new((self.bits & 1) != 0)
818    }
819    #[doc = "Bit 1 - Schmitt trigger enabled for GPIO14."]
820    #[inline(always)]
821    pub fn reg_gpio_14_smt(&self) -> REG_GPIO_14_SMT_R {
822        REG_GPIO_14_SMT_R::new(((self.bits >> 1) & 1) != 0)
823    }
824    #[doc = "Bits 2:3 - Driving control enabled for GPIO14."]
825    #[inline(always)]
826    pub fn reg_gpio_14_drv(&self) -> REG_GPIO_14_DRV_R {
827        REG_GPIO_14_DRV_R::new(((self.bits >> 2) & 3) as u8)
828    }
829    #[doc = "Bit 4 - Pull Up Resistor for GPIO14."]
830    #[inline(always)]
831    pub fn reg_gpio_14_pu(&self) -> REG_GPIO_14_PU_R {
832        REG_GPIO_14_PU_R::new(((self.bits >> 4) & 1) != 0)
833    }
834    #[doc = "Bit 5 - Pull Down Resistor for GPIO14."]
835    #[inline(always)]
836    pub fn reg_gpio_14_pd(&self) -> REG_GPIO_14_PD_R {
837        REG_GPIO_14_PD_R::new(((self.bits >> 5) & 1) != 0)
838    }
839    #[doc = "Bits 8:11 - Function select for GPIO14."]
840    #[inline(always)]
841    pub fn reg_gpio_14_func_sel(&self) -> REG_GPIO_14_FUNC_SEL_R {
842        REG_GPIO_14_FUNC_SEL_R::new(((self.bits >> 8) & 0x0f) as u8)
843    }
844    #[doc = "Bit 16 - Input enable for GPIO15."]
845    #[inline(always)]
846    pub fn reg_gpio_15_ie(&self) -> REG_GPIO_15_IE_R {
847        REG_GPIO_15_IE_R::new(((self.bits >> 16) & 1) != 0)
848    }
849    #[doc = "Bit 17 - Schmitt trigger enabled for GPIO15."]
850    #[inline(always)]
851    pub fn reg_gpio_15_smt(&self) -> REG_GPIO_15_SMT_R {
852        REG_GPIO_15_SMT_R::new(((self.bits >> 17) & 1) != 0)
853    }
854    #[doc = "Bits 18:19 - Driving control enabled for GPIO15."]
855    #[inline(always)]
856    pub fn reg_gpio_15_drv(&self) -> REG_GPIO_15_DRV_R {
857        REG_GPIO_15_DRV_R::new(((self.bits >> 18) & 3) as u8)
858    }
859    #[doc = "Bit 20 - Pull Up Resistor for GPIO15."]
860    #[inline(always)]
861    pub fn reg_gpio_15_pu(&self) -> REG_GPIO_15_PU_R {
862        REG_GPIO_15_PU_R::new(((self.bits >> 20) & 1) != 0)
863    }
864    #[doc = "Bit 21 - Pull Down Resistor for GPIO15."]
865    #[inline(always)]
866    pub fn reg_gpio_15_pd(&self) -> REG_GPIO_15_PD_R {
867        REG_GPIO_15_PD_R::new(((self.bits >> 21) & 1) != 0)
868    }
869    #[doc = "Bits 24:27 - Function select for GPIO15."]
870    #[inline(always)]
871    pub fn reg_gpio_15_func_sel(&self) -> REG_GPIO_15_FUNC_SEL_R {
872        REG_GPIO_15_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8)
873    }
874}
875impl W {
876    #[doc = "Bit 0 - Input enable for GPIO14."]
877    #[inline(always)]
878    #[must_use]
879    pub fn reg_gpio_14_ie(&mut self) -> REG_GPIO_14_IE_W<0> {
880        REG_GPIO_14_IE_W::new(self)
881    }
882    #[doc = "Bit 1 - Schmitt trigger enabled for GPIO14."]
883    #[inline(always)]
884    #[must_use]
885    pub fn reg_gpio_14_smt(&mut self) -> REG_GPIO_14_SMT_W<1> {
886        REG_GPIO_14_SMT_W::new(self)
887    }
888    #[doc = "Bits 2:3 - Driving control enabled for GPIO14."]
889    #[inline(always)]
890    #[must_use]
891    pub fn reg_gpio_14_drv(&mut self) -> REG_GPIO_14_DRV_W<2> {
892        REG_GPIO_14_DRV_W::new(self)
893    }
894    #[doc = "Bit 4 - Pull Up Resistor for GPIO14."]
895    #[inline(always)]
896    #[must_use]
897    pub fn reg_gpio_14_pu(&mut self) -> REG_GPIO_14_PU_W<4> {
898        REG_GPIO_14_PU_W::new(self)
899    }
900    #[doc = "Bit 5 - Pull Down Resistor for GPIO14."]
901    #[inline(always)]
902    #[must_use]
903    pub fn reg_gpio_14_pd(&mut self) -> REG_GPIO_14_PD_W<5> {
904        REG_GPIO_14_PD_W::new(self)
905    }
906    #[doc = "Bits 8:11 - Function select for GPIO14."]
907    #[inline(always)]
908    #[must_use]
909    pub fn reg_gpio_14_func_sel(&mut self) -> REG_GPIO_14_FUNC_SEL_W<8> {
910        REG_GPIO_14_FUNC_SEL_W::new(self)
911    }
912    #[doc = "Bit 16 - Input enable for GPIO15."]
913    #[inline(always)]
914    #[must_use]
915    pub fn reg_gpio_15_ie(&mut self) -> REG_GPIO_15_IE_W<16> {
916        REG_GPIO_15_IE_W::new(self)
917    }
918    #[doc = "Bit 17 - Schmitt trigger enabled for GPIO15."]
919    #[inline(always)]
920    #[must_use]
921    pub fn reg_gpio_15_smt(&mut self) -> REG_GPIO_15_SMT_W<17> {
922        REG_GPIO_15_SMT_W::new(self)
923    }
924    #[doc = "Bits 18:19 - Driving control enabled for GPIO15."]
925    #[inline(always)]
926    #[must_use]
927    pub fn reg_gpio_15_drv(&mut self) -> REG_GPIO_15_DRV_W<18> {
928        REG_GPIO_15_DRV_W::new(self)
929    }
930    #[doc = "Bit 20 - Pull Up Resistor for GPIO15."]
931    #[inline(always)]
932    #[must_use]
933    pub fn reg_gpio_15_pu(&mut self) -> REG_GPIO_15_PU_W<20> {
934        REG_GPIO_15_PU_W::new(self)
935    }
936    #[doc = "Bit 21 - Pull Down Resistor for GPIO15."]
937    #[inline(always)]
938    #[must_use]
939    pub fn reg_gpio_15_pd(&mut self) -> REG_GPIO_15_PD_W<21> {
940        REG_GPIO_15_PD_W::new(self)
941    }
942    #[doc = "Bits 24:27 - Function select for GPIO15."]
943    #[inline(always)]
944    #[must_use]
945    pub fn reg_gpio_15_func_sel(&mut self) -> REG_GPIO_15_FUNC_SEL_W<24> {
946        REG_GPIO_15_FUNC_SEL_W::new(self)
947    }
948    #[doc = "Writes raw bits to the register."]
949    #[inline(always)]
950    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
951        self.0.bits(bits);
952        self
953    }
954}
955#[doc = "GPIO14, GPIO15 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_cfgctl7](index.html) module"]
956pub struct GPIO_CFGCTL7_SPEC;
957impl crate::RegisterSpec for GPIO_CFGCTL7_SPEC {
958    type Ux = u32;
959}
960#[doc = "`read()` method returns [gpio_cfgctl7::R](R) reader structure"]
961impl crate::Readable for GPIO_CFGCTL7_SPEC {
962    type Reader = R;
963}
964#[doc = "`write(|w| ..)` method takes [gpio_cfgctl7::W](W) writer structure"]
965impl crate::Writable for GPIO_CFGCTL7_SPEC {
966    type Writer = W;
967    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
968    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
969}
970#[doc = "`reset()` method sets GPIO_CFGCTL7 to value 0x0b03_0e03"]
971impl crate::Resettable for GPIO_CFGCTL7_SPEC {
972    const RESET_VALUE: Self::Ux = 0x0b03_0e03;
973}