1#[doc = r" Value read from the register"]
2pub struct R {
3 bits: u32,
4}
5impl super::SR2 {
6 #[doc = r" Reads the contents of the register"]
7 #[inline]
8 pub fn read(&self) -> R {
9 R {
10 bits: self.register.get(),
11 }
12 }
13}
14#[doc = r" Value of the field"]
15pub struct PVMO4R {
16 bits: bool,
17}
18impl PVMO4R {
19 #[doc = r" Value of the field as raw bits"]
20 #[inline]
21 pub fn bit(&self) -> bool {
22 self.bits
23 }
24 #[doc = r" Returns `true` if the bit is clear (0)"]
25 #[inline]
26 pub fn bit_is_clear(&self) -> bool {
27 !self.bit()
28 }
29 #[doc = r" Returns `true` if the bit is set (1)"]
30 #[inline]
31 pub fn bit_is_set(&self) -> bool {
32 self.bit()
33 }
34}
35#[doc = r" Value of the field"]
36pub struct PVMO3R {
37 bits: bool,
38}
39impl PVMO3R {
40 #[doc = r" Value of the field as raw bits"]
41 #[inline]
42 pub fn bit(&self) -> bool {
43 self.bits
44 }
45 #[doc = r" Returns `true` if the bit is clear (0)"]
46 #[inline]
47 pub fn bit_is_clear(&self) -> bool {
48 !self.bit()
49 }
50 #[doc = r" Returns `true` if the bit is set (1)"]
51 #[inline]
52 pub fn bit_is_set(&self) -> bool {
53 self.bit()
54 }
55}
56#[doc = r" Value of the field"]
57pub struct PVMO2R {
58 bits: bool,
59}
60impl PVMO2R {
61 #[doc = r" Value of the field as raw bits"]
62 #[inline]
63 pub fn bit(&self) -> bool {
64 self.bits
65 }
66 #[doc = r" Returns `true` if the bit is clear (0)"]
67 #[inline]
68 pub fn bit_is_clear(&self) -> bool {
69 !self.bit()
70 }
71 #[doc = r" Returns `true` if the bit is set (1)"]
72 #[inline]
73 pub fn bit_is_set(&self) -> bool {
74 self.bit()
75 }
76}
77#[doc = r" Value of the field"]
78pub struct PVMO1R {
79 bits: bool,
80}
81impl PVMO1R {
82 #[doc = r" Value of the field as raw bits"]
83 #[inline]
84 pub fn bit(&self) -> bool {
85 self.bits
86 }
87 #[doc = r" Returns `true` if the bit is clear (0)"]
88 #[inline]
89 pub fn bit_is_clear(&self) -> bool {
90 !self.bit()
91 }
92 #[doc = r" Returns `true` if the bit is set (1)"]
93 #[inline]
94 pub fn bit_is_set(&self) -> bool {
95 self.bit()
96 }
97}
98#[doc = r" Value of the field"]
99pub struct PVDOR {
100 bits: bool,
101}
102impl PVDOR {
103 #[doc = r" Value of the field as raw bits"]
104 #[inline]
105 pub fn bit(&self) -> bool {
106 self.bits
107 }
108 #[doc = r" Returns `true` if the bit is clear (0)"]
109 #[inline]
110 pub fn bit_is_clear(&self) -> bool {
111 !self.bit()
112 }
113 #[doc = r" Returns `true` if the bit is set (1)"]
114 #[inline]
115 pub fn bit_is_set(&self) -> bool {
116 self.bit()
117 }
118}
119#[doc = r" Value of the field"]
120pub struct VOSFR {
121 bits: bool,
122}
123impl VOSFR {
124 #[doc = r" Value of the field as raw bits"]
125 #[inline]
126 pub fn bit(&self) -> bool {
127 self.bits
128 }
129 #[doc = r" Returns `true` if the bit is clear (0)"]
130 #[inline]
131 pub fn bit_is_clear(&self) -> bool {
132 !self.bit()
133 }
134 #[doc = r" Returns `true` if the bit is set (1)"]
135 #[inline]
136 pub fn bit_is_set(&self) -> bool {
137 self.bit()
138 }
139}
140#[doc = r" Value of the field"]
141pub struct REGLPFR {
142 bits: bool,
143}
144impl REGLPFR {
145 #[doc = r" Value of the field as raw bits"]
146 #[inline]
147 pub fn bit(&self) -> bool {
148 self.bits
149 }
150 #[doc = r" Returns `true` if the bit is clear (0)"]
151 #[inline]
152 pub fn bit_is_clear(&self) -> bool {
153 !self.bit()
154 }
155 #[doc = r" Returns `true` if the bit is set (1)"]
156 #[inline]
157 pub fn bit_is_set(&self) -> bool {
158 self.bit()
159 }
160}
161#[doc = r" Value of the field"]
162pub struct REGLPSR {
163 bits: bool,
164}
165impl REGLPSR {
166 #[doc = r" Value of the field as raw bits"]
167 #[inline]
168 pub fn bit(&self) -> bool {
169 self.bits
170 }
171 #[doc = r" Returns `true` if the bit is clear (0)"]
172 #[inline]
173 pub fn bit_is_clear(&self) -> bool {
174 !self.bit()
175 }
176 #[doc = r" Returns `true` if the bit is set (1)"]
177 #[inline]
178 pub fn bit_is_set(&self) -> bool {
179 self.bit()
180 }
181}
182impl R {
183 #[doc = r" Value of the register as raw bits"]
184 #[inline]
185 pub fn bits(&self) -> u32 {
186 self.bits
187 }
188 #[doc = "Bit 15 - Peripheral voltage monitoring output: VDDA vs. 2.2 V"]
189 #[inline]
190 pub fn pvmo4(&self) -> PVMO4R {
191 let bits = {
192 const MASK: bool = true;
193 const OFFSET: u8 = 15;
194 ((self.bits >> OFFSET) & MASK as u32) != 0
195 };
196 PVMO4R { bits }
197 }
198 #[doc = "Bit 14 - Peripheral voltage monitoring output: VDDA vs. 1.62 V"]
199 #[inline]
200 pub fn pvmo3(&self) -> PVMO3R {
201 let bits = {
202 const MASK: bool = true;
203 const OFFSET: u8 = 14;
204 ((self.bits >> OFFSET) & MASK as u32) != 0
205 };
206 PVMO3R { bits }
207 }
208 #[doc = "Bit 13 - Peripheral voltage monitoring output: VDDIO2 vs. 0.9 V"]
209 #[inline]
210 pub fn pvmo2(&self) -> PVMO2R {
211 let bits = {
212 const MASK: bool = true;
213 const OFFSET: u8 = 13;
214 ((self.bits >> OFFSET) & MASK as u32) != 0
215 };
216 PVMO2R { bits }
217 }
218 #[doc = "Bit 12 - Peripheral voltage monitoring output: VDDUSB vs. 1.2 V"]
219 #[inline]
220 pub fn pvmo1(&self) -> PVMO1R {
221 let bits = {
222 const MASK: bool = true;
223 const OFFSET: u8 = 12;
224 ((self.bits >> OFFSET) & MASK as u32) != 0
225 };
226 PVMO1R { bits }
227 }
228 #[doc = "Bit 11 - Power voltage detector output"]
229 #[inline]
230 pub fn pvdo(&self) -> PVDOR {
231 let bits = {
232 const MASK: bool = true;
233 const OFFSET: u8 = 11;
234 ((self.bits >> OFFSET) & MASK as u32) != 0
235 };
236 PVDOR { bits }
237 }
238 #[doc = "Bit 10 - Voltage scaling flag"]
239 #[inline]
240 pub fn vosf(&self) -> VOSFR {
241 let bits = {
242 const MASK: bool = true;
243 const OFFSET: u8 = 10;
244 ((self.bits >> OFFSET) & MASK as u32) != 0
245 };
246 VOSFR { bits }
247 }
248 #[doc = "Bit 9 - Low-power regulator flag"]
249 #[inline]
250 pub fn reglpf(&self) -> REGLPFR {
251 let bits = {
252 const MASK: bool = true;
253 const OFFSET: u8 = 9;
254 ((self.bits >> OFFSET) & MASK as u32) != 0
255 };
256 REGLPFR { bits }
257 }
258 #[doc = "Bit 8 - Low-power regulator started"]
259 #[inline]
260 pub fn reglps(&self) -> REGLPSR {
261 let bits = {
262 const MASK: bool = true;
263 const OFFSET: u8 = 8;
264 ((self.bits >> OFFSET) & MASK as u32) != 0
265 };
266 REGLPSR { bits }
267 }
268}