1#[doc = r" Value read from the register"]
2pub struct R {
3 bits: u32,
4}
5#[doc = r" Value to write to the register"]
6pub struct W {
7 bits: u32,
8}
9impl super::SHCSR {
10 #[doc = r" Modifies the contents of the register"]
11 #[inline]
12 pub fn modify<F>(&self, f: F)
13 where
14 for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
15 {
16 let bits = self.register.get();
17 let r = R { bits: bits };
18 let mut w = W { bits: bits };
19 f(&r, &mut w);
20 self.register.set(w.bits);
21 }
22 #[doc = r" Reads the contents of the register"]
23 #[inline]
24 pub fn read(&self) -> R {
25 R {
26 bits: self.register.get(),
27 }
28 }
29 #[doc = r" Writes to the register"]
30 #[inline]
31 pub fn write<F>(&self, f: F)
32 where
33 F: FnOnce(&mut W) -> &mut W,
34 {
35 let mut w = W::reset_value();
36 f(&mut w);
37 self.register.set(w.bits);
38 }
39 #[doc = r" Writes the reset value to the register"]
40 #[inline]
41 pub fn reset(&self) {
42 self.write(|w| w)
43 }
44}
45#[doc = r" Value of the field"]
46pub struct RESERVED19R {
47 bits: u16,
48}
49impl RESERVED19R {
50 #[doc = r" Value of the field as raw bits"]
51 #[inline]
52 pub fn bits(&self) -> u16 {
53 self.bits
54 }
55}
56#[doc = "Possible values of the field `USGFAULTENA`"]
57#[derive(Clone, Copy, Debug, PartialEq)]
58pub enum USGFAULTENAR {
59 #[doc = "Exception enabled"]
60 EN,
61 #[doc = "Exception disabled"]
62 DIS,
63}
64impl USGFAULTENAR {
65 #[doc = r" Returns `true` if the bit is clear (0)"]
66 #[inline]
67 pub fn bit_is_clear(&self) -> bool {
68 !self.bit()
69 }
70 #[doc = r" Returns `true` if the bit is set (1)"]
71 #[inline]
72 pub fn bit_is_set(&self) -> bool {
73 self.bit()
74 }
75 #[doc = r" Value of the field as raw bits"]
76 #[inline]
77 pub fn bit(&self) -> bool {
78 match *self {
79 USGFAULTENAR::EN => true,
80 USGFAULTENAR::DIS => false,
81 }
82 }
83 #[allow(missing_docs)]
84 #[doc(hidden)]
85 #[inline]
86 pub fn _from(value: bool) -> USGFAULTENAR {
87 match value {
88 true => USGFAULTENAR::EN,
89 false => USGFAULTENAR::DIS,
90 }
91 }
92 #[doc = "Checks if the value of the field is `EN`"]
93 #[inline]
94 pub fn is_en(&self) -> bool {
95 *self == USGFAULTENAR::EN
96 }
97 #[doc = "Checks if the value of the field is `DIS`"]
98 #[inline]
99 pub fn is_dis(&self) -> bool {
100 *self == USGFAULTENAR::DIS
101 }
102}
103#[doc = "Possible values of the field `BUSFAULTENA`"]
104#[derive(Clone, Copy, Debug, PartialEq)]
105pub enum BUSFAULTENAR {
106 #[doc = "Exception enabled"]
107 EN,
108 #[doc = "Exception disabled"]
109 DIS,
110}
111impl BUSFAULTENAR {
112 #[doc = r" Returns `true` if the bit is clear (0)"]
113 #[inline]
114 pub fn bit_is_clear(&self) -> bool {
115 !self.bit()
116 }
117 #[doc = r" Returns `true` if the bit is set (1)"]
118 #[inline]
119 pub fn bit_is_set(&self) -> bool {
120 self.bit()
121 }
122 #[doc = r" Value of the field as raw bits"]
123 #[inline]
124 pub fn bit(&self) -> bool {
125 match *self {
126 BUSFAULTENAR::EN => true,
127 BUSFAULTENAR::DIS => false,
128 }
129 }
130 #[allow(missing_docs)]
131 #[doc(hidden)]
132 #[inline]
133 pub fn _from(value: bool) -> BUSFAULTENAR {
134 match value {
135 true => BUSFAULTENAR::EN,
136 false => BUSFAULTENAR::DIS,
137 }
138 }
139 #[doc = "Checks if the value of the field is `EN`"]
140 #[inline]
141 pub fn is_en(&self) -> bool {
142 *self == BUSFAULTENAR::EN
143 }
144 #[doc = "Checks if the value of the field is `DIS`"]
145 #[inline]
146 pub fn is_dis(&self) -> bool {
147 *self == BUSFAULTENAR::DIS
148 }
149}
150#[doc = "Possible values of the field `MEMFAULTENA`"]
151#[derive(Clone, Copy, Debug, PartialEq)]
152pub enum MEMFAULTENAR {
153 #[doc = "Exception enabled"]
154 EN,
155 #[doc = "Exception disabled"]
156 DIS,
157}
158impl MEMFAULTENAR {
159 #[doc = r" Returns `true` if the bit is clear (0)"]
160 #[inline]
161 pub fn bit_is_clear(&self) -> bool {
162 !self.bit()
163 }
164 #[doc = r" Returns `true` if the bit is set (1)"]
165 #[inline]
166 pub fn bit_is_set(&self) -> bool {
167 self.bit()
168 }
169 #[doc = r" Value of the field as raw bits"]
170 #[inline]
171 pub fn bit(&self) -> bool {
172 match *self {
173 MEMFAULTENAR::EN => true,
174 MEMFAULTENAR::DIS => false,
175 }
176 }
177 #[allow(missing_docs)]
178 #[doc(hidden)]
179 #[inline]
180 pub fn _from(value: bool) -> MEMFAULTENAR {
181 match value {
182 true => MEMFAULTENAR::EN,
183 false => MEMFAULTENAR::DIS,
184 }
185 }
186 #[doc = "Checks if the value of the field is `EN`"]
187 #[inline]
188 pub fn is_en(&self) -> bool {
189 *self == MEMFAULTENAR::EN
190 }
191 #[doc = "Checks if the value of the field is `DIS`"]
192 #[inline]
193 pub fn is_dis(&self) -> bool {
194 *self == MEMFAULTENAR::DIS
195 }
196}
197#[doc = "Possible values of the field `SVCALLPENDED`"]
198#[derive(Clone, Copy, Debug, PartialEq)]
199pub enum SVCALLPENDEDR {
200 #[doc = "Exception is pending."]
201 PENDING,
202 #[doc = "Exception is not active"]
203 NOTPENDING,
204}
205impl SVCALLPENDEDR {
206 #[doc = r" Returns `true` if the bit is clear (0)"]
207 #[inline]
208 pub fn bit_is_clear(&self) -> bool {
209 !self.bit()
210 }
211 #[doc = r" Returns `true` if the bit is set (1)"]
212 #[inline]
213 pub fn bit_is_set(&self) -> bool {
214 self.bit()
215 }
216 #[doc = r" Value of the field as raw bits"]
217 #[inline]
218 pub fn bit(&self) -> bool {
219 match *self {
220 SVCALLPENDEDR::PENDING => true,
221 SVCALLPENDEDR::NOTPENDING => false,
222 }
223 }
224 #[allow(missing_docs)]
225 #[doc(hidden)]
226 #[inline]
227 pub fn _from(value: bool) -> SVCALLPENDEDR {
228 match value {
229 true => SVCALLPENDEDR::PENDING,
230 false => SVCALLPENDEDR::NOTPENDING,
231 }
232 }
233 #[doc = "Checks if the value of the field is `PENDING`"]
234 #[inline]
235 pub fn is_pending(&self) -> bool {
236 *self == SVCALLPENDEDR::PENDING
237 }
238 #[doc = "Checks if the value of the field is `NOTPENDING`"]
239 #[inline]
240 pub fn is_notpending(&self) -> bool {
241 *self == SVCALLPENDEDR::NOTPENDING
242 }
243}
244#[doc = "Possible values of the field `BUSFAULTPENDED`"]
245#[derive(Clone, Copy, Debug, PartialEq)]
246pub enum BUSFAULTPENDEDR {
247 #[doc = "Exception is pending."]
248 PENDING,
249 #[doc = "Exception is not active"]
250 NOTPENDING,
251}
252impl BUSFAULTPENDEDR {
253 #[doc = r" Returns `true` if the bit is clear (0)"]
254 #[inline]
255 pub fn bit_is_clear(&self) -> bool {
256 !self.bit()
257 }
258 #[doc = r" Returns `true` if the bit is set (1)"]
259 #[inline]
260 pub fn bit_is_set(&self) -> bool {
261 self.bit()
262 }
263 #[doc = r" Value of the field as raw bits"]
264 #[inline]
265 pub fn bit(&self) -> bool {
266 match *self {
267 BUSFAULTPENDEDR::PENDING => true,
268 BUSFAULTPENDEDR::NOTPENDING => false,
269 }
270 }
271 #[allow(missing_docs)]
272 #[doc(hidden)]
273 #[inline]
274 pub fn _from(value: bool) -> BUSFAULTPENDEDR {
275 match value {
276 true => BUSFAULTPENDEDR::PENDING,
277 false => BUSFAULTPENDEDR::NOTPENDING,
278 }
279 }
280 #[doc = "Checks if the value of the field is `PENDING`"]
281 #[inline]
282 pub fn is_pending(&self) -> bool {
283 *self == BUSFAULTPENDEDR::PENDING
284 }
285 #[doc = "Checks if the value of the field is `NOTPENDING`"]
286 #[inline]
287 pub fn is_notpending(&self) -> bool {
288 *self == BUSFAULTPENDEDR::NOTPENDING
289 }
290}
291#[doc = "Possible values of the field `MEMFAULTPENDED`"]
292#[derive(Clone, Copy, Debug, PartialEq)]
293pub enum MEMFAULTPENDEDR {
294 #[doc = "Exception is pending."]
295 PENDING,
296 #[doc = "Exception is not active"]
297 NOTPENDING,
298}
299impl MEMFAULTPENDEDR {
300 #[doc = r" Returns `true` if the bit is clear (0)"]
301 #[inline]
302 pub fn bit_is_clear(&self) -> bool {
303 !self.bit()
304 }
305 #[doc = r" Returns `true` if the bit is set (1)"]
306 #[inline]
307 pub fn bit_is_set(&self) -> bool {
308 self.bit()
309 }
310 #[doc = r" Value of the field as raw bits"]
311 #[inline]
312 pub fn bit(&self) -> bool {
313 match *self {
314 MEMFAULTPENDEDR::PENDING => true,
315 MEMFAULTPENDEDR::NOTPENDING => false,
316 }
317 }
318 #[allow(missing_docs)]
319 #[doc(hidden)]
320 #[inline]
321 pub fn _from(value: bool) -> MEMFAULTPENDEDR {
322 match value {
323 true => MEMFAULTPENDEDR::PENDING,
324 false => MEMFAULTPENDEDR::NOTPENDING,
325 }
326 }
327 #[doc = "Checks if the value of the field is `PENDING`"]
328 #[inline]
329 pub fn is_pending(&self) -> bool {
330 *self == MEMFAULTPENDEDR::PENDING
331 }
332 #[doc = "Checks if the value of the field is `NOTPENDING`"]
333 #[inline]
334 pub fn is_notpending(&self) -> bool {
335 *self == MEMFAULTPENDEDR::NOTPENDING
336 }
337}
338#[doc = "Possible values of the field `USGFAULTPENDED`"]
339#[derive(Clone, Copy, Debug, PartialEq)]
340pub enum USGFAULTPENDEDR {
341 #[doc = "Exception is pending."]
342 PENDING,
343 #[doc = "Exception is not active"]
344 NOTPENDING,
345}
346impl USGFAULTPENDEDR {
347 #[doc = r" Returns `true` if the bit is clear (0)"]
348 #[inline]
349 pub fn bit_is_clear(&self) -> bool {
350 !self.bit()
351 }
352 #[doc = r" Returns `true` if the bit is set (1)"]
353 #[inline]
354 pub fn bit_is_set(&self) -> bool {
355 self.bit()
356 }
357 #[doc = r" Value of the field as raw bits"]
358 #[inline]
359 pub fn bit(&self) -> bool {
360 match *self {
361 USGFAULTPENDEDR::PENDING => true,
362 USGFAULTPENDEDR::NOTPENDING => false,
363 }
364 }
365 #[allow(missing_docs)]
366 #[doc(hidden)]
367 #[inline]
368 pub fn _from(value: bool) -> USGFAULTPENDEDR {
369 match value {
370 true => USGFAULTPENDEDR::PENDING,
371 false => USGFAULTPENDEDR::NOTPENDING,
372 }
373 }
374 #[doc = "Checks if the value of the field is `PENDING`"]
375 #[inline]
376 pub fn is_pending(&self) -> bool {
377 *self == USGFAULTPENDEDR::PENDING
378 }
379 #[doc = "Checks if the value of the field is `NOTPENDING`"]
380 #[inline]
381 pub fn is_notpending(&self) -> bool {
382 *self == USGFAULTPENDEDR::NOTPENDING
383 }
384}
385#[doc = "Possible values of the field `SYSTICKACT`"]
386#[derive(Clone, Copy, Debug, PartialEq)]
387pub enum SYSTICKACTR {
388 #[doc = "Exception is active"]
389 ACTIVE,
390 #[doc = "Exception is not active"]
391 NOTACTIVE,
392}
393impl SYSTICKACTR {
394 #[doc = r" Returns `true` if the bit is clear (0)"]
395 #[inline]
396 pub fn bit_is_clear(&self) -> bool {
397 !self.bit()
398 }
399 #[doc = r" Returns `true` if the bit is set (1)"]
400 #[inline]
401 pub fn bit_is_set(&self) -> bool {
402 self.bit()
403 }
404 #[doc = r" Value of the field as raw bits"]
405 #[inline]
406 pub fn bit(&self) -> bool {
407 match *self {
408 SYSTICKACTR::ACTIVE => true,
409 SYSTICKACTR::NOTACTIVE => false,
410 }
411 }
412 #[allow(missing_docs)]
413 #[doc(hidden)]
414 #[inline]
415 pub fn _from(value: bool) -> SYSTICKACTR {
416 match value {
417 true => SYSTICKACTR::ACTIVE,
418 false => SYSTICKACTR::NOTACTIVE,
419 }
420 }
421 #[doc = "Checks if the value of the field is `ACTIVE`"]
422 #[inline]
423 pub fn is_active(&self) -> bool {
424 *self == SYSTICKACTR::ACTIVE
425 }
426 #[doc = "Checks if the value of the field is `NOTACTIVE`"]
427 #[inline]
428 pub fn is_notactive(&self) -> bool {
429 *self == SYSTICKACTR::NOTACTIVE
430 }
431}
432#[doc = r" Value of the field"]
433pub struct PENDSVACTR {
434 bits: bool,
435}
436impl PENDSVACTR {
437 #[doc = r" Value of the field as raw bits"]
438 #[inline]
439 pub fn bit(&self) -> bool {
440 self.bits
441 }
442 #[doc = r" Returns `true` if the bit is clear (0)"]
443 #[inline]
444 pub fn bit_is_clear(&self) -> bool {
445 !self.bit()
446 }
447 #[doc = r" Returns `true` if the bit is set (1)"]
448 #[inline]
449 pub fn bit_is_set(&self) -> bool {
450 self.bit()
451 }
452}
453#[doc = r" Value of the field"]
454pub struct RESERVED9R {
455 bits: bool,
456}
457impl RESERVED9R {
458 #[doc = r" Value of the field as raw bits"]
459 #[inline]
460 pub fn bit(&self) -> bool {
461 self.bits
462 }
463 #[doc = r" Returns `true` if the bit is clear (0)"]
464 #[inline]
465 pub fn bit_is_clear(&self) -> bool {
466 !self.bit()
467 }
468 #[doc = r" Returns `true` if the bit is set (1)"]
469 #[inline]
470 pub fn bit_is_set(&self) -> bool {
471 self.bit()
472 }
473}
474#[doc = "Possible values of the field `MONITORACT`"]
475#[derive(Clone, Copy, Debug, PartialEq)]
476pub enum MONITORACTR {
477 #[doc = "Exception is active"]
478 ACTIVE,
479 #[doc = "Exception is not active"]
480 NOTACTIVE,
481}
482impl MONITORACTR {
483 #[doc = r" Returns `true` if the bit is clear (0)"]
484 #[inline]
485 pub fn bit_is_clear(&self) -> bool {
486 !self.bit()
487 }
488 #[doc = r" Returns `true` if the bit is set (1)"]
489 #[inline]
490 pub fn bit_is_set(&self) -> bool {
491 self.bit()
492 }
493 #[doc = r" Value of the field as raw bits"]
494 #[inline]
495 pub fn bit(&self) -> bool {
496 match *self {
497 MONITORACTR::ACTIVE => true,
498 MONITORACTR::NOTACTIVE => false,
499 }
500 }
501 #[allow(missing_docs)]
502 #[doc(hidden)]
503 #[inline]
504 pub fn _from(value: bool) -> MONITORACTR {
505 match value {
506 true => MONITORACTR::ACTIVE,
507 false => MONITORACTR::NOTACTIVE,
508 }
509 }
510 #[doc = "Checks if the value of the field is `ACTIVE`"]
511 #[inline]
512 pub fn is_active(&self) -> bool {
513 *self == MONITORACTR::ACTIVE
514 }
515 #[doc = "Checks if the value of the field is `NOTACTIVE`"]
516 #[inline]
517 pub fn is_notactive(&self) -> bool {
518 *self == MONITORACTR::NOTACTIVE
519 }
520}
521#[doc = "Possible values of the field `SVCALLACT`"]
522#[derive(Clone, Copy, Debug, PartialEq)]
523pub enum SVCALLACTR {
524 #[doc = "Exception is active"]
525 ACTIVE,
526 #[doc = "Exception is not active"]
527 NOTACTIVE,
528}
529impl SVCALLACTR {
530 #[doc = r" Returns `true` if the bit is clear (0)"]
531 #[inline]
532 pub fn bit_is_clear(&self) -> bool {
533 !self.bit()
534 }
535 #[doc = r" Returns `true` if the bit is set (1)"]
536 #[inline]
537 pub fn bit_is_set(&self) -> bool {
538 self.bit()
539 }
540 #[doc = r" Value of the field as raw bits"]
541 #[inline]
542 pub fn bit(&self) -> bool {
543 match *self {
544 SVCALLACTR::ACTIVE => true,
545 SVCALLACTR::NOTACTIVE => false,
546 }
547 }
548 #[allow(missing_docs)]
549 #[doc(hidden)]
550 #[inline]
551 pub fn _from(value: bool) -> SVCALLACTR {
552 match value {
553 true => SVCALLACTR::ACTIVE,
554 false => SVCALLACTR::NOTACTIVE,
555 }
556 }
557 #[doc = "Checks if the value of the field is `ACTIVE`"]
558 #[inline]
559 pub fn is_active(&self) -> bool {
560 *self == SVCALLACTR::ACTIVE
561 }
562 #[doc = "Checks if the value of the field is `NOTACTIVE`"]
563 #[inline]
564 pub fn is_notactive(&self) -> bool {
565 *self == SVCALLACTR::NOTACTIVE
566 }
567}
568#[doc = r" Value of the field"]
569pub struct RESERVED4R {
570 bits: u8,
571}
572impl RESERVED4R {
573 #[doc = r" Value of the field as raw bits"]
574 #[inline]
575 pub fn bits(&self) -> u8 {
576 self.bits
577 }
578}
579#[doc = "Possible values of the field `USGFAULTACT`"]
580#[derive(Clone, Copy, Debug, PartialEq)]
581pub enum USGFAULTACTR {
582 #[doc = "Exception is active"]
583 ACTIVE,
584 #[doc = "Exception is not active"]
585 NOTACTIVE,
586}
587impl USGFAULTACTR {
588 #[doc = r" Returns `true` if the bit is clear (0)"]
589 #[inline]
590 pub fn bit_is_clear(&self) -> bool {
591 !self.bit()
592 }
593 #[doc = r" Returns `true` if the bit is set (1)"]
594 #[inline]
595 pub fn bit_is_set(&self) -> bool {
596 self.bit()
597 }
598 #[doc = r" Value of the field as raw bits"]
599 #[inline]
600 pub fn bit(&self) -> bool {
601 match *self {
602 USGFAULTACTR::ACTIVE => true,
603 USGFAULTACTR::NOTACTIVE => false,
604 }
605 }
606 #[allow(missing_docs)]
607 #[doc(hidden)]
608 #[inline]
609 pub fn _from(value: bool) -> USGFAULTACTR {
610 match value {
611 true => USGFAULTACTR::ACTIVE,
612 false => USGFAULTACTR::NOTACTIVE,
613 }
614 }
615 #[doc = "Checks if the value of the field is `ACTIVE`"]
616 #[inline]
617 pub fn is_active(&self) -> bool {
618 *self == USGFAULTACTR::ACTIVE
619 }
620 #[doc = "Checks if the value of the field is `NOTACTIVE`"]
621 #[inline]
622 pub fn is_notactive(&self) -> bool {
623 *self == USGFAULTACTR::NOTACTIVE
624 }
625}
626#[doc = r" Value of the field"]
627pub struct RESERVED2R {
628 bits: bool,
629}
630impl RESERVED2R {
631 #[doc = r" Value of the field as raw bits"]
632 #[inline]
633 pub fn bit(&self) -> bool {
634 self.bits
635 }
636 #[doc = r" Returns `true` if the bit is clear (0)"]
637 #[inline]
638 pub fn bit_is_clear(&self) -> bool {
639 !self.bit()
640 }
641 #[doc = r" Returns `true` if the bit is set (1)"]
642 #[inline]
643 pub fn bit_is_set(&self) -> bool {
644 self.bit()
645 }
646}
647#[doc = "Possible values of the field `BUSFAULTACT`"]
648#[derive(Clone, Copy, Debug, PartialEq)]
649pub enum BUSFAULTACTR {
650 #[doc = "Exception is active"]
651 ACTIVE,
652 #[doc = "Exception is not active"]
653 NOTACTIVE,
654}
655impl BUSFAULTACTR {
656 #[doc = r" Returns `true` if the bit is clear (0)"]
657 #[inline]
658 pub fn bit_is_clear(&self) -> bool {
659 !self.bit()
660 }
661 #[doc = r" Returns `true` if the bit is set (1)"]
662 #[inline]
663 pub fn bit_is_set(&self) -> bool {
664 self.bit()
665 }
666 #[doc = r" Value of the field as raw bits"]
667 #[inline]
668 pub fn bit(&self) -> bool {
669 match *self {
670 BUSFAULTACTR::ACTIVE => true,
671 BUSFAULTACTR::NOTACTIVE => false,
672 }
673 }
674 #[allow(missing_docs)]
675 #[doc(hidden)]
676 #[inline]
677 pub fn _from(value: bool) -> BUSFAULTACTR {
678 match value {
679 true => BUSFAULTACTR::ACTIVE,
680 false => BUSFAULTACTR::NOTACTIVE,
681 }
682 }
683 #[doc = "Checks if the value of the field is `ACTIVE`"]
684 #[inline]
685 pub fn is_active(&self) -> bool {
686 *self == BUSFAULTACTR::ACTIVE
687 }
688 #[doc = "Checks if the value of the field is `NOTACTIVE`"]
689 #[inline]
690 pub fn is_notactive(&self) -> bool {
691 *self == BUSFAULTACTR::NOTACTIVE
692 }
693}
694#[doc = "Possible values of the field `MEMFAULTACT`"]
695#[derive(Clone, Copy, Debug, PartialEq)]
696pub enum MEMFAULTACTR {
697 #[doc = "Exception is active"]
698 ACTIVE,
699 #[doc = "Exception is not active"]
700 NOTACTIVE,
701}
702impl MEMFAULTACTR {
703 #[doc = r" Returns `true` if the bit is clear (0)"]
704 #[inline]
705 pub fn bit_is_clear(&self) -> bool {
706 !self.bit()
707 }
708 #[doc = r" Returns `true` if the bit is set (1)"]
709 #[inline]
710 pub fn bit_is_set(&self) -> bool {
711 self.bit()
712 }
713 #[doc = r" Value of the field as raw bits"]
714 #[inline]
715 pub fn bit(&self) -> bool {
716 match *self {
717 MEMFAULTACTR::ACTIVE => true,
718 MEMFAULTACTR::NOTACTIVE => false,
719 }
720 }
721 #[allow(missing_docs)]
722 #[doc(hidden)]
723 #[inline]
724 pub fn _from(value: bool) -> MEMFAULTACTR {
725 match value {
726 true => MEMFAULTACTR::ACTIVE,
727 false => MEMFAULTACTR::NOTACTIVE,
728 }
729 }
730 #[doc = "Checks if the value of the field is `ACTIVE`"]
731 #[inline]
732 pub fn is_active(&self) -> bool {
733 *self == MEMFAULTACTR::ACTIVE
734 }
735 #[doc = "Checks if the value of the field is `NOTACTIVE`"]
736 #[inline]
737 pub fn is_notactive(&self) -> bool {
738 *self == MEMFAULTACTR::NOTACTIVE
739 }
740}
741#[doc = r" Proxy"]
742pub struct _RESERVED19W<'a> {
743 w: &'a mut W,
744}
745impl<'a> _RESERVED19W<'a> {
746 #[doc = r" Writes raw bits to the field"]
747 #[inline]
748 pub unsafe fn bits(self, value: u16) -> &'a mut W {
749 const MASK: u16 = 8191;
750 const OFFSET: u8 = 19;
751 self.w.bits &= !((MASK as u32) << OFFSET);
752 self.w.bits |= ((value & MASK) as u32) << OFFSET;
753 self.w
754 }
755}
756#[doc = "Values that can be written to the field `USGFAULTENA`"]
757pub enum USGFAULTENAW {
758 #[doc = "Exception enabled"]
759 EN,
760 #[doc = "Exception disabled"]
761 DIS,
762}
763impl USGFAULTENAW {
764 #[allow(missing_docs)]
765 #[doc(hidden)]
766 #[inline]
767 pub fn _bits(&self) -> bool {
768 match *self {
769 USGFAULTENAW::EN => true,
770 USGFAULTENAW::DIS => false,
771 }
772 }
773}
774#[doc = r" Proxy"]
775pub struct _USGFAULTENAW<'a> {
776 w: &'a mut W,
777}
778impl<'a> _USGFAULTENAW<'a> {
779 #[doc = r" Writes `variant` to the field"]
780 #[inline]
781 pub fn variant(self, variant: USGFAULTENAW) -> &'a mut W {
782 {
783 self.bit(variant._bits())
784 }
785 }
786 #[doc = "Exception enabled"]
787 #[inline]
788 pub fn en(self) -> &'a mut W {
789 self.variant(USGFAULTENAW::EN)
790 }
791 #[doc = "Exception disabled"]
792 #[inline]
793 pub fn dis(self) -> &'a mut W {
794 self.variant(USGFAULTENAW::DIS)
795 }
796 #[doc = r" Sets the field bit"]
797 pub fn set_bit(self) -> &'a mut W {
798 self.bit(true)
799 }
800 #[doc = r" Clears the field bit"]
801 pub fn clear_bit(self) -> &'a mut W {
802 self.bit(false)
803 }
804 #[doc = r" Writes raw bits to the field"]
805 #[inline]
806 pub fn bit(self, value: bool) -> &'a mut W {
807 const MASK: bool = true;
808 const OFFSET: u8 = 18;
809 self.w.bits &= !((MASK as u32) << OFFSET);
810 self.w.bits |= ((value & MASK) as u32) << OFFSET;
811 self.w
812 }
813}
814#[doc = "Values that can be written to the field `BUSFAULTENA`"]
815pub enum BUSFAULTENAW {
816 #[doc = "Exception enabled"]
817 EN,
818 #[doc = "Exception disabled"]
819 DIS,
820}
821impl BUSFAULTENAW {
822 #[allow(missing_docs)]
823 #[doc(hidden)]
824 #[inline]
825 pub fn _bits(&self) -> bool {
826 match *self {
827 BUSFAULTENAW::EN => true,
828 BUSFAULTENAW::DIS => false,
829 }
830 }
831}
832#[doc = r" Proxy"]
833pub struct _BUSFAULTENAW<'a> {
834 w: &'a mut W,
835}
836impl<'a> _BUSFAULTENAW<'a> {
837 #[doc = r" Writes `variant` to the field"]
838 #[inline]
839 pub fn variant(self, variant: BUSFAULTENAW) -> &'a mut W {
840 {
841 self.bit(variant._bits())
842 }
843 }
844 #[doc = "Exception enabled"]
845 #[inline]
846 pub fn en(self) -> &'a mut W {
847 self.variant(BUSFAULTENAW::EN)
848 }
849 #[doc = "Exception disabled"]
850 #[inline]
851 pub fn dis(self) -> &'a mut W {
852 self.variant(BUSFAULTENAW::DIS)
853 }
854 #[doc = r" Sets the field bit"]
855 pub fn set_bit(self) -> &'a mut W {
856 self.bit(true)
857 }
858 #[doc = r" Clears the field bit"]
859 pub fn clear_bit(self) -> &'a mut W {
860 self.bit(false)
861 }
862 #[doc = r" Writes raw bits to the field"]
863 #[inline]
864 pub fn bit(self, value: bool) -> &'a mut W {
865 const MASK: bool = true;
866 const OFFSET: u8 = 17;
867 self.w.bits &= !((MASK as u32) << OFFSET);
868 self.w.bits |= ((value & MASK) as u32) << OFFSET;
869 self.w
870 }
871}
872#[doc = "Values that can be written to the field `MEMFAULTENA`"]
873pub enum MEMFAULTENAW {
874 #[doc = "Exception enabled"]
875 EN,
876 #[doc = "Exception disabled"]
877 DIS,
878}
879impl MEMFAULTENAW {
880 #[allow(missing_docs)]
881 #[doc(hidden)]
882 #[inline]
883 pub fn _bits(&self) -> bool {
884 match *self {
885 MEMFAULTENAW::EN => true,
886 MEMFAULTENAW::DIS => false,
887 }
888 }
889}
890#[doc = r" Proxy"]
891pub struct _MEMFAULTENAW<'a> {
892 w: &'a mut W,
893}
894impl<'a> _MEMFAULTENAW<'a> {
895 #[doc = r" Writes `variant` to the field"]
896 #[inline]
897 pub fn variant(self, variant: MEMFAULTENAW) -> &'a mut W {
898 {
899 self.bit(variant._bits())
900 }
901 }
902 #[doc = "Exception enabled"]
903 #[inline]
904 pub fn en(self) -> &'a mut W {
905 self.variant(MEMFAULTENAW::EN)
906 }
907 #[doc = "Exception disabled"]
908 #[inline]
909 pub fn dis(self) -> &'a mut W {
910 self.variant(MEMFAULTENAW::DIS)
911 }
912 #[doc = r" Sets the field bit"]
913 pub fn set_bit(self) -> &'a mut W {
914 self.bit(true)
915 }
916 #[doc = r" Clears the field bit"]
917 pub fn clear_bit(self) -> &'a mut W {
918 self.bit(false)
919 }
920 #[doc = r" Writes raw bits to the field"]
921 #[inline]
922 pub fn bit(self, value: bool) -> &'a mut W {
923 const MASK: bool = true;
924 const OFFSET: u8 = 16;
925 self.w.bits &= !((MASK as u32) << OFFSET);
926 self.w.bits |= ((value & MASK) as u32) << OFFSET;
927 self.w
928 }
929}
930#[doc = "Values that can be written to the field `SVCALLPENDED`"]
931pub enum SVCALLPENDEDW {
932 #[doc = "Exception is pending."]
933 PENDING,
934 #[doc = "Exception is not active"]
935 NOTPENDING,
936}
937impl SVCALLPENDEDW {
938 #[allow(missing_docs)]
939 #[doc(hidden)]
940 #[inline]
941 pub fn _bits(&self) -> bool {
942 match *self {
943 SVCALLPENDEDW::PENDING => true,
944 SVCALLPENDEDW::NOTPENDING => false,
945 }
946 }
947}
948#[doc = r" Proxy"]
949pub struct _SVCALLPENDEDW<'a> {
950 w: &'a mut W,
951}
952impl<'a> _SVCALLPENDEDW<'a> {
953 #[doc = r" Writes `variant` to the field"]
954 #[inline]
955 pub fn variant(self, variant: SVCALLPENDEDW) -> &'a mut W {
956 {
957 self.bit(variant._bits())
958 }
959 }
960 #[doc = "Exception is pending."]
961 #[inline]
962 pub fn pending(self) -> &'a mut W {
963 self.variant(SVCALLPENDEDW::PENDING)
964 }
965 #[doc = "Exception is not active"]
966 #[inline]
967 pub fn notpending(self) -> &'a mut W {
968 self.variant(SVCALLPENDEDW::NOTPENDING)
969 }
970 #[doc = r" Sets the field bit"]
971 pub fn set_bit(self) -> &'a mut W {
972 self.bit(true)
973 }
974 #[doc = r" Clears the field bit"]
975 pub fn clear_bit(self) -> &'a mut W {
976 self.bit(false)
977 }
978 #[doc = r" Writes raw bits to the field"]
979 #[inline]
980 pub fn bit(self, value: bool) -> &'a mut W {
981 const MASK: bool = true;
982 const OFFSET: u8 = 15;
983 self.w.bits &= !((MASK as u32) << OFFSET);
984 self.w.bits |= ((value & MASK) as u32) << OFFSET;
985 self.w
986 }
987}
988#[doc = "Values that can be written to the field `BUSFAULTPENDED`"]
989pub enum BUSFAULTPENDEDW {
990 #[doc = "Exception is pending."]
991 PENDING,
992 #[doc = "Exception is not active"]
993 NOTPENDING,
994}
995impl BUSFAULTPENDEDW {
996 #[allow(missing_docs)]
997 #[doc(hidden)]
998 #[inline]
999 pub fn _bits(&self) -> bool {
1000 match *self {
1001 BUSFAULTPENDEDW::PENDING => true,
1002 BUSFAULTPENDEDW::NOTPENDING => false,
1003 }
1004 }
1005}
1006#[doc = r" Proxy"]
1007pub struct _BUSFAULTPENDEDW<'a> {
1008 w: &'a mut W,
1009}
1010impl<'a> _BUSFAULTPENDEDW<'a> {
1011 #[doc = r" Writes `variant` to the field"]
1012 #[inline]
1013 pub fn variant(self, variant: BUSFAULTPENDEDW) -> &'a mut W {
1014 {
1015 self.bit(variant._bits())
1016 }
1017 }
1018 #[doc = "Exception is pending."]
1019 #[inline]
1020 pub fn pending(self) -> &'a mut W {
1021 self.variant(BUSFAULTPENDEDW::PENDING)
1022 }
1023 #[doc = "Exception is not active"]
1024 #[inline]
1025 pub fn notpending(self) -> &'a mut W {
1026 self.variant(BUSFAULTPENDEDW::NOTPENDING)
1027 }
1028 #[doc = r" Sets the field bit"]
1029 pub fn set_bit(self) -> &'a mut W {
1030 self.bit(true)
1031 }
1032 #[doc = r" Clears the field bit"]
1033 pub fn clear_bit(self) -> &'a mut W {
1034 self.bit(false)
1035 }
1036 #[doc = r" Writes raw bits to the field"]
1037 #[inline]
1038 pub fn bit(self, value: bool) -> &'a mut W {
1039 const MASK: bool = true;
1040 const OFFSET: u8 = 14;
1041 self.w.bits &= !((MASK as u32) << OFFSET);
1042 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1043 self.w
1044 }
1045}
1046#[doc = "Values that can be written to the field `MEMFAULTPENDED`"]
1047pub enum MEMFAULTPENDEDW {
1048 #[doc = "Exception is pending."]
1049 PENDING,
1050 #[doc = "Exception is not active"]
1051 NOTPENDING,
1052}
1053impl MEMFAULTPENDEDW {
1054 #[allow(missing_docs)]
1055 #[doc(hidden)]
1056 #[inline]
1057 pub fn _bits(&self) -> bool {
1058 match *self {
1059 MEMFAULTPENDEDW::PENDING => true,
1060 MEMFAULTPENDEDW::NOTPENDING => false,
1061 }
1062 }
1063}
1064#[doc = r" Proxy"]
1065pub struct _MEMFAULTPENDEDW<'a> {
1066 w: &'a mut W,
1067}
1068impl<'a> _MEMFAULTPENDEDW<'a> {
1069 #[doc = r" Writes `variant` to the field"]
1070 #[inline]
1071 pub fn variant(self, variant: MEMFAULTPENDEDW) -> &'a mut W {
1072 {
1073 self.bit(variant._bits())
1074 }
1075 }
1076 #[doc = "Exception is pending."]
1077 #[inline]
1078 pub fn pending(self) -> &'a mut W {
1079 self.variant(MEMFAULTPENDEDW::PENDING)
1080 }
1081 #[doc = "Exception is not active"]
1082 #[inline]
1083 pub fn notpending(self) -> &'a mut W {
1084 self.variant(MEMFAULTPENDEDW::NOTPENDING)
1085 }
1086 #[doc = r" Sets the field bit"]
1087 pub fn set_bit(self) -> &'a mut W {
1088 self.bit(true)
1089 }
1090 #[doc = r" Clears the field bit"]
1091 pub fn clear_bit(self) -> &'a mut W {
1092 self.bit(false)
1093 }
1094 #[doc = r" Writes raw bits to the field"]
1095 #[inline]
1096 pub fn bit(self, value: bool) -> &'a mut W {
1097 const MASK: bool = true;
1098 const OFFSET: u8 = 13;
1099 self.w.bits &= !((MASK as u32) << OFFSET);
1100 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1101 self.w
1102 }
1103}
1104#[doc = "Values that can be written to the field `USGFAULTPENDED`"]
1105pub enum USGFAULTPENDEDW {
1106 #[doc = "Exception is pending."]
1107 PENDING,
1108 #[doc = "Exception is not active"]
1109 NOTPENDING,
1110}
1111impl USGFAULTPENDEDW {
1112 #[allow(missing_docs)]
1113 #[doc(hidden)]
1114 #[inline]
1115 pub fn _bits(&self) -> bool {
1116 match *self {
1117 USGFAULTPENDEDW::PENDING => true,
1118 USGFAULTPENDEDW::NOTPENDING => false,
1119 }
1120 }
1121}
1122#[doc = r" Proxy"]
1123pub struct _USGFAULTPENDEDW<'a> {
1124 w: &'a mut W,
1125}
1126impl<'a> _USGFAULTPENDEDW<'a> {
1127 #[doc = r" Writes `variant` to the field"]
1128 #[inline]
1129 pub fn variant(self, variant: USGFAULTPENDEDW) -> &'a mut W {
1130 {
1131 self.bit(variant._bits())
1132 }
1133 }
1134 #[doc = "Exception is pending."]
1135 #[inline]
1136 pub fn pending(self) -> &'a mut W {
1137 self.variant(USGFAULTPENDEDW::PENDING)
1138 }
1139 #[doc = "Exception is not active"]
1140 #[inline]
1141 pub fn notpending(self) -> &'a mut W {
1142 self.variant(USGFAULTPENDEDW::NOTPENDING)
1143 }
1144 #[doc = r" Sets the field bit"]
1145 pub fn set_bit(self) -> &'a mut W {
1146 self.bit(true)
1147 }
1148 #[doc = r" Clears the field bit"]
1149 pub fn clear_bit(self) -> &'a mut W {
1150 self.bit(false)
1151 }
1152 #[doc = r" Writes raw bits to the field"]
1153 #[inline]
1154 pub fn bit(self, value: bool) -> &'a mut W {
1155 const MASK: bool = true;
1156 const OFFSET: u8 = 12;
1157 self.w.bits &= !((MASK as u32) << OFFSET);
1158 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1159 self.w
1160 }
1161}
1162#[doc = "Values that can be written to the field `SYSTICKACT`"]
1163pub enum SYSTICKACTW {
1164 #[doc = "Exception is active"]
1165 ACTIVE,
1166 #[doc = "Exception is not active"]
1167 NOTACTIVE,
1168}
1169impl SYSTICKACTW {
1170 #[allow(missing_docs)]
1171 #[doc(hidden)]
1172 #[inline]
1173 pub fn _bits(&self) -> bool {
1174 match *self {
1175 SYSTICKACTW::ACTIVE => true,
1176 SYSTICKACTW::NOTACTIVE => false,
1177 }
1178 }
1179}
1180#[doc = r" Proxy"]
1181pub struct _SYSTICKACTW<'a> {
1182 w: &'a mut W,
1183}
1184impl<'a> _SYSTICKACTW<'a> {
1185 #[doc = r" Writes `variant` to the field"]
1186 #[inline]
1187 pub fn variant(self, variant: SYSTICKACTW) -> &'a mut W {
1188 {
1189 self.bit(variant._bits())
1190 }
1191 }
1192 #[doc = "Exception is active"]
1193 #[inline]
1194 pub fn active(self) -> &'a mut W {
1195 self.variant(SYSTICKACTW::ACTIVE)
1196 }
1197 #[doc = "Exception is not active"]
1198 #[inline]
1199 pub fn notactive(self) -> &'a mut W {
1200 self.variant(SYSTICKACTW::NOTACTIVE)
1201 }
1202 #[doc = r" Sets the field bit"]
1203 pub fn set_bit(self) -> &'a mut W {
1204 self.bit(true)
1205 }
1206 #[doc = r" Clears the field bit"]
1207 pub fn clear_bit(self) -> &'a mut W {
1208 self.bit(false)
1209 }
1210 #[doc = r" Writes raw bits to the field"]
1211 #[inline]
1212 pub fn bit(self, value: bool) -> &'a mut W {
1213 const MASK: bool = true;
1214 const OFFSET: u8 = 11;
1215 self.w.bits &= !((MASK as u32) << OFFSET);
1216 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1217 self.w
1218 }
1219}
1220#[doc = r" Proxy"]
1221pub struct _PENDSVACTW<'a> {
1222 w: &'a mut W,
1223}
1224impl<'a> _PENDSVACTW<'a> {
1225 #[doc = r" Sets the field bit"]
1226 pub fn set_bit(self) -> &'a mut W {
1227 self.bit(true)
1228 }
1229 #[doc = r" Clears the field bit"]
1230 pub fn clear_bit(self) -> &'a mut W {
1231 self.bit(false)
1232 }
1233 #[doc = r" Writes raw bits to the field"]
1234 #[inline]
1235 pub fn bit(self, value: bool) -> &'a mut W {
1236 const MASK: bool = true;
1237 const OFFSET: u8 = 10;
1238 self.w.bits &= !((MASK as u32) << OFFSET);
1239 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1240 self.w
1241 }
1242}
1243#[doc = r" Proxy"]
1244pub struct _RESERVED9W<'a> {
1245 w: &'a mut W,
1246}
1247impl<'a> _RESERVED9W<'a> {
1248 #[doc = r" Sets the field bit"]
1249 pub fn set_bit(self) -> &'a mut W {
1250 self.bit(true)
1251 }
1252 #[doc = r" Clears the field bit"]
1253 pub fn clear_bit(self) -> &'a mut W {
1254 self.bit(false)
1255 }
1256 #[doc = r" Writes raw bits to the field"]
1257 #[inline]
1258 pub fn bit(self, value: bool) -> &'a mut W {
1259 const MASK: bool = true;
1260 const OFFSET: u8 = 9;
1261 self.w.bits &= !((MASK as u32) << OFFSET);
1262 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1263 self.w
1264 }
1265}
1266#[doc = "Values that can be written to the field `MONITORACT`"]
1267pub enum MONITORACTW {
1268 #[doc = "Exception is active"]
1269 ACTIVE,
1270 #[doc = "Exception is not active"]
1271 NOTACTIVE,
1272}
1273impl MONITORACTW {
1274 #[allow(missing_docs)]
1275 #[doc(hidden)]
1276 #[inline]
1277 pub fn _bits(&self) -> bool {
1278 match *self {
1279 MONITORACTW::ACTIVE => true,
1280 MONITORACTW::NOTACTIVE => false,
1281 }
1282 }
1283}
1284#[doc = r" Proxy"]
1285pub struct _MONITORACTW<'a> {
1286 w: &'a mut W,
1287}
1288impl<'a> _MONITORACTW<'a> {
1289 #[doc = r" Writes `variant` to the field"]
1290 #[inline]
1291 pub fn variant(self, variant: MONITORACTW) -> &'a mut W {
1292 {
1293 self.bit(variant._bits())
1294 }
1295 }
1296 #[doc = "Exception is active"]
1297 #[inline]
1298 pub fn active(self) -> &'a mut W {
1299 self.variant(MONITORACTW::ACTIVE)
1300 }
1301 #[doc = "Exception is not active"]
1302 #[inline]
1303 pub fn notactive(self) -> &'a mut W {
1304 self.variant(MONITORACTW::NOTACTIVE)
1305 }
1306 #[doc = r" Sets the field bit"]
1307 pub fn set_bit(self) -> &'a mut W {
1308 self.bit(true)
1309 }
1310 #[doc = r" Clears the field bit"]
1311 pub fn clear_bit(self) -> &'a mut W {
1312 self.bit(false)
1313 }
1314 #[doc = r" Writes raw bits to the field"]
1315 #[inline]
1316 pub fn bit(self, value: bool) -> &'a mut W {
1317 const MASK: bool = true;
1318 const OFFSET: u8 = 8;
1319 self.w.bits &= !((MASK as u32) << OFFSET);
1320 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1321 self.w
1322 }
1323}
1324#[doc = "Values that can be written to the field `SVCALLACT`"]
1325pub enum SVCALLACTW {
1326 #[doc = "Exception is active"]
1327 ACTIVE,
1328 #[doc = "Exception is not active"]
1329 NOTACTIVE,
1330}
1331impl SVCALLACTW {
1332 #[allow(missing_docs)]
1333 #[doc(hidden)]
1334 #[inline]
1335 pub fn _bits(&self) -> bool {
1336 match *self {
1337 SVCALLACTW::ACTIVE => true,
1338 SVCALLACTW::NOTACTIVE => false,
1339 }
1340 }
1341}
1342#[doc = r" Proxy"]
1343pub struct _SVCALLACTW<'a> {
1344 w: &'a mut W,
1345}
1346impl<'a> _SVCALLACTW<'a> {
1347 #[doc = r" Writes `variant` to the field"]
1348 #[inline]
1349 pub fn variant(self, variant: SVCALLACTW) -> &'a mut W {
1350 {
1351 self.bit(variant._bits())
1352 }
1353 }
1354 #[doc = "Exception is active"]
1355 #[inline]
1356 pub fn active(self) -> &'a mut W {
1357 self.variant(SVCALLACTW::ACTIVE)
1358 }
1359 #[doc = "Exception is not active"]
1360 #[inline]
1361 pub fn notactive(self) -> &'a mut W {
1362 self.variant(SVCALLACTW::NOTACTIVE)
1363 }
1364 #[doc = r" Sets the field bit"]
1365 pub fn set_bit(self) -> &'a mut W {
1366 self.bit(true)
1367 }
1368 #[doc = r" Clears the field bit"]
1369 pub fn clear_bit(self) -> &'a mut W {
1370 self.bit(false)
1371 }
1372 #[doc = r" Writes raw bits to the field"]
1373 #[inline]
1374 pub fn bit(self, value: bool) -> &'a mut W {
1375 const MASK: bool = true;
1376 const OFFSET: u8 = 7;
1377 self.w.bits &= !((MASK as u32) << OFFSET);
1378 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1379 self.w
1380 }
1381}
1382#[doc = r" Proxy"]
1383pub struct _RESERVED4W<'a> {
1384 w: &'a mut W,
1385}
1386impl<'a> _RESERVED4W<'a> {
1387 #[doc = r" Writes raw bits to the field"]
1388 #[inline]
1389 pub unsafe fn bits(self, value: u8) -> &'a mut W {
1390 const MASK: u8 = 7;
1391 const OFFSET: u8 = 4;
1392 self.w.bits &= !((MASK as u32) << OFFSET);
1393 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1394 self.w
1395 }
1396}
1397#[doc = "Values that can be written to the field `USGFAULTACT`"]
1398pub enum USGFAULTACTW {
1399 #[doc = "Exception is active"]
1400 ACTIVE,
1401 #[doc = "Exception is not active"]
1402 NOTACTIVE,
1403}
1404impl USGFAULTACTW {
1405 #[allow(missing_docs)]
1406 #[doc(hidden)]
1407 #[inline]
1408 pub fn _bits(&self) -> bool {
1409 match *self {
1410 USGFAULTACTW::ACTIVE => true,
1411 USGFAULTACTW::NOTACTIVE => false,
1412 }
1413 }
1414}
1415#[doc = r" Proxy"]
1416pub struct _USGFAULTACTW<'a> {
1417 w: &'a mut W,
1418}
1419impl<'a> _USGFAULTACTW<'a> {
1420 #[doc = r" Writes `variant` to the field"]
1421 #[inline]
1422 pub fn variant(self, variant: USGFAULTACTW) -> &'a mut W {
1423 {
1424 self.bit(variant._bits())
1425 }
1426 }
1427 #[doc = "Exception is active"]
1428 #[inline]
1429 pub fn active(self) -> &'a mut W {
1430 self.variant(USGFAULTACTW::ACTIVE)
1431 }
1432 #[doc = "Exception is not active"]
1433 #[inline]
1434 pub fn notactive(self) -> &'a mut W {
1435 self.variant(USGFAULTACTW::NOTACTIVE)
1436 }
1437 #[doc = r" Sets the field bit"]
1438 pub fn set_bit(self) -> &'a mut W {
1439 self.bit(true)
1440 }
1441 #[doc = r" Clears the field bit"]
1442 pub fn clear_bit(self) -> &'a mut W {
1443 self.bit(false)
1444 }
1445 #[doc = r" Writes raw bits to the field"]
1446 #[inline]
1447 pub fn bit(self, value: bool) -> &'a mut W {
1448 const MASK: bool = true;
1449 const OFFSET: u8 = 3;
1450 self.w.bits &= !((MASK as u32) << OFFSET);
1451 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1452 self.w
1453 }
1454}
1455#[doc = r" Proxy"]
1456pub struct _RESERVED2W<'a> {
1457 w: &'a mut W,
1458}
1459impl<'a> _RESERVED2W<'a> {
1460 #[doc = r" Sets the field bit"]
1461 pub fn set_bit(self) -> &'a mut W {
1462 self.bit(true)
1463 }
1464 #[doc = r" Clears the field bit"]
1465 pub fn clear_bit(self) -> &'a mut W {
1466 self.bit(false)
1467 }
1468 #[doc = r" Writes raw bits to the field"]
1469 #[inline]
1470 pub fn bit(self, value: bool) -> &'a mut W {
1471 const MASK: bool = true;
1472 const OFFSET: u8 = 2;
1473 self.w.bits &= !((MASK as u32) << OFFSET);
1474 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1475 self.w
1476 }
1477}
1478#[doc = "Values that can be written to the field `BUSFAULTACT`"]
1479pub enum BUSFAULTACTW {
1480 #[doc = "Exception is active"]
1481 ACTIVE,
1482 #[doc = "Exception is not active"]
1483 NOTACTIVE,
1484}
1485impl BUSFAULTACTW {
1486 #[allow(missing_docs)]
1487 #[doc(hidden)]
1488 #[inline]
1489 pub fn _bits(&self) -> bool {
1490 match *self {
1491 BUSFAULTACTW::ACTIVE => true,
1492 BUSFAULTACTW::NOTACTIVE => false,
1493 }
1494 }
1495}
1496#[doc = r" Proxy"]
1497pub struct _BUSFAULTACTW<'a> {
1498 w: &'a mut W,
1499}
1500impl<'a> _BUSFAULTACTW<'a> {
1501 #[doc = r" Writes `variant` to the field"]
1502 #[inline]
1503 pub fn variant(self, variant: BUSFAULTACTW) -> &'a mut W {
1504 {
1505 self.bit(variant._bits())
1506 }
1507 }
1508 #[doc = "Exception is active"]
1509 #[inline]
1510 pub fn active(self) -> &'a mut W {
1511 self.variant(BUSFAULTACTW::ACTIVE)
1512 }
1513 #[doc = "Exception is not active"]
1514 #[inline]
1515 pub fn notactive(self) -> &'a mut W {
1516 self.variant(BUSFAULTACTW::NOTACTIVE)
1517 }
1518 #[doc = r" Sets the field bit"]
1519 pub fn set_bit(self) -> &'a mut W {
1520 self.bit(true)
1521 }
1522 #[doc = r" Clears the field bit"]
1523 pub fn clear_bit(self) -> &'a mut W {
1524 self.bit(false)
1525 }
1526 #[doc = r" Writes raw bits to the field"]
1527 #[inline]
1528 pub fn bit(self, value: bool) -> &'a mut W {
1529 const MASK: bool = true;
1530 const OFFSET: u8 = 1;
1531 self.w.bits &= !((MASK as u32) << OFFSET);
1532 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1533 self.w
1534 }
1535}
1536#[doc = "Values that can be written to the field `MEMFAULTACT`"]
1537pub enum MEMFAULTACTW {
1538 #[doc = "Exception is active"]
1539 ACTIVE,
1540 #[doc = "Exception is not active"]
1541 NOTACTIVE,
1542}
1543impl MEMFAULTACTW {
1544 #[allow(missing_docs)]
1545 #[doc(hidden)]
1546 #[inline]
1547 pub fn _bits(&self) -> bool {
1548 match *self {
1549 MEMFAULTACTW::ACTIVE => true,
1550 MEMFAULTACTW::NOTACTIVE => false,
1551 }
1552 }
1553}
1554#[doc = r" Proxy"]
1555pub struct _MEMFAULTACTW<'a> {
1556 w: &'a mut W,
1557}
1558impl<'a> _MEMFAULTACTW<'a> {
1559 #[doc = r" Writes `variant` to the field"]
1560 #[inline]
1561 pub fn variant(self, variant: MEMFAULTACTW) -> &'a mut W {
1562 {
1563 self.bit(variant._bits())
1564 }
1565 }
1566 #[doc = "Exception is active"]
1567 #[inline]
1568 pub fn active(self) -> &'a mut W {
1569 self.variant(MEMFAULTACTW::ACTIVE)
1570 }
1571 #[doc = "Exception is not active"]
1572 #[inline]
1573 pub fn notactive(self) -> &'a mut W {
1574 self.variant(MEMFAULTACTW::NOTACTIVE)
1575 }
1576 #[doc = r" Sets the field bit"]
1577 pub fn set_bit(self) -> &'a mut W {
1578 self.bit(true)
1579 }
1580 #[doc = r" Clears the field bit"]
1581 pub fn clear_bit(self) -> &'a mut W {
1582 self.bit(false)
1583 }
1584 #[doc = r" Writes raw bits to the field"]
1585 #[inline]
1586 pub fn bit(self, value: bool) -> &'a mut W {
1587 const MASK: bool = true;
1588 const OFFSET: u8 = 0;
1589 self.w.bits &= !((MASK as u32) << OFFSET);
1590 self.w.bits |= ((value & MASK) as u32) << OFFSET;
1591 self.w
1592 }
1593}
1594impl R {
1595 #[doc = r" Value of the register as raw bits"]
1596 #[inline]
1597 pub fn bits(&self) -> u32 {
1598 self.bits
1599 }
1600 #[doc = "Bits 19:31 - 31:19\\] Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
1601 #[inline]
1602 pub fn reserved19(&self) -> RESERVED19R {
1603 let bits = {
1604 const MASK: u16 = 8191;
1605 const OFFSET: u8 = 19;
1606 ((self.bits >> OFFSET) & MASK as u32) as u16
1607 };
1608 RESERVED19R { bits }
1609 }
1610 #[doc = "Bit 18 - 18:18\\] Usage fault system handler enable"]
1611 #[inline]
1612 pub fn usgfaultena(&self) -> USGFAULTENAR {
1613 USGFAULTENAR::_from({
1614 const MASK: bool = true;
1615 const OFFSET: u8 = 18;
1616 ((self.bits >> OFFSET) & MASK as u32) != 0
1617 })
1618 }
1619 #[doc = "Bit 17 - 17:17\\] Bus fault system handler enable"]
1620 #[inline]
1621 pub fn busfaultena(&self) -> BUSFAULTENAR {
1622 BUSFAULTENAR::_from({
1623 const MASK: bool = true;
1624 const OFFSET: u8 = 17;
1625 ((self.bits >> OFFSET) & MASK as u32) != 0
1626 })
1627 }
1628 #[doc = "Bit 16 - 16:16\\] MemManage fault system handler enable"]
1629 #[inline]
1630 pub fn memfaultena(&self) -> MEMFAULTENAR {
1631 MEMFAULTENAR::_from({
1632 const MASK: bool = true;
1633 const OFFSET: u8 = 16;
1634 ((self.bits >> OFFSET) & MASK as u32) != 0
1635 })
1636 }
1637 #[doc = "Bit 15 - 15:15\\] SVCall pending"]
1638 #[inline]
1639 pub fn svcallpended(&self) -> SVCALLPENDEDR {
1640 SVCALLPENDEDR::_from({
1641 const MASK: bool = true;
1642 const OFFSET: u8 = 15;
1643 ((self.bits >> OFFSET) & MASK as u32) != 0
1644 })
1645 }
1646 #[doc = "Bit 14 - 14:14\\] BusFault pending"]
1647 #[inline]
1648 pub fn busfaultpended(&self) -> BUSFAULTPENDEDR {
1649 BUSFAULTPENDEDR::_from({
1650 const MASK: bool = true;
1651 const OFFSET: u8 = 14;
1652 ((self.bits >> OFFSET) & MASK as u32) != 0
1653 })
1654 }
1655 #[doc = "Bit 13 - 13:13\\] MemManage exception pending"]
1656 #[inline]
1657 pub fn memfaultpended(&self) -> MEMFAULTPENDEDR {
1658 MEMFAULTPENDEDR::_from({
1659 const MASK: bool = true;
1660 const OFFSET: u8 = 13;
1661 ((self.bits >> OFFSET) & MASK as u32) != 0
1662 })
1663 }
1664 #[doc = "Bit 12 - 12:12\\] Usage fault pending"]
1665 #[inline]
1666 pub fn usgfaultpended(&self) -> USGFAULTPENDEDR {
1667 USGFAULTPENDEDR::_from({
1668 const MASK: bool = true;
1669 const OFFSET: u8 = 12;
1670 ((self.bits >> OFFSET) & MASK as u32) != 0
1671 })
1672 }
1673 #[doc = "Bit 11 - 11:11\\] SysTick active flag. 0x0: Not active 0x1: Active"]
1674 #[inline]
1675 pub fn systickact(&self) -> SYSTICKACTR {
1676 SYSTICKACTR::_from({
1677 const MASK: bool = true;
1678 const OFFSET: u8 = 11;
1679 ((self.bits >> OFFSET) & MASK as u32) != 0
1680 })
1681 }
1682 #[doc = "Bit 10 - 10:10\\] PendSV active 0x0: Not active 0x1: Active"]
1683 #[inline]
1684 pub fn pendsvact(&self) -> PENDSVACTR {
1685 let bits = {
1686 const MASK: bool = true;
1687 const OFFSET: u8 = 10;
1688 ((self.bits >> OFFSET) & MASK as u32) != 0
1689 };
1690 PENDSVACTR { bits }
1691 }
1692 #[doc = "Bit 9 - 9:9\\] Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
1693 #[inline]
1694 pub fn reserved9(&self) -> RESERVED9R {
1695 let bits = {
1696 const MASK: bool = true;
1697 const OFFSET: u8 = 9;
1698 ((self.bits >> OFFSET) & MASK as u32) != 0
1699 };
1700 RESERVED9R { bits }
1701 }
1702 #[doc = "Bit 8 - 8:8\\] Debug monitor active"]
1703 #[inline]
1704 pub fn monitoract(&self) -> MONITORACTR {
1705 MONITORACTR::_from({
1706 const MASK: bool = true;
1707 const OFFSET: u8 = 8;
1708 ((self.bits >> OFFSET) & MASK as u32) != 0
1709 })
1710 }
1711 #[doc = "Bit 7 - 7:7\\] SVCall active"]
1712 #[inline]
1713 pub fn svcallact(&self) -> SVCALLACTR {
1714 SVCALLACTR::_from({
1715 const MASK: bool = true;
1716 const OFFSET: u8 = 7;
1717 ((self.bits >> OFFSET) & MASK as u32) != 0
1718 })
1719 }
1720 #[doc = "Bits 4:6 - 6:4\\] Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
1721 #[inline]
1722 pub fn reserved4(&self) -> RESERVED4R {
1723 let bits = {
1724 const MASK: u8 = 7;
1725 const OFFSET: u8 = 4;
1726 ((self.bits >> OFFSET) & MASK as u32) as u8
1727 };
1728 RESERVED4R { bits }
1729 }
1730 #[doc = "Bit 3 - 3:3\\] UsageFault exception active"]
1731 #[inline]
1732 pub fn usgfaultact(&self) -> USGFAULTACTR {
1733 USGFAULTACTR::_from({
1734 const MASK: bool = true;
1735 const OFFSET: u8 = 3;
1736 ((self.bits >> OFFSET) & MASK as u32) != 0
1737 })
1738 }
1739 #[doc = "Bit 2 - 2:2\\] Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
1740 #[inline]
1741 pub fn reserved2(&self) -> RESERVED2R {
1742 let bits = {
1743 const MASK: bool = true;
1744 const OFFSET: u8 = 2;
1745 ((self.bits >> OFFSET) & MASK as u32) != 0
1746 };
1747 RESERVED2R { bits }
1748 }
1749 #[doc = "Bit 1 - 1:1\\] BusFault exception active"]
1750 #[inline]
1751 pub fn busfaultact(&self) -> BUSFAULTACTR {
1752 BUSFAULTACTR::_from({
1753 const MASK: bool = true;
1754 const OFFSET: u8 = 1;
1755 ((self.bits >> OFFSET) & MASK as u32) != 0
1756 })
1757 }
1758 #[doc = "Bit 0 - 0:0\\] MemManage exception active"]
1759 #[inline]
1760 pub fn memfaultact(&self) -> MEMFAULTACTR {
1761 MEMFAULTACTR::_from({
1762 const MASK: bool = true;
1763 const OFFSET: u8 = 0;
1764 ((self.bits >> OFFSET) & MASK as u32) != 0
1765 })
1766 }
1767}
1768impl W {
1769 #[doc = r" Reset value of the register"]
1770 #[inline]
1771 pub fn reset_value() -> W {
1772 W { bits: 0 }
1773 }
1774 #[doc = r" Writes raw bits to the register"]
1775 #[inline]
1776 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1777 self.bits = bits;
1778 self
1779 }
1780 #[doc = "Bits 19:31 - 31:19\\] Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
1781 #[inline]
1782 pub fn reserved19(&mut self) -> _RESERVED19W {
1783 _RESERVED19W { w: self }
1784 }
1785 #[doc = "Bit 18 - 18:18\\] Usage fault system handler enable"]
1786 #[inline]
1787 pub fn usgfaultena(&mut self) -> _USGFAULTENAW {
1788 _USGFAULTENAW { w: self }
1789 }
1790 #[doc = "Bit 17 - 17:17\\] Bus fault system handler enable"]
1791 #[inline]
1792 pub fn busfaultena(&mut self) -> _BUSFAULTENAW {
1793 _BUSFAULTENAW { w: self }
1794 }
1795 #[doc = "Bit 16 - 16:16\\] MemManage fault system handler enable"]
1796 #[inline]
1797 pub fn memfaultena(&mut self) -> _MEMFAULTENAW {
1798 _MEMFAULTENAW { w: self }
1799 }
1800 #[doc = "Bit 15 - 15:15\\] SVCall pending"]
1801 #[inline]
1802 pub fn svcallpended(&mut self) -> _SVCALLPENDEDW {
1803 _SVCALLPENDEDW { w: self }
1804 }
1805 #[doc = "Bit 14 - 14:14\\] BusFault pending"]
1806 #[inline]
1807 pub fn busfaultpended(&mut self) -> _BUSFAULTPENDEDW {
1808 _BUSFAULTPENDEDW { w: self }
1809 }
1810 #[doc = "Bit 13 - 13:13\\] MemManage exception pending"]
1811 #[inline]
1812 pub fn memfaultpended(&mut self) -> _MEMFAULTPENDEDW {
1813 _MEMFAULTPENDEDW { w: self }
1814 }
1815 #[doc = "Bit 12 - 12:12\\] Usage fault pending"]
1816 #[inline]
1817 pub fn usgfaultpended(&mut self) -> _USGFAULTPENDEDW {
1818 _USGFAULTPENDEDW { w: self }
1819 }
1820 #[doc = "Bit 11 - 11:11\\] SysTick active flag. 0x0: Not active 0x1: Active"]
1821 #[inline]
1822 pub fn systickact(&mut self) -> _SYSTICKACTW {
1823 _SYSTICKACTW { w: self }
1824 }
1825 #[doc = "Bit 10 - 10:10\\] PendSV active 0x0: Not active 0x1: Active"]
1826 #[inline]
1827 pub fn pendsvact(&mut self) -> _PENDSVACTW {
1828 _PENDSVACTW { w: self }
1829 }
1830 #[doc = "Bit 9 - 9:9\\] Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
1831 #[inline]
1832 pub fn reserved9(&mut self) -> _RESERVED9W {
1833 _RESERVED9W { w: self }
1834 }
1835 #[doc = "Bit 8 - 8:8\\] Debug monitor active"]
1836 #[inline]
1837 pub fn monitoract(&mut self) -> _MONITORACTW {
1838 _MONITORACTW { w: self }
1839 }
1840 #[doc = "Bit 7 - 7:7\\] SVCall active"]
1841 #[inline]
1842 pub fn svcallact(&mut self) -> _SVCALLACTW {
1843 _SVCALLACTW { w: self }
1844 }
1845 #[doc = "Bits 4:6 - 6:4\\] Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
1846 #[inline]
1847 pub fn reserved4(&mut self) -> _RESERVED4W {
1848 _RESERVED4W { w: self }
1849 }
1850 #[doc = "Bit 3 - 3:3\\] UsageFault exception active"]
1851 #[inline]
1852 pub fn usgfaultact(&mut self) -> _USGFAULTACTW {
1853 _USGFAULTACTW { w: self }
1854 }
1855 #[doc = "Bit 2 - 2:2\\] Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
1856 #[inline]
1857 pub fn reserved2(&mut self) -> _RESERVED2W {
1858 _RESERVED2W { w: self }
1859 }
1860 #[doc = "Bit 1 - 1:1\\] BusFault exception active"]
1861 #[inline]
1862 pub fn busfaultact(&mut self) -> _BUSFAULTACTW {
1863 _BUSFAULTACTW { w: self }
1864 }
1865 #[doc = "Bit 0 - 0:0\\] MemManage exception active"]
1866 #[inline]
1867 pub fn memfaultact(&mut self) -> _MEMFAULTACTW {
1868 _MEMFAULTACTW { w: self }
1869 }
1870}