efr32xg1/timer0/if_/
mod.rs1#[doc = r" Value read from the register"]
2pub struct R {
3 bits: u32,
4}
5impl super::IF {
6 #[doc = r" Reads the contents of the register"]
7 #[inline]
8 pub fn read(&self) -> R {
9 R {
10 bits: self.register.get(),
11 }
12 }
13}
14#[doc = r" Value of the field"]
15pub struct OFR {
16 bits: bool,
17}
18impl OFR {
19 #[doc = r" Value of the field as raw bits"]
20 #[inline]
21 pub fn bit(&self) -> bool {
22 self.bits
23 }
24 #[doc = r" Returns `true` if the bit is clear (0)"]
25 #[inline]
26 pub fn bit_is_clear(&self) -> bool {
27 !self.bit()
28 }
29 #[doc = r" Returns `true` if the bit is set (1)"]
30 #[inline]
31 pub fn bit_is_set(&self) -> bool {
32 self.bit()
33 }
34}
35#[doc = r" Value of the field"]
36pub struct UFR {
37 bits: bool,
38}
39impl UFR {
40 #[doc = r" Value of the field as raw bits"]
41 #[inline]
42 pub fn bit(&self) -> bool {
43 self.bits
44 }
45 #[doc = r" Returns `true` if the bit is clear (0)"]
46 #[inline]
47 pub fn bit_is_clear(&self) -> bool {
48 !self.bit()
49 }
50 #[doc = r" Returns `true` if the bit is set (1)"]
51 #[inline]
52 pub fn bit_is_set(&self) -> bool {
53 self.bit()
54 }
55}
56#[doc = r" Value of the field"]
57pub struct DIRCHGR {
58 bits: bool,
59}
60impl DIRCHGR {
61 #[doc = r" Value of the field as raw bits"]
62 #[inline]
63 pub fn bit(&self) -> bool {
64 self.bits
65 }
66 #[doc = r" Returns `true` if the bit is clear (0)"]
67 #[inline]
68 pub fn bit_is_clear(&self) -> bool {
69 !self.bit()
70 }
71 #[doc = r" Returns `true` if the bit is set (1)"]
72 #[inline]
73 pub fn bit_is_set(&self) -> bool {
74 self.bit()
75 }
76}
77#[doc = r" Value of the field"]
78pub struct CC0R {
79 bits: bool,
80}
81impl CC0R {
82 #[doc = r" Value of the field as raw bits"]
83 #[inline]
84 pub fn bit(&self) -> bool {
85 self.bits
86 }
87 #[doc = r" Returns `true` if the bit is clear (0)"]
88 #[inline]
89 pub fn bit_is_clear(&self) -> bool {
90 !self.bit()
91 }
92 #[doc = r" Returns `true` if the bit is set (1)"]
93 #[inline]
94 pub fn bit_is_set(&self) -> bool {
95 self.bit()
96 }
97}
98#[doc = r" Value of the field"]
99pub struct CC1R {
100 bits: bool,
101}
102impl CC1R {
103 #[doc = r" Value of the field as raw bits"]
104 #[inline]
105 pub fn bit(&self) -> bool {
106 self.bits
107 }
108 #[doc = r" Returns `true` if the bit is clear (0)"]
109 #[inline]
110 pub fn bit_is_clear(&self) -> bool {
111 !self.bit()
112 }
113 #[doc = r" Returns `true` if the bit is set (1)"]
114 #[inline]
115 pub fn bit_is_set(&self) -> bool {
116 self.bit()
117 }
118}
119#[doc = r" Value of the field"]
120pub struct CC2R {
121 bits: bool,
122}
123impl CC2R {
124 #[doc = r" Value of the field as raw bits"]
125 #[inline]
126 pub fn bit(&self) -> bool {
127 self.bits
128 }
129 #[doc = r" Returns `true` if the bit is clear (0)"]
130 #[inline]
131 pub fn bit_is_clear(&self) -> bool {
132 !self.bit()
133 }
134 #[doc = r" Returns `true` if the bit is set (1)"]
135 #[inline]
136 pub fn bit_is_set(&self) -> bool {
137 self.bit()
138 }
139}
140#[doc = r" Value of the field"]
141pub struct CC3R {
142 bits: bool,
143}
144impl CC3R {
145 #[doc = r" Value of the field as raw bits"]
146 #[inline]
147 pub fn bit(&self) -> bool {
148 self.bits
149 }
150 #[doc = r" Returns `true` if the bit is clear (0)"]
151 #[inline]
152 pub fn bit_is_clear(&self) -> bool {
153 !self.bit()
154 }
155 #[doc = r" Returns `true` if the bit is set (1)"]
156 #[inline]
157 pub fn bit_is_set(&self) -> bool {
158 self.bit()
159 }
160}
161#[doc = r" Value of the field"]
162pub struct ICBOF0R {
163 bits: bool,
164}
165impl ICBOF0R {
166 #[doc = r" Value of the field as raw bits"]
167 #[inline]
168 pub fn bit(&self) -> bool {
169 self.bits
170 }
171 #[doc = r" Returns `true` if the bit is clear (0)"]
172 #[inline]
173 pub fn bit_is_clear(&self) -> bool {
174 !self.bit()
175 }
176 #[doc = r" Returns `true` if the bit is set (1)"]
177 #[inline]
178 pub fn bit_is_set(&self) -> bool {
179 self.bit()
180 }
181}
182#[doc = r" Value of the field"]
183pub struct ICBOF1R {
184 bits: bool,
185}
186impl ICBOF1R {
187 #[doc = r" Value of the field as raw bits"]
188 #[inline]
189 pub fn bit(&self) -> bool {
190 self.bits
191 }
192 #[doc = r" Returns `true` if the bit is clear (0)"]
193 #[inline]
194 pub fn bit_is_clear(&self) -> bool {
195 !self.bit()
196 }
197 #[doc = r" Returns `true` if the bit is set (1)"]
198 #[inline]
199 pub fn bit_is_set(&self) -> bool {
200 self.bit()
201 }
202}
203#[doc = r" Value of the field"]
204pub struct ICBOF2R {
205 bits: bool,
206}
207impl ICBOF2R {
208 #[doc = r" Value of the field as raw bits"]
209 #[inline]
210 pub fn bit(&self) -> bool {
211 self.bits
212 }
213 #[doc = r" Returns `true` if the bit is clear (0)"]
214 #[inline]
215 pub fn bit_is_clear(&self) -> bool {
216 !self.bit()
217 }
218 #[doc = r" Returns `true` if the bit is set (1)"]
219 #[inline]
220 pub fn bit_is_set(&self) -> bool {
221 self.bit()
222 }
223}
224#[doc = r" Value of the field"]
225pub struct ICBOF3R {
226 bits: bool,
227}
228impl ICBOF3R {
229 #[doc = r" Value of the field as raw bits"]
230 #[inline]
231 pub fn bit(&self) -> bool {
232 self.bits
233 }
234 #[doc = r" Returns `true` if the bit is clear (0)"]
235 #[inline]
236 pub fn bit_is_clear(&self) -> bool {
237 !self.bit()
238 }
239 #[doc = r" Returns `true` if the bit is set (1)"]
240 #[inline]
241 pub fn bit_is_set(&self) -> bool {
242 self.bit()
243 }
244}
245impl R {
246 #[doc = r" Value of the register as raw bits"]
247 #[inline]
248 pub fn bits(&self) -> u32 {
249 self.bits
250 }
251 #[doc = "Bit 0 - Overflow Interrupt Flag"]
252 #[inline]
253 pub fn of(&self) -> OFR {
254 let bits = {
255 const MASK: bool = true;
256 const OFFSET: u8 = 0;
257 ((self.bits >> OFFSET) & MASK as u32) != 0
258 };
259 OFR { bits }
260 }
261 #[doc = "Bit 1 - Underflow Interrupt Flag"]
262 #[inline]
263 pub fn uf(&self) -> UFR {
264 let bits = {
265 const MASK: bool = true;
266 const OFFSET: u8 = 1;
267 ((self.bits >> OFFSET) & MASK as u32) != 0
268 };
269 UFR { bits }
270 }
271 #[doc = "Bit 2 - Direction Change Detect Interrupt Flag"]
272 #[inline]
273 pub fn dirchg(&self) -> DIRCHGR {
274 let bits = {
275 const MASK: bool = true;
276 const OFFSET: u8 = 2;
277 ((self.bits >> OFFSET) & MASK as u32) != 0
278 };
279 DIRCHGR { bits }
280 }
281 #[doc = "Bit 4 - CC Channel 0 Interrupt Flag"]
282 #[inline]
283 pub fn cc0(&self) -> CC0R {
284 let bits = {
285 const MASK: bool = true;
286 const OFFSET: u8 = 4;
287 ((self.bits >> OFFSET) & MASK as u32) != 0
288 };
289 CC0R { bits }
290 }
291 #[doc = "Bit 5 - CC Channel 1 Interrupt Flag"]
292 #[inline]
293 pub fn cc1(&self) -> CC1R {
294 let bits = {
295 const MASK: bool = true;
296 const OFFSET: u8 = 5;
297 ((self.bits >> OFFSET) & MASK as u32) != 0
298 };
299 CC1R { bits }
300 }
301 #[doc = "Bit 6 - CC Channel 2 Interrupt Flag"]
302 #[inline]
303 pub fn cc2(&self) -> CC2R {
304 let bits = {
305 const MASK: bool = true;
306 const OFFSET: u8 = 6;
307 ((self.bits >> OFFSET) & MASK as u32) != 0
308 };
309 CC2R { bits }
310 }
311 #[doc = "Bit 7 - CC Channel 3 Interrupt Flag"]
312 #[inline]
313 pub fn cc3(&self) -> CC3R {
314 let bits = {
315 const MASK: bool = true;
316 const OFFSET: u8 = 7;
317 ((self.bits >> OFFSET) & MASK as u32) != 0
318 };
319 CC3R { bits }
320 }
321 #[doc = "Bit 8 - CC Channel 0 Input Capture Buffer Overflow Interrupt Flag"]
322 #[inline]
323 pub fn icbof0(&self) -> ICBOF0R {
324 let bits = {
325 const MASK: bool = true;
326 const OFFSET: u8 = 8;
327 ((self.bits >> OFFSET) & MASK as u32) != 0
328 };
329 ICBOF0R { bits }
330 }
331 #[doc = "Bit 9 - CC Channel 1 Input Capture Buffer Overflow Interrupt Flag"]
332 #[inline]
333 pub fn icbof1(&self) -> ICBOF1R {
334 let bits = {
335 const MASK: bool = true;
336 const OFFSET: u8 = 9;
337 ((self.bits >> OFFSET) & MASK as u32) != 0
338 };
339 ICBOF1R { bits }
340 }
341 #[doc = "Bit 10 - CC Channel 2 Input Capture Buffer Overflow Interrupt Flag"]
342 #[inline]
343 pub fn icbof2(&self) -> ICBOF2R {
344 let bits = {
345 const MASK: bool = true;
346 const OFFSET: u8 = 10;
347 ((self.bits >> OFFSET) & MASK as u32) != 0
348 };
349 ICBOF2R { bits }
350 }
351 #[doc = "Bit 11 - CC Channel 3 Input Capture Buffer Overflow Interrupt Flag"]
352 #[inline]
353 pub fn icbof3(&self) -> ICBOF3R {
354 let bits = {
355 const MASK: bool = true;
356 const OFFSET: u8 = 11;
357 ((self.bits >> OFFSET) & MASK as u32) != 0
358 };
359 ICBOF3R { bits }
360 }
361}