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::FLTCTRL {
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 = "Possible values of the field `FAULT0EN`"]
46#[derive(Clone, Copy, Debug, PartialEq)]
47pub enum FAULT0ENR {
48 #[doc = "Fault input is disabled."]
49 _0,
50 #[doc = "Fault input is enabled."]
51 _1,
52}
53impl FAULT0ENR {
54 #[doc = r" Returns `true` if the bit is clear (0)"]
55 #[inline]
56 pub fn bit_is_clear(&self) -> bool {
57 !self.bit()
58 }
59 #[doc = r" Returns `true` if the bit is set (1)"]
60 #[inline]
61 pub fn bit_is_set(&self) -> bool {
62 self.bit()
63 }
64 #[doc = r" Value of the field as raw bits"]
65 #[inline]
66 pub fn bit(&self) -> bool {
67 match *self {
68 FAULT0ENR::_0 => false,
69 FAULT0ENR::_1 => true,
70 }
71 }
72 #[allow(missing_docs)]
73 #[doc(hidden)]
74 #[inline]
75 pub fn _from(value: bool) -> FAULT0ENR {
76 match value {
77 false => FAULT0ENR::_0,
78 true => FAULT0ENR::_1,
79 }
80 }
81 #[doc = "Checks if the value of the field is `_0`"]
82 #[inline]
83 pub fn is_0(&self) -> bool {
84 *self == FAULT0ENR::_0
85 }
86 #[doc = "Checks if the value of the field is `_1`"]
87 #[inline]
88 pub fn is_1(&self) -> bool {
89 *self == FAULT0ENR::_1
90 }
91}
92#[doc = "Possible values of the field `FAULT1EN`"]
93#[derive(Clone, Copy, Debug, PartialEq)]
94pub enum FAULT1ENR {
95 #[doc = "Fault input is disabled."]
96 _0,
97 #[doc = "Fault input is enabled."]
98 _1,
99}
100impl FAULT1ENR {
101 #[doc = r" Returns `true` if the bit is clear (0)"]
102 #[inline]
103 pub fn bit_is_clear(&self) -> bool {
104 !self.bit()
105 }
106 #[doc = r" Returns `true` if the bit is set (1)"]
107 #[inline]
108 pub fn bit_is_set(&self) -> bool {
109 self.bit()
110 }
111 #[doc = r" Value of the field as raw bits"]
112 #[inline]
113 pub fn bit(&self) -> bool {
114 match *self {
115 FAULT1ENR::_0 => false,
116 FAULT1ENR::_1 => true,
117 }
118 }
119 #[allow(missing_docs)]
120 #[doc(hidden)]
121 #[inline]
122 pub fn _from(value: bool) -> FAULT1ENR {
123 match value {
124 false => FAULT1ENR::_0,
125 true => FAULT1ENR::_1,
126 }
127 }
128 #[doc = "Checks if the value of the field is `_0`"]
129 #[inline]
130 pub fn is_0(&self) -> bool {
131 *self == FAULT1ENR::_0
132 }
133 #[doc = "Checks if the value of the field is `_1`"]
134 #[inline]
135 pub fn is_1(&self) -> bool {
136 *self == FAULT1ENR::_1
137 }
138}
139#[doc = "Possible values of the field `FAULT2EN`"]
140#[derive(Clone, Copy, Debug, PartialEq)]
141pub enum FAULT2ENR {
142 #[doc = "Fault input is disabled."]
143 _0,
144 #[doc = "Fault input is enabled."]
145 _1,
146}
147impl FAULT2ENR {
148 #[doc = r" Returns `true` if the bit is clear (0)"]
149 #[inline]
150 pub fn bit_is_clear(&self) -> bool {
151 !self.bit()
152 }
153 #[doc = r" Returns `true` if the bit is set (1)"]
154 #[inline]
155 pub fn bit_is_set(&self) -> bool {
156 self.bit()
157 }
158 #[doc = r" Value of the field as raw bits"]
159 #[inline]
160 pub fn bit(&self) -> bool {
161 match *self {
162 FAULT2ENR::_0 => false,
163 FAULT2ENR::_1 => true,
164 }
165 }
166 #[allow(missing_docs)]
167 #[doc(hidden)]
168 #[inline]
169 pub fn _from(value: bool) -> FAULT2ENR {
170 match value {
171 false => FAULT2ENR::_0,
172 true => FAULT2ENR::_1,
173 }
174 }
175 #[doc = "Checks if the value of the field is `_0`"]
176 #[inline]
177 pub fn is_0(&self) -> bool {
178 *self == FAULT2ENR::_0
179 }
180 #[doc = "Checks if the value of the field is `_1`"]
181 #[inline]
182 pub fn is_1(&self) -> bool {
183 *self == FAULT2ENR::_1
184 }
185}
186#[doc = "Possible values of the field `FAULT3EN`"]
187#[derive(Clone, Copy, Debug, PartialEq)]
188pub enum FAULT3ENR {
189 #[doc = "Fault input is disabled."]
190 _0,
191 #[doc = "Fault input is enabled."]
192 _1,
193}
194impl FAULT3ENR {
195 #[doc = r" Returns `true` if the bit is clear (0)"]
196 #[inline]
197 pub fn bit_is_clear(&self) -> bool {
198 !self.bit()
199 }
200 #[doc = r" Returns `true` if the bit is set (1)"]
201 #[inline]
202 pub fn bit_is_set(&self) -> bool {
203 self.bit()
204 }
205 #[doc = r" Value of the field as raw bits"]
206 #[inline]
207 pub fn bit(&self) -> bool {
208 match *self {
209 FAULT3ENR::_0 => false,
210 FAULT3ENR::_1 => true,
211 }
212 }
213 #[allow(missing_docs)]
214 #[doc(hidden)]
215 #[inline]
216 pub fn _from(value: bool) -> FAULT3ENR {
217 match value {
218 false => FAULT3ENR::_0,
219 true => FAULT3ENR::_1,
220 }
221 }
222 #[doc = "Checks if the value of the field is `_0`"]
223 #[inline]
224 pub fn is_0(&self) -> bool {
225 *self == FAULT3ENR::_0
226 }
227 #[doc = "Checks if the value of the field is `_1`"]
228 #[inline]
229 pub fn is_1(&self) -> bool {
230 *self == FAULT3ENR::_1
231 }
232}
233#[doc = "Possible values of the field `FFLTR0EN`"]
234#[derive(Clone, Copy, Debug, PartialEq)]
235pub enum FFLTR0ENR {
236 #[doc = "Fault input filter is disabled."]
237 _0,
238 #[doc = "Fault input filter is enabled."]
239 _1,
240}
241impl FFLTR0ENR {
242 #[doc = r" Returns `true` if the bit is clear (0)"]
243 #[inline]
244 pub fn bit_is_clear(&self) -> bool {
245 !self.bit()
246 }
247 #[doc = r" Returns `true` if the bit is set (1)"]
248 #[inline]
249 pub fn bit_is_set(&self) -> bool {
250 self.bit()
251 }
252 #[doc = r" Value of the field as raw bits"]
253 #[inline]
254 pub fn bit(&self) -> bool {
255 match *self {
256 FFLTR0ENR::_0 => false,
257 FFLTR0ENR::_1 => true,
258 }
259 }
260 #[allow(missing_docs)]
261 #[doc(hidden)]
262 #[inline]
263 pub fn _from(value: bool) -> FFLTR0ENR {
264 match value {
265 false => FFLTR0ENR::_0,
266 true => FFLTR0ENR::_1,
267 }
268 }
269 #[doc = "Checks if the value of the field is `_0`"]
270 #[inline]
271 pub fn is_0(&self) -> bool {
272 *self == FFLTR0ENR::_0
273 }
274 #[doc = "Checks if the value of the field is `_1`"]
275 #[inline]
276 pub fn is_1(&self) -> bool {
277 *self == FFLTR0ENR::_1
278 }
279}
280#[doc = "Possible values of the field `FFLTR1EN`"]
281#[derive(Clone, Copy, Debug, PartialEq)]
282pub enum FFLTR1ENR {
283 #[doc = "Fault input filter is disabled."]
284 _0,
285 #[doc = "Fault input filter is enabled."]
286 _1,
287}
288impl FFLTR1ENR {
289 #[doc = r" Returns `true` if the bit is clear (0)"]
290 #[inline]
291 pub fn bit_is_clear(&self) -> bool {
292 !self.bit()
293 }
294 #[doc = r" Returns `true` if the bit is set (1)"]
295 #[inline]
296 pub fn bit_is_set(&self) -> bool {
297 self.bit()
298 }
299 #[doc = r" Value of the field as raw bits"]
300 #[inline]
301 pub fn bit(&self) -> bool {
302 match *self {
303 FFLTR1ENR::_0 => false,
304 FFLTR1ENR::_1 => true,
305 }
306 }
307 #[allow(missing_docs)]
308 #[doc(hidden)]
309 #[inline]
310 pub fn _from(value: bool) -> FFLTR1ENR {
311 match value {
312 false => FFLTR1ENR::_0,
313 true => FFLTR1ENR::_1,
314 }
315 }
316 #[doc = "Checks if the value of the field is `_0`"]
317 #[inline]
318 pub fn is_0(&self) -> bool {
319 *self == FFLTR1ENR::_0
320 }
321 #[doc = "Checks if the value of the field is `_1`"]
322 #[inline]
323 pub fn is_1(&self) -> bool {
324 *self == FFLTR1ENR::_1
325 }
326}
327#[doc = "Possible values of the field `FFLTR2EN`"]
328#[derive(Clone, Copy, Debug, PartialEq)]
329pub enum FFLTR2ENR {
330 #[doc = "Fault input filter is disabled."]
331 _0,
332 #[doc = "Fault input filter is enabled."]
333 _1,
334}
335impl FFLTR2ENR {
336 #[doc = r" Returns `true` if the bit is clear (0)"]
337 #[inline]
338 pub fn bit_is_clear(&self) -> bool {
339 !self.bit()
340 }
341 #[doc = r" Returns `true` if the bit is set (1)"]
342 #[inline]
343 pub fn bit_is_set(&self) -> bool {
344 self.bit()
345 }
346 #[doc = r" Value of the field as raw bits"]
347 #[inline]
348 pub fn bit(&self) -> bool {
349 match *self {
350 FFLTR2ENR::_0 => false,
351 FFLTR2ENR::_1 => true,
352 }
353 }
354 #[allow(missing_docs)]
355 #[doc(hidden)]
356 #[inline]
357 pub fn _from(value: bool) -> FFLTR2ENR {
358 match value {
359 false => FFLTR2ENR::_0,
360 true => FFLTR2ENR::_1,
361 }
362 }
363 #[doc = "Checks if the value of the field is `_0`"]
364 #[inline]
365 pub fn is_0(&self) -> bool {
366 *self == FFLTR2ENR::_0
367 }
368 #[doc = "Checks if the value of the field is `_1`"]
369 #[inline]
370 pub fn is_1(&self) -> bool {
371 *self == FFLTR2ENR::_1
372 }
373}
374#[doc = "Possible values of the field `FFLTR3EN`"]
375#[derive(Clone, Copy, Debug, PartialEq)]
376pub enum FFLTR3ENR {
377 #[doc = "Fault input filter is disabled."]
378 _0,
379 #[doc = "Fault input filter is enabled."]
380 _1,
381}
382impl FFLTR3ENR {
383 #[doc = r" Returns `true` if the bit is clear (0)"]
384 #[inline]
385 pub fn bit_is_clear(&self) -> bool {
386 !self.bit()
387 }
388 #[doc = r" Returns `true` if the bit is set (1)"]
389 #[inline]
390 pub fn bit_is_set(&self) -> bool {
391 self.bit()
392 }
393 #[doc = r" Value of the field as raw bits"]
394 #[inline]
395 pub fn bit(&self) -> bool {
396 match *self {
397 FFLTR3ENR::_0 => false,
398 FFLTR3ENR::_1 => true,
399 }
400 }
401 #[allow(missing_docs)]
402 #[doc(hidden)]
403 #[inline]
404 pub fn _from(value: bool) -> FFLTR3ENR {
405 match value {
406 false => FFLTR3ENR::_0,
407 true => FFLTR3ENR::_1,
408 }
409 }
410 #[doc = "Checks if the value of the field is `_0`"]
411 #[inline]
412 pub fn is_0(&self) -> bool {
413 *self == FFLTR3ENR::_0
414 }
415 #[doc = "Checks if the value of the field is `_1`"]
416 #[inline]
417 pub fn is_1(&self) -> bool {
418 *self == FFLTR3ENR::_1
419 }
420}
421#[doc = r" Value of the field"]
422pub struct FFVALR {
423 bits: u8,
424}
425impl FFVALR {
426 #[doc = r" Value of the field as raw bits"]
427 #[inline]
428 pub fn bits(&self) -> u8 {
429 self.bits
430 }
431}
432#[doc = "Values that can be written to the field `FAULT0EN`"]
433pub enum FAULT0ENW {
434 #[doc = "Fault input is disabled."]
435 _0,
436 #[doc = "Fault input is enabled."]
437 _1,
438}
439impl FAULT0ENW {
440 #[allow(missing_docs)]
441 #[doc(hidden)]
442 #[inline]
443 pub fn _bits(&self) -> bool {
444 match *self {
445 FAULT0ENW::_0 => false,
446 FAULT0ENW::_1 => true,
447 }
448 }
449}
450#[doc = r" Proxy"]
451pub struct _FAULT0ENW<'a> {
452 w: &'a mut W,
453}
454impl<'a> _FAULT0ENW<'a> {
455 #[doc = r" Writes `variant` to the field"]
456 #[inline]
457 pub fn variant(self, variant: FAULT0ENW) -> &'a mut W {
458 {
459 self.bit(variant._bits())
460 }
461 }
462 #[doc = "Fault input is disabled."]
463 #[inline]
464 pub fn _0(self) -> &'a mut W {
465 self.variant(FAULT0ENW::_0)
466 }
467 #[doc = "Fault input is enabled."]
468 #[inline]
469 pub fn _1(self) -> &'a mut W {
470 self.variant(FAULT0ENW::_1)
471 }
472 #[doc = r" Sets the field bit"]
473 pub fn set_bit(self) -> &'a mut W {
474 self.bit(true)
475 }
476 #[doc = r" Clears the field bit"]
477 pub fn clear_bit(self) -> &'a mut W {
478 self.bit(false)
479 }
480 #[doc = r" Writes raw bits to the field"]
481 #[inline]
482 pub fn bit(self, value: bool) -> &'a mut W {
483 const MASK: bool = true;
484 const OFFSET: u8 = 0;
485 self.w.bits &= !((MASK as u32) << OFFSET);
486 self.w.bits |= ((value & MASK) as u32) << OFFSET;
487 self.w
488 }
489}
490#[doc = "Values that can be written to the field `FAULT1EN`"]
491pub enum FAULT1ENW {
492 #[doc = "Fault input is disabled."]
493 _0,
494 #[doc = "Fault input is enabled."]
495 _1,
496}
497impl FAULT1ENW {
498 #[allow(missing_docs)]
499 #[doc(hidden)]
500 #[inline]
501 pub fn _bits(&self) -> bool {
502 match *self {
503 FAULT1ENW::_0 => false,
504 FAULT1ENW::_1 => true,
505 }
506 }
507}
508#[doc = r" Proxy"]
509pub struct _FAULT1ENW<'a> {
510 w: &'a mut W,
511}
512impl<'a> _FAULT1ENW<'a> {
513 #[doc = r" Writes `variant` to the field"]
514 #[inline]
515 pub fn variant(self, variant: FAULT1ENW) -> &'a mut W {
516 {
517 self.bit(variant._bits())
518 }
519 }
520 #[doc = "Fault input is disabled."]
521 #[inline]
522 pub fn _0(self) -> &'a mut W {
523 self.variant(FAULT1ENW::_0)
524 }
525 #[doc = "Fault input is enabled."]
526 #[inline]
527 pub fn _1(self) -> &'a mut W {
528 self.variant(FAULT1ENW::_1)
529 }
530 #[doc = r" Sets the field bit"]
531 pub fn set_bit(self) -> &'a mut W {
532 self.bit(true)
533 }
534 #[doc = r" Clears the field bit"]
535 pub fn clear_bit(self) -> &'a mut W {
536 self.bit(false)
537 }
538 #[doc = r" Writes raw bits to the field"]
539 #[inline]
540 pub fn bit(self, value: bool) -> &'a mut W {
541 const MASK: bool = true;
542 const OFFSET: u8 = 1;
543 self.w.bits &= !((MASK as u32) << OFFSET);
544 self.w.bits |= ((value & MASK) as u32) << OFFSET;
545 self.w
546 }
547}
548#[doc = "Values that can be written to the field `FAULT2EN`"]
549pub enum FAULT2ENW {
550 #[doc = "Fault input is disabled."]
551 _0,
552 #[doc = "Fault input is enabled."]
553 _1,
554}
555impl FAULT2ENW {
556 #[allow(missing_docs)]
557 #[doc(hidden)]
558 #[inline]
559 pub fn _bits(&self) -> bool {
560 match *self {
561 FAULT2ENW::_0 => false,
562 FAULT2ENW::_1 => true,
563 }
564 }
565}
566#[doc = r" Proxy"]
567pub struct _FAULT2ENW<'a> {
568 w: &'a mut W,
569}
570impl<'a> _FAULT2ENW<'a> {
571 #[doc = r" Writes `variant` to the field"]
572 #[inline]
573 pub fn variant(self, variant: FAULT2ENW) -> &'a mut W {
574 {
575 self.bit(variant._bits())
576 }
577 }
578 #[doc = "Fault input is disabled."]
579 #[inline]
580 pub fn _0(self) -> &'a mut W {
581 self.variant(FAULT2ENW::_0)
582 }
583 #[doc = "Fault input is enabled."]
584 #[inline]
585 pub fn _1(self) -> &'a mut W {
586 self.variant(FAULT2ENW::_1)
587 }
588 #[doc = r" Sets the field bit"]
589 pub fn set_bit(self) -> &'a mut W {
590 self.bit(true)
591 }
592 #[doc = r" Clears the field bit"]
593 pub fn clear_bit(self) -> &'a mut W {
594 self.bit(false)
595 }
596 #[doc = r" Writes raw bits to the field"]
597 #[inline]
598 pub fn bit(self, value: bool) -> &'a mut W {
599 const MASK: bool = true;
600 const OFFSET: u8 = 2;
601 self.w.bits &= !((MASK as u32) << OFFSET);
602 self.w.bits |= ((value & MASK) as u32) << OFFSET;
603 self.w
604 }
605}
606#[doc = "Values that can be written to the field `FAULT3EN`"]
607pub enum FAULT3ENW {
608 #[doc = "Fault input is disabled."]
609 _0,
610 #[doc = "Fault input is enabled."]
611 _1,
612}
613impl FAULT3ENW {
614 #[allow(missing_docs)]
615 #[doc(hidden)]
616 #[inline]
617 pub fn _bits(&self) -> bool {
618 match *self {
619 FAULT3ENW::_0 => false,
620 FAULT3ENW::_1 => true,
621 }
622 }
623}
624#[doc = r" Proxy"]
625pub struct _FAULT3ENW<'a> {
626 w: &'a mut W,
627}
628impl<'a> _FAULT3ENW<'a> {
629 #[doc = r" Writes `variant` to the field"]
630 #[inline]
631 pub fn variant(self, variant: FAULT3ENW) -> &'a mut W {
632 {
633 self.bit(variant._bits())
634 }
635 }
636 #[doc = "Fault input is disabled."]
637 #[inline]
638 pub fn _0(self) -> &'a mut W {
639 self.variant(FAULT3ENW::_0)
640 }
641 #[doc = "Fault input is enabled."]
642 #[inline]
643 pub fn _1(self) -> &'a mut W {
644 self.variant(FAULT3ENW::_1)
645 }
646 #[doc = r" Sets the field bit"]
647 pub fn set_bit(self) -> &'a mut W {
648 self.bit(true)
649 }
650 #[doc = r" Clears the field bit"]
651 pub fn clear_bit(self) -> &'a mut W {
652 self.bit(false)
653 }
654 #[doc = r" Writes raw bits to the field"]
655 #[inline]
656 pub fn bit(self, value: bool) -> &'a mut W {
657 const MASK: bool = true;
658 const OFFSET: u8 = 3;
659 self.w.bits &= !((MASK as u32) << OFFSET);
660 self.w.bits |= ((value & MASK) as u32) << OFFSET;
661 self.w
662 }
663}
664#[doc = "Values that can be written to the field `FFLTR0EN`"]
665pub enum FFLTR0ENW {
666 #[doc = "Fault input filter is disabled."]
667 _0,
668 #[doc = "Fault input filter is enabled."]
669 _1,
670}
671impl FFLTR0ENW {
672 #[allow(missing_docs)]
673 #[doc(hidden)]
674 #[inline]
675 pub fn _bits(&self) -> bool {
676 match *self {
677 FFLTR0ENW::_0 => false,
678 FFLTR0ENW::_1 => true,
679 }
680 }
681}
682#[doc = r" Proxy"]
683pub struct _FFLTR0ENW<'a> {
684 w: &'a mut W,
685}
686impl<'a> _FFLTR0ENW<'a> {
687 #[doc = r" Writes `variant` to the field"]
688 #[inline]
689 pub fn variant(self, variant: FFLTR0ENW) -> &'a mut W {
690 {
691 self.bit(variant._bits())
692 }
693 }
694 #[doc = "Fault input filter is disabled."]
695 #[inline]
696 pub fn _0(self) -> &'a mut W {
697 self.variant(FFLTR0ENW::_0)
698 }
699 #[doc = "Fault input filter is enabled."]
700 #[inline]
701 pub fn _1(self) -> &'a mut W {
702 self.variant(FFLTR0ENW::_1)
703 }
704 #[doc = r" Sets the field bit"]
705 pub fn set_bit(self) -> &'a mut W {
706 self.bit(true)
707 }
708 #[doc = r" Clears the field bit"]
709 pub fn clear_bit(self) -> &'a mut W {
710 self.bit(false)
711 }
712 #[doc = r" Writes raw bits to the field"]
713 #[inline]
714 pub fn bit(self, value: bool) -> &'a mut W {
715 const MASK: bool = true;
716 const OFFSET: u8 = 4;
717 self.w.bits &= !((MASK as u32) << OFFSET);
718 self.w.bits |= ((value & MASK) as u32) << OFFSET;
719 self.w
720 }
721}
722#[doc = "Values that can be written to the field `FFLTR1EN`"]
723pub enum FFLTR1ENW {
724 #[doc = "Fault input filter is disabled."]
725 _0,
726 #[doc = "Fault input filter is enabled."]
727 _1,
728}
729impl FFLTR1ENW {
730 #[allow(missing_docs)]
731 #[doc(hidden)]
732 #[inline]
733 pub fn _bits(&self) -> bool {
734 match *self {
735 FFLTR1ENW::_0 => false,
736 FFLTR1ENW::_1 => true,
737 }
738 }
739}
740#[doc = r" Proxy"]
741pub struct _FFLTR1ENW<'a> {
742 w: &'a mut W,
743}
744impl<'a> _FFLTR1ENW<'a> {
745 #[doc = r" Writes `variant` to the field"]
746 #[inline]
747 pub fn variant(self, variant: FFLTR1ENW) -> &'a mut W {
748 {
749 self.bit(variant._bits())
750 }
751 }
752 #[doc = "Fault input filter is disabled."]
753 #[inline]
754 pub fn _0(self) -> &'a mut W {
755 self.variant(FFLTR1ENW::_0)
756 }
757 #[doc = "Fault input filter is enabled."]
758 #[inline]
759 pub fn _1(self) -> &'a mut W {
760 self.variant(FFLTR1ENW::_1)
761 }
762 #[doc = r" Sets the field bit"]
763 pub fn set_bit(self) -> &'a mut W {
764 self.bit(true)
765 }
766 #[doc = r" Clears the field bit"]
767 pub fn clear_bit(self) -> &'a mut W {
768 self.bit(false)
769 }
770 #[doc = r" Writes raw bits to the field"]
771 #[inline]
772 pub fn bit(self, value: bool) -> &'a mut W {
773 const MASK: bool = true;
774 const OFFSET: u8 = 5;
775 self.w.bits &= !((MASK as u32) << OFFSET);
776 self.w.bits |= ((value & MASK) as u32) << OFFSET;
777 self.w
778 }
779}
780#[doc = "Values that can be written to the field `FFLTR2EN`"]
781pub enum FFLTR2ENW {
782 #[doc = "Fault input filter is disabled."]
783 _0,
784 #[doc = "Fault input filter is enabled."]
785 _1,
786}
787impl FFLTR2ENW {
788 #[allow(missing_docs)]
789 #[doc(hidden)]
790 #[inline]
791 pub fn _bits(&self) -> bool {
792 match *self {
793 FFLTR2ENW::_0 => false,
794 FFLTR2ENW::_1 => true,
795 }
796 }
797}
798#[doc = r" Proxy"]
799pub struct _FFLTR2ENW<'a> {
800 w: &'a mut W,
801}
802impl<'a> _FFLTR2ENW<'a> {
803 #[doc = r" Writes `variant` to the field"]
804 #[inline]
805 pub fn variant(self, variant: FFLTR2ENW) -> &'a mut W {
806 {
807 self.bit(variant._bits())
808 }
809 }
810 #[doc = "Fault input filter is disabled."]
811 #[inline]
812 pub fn _0(self) -> &'a mut W {
813 self.variant(FFLTR2ENW::_0)
814 }
815 #[doc = "Fault input filter is enabled."]
816 #[inline]
817 pub fn _1(self) -> &'a mut W {
818 self.variant(FFLTR2ENW::_1)
819 }
820 #[doc = r" Sets the field bit"]
821 pub fn set_bit(self) -> &'a mut W {
822 self.bit(true)
823 }
824 #[doc = r" Clears the field bit"]
825 pub fn clear_bit(self) -> &'a mut W {
826 self.bit(false)
827 }
828 #[doc = r" Writes raw bits to the field"]
829 #[inline]
830 pub fn bit(self, value: bool) -> &'a mut W {
831 const MASK: bool = true;
832 const OFFSET: u8 = 6;
833 self.w.bits &= !((MASK as u32) << OFFSET);
834 self.w.bits |= ((value & MASK) as u32) << OFFSET;
835 self.w
836 }
837}
838#[doc = "Values that can be written to the field `FFLTR3EN`"]
839pub enum FFLTR3ENW {
840 #[doc = "Fault input filter is disabled."]
841 _0,
842 #[doc = "Fault input filter is enabled."]
843 _1,
844}
845impl FFLTR3ENW {
846 #[allow(missing_docs)]
847 #[doc(hidden)]
848 #[inline]
849 pub fn _bits(&self) -> bool {
850 match *self {
851 FFLTR3ENW::_0 => false,
852 FFLTR3ENW::_1 => true,
853 }
854 }
855}
856#[doc = r" Proxy"]
857pub struct _FFLTR3ENW<'a> {
858 w: &'a mut W,
859}
860impl<'a> _FFLTR3ENW<'a> {
861 #[doc = r" Writes `variant` to the field"]
862 #[inline]
863 pub fn variant(self, variant: FFLTR3ENW) -> &'a mut W {
864 {
865 self.bit(variant._bits())
866 }
867 }
868 #[doc = "Fault input filter is disabled."]
869 #[inline]
870 pub fn _0(self) -> &'a mut W {
871 self.variant(FFLTR3ENW::_0)
872 }
873 #[doc = "Fault input filter is enabled."]
874 #[inline]
875 pub fn _1(self) -> &'a mut W {
876 self.variant(FFLTR3ENW::_1)
877 }
878 #[doc = r" Sets the field bit"]
879 pub fn set_bit(self) -> &'a mut W {
880 self.bit(true)
881 }
882 #[doc = r" Clears the field bit"]
883 pub fn clear_bit(self) -> &'a mut W {
884 self.bit(false)
885 }
886 #[doc = r" Writes raw bits to the field"]
887 #[inline]
888 pub fn bit(self, value: bool) -> &'a mut W {
889 const MASK: bool = true;
890 const OFFSET: u8 = 7;
891 self.w.bits &= !((MASK as u32) << OFFSET);
892 self.w.bits |= ((value & MASK) as u32) << OFFSET;
893 self.w
894 }
895}
896#[doc = r" Proxy"]
897pub struct _FFVALW<'a> {
898 w: &'a mut W,
899}
900impl<'a> _FFVALW<'a> {
901 #[doc = r" Writes raw bits to the field"]
902 #[inline]
903 pub unsafe fn bits(self, value: u8) -> &'a mut W {
904 const MASK: u8 = 15;
905 const OFFSET: u8 = 8;
906 self.w.bits &= !((MASK as u32) << OFFSET);
907 self.w.bits |= ((value & MASK) as u32) << OFFSET;
908 self.w
909 }
910}
911impl R {
912 #[doc = r" Value of the register as raw bits"]
913 #[inline]
914 pub fn bits(&self) -> u32 {
915 self.bits
916 }
917 #[doc = "Bit 0 - Fault Input 0 Enable"]
918 #[inline]
919 pub fn fault0en(&self) -> FAULT0ENR {
920 FAULT0ENR::_from({
921 const MASK: bool = true;
922 const OFFSET: u8 = 0;
923 ((self.bits >> OFFSET) & MASK as u32) != 0
924 })
925 }
926 #[doc = "Bit 1 - Fault Input 1 Enable"]
927 #[inline]
928 pub fn fault1en(&self) -> FAULT1ENR {
929 FAULT1ENR::_from({
930 const MASK: bool = true;
931 const OFFSET: u8 = 1;
932 ((self.bits >> OFFSET) & MASK as u32) != 0
933 })
934 }
935 #[doc = "Bit 2 - Fault Input 2 Enable"]
936 #[inline]
937 pub fn fault2en(&self) -> FAULT2ENR {
938 FAULT2ENR::_from({
939 const MASK: bool = true;
940 const OFFSET: u8 = 2;
941 ((self.bits >> OFFSET) & MASK as u32) != 0
942 })
943 }
944 #[doc = "Bit 3 - Fault Input 3 Enable"]
945 #[inline]
946 pub fn fault3en(&self) -> FAULT3ENR {
947 FAULT3ENR::_from({
948 const MASK: bool = true;
949 const OFFSET: u8 = 3;
950 ((self.bits >> OFFSET) & MASK as u32) != 0
951 })
952 }
953 #[doc = "Bit 4 - Fault Input 0 Filter Enable"]
954 #[inline]
955 pub fn ffltr0en(&self) -> FFLTR0ENR {
956 FFLTR0ENR::_from({
957 const MASK: bool = true;
958 const OFFSET: u8 = 4;
959 ((self.bits >> OFFSET) & MASK as u32) != 0
960 })
961 }
962 #[doc = "Bit 5 - Fault Input 1 Filter Enable"]
963 #[inline]
964 pub fn ffltr1en(&self) -> FFLTR1ENR {
965 FFLTR1ENR::_from({
966 const MASK: bool = true;
967 const OFFSET: u8 = 5;
968 ((self.bits >> OFFSET) & MASK as u32) != 0
969 })
970 }
971 #[doc = "Bit 6 - Fault Input 2 Filter Enable"]
972 #[inline]
973 pub fn ffltr2en(&self) -> FFLTR2ENR {
974 FFLTR2ENR::_from({
975 const MASK: bool = true;
976 const OFFSET: u8 = 6;
977 ((self.bits >> OFFSET) & MASK as u32) != 0
978 })
979 }
980 #[doc = "Bit 7 - Fault Input 3 Filter Enable"]
981 #[inline]
982 pub fn ffltr3en(&self) -> FFLTR3ENR {
983 FFLTR3ENR::_from({
984 const MASK: bool = true;
985 const OFFSET: u8 = 7;
986 ((self.bits >> OFFSET) & MASK as u32) != 0
987 })
988 }
989 #[doc = "Bits 8:11 - Fault Input Filter"]
990 #[inline]
991 pub fn ffval(&self) -> FFVALR {
992 let bits = {
993 const MASK: u8 = 15;
994 const OFFSET: u8 = 8;
995 ((self.bits >> OFFSET) & MASK as u32) as u8
996 };
997 FFVALR { bits }
998 }
999}
1000impl W {
1001 #[doc = r" Reset value of the register"]
1002 #[inline]
1003 pub fn reset_value() -> W {
1004 W { bits: 0 }
1005 }
1006 #[doc = r" Writes raw bits to the register"]
1007 #[inline]
1008 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1009 self.bits = bits;
1010 self
1011 }
1012 #[doc = "Bit 0 - Fault Input 0 Enable"]
1013 #[inline]
1014 pub fn fault0en(&mut self) -> _FAULT0ENW {
1015 _FAULT0ENW { w: self }
1016 }
1017 #[doc = "Bit 1 - Fault Input 1 Enable"]
1018 #[inline]
1019 pub fn fault1en(&mut self) -> _FAULT1ENW {
1020 _FAULT1ENW { w: self }
1021 }
1022 #[doc = "Bit 2 - Fault Input 2 Enable"]
1023 #[inline]
1024 pub fn fault2en(&mut self) -> _FAULT2ENW {
1025 _FAULT2ENW { w: self }
1026 }
1027 #[doc = "Bit 3 - Fault Input 3 Enable"]
1028 #[inline]
1029 pub fn fault3en(&mut self) -> _FAULT3ENW {
1030 _FAULT3ENW { w: self }
1031 }
1032 #[doc = "Bit 4 - Fault Input 0 Filter Enable"]
1033 #[inline]
1034 pub fn ffltr0en(&mut self) -> _FFLTR0ENW {
1035 _FFLTR0ENW { w: self }
1036 }
1037 #[doc = "Bit 5 - Fault Input 1 Filter Enable"]
1038 #[inline]
1039 pub fn ffltr1en(&mut self) -> _FFLTR1ENW {
1040 _FFLTR1ENW { w: self }
1041 }
1042 #[doc = "Bit 6 - Fault Input 2 Filter Enable"]
1043 #[inline]
1044 pub fn ffltr2en(&mut self) -> _FFLTR2ENW {
1045 _FFLTR2ENW { w: self }
1046 }
1047 #[doc = "Bit 7 - Fault Input 3 Filter Enable"]
1048 #[inline]
1049 pub fn ffltr3en(&mut self) -> _FFLTR3ENW {
1050 _FFLTR3ENW { w: self }
1051 }
1052 #[doc = "Bits 8:11 - Fault Input Filter"]
1053 #[inline]
1054 pub fn ffval(&mut self) -> _FFVALW {
1055 _FFVALW { w: self }
1056 }
1057}