1#[doc = "Writer for register IFC"]
2pub type W = crate::W<u32, super::IFC>;
3#[doc = "Register IFC `reset()`'s with value 0"]
4impl crate::ResetValue for super::IFC {
5 type Type = u32;
6 #[inline(always)]
7 fn reset_value() -> Self::Type { 0 }
8}
9#[doc = "Write proxy for field `OF`"]
10pub struct OF_W<'a> {
11 w: &'a mut W,
12}
13impl<'a> OF_W<'a> {
14 #[doc = r"Sets the field bit"]
15 #[inline(always)]
16 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
17 #[doc = r"Clears the field bit"]
18 #[inline(always)]
19 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
20 #[doc = r"Writes raw bits to the field"]
21 #[inline(always)]
22 pub fn bit(self, value: bool) -> &'a mut W {
23 self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
24 self.w
25 }
26}
27#[doc = "Write proxy for field `UF`"]
28pub struct UF_W<'a> {
29 w: &'a mut W,
30}
31impl<'a> UF_W<'a> {
32 #[doc = r"Sets the field bit"]
33 #[inline(always)]
34 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
35 #[doc = r"Clears the field bit"]
36 #[inline(always)]
37 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
38 #[doc = r"Writes raw bits to the field"]
39 #[inline(always)]
40 pub fn bit(self, value: bool) -> &'a mut W {
41 self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
42 self.w
43 }
44}
45#[doc = "Write proxy for field `DIRCHG`"]
46pub struct DIRCHG_W<'a> {
47 w: &'a mut W,
48}
49impl<'a> DIRCHG_W<'a> {
50 #[doc = r"Sets the field bit"]
51 #[inline(always)]
52 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
53 #[doc = r"Clears the field bit"]
54 #[inline(always)]
55 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
56 #[doc = r"Writes raw bits to the field"]
57 #[inline(always)]
58 pub fn bit(self, value: bool) -> &'a mut W {
59 self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
60 self.w
61 }
62}
63#[doc = "Write proxy for field `CC0`"]
64pub struct CC0_W<'a> {
65 w: &'a mut W,
66}
67impl<'a> CC0_W<'a> {
68 #[doc = r"Sets the field bit"]
69 #[inline(always)]
70 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
71 #[doc = r"Clears the field bit"]
72 #[inline(always)]
73 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
74 #[doc = r"Writes raw bits to the field"]
75 #[inline(always)]
76 pub fn bit(self, value: bool) -> &'a mut W {
77 self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
78 self.w
79 }
80}
81#[doc = "Write proxy for field `CC1`"]
82pub struct CC1_W<'a> {
83 w: &'a mut W,
84}
85impl<'a> CC1_W<'a> {
86 #[doc = r"Sets the field bit"]
87 #[inline(always)]
88 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
89 #[doc = r"Clears the field bit"]
90 #[inline(always)]
91 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
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 << 5)) | (((value as u32) & 0x01) << 5);
96 self.w
97 }
98}
99#[doc = "Write proxy for field `CC2`"]
100pub struct CC2_W<'a> {
101 w: &'a mut W,
102}
103impl<'a> CC2_W<'a> {
104 #[doc = r"Sets the field bit"]
105 #[inline(always)]
106 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
107 #[doc = r"Clears the field bit"]
108 #[inline(always)]
109 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
110 #[doc = r"Writes raw bits to the field"]
111 #[inline(always)]
112 pub fn bit(self, value: bool) -> &'a mut W {
113 self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
114 self.w
115 }
116}
117#[doc = "Write proxy for field `CC3`"]
118pub struct CC3_W<'a> {
119 w: &'a mut W,
120}
121impl<'a> CC3_W<'a> {
122 #[doc = r"Sets the field bit"]
123 #[inline(always)]
124 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
125 #[doc = r"Clears the field bit"]
126 #[inline(always)]
127 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
128 #[doc = r"Writes raw bits to the field"]
129 #[inline(always)]
130 pub fn bit(self, value: bool) -> &'a mut W {
131 self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
132 self.w
133 }
134}
135#[doc = "Write proxy for field `ICBOF0`"]
136pub struct ICBOF0_W<'a> {
137 w: &'a mut W,
138}
139impl<'a> ICBOF0_W<'a> {
140 #[doc = r"Sets the field bit"]
141 #[inline(always)]
142 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
143 #[doc = r"Clears the field bit"]
144 #[inline(always)]
145 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
146 #[doc = r"Writes raw bits to the field"]
147 #[inline(always)]
148 pub fn bit(self, value: bool) -> &'a mut W {
149 self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
150 self.w
151 }
152}
153#[doc = "Write proxy for field `ICBOF1`"]
154pub struct ICBOF1_W<'a> {
155 w: &'a mut W,
156}
157impl<'a> ICBOF1_W<'a> {
158 #[doc = r"Sets the field bit"]
159 #[inline(always)]
160 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
161 #[doc = r"Clears the field bit"]
162 #[inline(always)]
163 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
164 #[doc = r"Writes raw bits to the field"]
165 #[inline(always)]
166 pub fn bit(self, value: bool) -> &'a mut W {
167 self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9);
168 self.w
169 }
170}
171#[doc = "Write proxy for field `ICBOF2`"]
172pub struct ICBOF2_W<'a> {
173 w: &'a mut W,
174}
175impl<'a> ICBOF2_W<'a> {
176 #[doc = r"Sets the field bit"]
177 #[inline(always)]
178 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
179 #[doc = r"Clears the field bit"]
180 #[inline(always)]
181 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
182 #[doc = r"Writes raw bits to the field"]
183 #[inline(always)]
184 pub fn bit(self, value: bool) -> &'a mut W {
185 self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10);
186 self.w
187 }
188}
189#[doc = "Write proxy for field `ICBOF3`"]
190pub struct ICBOF3_W<'a> {
191 w: &'a mut W,
192}
193impl<'a> ICBOF3_W<'a> {
194 #[doc = r"Sets the field bit"]
195 #[inline(always)]
196 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
197 #[doc = r"Clears the field bit"]
198 #[inline(always)]
199 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
200 #[doc = r"Writes raw bits to the field"]
201 #[inline(always)]
202 pub fn bit(self, value: bool) -> &'a mut W {
203 self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11);
204 self.w
205 }
206}
207impl W {
208 #[doc = "Bit 0 - Clear OF Interrupt Flag"]
209 #[inline(always)]
210 pub fn of(&mut self) -> OF_W { OF_W { w: self } }
211 #[doc = "Bit 1 - Clear UF Interrupt Flag"]
212 #[inline(always)]
213 pub fn uf(&mut self) -> UF_W { UF_W { w: self } }
214 #[doc = "Bit 2 - Clear DIRCHG Interrupt Flag"]
215 #[inline(always)]
216 pub fn dirchg(&mut self) -> DIRCHG_W { DIRCHG_W { w: self } }
217 #[doc = "Bit 4 - Clear CC0 Interrupt Flag"]
218 #[inline(always)]
219 pub fn cc0(&mut self) -> CC0_W { CC0_W { w: self } }
220 #[doc = "Bit 5 - Clear CC1 Interrupt Flag"]
221 #[inline(always)]
222 pub fn cc1(&mut self) -> CC1_W { CC1_W { w: self } }
223 #[doc = "Bit 6 - Clear CC2 Interrupt Flag"]
224 #[inline(always)]
225 pub fn cc2(&mut self) -> CC2_W { CC2_W { w: self } }
226 #[doc = "Bit 7 - Clear CC3 Interrupt Flag"]
227 #[inline(always)]
228 pub fn cc3(&mut self) -> CC3_W { CC3_W { w: self } }
229 #[doc = "Bit 8 - Clear ICBOF0 Interrupt Flag"]
230 #[inline(always)]
231 pub fn icbof0(&mut self) -> ICBOF0_W { ICBOF0_W { w: self } }
232 #[doc = "Bit 9 - Clear ICBOF1 Interrupt Flag"]
233 #[inline(always)]
234 pub fn icbof1(&mut self) -> ICBOF1_W { ICBOF1_W { w: self } }
235 #[doc = "Bit 10 - Clear ICBOF2 Interrupt Flag"]
236 #[inline(always)]
237 pub fn icbof2(&mut self) -> ICBOF2_W { ICBOF2_W { w: self } }
238 #[doc = "Bit 11 - Clear ICBOF3 Interrupt Flag"]
239 #[inline(always)]
240 pub fn icbof3(&mut self) -> ICBOF3_W { ICBOF3_W { w: self } }
241}