atsamd11d/port/
wrconfig.rs

1#[doc = "Register `WRCONFIG%s` writer"]
2pub type W = crate::W<WrconfigSpec>;
3#[doc = "Field `PINMASK` writer - Pin Mask for Multiple Pin Configuration"]
4pub type PinmaskW<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
5#[doc = "Field `PMUXEN` writer - Peripheral Multiplexer Enable"]
6pub type PmuxenW<'a, REG> = crate::BitWriter<'a, REG>;
7#[doc = "Field `INEN` writer - Input Enable"]
8pub type InenW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `PULLEN` writer - Pull Enable"]
10pub type PullenW<'a, REG> = crate::BitWriter<'a, REG>;
11#[doc = "Field `DRVSTR` writer - Output Driver Strength Selection"]
12pub type DrvstrW<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `PMUX` writer - Peripheral Multiplexing"]
14pub type PmuxW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
15#[doc = "Field `WRPMUX` writer - Write PMUX"]
16pub type WrpmuxW<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `WRPINCFG` writer - Write PINCFG"]
18pub type WrpincfgW<'a, REG> = crate::BitWriter<'a, REG>;
19#[doc = "Field `HWSEL` writer - Half-Word Select"]
20pub type HwselW<'a, REG> = crate::BitWriter<'a, REG>;
21impl W {
22    #[doc = "Bits 0:15 - Pin Mask for Multiple Pin Configuration"]
23    #[inline(always)]
24    #[must_use]
25    pub fn pinmask(&mut self) -> PinmaskW<WrconfigSpec> {
26        PinmaskW::new(self, 0)
27    }
28    #[doc = "Bit 16 - Peripheral Multiplexer Enable"]
29    #[inline(always)]
30    #[must_use]
31    pub fn pmuxen(&mut self) -> PmuxenW<WrconfigSpec> {
32        PmuxenW::new(self, 16)
33    }
34    #[doc = "Bit 17 - Input Enable"]
35    #[inline(always)]
36    #[must_use]
37    pub fn inen(&mut self) -> InenW<WrconfigSpec> {
38        InenW::new(self, 17)
39    }
40    #[doc = "Bit 18 - Pull Enable"]
41    #[inline(always)]
42    #[must_use]
43    pub fn pullen(&mut self) -> PullenW<WrconfigSpec> {
44        PullenW::new(self, 18)
45    }
46    #[doc = "Bit 22 - Output Driver Strength Selection"]
47    #[inline(always)]
48    #[must_use]
49    pub fn drvstr(&mut self) -> DrvstrW<WrconfigSpec> {
50        DrvstrW::new(self, 22)
51    }
52    #[doc = "Bits 24:27 - Peripheral Multiplexing"]
53    #[inline(always)]
54    #[must_use]
55    pub fn pmux(&mut self) -> PmuxW<WrconfigSpec> {
56        PmuxW::new(self, 24)
57    }
58    #[doc = "Bit 28 - Write PMUX"]
59    #[inline(always)]
60    #[must_use]
61    pub fn wrpmux(&mut self) -> WrpmuxW<WrconfigSpec> {
62        WrpmuxW::new(self, 28)
63    }
64    #[doc = "Bit 30 - Write PINCFG"]
65    #[inline(always)]
66    #[must_use]
67    pub fn wrpincfg(&mut self) -> WrpincfgW<WrconfigSpec> {
68        WrpincfgW::new(self, 30)
69    }
70    #[doc = "Bit 31 - Half-Word Select"]
71    #[inline(always)]
72    #[must_use]
73    pub fn hwsel(&mut self) -> HwselW<WrconfigSpec> {
74        HwselW::new(self, 31)
75    }
76}
77#[doc = "Write Configuration\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`wrconfig::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
78pub struct WrconfigSpec;
79impl crate::RegisterSpec for WrconfigSpec {
80    type Ux = u32;
81}
82#[doc = "`write(|w| ..)` method takes [`wrconfig::W`](W) writer structure"]
83impl crate::Writable for WrconfigSpec {
84    type Safety = crate::Unsafe;
85    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
86    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
87}
88#[doc = "`reset()` method sets WRCONFIG%s to value 0"]
89impl crate::Resettable for WrconfigSpec {
90    const RESET_VALUE: u32 = 0;
91}