1#[doc = "Reader of register PE8"]
2pub type R = crate::R<u8, super::PE8>;
3#[doc = "Writer for register PE8"]
4pub type W = crate::W<u8, super::PE8>;
5#[doc = "Register PE8 `reset()`'s with value 0"]
6impl crate::ResetValue for super::PE8 {
7 type Type = u8;
8 #[inline(always)]
9 fn reset_value() -> Self::Type {
10 0
11 }
12}
13#[doc = "Wakeup Pin Enable For LLWU_P28\n\nValue on reset: 0"]
14#[derive(Clone, Copy, Debug, PartialEq)]
15pub enum WUPE28_A {
16 #[doc = "0: External input pin disabled as wakeup input"]
17 _00,
18 #[doc = "1: External input pin enabled with rising edge detection"]
19 _01,
20 #[doc = "2: External input pin enabled with falling edge detection"]
21 _10,
22 #[doc = "3: External input pin enabled with any change detection"]
23 _11,
24}
25impl From<WUPE28_A> for u8 {
26 #[inline(always)]
27 fn from(variant: WUPE28_A) -> Self {
28 match variant {
29 WUPE28_A::_00 => 0,
30 WUPE28_A::_01 => 1,
31 WUPE28_A::_10 => 2,
32 WUPE28_A::_11 => 3,
33 }
34 }
35}
36#[doc = "Reader of field `WUPE28`"]
37pub type WUPE28_R = crate::R<u8, WUPE28_A>;
38impl WUPE28_R {
39 #[doc = r"Get enumerated values variant"]
40 #[inline(always)]
41 pub fn variant(&self) -> WUPE28_A {
42 match self.bits {
43 0 => WUPE28_A::_00,
44 1 => WUPE28_A::_01,
45 2 => WUPE28_A::_10,
46 3 => WUPE28_A::_11,
47 _ => unreachable!(),
48 }
49 }
50 #[doc = "Checks if the value of the field is `_00`"]
51 #[inline(always)]
52 pub fn is_00(&self) -> bool {
53 *self == WUPE28_A::_00
54 }
55 #[doc = "Checks if the value of the field is `_01`"]
56 #[inline(always)]
57 pub fn is_01(&self) -> bool {
58 *self == WUPE28_A::_01
59 }
60 #[doc = "Checks if the value of the field is `_10`"]
61 #[inline(always)]
62 pub fn is_10(&self) -> bool {
63 *self == WUPE28_A::_10
64 }
65 #[doc = "Checks if the value of the field is `_11`"]
66 #[inline(always)]
67 pub fn is_11(&self) -> bool {
68 *self == WUPE28_A::_11
69 }
70}
71#[doc = "Write proxy for field `WUPE28`"]
72pub struct WUPE28_W<'a> {
73 w: &'a mut W,
74}
75impl<'a> WUPE28_W<'a> {
76 #[doc = r"Writes `variant` to the field"]
77 #[inline(always)]
78 pub fn variant(self, variant: WUPE28_A) -> &'a mut W {
79 {
80 self.bits(variant.into())
81 }
82 }
83 #[doc = "External input pin disabled as wakeup input"]
84 #[inline(always)]
85 pub fn _00(self) -> &'a mut W {
86 self.variant(WUPE28_A::_00)
87 }
88 #[doc = "External input pin enabled with rising edge detection"]
89 #[inline(always)]
90 pub fn _01(self) -> &'a mut W {
91 self.variant(WUPE28_A::_01)
92 }
93 #[doc = "External input pin enabled with falling edge detection"]
94 #[inline(always)]
95 pub fn _10(self) -> &'a mut W {
96 self.variant(WUPE28_A::_10)
97 }
98 #[doc = "External input pin enabled with any change detection"]
99 #[inline(always)]
100 pub fn _11(self) -> &'a mut W {
101 self.variant(WUPE28_A::_11)
102 }
103 #[doc = r"Writes raw bits to the field"]
104 #[inline(always)]
105 pub fn bits(self, value: u8) -> &'a mut W {
106 self.w.bits = (self.w.bits & !0x03) | ((value as u8) & 0x03);
107 self.w
108 }
109}
110#[doc = "Wakeup Pin Enable For LLWU_P29\n\nValue on reset: 0"]
111#[derive(Clone, Copy, Debug, PartialEq)]
112pub enum WUPE29_A {
113 #[doc = "0: External input pin disabled as wakeup input"]
114 _00,
115 #[doc = "1: External input pin enabled with rising edge detection"]
116 _01,
117 #[doc = "2: External input pin enabled with falling edge detection"]
118 _10,
119 #[doc = "3: External input pin enabled with any change detection"]
120 _11,
121}
122impl From<WUPE29_A> for u8 {
123 #[inline(always)]
124 fn from(variant: WUPE29_A) -> Self {
125 match variant {
126 WUPE29_A::_00 => 0,
127 WUPE29_A::_01 => 1,
128 WUPE29_A::_10 => 2,
129 WUPE29_A::_11 => 3,
130 }
131 }
132}
133#[doc = "Reader of field `WUPE29`"]
134pub type WUPE29_R = crate::R<u8, WUPE29_A>;
135impl WUPE29_R {
136 #[doc = r"Get enumerated values variant"]
137 #[inline(always)]
138 pub fn variant(&self) -> WUPE29_A {
139 match self.bits {
140 0 => WUPE29_A::_00,
141 1 => WUPE29_A::_01,
142 2 => WUPE29_A::_10,
143 3 => WUPE29_A::_11,
144 _ => unreachable!(),
145 }
146 }
147 #[doc = "Checks if the value of the field is `_00`"]
148 #[inline(always)]
149 pub fn is_00(&self) -> bool {
150 *self == WUPE29_A::_00
151 }
152 #[doc = "Checks if the value of the field is `_01`"]
153 #[inline(always)]
154 pub fn is_01(&self) -> bool {
155 *self == WUPE29_A::_01
156 }
157 #[doc = "Checks if the value of the field is `_10`"]
158 #[inline(always)]
159 pub fn is_10(&self) -> bool {
160 *self == WUPE29_A::_10
161 }
162 #[doc = "Checks if the value of the field is `_11`"]
163 #[inline(always)]
164 pub fn is_11(&self) -> bool {
165 *self == WUPE29_A::_11
166 }
167}
168#[doc = "Write proxy for field `WUPE29`"]
169pub struct WUPE29_W<'a> {
170 w: &'a mut W,
171}
172impl<'a> WUPE29_W<'a> {
173 #[doc = r"Writes `variant` to the field"]
174 #[inline(always)]
175 pub fn variant(self, variant: WUPE29_A) -> &'a mut W {
176 {
177 self.bits(variant.into())
178 }
179 }
180 #[doc = "External input pin disabled as wakeup input"]
181 #[inline(always)]
182 pub fn _00(self) -> &'a mut W {
183 self.variant(WUPE29_A::_00)
184 }
185 #[doc = "External input pin enabled with rising edge detection"]
186 #[inline(always)]
187 pub fn _01(self) -> &'a mut W {
188 self.variant(WUPE29_A::_01)
189 }
190 #[doc = "External input pin enabled with falling edge detection"]
191 #[inline(always)]
192 pub fn _10(self) -> &'a mut W {
193 self.variant(WUPE29_A::_10)
194 }
195 #[doc = "External input pin enabled with any change detection"]
196 #[inline(always)]
197 pub fn _11(self) -> &'a mut W {
198 self.variant(WUPE29_A::_11)
199 }
200 #[doc = r"Writes raw bits to the field"]
201 #[inline(always)]
202 pub fn bits(self, value: u8) -> &'a mut W {
203 self.w.bits = (self.w.bits & !(0x03 << 2)) | (((value as u8) & 0x03) << 2);
204 self.w
205 }
206}
207#[doc = "Wakeup Pin Enable For LLWU_P30\n\nValue on reset: 0"]
208#[derive(Clone, Copy, Debug, PartialEq)]
209pub enum WUPE30_A {
210 #[doc = "0: External input pin disabled as wakeup input"]
211 _00,
212 #[doc = "1: External input pin enabled with rising edge detection"]
213 _01,
214 #[doc = "2: External input pin enabled with falling edge detection"]
215 _10,
216 #[doc = "3: External input pin enabled with any change detection"]
217 _11,
218}
219impl From<WUPE30_A> for u8 {
220 #[inline(always)]
221 fn from(variant: WUPE30_A) -> Self {
222 match variant {
223 WUPE30_A::_00 => 0,
224 WUPE30_A::_01 => 1,
225 WUPE30_A::_10 => 2,
226 WUPE30_A::_11 => 3,
227 }
228 }
229}
230#[doc = "Reader of field `WUPE30`"]
231pub type WUPE30_R = crate::R<u8, WUPE30_A>;
232impl WUPE30_R {
233 #[doc = r"Get enumerated values variant"]
234 #[inline(always)]
235 pub fn variant(&self) -> WUPE30_A {
236 match self.bits {
237 0 => WUPE30_A::_00,
238 1 => WUPE30_A::_01,
239 2 => WUPE30_A::_10,
240 3 => WUPE30_A::_11,
241 _ => unreachable!(),
242 }
243 }
244 #[doc = "Checks if the value of the field is `_00`"]
245 #[inline(always)]
246 pub fn is_00(&self) -> bool {
247 *self == WUPE30_A::_00
248 }
249 #[doc = "Checks if the value of the field is `_01`"]
250 #[inline(always)]
251 pub fn is_01(&self) -> bool {
252 *self == WUPE30_A::_01
253 }
254 #[doc = "Checks if the value of the field is `_10`"]
255 #[inline(always)]
256 pub fn is_10(&self) -> bool {
257 *self == WUPE30_A::_10
258 }
259 #[doc = "Checks if the value of the field is `_11`"]
260 #[inline(always)]
261 pub fn is_11(&self) -> bool {
262 *self == WUPE30_A::_11
263 }
264}
265#[doc = "Write proxy for field `WUPE30`"]
266pub struct WUPE30_W<'a> {
267 w: &'a mut W,
268}
269impl<'a> WUPE30_W<'a> {
270 #[doc = r"Writes `variant` to the field"]
271 #[inline(always)]
272 pub fn variant(self, variant: WUPE30_A) -> &'a mut W {
273 {
274 self.bits(variant.into())
275 }
276 }
277 #[doc = "External input pin disabled as wakeup input"]
278 #[inline(always)]
279 pub fn _00(self) -> &'a mut W {
280 self.variant(WUPE30_A::_00)
281 }
282 #[doc = "External input pin enabled with rising edge detection"]
283 #[inline(always)]
284 pub fn _01(self) -> &'a mut W {
285 self.variant(WUPE30_A::_01)
286 }
287 #[doc = "External input pin enabled with falling edge detection"]
288 #[inline(always)]
289 pub fn _10(self) -> &'a mut W {
290 self.variant(WUPE30_A::_10)
291 }
292 #[doc = "External input pin enabled with any change detection"]
293 #[inline(always)]
294 pub fn _11(self) -> &'a mut W {
295 self.variant(WUPE30_A::_11)
296 }
297 #[doc = r"Writes raw bits to the field"]
298 #[inline(always)]
299 pub fn bits(self, value: u8) -> &'a mut W {
300 self.w.bits = (self.w.bits & !(0x03 << 4)) | (((value as u8) & 0x03) << 4);
301 self.w
302 }
303}
304#[doc = "Wakeup Pin Enable For LLWU_P31\n\nValue on reset: 0"]
305#[derive(Clone, Copy, Debug, PartialEq)]
306pub enum WUPE31_A {
307 #[doc = "0: External input pin disabled as wakeup input"]
308 _00,
309 #[doc = "1: External input pin enabled with rising edge detection"]
310 _01,
311 #[doc = "2: External input pin enabled with falling edge detection"]
312 _10,
313 #[doc = "3: External input pin enabled with any change detection"]
314 _11,
315}
316impl From<WUPE31_A> for u8 {
317 #[inline(always)]
318 fn from(variant: WUPE31_A) -> Self {
319 match variant {
320 WUPE31_A::_00 => 0,
321 WUPE31_A::_01 => 1,
322 WUPE31_A::_10 => 2,
323 WUPE31_A::_11 => 3,
324 }
325 }
326}
327#[doc = "Reader of field `WUPE31`"]
328pub type WUPE31_R = crate::R<u8, WUPE31_A>;
329impl WUPE31_R {
330 #[doc = r"Get enumerated values variant"]
331 #[inline(always)]
332 pub fn variant(&self) -> WUPE31_A {
333 match self.bits {
334 0 => WUPE31_A::_00,
335 1 => WUPE31_A::_01,
336 2 => WUPE31_A::_10,
337 3 => WUPE31_A::_11,
338 _ => unreachable!(),
339 }
340 }
341 #[doc = "Checks if the value of the field is `_00`"]
342 #[inline(always)]
343 pub fn is_00(&self) -> bool {
344 *self == WUPE31_A::_00
345 }
346 #[doc = "Checks if the value of the field is `_01`"]
347 #[inline(always)]
348 pub fn is_01(&self) -> bool {
349 *self == WUPE31_A::_01
350 }
351 #[doc = "Checks if the value of the field is `_10`"]
352 #[inline(always)]
353 pub fn is_10(&self) -> bool {
354 *self == WUPE31_A::_10
355 }
356 #[doc = "Checks if the value of the field is `_11`"]
357 #[inline(always)]
358 pub fn is_11(&self) -> bool {
359 *self == WUPE31_A::_11
360 }
361}
362#[doc = "Write proxy for field `WUPE31`"]
363pub struct WUPE31_W<'a> {
364 w: &'a mut W,
365}
366impl<'a> WUPE31_W<'a> {
367 #[doc = r"Writes `variant` to the field"]
368 #[inline(always)]
369 pub fn variant(self, variant: WUPE31_A) -> &'a mut W {
370 {
371 self.bits(variant.into())
372 }
373 }
374 #[doc = "External input pin disabled as wakeup input"]
375 #[inline(always)]
376 pub fn _00(self) -> &'a mut W {
377 self.variant(WUPE31_A::_00)
378 }
379 #[doc = "External input pin enabled with rising edge detection"]
380 #[inline(always)]
381 pub fn _01(self) -> &'a mut W {
382 self.variant(WUPE31_A::_01)
383 }
384 #[doc = "External input pin enabled with falling edge detection"]
385 #[inline(always)]
386 pub fn _10(self) -> &'a mut W {
387 self.variant(WUPE31_A::_10)
388 }
389 #[doc = "External input pin enabled with any change detection"]
390 #[inline(always)]
391 pub fn _11(self) -> &'a mut W {
392 self.variant(WUPE31_A::_11)
393 }
394 #[doc = r"Writes raw bits to the field"]
395 #[inline(always)]
396 pub fn bits(self, value: u8) -> &'a mut W {
397 self.w.bits = (self.w.bits & !(0x03 << 6)) | (((value as u8) & 0x03) << 6);
398 self.w
399 }
400}
401impl R {
402 #[doc = "Bits 0:1 - Wakeup Pin Enable For LLWU_P28"]
403 #[inline(always)]
404 pub fn wupe28(&self) -> WUPE28_R {
405 WUPE28_R::new((self.bits & 0x03) as u8)
406 }
407 #[doc = "Bits 2:3 - Wakeup Pin Enable For LLWU_P29"]
408 #[inline(always)]
409 pub fn wupe29(&self) -> WUPE29_R {
410 WUPE29_R::new(((self.bits >> 2) & 0x03) as u8)
411 }
412 #[doc = "Bits 4:5 - Wakeup Pin Enable For LLWU_P30"]
413 #[inline(always)]
414 pub fn wupe30(&self) -> WUPE30_R {
415 WUPE30_R::new(((self.bits >> 4) & 0x03) as u8)
416 }
417 #[doc = "Bits 6:7 - Wakeup Pin Enable For LLWU_P31"]
418 #[inline(always)]
419 pub fn wupe31(&self) -> WUPE31_R {
420 WUPE31_R::new(((self.bits >> 6) & 0x03) as u8)
421 }
422}
423impl W {
424 #[doc = "Bits 0:1 - Wakeup Pin Enable For LLWU_P28"]
425 #[inline(always)]
426 pub fn wupe28(&mut self) -> WUPE28_W {
427 WUPE28_W { w: self }
428 }
429 #[doc = "Bits 2:3 - Wakeup Pin Enable For LLWU_P29"]
430 #[inline(always)]
431 pub fn wupe29(&mut self) -> WUPE29_W {
432 WUPE29_W { w: self }
433 }
434 #[doc = "Bits 4:5 - Wakeup Pin Enable For LLWU_P30"]
435 #[inline(always)]
436 pub fn wupe30(&mut self) -> WUPE30_W {
437 WUPE30_W { w: self }
438 }
439 #[doc = "Bits 6:7 - Wakeup Pin Enable For LLWU_P31"]
440 #[inline(always)]
441 pub fn wupe31(&mut self) -> WUPE31_W {
442 WUPE31_W { w: self }
443 }
444}