stm32l476/pwr/
pucrf.rs

1#[doc = "Register `PUCRF` reader"]
2pub type R = crate::R<PucrfSpec>;
3#[doc = "Register `PUCRF` writer"]
4pub type W = crate::W<PucrfSpec>;
5#[doc = "Field `PU0` reader - Port F pull-up bit y (y=0..15)"]
6pub type Pu0R = crate::BitReader;
7#[doc = "Field `PU0` writer - Port F pull-up bit y (y=0..15)"]
8pub type Pu0W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `PU1` reader - Port F pull-up bit y (y=0..15)"]
10pub type Pu1R = crate::BitReader;
11#[doc = "Field `PU1` writer - Port F pull-up bit y (y=0..15)"]
12pub type Pu1W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `PU2` reader - Port F pull-up bit y (y=0..15)"]
14pub type Pu2R = crate::BitReader;
15#[doc = "Field `PU2` writer - Port F pull-up bit y (y=0..15)"]
16pub type Pu2W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `PU3` reader - Port F pull-up bit y (y=0..15)"]
18pub type Pu3R = crate::BitReader;
19#[doc = "Field `PU3` writer - Port F pull-up bit y (y=0..15)"]
20pub type Pu3W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `PU4` reader - Port F pull-up bit y (y=0..15)"]
22pub type Pu4R = crate::BitReader;
23#[doc = "Field `PU4` writer - Port F pull-up bit y (y=0..15)"]
24pub type Pu4W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `PU5` reader - Port F pull-up bit y (y=0..15)"]
26pub type Pu5R = crate::BitReader;
27#[doc = "Field `PU5` writer - Port F pull-up bit y (y=0..15)"]
28pub type Pu5W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `PU6` reader - Port F pull-up bit y (y=0..15)"]
30pub type Pu6R = crate::BitReader;
31#[doc = "Field `PU6` writer - Port F pull-up bit y (y=0..15)"]
32pub type Pu6W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `PU7` reader - Port F pull-up bit y (y=0..15)"]
34pub type Pu7R = crate::BitReader;
35#[doc = "Field `PU7` writer - Port F pull-up bit y (y=0..15)"]
36pub type Pu7W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `PU8` reader - Port F pull-up bit y (y=0..15)"]
38pub type Pu8R = crate::BitReader;
39#[doc = "Field `PU8` writer - Port F pull-up bit y (y=0..15)"]
40pub type Pu8W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `PU9` reader - Port F pull-up bit y (y=0..15)"]
42pub type Pu9R = crate::BitReader;
43#[doc = "Field `PU9` writer - Port F pull-up bit y (y=0..15)"]
44pub type Pu9W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `PU10` reader - Port F pull-up bit y (y=0..15)"]
46pub type Pu10R = crate::BitReader;
47#[doc = "Field `PU10` writer - Port F pull-up bit y (y=0..15)"]
48pub type Pu10W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `PU11` reader - Port F pull-up bit y (y=0..15)"]
50pub type Pu11R = crate::BitReader;
51#[doc = "Field `PU11` writer - Port F pull-up bit y (y=0..15)"]
52pub type Pu11W<'a, REG> = crate::BitWriter<'a, REG>;
53#[doc = "Field `PU12` reader - Port F pull-up bit y (y=0..15)"]
54pub type Pu12R = crate::BitReader;
55#[doc = "Field `PU12` writer - Port F pull-up bit y (y=0..15)"]
56pub type Pu12W<'a, REG> = crate::BitWriter<'a, REG>;
57#[doc = "Field `PU13` reader - Port F pull-up bit y (y=0..15)"]
58pub type Pu13R = crate::BitReader;
59#[doc = "Field `PU13` writer - Port F pull-up bit y (y=0..15)"]
60pub type Pu13W<'a, REG> = crate::BitWriter<'a, REG>;
61#[doc = "Field `PU14` reader - Port F pull-up bit y (y=0..15)"]
62pub type Pu14R = crate::BitReader;
63#[doc = "Field `PU14` writer - Port F pull-up bit y (y=0..15)"]
64pub type Pu14W<'a, REG> = crate::BitWriter<'a, REG>;
65#[doc = "Field `PU15` reader - Port F pull-up bit y (y=0..15)"]
66pub type Pu15R = crate::BitReader;
67#[doc = "Field `PU15` writer - Port F pull-up bit y (y=0..15)"]
68pub type Pu15W<'a, REG> = crate::BitWriter<'a, REG>;
69impl R {
70    #[doc = "Bit 0 - Port F pull-up bit y (y=0..15)"]
71    #[inline(always)]
72    pub fn pu0(&self) -> Pu0R {
73        Pu0R::new((self.bits & 1) != 0)
74    }
75    #[doc = "Bit 1 - Port F pull-up bit y (y=0..15)"]
76    #[inline(always)]
77    pub fn pu1(&self) -> Pu1R {
78        Pu1R::new(((self.bits >> 1) & 1) != 0)
79    }
80    #[doc = "Bit 2 - Port F pull-up bit y (y=0..15)"]
81    #[inline(always)]
82    pub fn pu2(&self) -> Pu2R {
83        Pu2R::new(((self.bits >> 2) & 1) != 0)
84    }
85    #[doc = "Bit 3 - Port F pull-up bit y (y=0..15)"]
86    #[inline(always)]
87    pub fn pu3(&self) -> Pu3R {
88        Pu3R::new(((self.bits >> 3) & 1) != 0)
89    }
90    #[doc = "Bit 4 - Port F pull-up bit y (y=0..15)"]
91    #[inline(always)]
92    pub fn pu4(&self) -> Pu4R {
93        Pu4R::new(((self.bits >> 4) & 1) != 0)
94    }
95    #[doc = "Bit 5 - Port F pull-up bit y (y=0..15)"]
96    #[inline(always)]
97    pub fn pu5(&self) -> Pu5R {
98        Pu5R::new(((self.bits >> 5) & 1) != 0)
99    }
100    #[doc = "Bit 6 - Port F pull-up bit y (y=0..15)"]
101    #[inline(always)]
102    pub fn pu6(&self) -> Pu6R {
103        Pu6R::new(((self.bits >> 6) & 1) != 0)
104    }
105    #[doc = "Bit 7 - Port F pull-up bit y (y=0..15)"]
106    #[inline(always)]
107    pub fn pu7(&self) -> Pu7R {
108        Pu7R::new(((self.bits >> 7) & 1) != 0)
109    }
110    #[doc = "Bit 8 - Port F pull-up bit y (y=0..15)"]
111    #[inline(always)]
112    pub fn pu8(&self) -> Pu8R {
113        Pu8R::new(((self.bits >> 8) & 1) != 0)
114    }
115    #[doc = "Bit 9 - Port F pull-up bit y (y=0..15)"]
116    #[inline(always)]
117    pub fn pu9(&self) -> Pu9R {
118        Pu9R::new(((self.bits >> 9) & 1) != 0)
119    }
120    #[doc = "Bit 10 - Port F pull-up bit y (y=0..15)"]
121    #[inline(always)]
122    pub fn pu10(&self) -> Pu10R {
123        Pu10R::new(((self.bits >> 10) & 1) != 0)
124    }
125    #[doc = "Bit 11 - Port F pull-up bit y (y=0..15)"]
126    #[inline(always)]
127    pub fn pu11(&self) -> Pu11R {
128        Pu11R::new(((self.bits >> 11) & 1) != 0)
129    }
130    #[doc = "Bit 12 - Port F pull-up bit y (y=0..15)"]
131    #[inline(always)]
132    pub fn pu12(&self) -> Pu12R {
133        Pu12R::new(((self.bits >> 12) & 1) != 0)
134    }
135    #[doc = "Bit 13 - Port F pull-up bit y (y=0..15)"]
136    #[inline(always)]
137    pub fn pu13(&self) -> Pu13R {
138        Pu13R::new(((self.bits >> 13) & 1) != 0)
139    }
140    #[doc = "Bit 14 - Port F pull-up bit y (y=0..15)"]
141    #[inline(always)]
142    pub fn pu14(&self) -> Pu14R {
143        Pu14R::new(((self.bits >> 14) & 1) != 0)
144    }
145    #[doc = "Bit 15 - Port F pull-up bit y (y=0..15)"]
146    #[inline(always)]
147    pub fn pu15(&self) -> Pu15R {
148        Pu15R::new(((self.bits >> 15) & 1) != 0)
149    }
150}
151impl W {
152    #[doc = "Bit 0 - Port F pull-up bit y (y=0..15)"]
153    #[inline(always)]
154    pub fn pu0(&mut self) -> Pu0W<PucrfSpec> {
155        Pu0W::new(self, 0)
156    }
157    #[doc = "Bit 1 - Port F pull-up bit y (y=0..15)"]
158    #[inline(always)]
159    pub fn pu1(&mut self) -> Pu1W<PucrfSpec> {
160        Pu1W::new(self, 1)
161    }
162    #[doc = "Bit 2 - Port F pull-up bit y (y=0..15)"]
163    #[inline(always)]
164    pub fn pu2(&mut self) -> Pu2W<PucrfSpec> {
165        Pu2W::new(self, 2)
166    }
167    #[doc = "Bit 3 - Port F pull-up bit y (y=0..15)"]
168    #[inline(always)]
169    pub fn pu3(&mut self) -> Pu3W<PucrfSpec> {
170        Pu3W::new(self, 3)
171    }
172    #[doc = "Bit 4 - Port F pull-up bit y (y=0..15)"]
173    #[inline(always)]
174    pub fn pu4(&mut self) -> Pu4W<PucrfSpec> {
175        Pu4W::new(self, 4)
176    }
177    #[doc = "Bit 5 - Port F pull-up bit y (y=0..15)"]
178    #[inline(always)]
179    pub fn pu5(&mut self) -> Pu5W<PucrfSpec> {
180        Pu5W::new(self, 5)
181    }
182    #[doc = "Bit 6 - Port F pull-up bit y (y=0..15)"]
183    #[inline(always)]
184    pub fn pu6(&mut self) -> Pu6W<PucrfSpec> {
185        Pu6W::new(self, 6)
186    }
187    #[doc = "Bit 7 - Port F pull-up bit y (y=0..15)"]
188    #[inline(always)]
189    pub fn pu7(&mut self) -> Pu7W<PucrfSpec> {
190        Pu7W::new(self, 7)
191    }
192    #[doc = "Bit 8 - Port F pull-up bit y (y=0..15)"]
193    #[inline(always)]
194    pub fn pu8(&mut self) -> Pu8W<PucrfSpec> {
195        Pu8W::new(self, 8)
196    }
197    #[doc = "Bit 9 - Port F pull-up bit y (y=0..15)"]
198    #[inline(always)]
199    pub fn pu9(&mut self) -> Pu9W<PucrfSpec> {
200        Pu9W::new(self, 9)
201    }
202    #[doc = "Bit 10 - Port F pull-up bit y (y=0..15)"]
203    #[inline(always)]
204    pub fn pu10(&mut self) -> Pu10W<PucrfSpec> {
205        Pu10W::new(self, 10)
206    }
207    #[doc = "Bit 11 - Port F pull-up bit y (y=0..15)"]
208    #[inline(always)]
209    pub fn pu11(&mut self) -> Pu11W<PucrfSpec> {
210        Pu11W::new(self, 11)
211    }
212    #[doc = "Bit 12 - Port F pull-up bit y (y=0..15)"]
213    #[inline(always)]
214    pub fn pu12(&mut self) -> Pu12W<PucrfSpec> {
215        Pu12W::new(self, 12)
216    }
217    #[doc = "Bit 13 - Port F pull-up bit y (y=0..15)"]
218    #[inline(always)]
219    pub fn pu13(&mut self) -> Pu13W<PucrfSpec> {
220        Pu13W::new(self, 13)
221    }
222    #[doc = "Bit 14 - Port F pull-up bit y (y=0..15)"]
223    #[inline(always)]
224    pub fn pu14(&mut self) -> Pu14W<PucrfSpec> {
225        Pu14W::new(self, 14)
226    }
227    #[doc = "Bit 15 - Port F pull-up bit y (y=0..15)"]
228    #[inline(always)]
229    pub fn pu15(&mut self) -> Pu15W<PucrfSpec> {
230        Pu15W::new(self, 15)
231    }
232}
233#[doc = "Power Port F pull-up control register\n\nYou can [`read`](crate::Reg::read) this register and get [`pucrf::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pucrf::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
234pub struct PucrfSpec;
235impl crate::RegisterSpec for PucrfSpec {
236    type Ux = u32;
237}
238#[doc = "`read()` method returns [`pucrf::R`](R) reader structure"]
239impl crate::Readable for PucrfSpec {}
240#[doc = "`write(|w| ..)` method takes [`pucrf::W`](W) writer structure"]
241impl crate::Writable for PucrfSpec {
242    type Safety = crate::Unsafe;
243}
244#[doc = "`reset()` method sets PUCRF to value 0"]
245impl crate::Resettable for PucrfSpec {}