d1_pac/gpio/
pd_cfg0.rs

1#[doc = "Register `pd_cfg0` reader"]
2pub type R = crate::R<PD_CFG0_SPEC>;
3#[doc = "Register `pd_cfg0` writer"]
4pub type W = crate::W<PD_CFG0_SPEC>;
5#[doc = "Field `pd0_select` reader - PD0 Select"]
6pub type PD0_SELECT_R = crate::FieldReader<PD0_SELECT_A>;
7#[doc = "PD0 Select\n\nValue on reset: 0"]
8#[derive(Clone, Copy, Debug, PartialEq, Eq)]
9#[repr(u8)]
10pub enum PD0_SELECT_A {
11    #[doc = "0: `0`"]
12    INPUT = 0,
13    #[doc = "2: `10`"]
14    LCD0_D2 = 2,
15    #[doc = "4: `100`"]
16    DSI_D0P = 4,
17    #[doc = "14: `1110`"]
18    PD_EINT0 = 14,
19    #[doc = "1: `1`"]
20    OUTPUT = 1,
21    #[doc = "3: `11`"]
22    LVDS0_V0P = 3,
23    #[doc = "5: `101`"]
24    TWI0_SCK = 5,
25    #[doc = "15: `1111`"]
26    IO_DISABLE = 15,
27}
28impl From<PD0_SELECT_A> for u8 {
29    #[inline(always)]
30    fn from(variant: PD0_SELECT_A) -> Self {
31        variant as _
32    }
33}
34impl crate::FieldSpec for PD0_SELECT_A {
35    type Ux = u8;
36}
37impl PD0_SELECT_R {
38    #[doc = "Get enumerated values variant"]
39    #[inline(always)]
40    pub const fn variant(&self) -> Option<PD0_SELECT_A> {
41        match self.bits {
42            0 => Some(PD0_SELECT_A::INPUT),
43            2 => Some(PD0_SELECT_A::LCD0_D2),
44            4 => Some(PD0_SELECT_A::DSI_D0P),
45            14 => Some(PD0_SELECT_A::PD_EINT0),
46            1 => Some(PD0_SELECT_A::OUTPUT),
47            3 => Some(PD0_SELECT_A::LVDS0_V0P),
48            5 => Some(PD0_SELECT_A::TWI0_SCK),
49            15 => Some(PD0_SELECT_A::IO_DISABLE),
50            _ => None,
51        }
52    }
53    #[doc = "`0`"]
54    #[inline(always)]
55    pub fn is_input(&self) -> bool {
56        *self == PD0_SELECT_A::INPUT
57    }
58    #[doc = "`10`"]
59    #[inline(always)]
60    pub fn is_lcd0_d2(&self) -> bool {
61        *self == PD0_SELECT_A::LCD0_D2
62    }
63    #[doc = "`100`"]
64    #[inline(always)]
65    pub fn is_dsi_d0p(&self) -> bool {
66        *self == PD0_SELECT_A::DSI_D0P
67    }
68    #[doc = "`1110`"]
69    #[inline(always)]
70    pub fn is_pd_eint0(&self) -> bool {
71        *self == PD0_SELECT_A::PD_EINT0
72    }
73    #[doc = "`1`"]
74    #[inline(always)]
75    pub fn is_output(&self) -> bool {
76        *self == PD0_SELECT_A::OUTPUT
77    }
78    #[doc = "`11`"]
79    #[inline(always)]
80    pub fn is_lvds0_v0p(&self) -> bool {
81        *self == PD0_SELECT_A::LVDS0_V0P
82    }
83    #[doc = "`101`"]
84    #[inline(always)]
85    pub fn is_twi0_sck(&self) -> bool {
86        *self == PD0_SELECT_A::TWI0_SCK
87    }
88    #[doc = "`1111`"]
89    #[inline(always)]
90    pub fn is_io_disable(&self) -> bool {
91        *self == PD0_SELECT_A::IO_DISABLE
92    }
93}
94#[doc = "Field `pd0_select` writer - PD0 Select"]
95pub type PD0_SELECT_W<'a, REG> = crate::FieldWriter<'a, REG, 4, PD0_SELECT_A>;
96impl<'a, REG> PD0_SELECT_W<'a, REG>
97where
98    REG: crate::Writable + crate::RegisterSpec,
99    REG::Ux: From<u8>,
100{
101    #[doc = "`0`"]
102    #[inline(always)]
103    pub fn input(self) -> &'a mut crate::W<REG> {
104        self.variant(PD0_SELECT_A::INPUT)
105    }
106    #[doc = "`10`"]
107    #[inline(always)]
108    pub fn lcd0_d2(self) -> &'a mut crate::W<REG> {
109        self.variant(PD0_SELECT_A::LCD0_D2)
110    }
111    #[doc = "`100`"]
112    #[inline(always)]
113    pub fn dsi_d0p(self) -> &'a mut crate::W<REG> {
114        self.variant(PD0_SELECT_A::DSI_D0P)
115    }
116    #[doc = "`1110`"]
117    #[inline(always)]
118    pub fn pd_eint0(self) -> &'a mut crate::W<REG> {
119        self.variant(PD0_SELECT_A::PD_EINT0)
120    }
121    #[doc = "`1`"]
122    #[inline(always)]
123    pub fn output(self) -> &'a mut crate::W<REG> {
124        self.variant(PD0_SELECT_A::OUTPUT)
125    }
126    #[doc = "`11`"]
127    #[inline(always)]
128    pub fn lvds0_v0p(self) -> &'a mut crate::W<REG> {
129        self.variant(PD0_SELECT_A::LVDS0_V0P)
130    }
131    #[doc = "`101`"]
132    #[inline(always)]
133    pub fn twi0_sck(self) -> &'a mut crate::W<REG> {
134        self.variant(PD0_SELECT_A::TWI0_SCK)
135    }
136    #[doc = "`1111`"]
137    #[inline(always)]
138    pub fn io_disable(self) -> &'a mut crate::W<REG> {
139        self.variant(PD0_SELECT_A::IO_DISABLE)
140    }
141}
142#[doc = "Field `pd1_select` reader - PD1 Select"]
143pub type PD1_SELECT_R = crate::FieldReader<PD1_SELECT_A>;
144#[doc = "PD1 Select\n\nValue on reset: 0"]
145#[derive(Clone, Copy, Debug, PartialEq, Eq)]
146#[repr(u8)]
147pub enum PD1_SELECT_A {
148    #[doc = "0: `0`"]
149    INPUT = 0,
150    #[doc = "2: `10`"]
151    LCD0_D3 = 2,
152    #[doc = "4: `100`"]
153    DSI_D0N = 4,
154    #[doc = "14: `1110`"]
155    PD_EINT1 = 14,
156    #[doc = "1: `1`"]
157    OUTPUT = 1,
158    #[doc = "3: `11`"]
159    LVDS0_V0N = 3,
160    #[doc = "5: `101`"]
161    UART2_TX = 5,
162    #[doc = "15: `1111`"]
163    IO_DISABLE = 15,
164}
165impl From<PD1_SELECT_A> for u8 {
166    #[inline(always)]
167    fn from(variant: PD1_SELECT_A) -> Self {
168        variant as _
169    }
170}
171impl crate::FieldSpec for PD1_SELECT_A {
172    type Ux = u8;
173}
174impl PD1_SELECT_R {
175    #[doc = "Get enumerated values variant"]
176    #[inline(always)]
177    pub const fn variant(&self) -> Option<PD1_SELECT_A> {
178        match self.bits {
179            0 => Some(PD1_SELECT_A::INPUT),
180            2 => Some(PD1_SELECT_A::LCD0_D3),
181            4 => Some(PD1_SELECT_A::DSI_D0N),
182            14 => Some(PD1_SELECT_A::PD_EINT1),
183            1 => Some(PD1_SELECT_A::OUTPUT),
184            3 => Some(PD1_SELECT_A::LVDS0_V0N),
185            5 => Some(PD1_SELECT_A::UART2_TX),
186            15 => Some(PD1_SELECT_A::IO_DISABLE),
187            _ => None,
188        }
189    }
190    #[doc = "`0`"]
191    #[inline(always)]
192    pub fn is_input(&self) -> bool {
193        *self == PD1_SELECT_A::INPUT
194    }
195    #[doc = "`10`"]
196    #[inline(always)]
197    pub fn is_lcd0_d3(&self) -> bool {
198        *self == PD1_SELECT_A::LCD0_D3
199    }
200    #[doc = "`100`"]
201    #[inline(always)]
202    pub fn is_dsi_d0n(&self) -> bool {
203        *self == PD1_SELECT_A::DSI_D0N
204    }
205    #[doc = "`1110`"]
206    #[inline(always)]
207    pub fn is_pd_eint1(&self) -> bool {
208        *self == PD1_SELECT_A::PD_EINT1
209    }
210    #[doc = "`1`"]
211    #[inline(always)]
212    pub fn is_output(&self) -> bool {
213        *self == PD1_SELECT_A::OUTPUT
214    }
215    #[doc = "`11`"]
216    #[inline(always)]
217    pub fn is_lvds0_v0n(&self) -> bool {
218        *self == PD1_SELECT_A::LVDS0_V0N
219    }
220    #[doc = "`101`"]
221    #[inline(always)]
222    pub fn is_uart2_tx(&self) -> bool {
223        *self == PD1_SELECT_A::UART2_TX
224    }
225    #[doc = "`1111`"]
226    #[inline(always)]
227    pub fn is_io_disable(&self) -> bool {
228        *self == PD1_SELECT_A::IO_DISABLE
229    }
230}
231#[doc = "Field `pd1_select` writer - PD1 Select"]
232pub type PD1_SELECT_W<'a, REG> = crate::FieldWriter<'a, REG, 4, PD1_SELECT_A>;
233impl<'a, REG> PD1_SELECT_W<'a, REG>
234where
235    REG: crate::Writable + crate::RegisterSpec,
236    REG::Ux: From<u8>,
237{
238    #[doc = "`0`"]
239    #[inline(always)]
240    pub fn input(self) -> &'a mut crate::W<REG> {
241        self.variant(PD1_SELECT_A::INPUT)
242    }
243    #[doc = "`10`"]
244    #[inline(always)]
245    pub fn lcd0_d3(self) -> &'a mut crate::W<REG> {
246        self.variant(PD1_SELECT_A::LCD0_D3)
247    }
248    #[doc = "`100`"]
249    #[inline(always)]
250    pub fn dsi_d0n(self) -> &'a mut crate::W<REG> {
251        self.variant(PD1_SELECT_A::DSI_D0N)
252    }
253    #[doc = "`1110`"]
254    #[inline(always)]
255    pub fn pd_eint1(self) -> &'a mut crate::W<REG> {
256        self.variant(PD1_SELECT_A::PD_EINT1)
257    }
258    #[doc = "`1`"]
259    #[inline(always)]
260    pub fn output(self) -> &'a mut crate::W<REG> {
261        self.variant(PD1_SELECT_A::OUTPUT)
262    }
263    #[doc = "`11`"]
264    #[inline(always)]
265    pub fn lvds0_v0n(self) -> &'a mut crate::W<REG> {
266        self.variant(PD1_SELECT_A::LVDS0_V0N)
267    }
268    #[doc = "`101`"]
269    #[inline(always)]
270    pub fn uart2_tx(self) -> &'a mut crate::W<REG> {
271        self.variant(PD1_SELECT_A::UART2_TX)
272    }
273    #[doc = "`1111`"]
274    #[inline(always)]
275    pub fn io_disable(self) -> &'a mut crate::W<REG> {
276        self.variant(PD1_SELECT_A::IO_DISABLE)
277    }
278}
279#[doc = "Field `pd2_select` reader - PD2 Select"]
280pub type PD2_SELECT_R = crate::FieldReader<PD2_SELECT_A>;
281#[doc = "PD2 Select\n\nValue on reset: 0"]
282#[derive(Clone, Copy, Debug, PartialEq, Eq)]
283#[repr(u8)]
284pub enum PD2_SELECT_A {
285    #[doc = "0: `0`"]
286    INPUT = 0,
287    #[doc = "2: `10`"]
288    LCD0_D4 = 2,
289    #[doc = "4: `100`"]
290    DSI_D1P = 4,
291    #[doc = "14: `1110`"]
292    PD_EINT2 = 14,
293    #[doc = "1: `1`"]
294    OUTPUT = 1,
295    #[doc = "3: `11`"]
296    LVDS0_V1P = 3,
297    #[doc = "5: `101`"]
298    UART2_RX = 5,
299    #[doc = "15: `1111`"]
300    IO_DISABLE = 15,
301}
302impl From<PD2_SELECT_A> for u8 {
303    #[inline(always)]
304    fn from(variant: PD2_SELECT_A) -> Self {
305        variant as _
306    }
307}
308impl crate::FieldSpec for PD2_SELECT_A {
309    type Ux = u8;
310}
311impl PD2_SELECT_R {
312    #[doc = "Get enumerated values variant"]
313    #[inline(always)]
314    pub const fn variant(&self) -> Option<PD2_SELECT_A> {
315        match self.bits {
316            0 => Some(PD2_SELECT_A::INPUT),
317            2 => Some(PD2_SELECT_A::LCD0_D4),
318            4 => Some(PD2_SELECT_A::DSI_D1P),
319            14 => Some(PD2_SELECT_A::PD_EINT2),
320            1 => Some(PD2_SELECT_A::OUTPUT),
321            3 => Some(PD2_SELECT_A::LVDS0_V1P),
322            5 => Some(PD2_SELECT_A::UART2_RX),
323            15 => Some(PD2_SELECT_A::IO_DISABLE),
324            _ => None,
325        }
326    }
327    #[doc = "`0`"]
328    #[inline(always)]
329    pub fn is_input(&self) -> bool {
330        *self == PD2_SELECT_A::INPUT
331    }
332    #[doc = "`10`"]
333    #[inline(always)]
334    pub fn is_lcd0_d4(&self) -> bool {
335        *self == PD2_SELECT_A::LCD0_D4
336    }
337    #[doc = "`100`"]
338    #[inline(always)]
339    pub fn is_dsi_d1p(&self) -> bool {
340        *self == PD2_SELECT_A::DSI_D1P
341    }
342    #[doc = "`1110`"]
343    #[inline(always)]
344    pub fn is_pd_eint2(&self) -> bool {
345        *self == PD2_SELECT_A::PD_EINT2
346    }
347    #[doc = "`1`"]
348    #[inline(always)]
349    pub fn is_output(&self) -> bool {
350        *self == PD2_SELECT_A::OUTPUT
351    }
352    #[doc = "`11`"]
353    #[inline(always)]
354    pub fn is_lvds0_v1p(&self) -> bool {
355        *self == PD2_SELECT_A::LVDS0_V1P
356    }
357    #[doc = "`101`"]
358    #[inline(always)]
359    pub fn is_uart2_rx(&self) -> bool {
360        *self == PD2_SELECT_A::UART2_RX
361    }
362    #[doc = "`1111`"]
363    #[inline(always)]
364    pub fn is_io_disable(&self) -> bool {
365        *self == PD2_SELECT_A::IO_DISABLE
366    }
367}
368#[doc = "Field `pd2_select` writer - PD2 Select"]
369pub type PD2_SELECT_W<'a, REG> = crate::FieldWriter<'a, REG, 4, PD2_SELECT_A>;
370impl<'a, REG> PD2_SELECT_W<'a, REG>
371where
372    REG: crate::Writable + crate::RegisterSpec,
373    REG::Ux: From<u8>,
374{
375    #[doc = "`0`"]
376    #[inline(always)]
377    pub fn input(self) -> &'a mut crate::W<REG> {
378        self.variant(PD2_SELECT_A::INPUT)
379    }
380    #[doc = "`10`"]
381    #[inline(always)]
382    pub fn lcd0_d4(self) -> &'a mut crate::W<REG> {
383        self.variant(PD2_SELECT_A::LCD0_D4)
384    }
385    #[doc = "`100`"]
386    #[inline(always)]
387    pub fn dsi_d1p(self) -> &'a mut crate::W<REG> {
388        self.variant(PD2_SELECT_A::DSI_D1P)
389    }
390    #[doc = "`1110`"]
391    #[inline(always)]
392    pub fn pd_eint2(self) -> &'a mut crate::W<REG> {
393        self.variant(PD2_SELECT_A::PD_EINT2)
394    }
395    #[doc = "`1`"]
396    #[inline(always)]
397    pub fn output(self) -> &'a mut crate::W<REG> {
398        self.variant(PD2_SELECT_A::OUTPUT)
399    }
400    #[doc = "`11`"]
401    #[inline(always)]
402    pub fn lvds0_v1p(self) -> &'a mut crate::W<REG> {
403        self.variant(PD2_SELECT_A::LVDS0_V1P)
404    }
405    #[doc = "`101`"]
406    #[inline(always)]
407    pub fn uart2_rx(self) -> &'a mut crate::W<REG> {
408        self.variant(PD2_SELECT_A::UART2_RX)
409    }
410    #[doc = "`1111`"]
411    #[inline(always)]
412    pub fn io_disable(self) -> &'a mut crate::W<REG> {
413        self.variant(PD2_SELECT_A::IO_DISABLE)
414    }
415}
416#[doc = "Field `pd3_select` reader - PD3 Select"]
417pub type PD3_SELECT_R = crate::FieldReader<PD3_SELECT_A>;
418#[doc = "PD3 Select\n\nValue on reset: 0"]
419#[derive(Clone, Copy, Debug, PartialEq, Eq)]
420#[repr(u8)]
421pub enum PD3_SELECT_A {
422    #[doc = "0: `0`"]
423    INPUT = 0,
424    #[doc = "2: `10`"]
425    LCD0_D5 = 2,
426    #[doc = "4: `100`"]
427    DSI_D1N = 4,
428    #[doc = "14: `1110`"]
429    PD_EINT3 = 14,
430    #[doc = "1: `1`"]
431    OUTPUT = 1,
432    #[doc = "3: `11`"]
433    LVDS0_V1N = 3,
434    #[doc = "5: `101`"]
435    UART2_RTS = 5,
436    #[doc = "15: `1111`"]
437    IO_DISABLE = 15,
438}
439impl From<PD3_SELECT_A> for u8 {
440    #[inline(always)]
441    fn from(variant: PD3_SELECT_A) -> Self {
442        variant as _
443    }
444}
445impl crate::FieldSpec for PD3_SELECT_A {
446    type Ux = u8;
447}
448impl PD3_SELECT_R {
449    #[doc = "Get enumerated values variant"]
450    #[inline(always)]
451    pub const fn variant(&self) -> Option<PD3_SELECT_A> {
452        match self.bits {
453            0 => Some(PD3_SELECT_A::INPUT),
454            2 => Some(PD3_SELECT_A::LCD0_D5),
455            4 => Some(PD3_SELECT_A::DSI_D1N),
456            14 => Some(PD3_SELECT_A::PD_EINT3),
457            1 => Some(PD3_SELECT_A::OUTPUT),
458            3 => Some(PD3_SELECT_A::LVDS0_V1N),
459            5 => Some(PD3_SELECT_A::UART2_RTS),
460            15 => Some(PD3_SELECT_A::IO_DISABLE),
461            _ => None,
462        }
463    }
464    #[doc = "`0`"]
465    #[inline(always)]
466    pub fn is_input(&self) -> bool {
467        *self == PD3_SELECT_A::INPUT
468    }
469    #[doc = "`10`"]
470    #[inline(always)]
471    pub fn is_lcd0_d5(&self) -> bool {
472        *self == PD3_SELECT_A::LCD0_D5
473    }
474    #[doc = "`100`"]
475    #[inline(always)]
476    pub fn is_dsi_d1n(&self) -> bool {
477        *self == PD3_SELECT_A::DSI_D1N
478    }
479    #[doc = "`1110`"]
480    #[inline(always)]
481    pub fn is_pd_eint3(&self) -> bool {
482        *self == PD3_SELECT_A::PD_EINT3
483    }
484    #[doc = "`1`"]
485    #[inline(always)]
486    pub fn is_output(&self) -> bool {
487        *self == PD3_SELECT_A::OUTPUT
488    }
489    #[doc = "`11`"]
490    #[inline(always)]
491    pub fn is_lvds0_v1n(&self) -> bool {
492        *self == PD3_SELECT_A::LVDS0_V1N
493    }
494    #[doc = "`101`"]
495    #[inline(always)]
496    pub fn is_uart2_rts(&self) -> bool {
497        *self == PD3_SELECT_A::UART2_RTS
498    }
499    #[doc = "`1111`"]
500    #[inline(always)]
501    pub fn is_io_disable(&self) -> bool {
502        *self == PD3_SELECT_A::IO_DISABLE
503    }
504}
505#[doc = "Field `pd3_select` writer - PD3 Select"]
506pub type PD3_SELECT_W<'a, REG> = crate::FieldWriter<'a, REG, 4, PD3_SELECT_A>;
507impl<'a, REG> PD3_SELECT_W<'a, REG>
508where
509    REG: crate::Writable + crate::RegisterSpec,
510    REG::Ux: From<u8>,
511{
512    #[doc = "`0`"]
513    #[inline(always)]
514    pub fn input(self) -> &'a mut crate::W<REG> {
515        self.variant(PD3_SELECT_A::INPUT)
516    }
517    #[doc = "`10`"]
518    #[inline(always)]
519    pub fn lcd0_d5(self) -> &'a mut crate::W<REG> {
520        self.variant(PD3_SELECT_A::LCD0_D5)
521    }
522    #[doc = "`100`"]
523    #[inline(always)]
524    pub fn dsi_d1n(self) -> &'a mut crate::W<REG> {
525        self.variant(PD3_SELECT_A::DSI_D1N)
526    }
527    #[doc = "`1110`"]
528    #[inline(always)]
529    pub fn pd_eint3(self) -> &'a mut crate::W<REG> {
530        self.variant(PD3_SELECT_A::PD_EINT3)
531    }
532    #[doc = "`1`"]
533    #[inline(always)]
534    pub fn output(self) -> &'a mut crate::W<REG> {
535        self.variant(PD3_SELECT_A::OUTPUT)
536    }
537    #[doc = "`11`"]
538    #[inline(always)]
539    pub fn lvds0_v1n(self) -> &'a mut crate::W<REG> {
540        self.variant(PD3_SELECT_A::LVDS0_V1N)
541    }
542    #[doc = "`101`"]
543    #[inline(always)]
544    pub fn uart2_rts(self) -> &'a mut crate::W<REG> {
545        self.variant(PD3_SELECT_A::UART2_RTS)
546    }
547    #[doc = "`1111`"]
548    #[inline(always)]
549    pub fn io_disable(self) -> &'a mut crate::W<REG> {
550        self.variant(PD3_SELECT_A::IO_DISABLE)
551    }
552}
553#[doc = "Field `pd4_select` reader - PD4 Select"]
554pub type PD4_SELECT_R = crate::FieldReader<PD4_SELECT_A>;
555#[doc = "PD4 Select\n\nValue on reset: 0"]
556#[derive(Clone, Copy, Debug, PartialEq, Eq)]
557#[repr(u8)]
558pub enum PD4_SELECT_A {
559    #[doc = "0: `0`"]
560    INPUT = 0,
561    #[doc = "2: `10`"]
562    LCD0_D6 = 2,
563    #[doc = "4: `100`"]
564    DSI_CKP = 4,
565    #[doc = "14: `1110`"]
566    PD_EINT4 = 14,
567    #[doc = "1: `1`"]
568    OUTPUT = 1,
569    #[doc = "3: `11`"]
570    LVDS0_V2P = 3,
571    #[doc = "5: `101`"]
572    UART2_CTS = 5,
573    #[doc = "15: `1111`"]
574    IO_DISABLE = 15,
575}
576impl From<PD4_SELECT_A> for u8 {
577    #[inline(always)]
578    fn from(variant: PD4_SELECT_A) -> Self {
579        variant as _
580    }
581}
582impl crate::FieldSpec for PD4_SELECT_A {
583    type Ux = u8;
584}
585impl PD4_SELECT_R {
586    #[doc = "Get enumerated values variant"]
587    #[inline(always)]
588    pub const fn variant(&self) -> Option<PD4_SELECT_A> {
589        match self.bits {
590            0 => Some(PD4_SELECT_A::INPUT),
591            2 => Some(PD4_SELECT_A::LCD0_D6),
592            4 => Some(PD4_SELECT_A::DSI_CKP),
593            14 => Some(PD4_SELECT_A::PD_EINT4),
594            1 => Some(PD4_SELECT_A::OUTPUT),
595            3 => Some(PD4_SELECT_A::LVDS0_V2P),
596            5 => Some(PD4_SELECT_A::UART2_CTS),
597            15 => Some(PD4_SELECT_A::IO_DISABLE),
598            _ => None,
599        }
600    }
601    #[doc = "`0`"]
602    #[inline(always)]
603    pub fn is_input(&self) -> bool {
604        *self == PD4_SELECT_A::INPUT
605    }
606    #[doc = "`10`"]
607    #[inline(always)]
608    pub fn is_lcd0_d6(&self) -> bool {
609        *self == PD4_SELECT_A::LCD0_D6
610    }
611    #[doc = "`100`"]
612    #[inline(always)]
613    pub fn is_dsi_ckp(&self) -> bool {
614        *self == PD4_SELECT_A::DSI_CKP
615    }
616    #[doc = "`1110`"]
617    #[inline(always)]
618    pub fn is_pd_eint4(&self) -> bool {
619        *self == PD4_SELECT_A::PD_EINT4
620    }
621    #[doc = "`1`"]
622    #[inline(always)]
623    pub fn is_output(&self) -> bool {
624        *self == PD4_SELECT_A::OUTPUT
625    }
626    #[doc = "`11`"]
627    #[inline(always)]
628    pub fn is_lvds0_v2p(&self) -> bool {
629        *self == PD4_SELECT_A::LVDS0_V2P
630    }
631    #[doc = "`101`"]
632    #[inline(always)]
633    pub fn is_uart2_cts(&self) -> bool {
634        *self == PD4_SELECT_A::UART2_CTS
635    }
636    #[doc = "`1111`"]
637    #[inline(always)]
638    pub fn is_io_disable(&self) -> bool {
639        *self == PD4_SELECT_A::IO_DISABLE
640    }
641}
642#[doc = "Field `pd4_select` writer - PD4 Select"]
643pub type PD4_SELECT_W<'a, REG> = crate::FieldWriter<'a, REG, 4, PD4_SELECT_A>;
644impl<'a, REG> PD4_SELECT_W<'a, REG>
645where
646    REG: crate::Writable + crate::RegisterSpec,
647    REG::Ux: From<u8>,
648{
649    #[doc = "`0`"]
650    #[inline(always)]
651    pub fn input(self) -> &'a mut crate::W<REG> {
652        self.variant(PD4_SELECT_A::INPUT)
653    }
654    #[doc = "`10`"]
655    #[inline(always)]
656    pub fn lcd0_d6(self) -> &'a mut crate::W<REG> {
657        self.variant(PD4_SELECT_A::LCD0_D6)
658    }
659    #[doc = "`100`"]
660    #[inline(always)]
661    pub fn dsi_ckp(self) -> &'a mut crate::W<REG> {
662        self.variant(PD4_SELECT_A::DSI_CKP)
663    }
664    #[doc = "`1110`"]
665    #[inline(always)]
666    pub fn pd_eint4(self) -> &'a mut crate::W<REG> {
667        self.variant(PD4_SELECT_A::PD_EINT4)
668    }
669    #[doc = "`1`"]
670    #[inline(always)]
671    pub fn output(self) -> &'a mut crate::W<REG> {
672        self.variant(PD4_SELECT_A::OUTPUT)
673    }
674    #[doc = "`11`"]
675    #[inline(always)]
676    pub fn lvds0_v2p(self) -> &'a mut crate::W<REG> {
677        self.variant(PD4_SELECT_A::LVDS0_V2P)
678    }
679    #[doc = "`101`"]
680    #[inline(always)]
681    pub fn uart2_cts(self) -> &'a mut crate::W<REG> {
682        self.variant(PD4_SELECT_A::UART2_CTS)
683    }
684    #[doc = "`1111`"]
685    #[inline(always)]
686    pub fn io_disable(self) -> &'a mut crate::W<REG> {
687        self.variant(PD4_SELECT_A::IO_DISABLE)
688    }
689}
690#[doc = "Field `pd5_select` reader - PD5 Select"]
691pub type PD5_SELECT_R = crate::FieldReader<PD5_SELECT_A>;
692#[doc = "PD5 Select\n\nValue on reset: 0"]
693#[derive(Clone, Copy, Debug, PartialEq, Eq)]
694#[repr(u8)]
695pub enum PD5_SELECT_A {
696    #[doc = "0: `0`"]
697    INPUT = 0,
698    #[doc = "2: `10`"]
699    LCD0_D7 = 2,
700    #[doc = "4: `100`"]
701    DSI_CKN = 4,
702    #[doc = "14: `1110`"]
703    PD_EINT5 = 14,
704    #[doc = "1: `1`"]
705    OUTPUT = 1,
706    #[doc = "3: `11`"]
707    LVDS0_V2N = 3,
708    #[doc = "5: `101`"]
709    UART5_TX = 5,
710    #[doc = "15: `1111`"]
711    IO_DISABLE = 15,
712}
713impl From<PD5_SELECT_A> for u8 {
714    #[inline(always)]
715    fn from(variant: PD5_SELECT_A) -> Self {
716        variant as _
717    }
718}
719impl crate::FieldSpec for PD5_SELECT_A {
720    type Ux = u8;
721}
722impl PD5_SELECT_R {
723    #[doc = "Get enumerated values variant"]
724    #[inline(always)]
725    pub const fn variant(&self) -> Option<PD5_SELECT_A> {
726        match self.bits {
727            0 => Some(PD5_SELECT_A::INPUT),
728            2 => Some(PD5_SELECT_A::LCD0_D7),
729            4 => Some(PD5_SELECT_A::DSI_CKN),
730            14 => Some(PD5_SELECT_A::PD_EINT5),
731            1 => Some(PD5_SELECT_A::OUTPUT),
732            3 => Some(PD5_SELECT_A::LVDS0_V2N),
733            5 => Some(PD5_SELECT_A::UART5_TX),
734            15 => Some(PD5_SELECT_A::IO_DISABLE),
735            _ => None,
736        }
737    }
738    #[doc = "`0`"]
739    #[inline(always)]
740    pub fn is_input(&self) -> bool {
741        *self == PD5_SELECT_A::INPUT
742    }
743    #[doc = "`10`"]
744    #[inline(always)]
745    pub fn is_lcd0_d7(&self) -> bool {
746        *self == PD5_SELECT_A::LCD0_D7
747    }
748    #[doc = "`100`"]
749    #[inline(always)]
750    pub fn is_dsi_ckn(&self) -> bool {
751        *self == PD5_SELECT_A::DSI_CKN
752    }
753    #[doc = "`1110`"]
754    #[inline(always)]
755    pub fn is_pd_eint5(&self) -> bool {
756        *self == PD5_SELECT_A::PD_EINT5
757    }
758    #[doc = "`1`"]
759    #[inline(always)]
760    pub fn is_output(&self) -> bool {
761        *self == PD5_SELECT_A::OUTPUT
762    }
763    #[doc = "`11`"]
764    #[inline(always)]
765    pub fn is_lvds0_v2n(&self) -> bool {
766        *self == PD5_SELECT_A::LVDS0_V2N
767    }
768    #[doc = "`101`"]
769    #[inline(always)]
770    pub fn is_uart5_tx(&self) -> bool {
771        *self == PD5_SELECT_A::UART5_TX
772    }
773    #[doc = "`1111`"]
774    #[inline(always)]
775    pub fn is_io_disable(&self) -> bool {
776        *self == PD5_SELECT_A::IO_DISABLE
777    }
778}
779#[doc = "Field `pd5_select` writer - PD5 Select"]
780pub type PD5_SELECT_W<'a, REG> = crate::FieldWriter<'a, REG, 4, PD5_SELECT_A>;
781impl<'a, REG> PD5_SELECT_W<'a, REG>
782where
783    REG: crate::Writable + crate::RegisterSpec,
784    REG::Ux: From<u8>,
785{
786    #[doc = "`0`"]
787    #[inline(always)]
788    pub fn input(self) -> &'a mut crate::W<REG> {
789        self.variant(PD5_SELECT_A::INPUT)
790    }
791    #[doc = "`10`"]
792    #[inline(always)]
793    pub fn lcd0_d7(self) -> &'a mut crate::W<REG> {
794        self.variant(PD5_SELECT_A::LCD0_D7)
795    }
796    #[doc = "`100`"]
797    #[inline(always)]
798    pub fn dsi_ckn(self) -> &'a mut crate::W<REG> {
799        self.variant(PD5_SELECT_A::DSI_CKN)
800    }
801    #[doc = "`1110`"]
802    #[inline(always)]
803    pub fn pd_eint5(self) -> &'a mut crate::W<REG> {
804        self.variant(PD5_SELECT_A::PD_EINT5)
805    }
806    #[doc = "`1`"]
807    #[inline(always)]
808    pub fn output(self) -> &'a mut crate::W<REG> {
809        self.variant(PD5_SELECT_A::OUTPUT)
810    }
811    #[doc = "`11`"]
812    #[inline(always)]
813    pub fn lvds0_v2n(self) -> &'a mut crate::W<REG> {
814        self.variant(PD5_SELECT_A::LVDS0_V2N)
815    }
816    #[doc = "`101`"]
817    #[inline(always)]
818    pub fn uart5_tx(self) -> &'a mut crate::W<REG> {
819        self.variant(PD5_SELECT_A::UART5_TX)
820    }
821    #[doc = "`1111`"]
822    #[inline(always)]
823    pub fn io_disable(self) -> &'a mut crate::W<REG> {
824        self.variant(PD5_SELECT_A::IO_DISABLE)
825    }
826}
827#[doc = "Field `pd6_select` reader - PD6 Select"]
828pub type PD6_SELECT_R = crate::FieldReader<PD6_SELECT_A>;
829#[doc = "PD6 Select\n\nValue on reset: 0"]
830#[derive(Clone, Copy, Debug, PartialEq, Eq)]
831#[repr(u8)]
832pub enum PD6_SELECT_A {
833    #[doc = "0: `0`"]
834    INPUT = 0,
835    #[doc = "2: `10`"]
836    LCD0_D10 = 2,
837    #[doc = "4: `100`"]
838    DSI_D2P = 4,
839    #[doc = "14: `1110`"]
840    PD_EINT6 = 14,
841    #[doc = "1: `1`"]
842    OUTPUT = 1,
843    #[doc = "3: `11`"]
844    LVDS0_CKP = 3,
845    #[doc = "5: `101`"]
846    UART5_RX = 5,
847    #[doc = "15: `1111`"]
848    IO_DISABLE = 15,
849}
850impl From<PD6_SELECT_A> for u8 {
851    #[inline(always)]
852    fn from(variant: PD6_SELECT_A) -> Self {
853        variant as _
854    }
855}
856impl crate::FieldSpec for PD6_SELECT_A {
857    type Ux = u8;
858}
859impl PD6_SELECT_R {
860    #[doc = "Get enumerated values variant"]
861    #[inline(always)]
862    pub const fn variant(&self) -> Option<PD6_SELECT_A> {
863        match self.bits {
864            0 => Some(PD6_SELECT_A::INPUT),
865            2 => Some(PD6_SELECT_A::LCD0_D10),
866            4 => Some(PD6_SELECT_A::DSI_D2P),
867            14 => Some(PD6_SELECT_A::PD_EINT6),
868            1 => Some(PD6_SELECT_A::OUTPUT),
869            3 => Some(PD6_SELECT_A::LVDS0_CKP),
870            5 => Some(PD6_SELECT_A::UART5_RX),
871            15 => Some(PD6_SELECT_A::IO_DISABLE),
872            _ => None,
873        }
874    }
875    #[doc = "`0`"]
876    #[inline(always)]
877    pub fn is_input(&self) -> bool {
878        *self == PD6_SELECT_A::INPUT
879    }
880    #[doc = "`10`"]
881    #[inline(always)]
882    pub fn is_lcd0_d10(&self) -> bool {
883        *self == PD6_SELECT_A::LCD0_D10
884    }
885    #[doc = "`100`"]
886    #[inline(always)]
887    pub fn is_dsi_d2p(&self) -> bool {
888        *self == PD6_SELECT_A::DSI_D2P
889    }
890    #[doc = "`1110`"]
891    #[inline(always)]
892    pub fn is_pd_eint6(&self) -> bool {
893        *self == PD6_SELECT_A::PD_EINT6
894    }
895    #[doc = "`1`"]
896    #[inline(always)]
897    pub fn is_output(&self) -> bool {
898        *self == PD6_SELECT_A::OUTPUT
899    }
900    #[doc = "`11`"]
901    #[inline(always)]
902    pub fn is_lvds0_ckp(&self) -> bool {
903        *self == PD6_SELECT_A::LVDS0_CKP
904    }
905    #[doc = "`101`"]
906    #[inline(always)]
907    pub fn is_uart5_rx(&self) -> bool {
908        *self == PD6_SELECT_A::UART5_RX
909    }
910    #[doc = "`1111`"]
911    #[inline(always)]
912    pub fn is_io_disable(&self) -> bool {
913        *self == PD6_SELECT_A::IO_DISABLE
914    }
915}
916#[doc = "Field `pd6_select` writer - PD6 Select"]
917pub type PD6_SELECT_W<'a, REG> = crate::FieldWriter<'a, REG, 4, PD6_SELECT_A>;
918impl<'a, REG> PD6_SELECT_W<'a, REG>
919where
920    REG: crate::Writable + crate::RegisterSpec,
921    REG::Ux: From<u8>,
922{
923    #[doc = "`0`"]
924    #[inline(always)]
925    pub fn input(self) -> &'a mut crate::W<REG> {
926        self.variant(PD6_SELECT_A::INPUT)
927    }
928    #[doc = "`10`"]
929    #[inline(always)]
930    pub fn lcd0_d10(self) -> &'a mut crate::W<REG> {
931        self.variant(PD6_SELECT_A::LCD0_D10)
932    }
933    #[doc = "`100`"]
934    #[inline(always)]
935    pub fn dsi_d2p(self) -> &'a mut crate::W<REG> {
936        self.variant(PD6_SELECT_A::DSI_D2P)
937    }
938    #[doc = "`1110`"]
939    #[inline(always)]
940    pub fn pd_eint6(self) -> &'a mut crate::W<REG> {
941        self.variant(PD6_SELECT_A::PD_EINT6)
942    }
943    #[doc = "`1`"]
944    #[inline(always)]
945    pub fn output(self) -> &'a mut crate::W<REG> {
946        self.variant(PD6_SELECT_A::OUTPUT)
947    }
948    #[doc = "`11`"]
949    #[inline(always)]
950    pub fn lvds0_ckp(self) -> &'a mut crate::W<REG> {
951        self.variant(PD6_SELECT_A::LVDS0_CKP)
952    }
953    #[doc = "`101`"]
954    #[inline(always)]
955    pub fn uart5_rx(self) -> &'a mut crate::W<REG> {
956        self.variant(PD6_SELECT_A::UART5_RX)
957    }
958    #[doc = "`1111`"]
959    #[inline(always)]
960    pub fn io_disable(self) -> &'a mut crate::W<REG> {
961        self.variant(PD6_SELECT_A::IO_DISABLE)
962    }
963}
964#[doc = "Field `pd7_select` reader - PD7 Select"]
965pub type PD7_SELECT_R = crate::FieldReader<PD7_SELECT_A>;
966#[doc = "PD7 Select\n\nValue on reset: 0"]
967#[derive(Clone, Copy, Debug, PartialEq, Eq)]
968#[repr(u8)]
969pub enum PD7_SELECT_A {
970    #[doc = "0: `0`"]
971    INPUT = 0,
972    #[doc = "2: `10`"]
973    LCD0_D11 = 2,
974    #[doc = "4: `100`"]
975    DSI_D2N = 4,
976    #[doc = "14: `1110`"]
977    PD_EINT7 = 14,
978    #[doc = "1: `1`"]
979    OUTPUT = 1,
980    #[doc = "3: `11`"]
981    LVDS0_CKN = 3,
982    #[doc = "5: `101`"]
983    UART4_TX = 5,
984    #[doc = "15: `1111`"]
985    IO_DISABLE = 15,
986}
987impl From<PD7_SELECT_A> for u8 {
988    #[inline(always)]
989    fn from(variant: PD7_SELECT_A) -> Self {
990        variant as _
991    }
992}
993impl crate::FieldSpec for PD7_SELECT_A {
994    type Ux = u8;
995}
996impl PD7_SELECT_R {
997    #[doc = "Get enumerated values variant"]
998    #[inline(always)]
999    pub const fn variant(&self) -> Option<PD7_SELECT_A> {
1000        match self.bits {
1001            0 => Some(PD7_SELECT_A::INPUT),
1002            2 => Some(PD7_SELECT_A::LCD0_D11),
1003            4 => Some(PD7_SELECT_A::DSI_D2N),
1004            14 => Some(PD7_SELECT_A::PD_EINT7),
1005            1 => Some(PD7_SELECT_A::OUTPUT),
1006            3 => Some(PD7_SELECT_A::LVDS0_CKN),
1007            5 => Some(PD7_SELECT_A::UART4_TX),
1008            15 => Some(PD7_SELECT_A::IO_DISABLE),
1009            _ => None,
1010        }
1011    }
1012    #[doc = "`0`"]
1013    #[inline(always)]
1014    pub fn is_input(&self) -> bool {
1015        *self == PD7_SELECT_A::INPUT
1016    }
1017    #[doc = "`10`"]
1018    #[inline(always)]
1019    pub fn is_lcd0_d11(&self) -> bool {
1020        *self == PD7_SELECT_A::LCD0_D11
1021    }
1022    #[doc = "`100`"]
1023    #[inline(always)]
1024    pub fn is_dsi_d2n(&self) -> bool {
1025        *self == PD7_SELECT_A::DSI_D2N
1026    }
1027    #[doc = "`1110`"]
1028    #[inline(always)]
1029    pub fn is_pd_eint7(&self) -> bool {
1030        *self == PD7_SELECT_A::PD_EINT7
1031    }
1032    #[doc = "`1`"]
1033    #[inline(always)]
1034    pub fn is_output(&self) -> bool {
1035        *self == PD7_SELECT_A::OUTPUT
1036    }
1037    #[doc = "`11`"]
1038    #[inline(always)]
1039    pub fn is_lvds0_ckn(&self) -> bool {
1040        *self == PD7_SELECT_A::LVDS0_CKN
1041    }
1042    #[doc = "`101`"]
1043    #[inline(always)]
1044    pub fn is_uart4_tx(&self) -> bool {
1045        *self == PD7_SELECT_A::UART4_TX
1046    }
1047    #[doc = "`1111`"]
1048    #[inline(always)]
1049    pub fn is_io_disable(&self) -> bool {
1050        *self == PD7_SELECT_A::IO_DISABLE
1051    }
1052}
1053#[doc = "Field `pd7_select` writer - PD7 Select"]
1054pub type PD7_SELECT_W<'a, REG> = crate::FieldWriter<'a, REG, 4, PD7_SELECT_A>;
1055impl<'a, REG> PD7_SELECT_W<'a, REG>
1056where
1057    REG: crate::Writable + crate::RegisterSpec,
1058    REG::Ux: From<u8>,
1059{
1060    #[doc = "`0`"]
1061    #[inline(always)]
1062    pub fn input(self) -> &'a mut crate::W<REG> {
1063        self.variant(PD7_SELECT_A::INPUT)
1064    }
1065    #[doc = "`10`"]
1066    #[inline(always)]
1067    pub fn lcd0_d11(self) -> &'a mut crate::W<REG> {
1068        self.variant(PD7_SELECT_A::LCD0_D11)
1069    }
1070    #[doc = "`100`"]
1071    #[inline(always)]
1072    pub fn dsi_d2n(self) -> &'a mut crate::W<REG> {
1073        self.variant(PD7_SELECT_A::DSI_D2N)
1074    }
1075    #[doc = "`1110`"]
1076    #[inline(always)]
1077    pub fn pd_eint7(self) -> &'a mut crate::W<REG> {
1078        self.variant(PD7_SELECT_A::PD_EINT7)
1079    }
1080    #[doc = "`1`"]
1081    #[inline(always)]
1082    pub fn output(self) -> &'a mut crate::W<REG> {
1083        self.variant(PD7_SELECT_A::OUTPUT)
1084    }
1085    #[doc = "`11`"]
1086    #[inline(always)]
1087    pub fn lvds0_ckn(self) -> &'a mut crate::W<REG> {
1088        self.variant(PD7_SELECT_A::LVDS0_CKN)
1089    }
1090    #[doc = "`101`"]
1091    #[inline(always)]
1092    pub fn uart4_tx(self) -> &'a mut crate::W<REG> {
1093        self.variant(PD7_SELECT_A::UART4_TX)
1094    }
1095    #[doc = "`1111`"]
1096    #[inline(always)]
1097    pub fn io_disable(self) -> &'a mut crate::W<REG> {
1098        self.variant(PD7_SELECT_A::IO_DISABLE)
1099    }
1100}
1101impl R {
1102    #[doc = "Bits 0:3 - PD0 Select"]
1103    #[inline(always)]
1104    pub fn pd0_select(&self) -> PD0_SELECT_R {
1105        PD0_SELECT_R::new((self.bits & 0x0f) as u8)
1106    }
1107    #[doc = "Bits 4:7 - PD1 Select"]
1108    #[inline(always)]
1109    pub fn pd1_select(&self) -> PD1_SELECT_R {
1110        PD1_SELECT_R::new(((self.bits >> 4) & 0x0f) as u8)
1111    }
1112    #[doc = "Bits 8:11 - PD2 Select"]
1113    #[inline(always)]
1114    pub fn pd2_select(&self) -> PD2_SELECT_R {
1115        PD2_SELECT_R::new(((self.bits >> 8) & 0x0f) as u8)
1116    }
1117    #[doc = "Bits 12:15 - PD3 Select"]
1118    #[inline(always)]
1119    pub fn pd3_select(&self) -> PD3_SELECT_R {
1120        PD3_SELECT_R::new(((self.bits >> 12) & 0x0f) as u8)
1121    }
1122    #[doc = "Bits 16:19 - PD4 Select"]
1123    #[inline(always)]
1124    pub fn pd4_select(&self) -> PD4_SELECT_R {
1125        PD4_SELECT_R::new(((self.bits >> 16) & 0x0f) as u8)
1126    }
1127    #[doc = "Bits 20:23 - PD5 Select"]
1128    #[inline(always)]
1129    pub fn pd5_select(&self) -> PD5_SELECT_R {
1130        PD5_SELECT_R::new(((self.bits >> 20) & 0x0f) as u8)
1131    }
1132    #[doc = "Bits 24:27 - PD6 Select"]
1133    #[inline(always)]
1134    pub fn pd6_select(&self) -> PD6_SELECT_R {
1135        PD6_SELECT_R::new(((self.bits >> 24) & 0x0f) as u8)
1136    }
1137    #[doc = "Bits 28:31 - PD7 Select"]
1138    #[inline(always)]
1139    pub fn pd7_select(&self) -> PD7_SELECT_R {
1140        PD7_SELECT_R::new(((self.bits >> 28) & 0x0f) as u8)
1141    }
1142}
1143impl W {
1144    #[doc = "Bits 0:3 - PD0 Select"]
1145    #[inline(always)]
1146    #[must_use]
1147    pub fn pd0_select(&mut self) -> PD0_SELECT_W<PD_CFG0_SPEC> {
1148        PD0_SELECT_W::new(self, 0)
1149    }
1150    #[doc = "Bits 4:7 - PD1 Select"]
1151    #[inline(always)]
1152    #[must_use]
1153    pub fn pd1_select(&mut self) -> PD1_SELECT_W<PD_CFG0_SPEC> {
1154        PD1_SELECT_W::new(self, 4)
1155    }
1156    #[doc = "Bits 8:11 - PD2 Select"]
1157    #[inline(always)]
1158    #[must_use]
1159    pub fn pd2_select(&mut self) -> PD2_SELECT_W<PD_CFG0_SPEC> {
1160        PD2_SELECT_W::new(self, 8)
1161    }
1162    #[doc = "Bits 12:15 - PD3 Select"]
1163    #[inline(always)]
1164    #[must_use]
1165    pub fn pd3_select(&mut self) -> PD3_SELECT_W<PD_CFG0_SPEC> {
1166        PD3_SELECT_W::new(self, 12)
1167    }
1168    #[doc = "Bits 16:19 - PD4 Select"]
1169    #[inline(always)]
1170    #[must_use]
1171    pub fn pd4_select(&mut self) -> PD4_SELECT_W<PD_CFG0_SPEC> {
1172        PD4_SELECT_W::new(self, 16)
1173    }
1174    #[doc = "Bits 20:23 - PD5 Select"]
1175    #[inline(always)]
1176    #[must_use]
1177    pub fn pd5_select(&mut self) -> PD5_SELECT_W<PD_CFG0_SPEC> {
1178        PD5_SELECT_W::new(self, 20)
1179    }
1180    #[doc = "Bits 24:27 - PD6 Select"]
1181    #[inline(always)]
1182    #[must_use]
1183    pub fn pd6_select(&mut self) -> PD6_SELECT_W<PD_CFG0_SPEC> {
1184        PD6_SELECT_W::new(self, 24)
1185    }
1186    #[doc = "Bits 28:31 - PD7 Select"]
1187    #[inline(always)]
1188    #[must_use]
1189    pub fn pd7_select(&mut self) -> PD7_SELECT_W<PD_CFG0_SPEC> {
1190        PD7_SELECT_W::new(self, 28)
1191    }
1192    #[doc = r" Writes raw bits to the register."]
1193    #[doc = r""]
1194    #[doc = r" # Safety"]
1195    #[doc = r""]
1196    #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
1197    #[inline(always)]
1198    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1199        self.bits = bits;
1200        self
1201    }
1202}
1203#[doc = "PD Configure Register 0\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`pd_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 [`pd_cfg0::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
1204pub struct PD_CFG0_SPEC;
1205impl crate::RegisterSpec for PD_CFG0_SPEC {
1206    type Ux = u32;
1207}
1208#[doc = "`read()` method returns [`pd_cfg0::R`](R) reader structure"]
1209impl crate::Readable for PD_CFG0_SPEC {}
1210#[doc = "`write(|w| ..)` method takes [`pd_cfg0::W`](W) writer structure"]
1211impl crate::Writable for PD_CFG0_SPEC {
1212    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
1213    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
1214}
1215#[doc = "`reset()` method sets pd_cfg0 to value 0"]
1216impl crate::Resettable for PD_CFG0_SPEC {
1217    const RESET_VALUE: Self::Ux = 0;
1218}