1#[doc = "Register `GPIO_CFGCTL0` reader"]
2pub struct R(crate::R<GPIO_CFGCTL0_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<GPIO_CFGCTL0_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<GPIO_CFGCTL0_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<GPIO_CFGCTL0_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `GPIO_CFGCTL0` writer"]
17pub struct W(crate::W<GPIO_CFGCTL0_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<GPIO_CFGCTL0_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_CFGCTL0_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<GPIO_CFGCTL0_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `reg_gpio_0_ie` reader - GPIO0 input enable."]
38pub type REG_GPIO_0_IE_R = crate::BitReader<GPIO0INPUT_ENABLED_A>;
39#[doc = "GPIO0 input enable.\n\nValue on reset: 1"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum GPIO0INPUT_ENABLED_A {
42 #[doc = "0: `0`"]
43 DISABLED = 0,
44 #[doc = "1: `1`"]
45 ENABLED = 1,
46}
47impl From<GPIO0INPUT_ENABLED_A> for bool {
48 #[inline(always)]
49 fn from(variant: GPIO0INPUT_ENABLED_A) -> Self {
50 variant as u8 != 0
51 }
52}
53impl REG_GPIO_0_IE_R {
54 #[doc = "Get enumerated values variant"]
55 #[inline(always)]
56 pub fn variant(&self) -> GPIO0INPUT_ENABLED_A {
57 match self.bits {
58 false => GPIO0INPUT_ENABLED_A::DISABLED,
59 true => GPIO0INPUT_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 == GPIO0INPUT_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 == GPIO0INPUT_ENABLED_A::ENABLED
71 }
72}
73#[doc = "Field `reg_gpio_0_ie` writer - GPIO0 input enable."]
74pub type REG_GPIO_0_IE_W<'a, const O: u8> =
75 crate::BitWriter<'a, u32, GPIO_CFGCTL0_SPEC, GPIO0INPUT_ENABLED_A, O>;
76impl<'a, const O: u8> REG_GPIO_0_IE_W<'a, O> {
77 #[doc = "`0`"]
78 #[inline(always)]
79 pub fn disabled(self) -> &'a mut W {
80 self.variant(GPIO0INPUT_ENABLED_A::DISABLED)
81 }
82 #[doc = "`1`"]
83 #[inline(always)]
84 pub fn enabled(self) -> &'a mut W {
85 self.variant(GPIO0INPUT_ENABLED_A::ENABLED)
86 }
87}
88#[doc = "Field `reg_gpio_0_smt` reader - Schmitt trigger enabled for GPIO0."]
89pub type REG_GPIO_0_SMT_R = crate::BitReader<GPIO0SCHMITT_A>;
90#[doc = "Schmitt trigger enabled for GPIO0.\n\nValue on reset: 1"]
91#[derive(Clone, Copy, Debug, PartialEq, Eq)]
92pub enum GPIO0SCHMITT_A {
93 #[doc = "0: `0`"]
94 DISABLED = 0,
95 #[doc = "1: `1`"]
96 ENABLED = 1,
97}
98impl From<GPIO0SCHMITT_A> for bool {
99 #[inline(always)]
100 fn from(variant: GPIO0SCHMITT_A) -> Self {
101 variant as u8 != 0
102 }
103}
104impl REG_GPIO_0_SMT_R {
105 #[doc = "Get enumerated values variant"]
106 #[inline(always)]
107 pub fn variant(&self) -> GPIO0SCHMITT_A {
108 match self.bits {
109 false => GPIO0SCHMITT_A::DISABLED,
110 true => GPIO0SCHMITT_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 == GPIO0SCHMITT_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 == GPIO0SCHMITT_A::ENABLED
122 }
123}
124#[doc = "Field `reg_gpio_0_smt` writer - Schmitt trigger enabled for GPIO0."]
125pub type REG_GPIO_0_SMT_W<'a, const O: u8> =
126 crate::BitWriter<'a, u32, GPIO_CFGCTL0_SPEC, GPIO0SCHMITT_A, O>;
127impl<'a, const O: u8> REG_GPIO_0_SMT_W<'a, O> {
128 #[doc = "`0`"]
129 #[inline(always)]
130 pub fn disabled(self) -> &'a mut W {
131 self.variant(GPIO0SCHMITT_A::DISABLED)
132 }
133 #[doc = "`1`"]
134 #[inline(always)]
135 pub fn enabled(self) -> &'a mut W {
136 self.variant(GPIO0SCHMITT_A::ENABLED)
137 }
138}
139#[doc = "Field `reg_gpio_0_drv` reader - Driving control for GPIO0."]
140pub type REG_GPIO_0_DRV_R = crate::FieldReader<u8, GPIO0DRIVING_A>;
141#[doc = "Driving control for GPIO0.\n\nValue on reset: 0"]
142#[derive(Clone, Copy, Debug, PartialEq, Eq)]
143#[repr(u8)]
144pub enum GPIO0DRIVING_A {
145 #[doc = "0: `0`"]
146 DISABLED = 0,
147 #[doc = "1: `1`"]
148 ENABLED = 1,
149}
150impl From<GPIO0DRIVING_A> for u8 {
151 #[inline(always)]
152 fn from(variant: GPIO0DRIVING_A) -> Self {
153 variant as _
154 }
155}
156impl REG_GPIO_0_DRV_R {
157 #[doc = "Get enumerated values variant"]
158 #[inline(always)]
159 pub fn variant(&self) -> Option<GPIO0DRIVING_A> {
160 match self.bits {
161 0 => Some(GPIO0DRIVING_A::DISABLED),
162 1 => Some(GPIO0DRIVING_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 == GPIO0DRIVING_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 == GPIO0DRIVING_A::ENABLED
175 }
176}
177#[doc = "Field `reg_gpio_0_drv` writer - Driving control for GPIO0."]
178pub type REG_GPIO_0_DRV_W<'a, const O: u8> =
179 crate::FieldWriter<'a, u32, GPIO_CFGCTL0_SPEC, u8, GPIO0DRIVING_A, 2, O>;
180impl<'a, const O: u8> REG_GPIO_0_DRV_W<'a, O> {
181 #[doc = "`0`"]
182 #[inline(always)]
183 pub fn disabled(self) -> &'a mut W {
184 self.variant(GPIO0DRIVING_A::DISABLED)
185 }
186 #[doc = "`1`"]
187 #[inline(always)]
188 pub fn enabled(self) -> &'a mut W {
189 self.variant(GPIO0DRIVING_A::ENABLED)
190 }
191}
192#[doc = "Field `reg_gpio_0_pu` reader - Pull Up Resistor for GPIO0."]
193pub type REG_GPIO_0_PU_R = crate::BitReader<GPIO0PULL_UP_RESISTOR_A>;
194#[doc = "Pull Up Resistor for GPIO0.\n\nValue on reset: 0"]
195#[derive(Clone, Copy, Debug, PartialEq, Eq)]
196pub enum GPIO0PULL_UP_RESISTOR_A {
197 #[doc = "0: `0`"]
198 DISABLED = 0,
199 #[doc = "1: `1`"]
200 ENABLED = 1,
201}
202impl From<GPIO0PULL_UP_RESISTOR_A> for bool {
203 #[inline(always)]
204 fn from(variant: GPIO0PULL_UP_RESISTOR_A) -> Self {
205 variant as u8 != 0
206 }
207}
208impl REG_GPIO_0_PU_R {
209 #[doc = "Get enumerated values variant"]
210 #[inline(always)]
211 pub fn variant(&self) -> GPIO0PULL_UP_RESISTOR_A {
212 match self.bits {
213 false => GPIO0PULL_UP_RESISTOR_A::DISABLED,
214 true => GPIO0PULL_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 == GPIO0PULL_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 == GPIO0PULL_UP_RESISTOR_A::ENABLED
226 }
227}
228#[doc = "Field `reg_gpio_0_pu` writer - Pull Up Resistor for GPIO0."]
229pub type REG_GPIO_0_PU_W<'a, const O: u8> =
230 crate::BitWriter<'a, u32, GPIO_CFGCTL0_SPEC, GPIO0PULL_UP_RESISTOR_A, O>;
231impl<'a, const O: u8> REG_GPIO_0_PU_W<'a, O> {
232 #[doc = "`0`"]
233 #[inline(always)]
234 pub fn disabled(self) -> &'a mut W {
235 self.variant(GPIO0PULL_UP_RESISTOR_A::DISABLED)
236 }
237 #[doc = "`1`"]
238 #[inline(always)]
239 pub fn enabled(self) -> &'a mut W {
240 self.variant(GPIO0PULL_UP_RESISTOR_A::ENABLED)
241 }
242}
243#[doc = "Field `reg_gpio_0_pd` reader - Pull Down Resistor for GPIO0."]
244pub type REG_GPIO_0_PD_R = crate::BitReader<GPIO0PULL_DOWN_RESISTOR_A>;
245#[doc = "Pull Down Resistor for GPIO0.\n\nValue on reset: 0"]
246#[derive(Clone, Copy, Debug, PartialEq, Eq)]
247pub enum GPIO0PULL_DOWN_RESISTOR_A {
248 #[doc = "0: `0`"]
249 DISABLED = 0,
250 #[doc = "1: `1`"]
251 ENABLED = 1,
252}
253impl From<GPIO0PULL_DOWN_RESISTOR_A> for bool {
254 #[inline(always)]
255 fn from(variant: GPIO0PULL_DOWN_RESISTOR_A) -> Self {
256 variant as u8 != 0
257 }
258}
259impl REG_GPIO_0_PD_R {
260 #[doc = "Get enumerated values variant"]
261 #[inline(always)]
262 pub fn variant(&self) -> GPIO0PULL_DOWN_RESISTOR_A {
263 match self.bits {
264 false => GPIO0PULL_DOWN_RESISTOR_A::DISABLED,
265 true => GPIO0PULL_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 == GPIO0PULL_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 == GPIO0PULL_DOWN_RESISTOR_A::ENABLED
277 }
278}
279#[doc = "Field `reg_gpio_0_pd` writer - Pull Down Resistor for GPIO0."]
280pub type REG_GPIO_0_PD_W<'a, const O: u8> =
281 crate::BitWriter<'a, u32, GPIO_CFGCTL0_SPEC, GPIO0PULL_DOWN_RESISTOR_A, O>;
282impl<'a, const O: u8> REG_GPIO_0_PD_W<'a, O> {
283 #[doc = "`0`"]
284 #[inline(always)]
285 pub fn disabled(self) -> &'a mut W {
286 self.variant(GPIO0PULL_DOWN_RESISTOR_A::DISABLED)
287 }
288 #[doc = "`1`"]
289 #[inline(always)]
290 pub fn enabled(self) -> &'a mut W {
291 self.variant(GPIO0PULL_DOWN_RESISTOR_A::ENABLED)
292 }
293}
294#[doc = "Field `reg_gpio_0_func_sel` reader - Function select for GPIO0."]
295pub type REG_GPIO_0_FUNC_SEL_R = crate::FieldReader<u8, GPIO0FUNCTION_SELECT_A>;
296#[doc = "Function select for GPIO0.\n\nValue on reset: 1"]
297#[derive(Clone, Copy, Debug, PartialEq, Eq)]
298#[repr(u8)]
299pub enum GPIO0FUNCTION_SELECT_A {
300 #[doc = "1: `1`"]
301 SDIO_CLK = 1,
302 #[doc = "2: `10`"]
303 SF_D1 = 2,
304 #[doc = "4: `100`"]
305 SPI_MOSI_SPI_MISO = 4,
306 #[doc = "6: `110`"]
307 I2C_SCL = 6,
308 #[doc = "7: `111`"]
309 UART_SIG0 = 7,
310 #[doc = "8: `1000`"]
311 PWM_CH0 = 8,
312 #[doc = "9: `1001`"]
313 FEM_GPIO_0 = 9,
314 #[doc = "10: `1010`"]
315 ATEST_IN = 10,
316 #[doc = "11: `1011`"]
317 SWGPIO_0 = 11,
318 #[doc = "14: `1110`"]
319 E21_TMS = 14,
320}
321impl From<GPIO0FUNCTION_SELECT_A> for u8 {
322 #[inline(always)]
323 fn from(variant: GPIO0FUNCTION_SELECT_A) -> Self {
324 variant as _
325 }
326}
327impl REG_GPIO_0_FUNC_SEL_R {
328 #[doc = "Get enumerated values variant"]
329 #[inline(always)]
330 pub fn variant(&self) -> Option<GPIO0FUNCTION_SELECT_A> {
331 match self.bits {
332 1 => Some(GPIO0FUNCTION_SELECT_A::SDIO_CLK),
333 2 => Some(GPIO0FUNCTION_SELECT_A::SF_D1),
334 4 => Some(GPIO0FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO),
335 6 => Some(GPIO0FUNCTION_SELECT_A::I2C_SCL),
336 7 => Some(GPIO0FUNCTION_SELECT_A::UART_SIG0),
337 8 => Some(GPIO0FUNCTION_SELECT_A::PWM_CH0),
338 9 => Some(GPIO0FUNCTION_SELECT_A::FEM_GPIO_0),
339 10 => Some(GPIO0FUNCTION_SELECT_A::ATEST_IN),
340 11 => Some(GPIO0FUNCTION_SELECT_A::SWGPIO_0),
341 14 => Some(GPIO0FUNCTION_SELECT_A::E21_TMS),
342 _ => None,
343 }
344 }
345 #[doc = "Checks if the value of the field is `SDIO_CLK`"]
346 #[inline(always)]
347 pub fn is_sdio_clk(&self) -> bool {
348 *self == GPIO0FUNCTION_SELECT_A::SDIO_CLK
349 }
350 #[doc = "Checks if the value of the field is `SF_D1`"]
351 #[inline(always)]
352 pub fn is_sf_d1(&self) -> bool {
353 *self == GPIO0FUNCTION_SELECT_A::SF_D1
354 }
355 #[doc = "Checks if the value of the field is `SPI_MOSI_SPI_MISO`"]
356 #[inline(always)]
357 pub fn is_spi_mosi_spi_miso(&self) -> bool {
358 *self == GPIO0FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO
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 == GPIO0FUNCTION_SELECT_A::I2C_SCL
364 }
365 #[doc = "Checks if the value of the field is `UART_SIG0`"]
366 #[inline(always)]
367 pub fn is_uart_sig0(&self) -> bool {
368 *self == GPIO0FUNCTION_SELECT_A::UART_SIG0
369 }
370 #[doc = "Checks if the value of the field is `PWM_CH0`"]
371 #[inline(always)]
372 pub fn is_pwm_ch0(&self) -> bool {
373 *self == GPIO0FUNCTION_SELECT_A::PWM_CH0
374 }
375 #[doc = "Checks if the value of the field is `FEM_GPIO_0`"]
376 #[inline(always)]
377 pub fn is_fem_gpio_0(&self) -> bool {
378 *self == GPIO0FUNCTION_SELECT_A::FEM_GPIO_0
379 }
380 #[doc = "Checks if the value of the field is `ATEST_IN`"]
381 #[inline(always)]
382 pub fn is_atest_in(&self) -> bool {
383 *self == GPIO0FUNCTION_SELECT_A::ATEST_IN
384 }
385 #[doc = "Checks if the value of the field is `SWGPIO_0`"]
386 #[inline(always)]
387 pub fn is_swgpio_0(&self) -> bool {
388 *self == GPIO0FUNCTION_SELECT_A::SWGPIO_0
389 }
390 #[doc = "Checks if the value of the field is `E21_TMS`"]
391 #[inline(always)]
392 pub fn is_e21_tms(&self) -> bool {
393 *self == GPIO0FUNCTION_SELECT_A::E21_TMS
394 }
395}
396#[doc = "Field `reg_gpio_0_func_sel` writer - Function select for GPIO0."]
397pub type REG_GPIO_0_FUNC_SEL_W<'a, const O: u8> =
398 crate::FieldWriter<'a, u32, GPIO_CFGCTL0_SPEC, u8, GPIO0FUNCTION_SELECT_A, 4, O>;
399impl<'a, const O: u8> REG_GPIO_0_FUNC_SEL_W<'a, O> {
400 #[doc = "`1`"]
401 #[inline(always)]
402 pub fn sdio_clk(self) -> &'a mut W {
403 self.variant(GPIO0FUNCTION_SELECT_A::SDIO_CLK)
404 }
405 #[doc = "`10`"]
406 #[inline(always)]
407 pub fn sf_d1(self) -> &'a mut W {
408 self.variant(GPIO0FUNCTION_SELECT_A::SF_D1)
409 }
410 #[doc = "`100`"]
411 #[inline(always)]
412 pub fn spi_mosi_spi_miso(self) -> &'a mut W {
413 self.variant(GPIO0FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO)
414 }
415 #[doc = "`110`"]
416 #[inline(always)]
417 pub fn i2c_scl(self) -> &'a mut W {
418 self.variant(GPIO0FUNCTION_SELECT_A::I2C_SCL)
419 }
420 #[doc = "`111`"]
421 #[inline(always)]
422 pub fn uart_sig0(self) -> &'a mut W {
423 self.variant(GPIO0FUNCTION_SELECT_A::UART_SIG0)
424 }
425 #[doc = "`1000`"]
426 #[inline(always)]
427 pub fn pwm_ch0(self) -> &'a mut W {
428 self.variant(GPIO0FUNCTION_SELECT_A::PWM_CH0)
429 }
430 #[doc = "`1001`"]
431 #[inline(always)]
432 pub fn fem_gpio_0(self) -> &'a mut W {
433 self.variant(GPIO0FUNCTION_SELECT_A::FEM_GPIO_0)
434 }
435 #[doc = "`1010`"]
436 #[inline(always)]
437 pub fn atest_in(self) -> &'a mut W {
438 self.variant(GPIO0FUNCTION_SELECT_A::ATEST_IN)
439 }
440 #[doc = "`1011`"]
441 #[inline(always)]
442 pub fn swgpio_0(self) -> &'a mut W {
443 self.variant(GPIO0FUNCTION_SELECT_A::SWGPIO_0)
444 }
445 #[doc = "`1110`"]
446 #[inline(always)]
447 pub fn e21_tms(self) -> &'a mut W {
448 self.variant(GPIO0FUNCTION_SELECT_A::E21_TMS)
449 }
450}
451#[doc = "Field `real_gpio_0_func_sel` reader - "]
452pub type REAL_GPIO_0_FUNC_SEL_R = crate::FieldReader<u8, GPIO0REAL_FUNCTION_SELECT_A>;
453#[doc = "\n\nValue on reset: 1"]
454#[derive(Clone, Copy, Debug, PartialEq, Eq)]
455#[repr(u8)]
456pub enum GPIO0REAL_FUNCTION_SELECT_A {
457 #[doc = "0: Function select is reg_gpio_0_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<GPIO0REAL_FUNCTION_SELECT_A> for u8 {
469 #[inline(always)]
470 fn from(variant: GPIO0REAL_FUNCTION_SELECT_A) -> Self {
471 variant as _
472 }
473}
474impl REAL_GPIO_0_FUNC_SEL_R {
475 #[doc = "Get enumerated values variant"]
476 #[inline(always)]
477 pub fn variant(&self) -> Option<GPIO0REAL_FUNCTION_SELECT_A> {
478 match self.bits {
479 0 => Some(GPIO0REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_REG),
480 1 => Some(GPIO0REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_SDIO),
481 12 => Some(GPIO0REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_RF),
482 14 => Some(GPIO0REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_JTAG),
483 15 => Some(GPIO0REAL_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 == GPIO0REAL_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 == GPIO0REAL_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 == GPIO0REAL_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 == GPIO0REAL_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 == GPIO0REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_CCI
511 }
512}
513#[doc = "Field `reg_gpio_1_ie` reader - Input enable for GPIO1."]
514pub type REG_GPIO_1_IE_R = crate::BitReader<GPIO1INPUT_ENABLED_A>;
515#[doc = "Input enable for GPIO1.\n\nValue on reset: 1"]
516#[derive(Clone, Copy, Debug, PartialEq, Eq)]
517pub enum GPIO1INPUT_ENABLED_A {
518 #[doc = "0: `0`"]
519 DISABLED = 0,
520 #[doc = "1: `1`"]
521 ENABLED = 1,
522}
523impl From<GPIO1INPUT_ENABLED_A> for bool {
524 #[inline(always)]
525 fn from(variant: GPIO1INPUT_ENABLED_A) -> Self {
526 variant as u8 != 0
527 }
528}
529impl REG_GPIO_1_IE_R {
530 #[doc = "Get enumerated values variant"]
531 #[inline(always)]
532 pub fn variant(&self) -> GPIO1INPUT_ENABLED_A {
533 match self.bits {
534 false => GPIO1INPUT_ENABLED_A::DISABLED,
535 true => GPIO1INPUT_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 == GPIO1INPUT_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 == GPIO1INPUT_ENABLED_A::ENABLED
547 }
548}
549#[doc = "Field `reg_gpio_1_ie` writer - Input enable for GPIO1."]
550pub type REG_GPIO_1_IE_W<'a, const O: u8> =
551 crate::BitWriter<'a, u32, GPIO_CFGCTL0_SPEC, GPIO1INPUT_ENABLED_A, O>;
552impl<'a, const O: u8> REG_GPIO_1_IE_W<'a, O> {
553 #[doc = "`0`"]
554 #[inline(always)]
555 pub fn disabled(self) -> &'a mut W {
556 self.variant(GPIO1INPUT_ENABLED_A::DISABLED)
557 }
558 #[doc = "`1`"]
559 #[inline(always)]
560 pub fn enabled(self) -> &'a mut W {
561 self.variant(GPIO1INPUT_ENABLED_A::ENABLED)
562 }
563}
564#[doc = "Field `reg_gpio_1_smt` reader - Schmitt trigger enabled for GPIO1."]
565pub type REG_GPIO_1_SMT_R = crate::BitReader<GPIO1SCHMITT_A>;
566#[doc = "Schmitt trigger enabled for GPIO1.\n\nValue on reset: 1"]
567#[derive(Clone, Copy, Debug, PartialEq, Eq)]
568pub enum GPIO1SCHMITT_A {
569 #[doc = "0: `0`"]
570 DISABLED = 0,
571 #[doc = "1: `1`"]
572 ENABLED = 1,
573}
574impl From<GPIO1SCHMITT_A> for bool {
575 #[inline(always)]
576 fn from(variant: GPIO1SCHMITT_A) -> Self {
577 variant as u8 != 0
578 }
579}
580impl REG_GPIO_1_SMT_R {
581 #[doc = "Get enumerated values variant"]
582 #[inline(always)]
583 pub fn variant(&self) -> GPIO1SCHMITT_A {
584 match self.bits {
585 false => GPIO1SCHMITT_A::DISABLED,
586 true => GPIO1SCHMITT_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 == GPIO1SCHMITT_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 == GPIO1SCHMITT_A::ENABLED
598 }
599}
600#[doc = "Field `reg_gpio_1_smt` writer - Schmitt trigger enabled for GPIO1."]
601pub type REG_GPIO_1_SMT_W<'a, const O: u8> =
602 crate::BitWriter<'a, u32, GPIO_CFGCTL0_SPEC, GPIO1SCHMITT_A, O>;
603impl<'a, const O: u8> REG_GPIO_1_SMT_W<'a, O> {
604 #[doc = "`0`"]
605 #[inline(always)]
606 pub fn disabled(self) -> &'a mut W {
607 self.variant(GPIO1SCHMITT_A::DISABLED)
608 }
609 #[doc = "`1`"]
610 #[inline(always)]
611 pub fn enabled(self) -> &'a mut W {
612 self.variant(GPIO1SCHMITT_A::ENABLED)
613 }
614}
615#[doc = "Field `reg_gpio_1_drv` reader - Driving control enabled for GPIO1."]
616pub type REG_GPIO_1_DRV_R = crate::FieldReader<u8, GPIO1DRIVING_A>;
617#[doc = "Driving control enabled for GPIO1.\n\nValue on reset: 0"]
618#[derive(Clone, Copy, Debug, PartialEq, Eq)]
619#[repr(u8)]
620pub enum GPIO1DRIVING_A {
621 #[doc = "0: `0`"]
622 DISABLED = 0,
623 #[doc = "1: `1`"]
624 ENABLED = 1,
625}
626impl From<GPIO1DRIVING_A> for u8 {
627 #[inline(always)]
628 fn from(variant: GPIO1DRIVING_A) -> Self {
629 variant as _
630 }
631}
632impl REG_GPIO_1_DRV_R {
633 #[doc = "Get enumerated values variant"]
634 #[inline(always)]
635 pub fn variant(&self) -> Option<GPIO1DRIVING_A> {
636 match self.bits {
637 0 => Some(GPIO1DRIVING_A::DISABLED),
638 1 => Some(GPIO1DRIVING_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 == GPIO1DRIVING_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 == GPIO1DRIVING_A::ENABLED
651 }
652}
653#[doc = "Field `reg_gpio_1_drv` writer - Driving control enabled for GPIO1."]
654pub type REG_GPIO_1_DRV_W<'a, const O: u8> =
655 crate::FieldWriter<'a, u32, GPIO_CFGCTL0_SPEC, u8, GPIO1DRIVING_A, 2, O>;
656impl<'a, const O: u8> REG_GPIO_1_DRV_W<'a, O> {
657 #[doc = "`0`"]
658 #[inline(always)]
659 pub fn disabled(self) -> &'a mut W {
660 self.variant(GPIO1DRIVING_A::DISABLED)
661 }
662 #[doc = "`1`"]
663 #[inline(always)]
664 pub fn enabled(self) -> &'a mut W {
665 self.variant(GPIO1DRIVING_A::ENABLED)
666 }
667}
668#[doc = "Field `reg_gpio_1_pu` reader - Pull Up Resistor for GPIO1."]
669pub type REG_GPIO_1_PU_R = crate::BitReader<GPIO1PULL_UP_RESISTOR_A>;
670#[doc = "Pull Up Resistor for GPIO1.\n\nValue on reset: 0"]
671#[derive(Clone, Copy, Debug, PartialEq, Eq)]
672pub enum GPIO1PULL_UP_RESISTOR_A {
673 #[doc = "0: `0`"]
674 DISABLED = 0,
675 #[doc = "1: `1`"]
676 ENABLED = 1,
677}
678impl From<GPIO1PULL_UP_RESISTOR_A> for bool {
679 #[inline(always)]
680 fn from(variant: GPIO1PULL_UP_RESISTOR_A) -> Self {
681 variant as u8 != 0
682 }
683}
684impl REG_GPIO_1_PU_R {
685 #[doc = "Get enumerated values variant"]
686 #[inline(always)]
687 pub fn variant(&self) -> GPIO1PULL_UP_RESISTOR_A {
688 match self.bits {
689 false => GPIO1PULL_UP_RESISTOR_A::DISABLED,
690 true => GPIO1PULL_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 == GPIO1PULL_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 == GPIO1PULL_UP_RESISTOR_A::ENABLED
702 }
703}
704#[doc = "Field `reg_gpio_1_pu` writer - Pull Up Resistor for GPIO1."]
705pub type REG_GPIO_1_PU_W<'a, const O: u8> =
706 crate::BitWriter<'a, u32, GPIO_CFGCTL0_SPEC, GPIO1PULL_UP_RESISTOR_A, O>;
707impl<'a, const O: u8> REG_GPIO_1_PU_W<'a, O> {
708 #[doc = "`0`"]
709 #[inline(always)]
710 pub fn disabled(self) -> &'a mut W {
711 self.variant(GPIO1PULL_UP_RESISTOR_A::DISABLED)
712 }
713 #[doc = "`1`"]
714 #[inline(always)]
715 pub fn enabled(self) -> &'a mut W {
716 self.variant(GPIO1PULL_UP_RESISTOR_A::ENABLED)
717 }
718}
719#[doc = "Field `reg_gpio_1_pd` reader - Pull Down Resistor for GPIO1."]
720pub type REG_GPIO_1_PD_R = crate::BitReader<GPIO1PULL_DOWN_RESISTOR_A>;
721#[doc = "Pull Down Resistor for GPIO1.\n\nValue on reset: 0"]
722#[derive(Clone, Copy, Debug, PartialEq, Eq)]
723pub enum GPIO1PULL_DOWN_RESISTOR_A {
724 #[doc = "0: `0`"]
725 DISABLED = 0,
726 #[doc = "1: `1`"]
727 ENABLED = 1,
728}
729impl From<GPIO1PULL_DOWN_RESISTOR_A> for bool {
730 #[inline(always)]
731 fn from(variant: GPIO1PULL_DOWN_RESISTOR_A) -> Self {
732 variant as u8 != 0
733 }
734}
735impl REG_GPIO_1_PD_R {
736 #[doc = "Get enumerated values variant"]
737 #[inline(always)]
738 pub fn variant(&self) -> GPIO1PULL_DOWN_RESISTOR_A {
739 match self.bits {
740 false => GPIO1PULL_DOWN_RESISTOR_A::DISABLED,
741 true => GPIO1PULL_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 == GPIO1PULL_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 == GPIO1PULL_DOWN_RESISTOR_A::ENABLED
753 }
754}
755#[doc = "Field `reg_gpio_1_pd` writer - Pull Down Resistor for GPIO1."]
756pub type REG_GPIO_1_PD_W<'a, const O: u8> =
757 crate::BitWriter<'a, u32, GPIO_CFGCTL0_SPEC, GPIO1PULL_DOWN_RESISTOR_A, O>;
758impl<'a, const O: u8> REG_GPIO_1_PD_W<'a, O> {
759 #[doc = "`0`"]
760 #[inline(always)]
761 pub fn disabled(self) -> &'a mut W {
762 self.variant(GPIO1PULL_DOWN_RESISTOR_A::DISABLED)
763 }
764 #[doc = "`1`"]
765 #[inline(always)]
766 pub fn enabled(self) -> &'a mut W {
767 self.variant(GPIO1PULL_DOWN_RESISTOR_A::ENABLED)
768 }
769}
770#[doc = "Field `reg_gpio_1_func_sel` reader - Function select for GPIO1."]
771pub type REG_GPIO_1_FUNC_SEL_R = crate::FieldReader<u8, GPIO1FUNCTION_SELECT_A>;
772#[doc = "Function select for GPIO1.\n\nValue on reset: 1"]
773#[derive(Clone, Copy, Debug, PartialEq, Eq)]
774#[repr(u8)]
775pub enum GPIO1FUNCTION_SELECT_A {
776 #[doc = "1: `1`"]
777 SDIO_CMD = 1,
778 #[doc = "2: `10`"]
779 SF_D2 = 2,
780 #[doc = "4: `100`"]
781 SPI_MOSI_SPI_MISO = 4,
782 #[doc = "6: `110`"]
783 I2C_SDA = 6,
784 #[doc = "7: `111`"]
785 UART_SIG1 = 7,
786 #[doc = "8: `1000`"]
787 PWM_CH1 = 8,
788 #[doc = "9: `1001`"]
789 FEM_GPIO_1 = 9,
790 #[doc = "10: `1010`"]
791 ATEST_IP = 10,
792 #[doc = "11: `1011`"]
793 SWGPIO_1 = 11,
794 #[doc = "14: `1110`"]
795 E21_TDI = 14,
796}
797impl From<GPIO1FUNCTION_SELECT_A> for u8 {
798 #[inline(always)]
799 fn from(variant: GPIO1FUNCTION_SELECT_A) -> Self {
800 variant as _
801 }
802}
803impl REG_GPIO_1_FUNC_SEL_R {
804 #[doc = "Get enumerated values variant"]
805 #[inline(always)]
806 pub fn variant(&self) -> Option<GPIO1FUNCTION_SELECT_A> {
807 match self.bits {
808 1 => Some(GPIO1FUNCTION_SELECT_A::SDIO_CMD),
809 2 => Some(GPIO1FUNCTION_SELECT_A::SF_D2),
810 4 => Some(GPIO1FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO),
811 6 => Some(GPIO1FUNCTION_SELECT_A::I2C_SDA),
812 7 => Some(GPIO1FUNCTION_SELECT_A::UART_SIG1),
813 8 => Some(GPIO1FUNCTION_SELECT_A::PWM_CH1),
814 9 => Some(GPIO1FUNCTION_SELECT_A::FEM_GPIO_1),
815 10 => Some(GPIO1FUNCTION_SELECT_A::ATEST_IP),
816 11 => Some(GPIO1FUNCTION_SELECT_A::SWGPIO_1),
817 14 => Some(GPIO1FUNCTION_SELECT_A::E21_TDI),
818 _ => None,
819 }
820 }
821 #[doc = "Checks if the value of the field is `SDIO_CMD`"]
822 #[inline(always)]
823 pub fn is_sdio_cmd(&self) -> bool {
824 *self == GPIO1FUNCTION_SELECT_A::SDIO_CMD
825 }
826 #[doc = "Checks if the value of the field is `SF_D2`"]
827 #[inline(always)]
828 pub fn is_sf_d2(&self) -> bool {
829 *self == GPIO1FUNCTION_SELECT_A::SF_D2
830 }
831 #[doc = "Checks if the value of the field is `SPI_MOSI_SPI_MISO`"]
832 #[inline(always)]
833 pub fn is_spi_mosi_spi_miso(&self) -> bool {
834 *self == GPIO1FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO
835 }
836 #[doc = "Checks if the value of the field is `I2C_SDA`"]
837 #[inline(always)]
838 pub fn is_i2c_sda(&self) -> bool {
839 *self == GPIO1FUNCTION_SELECT_A::I2C_SDA
840 }
841 #[doc = "Checks if the value of the field is `UART_SIG1`"]
842 #[inline(always)]
843 pub fn is_uart_sig1(&self) -> bool {
844 *self == GPIO1FUNCTION_SELECT_A::UART_SIG1
845 }
846 #[doc = "Checks if the value of the field is `PWM_CH1`"]
847 #[inline(always)]
848 pub fn is_pwm_ch1(&self) -> bool {
849 *self == GPIO1FUNCTION_SELECT_A::PWM_CH1
850 }
851 #[doc = "Checks if the value of the field is `FEM_GPIO_1`"]
852 #[inline(always)]
853 pub fn is_fem_gpio_1(&self) -> bool {
854 *self == GPIO1FUNCTION_SELECT_A::FEM_GPIO_1
855 }
856 #[doc = "Checks if the value of the field is `ATEST_IP`"]
857 #[inline(always)]
858 pub fn is_atest_ip(&self) -> bool {
859 *self == GPIO1FUNCTION_SELECT_A::ATEST_IP
860 }
861 #[doc = "Checks if the value of the field is `SWGPIO_1`"]
862 #[inline(always)]
863 pub fn is_swgpio_1(&self) -> bool {
864 *self == GPIO1FUNCTION_SELECT_A::SWGPIO_1
865 }
866 #[doc = "Checks if the value of the field is `E21_TDI`"]
867 #[inline(always)]
868 pub fn is_e21_tdi(&self) -> bool {
869 *self == GPIO1FUNCTION_SELECT_A::E21_TDI
870 }
871}
872#[doc = "Field `reg_gpio_1_func_sel` writer - Function select for GPIO1."]
873pub type REG_GPIO_1_FUNC_SEL_W<'a, const O: u8> =
874 crate::FieldWriter<'a, u32, GPIO_CFGCTL0_SPEC, u8, GPIO1FUNCTION_SELECT_A, 4, O>;
875impl<'a, const O: u8> REG_GPIO_1_FUNC_SEL_W<'a, O> {
876 #[doc = "`1`"]
877 #[inline(always)]
878 pub fn sdio_cmd(self) -> &'a mut W {
879 self.variant(GPIO1FUNCTION_SELECT_A::SDIO_CMD)
880 }
881 #[doc = "`10`"]
882 #[inline(always)]
883 pub fn sf_d2(self) -> &'a mut W {
884 self.variant(GPIO1FUNCTION_SELECT_A::SF_D2)
885 }
886 #[doc = "`100`"]
887 #[inline(always)]
888 pub fn spi_mosi_spi_miso(self) -> &'a mut W {
889 self.variant(GPIO1FUNCTION_SELECT_A::SPI_MOSI_SPI_MISO)
890 }
891 #[doc = "`110`"]
892 #[inline(always)]
893 pub fn i2c_sda(self) -> &'a mut W {
894 self.variant(GPIO1FUNCTION_SELECT_A::I2C_SDA)
895 }
896 #[doc = "`111`"]
897 #[inline(always)]
898 pub fn uart_sig1(self) -> &'a mut W {
899 self.variant(GPIO1FUNCTION_SELECT_A::UART_SIG1)
900 }
901 #[doc = "`1000`"]
902 #[inline(always)]
903 pub fn pwm_ch1(self) -> &'a mut W {
904 self.variant(GPIO1FUNCTION_SELECT_A::PWM_CH1)
905 }
906 #[doc = "`1001`"]
907 #[inline(always)]
908 pub fn fem_gpio_1(self) -> &'a mut W {
909 self.variant(GPIO1FUNCTION_SELECT_A::FEM_GPIO_1)
910 }
911 #[doc = "`1010`"]
912 #[inline(always)]
913 pub fn atest_ip(self) -> &'a mut W {
914 self.variant(GPIO1FUNCTION_SELECT_A::ATEST_IP)
915 }
916 #[doc = "`1011`"]
917 #[inline(always)]
918 pub fn swgpio_1(self) -> &'a mut W {
919 self.variant(GPIO1FUNCTION_SELECT_A::SWGPIO_1)
920 }
921 #[doc = "`1110`"]
922 #[inline(always)]
923 pub fn e21_tdi(self) -> &'a mut W {
924 self.variant(GPIO1FUNCTION_SELECT_A::E21_TDI)
925 }
926}
927#[doc = "Field `real_gpio_1_func_sel` reader - "]
928pub type REAL_GPIO_1_FUNC_SEL_R = crate::FieldReader<u8, GPIO1REAL_FUNCTION_SELECT_A>;
929#[doc = "\n\nValue on reset: 1"]
930#[derive(Clone, Copy, Debug, PartialEq, Eq)]
931#[repr(u8)]
932pub enum GPIO1REAL_FUNCTION_SELECT_A {
933 #[doc = "0: Function select is reg_gpio_1_func_sel"]
934 GLB_GPIO_REAL_MODE_REG = 0,
935 #[doc = "1: `1`"]
936 GLB_GPIO_REAL_MODE_SDIO = 1,
937 #[doc = "12: `1100`"]
938 GLB_GPIO_REAL_MODE_RF = 12,
939 #[doc = "14: `1110`"]
940 GLB_GPIO_REAL_MODE_JTAG = 14,
941 #[doc = "15: `1111`"]
942 GLB_GPIO_REAL_MODE_CCI = 15,
943}
944impl From<GPIO1REAL_FUNCTION_SELECT_A> for u8 {
945 #[inline(always)]
946 fn from(variant: GPIO1REAL_FUNCTION_SELECT_A) -> Self {
947 variant as _
948 }
949}
950impl REAL_GPIO_1_FUNC_SEL_R {
951 #[doc = "Get enumerated values variant"]
952 #[inline(always)]
953 pub fn variant(&self) -> Option<GPIO1REAL_FUNCTION_SELECT_A> {
954 match self.bits {
955 0 => Some(GPIO1REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_REG),
956 1 => Some(GPIO1REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_SDIO),
957 12 => Some(GPIO1REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_RF),
958 14 => Some(GPIO1REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_JTAG),
959 15 => Some(GPIO1REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_CCI),
960 _ => None,
961 }
962 }
963 #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_REG`"]
964 #[inline(always)]
965 pub fn is_glb_gpio_real_mode_reg(&self) -> bool {
966 *self == GPIO1REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_REG
967 }
968 #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_SDIO`"]
969 #[inline(always)]
970 pub fn is_glb_gpio_real_mode_sdio(&self) -> bool {
971 *self == GPIO1REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_SDIO
972 }
973 #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_RF`"]
974 #[inline(always)]
975 pub fn is_glb_gpio_real_mode_rf(&self) -> bool {
976 *self == GPIO1REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_RF
977 }
978 #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_JTAG`"]
979 #[inline(always)]
980 pub fn is_glb_gpio_real_mode_jtag(&self) -> bool {
981 *self == GPIO1REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_JTAG
982 }
983 #[doc = "Checks if the value of the field is `GLB_GPIO_REAL_MODE_CCI`"]
984 #[inline(always)]
985 pub fn is_glb_gpio_real_mode_cci(&self) -> bool {
986 *self == GPIO1REAL_FUNCTION_SELECT_A::GLB_GPIO_REAL_MODE_CCI
987 }
988}
989impl R {
990 #[doc = "Bit 0 - GPIO0 input enable."]
991 #[inline(always)]
992 pub fn reg_gpio_0_ie(&self) -> REG_GPIO_0_IE_R {
993 REG_GPIO_0_IE_R::new((self.bits & 1) != 0)
994 }
995 #[doc = "Bit 1 - Schmitt trigger enabled for GPIO0."]
996 #[inline(always)]
997 pub fn reg_gpio_0_smt(&self) -> REG_GPIO_0_SMT_R {
998 REG_GPIO_0_SMT_R::new(((self.bits >> 1) & 1) != 0)
999 }
1000 #[doc = "Bits 2:3 - Driving control for GPIO0."]
1001 #[inline(always)]
1002 pub fn reg_gpio_0_drv(&self) -> REG_GPIO_0_DRV_R {
1003 REG_GPIO_0_DRV_R::new(((self.bits >> 2) & 3) as u8)
1004 }
1005 #[doc = "Bit 4 - Pull Up Resistor for GPIO0."]
1006 #[inline(always)]
1007 pub fn reg_gpio_0_pu(&self) -> REG_GPIO_0_PU_R {
1008 REG_GPIO_0_PU_R::new(((self.bits >> 4) & 1) != 0)
1009 }
1010 #[doc = "Bit 5 - Pull Down Resistor for GPIO0."]
1011 #[inline(always)]
1012 pub fn reg_gpio_0_pd(&self) -> REG_GPIO_0_PD_R {
1013 REG_GPIO_0_PD_R::new(((self.bits >> 5) & 1) != 0)
1014 }
1015 #[doc = "Bits 8:11 - Function select for GPIO0."]
1016 #[inline(always)]
1017 pub fn reg_gpio_0_func_sel(&self) -> REG_GPIO_0_FUNC_SEL_R {
1018 REG_GPIO_0_FUNC_SEL_R::new(((self.bits >> 8) & 0x0f) as u8)
1019 }
1020 #[doc = "Bits 12:15"]
1021 #[inline(always)]
1022 pub fn real_gpio_0_func_sel(&self) -> REAL_GPIO_0_FUNC_SEL_R {
1023 REAL_GPIO_0_FUNC_SEL_R::new(((self.bits >> 12) & 0x0f) as u8)
1024 }
1025 #[doc = "Bit 16 - Input enable for GPIO1."]
1026 #[inline(always)]
1027 pub fn reg_gpio_1_ie(&self) -> REG_GPIO_1_IE_R {
1028 REG_GPIO_1_IE_R::new(((self.bits >> 16) & 1) != 0)
1029 }
1030 #[doc = "Bit 17 - Schmitt trigger enabled for GPIO1."]
1031 #[inline(always)]
1032 pub fn reg_gpio_1_smt(&self) -> REG_GPIO_1_SMT_R {
1033 REG_GPIO_1_SMT_R::new(((self.bits >> 17) & 1) != 0)
1034 }
1035 #[doc = "Bits 18:19 - Driving control enabled for GPIO1."]
1036 #[inline(always)]
1037 pub fn reg_gpio_1_drv(&self) -> REG_GPIO_1_DRV_R {
1038 REG_GPIO_1_DRV_R::new(((self.bits >> 18) & 3) as u8)
1039 }
1040 #[doc = "Bit 20 - Pull Up Resistor for GPIO1."]
1041 #[inline(always)]
1042 pub fn reg_gpio_1_pu(&self) -> REG_GPIO_1_PU_R {
1043 REG_GPIO_1_PU_R::new(((self.bits >> 20) & 1) != 0)
1044 }
1045 #[doc = "Bit 21 - Pull Down Resistor for GPIO1."]
1046 #[inline(always)]
1047 pub fn reg_gpio_1_pd(&self) -> REG_GPIO_1_PD_R {
1048 REG_GPIO_1_PD_R::new(((self.bits >> 21) & 1) != 0)
1049 }
1050 #[doc = "Bits 24:27 - Function select for GPIO1."]
1051 #[inline(always)]
1052 pub fn reg_gpio_1_func_sel(&self) -> REG_GPIO_1_FUNC_SEL_R {
1053 REG_GPIO_1_FUNC_SEL_R::new(((self.bits >> 24) & 0x0f) as u8)
1054 }
1055 #[doc = "Bits 28:31"]
1056 #[inline(always)]
1057 pub fn real_gpio_1_func_sel(&self) -> REAL_GPIO_1_FUNC_SEL_R {
1058 REAL_GPIO_1_FUNC_SEL_R::new(((self.bits >> 28) & 0x0f) as u8)
1059 }
1060}
1061impl W {
1062 #[doc = "Bit 0 - GPIO0 input enable."]
1063 #[inline(always)]
1064 #[must_use]
1065 pub fn reg_gpio_0_ie(&mut self) -> REG_GPIO_0_IE_W<0> {
1066 REG_GPIO_0_IE_W::new(self)
1067 }
1068 #[doc = "Bit 1 - Schmitt trigger enabled for GPIO0."]
1069 #[inline(always)]
1070 #[must_use]
1071 pub fn reg_gpio_0_smt(&mut self) -> REG_GPIO_0_SMT_W<1> {
1072 REG_GPIO_0_SMT_W::new(self)
1073 }
1074 #[doc = "Bits 2:3 - Driving control for GPIO0."]
1075 #[inline(always)]
1076 #[must_use]
1077 pub fn reg_gpio_0_drv(&mut self) -> REG_GPIO_0_DRV_W<2> {
1078 REG_GPIO_0_DRV_W::new(self)
1079 }
1080 #[doc = "Bit 4 - Pull Up Resistor for GPIO0."]
1081 #[inline(always)]
1082 #[must_use]
1083 pub fn reg_gpio_0_pu(&mut self) -> REG_GPIO_0_PU_W<4> {
1084 REG_GPIO_0_PU_W::new(self)
1085 }
1086 #[doc = "Bit 5 - Pull Down Resistor for GPIO0."]
1087 #[inline(always)]
1088 #[must_use]
1089 pub fn reg_gpio_0_pd(&mut self) -> REG_GPIO_0_PD_W<5> {
1090 REG_GPIO_0_PD_W::new(self)
1091 }
1092 #[doc = "Bits 8:11 - Function select for GPIO0."]
1093 #[inline(always)]
1094 #[must_use]
1095 pub fn reg_gpio_0_func_sel(&mut self) -> REG_GPIO_0_FUNC_SEL_W<8> {
1096 REG_GPIO_0_FUNC_SEL_W::new(self)
1097 }
1098 #[doc = "Bit 16 - Input enable for GPIO1."]
1099 #[inline(always)]
1100 #[must_use]
1101 pub fn reg_gpio_1_ie(&mut self) -> REG_GPIO_1_IE_W<16> {
1102 REG_GPIO_1_IE_W::new(self)
1103 }
1104 #[doc = "Bit 17 - Schmitt trigger enabled for GPIO1."]
1105 #[inline(always)]
1106 #[must_use]
1107 pub fn reg_gpio_1_smt(&mut self) -> REG_GPIO_1_SMT_W<17> {
1108 REG_GPIO_1_SMT_W::new(self)
1109 }
1110 #[doc = "Bits 18:19 - Driving control enabled for GPIO1."]
1111 #[inline(always)]
1112 #[must_use]
1113 pub fn reg_gpio_1_drv(&mut self) -> REG_GPIO_1_DRV_W<18> {
1114 REG_GPIO_1_DRV_W::new(self)
1115 }
1116 #[doc = "Bit 20 - Pull Up Resistor for GPIO1."]
1117 #[inline(always)]
1118 #[must_use]
1119 pub fn reg_gpio_1_pu(&mut self) -> REG_GPIO_1_PU_W<20> {
1120 REG_GPIO_1_PU_W::new(self)
1121 }
1122 #[doc = "Bit 21 - Pull Down Resistor for GPIO1."]
1123 #[inline(always)]
1124 #[must_use]
1125 pub fn reg_gpio_1_pd(&mut self) -> REG_GPIO_1_PD_W<21> {
1126 REG_GPIO_1_PD_W::new(self)
1127 }
1128 #[doc = "Bits 24:27 - Function select for GPIO1."]
1129 #[inline(always)]
1130 #[must_use]
1131 pub fn reg_gpio_1_func_sel(&mut self) -> REG_GPIO_1_FUNC_SEL_W<24> {
1132 REG_GPIO_1_FUNC_SEL_W::new(self)
1133 }
1134 #[doc = "Writes raw bits to the register."]
1135 #[inline(always)]
1136 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1137 self.0.bits(bits);
1138 self
1139 }
1140}
1141#[doc = "GPIO0, GPIO1 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_cfgctl0](index.html) module"]
1142pub struct GPIO_CFGCTL0_SPEC;
1143impl crate::RegisterSpec for GPIO_CFGCTL0_SPEC {
1144 type Ux = u32;
1145}
1146#[doc = "`read()` method returns [gpio_cfgctl0::R](R) reader structure"]
1147impl crate::Readable for GPIO_CFGCTL0_SPEC {
1148 type Reader = R;
1149}
1150#[doc = "`write(|w| ..)` method takes [gpio_cfgctl0::W](W) writer structure"]
1151impl crate::Writable for GPIO_CFGCTL0_SPEC {
1152 type Writer = W;
1153 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
1154 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
1155}
1156#[doc = "`reset()` method sets GPIO_CFGCTL0 to value 0x1103_1103"]
1157impl crate::Resettable for GPIO_CFGCTL0_SPEC {
1158 const RESET_VALUE: Self::Ux = 0x1103_1103;
1159}