stm32l476/pwr/
pdcre.rs

1#[doc = "Register `PDCRE` reader"]
2pub type R = crate::R<PdcreSpec>;
3#[doc = "Register `PDCRE` writer"]
4pub type W = crate::W<PdcreSpec>;
5#[doc = "Field `PD0` reader - Port E pull-down bit y (y=0..15)"]
6pub type Pd0R = crate::BitReader;
7#[doc = "Field `PD0` writer - Port E pull-down bit y (y=0..15)"]
8pub type Pd0W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `PD1` reader - Port E pull-down bit y (y=0..15)"]
10pub type Pd1R = crate::BitReader;
11#[doc = "Field `PD1` writer - Port E pull-down bit y (y=0..15)"]
12pub type Pd1W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `PD2` reader - Port E pull-down bit y (y=0..15)"]
14pub type Pd2R = crate::BitReader;
15#[doc = "Field `PD2` writer - Port E pull-down bit y (y=0..15)"]
16pub type Pd2W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `PD3` reader - Port E pull-down bit y (y=0..15)"]
18pub type Pd3R = crate::BitReader;
19#[doc = "Field `PD3` writer - Port E pull-down bit y (y=0..15)"]
20pub type Pd3W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `PD4` reader - Port E pull-down bit y (y=0..15)"]
22pub type Pd4R = crate::BitReader;
23#[doc = "Field `PD4` writer - Port E pull-down bit y (y=0..15)"]
24pub type Pd4W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `PD5` reader - Port E pull-down bit y (y=0..15)"]
26pub type Pd5R = crate::BitReader;
27#[doc = "Field `PD5` writer - Port E pull-down bit y (y=0..15)"]
28pub type Pd5W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `PD6` reader - Port E pull-down bit y (y=0..15)"]
30pub type Pd6R = crate::BitReader;
31#[doc = "Field `PD6` writer - Port E pull-down bit y (y=0..15)"]
32pub type Pd6W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `PD7` reader - Port E pull-down bit y (y=0..15)"]
34pub type Pd7R = crate::BitReader;
35#[doc = "Field `PD7` writer - Port E pull-down bit y (y=0..15)"]
36pub type Pd7W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `PD8` reader - Port E pull-down bit y (y=0..15)"]
38pub type Pd8R = crate::BitReader;
39#[doc = "Field `PD8` writer - Port E pull-down bit y (y=0..15)"]
40pub type Pd8W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `PD9` reader - Port E pull-down bit y (y=0..15)"]
42pub type Pd9R = crate::BitReader;
43#[doc = "Field `PD9` writer - Port E pull-down bit y (y=0..15)"]
44pub type Pd9W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `PD10` reader - Port E pull-down bit y (y=0..15)"]
46pub type Pd10R = crate::BitReader;
47#[doc = "Field `PD10` writer - Port E pull-down bit y (y=0..15)"]
48pub type Pd10W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `PD11` reader - Port E pull-down bit y (y=0..15)"]
50pub type Pd11R = crate::BitReader;
51#[doc = "Field `PD11` writer - Port E pull-down bit y (y=0..15)"]
52pub type Pd11W<'a, REG> = crate::BitWriter<'a, REG>;
53#[doc = "Field `PD12` reader - Port E pull-down bit y (y=0..15)"]
54pub type Pd12R = crate::BitReader;
55#[doc = "Field `PD12` writer - Port E pull-down bit y (y=0..15)"]
56pub type Pd12W<'a, REG> = crate::BitWriter<'a, REG>;
57#[doc = "Field `PD13` reader - Port E pull-down bit y (y=0..15)"]
58pub type Pd13R = crate::BitReader;
59#[doc = "Field `PD13` writer - Port E pull-down bit y (y=0..15)"]
60pub type Pd13W<'a, REG> = crate::BitWriter<'a, REG>;
61#[doc = "Field `PD14` reader - Port E pull-down bit y (y=0..15)"]
62pub type Pd14R = crate::BitReader;
63#[doc = "Field `PD14` writer - Port E pull-down bit y (y=0..15)"]
64pub type Pd14W<'a, REG> = crate::BitWriter<'a, REG>;
65#[doc = "Field `PD15` reader - Port E pull-down bit y (y=0..15)"]
66pub type Pd15R = crate::BitReader;
67#[doc = "Field `PD15` writer - Port E pull-down bit y (y=0..15)"]
68pub type Pd15W<'a, REG> = crate::BitWriter<'a, REG>;
69impl R {
70    #[doc = "Bit 0 - Port E pull-down bit y (y=0..15)"]
71    #[inline(always)]
72    pub fn pd0(&self) -> Pd0R {
73        Pd0R::new((self.bits & 1) != 0)
74    }
75    #[doc = "Bit 1 - Port E pull-down bit y (y=0..15)"]
76    #[inline(always)]
77    pub fn pd1(&self) -> Pd1R {
78        Pd1R::new(((self.bits >> 1) & 1) != 0)
79    }
80    #[doc = "Bit 2 - Port E pull-down bit y (y=0..15)"]
81    #[inline(always)]
82    pub fn pd2(&self) -> Pd2R {
83        Pd2R::new(((self.bits >> 2) & 1) != 0)
84    }
85    #[doc = "Bit 3 - Port E pull-down bit y (y=0..15)"]
86    #[inline(always)]
87    pub fn pd3(&self) -> Pd3R {
88        Pd3R::new(((self.bits >> 3) & 1) != 0)
89    }
90    #[doc = "Bit 4 - Port E pull-down bit y (y=0..15)"]
91    #[inline(always)]
92    pub fn pd4(&self) -> Pd4R {
93        Pd4R::new(((self.bits >> 4) & 1) != 0)
94    }
95    #[doc = "Bit 5 - Port E pull-down bit y (y=0..15)"]
96    #[inline(always)]
97    pub fn pd5(&self) -> Pd5R {
98        Pd5R::new(((self.bits >> 5) & 1) != 0)
99    }
100    #[doc = "Bit 6 - Port E pull-down bit y (y=0..15)"]
101    #[inline(always)]
102    pub fn pd6(&self) -> Pd6R {
103        Pd6R::new(((self.bits >> 6) & 1) != 0)
104    }
105    #[doc = "Bit 7 - Port E pull-down bit y (y=0..15)"]
106    #[inline(always)]
107    pub fn pd7(&self) -> Pd7R {
108        Pd7R::new(((self.bits >> 7) & 1) != 0)
109    }
110    #[doc = "Bit 8 - Port E pull-down bit y (y=0..15)"]
111    #[inline(always)]
112    pub fn pd8(&self) -> Pd8R {
113        Pd8R::new(((self.bits >> 8) & 1) != 0)
114    }
115    #[doc = "Bit 9 - Port E pull-down bit y (y=0..15)"]
116    #[inline(always)]
117    pub fn pd9(&self) -> Pd9R {
118        Pd9R::new(((self.bits >> 9) & 1) != 0)
119    }
120    #[doc = "Bit 10 - Port E pull-down bit y (y=0..15)"]
121    #[inline(always)]
122    pub fn pd10(&self) -> Pd10R {
123        Pd10R::new(((self.bits >> 10) & 1) != 0)
124    }
125    #[doc = "Bit 11 - Port E pull-down bit y (y=0..15)"]
126    #[inline(always)]
127    pub fn pd11(&self) -> Pd11R {
128        Pd11R::new(((self.bits >> 11) & 1) != 0)
129    }
130    #[doc = "Bit 12 - Port E pull-down bit y (y=0..15)"]
131    #[inline(always)]
132    pub fn pd12(&self) -> Pd12R {
133        Pd12R::new(((self.bits >> 12) & 1) != 0)
134    }
135    #[doc = "Bit 13 - Port E pull-down bit y (y=0..15)"]
136    #[inline(always)]
137    pub fn pd13(&self) -> Pd13R {
138        Pd13R::new(((self.bits >> 13) & 1) != 0)
139    }
140    #[doc = "Bit 14 - Port E pull-down bit y (y=0..15)"]
141    #[inline(always)]
142    pub fn pd14(&self) -> Pd14R {
143        Pd14R::new(((self.bits >> 14) & 1) != 0)
144    }
145    #[doc = "Bit 15 - Port E pull-down bit y (y=0..15)"]
146    #[inline(always)]
147    pub fn pd15(&self) -> Pd15R {
148        Pd15R::new(((self.bits >> 15) & 1) != 0)
149    }
150}
151impl W {
152    #[doc = "Bit 0 - Port E pull-down bit y (y=0..15)"]
153    #[inline(always)]
154    pub fn pd0(&mut self) -> Pd0W<PdcreSpec> {
155        Pd0W::new(self, 0)
156    }
157    #[doc = "Bit 1 - Port E pull-down bit y (y=0..15)"]
158    #[inline(always)]
159    pub fn pd1(&mut self) -> Pd1W<PdcreSpec> {
160        Pd1W::new(self, 1)
161    }
162    #[doc = "Bit 2 - Port E pull-down bit y (y=0..15)"]
163    #[inline(always)]
164    pub fn pd2(&mut self) -> Pd2W<PdcreSpec> {
165        Pd2W::new(self, 2)
166    }
167    #[doc = "Bit 3 - Port E pull-down bit y (y=0..15)"]
168    #[inline(always)]
169    pub fn pd3(&mut self) -> Pd3W<PdcreSpec> {
170        Pd3W::new(self, 3)
171    }
172    #[doc = "Bit 4 - Port E pull-down bit y (y=0..15)"]
173    #[inline(always)]
174    pub fn pd4(&mut self) -> Pd4W<PdcreSpec> {
175        Pd4W::new(self, 4)
176    }
177    #[doc = "Bit 5 - Port E pull-down bit y (y=0..15)"]
178    #[inline(always)]
179    pub fn pd5(&mut self) -> Pd5W<PdcreSpec> {
180        Pd5W::new(self, 5)
181    }
182    #[doc = "Bit 6 - Port E pull-down bit y (y=0..15)"]
183    #[inline(always)]
184    pub fn pd6(&mut self) -> Pd6W<PdcreSpec> {
185        Pd6W::new(self, 6)
186    }
187    #[doc = "Bit 7 - Port E pull-down bit y (y=0..15)"]
188    #[inline(always)]
189    pub fn pd7(&mut self) -> Pd7W<PdcreSpec> {
190        Pd7W::new(self, 7)
191    }
192    #[doc = "Bit 8 - Port E pull-down bit y (y=0..15)"]
193    #[inline(always)]
194    pub fn pd8(&mut self) -> Pd8W<PdcreSpec> {
195        Pd8W::new(self, 8)
196    }
197    #[doc = "Bit 9 - Port E pull-down bit y (y=0..15)"]
198    #[inline(always)]
199    pub fn pd9(&mut self) -> Pd9W<PdcreSpec> {
200        Pd9W::new(self, 9)
201    }
202    #[doc = "Bit 10 - Port E pull-down bit y (y=0..15)"]
203    #[inline(always)]
204    pub fn pd10(&mut self) -> Pd10W<PdcreSpec> {
205        Pd10W::new(self, 10)
206    }
207    #[doc = "Bit 11 - Port E pull-down bit y (y=0..15)"]
208    #[inline(always)]
209    pub fn pd11(&mut self) -> Pd11W<PdcreSpec> {
210        Pd11W::new(self, 11)
211    }
212    #[doc = "Bit 12 - Port E pull-down bit y (y=0..15)"]
213    #[inline(always)]
214    pub fn pd12(&mut self) -> Pd12W<PdcreSpec> {
215        Pd12W::new(self, 12)
216    }
217    #[doc = "Bit 13 - Port E pull-down bit y (y=0..15)"]
218    #[inline(always)]
219    pub fn pd13(&mut self) -> Pd13W<PdcreSpec> {
220        Pd13W::new(self, 13)
221    }
222    #[doc = "Bit 14 - Port E pull-down bit y (y=0..15)"]
223    #[inline(always)]
224    pub fn pd14(&mut self) -> Pd14W<PdcreSpec> {
225        Pd14W::new(self, 14)
226    }
227    #[doc = "Bit 15 - Port E pull-down bit y (y=0..15)"]
228    #[inline(always)]
229    pub fn pd15(&mut self) -> Pd15W<PdcreSpec> {
230        Pd15W::new(self, 15)
231    }
232}
233#[doc = "Power Port E pull-down control register\n\nYou can [`read`](crate::Reg::read) this register and get [`pdcre::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pdcre::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
234pub struct PdcreSpec;
235impl crate::RegisterSpec for PdcreSpec {
236    type Ux = u32;
237}
238#[doc = "`read()` method returns [`pdcre::R`](R) reader structure"]
239impl crate::Readable for PdcreSpec {}
240#[doc = "`write(|w| ..)` method takes [`pdcre::W`](W) writer structure"]
241impl crate::Writable for PdcreSpec {
242    type Safety = crate::Unsafe;
243}
244#[doc = "`reset()` method sets PDCRE to value 0"]
245impl crate::Resettable for PdcreSpec {}