efm32hg309f64/timer2/
dtfaultc.rs1#[doc = "Writer for register DTFAULTC"]
2pub type W = crate::W<u32, super::DTFAULTC>;
3#[doc = "Register DTFAULTC `reset()`'s with value 0"]
4impl crate::ResetValue for super::DTFAULTC {
5 type Type = u32;
6 #[inline(always)]
7 fn reset_value() -> Self::Type {
8 0
9 }
10}
11#[doc = "Write proxy for field `DTPRS0FC`"]
12pub struct DTPRS0FC_W<'a> {
13 w: &'a mut W,
14}
15impl<'a> DTPRS0FC_W<'a> {
16 #[doc = r"Sets the field bit"]
17 #[inline(always)]
18 pub fn set_bit(self) -> &'a mut W {
19 self.bit(true)
20 }
21 #[doc = r"Clears the field bit"]
22 #[inline(always)]
23 pub fn clear_bit(self) -> &'a mut W {
24 self.bit(false)
25 }
26 #[doc = r"Writes raw bits to the field"]
27 #[inline(always)]
28 pub fn bit(self, value: bool) -> &'a mut W {
29 self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
30 self.w
31 }
32}
33#[doc = "Write proxy for field `DTPRS1FC`"]
34pub struct DTPRS1FC_W<'a> {
35 w: &'a mut W,
36}
37impl<'a> DTPRS1FC_W<'a> {
38 #[doc = r"Sets the field bit"]
39 #[inline(always)]
40 pub fn set_bit(self) -> &'a mut W {
41 self.bit(true)
42 }
43 #[doc = r"Clears the field bit"]
44 #[inline(always)]
45 pub fn clear_bit(self) -> &'a mut W {
46 self.bit(false)
47 }
48 #[doc = r"Writes raw bits to the field"]
49 #[inline(always)]
50 pub fn bit(self, value: bool) -> &'a mut W {
51 self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
52 self.w
53 }
54}
55#[doc = "Write proxy for field `DTDBGFC`"]
56pub struct DTDBGFC_W<'a> {
57 w: &'a mut W,
58}
59impl<'a> DTDBGFC_W<'a> {
60 #[doc = r"Sets the field bit"]
61 #[inline(always)]
62 pub fn set_bit(self) -> &'a mut W {
63 self.bit(true)
64 }
65 #[doc = r"Clears the field bit"]
66 #[inline(always)]
67 pub fn clear_bit(self) -> &'a mut W {
68 self.bit(false)
69 }
70 #[doc = r"Writes raw bits to the field"]
71 #[inline(always)]
72 pub fn bit(self, value: bool) -> &'a mut W {
73 self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
74 self.w
75 }
76}
77#[doc = "Write proxy for field `TLOCKUPFC`"]
78pub struct TLOCKUPFC_W<'a> {
79 w: &'a mut W,
80}
81impl<'a> TLOCKUPFC_W<'a> {
82 #[doc = r"Sets the field bit"]
83 #[inline(always)]
84 pub fn set_bit(self) -> &'a mut W {
85 self.bit(true)
86 }
87 #[doc = r"Clears the field bit"]
88 #[inline(always)]
89 pub fn clear_bit(self) -> &'a mut W {
90 self.bit(false)
91 }
92 #[doc = r"Writes raw bits to the field"]
93 #[inline(always)]
94 pub fn bit(self, value: bool) -> &'a mut W {
95 self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
96 self.w
97 }
98}
99impl W {
100 #[doc = "Bit 0 - DTI PRS0 Fault Clear"]
101 #[inline(always)]
102 pub fn dtprs0fc(&mut self) -> DTPRS0FC_W {
103 DTPRS0FC_W { w: self }
104 }
105 #[doc = "Bit 1 - DTI PRS1 Fault Clear"]
106 #[inline(always)]
107 pub fn dtprs1fc(&mut self) -> DTPRS1FC_W {
108 DTPRS1FC_W { w: self }
109 }
110 #[doc = "Bit 2 - DTI Debugger Fault Clear"]
111 #[inline(always)]
112 pub fn dtdbgfc(&mut self) -> DTDBGFC_W {
113 DTDBGFC_W { w: self }
114 }
115 #[doc = "Bit 3 - DTI Lockup Fault Clear"]
116 #[inline(always)]
117 pub fn tlockupfc(&mut self) -> TLOCKUPFC_W {
118 TLOCKUPFC_W { w: self }
119 }
120}