efm32pg12_pac/wdog0/
ifs.rs1#[doc = "Writer for register IFS"]
2pub type W = crate::W<u32, super::IFS>;
3#[doc = "Register IFS `reset()`'s with value 0"]
4impl crate::ResetValue for super::IFS {
5 type Type = u32;
6 #[inline(always)]
7 fn reset_value() -> Self::Type {
8 0
9 }
10}
11#[doc = "Write proxy for field `TOUT`"]
12pub struct TOUT_W<'a> {
13 w: &'a mut W,
14}
15impl<'a> TOUT_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 `WARN`"]
34pub struct WARN_W<'a> {
35 w: &'a mut W,
36}
37impl<'a> WARN_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 `WIN`"]
56pub struct WIN_W<'a> {
57 w: &'a mut W,
58}
59impl<'a> WIN_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 `PEM0`"]
78pub struct PEM0_W<'a> {
79 w: &'a mut W,
80}
81impl<'a> PEM0_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}
99#[doc = "Write proxy for field `PEM1`"]
100pub struct PEM1_W<'a> {
101 w: &'a mut W,
102}
103impl<'a> PEM1_W<'a> {
104 #[doc = r"Sets the field bit"]
105 #[inline(always)]
106 pub fn set_bit(self) -> &'a mut W {
107 self.bit(true)
108 }
109 #[doc = r"Clears the field bit"]
110 #[inline(always)]
111 pub fn clear_bit(self) -> &'a mut W {
112 self.bit(false)
113 }
114 #[doc = r"Writes raw bits to the field"]
115 #[inline(always)]
116 pub fn bit(self, value: bool) -> &'a mut W {
117 self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
118 self.w
119 }
120}
121impl W {
122 #[doc = "Bit 0 - Set TOUT Interrupt Flag"]
123 #[inline(always)]
124 pub fn tout(&mut self) -> TOUT_W {
125 TOUT_W { w: self }
126 }
127 #[doc = "Bit 1 - Set WARN Interrupt Flag"]
128 #[inline(always)]
129 pub fn warn(&mut self) -> WARN_W {
130 WARN_W { w: self }
131 }
132 #[doc = "Bit 2 - Set WIN Interrupt Flag"]
133 #[inline(always)]
134 pub fn win(&mut self) -> WIN_W {
135 WIN_W { w: self }
136 }
137 #[doc = "Bit 3 - Set PEM0 Interrupt Flag"]
138 #[inline(always)]
139 pub fn pem0(&mut self) -> PEM0_W {
140 PEM0_W { w: self }
141 }
142 #[doc = "Bit 4 - Set PEM1 Interrupt Flag"]
143 #[inline(always)]
144 pub fn pem1(&mut self) -> PEM1_W {
145 PEM1_W { w: self }
146 }
147}