lpc55_pac/iocon/
pio1_29.rs

1#[doc = "Register `PIO1_29` reader"]
2pub struct R(crate::R<PIO1_29_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<PIO1_29_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<PIO1_29_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<PIO1_29_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `PIO1_29` writer"]
17pub struct W(crate::W<PIO1_29_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<PIO1_29_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<PIO1_29_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<PIO1_29_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Selects pin function.\n\nValue on reset: 0"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39#[repr(u8)]
40pub enum FUNC_A {
41    #[doc = "0: Alternative connection 0."]
42    ALT0 = 0,
43    #[doc = "1: Alternative connection 1."]
44    ALT1 = 1,
45    #[doc = "2: Alternative connection 2."]
46    ALT2 = 2,
47    #[doc = "3: Alternative connection 3."]
48    ALT3 = 3,
49    #[doc = "4: Alternative connection 4."]
50    ALT4 = 4,
51    #[doc = "5: Alternative connection 5."]
52    ALT5 = 5,
53    #[doc = "6: Alternative connection 6."]
54    ALT6 = 6,
55    #[doc = "7: Alternative connection 7."]
56    ALT7 = 7,
57}
58impl From<FUNC_A> for u8 {
59    #[inline(always)]
60    fn from(variant: FUNC_A) -> Self {
61        variant as _
62    }
63}
64#[doc = "Field `FUNC` reader - Selects pin function."]
65pub struct FUNC_R(crate::FieldReader<u8, FUNC_A>);
66impl FUNC_R {
67    #[inline(always)]
68    pub(crate) fn new(bits: u8) -> Self {
69        FUNC_R(crate::FieldReader::new(bits))
70    }
71    #[doc = r"Get enumerated values variant"]
72    #[inline(always)]
73    pub fn variant(&self) -> Option<FUNC_A> {
74        match self.bits {
75            0 => Some(FUNC_A::ALT0),
76            1 => Some(FUNC_A::ALT1),
77            2 => Some(FUNC_A::ALT2),
78            3 => Some(FUNC_A::ALT3),
79            4 => Some(FUNC_A::ALT4),
80            5 => Some(FUNC_A::ALT5),
81            6 => Some(FUNC_A::ALT6),
82            7 => Some(FUNC_A::ALT7),
83            _ => None,
84        }
85    }
86    #[doc = "Checks if the value of the field is `ALT0`"]
87    #[inline(always)]
88    pub fn is_alt0(&self) -> bool {
89        **self == FUNC_A::ALT0
90    }
91    #[doc = "Checks if the value of the field is `ALT1`"]
92    #[inline(always)]
93    pub fn is_alt1(&self) -> bool {
94        **self == FUNC_A::ALT1
95    }
96    #[doc = "Checks if the value of the field is `ALT2`"]
97    #[inline(always)]
98    pub fn is_alt2(&self) -> bool {
99        **self == FUNC_A::ALT2
100    }
101    #[doc = "Checks if the value of the field is `ALT3`"]
102    #[inline(always)]
103    pub fn is_alt3(&self) -> bool {
104        **self == FUNC_A::ALT3
105    }
106    #[doc = "Checks if the value of the field is `ALT4`"]
107    #[inline(always)]
108    pub fn is_alt4(&self) -> bool {
109        **self == FUNC_A::ALT4
110    }
111    #[doc = "Checks if the value of the field is `ALT5`"]
112    #[inline(always)]
113    pub fn is_alt5(&self) -> bool {
114        **self == FUNC_A::ALT5
115    }
116    #[doc = "Checks if the value of the field is `ALT6`"]
117    #[inline(always)]
118    pub fn is_alt6(&self) -> bool {
119        **self == FUNC_A::ALT6
120    }
121    #[doc = "Checks if the value of the field is `ALT7`"]
122    #[inline(always)]
123    pub fn is_alt7(&self) -> bool {
124        **self == FUNC_A::ALT7
125    }
126}
127impl core::ops::Deref for FUNC_R {
128    type Target = crate::FieldReader<u8, FUNC_A>;
129    #[inline(always)]
130    fn deref(&self) -> &Self::Target {
131        &self.0
132    }
133}
134#[doc = "Field `FUNC` writer - Selects pin function."]
135pub struct FUNC_W<'a> {
136    w: &'a mut W,
137}
138impl<'a> FUNC_W<'a> {
139    #[doc = r"Writes `variant` to the field"]
140    #[inline(always)]
141    pub fn variant(self, variant: FUNC_A) -> &'a mut W {
142        unsafe { self.bits(variant.into()) }
143    }
144    #[doc = "Alternative connection 0."]
145    #[inline(always)]
146    pub fn alt0(self) -> &'a mut W {
147        self.variant(FUNC_A::ALT0)
148    }
149    #[doc = "Alternative connection 1."]
150    #[inline(always)]
151    pub fn alt1(self) -> &'a mut W {
152        self.variant(FUNC_A::ALT1)
153    }
154    #[doc = "Alternative connection 2."]
155    #[inline(always)]
156    pub fn alt2(self) -> &'a mut W {
157        self.variant(FUNC_A::ALT2)
158    }
159    #[doc = "Alternative connection 3."]
160    #[inline(always)]
161    pub fn alt3(self) -> &'a mut W {
162        self.variant(FUNC_A::ALT3)
163    }
164    #[doc = "Alternative connection 4."]
165    #[inline(always)]
166    pub fn alt4(self) -> &'a mut W {
167        self.variant(FUNC_A::ALT4)
168    }
169    #[doc = "Alternative connection 5."]
170    #[inline(always)]
171    pub fn alt5(self) -> &'a mut W {
172        self.variant(FUNC_A::ALT5)
173    }
174    #[doc = "Alternative connection 6."]
175    #[inline(always)]
176    pub fn alt6(self) -> &'a mut W {
177        self.variant(FUNC_A::ALT6)
178    }
179    #[doc = "Alternative connection 7."]
180    #[inline(always)]
181    pub fn alt7(self) -> &'a mut W {
182        self.variant(FUNC_A::ALT7)
183    }
184    #[doc = r"Writes raw bits to the field"]
185    #[inline(always)]
186    pub unsafe fn bits(self, value: u8) -> &'a mut W {
187        self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
188        self.w
189    }
190}
191#[doc = "Selects function mode (on-chip pull-up/pull-down resistor control).\n\nValue on reset: 0"]
192#[derive(Clone, Copy, Debug, PartialEq)]
193#[repr(u8)]
194pub enum MODE_A {
195    #[doc = "0: Inactive. Inactive (no pull-down/pull-up resistor enabled)."]
196    INACTIVE = 0,
197    #[doc = "1: Pull-down. Pull-down resistor enabled."]
198    PULL_DOWN = 1,
199    #[doc = "2: Pull-up. Pull-up resistor enabled."]
200    PULL_UP = 2,
201    #[doc = "3: Repeater. Repeater mode."]
202    REPEATER = 3,
203}
204impl From<MODE_A> for u8 {
205    #[inline(always)]
206    fn from(variant: MODE_A) -> Self {
207        variant as _
208    }
209}
210#[doc = "Field `MODE` reader - Selects function mode (on-chip pull-up/pull-down resistor control)."]
211pub struct MODE_R(crate::FieldReader<u8, MODE_A>);
212impl MODE_R {
213    #[inline(always)]
214    pub(crate) fn new(bits: u8) -> Self {
215        MODE_R(crate::FieldReader::new(bits))
216    }
217    #[doc = r"Get enumerated values variant"]
218    #[inline(always)]
219    pub fn variant(&self) -> MODE_A {
220        match self.bits {
221            0 => MODE_A::INACTIVE,
222            1 => MODE_A::PULL_DOWN,
223            2 => MODE_A::PULL_UP,
224            3 => MODE_A::REPEATER,
225            _ => unreachable!(),
226        }
227    }
228    #[doc = "Checks if the value of the field is `INACTIVE`"]
229    #[inline(always)]
230    pub fn is_inactive(&self) -> bool {
231        **self == MODE_A::INACTIVE
232    }
233    #[doc = "Checks if the value of the field is `PULL_DOWN`"]
234    #[inline(always)]
235    pub fn is_pull_down(&self) -> bool {
236        **self == MODE_A::PULL_DOWN
237    }
238    #[doc = "Checks if the value of the field is `PULL_UP`"]
239    #[inline(always)]
240    pub fn is_pull_up(&self) -> bool {
241        **self == MODE_A::PULL_UP
242    }
243    #[doc = "Checks if the value of the field is `REPEATER`"]
244    #[inline(always)]
245    pub fn is_repeater(&self) -> bool {
246        **self == MODE_A::REPEATER
247    }
248}
249impl core::ops::Deref for MODE_R {
250    type Target = crate::FieldReader<u8, MODE_A>;
251    #[inline(always)]
252    fn deref(&self) -> &Self::Target {
253        &self.0
254    }
255}
256#[doc = "Field `MODE` writer - Selects function mode (on-chip pull-up/pull-down resistor control)."]
257pub struct MODE_W<'a> {
258    w: &'a mut W,
259}
260impl<'a> MODE_W<'a> {
261    #[doc = r"Writes `variant` to the field"]
262    #[inline(always)]
263    pub fn variant(self, variant: MODE_A) -> &'a mut W {
264        self.bits(variant.into())
265    }
266    #[doc = "Inactive. Inactive (no pull-down/pull-up resistor enabled)."]
267    #[inline(always)]
268    pub fn inactive(self) -> &'a mut W {
269        self.variant(MODE_A::INACTIVE)
270    }
271    #[doc = "Pull-down. Pull-down resistor enabled."]
272    #[inline(always)]
273    pub fn pull_down(self) -> &'a mut W {
274        self.variant(MODE_A::PULL_DOWN)
275    }
276    #[doc = "Pull-up. Pull-up resistor enabled."]
277    #[inline(always)]
278    pub fn pull_up(self) -> &'a mut W {
279        self.variant(MODE_A::PULL_UP)
280    }
281    #[doc = "Repeater. Repeater mode."]
282    #[inline(always)]
283    pub fn repeater(self) -> &'a mut W {
284        self.variant(MODE_A::REPEATER)
285    }
286    #[doc = r"Writes raw bits to the field"]
287    #[inline(always)]
288    pub fn bits(self, value: u8) -> &'a mut W {
289        self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4);
290        self.w
291    }
292}
293#[doc = "Driver slew rate.\n\nValue on reset: 0"]
294#[derive(Clone, Copy, Debug, PartialEq)]
295pub enum SLEW_A {
296    #[doc = "0: Standard-mode, output slew rate is slower. More outputs can be switched simultaneously."]
297    STANDARD = 0,
298    #[doc = "1: Fast-mode, output slew rate is faster. Refer to the appropriate specific device data sheet for details."]
299    FAST = 1,
300}
301impl From<SLEW_A> for bool {
302    #[inline(always)]
303    fn from(variant: SLEW_A) -> Self {
304        variant as u8 != 0
305    }
306}
307#[doc = "Field `SLEW` reader - Driver slew rate."]
308pub struct SLEW_R(crate::FieldReader<bool, SLEW_A>);
309impl SLEW_R {
310    #[inline(always)]
311    pub(crate) fn new(bits: bool) -> Self {
312        SLEW_R(crate::FieldReader::new(bits))
313    }
314    #[doc = r"Get enumerated values variant"]
315    #[inline(always)]
316    pub fn variant(&self) -> SLEW_A {
317        match self.bits {
318            false => SLEW_A::STANDARD,
319            true => SLEW_A::FAST,
320        }
321    }
322    #[doc = "Checks if the value of the field is `STANDARD`"]
323    #[inline(always)]
324    pub fn is_standard(&self) -> bool {
325        **self == SLEW_A::STANDARD
326    }
327    #[doc = "Checks if the value of the field is `FAST`"]
328    #[inline(always)]
329    pub fn is_fast(&self) -> bool {
330        **self == SLEW_A::FAST
331    }
332}
333impl core::ops::Deref for SLEW_R {
334    type Target = crate::FieldReader<bool, SLEW_A>;
335    #[inline(always)]
336    fn deref(&self) -> &Self::Target {
337        &self.0
338    }
339}
340#[doc = "Field `SLEW` writer - Driver slew rate."]
341pub struct SLEW_W<'a> {
342    w: &'a mut W,
343}
344impl<'a> SLEW_W<'a> {
345    #[doc = r"Writes `variant` to the field"]
346    #[inline(always)]
347    pub fn variant(self, variant: SLEW_A) -> &'a mut W {
348        self.bit(variant.into())
349    }
350    #[doc = "Standard-mode, output slew rate is slower. More outputs can be switched simultaneously."]
351    #[inline(always)]
352    pub fn standard(self) -> &'a mut W {
353        self.variant(SLEW_A::STANDARD)
354    }
355    #[doc = "Fast-mode, output slew rate is faster. Refer to the appropriate specific device data sheet for details."]
356    #[inline(always)]
357    pub fn fast(self) -> &'a mut W {
358        self.variant(SLEW_A::FAST)
359    }
360    #[doc = r"Sets the field bit"]
361    #[inline(always)]
362    pub fn set_bit(self) -> &'a mut W {
363        self.bit(true)
364    }
365    #[doc = r"Clears the field bit"]
366    #[inline(always)]
367    pub fn clear_bit(self) -> &'a mut W {
368        self.bit(false)
369    }
370    #[doc = r"Writes raw bits to the field"]
371    #[inline(always)]
372    pub fn bit(self, value: bool) -> &'a mut W {
373        self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6);
374        self.w
375    }
376}
377#[doc = "Input polarity.\n\nValue on reset: 0"]
378#[derive(Clone, Copy, Debug, PartialEq)]
379pub enum INVERT_A {
380    #[doc = "0: Disabled. Input function is not inverted."]
381    DISABLED = 0,
382    #[doc = "1: Enabled. Input is function inverted."]
383    ENABLED = 1,
384}
385impl From<INVERT_A> for bool {
386    #[inline(always)]
387    fn from(variant: INVERT_A) -> Self {
388        variant as u8 != 0
389    }
390}
391#[doc = "Field `INVERT` reader - Input polarity."]
392pub struct INVERT_R(crate::FieldReader<bool, INVERT_A>);
393impl INVERT_R {
394    #[inline(always)]
395    pub(crate) fn new(bits: bool) -> Self {
396        INVERT_R(crate::FieldReader::new(bits))
397    }
398    #[doc = r"Get enumerated values variant"]
399    #[inline(always)]
400    pub fn variant(&self) -> INVERT_A {
401        match self.bits {
402            false => INVERT_A::DISABLED,
403            true => INVERT_A::ENABLED,
404        }
405    }
406    #[doc = "Checks if the value of the field is `DISABLED`"]
407    #[inline(always)]
408    pub fn is_disabled(&self) -> bool {
409        **self == INVERT_A::DISABLED
410    }
411    #[doc = "Checks if the value of the field is `ENABLED`"]
412    #[inline(always)]
413    pub fn is_enabled(&self) -> bool {
414        **self == INVERT_A::ENABLED
415    }
416}
417impl core::ops::Deref for INVERT_R {
418    type Target = crate::FieldReader<bool, INVERT_A>;
419    #[inline(always)]
420    fn deref(&self) -> &Self::Target {
421        &self.0
422    }
423}
424#[doc = "Field `INVERT` writer - Input polarity."]
425pub struct INVERT_W<'a> {
426    w: &'a mut W,
427}
428impl<'a> INVERT_W<'a> {
429    #[doc = r"Writes `variant` to the field"]
430    #[inline(always)]
431    pub fn variant(self, variant: INVERT_A) -> &'a mut W {
432        self.bit(variant.into())
433    }
434    #[doc = "Disabled. Input function is not inverted."]
435    #[inline(always)]
436    pub fn disabled(self) -> &'a mut W {
437        self.variant(INVERT_A::DISABLED)
438    }
439    #[doc = "Enabled. Input is function inverted."]
440    #[inline(always)]
441    pub fn enabled(self) -> &'a mut W {
442        self.variant(INVERT_A::ENABLED)
443    }
444    #[doc = r"Sets the field bit"]
445    #[inline(always)]
446    pub fn set_bit(self) -> &'a mut W {
447        self.bit(true)
448    }
449    #[doc = r"Clears the field bit"]
450    #[inline(always)]
451    pub fn clear_bit(self) -> &'a mut W {
452        self.bit(false)
453    }
454    #[doc = r"Writes raw bits to the field"]
455    #[inline(always)]
456    pub fn bit(self, value: bool) -> &'a mut W {
457        self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7);
458        self.w
459    }
460}
461#[doc = "Select Digital mode.\n\nValue on reset: 0"]
462#[derive(Clone, Copy, Debug, PartialEq)]
463pub enum DIGIMODE_A {
464    #[doc = "0: Disable digital mode. Digital input set to 0."]
465    ANALOG = 0,
466    #[doc = "1: Enable Digital mode. Digital input is enabled."]
467    DIGITAL = 1,
468}
469impl From<DIGIMODE_A> for bool {
470    #[inline(always)]
471    fn from(variant: DIGIMODE_A) -> Self {
472        variant as u8 != 0
473    }
474}
475#[doc = "Field `DIGIMODE` reader - Select Digital mode."]
476pub struct DIGIMODE_R(crate::FieldReader<bool, DIGIMODE_A>);
477impl DIGIMODE_R {
478    #[inline(always)]
479    pub(crate) fn new(bits: bool) -> Self {
480        DIGIMODE_R(crate::FieldReader::new(bits))
481    }
482    #[doc = r"Get enumerated values variant"]
483    #[inline(always)]
484    pub fn variant(&self) -> DIGIMODE_A {
485        match self.bits {
486            false => DIGIMODE_A::ANALOG,
487            true => DIGIMODE_A::DIGITAL,
488        }
489    }
490    #[doc = "Checks if the value of the field is `ANALOG`"]
491    #[inline(always)]
492    pub fn is_analog(&self) -> bool {
493        **self == DIGIMODE_A::ANALOG
494    }
495    #[doc = "Checks if the value of the field is `DIGITAL`"]
496    #[inline(always)]
497    pub fn is_digital(&self) -> bool {
498        **self == DIGIMODE_A::DIGITAL
499    }
500}
501impl core::ops::Deref for DIGIMODE_R {
502    type Target = crate::FieldReader<bool, DIGIMODE_A>;
503    #[inline(always)]
504    fn deref(&self) -> &Self::Target {
505        &self.0
506    }
507}
508#[doc = "Field `DIGIMODE` writer - Select Digital mode."]
509pub struct DIGIMODE_W<'a> {
510    w: &'a mut W,
511}
512impl<'a> DIGIMODE_W<'a> {
513    #[doc = r"Writes `variant` to the field"]
514    #[inline(always)]
515    pub fn variant(self, variant: DIGIMODE_A) -> &'a mut W {
516        self.bit(variant.into())
517    }
518    #[doc = "Disable digital mode. Digital input set to 0."]
519    #[inline(always)]
520    pub fn analog(self) -> &'a mut W {
521        self.variant(DIGIMODE_A::ANALOG)
522    }
523    #[doc = "Enable Digital mode. Digital input is enabled."]
524    #[inline(always)]
525    pub fn digital(self) -> &'a mut W {
526        self.variant(DIGIMODE_A::DIGITAL)
527    }
528    #[doc = r"Sets the field bit"]
529    #[inline(always)]
530    pub fn set_bit(self) -> &'a mut W {
531        self.bit(true)
532    }
533    #[doc = r"Clears the field bit"]
534    #[inline(always)]
535    pub fn clear_bit(self) -> &'a mut W {
536        self.bit(false)
537    }
538    #[doc = r"Writes raw bits to the field"]
539    #[inline(always)]
540    pub fn bit(self, value: bool) -> &'a mut W {
541        self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8);
542        self.w
543    }
544}
545#[doc = "Controls open-drain mode.\n\nValue on reset: 0"]
546#[derive(Clone, Copy, Debug, PartialEq)]
547pub enum OD_A {
548    #[doc = "0: Normal. Normal push-pull output"]
549    NORMAL = 0,
550    #[doc = "1: Open-drain. Simulated open-drain output (high drive disabled)."]
551    OPEN_DRAIN = 1,
552}
553impl From<OD_A> for bool {
554    #[inline(always)]
555    fn from(variant: OD_A) -> Self {
556        variant as u8 != 0
557    }
558}
559#[doc = "Field `OD` reader - Controls open-drain mode."]
560pub struct OD_R(crate::FieldReader<bool, OD_A>);
561impl OD_R {
562    #[inline(always)]
563    pub(crate) fn new(bits: bool) -> Self {
564        OD_R(crate::FieldReader::new(bits))
565    }
566    #[doc = r"Get enumerated values variant"]
567    #[inline(always)]
568    pub fn variant(&self) -> OD_A {
569        match self.bits {
570            false => OD_A::NORMAL,
571            true => OD_A::OPEN_DRAIN,
572        }
573    }
574    #[doc = "Checks if the value of the field is `NORMAL`"]
575    #[inline(always)]
576    pub fn is_normal(&self) -> bool {
577        **self == OD_A::NORMAL
578    }
579    #[doc = "Checks if the value of the field is `OPEN_DRAIN`"]
580    #[inline(always)]
581    pub fn is_open_drain(&self) -> bool {
582        **self == OD_A::OPEN_DRAIN
583    }
584}
585impl core::ops::Deref for OD_R {
586    type Target = crate::FieldReader<bool, OD_A>;
587    #[inline(always)]
588    fn deref(&self) -> &Self::Target {
589        &self.0
590    }
591}
592#[doc = "Field `OD` writer - Controls open-drain mode."]
593pub struct OD_W<'a> {
594    w: &'a mut W,
595}
596impl<'a> OD_W<'a> {
597    #[doc = r"Writes `variant` to the field"]
598    #[inline(always)]
599    pub fn variant(self, variant: OD_A) -> &'a mut W {
600        self.bit(variant.into())
601    }
602    #[doc = "Normal. Normal push-pull output"]
603    #[inline(always)]
604    pub fn normal(self) -> &'a mut W {
605        self.variant(OD_A::NORMAL)
606    }
607    #[doc = "Open-drain. Simulated open-drain output (high drive disabled)."]
608    #[inline(always)]
609    pub fn open_drain(self) -> &'a mut W {
610        self.variant(OD_A::OPEN_DRAIN)
611    }
612    #[doc = r"Sets the field bit"]
613    #[inline(always)]
614    pub fn set_bit(self) -> &'a mut W {
615        self.bit(true)
616    }
617    #[doc = r"Clears the field bit"]
618    #[inline(always)]
619    pub fn clear_bit(self) -> &'a mut W {
620        self.bit(false)
621    }
622    #[doc = r"Writes raw bits to the field"]
623    #[inline(always)]
624    pub fn bit(self, value: bool) -> &'a mut W {
625        self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9);
626        self.w
627    }
628}
629impl R {
630    #[doc = "Bits 0:3 - Selects pin function."]
631    #[inline(always)]
632    pub fn func(&self) -> FUNC_R {
633        FUNC_R::new((self.bits & 0x0f) as u8)
634    }
635    #[doc = "Bits 4:5 - Selects function mode (on-chip pull-up/pull-down resistor control)."]
636    #[inline(always)]
637    pub fn mode(&self) -> MODE_R {
638        MODE_R::new(((self.bits >> 4) & 0x03) as u8)
639    }
640    #[doc = "Bit 6 - Driver slew rate."]
641    #[inline(always)]
642    pub fn slew(&self) -> SLEW_R {
643        SLEW_R::new(((self.bits >> 6) & 0x01) != 0)
644    }
645    #[doc = "Bit 7 - Input polarity."]
646    #[inline(always)]
647    pub fn invert(&self) -> INVERT_R {
648        INVERT_R::new(((self.bits >> 7) & 0x01) != 0)
649    }
650    #[doc = "Bit 8 - Select Digital mode."]
651    #[inline(always)]
652    pub fn digimode(&self) -> DIGIMODE_R {
653        DIGIMODE_R::new(((self.bits >> 8) & 0x01) != 0)
654    }
655    #[doc = "Bit 9 - Controls open-drain mode."]
656    #[inline(always)]
657    pub fn od(&self) -> OD_R {
658        OD_R::new(((self.bits >> 9) & 0x01) != 0)
659    }
660}
661impl W {
662    #[doc = "Bits 0:3 - Selects pin function."]
663    #[inline(always)]
664    pub fn func(&mut self) -> FUNC_W {
665        FUNC_W { w: self }
666    }
667    #[doc = "Bits 4:5 - Selects function mode (on-chip pull-up/pull-down resistor control)."]
668    #[inline(always)]
669    pub fn mode(&mut self) -> MODE_W {
670        MODE_W { w: self }
671    }
672    #[doc = "Bit 6 - Driver slew rate."]
673    #[inline(always)]
674    pub fn slew(&mut self) -> SLEW_W {
675        SLEW_W { w: self }
676    }
677    #[doc = "Bit 7 - Input polarity."]
678    #[inline(always)]
679    pub fn invert(&mut self) -> INVERT_W {
680        INVERT_W { w: self }
681    }
682    #[doc = "Bit 8 - Select Digital mode."]
683    #[inline(always)]
684    pub fn digimode(&mut self) -> DIGIMODE_W {
685        DIGIMODE_W { w: self }
686    }
687    #[doc = "Bit 9 - Controls open-drain mode."]
688    #[inline(always)]
689    pub fn od(&mut self) -> OD_W {
690        OD_W { w: self }
691    }
692    #[doc = "Writes raw bits to the register."]
693    #[inline(always)]
694    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
695        self.0.bits(bits);
696        self
697    }
698}
699#[doc = "Digital I/O control for port 1 pins PIO1_29\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 [pio1_29](index.html) module"]
700pub struct PIO1_29_SPEC;
701impl crate::RegisterSpec for PIO1_29_SPEC {
702    type Ux = u32;
703}
704#[doc = "`read()` method returns [pio1_29::R](R) reader structure"]
705impl crate::Readable for PIO1_29_SPEC {
706    type Reader = R;
707}
708#[doc = "`write(|w| ..)` method takes [pio1_29::W](W) writer structure"]
709impl crate::Writable for PIO1_29_SPEC {
710    type Writer = W;
711}
712#[doc = "`reset()` method sets PIO1_29 to value 0"]
713impl crate::Resettable for PIO1_29_SPEC {
714    #[inline(always)]
715    fn reset_value() -> Self::Ux {
716        0
717    }
718}