1#[doc = "Register `SR` reader"]
2pub type R = crate::R<SrSpec>;
3#[doc = "WKUP Wake Up Status\n\nValue on reset: 0"]
4#[derive(Clone, Copy, Debug, PartialEq, Eq)]
5pub enum Wkups {
6 #[doc = "0: no wake up due to the assertion of the WKUP pins has occurred since the last read of SUPC_SR."]
7 No = 0,
8 #[doc = "1: at least one wake up due to the assertion of the WKUP pins has occurred since the last read of SUPC_SR."]
9 Present = 1,
10}
11impl From<Wkups> for bool {
12 #[inline(always)]
13 fn from(variant: Wkups) -> Self {
14 variant as u8 != 0
15 }
16}
17#[doc = "Field `WKUPS` reader - WKUP Wake Up Status"]
18pub type WkupsR = crate::BitReader<Wkups>;
19impl WkupsR {
20 #[doc = "Get enumerated values variant"]
21 #[inline(always)]
22 pub const fn variant(&self) -> Wkups {
23 match self.bits {
24 false => Wkups::No,
25 true => Wkups::Present,
26 }
27 }
28 #[doc = "no wake up due to the assertion of the WKUP pins has occurred since the last read of SUPC_SR."]
29 #[inline(always)]
30 pub fn is_no(&self) -> bool {
31 *self == Wkups::No
32 }
33 #[doc = "at least one wake up due to the assertion of the WKUP pins has occurred since the last read of SUPC_SR."]
34 #[inline(always)]
35 pub fn is_present(&self) -> bool {
36 *self == Wkups::Present
37 }
38}
39#[doc = "Supply Monitor Detection Wake Up Status\n\nValue on reset: 0"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum Smws {
42 #[doc = "0: no wake up due to a supply monitor detection has occurred since the last read of SUPC_SR."]
43 No = 0,
44 #[doc = "1: at least one wake up due to a supply monitor detection has occurred since the last read of SUPC_SR."]
45 Present = 1,
46}
47impl From<Smws> for bool {
48 #[inline(always)]
49 fn from(variant: Smws) -> Self {
50 variant as u8 != 0
51 }
52}
53#[doc = "Field `SMWS` reader - Supply Monitor Detection Wake Up Status"]
54pub type SmwsR = crate::BitReader<Smws>;
55impl SmwsR {
56 #[doc = "Get enumerated values variant"]
57 #[inline(always)]
58 pub const fn variant(&self) -> Smws {
59 match self.bits {
60 false => Smws::No,
61 true => Smws::Present,
62 }
63 }
64 #[doc = "no wake up due to a supply monitor detection has occurred since the last read of SUPC_SR."]
65 #[inline(always)]
66 pub fn is_no(&self) -> bool {
67 *self == Smws::No
68 }
69 #[doc = "at least one wake up due to a supply monitor detection has occurred since the last read of SUPC_SR."]
70 #[inline(always)]
71 pub fn is_present(&self) -> bool {
72 *self == Smws::Present
73 }
74}
75#[doc = "Brownout Detector Reset Status\n\nValue on reset: 0"]
76#[derive(Clone, Copy, Debug, PartialEq, Eq)]
77pub enum Bodrsts {
78 #[doc = "0: no core brownout rising edge event has been detected since the last read of the SUPC_SR."]
79 No = 0,
80 #[doc = "1: at least one brownout output rising edge event has been detected since the last read of the SUPC_SR."]
81 Present = 1,
82}
83impl From<Bodrsts> for bool {
84 #[inline(always)]
85 fn from(variant: Bodrsts) -> Self {
86 variant as u8 != 0
87 }
88}
89#[doc = "Field `BODRSTS` reader - Brownout Detector Reset Status"]
90pub type BodrstsR = crate::BitReader<Bodrsts>;
91impl BodrstsR {
92 #[doc = "Get enumerated values variant"]
93 #[inline(always)]
94 pub const fn variant(&self) -> Bodrsts {
95 match self.bits {
96 false => Bodrsts::No,
97 true => Bodrsts::Present,
98 }
99 }
100 #[doc = "no core brownout rising edge event has been detected since the last read of the SUPC_SR."]
101 #[inline(always)]
102 pub fn is_no(&self) -> bool {
103 *self == Bodrsts::No
104 }
105 #[doc = "at least one brownout output rising edge event has been detected since the last read of the SUPC_SR."]
106 #[inline(always)]
107 pub fn is_present(&self) -> bool {
108 *self == Bodrsts::Present
109 }
110}
111#[doc = "Supply Monitor Reset Status\n\nValue on reset: 0"]
112#[derive(Clone, Copy, Debug, PartialEq, Eq)]
113pub enum Smrsts {
114 #[doc = "0: no supply monitor detection has generated a core reset since the last read of the SUPC_SR."]
115 No = 0,
116 #[doc = "1: at least one supply monitor detection has generated a core reset since the last read of the SUPC_SR."]
117 Present = 1,
118}
119impl From<Smrsts> for bool {
120 #[inline(always)]
121 fn from(variant: Smrsts) -> Self {
122 variant as u8 != 0
123 }
124}
125#[doc = "Field `SMRSTS` reader - Supply Monitor Reset Status"]
126pub type SmrstsR = crate::BitReader<Smrsts>;
127impl SmrstsR {
128 #[doc = "Get enumerated values variant"]
129 #[inline(always)]
130 pub const fn variant(&self) -> Smrsts {
131 match self.bits {
132 false => Smrsts::No,
133 true => Smrsts::Present,
134 }
135 }
136 #[doc = "no supply monitor detection has generated a core reset since the last read of the SUPC_SR."]
137 #[inline(always)]
138 pub fn is_no(&self) -> bool {
139 *self == Smrsts::No
140 }
141 #[doc = "at least one supply monitor detection has generated a core reset since the last read of the SUPC_SR."]
142 #[inline(always)]
143 pub fn is_present(&self) -> bool {
144 *self == Smrsts::Present
145 }
146}
147#[doc = "Supply Monitor Status\n\nValue on reset: 0"]
148#[derive(Clone, Copy, Debug, PartialEq, Eq)]
149pub enum Sms {
150 #[doc = "0: no supply monitor detection since the last read of SUPC_SR."]
151 No = 0,
152 #[doc = "1: at least one supply monitor detection since the last read of SUPC_SR."]
153 Present = 1,
154}
155impl From<Sms> for bool {
156 #[inline(always)]
157 fn from(variant: Sms) -> Self {
158 variant as u8 != 0
159 }
160}
161#[doc = "Field `SMS` reader - Supply Monitor Status"]
162pub type SmsR = crate::BitReader<Sms>;
163impl SmsR {
164 #[doc = "Get enumerated values variant"]
165 #[inline(always)]
166 pub const fn variant(&self) -> Sms {
167 match self.bits {
168 false => Sms::No,
169 true => Sms::Present,
170 }
171 }
172 #[doc = "no supply monitor detection since the last read of SUPC_SR."]
173 #[inline(always)]
174 pub fn is_no(&self) -> bool {
175 *self == Sms::No
176 }
177 #[doc = "at least one supply monitor detection since the last read of SUPC_SR."]
178 #[inline(always)]
179 pub fn is_present(&self) -> bool {
180 *self == Sms::Present
181 }
182}
183#[doc = "Supply Monitor Output Status\n\nValue on reset: 0"]
184#[derive(Clone, Copy, Debug, PartialEq, Eq)]
185pub enum Smos {
186 #[doc = "0: the supply monitor detected VDDIO higher than its threshold at its last measurement."]
187 High = 0,
188 #[doc = "1: the supply monitor detected VDDIO lower than its threshold at its last measurement."]
189 Low = 1,
190}
191impl From<Smos> for bool {
192 #[inline(always)]
193 fn from(variant: Smos) -> Self {
194 variant as u8 != 0
195 }
196}
197#[doc = "Field `SMOS` reader - Supply Monitor Output Status"]
198pub type SmosR = crate::BitReader<Smos>;
199impl SmosR {
200 #[doc = "Get enumerated values variant"]
201 #[inline(always)]
202 pub const fn variant(&self) -> Smos {
203 match self.bits {
204 false => Smos::High,
205 true => Smos::Low,
206 }
207 }
208 #[doc = "the supply monitor detected VDDIO higher than its threshold at its last measurement."]
209 #[inline(always)]
210 pub fn is_high(&self) -> bool {
211 *self == Smos::High
212 }
213 #[doc = "the supply monitor detected VDDIO lower than its threshold at its last measurement."]
214 #[inline(always)]
215 pub fn is_low(&self) -> bool {
216 *self == Smos::Low
217 }
218}
219#[doc = "32-kHz Oscillator Selection Status\n\nValue on reset: 0"]
220#[derive(Clone, Copy, Debug, PartialEq, Eq)]
221pub enum Oscsel {
222 #[doc = "0: the slow clock, SLCK is generated by the embedded 32-kHz RC oscillator."]
223 Rc = 0,
224 #[doc = "1: the slow clock, SLCK is generated by the 32-kHz crystal oscillator."]
225 Cryst = 1,
226}
227impl From<Oscsel> for bool {
228 #[inline(always)]
229 fn from(variant: Oscsel) -> Self {
230 variant as u8 != 0
231 }
232}
233#[doc = "Field `OSCSEL` reader - 32-kHz Oscillator Selection Status"]
234pub type OscselR = crate::BitReader<Oscsel>;
235impl OscselR {
236 #[doc = "Get enumerated values variant"]
237 #[inline(always)]
238 pub const fn variant(&self) -> Oscsel {
239 match self.bits {
240 false => Oscsel::Rc,
241 true => Oscsel::Cryst,
242 }
243 }
244 #[doc = "the slow clock, SLCK is generated by the embedded 32-kHz RC oscillator."]
245 #[inline(always)]
246 pub fn is_rc(&self) -> bool {
247 *self == Oscsel::Rc
248 }
249 #[doc = "the slow clock, SLCK is generated by the 32-kHz crystal oscillator."]
250 #[inline(always)]
251 pub fn is_cryst(&self) -> bool {
252 *self == Oscsel::Cryst
253 }
254}
255#[doc = "WKUP Input Status 0\n\nValue on reset: 0"]
256#[derive(Clone, Copy, Debug, PartialEq, Eq)]
257pub enum Wkupis0 {
258 #[doc = "0: the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
259 Dis = 0,
260 #[doc = "1: the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
261 En = 1,
262}
263impl From<Wkupis0> for bool {
264 #[inline(always)]
265 fn from(variant: Wkupis0) -> Self {
266 variant as u8 != 0
267 }
268}
269#[doc = "Field `WKUPIS0` reader - WKUP Input Status 0"]
270pub type Wkupis0R = crate::BitReader<Wkupis0>;
271impl Wkupis0R {
272 #[doc = "Get enumerated values variant"]
273 #[inline(always)]
274 pub const fn variant(&self) -> Wkupis0 {
275 match self.bits {
276 false => Wkupis0::Dis,
277 true => Wkupis0::En,
278 }
279 }
280 #[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
281 #[inline(always)]
282 pub fn is_dis(&self) -> bool {
283 *self == Wkupis0::Dis
284 }
285 #[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
286 #[inline(always)]
287 pub fn is_en(&self) -> bool {
288 *self == Wkupis0::En
289 }
290}
291#[doc = "WKUP Input Status 1\n\nValue on reset: 0"]
292#[derive(Clone, Copy, Debug, PartialEq, Eq)]
293pub enum Wkupis1 {
294 #[doc = "0: the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
295 Dis = 0,
296 #[doc = "1: the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
297 En = 1,
298}
299impl From<Wkupis1> for bool {
300 #[inline(always)]
301 fn from(variant: Wkupis1) -> Self {
302 variant as u8 != 0
303 }
304}
305#[doc = "Field `WKUPIS1` reader - WKUP Input Status 1"]
306pub type Wkupis1R = crate::BitReader<Wkupis1>;
307impl Wkupis1R {
308 #[doc = "Get enumerated values variant"]
309 #[inline(always)]
310 pub const fn variant(&self) -> Wkupis1 {
311 match self.bits {
312 false => Wkupis1::Dis,
313 true => Wkupis1::En,
314 }
315 }
316 #[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
317 #[inline(always)]
318 pub fn is_dis(&self) -> bool {
319 *self == Wkupis1::Dis
320 }
321 #[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
322 #[inline(always)]
323 pub fn is_en(&self) -> bool {
324 *self == Wkupis1::En
325 }
326}
327#[doc = "WKUP Input Status 2\n\nValue on reset: 0"]
328#[derive(Clone, Copy, Debug, PartialEq, Eq)]
329pub enum Wkupis2 {
330 #[doc = "0: the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
331 Dis = 0,
332 #[doc = "1: the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
333 En = 1,
334}
335impl From<Wkupis2> for bool {
336 #[inline(always)]
337 fn from(variant: Wkupis2) -> Self {
338 variant as u8 != 0
339 }
340}
341#[doc = "Field `WKUPIS2` reader - WKUP Input Status 2"]
342pub type Wkupis2R = crate::BitReader<Wkupis2>;
343impl Wkupis2R {
344 #[doc = "Get enumerated values variant"]
345 #[inline(always)]
346 pub const fn variant(&self) -> Wkupis2 {
347 match self.bits {
348 false => Wkupis2::Dis,
349 true => Wkupis2::En,
350 }
351 }
352 #[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
353 #[inline(always)]
354 pub fn is_dis(&self) -> bool {
355 *self == Wkupis2::Dis
356 }
357 #[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
358 #[inline(always)]
359 pub fn is_en(&self) -> bool {
360 *self == Wkupis2::En
361 }
362}
363#[doc = "WKUP Input Status 3\n\nValue on reset: 0"]
364#[derive(Clone, Copy, Debug, PartialEq, Eq)]
365pub enum Wkupis3 {
366 #[doc = "0: the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
367 Dis = 0,
368 #[doc = "1: the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
369 En = 1,
370}
371impl From<Wkupis3> for bool {
372 #[inline(always)]
373 fn from(variant: Wkupis3) -> Self {
374 variant as u8 != 0
375 }
376}
377#[doc = "Field `WKUPIS3` reader - WKUP Input Status 3"]
378pub type Wkupis3R = crate::BitReader<Wkupis3>;
379impl Wkupis3R {
380 #[doc = "Get enumerated values variant"]
381 #[inline(always)]
382 pub const fn variant(&self) -> Wkupis3 {
383 match self.bits {
384 false => Wkupis3::Dis,
385 true => Wkupis3::En,
386 }
387 }
388 #[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
389 #[inline(always)]
390 pub fn is_dis(&self) -> bool {
391 *self == Wkupis3::Dis
392 }
393 #[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
394 #[inline(always)]
395 pub fn is_en(&self) -> bool {
396 *self == Wkupis3::En
397 }
398}
399#[doc = "WKUP Input Status 4\n\nValue on reset: 0"]
400#[derive(Clone, Copy, Debug, PartialEq, Eq)]
401pub enum Wkupis4 {
402 #[doc = "0: the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
403 Dis = 0,
404 #[doc = "1: the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
405 En = 1,
406}
407impl From<Wkupis4> for bool {
408 #[inline(always)]
409 fn from(variant: Wkupis4) -> Self {
410 variant as u8 != 0
411 }
412}
413#[doc = "Field `WKUPIS4` reader - WKUP Input Status 4"]
414pub type Wkupis4R = crate::BitReader<Wkupis4>;
415impl Wkupis4R {
416 #[doc = "Get enumerated values variant"]
417 #[inline(always)]
418 pub const fn variant(&self) -> Wkupis4 {
419 match self.bits {
420 false => Wkupis4::Dis,
421 true => Wkupis4::En,
422 }
423 }
424 #[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
425 #[inline(always)]
426 pub fn is_dis(&self) -> bool {
427 *self == Wkupis4::Dis
428 }
429 #[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
430 #[inline(always)]
431 pub fn is_en(&self) -> bool {
432 *self == Wkupis4::En
433 }
434}
435#[doc = "WKUP Input Status 5\n\nValue on reset: 0"]
436#[derive(Clone, Copy, Debug, PartialEq, Eq)]
437pub enum Wkupis5 {
438 #[doc = "0: the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
439 Dis = 0,
440 #[doc = "1: the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
441 En = 1,
442}
443impl From<Wkupis5> for bool {
444 #[inline(always)]
445 fn from(variant: Wkupis5) -> Self {
446 variant as u8 != 0
447 }
448}
449#[doc = "Field `WKUPIS5` reader - WKUP Input Status 5"]
450pub type Wkupis5R = crate::BitReader<Wkupis5>;
451impl Wkupis5R {
452 #[doc = "Get enumerated values variant"]
453 #[inline(always)]
454 pub const fn variant(&self) -> Wkupis5 {
455 match self.bits {
456 false => Wkupis5::Dis,
457 true => Wkupis5::En,
458 }
459 }
460 #[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
461 #[inline(always)]
462 pub fn is_dis(&self) -> bool {
463 *self == Wkupis5::Dis
464 }
465 #[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
466 #[inline(always)]
467 pub fn is_en(&self) -> bool {
468 *self == Wkupis5::En
469 }
470}
471#[doc = "WKUP Input Status 6\n\nValue on reset: 0"]
472#[derive(Clone, Copy, Debug, PartialEq, Eq)]
473pub enum Wkupis6 {
474 #[doc = "0: the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
475 Dis = 0,
476 #[doc = "1: the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
477 En = 1,
478}
479impl From<Wkupis6> for bool {
480 #[inline(always)]
481 fn from(variant: Wkupis6) -> Self {
482 variant as u8 != 0
483 }
484}
485#[doc = "Field `WKUPIS6` reader - WKUP Input Status 6"]
486pub type Wkupis6R = crate::BitReader<Wkupis6>;
487impl Wkupis6R {
488 #[doc = "Get enumerated values variant"]
489 #[inline(always)]
490 pub const fn variant(&self) -> Wkupis6 {
491 match self.bits {
492 false => Wkupis6::Dis,
493 true => Wkupis6::En,
494 }
495 }
496 #[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
497 #[inline(always)]
498 pub fn is_dis(&self) -> bool {
499 *self == Wkupis6::Dis
500 }
501 #[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
502 #[inline(always)]
503 pub fn is_en(&self) -> bool {
504 *self == Wkupis6::En
505 }
506}
507#[doc = "WKUP Input Status 7\n\nValue on reset: 0"]
508#[derive(Clone, Copy, Debug, PartialEq, Eq)]
509pub enum Wkupis7 {
510 #[doc = "0: the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
511 Dis = 0,
512 #[doc = "1: the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
513 En = 1,
514}
515impl From<Wkupis7> for bool {
516 #[inline(always)]
517 fn from(variant: Wkupis7) -> Self {
518 variant as u8 != 0
519 }
520}
521#[doc = "Field `WKUPIS7` reader - WKUP Input Status 7"]
522pub type Wkupis7R = crate::BitReader<Wkupis7>;
523impl Wkupis7R {
524 #[doc = "Get enumerated values variant"]
525 #[inline(always)]
526 pub const fn variant(&self) -> Wkupis7 {
527 match self.bits {
528 false => Wkupis7::Dis,
529 true => Wkupis7::En,
530 }
531 }
532 #[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
533 #[inline(always)]
534 pub fn is_dis(&self) -> bool {
535 *self == Wkupis7::Dis
536 }
537 #[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
538 #[inline(always)]
539 pub fn is_en(&self) -> bool {
540 *self == Wkupis7::En
541 }
542}
543#[doc = "WKUP Input Status 8\n\nValue on reset: 0"]
544#[derive(Clone, Copy, Debug, PartialEq, Eq)]
545pub enum Wkupis8 {
546 #[doc = "0: the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
547 Dis = 0,
548 #[doc = "1: the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
549 En = 1,
550}
551impl From<Wkupis8> for bool {
552 #[inline(always)]
553 fn from(variant: Wkupis8) -> Self {
554 variant as u8 != 0
555 }
556}
557#[doc = "Field `WKUPIS8` reader - WKUP Input Status 8"]
558pub type Wkupis8R = crate::BitReader<Wkupis8>;
559impl Wkupis8R {
560 #[doc = "Get enumerated values variant"]
561 #[inline(always)]
562 pub const fn variant(&self) -> Wkupis8 {
563 match self.bits {
564 false => Wkupis8::Dis,
565 true => Wkupis8::En,
566 }
567 }
568 #[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
569 #[inline(always)]
570 pub fn is_dis(&self) -> bool {
571 *self == Wkupis8::Dis
572 }
573 #[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
574 #[inline(always)]
575 pub fn is_en(&self) -> bool {
576 *self == Wkupis8::En
577 }
578}
579#[doc = "WKUP Input Status 9\n\nValue on reset: 0"]
580#[derive(Clone, Copy, Debug, PartialEq, Eq)]
581pub enum Wkupis9 {
582 #[doc = "0: the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
583 Dis = 0,
584 #[doc = "1: the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
585 En = 1,
586}
587impl From<Wkupis9> for bool {
588 #[inline(always)]
589 fn from(variant: Wkupis9) -> Self {
590 variant as u8 != 0
591 }
592}
593#[doc = "Field `WKUPIS9` reader - WKUP Input Status 9"]
594pub type Wkupis9R = crate::BitReader<Wkupis9>;
595impl Wkupis9R {
596 #[doc = "Get enumerated values variant"]
597 #[inline(always)]
598 pub const fn variant(&self) -> Wkupis9 {
599 match self.bits {
600 false => Wkupis9::Dis,
601 true => Wkupis9::En,
602 }
603 }
604 #[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
605 #[inline(always)]
606 pub fn is_dis(&self) -> bool {
607 *self == Wkupis9::Dis
608 }
609 #[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
610 #[inline(always)]
611 pub fn is_en(&self) -> bool {
612 *self == Wkupis9::En
613 }
614}
615#[doc = "WKUP Input Status 10\n\nValue on reset: 0"]
616#[derive(Clone, Copy, Debug, PartialEq, Eq)]
617pub enum Wkupis10 {
618 #[doc = "0: the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
619 Dis = 0,
620 #[doc = "1: the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
621 En = 1,
622}
623impl From<Wkupis10> for bool {
624 #[inline(always)]
625 fn from(variant: Wkupis10) -> Self {
626 variant as u8 != 0
627 }
628}
629#[doc = "Field `WKUPIS10` reader - WKUP Input Status 10"]
630pub type Wkupis10R = crate::BitReader<Wkupis10>;
631impl Wkupis10R {
632 #[doc = "Get enumerated values variant"]
633 #[inline(always)]
634 pub const fn variant(&self) -> Wkupis10 {
635 match self.bits {
636 false => Wkupis10::Dis,
637 true => Wkupis10::En,
638 }
639 }
640 #[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
641 #[inline(always)]
642 pub fn is_dis(&self) -> bool {
643 *self == Wkupis10::Dis
644 }
645 #[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
646 #[inline(always)]
647 pub fn is_en(&self) -> bool {
648 *self == Wkupis10::En
649 }
650}
651#[doc = "WKUP Input Status 11\n\nValue on reset: 0"]
652#[derive(Clone, Copy, Debug, PartialEq, Eq)]
653pub enum Wkupis11 {
654 #[doc = "0: the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
655 Dis = 0,
656 #[doc = "1: the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
657 En = 1,
658}
659impl From<Wkupis11> for bool {
660 #[inline(always)]
661 fn from(variant: Wkupis11) -> Self {
662 variant as u8 != 0
663 }
664}
665#[doc = "Field `WKUPIS11` reader - WKUP Input Status 11"]
666pub type Wkupis11R = crate::BitReader<Wkupis11>;
667impl Wkupis11R {
668 #[doc = "Get enumerated values variant"]
669 #[inline(always)]
670 pub const fn variant(&self) -> Wkupis11 {
671 match self.bits {
672 false => Wkupis11::Dis,
673 true => Wkupis11::En,
674 }
675 }
676 #[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
677 #[inline(always)]
678 pub fn is_dis(&self) -> bool {
679 *self == Wkupis11::Dis
680 }
681 #[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
682 #[inline(always)]
683 pub fn is_en(&self) -> bool {
684 *self == Wkupis11::En
685 }
686}
687#[doc = "WKUP Input Status 12\n\nValue on reset: 0"]
688#[derive(Clone, Copy, Debug, PartialEq, Eq)]
689pub enum Wkupis12 {
690 #[doc = "0: the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
691 Dis = 0,
692 #[doc = "1: the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
693 En = 1,
694}
695impl From<Wkupis12> for bool {
696 #[inline(always)]
697 fn from(variant: Wkupis12) -> Self {
698 variant as u8 != 0
699 }
700}
701#[doc = "Field `WKUPIS12` reader - WKUP Input Status 12"]
702pub type Wkupis12R = crate::BitReader<Wkupis12>;
703impl Wkupis12R {
704 #[doc = "Get enumerated values variant"]
705 #[inline(always)]
706 pub const fn variant(&self) -> Wkupis12 {
707 match self.bits {
708 false => Wkupis12::Dis,
709 true => Wkupis12::En,
710 }
711 }
712 #[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
713 #[inline(always)]
714 pub fn is_dis(&self) -> bool {
715 *self == Wkupis12::Dis
716 }
717 #[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
718 #[inline(always)]
719 pub fn is_en(&self) -> bool {
720 *self == Wkupis12::En
721 }
722}
723#[doc = "WKUP Input Status 13\n\nValue on reset: 0"]
724#[derive(Clone, Copy, Debug, PartialEq, Eq)]
725pub enum Wkupis13 {
726 #[doc = "0: the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
727 Dis = 0,
728 #[doc = "1: the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
729 En = 1,
730}
731impl From<Wkupis13> for bool {
732 #[inline(always)]
733 fn from(variant: Wkupis13) -> Self {
734 variant as u8 != 0
735 }
736}
737#[doc = "Field `WKUPIS13` reader - WKUP Input Status 13"]
738pub type Wkupis13R = crate::BitReader<Wkupis13>;
739impl Wkupis13R {
740 #[doc = "Get enumerated values variant"]
741 #[inline(always)]
742 pub const fn variant(&self) -> Wkupis13 {
743 match self.bits {
744 false => Wkupis13::Dis,
745 true => Wkupis13::En,
746 }
747 }
748 #[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
749 #[inline(always)]
750 pub fn is_dis(&self) -> bool {
751 *self == Wkupis13::Dis
752 }
753 #[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
754 #[inline(always)]
755 pub fn is_en(&self) -> bool {
756 *self == Wkupis13::En
757 }
758}
759#[doc = "WKUP Input Status 14\n\nValue on reset: 0"]
760#[derive(Clone, Copy, Debug, PartialEq, Eq)]
761pub enum Wkupis14 {
762 #[doc = "0: the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
763 Dis = 0,
764 #[doc = "1: the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
765 En = 1,
766}
767impl From<Wkupis14> for bool {
768 #[inline(always)]
769 fn from(variant: Wkupis14) -> Self {
770 variant as u8 != 0
771 }
772}
773#[doc = "Field `WKUPIS14` reader - WKUP Input Status 14"]
774pub type Wkupis14R = crate::BitReader<Wkupis14>;
775impl Wkupis14R {
776 #[doc = "Get enumerated values variant"]
777 #[inline(always)]
778 pub const fn variant(&self) -> Wkupis14 {
779 match self.bits {
780 false => Wkupis14::Dis,
781 true => Wkupis14::En,
782 }
783 }
784 #[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
785 #[inline(always)]
786 pub fn is_dis(&self) -> bool {
787 *self == Wkupis14::Dis
788 }
789 #[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
790 #[inline(always)]
791 pub fn is_en(&self) -> bool {
792 *self == Wkupis14::En
793 }
794}
795#[doc = "WKUP Input Status 15\n\nValue on reset: 0"]
796#[derive(Clone, Copy, Debug, PartialEq, Eq)]
797pub enum Wkupis15 {
798 #[doc = "0: the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
799 Dis = 0,
800 #[doc = "1: the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
801 En = 1,
802}
803impl From<Wkupis15> for bool {
804 #[inline(always)]
805 fn from(variant: Wkupis15) -> Self {
806 variant as u8 != 0
807 }
808}
809#[doc = "Field `WKUPIS15` reader - WKUP Input Status 15"]
810pub type Wkupis15R = crate::BitReader<Wkupis15>;
811impl Wkupis15R {
812 #[doc = "Get enumerated values variant"]
813 #[inline(always)]
814 pub const fn variant(&self) -> Wkupis15 {
815 match self.bits {
816 false => Wkupis15::Dis,
817 true => Wkupis15::En,
818 }
819 }
820 #[doc = "the corresponding wake-up input is disabled, or was inactive at the time the debouncer triggered a wake up event."]
821 #[inline(always)]
822 pub fn is_dis(&self) -> bool {
823 *self == Wkupis15::Dis
824 }
825 #[doc = "the corresponding wake-up input was active at the time the debouncer triggered a wake up event."]
826 #[inline(always)]
827 pub fn is_en(&self) -> bool {
828 *self == Wkupis15::En
829 }
830}
831impl R {
832 #[doc = "Bit 1 - WKUP Wake Up Status"]
833 #[inline(always)]
834 pub fn wkups(&self) -> WkupsR {
835 WkupsR::new(((self.bits >> 1) & 1) != 0)
836 }
837 #[doc = "Bit 2 - Supply Monitor Detection Wake Up Status"]
838 #[inline(always)]
839 pub fn smws(&self) -> SmwsR {
840 SmwsR::new(((self.bits >> 2) & 1) != 0)
841 }
842 #[doc = "Bit 3 - Brownout Detector Reset Status"]
843 #[inline(always)]
844 pub fn bodrsts(&self) -> BodrstsR {
845 BodrstsR::new(((self.bits >> 3) & 1) != 0)
846 }
847 #[doc = "Bit 4 - Supply Monitor Reset Status"]
848 #[inline(always)]
849 pub fn smrsts(&self) -> SmrstsR {
850 SmrstsR::new(((self.bits >> 4) & 1) != 0)
851 }
852 #[doc = "Bit 5 - Supply Monitor Status"]
853 #[inline(always)]
854 pub fn sms(&self) -> SmsR {
855 SmsR::new(((self.bits >> 5) & 1) != 0)
856 }
857 #[doc = "Bit 6 - Supply Monitor Output Status"]
858 #[inline(always)]
859 pub fn smos(&self) -> SmosR {
860 SmosR::new(((self.bits >> 6) & 1) != 0)
861 }
862 #[doc = "Bit 7 - 32-kHz Oscillator Selection Status"]
863 #[inline(always)]
864 pub fn oscsel(&self) -> OscselR {
865 OscselR::new(((self.bits >> 7) & 1) != 0)
866 }
867 #[doc = "Bit 16 - WKUP Input Status 0"]
868 #[inline(always)]
869 pub fn wkupis0(&self) -> Wkupis0R {
870 Wkupis0R::new(((self.bits >> 16) & 1) != 0)
871 }
872 #[doc = "Bit 17 - WKUP Input Status 1"]
873 #[inline(always)]
874 pub fn wkupis1(&self) -> Wkupis1R {
875 Wkupis1R::new(((self.bits >> 17) & 1) != 0)
876 }
877 #[doc = "Bit 18 - WKUP Input Status 2"]
878 #[inline(always)]
879 pub fn wkupis2(&self) -> Wkupis2R {
880 Wkupis2R::new(((self.bits >> 18) & 1) != 0)
881 }
882 #[doc = "Bit 19 - WKUP Input Status 3"]
883 #[inline(always)]
884 pub fn wkupis3(&self) -> Wkupis3R {
885 Wkupis3R::new(((self.bits >> 19) & 1) != 0)
886 }
887 #[doc = "Bit 20 - WKUP Input Status 4"]
888 #[inline(always)]
889 pub fn wkupis4(&self) -> Wkupis4R {
890 Wkupis4R::new(((self.bits >> 20) & 1) != 0)
891 }
892 #[doc = "Bit 21 - WKUP Input Status 5"]
893 #[inline(always)]
894 pub fn wkupis5(&self) -> Wkupis5R {
895 Wkupis5R::new(((self.bits >> 21) & 1) != 0)
896 }
897 #[doc = "Bit 22 - WKUP Input Status 6"]
898 #[inline(always)]
899 pub fn wkupis6(&self) -> Wkupis6R {
900 Wkupis6R::new(((self.bits >> 22) & 1) != 0)
901 }
902 #[doc = "Bit 23 - WKUP Input Status 7"]
903 #[inline(always)]
904 pub fn wkupis7(&self) -> Wkupis7R {
905 Wkupis7R::new(((self.bits >> 23) & 1) != 0)
906 }
907 #[doc = "Bit 24 - WKUP Input Status 8"]
908 #[inline(always)]
909 pub fn wkupis8(&self) -> Wkupis8R {
910 Wkupis8R::new(((self.bits >> 24) & 1) != 0)
911 }
912 #[doc = "Bit 25 - WKUP Input Status 9"]
913 #[inline(always)]
914 pub fn wkupis9(&self) -> Wkupis9R {
915 Wkupis9R::new(((self.bits >> 25) & 1) != 0)
916 }
917 #[doc = "Bit 26 - WKUP Input Status 10"]
918 #[inline(always)]
919 pub fn wkupis10(&self) -> Wkupis10R {
920 Wkupis10R::new(((self.bits >> 26) & 1) != 0)
921 }
922 #[doc = "Bit 27 - WKUP Input Status 11"]
923 #[inline(always)]
924 pub fn wkupis11(&self) -> Wkupis11R {
925 Wkupis11R::new(((self.bits >> 27) & 1) != 0)
926 }
927 #[doc = "Bit 28 - WKUP Input Status 12"]
928 #[inline(always)]
929 pub fn wkupis12(&self) -> Wkupis12R {
930 Wkupis12R::new(((self.bits >> 28) & 1) != 0)
931 }
932 #[doc = "Bit 29 - WKUP Input Status 13"]
933 #[inline(always)]
934 pub fn wkupis13(&self) -> Wkupis13R {
935 Wkupis13R::new(((self.bits >> 29) & 1) != 0)
936 }
937 #[doc = "Bit 30 - WKUP Input Status 14"]
938 #[inline(always)]
939 pub fn wkupis14(&self) -> Wkupis14R {
940 Wkupis14R::new(((self.bits >> 30) & 1) != 0)
941 }
942 #[doc = "Bit 31 - WKUP Input Status 15"]
943 #[inline(always)]
944 pub fn wkupis15(&self) -> Wkupis15R {
945 Wkupis15R::new(((self.bits >> 31) & 1) != 0)
946 }
947}
948#[doc = "Supply Controller Status Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`sr::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
949pub struct SrSpec;
950impl crate::RegisterSpec for SrSpec {
951 type Ux = u32;
952}
953#[doc = "`read()` method returns [`sr::R`](R) reader structure"]
954impl crate::Readable for SrSpec {}
955#[doc = "`reset()` method sets SR to value 0x0800"]
956impl crate::Resettable for SrSpec {
957 const RESET_VALUE: u32 = 0x0800;
958}