1#[doc = "Reader of register IEN"]
2pub type R = crate::R<u32, super::IEN>;
3#[doc = "Writer for register IEN"]
4pub type W = crate::W<u32, super::IEN>;
5#[doc = "Register IEN `reset()`'s with value 0"]
6impl crate::ResetValue for super::IEN {
7 type Type = u32;
8 #[inline(always)]
9 fn reset_value() -> Self::Type { 0 }
10}
11#[doc = "Reader of field `OF`"]
12pub type OF_R = crate::R<bool, bool>;
13#[doc = "Write proxy for field `OF`"]
14pub struct OF_W<'a> {
15 w: &'a mut W,
16}
17impl<'a> OF_W<'a> {
18 #[doc = r"Sets the field bit"]
19 #[inline(always)]
20 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
21 #[doc = r"Clears the field bit"]
22 #[inline(always)]
23 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
24 #[doc = r"Writes raw bits to the field"]
25 #[inline(always)]
26 pub fn bit(self, value: bool) -> &'a mut W {
27 self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
28 self.w
29 }
30}
31#[doc = "Reader of field `UF`"]
32pub type UF_R = crate::R<bool, bool>;
33#[doc = "Write proxy for field `UF`"]
34pub struct UF_W<'a> {
35 w: &'a mut W,
36}
37impl<'a> UF_W<'a> {
38 #[doc = r"Sets the field bit"]
39 #[inline(always)]
40 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
41 #[doc = r"Clears the field bit"]
42 #[inline(always)]
43 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
44 #[doc = r"Writes raw bits to the field"]
45 #[inline(always)]
46 pub fn bit(self, value: bool) -> &'a mut W {
47 self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
48 self.w
49 }
50}
51#[doc = "Reader of field `DIRCHG`"]
52pub type DIRCHG_R = crate::R<bool, bool>;
53#[doc = "Write proxy for field `DIRCHG`"]
54pub struct DIRCHG_W<'a> {
55 w: &'a mut W,
56}
57impl<'a> DIRCHG_W<'a> {
58 #[doc = r"Sets the field bit"]
59 #[inline(always)]
60 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
61 #[doc = r"Clears the field bit"]
62 #[inline(always)]
63 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
64 #[doc = r"Writes raw bits to the field"]
65 #[inline(always)]
66 pub fn bit(self, value: bool) -> &'a mut W {
67 self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
68 self.w
69 }
70}
71#[doc = "Reader of field `CC0`"]
72pub type CC0_R = crate::R<bool, bool>;
73#[doc = "Write proxy for field `CC0`"]
74pub struct CC0_W<'a> {
75 w: &'a mut W,
76}
77impl<'a> CC0_W<'a> {
78 #[doc = r"Sets the field bit"]
79 #[inline(always)]
80 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
81 #[doc = r"Clears the field bit"]
82 #[inline(always)]
83 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
84 #[doc = r"Writes raw bits to the field"]
85 #[inline(always)]
86 pub fn bit(self, value: bool) -> &'a mut W {
87 self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
88 self.w
89 }
90}
91#[doc = "Reader of field `CC1`"]
92pub type CC1_R = crate::R<bool, bool>;
93#[doc = "Write proxy for field `CC1`"]
94pub struct CC1_W<'a> {
95 w: &'a mut W,
96}
97impl<'a> CC1_W<'a> {
98 #[doc = r"Sets the field bit"]
99 #[inline(always)]
100 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
101 #[doc = r"Clears the field bit"]
102 #[inline(always)]
103 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
104 #[doc = r"Writes raw bits to the field"]
105 #[inline(always)]
106 pub fn bit(self, value: bool) -> &'a mut W {
107 self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
108 self.w
109 }
110}
111#[doc = "Reader of field `CC2`"]
112pub type CC2_R = crate::R<bool, bool>;
113#[doc = "Write proxy for field `CC2`"]
114pub struct CC2_W<'a> {
115 w: &'a mut W,
116}
117impl<'a> CC2_W<'a> {
118 #[doc = r"Sets the field bit"]
119 #[inline(always)]
120 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
121 #[doc = r"Clears the field bit"]
122 #[inline(always)]
123 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
124 #[doc = r"Writes raw bits to the field"]
125 #[inline(always)]
126 pub fn bit(self, value: bool) -> &'a mut W {
127 self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
128 self.w
129 }
130}
131#[doc = "Reader of field `CC3`"]
132pub type CC3_R = crate::R<bool, bool>;
133#[doc = "Write proxy for field `CC3`"]
134pub struct CC3_W<'a> {
135 w: &'a mut W,
136}
137impl<'a> CC3_W<'a> {
138 #[doc = r"Sets the field bit"]
139 #[inline(always)]
140 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
141 #[doc = r"Clears the field bit"]
142 #[inline(always)]
143 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
144 #[doc = r"Writes raw bits to the field"]
145 #[inline(always)]
146 pub fn bit(self, value: bool) -> &'a mut W {
147 self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
148 self.w
149 }
150}
151#[doc = "Reader of field `ICBOF0`"]
152pub type ICBOF0_R = crate::R<bool, bool>;
153#[doc = "Write proxy for field `ICBOF0`"]
154pub struct ICBOF0_W<'a> {
155 w: &'a mut W,
156}
157impl<'a> ICBOF0_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 << 8)) | (((value as u32) & 0x01) << 8);
168 self.w
169 }
170}
171#[doc = "Reader of field `ICBOF1`"]
172pub type ICBOF1_R = crate::R<bool, bool>;
173#[doc = "Write proxy for field `ICBOF1`"]
174pub struct ICBOF1_W<'a> {
175 w: &'a mut W,
176}
177impl<'a> ICBOF1_W<'a> {
178 #[doc = r"Sets the field bit"]
179 #[inline(always)]
180 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
181 #[doc = r"Clears the field bit"]
182 #[inline(always)]
183 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
184 #[doc = r"Writes raw bits to the field"]
185 #[inline(always)]
186 pub fn bit(self, value: bool) -> &'a mut W {
187 self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9);
188 self.w
189 }
190}
191#[doc = "Reader of field `ICBOF2`"]
192pub type ICBOF2_R = crate::R<bool, bool>;
193#[doc = "Write proxy for field `ICBOF2`"]
194pub struct ICBOF2_W<'a> {
195 w: &'a mut W,
196}
197impl<'a> ICBOF2_W<'a> {
198 #[doc = r"Sets the field bit"]
199 #[inline(always)]
200 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
201 #[doc = r"Clears the field bit"]
202 #[inline(always)]
203 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
204 #[doc = r"Writes raw bits to the field"]
205 #[inline(always)]
206 pub fn bit(self, value: bool) -> &'a mut W {
207 self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10);
208 self.w
209 }
210}
211#[doc = "Reader of field `ICBOF3`"]
212pub type ICBOF3_R = crate::R<bool, bool>;
213#[doc = "Write proxy for field `ICBOF3`"]
214pub struct ICBOF3_W<'a> {
215 w: &'a mut W,
216}
217impl<'a> ICBOF3_W<'a> {
218 #[doc = r"Sets the field bit"]
219 #[inline(always)]
220 pub fn set_bit(self) -> &'a mut W { self.bit(true) }
221 #[doc = r"Clears the field bit"]
222 #[inline(always)]
223 pub fn clear_bit(self) -> &'a mut W { self.bit(false) }
224 #[doc = r"Writes raw bits to the field"]
225 #[inline(always)]
226 pub fn bit(self, value: bool) -> &'a mut W {
227 self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11);
228 self.w
229 }
230}
231impl R {
232 #[doc = "Bit 0 - OF Interrupt Enable"]
233 #[inline(always)]
234 pub fn of(&self) -> OF_R { OF_R::new((self.bits & 0x01) != 0) }
235 #[doc = "Bit 1 - UF Interrupt Enable"]
236 #[inline(always)]
237 pub fn uf(&self) -> UF_R { UF_R::new(((self.bits >> 1) & 0x01) != 0) }
238 #[doc = "Bit 2 - DIRCHG Interrupt Enable"]
239 #[inline(always)]
240 pub fn dirchg(&self) -> DIRCHG_R { DIRCHG_R::new(((self.bits >> 2) & 0x01) != 0) }
241 #[doc = "Bit 4 - CC0 Interrupt Enable"]
242 #[inline(always)]
243 pub fn cc0(&self) -> CC0_R { CC0_R::new(((self.bits >> 4) & 0x01) != 0) }
244 #[doc = "Bit 5 - CC1 Interrupt Enable"]
245 #[inline(always)]
246 pub fn cc1(&self) -> CC1_R { CC1_R::new(((self.bits >> 5) & 0x01) != 0) }
247 #[doc = "Bit 6 - CC2 Interrupt Enable"]
248 #[inline(always)]
249 pub fn cc2(&self) -> CC2_R { CC2_R::new(((self.bits >> 6) & 0x01) != 0) }
250 #[doc = "Bit 7 - CC3 Interrupt Enable"]
251 #[inline(always)]
252 pub fn cc3(&self) -> CC3_R { CC3_R::new(((self.bits >> 7) & 0x01) != 0) }
253 #[doc = "Bit 8 - ICBOF0 Interrupt Enable"]
254 #[inline(always)]
255 pub fn icbof0(&self) -> ICBOF0_R { ICBOF0_R::new(((self.bits >> 8) & 0x01) != 0) }
256 #[doc = "Bit 9 - ICBOF1 Interrupt Enable"]
257 #[inline(always)]
258 pub fn icbof1(&self) -> ICBOF1_R { ICBOF1_R::new(((self.bits >> 9) & 0x01) != 0) }
259 #[doc = "Bit 10 - ICBOF2 Interrupt Enable"]
260 #[inline(always)]
261 pub fn icbof2(&self) -> ICBOF2_R { ICBOF2_R::new(((self.bits >> 10) & 0x01) != 0) }
262 #[doc = "Bit 11 - ICBOF3 Interrupt Enable"]
263 #[inline(always)]
264 pub fn icbof3(&self) -> ICBOF3_R { ICBOF3_R::new(((self.bits >> 11) & 0x01) != 0) }
265}
266impl W {
267 #[doc = "Bit 0 - OF Interrupt Enable"]
268 #[inline(always)]
269 pub fn of(&mut self) -> OF_W { OF_W { w: self } }
270 #[doc = "Bit 1 - UF Interrupt Enable"]
271 #[inline(always)]
272 pub fn uf(&mut self) -> UF_W { UF_W { w: self } }
273 #[doc = "Bit 2 - DIRCHG Interrupt Enable"]
274 #[inline(always)]
275 pub fn dirchg(&mut self) -> DIRCHG_W { DIRCHG_W { w: self } }
276 #[doc = "Bit 4 - CC0 Interrupt Enable"]
277 #[inline(always)]
278 pub fn cc0(&mut self) -> CC0_W { CC0_W { w: self } }
279 #[doc = "Bit 5 - CC1 Interrupt Enable"]
280 #[inline(always)]
281 pub fn cc1(&mut self) -> CC1_W { CC1_W { w: self } }
282 #[doc = "Bit 6 - CC2 Interrupt Enable"]
283 #[inline(always)]
284 pub fn cc2(&mut self) -> CC2_W { CC2_W { w: self } }
285 #[doc = "Bit 7 - CC3 Interrupt Enable"]
286 #[inline(always)]
287 pub fn cc3(&mut self) -> CC3_W { CC3_W { w: self } }
288 #[doc = "Bit 8 - ICBOF0 Interrupt Enable"]
289 #[inline(always)]
290 pub fn icbof0(&mut self) -> ICBOF0_W { ICBOF0_W { w: self } }
291 #[doc = "Bit 9 - ICBOF1 Interrupt Enable"]
292 #[inline(always)]
293 pub fn icbof1(&mut self) -> ICBOF1_W { ICBOF1_W { w: self } }
294 #[doc = "Bit 10 - ICBOF2 Interrupt Enable"]
295 #[inline(always)]
296 pub fn icbof2(&mut self) -> ICBOF2_W { ICBOF2_W { w: self } }
297 #[doc = "Bit 11 - ICBOF3 Interrupt Enable"]
298 #[inline(always)]
299 pub fn icbof3(&mut self) -> ICBOF3_W { ICBOF3_W { w: self } }
300}