1#[doc = r" Value read from the register"]
2pub struct R {
3    bits: u32,
4}
5#[doc = r" Value to write to the register"]
6pub struct W {
7    bits: u32,
8}
9impl super::SR3 {
10    #[doc = r" Modifies the contents of the register"]
11    #[inline]
12    pub fn modify<F>(&self, f: F)
13    where
14        for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
15    {
16        let bits = self.register.get();
17        let r = R { bits: bits };
18        let mut w = W { bits: bits };
19        f(&r, &mut w);
20        self.register.set(w.bits);
21    }
22    #[doc = r" Reads the contents of the register"]
23    #[inline]
24    pub fn read(&self) -> R {
25        R {
26            bits: self.register.get(),
27        }
28    }
29    #[doc = r" Writes to the register"]
30    #[inline]
31    pub fn write<F>(&self, f: F)
32    where
33        F: FnOnce(&mut W) -> &mut W,
34    {
35        let mut w = W::reset_value();
36        f(&mut w);
37        self.register.set(w.bits);
38    }
39    #[doc = r" Writes the reset value to the register"]
40    #[inline]
41    pub fn reset(&self) {
42        self.write(|w| w)
43    }
44}
45#[doc = r" Value of the field"]
46pub struct FEMPTR {
47    bits: bool,
48}
49impl FEMPTR {
50    #[doc = r" Value of the field as raw bits"]
51    #[inline]
52    pub fn bit(&self) -> bool {
53        self.bits
54    }
55    #[doc = r" Returns `true` if the bit is clear (0)"]
56    #[inline]
57    pub fn bit_is_clear(&self) -> bool {
58        !self.bit()
59    }
60    #[doc = r" Returns `true` if the bit is set (1)"]
61    #[inline]
62    pub fn bit_is_set(&self) -> bool {
63        self.bit()
64    }
65}
66#[doc = r" Value of the field"]
67pub struct IFENR {
68    bits: bool,
69}
70impl IFENR {
71    #[doc = r" Value of the field as raw bits"]
72    #[inline]
73    pub fn bit(&self) -> bool {
74        self.bits
75    }
76    #[doc = r" Returns `true` if the bit is clear (0)"]
77    #[inline]
78    pub fn bit_is_clear(&self) -> bool {
79        !self.bit()
80    }
81    #[doc = r" Returns `true` if the bit is set (1)"]
82    #[inline]
83    pub fn bit_is_set(&self) -> bool {
84        self.bit()
85    }
86}
87#[doc = r" Value of the field"]
88pub struct ILENR {
89    bits: bool,
90}
91impl ILENR {
92    #[doc = r" Value of the field as raw bits"]
93    #[inline]
94    pub fn bit(&self) -> bool {
95        self.bits
96    }
97    #[doc = r" Returns `true` if the bit is clear (0)"]
98    #[inline]
99    pub fn bit_is_clear(&self) -> bool {
100        !self.bit()
101    }
102    #[doc = r" Returns `true` if the bit is set (1)"]
103    #[inline]
104    pub fn bit_is_set(&self) -> bool {
105        self.bit()
106    }
107}
108#[doc = r" Value of the field"]
109pub struct IRENR {
110    bits: bool,
111}
112impl IRENR {
113    #[doc = r" Value of the field as raw bits"]
114    #[inline]
115    pub fn bit(&self) -> bool {
116        self.bits
117    }
118    #[doc = r" Returns `true` if the bit is clear (0)"]
119    #[inline]
120    pub fn bit_is_clear(&self) -> bool {
121        !self.bit()
122    }
123    #[doc = r" Returns `true` if the bit is set (1)"]
124    #[inline]
125    pub fn bit_is_set(&self) -> bool {
126        self.bit()
127    }
128}
129#[doc = r" Value of the field"]
130pub struct IFSR {
131    bits: bool,
132}
133impl IFSR {
134    #[doc = r" Value of the field as raw bits"]
135    #[inline]
136    pub fn bit(&self) -> bool {
137        self.bits
138    }
139    #[doc = r" Returns `true` if the bit is clear (0)"]
140    #[inline]
141    pub fn bit_is_clear(&self) -> bool {
142        !self.bit()
143    }
144    #[doc = r" Returns `true` if the bit is set (1)"]
145    #[inline]
146    pub fn bit_is_set(&self) -> bool {
147        self.bit()
148    }
149}
150#[doc = r" Value of the field"]
151pub struct ILSR {
152    bits: bool,
153}
154impl ILSR {
155    #[doc = r" Value of the field as raw bits"]
156    #[inline]
157    pub fn bit(&self) -> bool {
158        self.bits
159    }
160    #[doc = r" Returns `true` if the bit is clear (0)"]
161    #[inline]
162    pub fn bit_is_clear(&self) -> bool {
163        !self.bit()
164    }
165    #[doc = r" Returns `true` if the bit is set (1)"]
166    #[inline]
167    pub fn bit_is_set(&self) -> bool {
168        self.bit()
169    }
170}
171#[doc = r" Value of the field"]
172pub struct IRSR {
173    bits: bool,
174}
175impl IRSR {
176    #[doc = r" Value of the field as raw bits"]
177    #[inline]
178    pub fn bit(&self) -> bool {
179        self.bits
180    }
181    #[doc = r" Returns `true` if the bit is clear (0)"]
182    #[inline]
183    pub fn bit_is_clear(&self) -> bool {
184        !self.bit()
185    }
186    #[doc = r" Returns `true` if the bit is set (1)"]
187    #[inline]
188    pub fn bit_is_set(&self) -> bool {
189        self.bit()
190    }
191}
192#[doc = r" Proxy"]
193pub struct _IFENW<'a> {
194    w: &'a mut W,
195}
196impl<'a> _IFENW<'a> {
197    #[doc = r" Sets the field bit"]
198    pub fn set_bit(self) -> &'a mut W {
199        self.bit(true)
200    }
201    #[doc = r" Clears the field bit"]
202    pub fn clear_bit(self) -> &'a mut W {
203        self.bit(false)
204    }
205    #[doc = r" Writes raw bits to the field"]
206    #[inline]
207    pub fn bit(self, value: bool) -> &'a mut W {
208        const MASK: bool = true;
209        const OFFSET: u8 = 5;
210        self.w.bits &= !((MASK as u32) << OFFSET);
211        self.w.bits |= ((value & MASK) as u32) << OFFSET;
212        self.w
213    }
214}
215#[doc = r" Proxy"]
216pub struct _ILENW<'a> {
217    w: &'a mut W,
218}
219impl<'a> _ILENW<'a> {
220    #[doc = r" Sets the field bit"]
221    pub fn set_bit(self) -> &'a mut W {
222        self.bit(true)
223    }
224    #[doc = r" Clears the field bit"]
225    pub fn clear_bit(self) -> &'a mut W {
226        self.bit(false)
227    }
228    #[doc = r" Writes raw bits to the field"]
229    #[inline]
230    pub fn bit(self, value: bool) -> &'a mut W {
231        const MASK: bool = true;
232        const OFFSET: u8 = 4;
233        self.w.bits &= !((MASK as u32) << OFFSET);
234        self.w.bits |= ((value & MASK) as u32) << OFFSET;
235        self.w
236    }
237}
238#[doc = r" Proxy"]
239pub struct _IRENW<'a> {
240    w: &'a mut W,
241}
242impl<'a> _IRENW<'a> {
243    #[doc = r" Sets the field bit"]
244    pub fn set_bit(self) -> &'a mut W {
245        self.bit(true)
246    }
247    #[doc = r" Clears the field bit"]
248    pub fn clear_bit(self) -> &'a mut W {
249        self.bit(false)
250    }
251    #[doc = r" Writes raw bits to the field"]
252    #[inline]
253    pub fn bit(self, value: bool) -> &'a mut W {
254        const MASK: bool = true;
255        const OFFSET: u8 = 3;
256        self.w.bits &= !((MASK as u32) << OFFSET);
257        self.w.bits |= ((value & MASK) as u32) << OFFSET;
258        self.w
259    }
260}
261#[doc = r" Proxy"]
262pub struct _IFSW<'a> {
263    w: &'a mut W,
264}
265impl<'a> _IFSW<'a> {
266    #[doc = r" Sets the field bit"]
267    pub fn set_bit(self) -> &'a mut W {
268        self.bit(true)
269    }
270    #[doc = r" Clears the field bit"]
271    pub fn clear_bit(self) -> &'a mut W {
272        self.bit(false)
273    }
274    #[doc = r" Writes raw bits to the field"]
275    #[inline]
276    pub fn bit(self, value: bool) -> &'a mut W {
277        const MASK: bool = true;
278        const OFFSET: u8 = 2;
279        self.w.bits &= !((MASK as u32) << OFFSET);
280        self.w.bits |= ((value & MASK) as u32) << OFFSET;
281        self.w
282    }
283}
284#[doc = r" Proxy"]
285pub struct _ILSW<'a> {
286    w: &'a mut W,
287}
288impl<'a> _ILSW<'a> {
289    #[doc = r" Sets the field bit"]
290    pub fn set_bit(self) -> &'a mut W {
291        self.bit(true)
292    }
293    #[doc = r" Clears the field bit"]
294    pub fn clear_bit(self) -> &'a mut W {
295        self.bit(false)
296    }
297    #[doc = r" Writes raw bits to the field"]
298    #[inline]
299    pub fn bit(self, value: bool) -> &'a mut W {
300        const MASK: bool = true;
301        const OFFSET: u8 = 1;
302        self.w.bits &= !((MASK as u32) << OFFSET);
303        self.w.bits |= ((value & MASK) as u32) << OFFSET;
304        self.w
305    }
306}
307#[doc = r" Proxy"]
308pub struct _IRSW<'a> {
309    w: &'a mut W,
310}
311impl<'a> _IRSW<'a> {
312    #[doc = r" Sets the field bit"]
313    pub fn set_bit(self) -> &'a mut W {
314        self.bit(true)
315    }
316    #[doc = r" Clears the field bit"]
317    pub fn clear_bit(self) -> &'a mut W {
318        self.bit(false)
319    }
320    #[doc = r" Writes raw bits to the field"]
321    #[inline]
322    pub fn bit(self, value: bool) -> &'a mut W {
323        const MASK: bool = true;
324        const OFFSET: u8 = 0;
325        self.w.bits &= !((MASK as u32) << OFFSET);
326        self.w.bits |= ((value & MASK) as u32) << OFFSET;
327        self.w
328    }
329}
330impl R {
331    #[doc = r" Value of the register as raw bits"]
332    #[inline]
333    pub fn bits(&self) -> u32 {
334        self.bits
335    }
336    #[doc = "Bit 6 - FEMPT"]
337    #[inline]
338    pub fn fempt(&self) -> FEMPTR {
339        let bits = {
340            const MASK: bool = true;
341            const OFFSET: u8 = 6;
342            ((self.bits >> OFFSET) & MASK as u32) != 0
343        };
344        FEMPTR { bits }
345    }
346    #[doc = "Bit 5 - IFEN"]
347    #[inline]
348    pub fn ifen(&self) -> IFENR {
349        let bits = {
350            const MASK: bool = true;
351            const OFFSET: u8 = 5;
352            ((self.bits >> OFFSET) & MASK as u32) != 0
353        };
354        IFENR { bits }
355    }
356    #[doc = "Bit 4 - ILEN"]
357    #[inline]
358    pub fn ilen(&self) -> ILENR {
359        let bits = {
360            const MASK: bool = true;
361            const OFFSET: u8 = 4;
362            ((self.bits >> OFFSET) & MASK as u32) != 0
363        };
364        ILENR { bits }
365    }
366    #[doc = "Bit 3 - IREN"]
367    #[inline]
368    pub fn iren(&self) -> IRENR {
369        let bits = {
370            const MASK: bool = true;
371            const OFFSET: u8 = 3;
372            ((self.bits >> OFFSET) & MASK as u32) != 0
373        };
374        IRENR { bits }
375    }
376    #[doc = "Bit 2 - IFS"]
377    #[inline]
378    pub fn ifs(&self) -> IFSR {
379        let bits = {
380            const MASK: bool = true;
381            const OFFSET: u8 = 2;
382            ((self.bits >> OFFSET) & MASK as u32) != 0
383        };
384        IFSR { bits }
385    }
386    #[doc = "Bit 1 - ILS"]
387    #[inline]
388    pub fn ils(&self) -> ILSR {
389        let bits = {
390            const MASK: bool = true;
391            const OFFSET: u8 = 1;
392            ((self.bits >> OFFSET) & MASK as u32) != 0
393        };
394        ILSR { bits }
395    }
396    #[doc = "Bit 0 - IRS"]
397    #[inline]
398    pub fn irs(&self) -> IRSR {
399        let bits = {
400            const MASK: bool = true;
401            const OFFSET: u8 = 0;
402            ((self.bits >> OFFSET) & MASK as u32) != 0
403        };
404        IRSR { bits }
405    }
406}
407impl W {
408    #[doc = r" Reset value of the register"]
409    #[inline]
410    pub fn reset_value() -> W {
411        W { bits: 64 }
412    }
413    #[doc = r" Writes raw bits to the register"]
414    #[inline]
415    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
416        self.bits = bits;
417        self
418    }
419    #[doc = "Bit 5 - IFEN"]
420    #[inline]
421    pub fn ifen(&mut self) -> _IFENW {
422        _IFENW { w: self }
423    }
424    #[doc = "Bit 4 - ILEN"]
425    #[inline]
426    pub fn ilen(&mut self) -> _ILENW {
427        _ILENW { w: self }
428    }
429    #[doc = "Bit 3 - IREN"]
430    #[inline]
431    pub fn iren(&mut self) -> _IRENW {
432        _IRENW { w: self }
433    }
434    #[doc = "Bit 2 - IFS"]
435    #[inline]
436    pub fn ifs(&mut self) -> _IFSW {
437        _IFSW { w: self }
438    }
439    #[doc = "Bit 1 - ILS"]
440    #[inline]
441    pub fn ils(&mut self) -> _ILSW {
442        _ILSW { w: self }
443    }
444    #[doc = "Bit 0 - IRS"]
445    #[inline]
446    pub fn irs(&mut self) -> _IRSW {
447        _IRSW { w: self }
448    }
449}