1#[doc = "Register `pf_cfg0` reader"]
2pub type R = crate::R<PF_CFG0_SPEC>;
3#[doc = "Register `pf_cfg0` writer"]
4pub type W = crate::W<PF_CFG0_SPEC>;
5#[doc = "Field `pf0_select` reader - PF0 Select"]
6pub type PF0_SELECT_R = crate::FieldReader<PF0_SELECT_A>;
7#[doc = "PF0 Select\n\nValue on reset: 0"]
8#[derive(Clone, Copy, Debug, PartialEq, Eq)]
9#[repr(u8)]
10pub enum PF0_SELECT_A {
11 #[doc = "0: `0`"]
12 INPUT = 0,
13 #[doc = "2: `10`"]
14 SDC0_D1 = 2,
15 #[doc = "4: `100`"]
16 R_JTAG_MS = 4,
17 #[doc = "6: `110`"]
18 I2S2_DIN0 = 6,
19 #[doc = "14: `1110`"]
20 PF_EINT0 = 14,
21 #[doc = "1: `1`"]
22 OUTPUT = 1,
23 #[doc = "3: `11`"]
24 JTAG_MS = 3,
25 #[doc = "5: `101`"]
26 I2S2_DOUT1 = 5,
27 #[doc = "15: `1111`"]
28 IO_DISABLE = 15,
29}
30impl From<PF0_SELECT_A> for u8 {
31 #[inline(always)]
32 fn from(variant: PF0_SELECT_A) -> Self {
33 variant as _
34 }
35}
36impl crate::FieldSpec for PF0_SELECT_A {
37 type Ux = u8;
38}
39impl PF0_SELECT_R {
40 #[doc = "Get enumerated values variant"]
41 #[inline(always)]
42 pub const fn variant(&self) -> Option<PF0_SELECT_A> {
43 match self.bits {
44 0 => Some(PF0_SELECT_A::INPUT),
45 2 => Some(PF0_SELECT_A::SDC0_D1),
46 4 => Some(PF0_SELECT_A::R_JTAG_MS),
47 6 => Some(PF0_SELECT_A::I2S2_DIN0),
48 14 => Some(PF0_SELECT_A::PF_EINT0),
49 1 => Some(PF0_SELECT_A::OUTPUT),
50 3 => Some(PF0_SELECT_A::JTAG_MS),
51 5 => Some(PF0_SELECT_A::I2S2_DOUT1),
52 15 => Some(PF0_SELECT_A::IO_DISABLE),
53 _ => None,
54 }
55 }
56 #[doc = "`0`"]
57 #[inline(always)]
58 pub fn is_input(&self) -> bool {
59 *self == PF0_SELECT_A::INPUT
60 }
61 #[doc = "`10`"]
62 #[inline(always)]
63 pub fn is_sdc0_d1(&self) -> bool {
64 *self == PF0_SELECT_A::SDC0_D1
65 }
66 #[doc = "`100`"]
67 #[inline(always)]
68 pub fn is_r_jtag_ms(&self) -> bool {
69 *self == PF0_SELECT_A::R_JTAG_MS
70 }
71 #[doc = "`110`"]
72 #[inline(always)]
73 pub fn is_i2s2_din0(&self) -> bool {
74 *self == PF0_SELECT_A::I2S2_DIN0
75 }
76 #[doc = "`1110`"]
77 #[inline(always)]
78 pub fn is_pf_eint0(&self) -> bool {
79 *self == PF0_SELECT_A::PF_EINT0
80 }
81 #[doc = "`1`"]
82 #[inline(always)]
83 pub fn is_output(&self) -> bool {
84 *self == PF0_SELECT_A::OUTPUT
85 }
86 #[doc = "`11`"]
87 #[inline(always)]
88 pub fn is_jtag_ms(&self) -> bool {
89 *self == PF0_SELECT_A::JTAG_MS
90 }
91 #[doc = "`101`"]
92 #[inline(always)]
93 pub fn is_i2s2_dout1(&self) -> bool {
94 *self == PF0_SELECT_A::I2S2_DOUT1
95 }
96 #[doc = "`1111`"]
97 #[inline(always)]
98 pub fn is_io_disable(&self) -> bool {
99 *self == PF0_SELECT_A::IO_DISABLE
100 }
101}
102#[doc = "Field `pf0_select` writer - PF0 Select"]
103pub type PF0_SELECT_W<'a, REG> = crate::FieldWriter<'a, REG, 4, PF0_SELECT_A>;
104impl<'a, REG> PF0_SELECT_W<'a, REG>
105where
106 REG: crate::Writable + crate::RegisterSpec,
107 REG::Ux: From<u8>,
108{
109 #[doc = "`0`"]
110 #[inline(always)]
111 pub fn input(self) -> &'a mut crate::W<REG> {
112 self.variant(PF0_SELECT_A::INPUT)
113 }
114 #[doc = "`10`"]
115 #[inline(always)]
116 pub fn sdc0_d1(self) -> &'a mut crate::W<REG> {
117 self.variant(PF0_SELECT_A::SDC0_D1)
118 }
119 #[doc = "`100`"]
120 #[inline(always)]
121 pub fn r_jtag_ms(self) -> &'a mut crate::W<REG> {
122 self.variant(PF0_SELECT_A::R_JTAG_MS)
123 }
124 #[doc = "`110`"]
125 #[inline(always)]
126 pub fn i2s2_din0(self) -> &'a mut crate::W<REG> {
127 self.variant(PF0_SELECT_A::I2S2_DIN0)
128 }
129 #[doc = "`1110`"]
130 #[inline(always)]
131 pub fn pf_eint0(self) -> &'a mut crate::W<REG> {
132 self.variant(PF0_SELECT_A::PF_EINT0)
133 }
134 #[doc = "`1`"]
135 #[inline(always)]
136 pub fn output(self) -> &'a mut crate::W<REG> {
137 self.variant(PF0_SELECT_A::OUTPUT)
138 }
139 #[doc = "`11`"]
140 #[inline(always)]
141 pub fn jtag_ms(self) -> &'a mut crate::W<REG> {
142 self.variant(PF0_SELECT_A::JTAG_MS)
143 }
144 #[doc = "`101`"]
145 #[inline(always)]
146 pub fn i2s2_dout1(self) -> &'a mut crate::W<REG> {
147 self.variant(PF0_SELECT_A::I2S2_DOUT1)
148 }
149 #[doc = "`1111`"]
150 #[inline(always)]
151 pub fn io_disable(self) -> &'a mut crate::W<REG> {
152 self.variant(PF0_SELECT_A::IO_DISABLE)
153 }
154}
155#[doc = "Field `pf1_select` reader - PF1 Select"]
156pub type PF1_SELECT_R = crate::FieldReader<PF1_SELECT_A>;
157#[doc = "PF1 Select\n\nValue on reset: 0"]
158#[derive(Clone, Copy, Debug, PartialEq, Eq)]
159#[repr(u8)]
160pub enum PF1_SELECT_A {
161 #[doc = "0: `0`"]
162 INPUT = 0,
163 #[doc = "2: `10`"]
164 SDC0_D0 = 2,
165 #[doc = "4: `100`"]
166 R_JTAG_DI = 4,
167 #[doc = "6: `110`"]
168 I2S2_DIN1 = 6,
169 #[doc = "14: `1110`"]
170 PF_EINT1 = 14,
171 #[doc = "1: `1`"]
172 OUTPUT = 1,
173 #[doc = "3: `11`"]
174 JTAG_DI = 3,
175 #[doc = "5: `101`"]
176 I2S2_DOUT0 = 5,
177 #[doc = "15: `1111`"]
178 IO_DISABLE = 15,
179}
180impl From<PF1_SELECT_A> for u8 {
181 #[inline(always)]
182 fn from(variant: PF1_SELECT_A) -> Self {
183 variant as _
184 }
185}
186impl crate::FieldSpec for PF1_SELECT_A {
187 type Ux = u8;
188}
189impl PF1_SELECT_R {
190 #[doc = "Get enumerated values variant"]
191 #[inline(always)]
192 pub const fn variant(&self) -> Option<PF1_SELECT_A> {
193 match self.bits {
194 0 => Some(PF1_SELECT_A::INPUT),
195 2 => Some(PF1_SELECT_A::SDC0_D0),
196 4 => Some(PF1_SELECT_A::R_JTAG_DI),
197 6 => Some(PF1_SELECT_A::I2S2_DIN1),
198 14 => Some(PF1_SELECT_A::PF_EINT1),
199 1 => Some(PF1_SELECT_A::OUTPUT),
200 3 => Some(PF1_SELECT_A::JTAG_DI),
201 5 => Some(PF1_SELECT_A::I2S2_DOUT0),
202 15 => Some(PF1_SELECT_A::IO_DISABLE),
203 _ => None,
204 }
205 }
206 #[doc = "`0`"]
207 #[inline(always)]
208 pub fn is_input(&self) -> bool {
209 *self == PF1_SELECT_A::INPUT
210 }
211 #[doc = "`10`"]
212 #[inline(always)]
213 pub fn is_sdc0_d0(&self) -> bool {
214 *self == PF1_SELECT_A::SDC0_D0
215 }
216 #[doc = "`100`"]
217 #[inline(always)]
218 pub fn is_r_jtag_di(&self) -> bool {
219 *self == PF1_SELECT_A::R_JTAG_DI
220 }
221 #[doc = "`110`"]
222 #[inline(always)]
223 pub fn is_i2s2_din1(&self) -> bool {
224 *self == PF1_SELECT_A::I2S2_DIN1
225 }
226 #[doc = "`1110`"]
227 #[inline(always)]
228 pub fn is_pf_eint1(&self) -> bool {
229 *self == PF1_SELECT_A::PF_EINT1
230 }
231 #[doc = "`1`"]
232 #[inline(always)]
233 pub fn is_output(&self) -> bool {
234 *self == PF1_SELECT_A::OUTPUT
235 }
236 #[doc = "`11`"]
237 #[inline(always)]
238 pub fn is_jtag_di(&self) -> bool {
239 *self == PF1_SELECT_A::JTAG_DI
240 }
241 #[doc = "`101`"]
242 #[inline(always)]
243 pub fn is_i2s2_dout0(&self) -> bool {
244 *self == PF1_SELECT_A::I2S2_DOUT0
245 }
246 #[doc = "`1111`"]
247 #[inline(always)]
248 pub fn is_io_disable(&self) -> bool {
249 *self == PF1_SELECT_A::IO_DISABLE
250 }
251}
252#[doc = "Field `pf1_select` writer - PF1 Select"]
253pub type PF1_SELECT_W<'a, REG> = crate::FieldWriter<'a, REG, 4, PF1_SELECT_A>;
254impl<'a, REG> PF1_SELECT_W<'a, REG>
255where
256 REG: crate::Writable + crate::RegisterSpec,
257 REG::Ux: From<u8>,
258{
259 #[doc = "`0`"]
260 #[inline(always)]
261 pub fn input(self) -> &'a mut crate::W<REG> {
262 self.variant(PF1_SELECT_A::INPUT)
263 }
264 #[doc = "`10`"]
265 #[inline(always)]
266 pub fn sdc0_d0(self) -> &'a mut crate::W<REG> {
267 self.variant(PF1_SELECT_A::SDC0_D0)
268 }
269 #[doc = "`100`"]
270 #[inline(always)]
271 pub fn r_jtag_di(self) -> &'a mut crate::W<REG> {
272 self.variant(PF1_SELECT_A::R_JTAG_DI)
273 }
274 #[doc = "`110`"]
275 #[inline(always)]
276 pub fn i2s2_din1(self) -> &'a mut crate::W<REG> {
277 self.variant(PF1_SELECT_A::I2S2_DIN1)
278 }
279 #[doc = "`1110`"]
280 #[inline(always)]
281 pub fn pf_eint1(self) -> &'a mut crate::W<REG> {
282 self.variant(PF1_SELECT_A::PF_EINT1)
283 }
284 #[doc = "`1`"]
285 #[inline(always)]
286 pub fn output(self) -> &'a mut crate::W<REG> {
287 self.variant(PF1_SELECT_A::OUTPUT)
288 }
289 #[doc = "`11`"]
290 #[inline(always)]
291 pub fn jtag_di(self) -> &'a mut crate::W<REG> {
292 self.variant(PF1_SELECT_A::JTAG_DI)
293 }
294 #[doc = "`101`"]
295 #[inline(always)]
296 pub fn i2s2_dout0(self) -> &'a mut crate::W<REG> {
297 self.variant(PF1_SELECT_A::I2S2_DOUT0)
298 }
299 #[doc = "`1111`"]
300 #[inline(always)]
301 pub fn io_disable(self) -> &'a mut crate::W<REG> {
302 self.variant(PF1_SELECT_A::IO_DISABLE)
303 }
304}
305#[doc = "Field `pf2_select` reader - PF2 Select"]
306pub type PF2_SELECT_R = crate::FieldReader<PF2_SELECT_A>;
307#[doc = "PF2 Select\n\nValue on reset: 0"]
308#[derive(Clone, Copy, Debug, PartialEq, Eq)]
309#[repr(u8)]
310pub enum PF2_SELECT_A {
311 #[doc = "0: `0`"]
312 INPUT = 0,
313 #[doc = "2: `10`"]
314 SDC0_CLK = 2,
315 #[doc = "4: `100`"]
316 TWI0_SCK = 4,
317 #[doc = "6: `110`"]
318 OWA_IN = 6,
319 #[doc = "14: `1110`"]
320 PF_EINT2 = 14,
321 #[doc = "1: `1`"]
322 OUTPUT = 1,
323 #[doc = "3: `11`"]
324 UART0_TX = 3,
325 #[doc = "5: `101`"]
326 LEDC_DO = 5,
327 #[doc = "15: `1111`"]
328 IO_DISABLE = 15,
329}
330impl From<PF2_SELECT_A> for u8 {
331 #[inline(always)]
332 fn from(variant: PF2_SELECT_A) -> Self {
333 variant as _
334 }
335}
336impl crate::FieldSpec for PF2_SELECT_A {
337 type Ux = u8;
338}
339impl PF2_SELECT_R {
340 #[doc = "Get enumerated values variant"]
341 #[inline(always)]
342 pub const fn variant(&self) -> Option<PF2_SELECT_A> {
343 match self.bits {
344 0 => Some(PF2_SELECT_A::INPUT),
345 2 => Some(PF2_SELECT_A::SDC0_CLK),
346 4 => Some(PF2_SELECT_A::TWI0_SCK),
347 6 => Some(PF2_SELECT_A::OWA_IN),
348 14 => Some(PF2_SELECT_A::PF_EINT2),
349 1 => Some(PF2_SELECT_A::OUTPUT),
350 3 => Some(PF2_SELECT_A::UART0_TX),
351 5 => Some(PF2_SELECT_A::LEDC_DO),
352 15 => Some(PF2_SELECT_A::IO_DISABLE),
353 _ => None,
354 }
355 }
356 #[doc = "`0`"]
357 #[inline(always)]
358 pub fn is_input(&self) -> bool {
359 *self == PF2_SELECT_A::INPUT
360 }
361 #[doc = "`10`"]
362 #[inline(always)]
363 pub fn is_sdc0_clk(&self) -> bool {
364 *self == PF2_SELECT_A::SDC0_CLK
365 }
366 #[doc = "`100`"]
367 #[inline(always)]
368 pub fn is_twi0_sck(&self) -> bool {
369 *self == PF2_SELECT_A::TWI0_SCK
370 }
371 #[doc = "`110`"]
372 #[inline(always)]
373 pub fn is_owa_in(&self) -> bool {
374 *self == PF2_SELECT_A::OWA_IN
375 }
376 #[doc = "`1110`"]
377 #[inline(always)]
378 pub fn is_pf_eint2(&self) -> bool {
379 *self == PF2_SELECT_A::PF_EINT2
380 }
381 #[doc = "`1`"]
382 #[inline(always)]
383 pub fn is_output(&self) -> bool {
384 *self == PF2_SELECT_A::OUTPUT
385 }
386 #[doc = "`11`"]
387 #[inline(always)]
388 pub fn is_uart0_tx(&self) -> bool {
389 *self == PF2_SELECT_A::UART0_TX
390 }
391 #[doc = "`101`"]
392 #[inline(always)]
393 pub fn is_ledc_do(&self) -> bool {
394 *self == PF2_SELECT_A::LEDC_DO
395 }
396 #[doc = "`1111`"]
397 #[inline(always)]
398 pub fn is_io_disable(&self) -> bool {
399 *self == PF2_SELECT_A::IO_DISABLE
400 }
401}
402#[doc = "Field `pf2_select` writer - PF2 Select"]
403pub type PF2_SELECT_W<'a, REG> = crate::FieldWriter<'a, REG, 4, PF2_SELECT_A>;
404impl<'a, REG> PF2_SELECT_W<'a, REG>
405where
406 REG: crate::Writable + crate::RegisterSpec,
407 REG::Ux: From<u8>,
408{
409 #[doc = "`0`"]
410 #[inline(always)]
411 pub fn input(self) -> &'a mut crate::W<REG> {
412 self.variant(PF2_SELECT_A::INPUT)
413 }
414 #[doc = "`10`"]
415 #[inline(always)]
416 pub fn sdc0_clk(self) -> &'a mut crate::W<REG> {
417 self.variant(PF2_SELECT_A::SDC0_CLK)
418 }
419 #[doc = "`100`"]
420 #[inline(always)]
421 pub fn twi0_sck(self) -> &'a mut crate::W<REG> {
422 self.variant(PF2_SELECT_A::TWI0_SCK)
423 }
424 #[doc = "`110`"]
425 #[inline(always)]
426 pub fn owa_in(self) -> &'a mut crate::W<REG> {
427 self.variant(PF2_SELECT_A::OWA_IN)
428 }
429 #[doc = "`1110`"]
430 #[inline(always)]
431 pub fn pf_eint2(self) -> &'a mut crate::W<REG> {
432 self.variant(PF2_SELECT_A::PF_EINT2)
433 }
434 #[doc = "`1`"]
435 #[inline(always)]
436 pub fn output(self) -> &'a mut crate::W<REG> {
437 self.variant(PF2_SELECT_A::OUTPUT)
438 }
439 #[doc = "`11`"]
440 #[inline(always)]
441 pub fn uart0_tx(self) -> &'a mut crate::W<REG> {
442 self.variant(PF2_SELECT_A::UART0_TX)
443 }
444 #[doc = "`101`"]
445 #[inline(always)]
446 pub fn ledc_do(self) -> &'a mut crate::W<REG> {
447 self.variant(PF2_SELECT_A::LEDC_DO)
448 }
449 #[doc = "`1111`"]
450 #[inline(always)]
451 pub fn io_disable(self) -> &'a mut crate::W<REG> {
452 self.variant(PF2_SELECT_A::IO_DISABLE)
453 }
454}
455#[doc = "Field `pf3_select` reader - PF3 Select"]
456pub type PF3_SELECT_R = crate::FieldReader<PF3_SELECT_A>;
457#[doc = "PF3 Select\n\nValue on reset: 0"]
458#[derive(Clone, Copy, Debug, PartialEq, Eq)]
459#[repr(u8)]
460pub enum PF3_SELECT_A {
461 #[doc = "0: `0`"]
462 INPUT = 0,
463 #[doc = "2: `10`"]
464 SDC0_CMD = 2,
465 #[doc = "4: `100`"]
466 R_JTAG_DO = 4,
467 #[doc = "14: `1110`"]
468 PF_EINT3 = 14,
469 #[doc = "1: `1`"]
470 OUTPUT = 1,
471 #[doc = "3: `11`"]
472 JTAG_DO = 3,
473 #[doc = "5: `101`"]
474 I2S2_BCLK = 5,
475 #[doc = "15: `1111`"]
476 IO_DISABLE = 15,
477}
478impl From<PF3_SELECT_A> for u8 {
479 #[inline(always)]
480 fn from(variant: PF3_SELECT_A) -> Self {
481 variant as _
482 }
483}
484impl crate::FieldSpec for PF3_SELECT_A {
485 type Ux = u8;
486}
487impl PF3_SELECT_R {
488 #[doc = "Get enumerated values variant"]
489 #[inline(always)]
490 pub const fn variant(&self) -> Option<PF3_SELECT_A> {
491 match self.bits {
492 0 => Some(PF3_SELECT_A::INPUT),
493 2 => Some(PF3_SELECT_A::SDC0_CMD),
494 4 => Some(PF3_SELECT_A::R_JTAG_DO),
495 14 => Some(PF3_SELECT_A::PF_EINT3),
496 1 => Some(PF3_SELECT_A::OUTPUT),
497 3 => Some(PF3_SELECT_A::JTAG_DO),
498 5 => Some(PF3_SELECT_A::I2S2_BCLK),
499 15 => Some(PF3_SELECT_A::IO_DISABLE),
500 _ => None,
501 }
502 }
503 #[doc = "`0`"]
504 #[inline(always)]
505 pub fn is_input(&self) -> bool {
506 *self == PF3_SELECT_A::INPUT
507 }
508 #[doc = "`10`"]
509 #[inline(always)]
510 pub fn is_sdc0_cmd(&self) -> bool {
511 *self == PF3_SELECT_A::SDC0_CMD
512 }
513 #[doc = "`100`"]
514 #[inline(always)]
515 pub fn is_r_jtag_do(&self) -> bool {
516 *self == PF3_SELECT_A::R_JTAG_DO
517 }
518 #[doc = "`1110`"]
519 #[inline(always)]
520 pub fn is_pf_eint3(&self) -> bool {
521 *self == PF3_SELECT_A::PF_EINT3
522 }
523 #[doc = "`1`"]
524 #[inline(always)]
525 pub fn is_output(&self) -> bool {
526 *self == PF3_SELECT_A::OUTPUT
527 }
528 #[doc = "`11`"]
529 #[inline(always)]
530 pub fn is_jtag_do(&self) -> bool {
531 *self == PF3_SELECT_A::JTAG_DO
532 }
533 #[doc = "`101`"]
534 #[inline(always)]
535 pub fn is_i2s2_bclk(&self) -> bool {
536 *self == PF3_SELECT_A::I2S2_BCLK
537 }
538 #[doc = "`1111`"]
539 #[inline(always)]
540 pub fn is_io_disable(&self) -> bool {
541 *self == PF3_SELECT_A::IO_DISABLE
542 }
543}
544#[doc = "Field `pf3_select` writer - PF3 Select"]
545pub type PF3_SELECT_W<'a, REG> = crate::FieldWriter<'a, REG, 4, PF3_SELECT_A>;
546impl<'a, REG> PF3_SELECT_W<'a, REG>
547where
548 REG: crate::Writable + crate::RegisterSpec,
549 REG::Ux: From<u8>,
550{
551 #[doc = "`0`"]
552 #[inline(always)]
553 pub fn input(self) -> &'a mut crate::W<REG> {
554 self.variant(PF3_SELECT_A::INPUT)
555 }
556 #[doc = "`10`"]
557 #[inline(always)]
558 pub fn sdc0_cmd(self) -> &'a mut crate::W<REG> {
559 self.variant(PF3_SELECT_A::SDC0_CMD)
560 }
561 #[doc = "`100`"]
562 #[inline(always)]
563 pub fn r_jtag_do(self) -> &'a mut crate::W<REG> {
564 self.variant(PF3_SELECT_A::R_JTAG_DO)
565 }
566 #[doc = "`1110`"]
567 #[inline(always)]
568 pub fn pf_eint3(self) -> &'a mut crate::W<REG> {
569 self.variant(PF3_SELECT_A::PF_EINT3)
570 }
571 #[doc = "`1`"]
572 #[inline(always)]
573 pub fn output(self) -> &'a mut crate::W<REG> {
574 self.variant(PF3_SELECT_A::OUTPUT)
575 }
576 #[doc = "`11`"]
577 #[inline(always)]
578 pub fn jtag_do(self) -> &'a mut crate::W<REG> {
579 self.variant(PF3_SELECT_A::JTAG_DO)
580 }
581 #[doc = "`101`"]
582 #[inline(always)]
583 pub fn i2s2_bclk(self) -> &'a mut crate::W<REG> {
584 self.variant(PF3_SELECT_A::I2S2_BCLK)
585 }
586 #[doc = "`1111`"]
587 #[inline(always)]
588 pub fn io_disable(self) -> &'a mut crate::W<REG> {
589 self.variant(PF3_SELECT_A::IO_DISABLE)
590 }
591}
592#[doc = "Field `pf4_select` reader - PF4 Select"]
593pub type PF4_SELECT_R = crate::FieldReader<PF4_SELECT_A>;
594#[doc = "PF4 Select\n\nValue on reset: 0"]
595#[derive(Clone, Copy, Debug, PartialEq, Eq)]
596#[repr(u8)]
597pub enum PF4_SELECT_A {
598 #[doc = "0: `0`"]
599 INPUT = 0,
600 #[doc = "2: `10`"]
601 SDC0_D3 = 2,
602 #[doc = "4: `100`"]
603 TWI0_SDA = 4,
604 #[doc = "6: `110`"]
605 IR_TX = 6,
606 #[doc = "14: `1110`"]
607 PF_EINT4 = 14,
608 #[doc = "1: `1`"]
609 OUTPUT = 1,
610 #[doc = "3: `11`"]
611 UART0_RX = 3,
612 #[doc = "5: `101`"]
613 PWM6 = 5,
614 #[doc = "15: `1111`"]
615 IO_DISABLE = 15,
616}
617impl From<PF4_SELECT_A> for u8 {
618 #[inline(always)]
619 fn from(variant: PF4_SELECT_A) -> Self {
620 variant as _
621 }
622}
623impl crate::FieldSpec for PF4_SELECT_A {
624 type Ux = u8;
625}
626impl PF4_SELECT_R {
627 #[doc = "Get enumerated values variant"]
628 #[inline(always)]
629 pub const fn variant(&self) -> Option<PF4_SELECT_A> {
630 match self.bits {
631 0 => Some(PF4_SELECT_A::INPUT),
632 2 => Some(PF4_SELECT_A::SDC0_D3),
633 4 => Some(PF4_SELECT_A::TWI0_SDA),
634 6 => Some(PF4_SELECT_A::IR_TX),
635 14 => Some(PF4_SELECT_A::PF_EINT4),
636 1 => Some(PF4_SELECT_A::OUTPUT),
637 3 => Some(PF4_SELECT_A::UART0_RX),
638 5 => Some(PF4_SELECT_A::PWM6),
639 15 => Some(PF4_SELECT_A::IO_DISABLE),
640 _ => None,
641 }
642 }
643 #[doc = "`0`"]
644 #[inline(always)]
645 pub fn is_input(&self) -> bool {
646 *self == PF4_SELECT_A::INPUT
647 }
648 #[doc = "`10`"]
649 #[inline(always)]
650 pub fn is_sdc0_d3(&self) -> bool {
651 *self == PF4_SELECT_A::SDC0_D3
652 }
653 #[doc = "`100`"]
654 #[inline(always)]
655 pub fn is_twi0_sda(&self) -> bool {
656 *self == PF4_SELECT_A::TWI0_SDA
657 }
658 #[doc = "`110`"]
659 #[inline(always)]
660 pub fn is_ir_tx(&self) -> bool {
661 *self == PF4_SELECT_A::IR_TX
662 }
663 #[doc = "`1110`"]
664 #[inline(always)]
665 pub fn is_pf_eint4(&self) -> bool {
666 *self == PF4_SELECT_A::PF_EINT4
667 }
668 #[doc = "`1`"]
669 #[inline(always)]
670 pub fn is_output(&self) -> bool {
671 *self == PF4_SELECT_A::OUTPUT
672 }
673 #[doc = "`11`"]
674 #[inline(always)]
675 pub fn is_uart0_rx(&self) -> bool {
676 *self == PF4_SELECT_A::UART0_RX
677 }
678 #[doc = "`101`"]
679 #[inline(always)]
680 pub fn is_pwm6(&self) -> bool {
681 *self == PF4_SELECT_A::PWM6
682 }
683 #[doc = "`1111`"]
684 #[inline(always)]
685 pub fn is_io_disable(&self) -> bool {
686 *self == PF4_SELECT_A::IO_DISABLE
687 }
688}
689#[doc = "Field `pf4_select` writer - PF4 Select"]
690pub type PF4_SELECT_W<'a, REG> = crate::FieldWriter<'a, REG, 4, PF4_SELECT_A>;
691impl<'a, REG> PF4_SELECT_W<'a, REG>
692where
693 REG: crate::Writable + crate::RegisterSpec,
694 REG::Ux: From<u8>,
695{
696 #[doc = "`0`"]
697 #[inline(always)]
698 pub fn input(self) -> &'a mut crate::W<REG> {
699 self.variant(PF4_SELECT_A::INPUT)
700 }
701 #[doc = "`10`"]
702 #[inline(always)]
703 pub fn sdc0_d3(self) -> &'a mut crate::W<REG> {
704 self.variant(PF4_SELECT_A::SDC0_D3)
705 }
706 #[doc = "`100`"]
707 #[inline(always)]
708 pub fn twi0_sda(self) -> &'a mut crate::W<REG> {
709 self.variant(PF4_SELECT_A::TWI0_SDA)
710 }
711 #[doc = "`110`"]
712 #[inline(always)]
713 pub fn ir_tx(self) -> &'a mut crate::W<REG> {
714 self.variant(PF4_SELECT_A::IR_TX)
715 }
716 #[doc = "`1110`"]
717 #[inline(always)]
718 pub fn pf_eint4(self) -> &'a mut crate::W<REG> {
719 self.variant(PF4_SELECT_A::PF_EINT4)
720 }
721 #[doc = "`1`"]
722 #[inline(always)]
723 pub fn output(self) -> &'a mut crate::W<REG> {
724 self.variant(PF4_SELECT_A::OUTPUT)
725 }
726 #[doc = "`11`"]
727 #[inline(always)]
728 pub fn uart0_rx(self) -> &'a mut crate::W<REG> {
729 self.variant(PF4_SELECT_A::UART0_RX)
730 }
731 #[doc = "`101`"]
732 #[inline(always)]
733 pub fn pwm6(self) -> &'a mut crate::W<REG> {
734 self.variant(PF4_SELECT_A::PWM6)
735 }
736 #[doc = "`1111`"]
737 #[inline(always)]
738 pub fn io_disable(self) -> &'a mut crate::W<REG> {
739 self.variant(PF4_SELECT_A::IO_DISABLE)
740 }
741}
742#[doc = "Field `pf5_select` reader - PF5 Select"]
743pub type PF5_SELECT_R = crate::FieldReader<PF5_SELECT_A>;
744#[doc = "PF5 Select\n\nValue on reset: 0"]
745#[derive(Clone, Copy, Debug, PartialEq, Eq)]
746#[repr(u8)]
747pub enum PF5_SELECT_A {
748 #[doc = "0: `0`"]
749 INPUT = 0,
750 #[doc = "2: `10`"]
751 SDC0_D2 = 2,
752 #[doc = "4: `100`"]
753 R_JTAG_CK = 4,
754 #[doc = "14: `1110`"]
755 PF_EINT5 = 14,
756 #[doc = "1: `1`"]
757 OUTPUT = 1,
758 #[doc = "3: `11`"]
759 JTAG_CK = 3,
760 #[doc = "5: `101`"]
761 I2S2_LRCK = 5,
762 #[doc = "15: `1111`"]
763 IO_DISABLE = 15,
764}
765impl From<PF5_SELECT_A> for u8 {
766 #[inline(always)]
767 fn from(variant: PF5_SELECT_A) -> Self {
768 variant as _
769 }
770}
771impl crate::FieldSpec for PF5_SELECT_A {
772 type Ux = u8;
773}
774impl PF5_SELECT_R {
775 #[doc = "Get enumerated values variant"]
776 #[inline(always)]
777 pub const fn variant(&self) -> Option<PF5_SELECT_A> {
778 match self.bits {
779 0 => Some(PF5_SELECT_A::INPUT),
780 2 => Some(PF5_SELECT_A::SDC0_D2),
781 4 => Some(PF5_SELECT_A::R_JTAG_CK),
782 14 => Some(PF5_SELECT_A::PF_EINT5),
783 1 => Some(PF5_SELECT_A::OUTPUT),
784 3 => Some(PF5_SELECT_A::JTAG_CK),
785 5 => Some(PF5_SELECT_A::I2S2_LRCK),
786 15 => Some(PF5_SELECT_A::IO_DISABLE),
787 _ => None,
788 }
789 }
790 #[doc = "`0`"]
791 #[inline(always)]
792 pub fn is_input(&self) -> bool {
793 *self == PF5_SELECT_A::INPUT
794 }
795 #[doc = "`10`"]
796 #[inline(always)]
797 pub fn is_sdc0_d2(&self) -> bool {
798 *self == PF5_SELECT_A::SDC0_D2
799 }
800 #[doc = "`100`"]
801 #[inline(always)]
802 pub fn is_r_jtag_ck(&self) -> bool {
803 *self == PF5_SELECT_A::R_JTAG_CK
804 }
805 #[doc = "`1110`"]
806 #[inline(always)]
807 pub fn is_pf_eint5(&self) -> bool {
808 *self == PF5_SELECT_A::PF_EINT5
809 }
810 #[doc = "`1`"]
811 #[inline(always)]
812 pub fn is_output(&self) -> bool {
813 *self == PF5_SELECT_A::OUTPUT
814 }
815 #[doc = "`11`"]
816 #[inline(always)]
817 pub fn is_jtag_ck(&self) -> bool {
818 *self == PF5_SELECT_A::JTAG_CK
819 }
820 #[doc = "`101`"]
821 #[inline(always)]
822 pub fn is_i2s2_lrck(&self) -> bool {
823 *self == PF5_SELECT_A::I2S2_LRCK
824 }
825 #[doc = "`1111`"]
826 #[inline(always)]
827 pub fn is_io_disable(&self) -> bool {
828 *self == PF5_SELECT_A::IO_DISABLE
829 }
830}
831#[doc = "Field `pf5_select` writer - PF5 Select"]
832pub type PF5_SELECT_W<'a, REG> = crate::FieldWriter<'a, REG, 4, PF5_SELECT_A>;
833impl<'a, REG> PF5_SELECT_W<'a, REG>
834where
835 REG: crate::Writable + crate::RegisterSpec,
836 REG::Ux: From<u8>,
837{
838 #[doc = "`0`"]
839 #[inline(always)]
840 pub fn input(self) -> &'a mut crate::W<REG> {
841 self.variant(PF5_SELECT_A::INPUT)
842 }
843 #[doc = "`10`"]
844 #[inline(always)]
845 pub fn sdc0_d2(self) -> &'a mut crate::W<REG> {
846 self.variant(PF5_SELECT_A::SDC0_D2)
847 }
848 #[doc = "`100`"]
849 #[inline(always)]
850 pub fn r_jtag_ck(self) -> &'a mut crate::W<REG> {
851 self.variant(PF5_SELECT_A::R_JTAG_CK)
852 }
853 #[doc = "`1110`"]
854 #[inline(always)]
855 pub fn pf_eint5(self) -> &'a mut crate::W<REG> {
856 self.variant(PF5_SELECT_A::PF_EINT5)
857 }
858 #[doc = "`1`"]
859 #[inline(always)]
860 pub fn output(self) -> &'a mut crate::W<REG> {
861 self.variant(PF5_SELECT_A::OUTPUT)
862 }
863 #[doc = "`11`"]
864 #[inline(always)]
865 pub fn jtag_ck(self) -> &'a mut crate::W<REG> {
866 self.variant(PF5_SELECT_A::JTAG_CK)
867 }
868 #[doc = "`101`"]
869 #[inline(always)]
870 pub fn i2s2_lrck(self) -> &'a mut crate::W<REG> {
871 self.variant(PF5_SELECT_A::I2S2_LRCK)
872 }
873 #[doc = "`1111`"]
874 #[inline(always)]
875 pub fn io_disable(self) -> &'a mut crate::W<REG> {
876 self.variant(PF5_SELECT_A::IO_DISABLE)
877 }
878}
879#[doc = "Field `pf6_select` reader - PF6 Select"]
880pub type PF6_SELECT_R = crate::FieldReader<PF6_SELECT_A>;
881#[doc = "PF6 Select\n\nValue on reset: 0"]
882#[derive(Clone, Copy, Debug, PartialEq, Eq)]
883#[repr(u8)]
884pub enum PF6_SELECT_A {
885 #[doc = "0: `0`"]
886 INPUT = 0,
887 #[doc = "4: `100`"]
888 IR_RX = 4,
889 #[doc = "6: `110`"]
890 PWM5 = 6,
891 #[doc = "14: `1110`"]
892 PF_EINT6 = 14,
893 #[doc = "1: `1`"]
894 OUTPUT = 1,
895 #[doc = "3: `11`"]
896 OWA_OUT = 3,
897 #[doc = "5: `101`"]
898 I2S2_MCLK = 5,
899 #[doc = "15: `1111`"]
900 IO_DISABLE = 15,
901}
902impl From<PF6_SELECT_A> for u8 {
903 #[inline(always)]
904 fn from(variant: PF6_SELECT_A) -> Self {
905 variant as _
906 }
907}
908impl crate::FieldSpec for PF6_SELECT_A {
909 type Ux = u8;
910}
911impl PF6_SELECT_R {
912 #[doc = "Get enumerated values variant"]
913 #[inline(always)]
914 pub const fn variant(&self) -> Option<PF6_SELECT_A> {
915 match self.bits {
916 0 => Some(PF6_SELECT_A::INPUT),
917 4 => Some(PF6_SELECT_A::IR_RX),
918 6 => Some(PF6_SELECT_A::PWM5),
919 14 => Some(PF6_SELECT_A::PF_EINT6),
920 1 => Some(PF6_SELECT_A::OUTPUT),
921 3 => Some(PF6_SELECT_A::OWA_OUT),
922 5 => Some(PF6_SELECT_A::I2S2_MCLK),
923 15 => Some(PF6_SELECT_A::IO_DISABLE),
924 _ => None,
925 }
926 }
927 #[doc = "`0`"]
928 #[inline(always)]
929 pub fn is_input(&self) -> bool {
930 *self == PF6_SELECT_A::INPUT
931 }
932 #[doc = "`100`"]
933 #[inline(always)]
934 pub fn is_ir_rx(&self) -> bool {
935 *self == PF6_SELECT_A::IR_RX
936 }
937 #[doc = "`110`"]
938 #[inline(always)]
939 pub fn is_pwm5(&self) -> bool {
940 *self == PF6_SELECT_A::PWM5
941 }
942 #[doc = "`1110`"]
943 #[inline(always)]
944 pub fn is_pf_eint6(&self) -> bool {
945 *self == PF6_SELECT_A::PF_EINT6
946 }
947 #[doc = "`1`"]
948 #[inline(always)]
949 pub fn is_output(&self) -> bool {
950 *self == PF6_SELECT_A::OUTPUT
951 }
952 #[doc = "`11`"]
953 #[inline(always)]
954 pub fn is_owa_out(&self) -> bool {
955 *self == PF6_SELECT_A::OWA_OUT
956 }
957 #[doc = "`101`"]
958 #[inline(always)]
959 pub fn is_i2s2_mclk(&self) -> bool {
960 *self == PF6_SELECT_A::I2S2_MCLK
961 }
962 #[doc = "`1111`"]
963 #[inline(always)]
964 pub fn is_io_disable(&self) -> bool {
965 *self == PF6_SELECT_A::IO_DISABLE
966 }
967}
968#[doc = "Field `pf6_select` writer - PF6 Select"]
969pub type PF6_SELECT_W<'a, REG> = crate::FieldWriter<'a, REG, 4, PF6_SELECT_A>;
970impl<'a, REG> PF6_SELECT_W<'a, REG>
971where
972 REG: crate::Writable + crate::RegisterSpec,
973 REG::Ux: From<u8>,
974{
975 #[doc = "`0`"]
976 #[inline(always)]
977 pub fn input(self) -> &'a mut crate::W<REG> {
978 self.variant(PF6_SELECT_A::INPUT)
979 }
980 #[doc = "`100`"]
981 #[inline(always)]
982 pub fn ir_rx(self) -> &'a mut crate::W<REG> {
983 self.variant(PF6_SELECT_A::IR_RX)
984 }
985 #[doc = "`110`"]
986 #[inline(always)]
987 pub fn pwm5(self) -> &'a mut crate::W<REG> {
988 self.variant(PF6_SELECT_A::PWM5)
989 }
990 #[doc = "`1110`"]
991 #[inline(always)]
992 pub fn pf_eint6(self) -> &'a mut crate::W<REG> {
993 self.variant(PF6_SELECT_A::PF_EINT6)
994 }
995 #[doc = "`1`"]
996 #[inline(always)]
997 pub fn output(self) -> &'a mut crate::W<REG> {
998 self.variant(PF6_SELECT_A::OUTPUT)
999 }
1000 #[doc = "`11`"]
1001 #[inline(always)]
1002 pub fn owa_out(self) -> &'a mut crate::W<REG> {
1003 self.variant(PF6_SELECT_A::OWA_OUT)
1004 }
1005 #[doc = "`101`"]
1006 #[inline(always)]
1007 pub fn i2s2_mclk(self) -> &'a mut crate::W<REG> {
1008 self.variant(PF6_SELECT_A::I2S2_MCLK)
1009 }
1010 #[doc = "`1111`"]
1011 #[inline(always)]
1012 pub fn io_disable(self) -> &'a mut crate::W<REG> {
1013 self.variant(PF6_SELECT_A::IO_DISABLE)
1014 }
1015}
1016impl R {
1017 #[doc = "Bits 0:3 - PF0 Select"]
1018 #[inline(always)]
1019 pub fn pf0_select(&self) -> PF0_SELECT_R {
1020 PF0_SELECT_R::new((self.bits & 0x0f) as u8)
1021 }
1022 #[doc = "Bits 4:7 - PF1 Select"]
1023 #[inline(always)]
1024 pub fn pf1_select(&self) -> PF1_SELECT_R {
1025 PF1_SELECT_R::new(((self.bits >> 4) & 0x0f) as u8)
1026 }
1027 #[doc = "Bits 8:11 - PF2 Select"]
1028 #[inline(always)]
1029 pub fn pf2_select(&self) -> PF2_SELECT_R {
1030 PF2_SELECT_R::new(((self.bits >> 8) & 0x0f) as u8)
1031 }
1032 #[doc = "Bits 12:15 - PF3 Select"]
1033 #[inline(always)]
1034 pub fn pf3_select(&self) -> PF3_SELECT_R {
1035 PF3_SELECT_R::new(((self.bits >> 12) & 0x0f) as u8)
1036 }
1037 #[doc = "Bits 16:19 - PF4 Select"]
1038 #[inline(always)]
1039 pub fn pf4_select(&self) -> PF4_SELECT_R {
1040 PF4_SELECT_R::new(((self.bits >> 16) & 0x0f) as u8)
1041 }
1042 #[doc = "Bits 20:23 - PF5 Select"]
1043 #[inline(always)]
1044 pub fn pf5_select(&self) -> PF5_SELECT_R {
1045 PF5_SELECT_R::new(((self.bits >> 20) & 0x0f) as u8)
1046 }
1047 #[doc = "Bits 24:27 - PF6 Select"]
1048 #[inline(always)]
1049 pub fn pf6_select(&self) -> PF6_SELECT_R {
1050 PF6_SELECT_R::new(((self.bits >> 24) & 0x0f) as u8)
1051 }
1052}
1053impl W {
1054 #[doc = "Bits 0:3 - PF0 Select"]
1055 #[inline(always)]
1056 #[must_use]
1057 pub fn pf0_select(&mut self) -> PF0_SELECT_W<PF_CFG0_SPEC> {
1058 PF0_SELECT_W::new(self, 0)
1059 }
1060 #[doc = "Bits 4:7 - PF1 Select"]
1061 #[inline(always)]
1062 #[must_use]
1063 pub fn pf1_select(&mut self) -> PF1_SELECT_W<PF_CFG0_SPEC> {
1064 PF1_SELECT_W::new(self, 4)
1065 }
1066 #[doc = "Bits 8:11 - PF2 Select"]
1067 #[inline(always)]
1068 #[must_use]
1069 pub fn pf2_select(&mut self) -> PF2_SELECT_W<PF_CFG0_SPEC> {
1070 PF2_SELECT_W::new(self, 8)
1071 }
1072 #[doc = "Bits 12:15 - PF3 Select"]
1073 #[inline(always)]
1074 #[must_use]
1075 pub fn pf3_select(&mut self) -> PF3_SELECT_W<PF_CFG0_SPEC> {
1076 PF3_SELECT_W::new(self, 12)
1077 }
1078 #[doc = "Bits 16:19 - PF4 Select"]
1079 #[inline(always)]
1080 #[must_use]
1081 pub fn pf4_select(&mut self) -> PF4_SELECT_W<PF_CFG0_SPEC> {
1082 PF4_SELECT_W::new(self, 16)
1083 }
1084 #[doc = "Bits 20:23 - PF5 Select"]
1085 #[inline(always)]
1086 #[must_use]
1087 pub fn pf5_select(&mut self) -> PF5_SELECT_W<PF_CFG0_SPEC> {
1088 PF5_SELECT_W::new(self, 20)
1089 }
1090 #[doc = "Bits 24:27 - PF6 Select"]
1091 #[inline(always)]
1092 #[must_use]
1093 pub fn pf6_select(&mut self) -> PF6_SELECT_W<PF_CFG0_SPEC> {
1094 PF6_SELECT_W::new(self, 24)
1095 }
1096 #[doc = r" Writes raw bits to the register."]
1097 #[doc = r""]
1098 #[doc = r" # Safety"]
1099 #[doc = r""]
1100 #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
1101 #[inline(always)]
1102 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1103 self.bits = bits;
1104 self
1105 }
1106}
1107#[doc = "PF Configure Register 0\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`pf_cfg0::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`pf_cfg0::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
1108pub struct PF_CFG0_SPEC;
1109impl crate::RegisterSpec for PF_CFG0_SPEC {
1110 type Ux = u32;
1111}
1112#[doc = "`read()` method returns [`pf_cfg0::R`](R) reader structure"]
1113impl crate::Readable for PF_CFG0_SPEC {}
1114#[doc = "`write(|w| ..)` method takes [`pf_cfg0::W`](W) writer structure"]
1115impl crate::Writable for PF_CFG0_SPEC {
1116 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
1117 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
1118}
1119#[doc = "`reset()` method sets pf_cfg0 to value 0"]
1120impl crate::Resettable for PF_CFG0_SPEC {
1121 const RESET_VALUE: Self::Ux = 0;
1122}