stm32l4x2_pac/tim2/
sr.rs

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::SR {
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 = "Possible values of the field `CC4OF`"]
46#[derive(Clone, Copy, Debug, PartialEq)]
47pub enum CC4OFR {
48    #[doc = "The counter value has been captured in TIMx_CCRx register while CCxIF flag was already set"]
49    OVERCAPTURE,
50    #[doc = r" Reserved"]
51    _Reserved(bool),
52}
53impl CC4OFR {
54    #[doc = r" Returns `true` if the bit is clear (0)"]
55    #[inline]
56    pub fn bit_is_clear(&self) -> bool {
57        !self.bit()
58    }
59    #[doc = r" Returns `true` if the bit is set (1)"]
60    #[inline]
61    pub fn bit_is_set(&self) -> bool {
62        self.bit()
63    }
64    #[doc = r" Value of the field as raw bits"]
65    #[inline]
66    pub fn bit(&self) -> bool {
67        match *self {
68            CC4OFR::OVERCAPTURE => true,
69            CC4OFR::_Reserved(bits) => bits,
70        }
71    }
72    #[allow(missing_docs)]
73    #[doc(hidden)]
74    #[inline]
75    pub fn _from(value: bool) -> CC4OFR {
76        match value {
77            true => CC4OFR::OVERCAPTURE,
78            i => CC4OFR::_Reserved(i),
79        }
80    }
81    #[doc = "Checks if the value of the field is `OVERCAPTURE`"]
82    #[inline]
83    pub fn is_overcapture(&self) -> bool {
84        *self == CC4OFR::OVERCAPTURE
85    }
86}
87#[doc = "Possible values of the field `CC3OF`"]
88pub type CC3OFR = CC4OFR;
89#[doc = "Possible values of the field `CC2OF`"]
90pub type CC2OFR = CC4OFR;
91#[doc = "Possible values of the field `CC1OF`"]
92pub type CC1OFR = CC4OFR;
93#[doc = "Possible values of the field `TIF`"]
94#[derive(Clone, Copy, Debug, PartialEq)]
95pub enum TIFR {
96    #[doc = "No trigger event occurred"]
97    NOTRIGGER,
98    #[doc = "Trigger interrupt pending"]
99    TRIGGER,
100}
101impl TIFR {
102    #[doc = r" Returns `true` if the bit is clear (0)"]
103    #[inline]
104    pub fn bit_is_clear(&self) -> bool {
105        !self.bit()
106    }
107    #[doc = r" Returns `true` if the bit is set (1)"]
108    #[inline]
109    pub fn bit_is_set(&self) -> bool {
110        self.bit()
111    }
112    #[doc = r" Value of the field as raw bits"]
113    #[inline]
114    pub fn bit(&self) -> bool {
115        match *self {
116            TIFR::NOTRIGGER => false,
117            TIFR::TRIGGER => true,
118        }
119    }
120    #[allow(missing_docs)]
121    #[doc(hidden)]
122    #[inline]
123    pub fn _from(value: bool) -> TIFR {
124        match value {
125            false => TIFR::NOTRIGGER,
126            true => TIFR::TRIGGER,
127        }
128    }
129    #[doc = "Checks if the value of the field is `NOTRIGGER`"]
130    #[inline]
131    pub fn is_no_trigger(&self) -> bool {
132        *self == TIFR::NOTRIGGER
133    }
134    #[doc = "Checks if the value of the field is `TRIGGER`"]
135    #[inline]
136    pub fn is_trigger(&self) -> bool {
137        *self == TIFR::TRIGGER
138    }
139}
140#[doc = "Possible values of the field `CC4IF`"]
141#[derive(Clone, Copy, Debug, PartialEq)]
142pub enum CC4IFR {
143    #[doc = "If CC1 is an output: The content of the counter TIMx_CNT matches the content of the TIMx_CCR1 register. If CC1 is an input: The counter value has been captured in TIMx_CCR1 register."]
144    MATCH,
145    #[doc = r" Reserved"]
146    _Reserved(bool),
147}
148impl CC4IFR {
149    #[doc = r" Returns `true` if the bit is clear (0)"]
150    #[inline]
151    pub fn bit_is_clear(&self) -> bool {
152        !self.bit()
153    }
154    #[doc = r" Returns `true` if the bit is set (1)"]
155    #[inline]
156    pub fn bit_is_set(&self) -> bool {
157        self.bit()
158    }
159    #[doc = r" Value of the field as raw bits"]
160    #[inline]
161    pub fn bit(&self) -> bool {
162        match *self {
163            CC4IFR::MATCH => true,
164            CC4IFR::_Reserved(bits) => bits,
165        }
166    }
167    #[allow(missing_docs)]
168    #[doc(hidden)]
169    #[inline]
170    pub fn _from(value: bool) -> CC4IFR {
171        match value {
172            true => CC4IFR::MATCH,
173            i => CC4IFR::_Reserved(i),
174        }
175    }
176    #[doc = "Checks if the value of the field is `MATCH`"]
177    #[inline]
178    pub fn is_match_(&self) -> bool {
179        *self == CC4IFR::MATCH
180    }
181}
182#[doc = "Possible values of the field `CC3IF`"]
183pub type CC3IFR = CC4IFR;
184#[doc = "Possible values of the field `CC2IF`"]
185pub type CC2IFR = CC4IFR;
186#[doc = "Possible values of the field `CC1IF`"]
187pub type CC1IFR = CC4IFR;
188#[doc = "Possible values of the field `UIF`"]
189#[derive(Clone, Copy, Debug, PartialEq)]
190pub enum UIFR {
191    #[doc = "No update occurred"]
192    CLEAR,
193    #[doc = "Update interrupt pending."]
194    UPDATEPENDING,
195}
196impl UIFR {
197    #[doc = r" Returns `true` if the bit is clear (0)"]
198    #[inline]
199    pub fn bit_is_clear(&self) -> bool {
200        !self.bit()
201    }
202    #[doc = r" Returns `true` if the bit is set (1)"]
203    #[inline]
204    pub fn bit_is_set(&self) -> bool {
205        self.bit()
206    }
207    #[doc = r" Value of the field as raw bits"]
208    #[inline]
209    pub fn bit(&self) -> bool {
210        match *self {
211            UIFR::CLEAR => false,
212            UIFR::UPDATEPENDING => true,
213        }
214    }
215    #[allow(missing_docs)]
216    #[doc(hidden)]
217    #[inline]
218    pub fn _from(value: bool) -> UIFR {
219        match value {
220            false => UIFR::CLEAR,
221            true => UIFR::UPDATEPENDING,
222        }
223    }
224    #[doc = "Checks if the value of the field is `CLEAR`"]
225    #[inline]
226    pub fn is_clear(&self) -> bool {
227        *self == UIFR::CLEAR
228    }
229    #[doc = "Checks if the value of the field is `UPDATEPENDING`"]
230    #[inline]
231    pub fn is_update_pending(&self) -> bool {
232        *self == UIFR::UPDATEPENDING
233    }
234}
235#[doc = "Values that can be written to the field `CC4OF`"]
236pub enum CC4OFW {
237    #[doc = "Clear flag"]
238    CLEAR,
239}
240impl CC4OFW {
241    #[allow(missing_docs)]
242    #[doc(hidden)]
243    #[inline]
244    pub fn _bits(&self) -> bool {
245        match *self {
246            CC4OFW::CLEAR => false,
247        }
248    }
249}
250#[doc = r" Proxy"]
251pub struct _CC4OFW<'a> {
252    w: &'a mut W,
253}
254impl<'a> _CC4OFW<'a> {
255    #[doc = r" Writes `variant` to the field"]
256    #[inline]
257    pub fn variant(self, variant: CC4OFW) -> &'a mut W {
258        {
259            self.bit(variant._bits())
260        }
261    }
262    #[doc = "Clear flag"]
263    #[inline]
264    pub fn clear(self) -> &'a mut W {
265        self.variant(CC4OFW::CLEAR)
266    }
267    #[doc = r" Sets the field bit"]
268    pub fn set_bit(self) -> &'a mut W {
269        self.bit(true)
270    }
271    #[doc = r" Clears the field bit"]
272    pub fn clear_bit(self) -> &'a mut W {
273        self.bit(false)
274    }
275    #[doc = r" Writes raw bits to the field"]
276    #[inline]
277    pub fn bit(self, value: bool) -> &'a mut W {
278        const MASK: bool = true;
279        const OFFSET: u8 = 12;
280        self.w.bits &= !((MASK as u32) << OFFSET);
281        self.w.bits |= ((value & MASK) as u32) << OFFSET;
282        self.w
283    }
284}
285#[doc = "Values that can be written to the field `CC3OF`"]
286pub type CC3OFW = CC4OFW;
287#[doc = r" Proxy"]
288pub struct _CC3OFW<'a> {
289    w: &'a mut W,
290}
291impl<'a> _CC3OFW<'a> {
292    #[doc = r" Writes `variant` to the field"]
293    #[inline]
294    pub fn variant(self, variant: CC3OFW) -> &'a mut W {
295        {
296            self.bit(variant._bits())
297        }
298    }
299    #[doc = "Clear flag"]
300    #[inline]
301    pub fn clear(self) -> &'a mut W {
302        self.variant(CC4OFW::CLEAR)
303    }
304    #[doc = r" Sets the field bit"]
305    pub fn set_bit(self) -> &'a mut W {
306        self.bit(true)
307    }
308    #[doc = r" Clears the field bit"]
309    pub fn clear_bit(self) -> &'a mut W {
310        self.bit(false)
311    }
312    #[doc = r" Writes raw bits to the field"]
313    #[inline]
314    pub fn bit(self, value: bool) -> &'a mut W {
315        const MASK: bool = true;
316        const OFFSET: u8 = 11;
317        self.w.bits &= !((MASK as u32) << OFFSET);
318        self.w.bits |= ((value & MASK) as u32) << OFFSET;
319        self.w
320    }
321}
322#[doc = "Values that can be written to the field `CC2OF`"]
323pub type CC2OFW = CC4OFW;
324#[doc = r" Proxy"]
325pub struct _CC2OFW<'a> {
326    w: &'a mut W,
327}
328impl<'a> _CC2OFW<'a> {
329    #[doc = r" Writes `variant` to the field"]
330    #[inline]
331    pub fn variant(self, variant: CC2OFW) -> &'a mut W {
332        {
333            self.bit(variant._bits())
334        }
335    }
336    #[doc = "Clear flag"]
337    #[inline]
338    pub fn clear(self) -> &'a mut W {
339        self.variant(CC4OFW::CLEAR)
340    }
341    #[doc = r" Sets the field bit"]
342    pub fn set_bit(self) -> &'a mut W {
343        self.bit(true)
344    }
345    #[doc = r" Clears the field bit"]
346    pub fn clear_bit(self) -> &'a mut W {
347        self.bit(false)
348    }
349    #[doc = r" Writes raw bits to the field"]
350    #[inline]
351    pub fn bit(self, value: bool) -> &'a mut W {
352        const MASK: bool = true;
353        const OFFSET: u8 = 10;
354        self.w.bits &= !((MASK as u32) << OFFSET);
355        self.w.bits |= ((value & MASK) as u32) << OFFSET;
356        self.w
357    }
358}
359#[doc = "Values that can be written to the field `CC1OF`"]
360pub type CC1OFW = CC4OFW;
361#[doc = r" Proxy"]
362pub struct _CC1OFW<'a> {
363    w: &'a mut W,
364}
365impl<'a> _CC1OFW<'a> {
366    #[doc = r" Writes `variant` to the field"]
367    #[inline]
368    pub fn variant(self, variant: CC1OFW) -> &'a mut W {
369        {
370            self.bit(variant._bits())
371        }
372    }
373    #[doc = "Clear flag"]
374    #[inline]
375    pub fn clear(self) -> &'a mut W {
376        self.variant(CC4OFW::CLEAR)
377    }
378    #[doc = r" Sets the field bit"]
379    pub fn set_bit(self) -> &'a mut W {
380        self.bit(true)
381    }
382    #[doc = r" Clears the field bit"]
383    pub fn clear_bit(self) -> &'a mut W {
384        self.bit(false)
385    }
386    #[doc = r" Writes raw bits to the field"]
387    #[inline]
388    pub fn bit(self, value: bool) -> &'a mut W {
389        const MASK: bool = true;
390        const OFFSET: u8 = 9;
391        self.w.bits &= !((MASK as u32) << OFFSET);
392        self.w.bits |= ((value & MASK) as u32) << OFFSET;
393        self.w
394    }
395}
396#[doc = "Values that can be written to the field `TIF`"]
397pub enum TIFW {
398    #[doc = "Clear flag"]
399    CLEAR,
400}
401impl TIFW {
402    #[allow(missing_docs)]
403    #[doc(hidden)]
404    #[inline]
405    pub fn _bits(&self) -> bool {
406        match *self {
407            TIFW::CLEAR => false,
408        }
409    }
410}
411#[doc = r" Proxy"]
412pub struct _TIFW<'a> {
413    w: &'a mut W,
414}
415impl<'a> _TIFW<'a> {
416    #[doc = r" Writes `variant` to the field"]
417    #[inline]
418    pub fn variant(self, variant: TIFW) -> &'a mut W {
419        {
420            self.bit(variant._bits())
421        }
422    }
423    #[doc = "Clear flag"]
424    #[inline]
425    pub fn clear(self) -> &'a mut W {
426        self.variant(TIFW::CLEAR)
427    }
428    #[doc = r" Sets the field bit"]
429    pub fn set_bit(self) -> &'a mut W {
430        self.bit(true)
431    }
432    #[doc = r" Clears the field bit"]
433    pub fn clear_bit(self) -> &'a mut W {
434        self.bit(false)
435    }
436    #[doc = r" Writes raw bits to the field"]
437    #[inline]
438    pub fn bit(self, value: bool) -> &'a mut W {
439        const MASK: bool = true;
440        const OFFSET: u8 = 6;
441        self.w.bits &= !((MASK as u32) << OFFSET);
442        self.w.bits |= ((value & MASK) as u32) << OFFSET;
443        self.w
444    }
445}
446#[doc = "Values that can be written to the field `CC4IF`"]
447pub enum CC4IFW {
448    #[doc = "Clear flag"]
449    CLEAR,
450}
451impl CC4IFW {
452    #[allow(missing_docs)]
453    #[doc(hidden)]
454    #[inline]
455    pub fn _bits(&self) -> bool {
456        match *self {
457            CC4IFW::CLEAR => false,
458        }
459    }
460}
461#[doc = r" Proxy"]
462pub struct _CC4IFW<'a> {
463    w: &'a mut W,
464}
465impl<'a> _CC4IFW<'a> {
466    #[doc = r" Writes `variant` to the field"]
467    #[inline]
468    pub fn variant(self, variant: CC4IFW) -> &'a mut W {
469        {
470            self.bit(variant._bits())
471        }
472    }
473    #[doc = "Clear flag"]
474    #[inline]
475    pub fn clear(self) -> &'a mut W {
476        self.variant(CC4IFW::CLEAR)
477    }
478    #[doc = r" Sets the field bit"]
479    pub fn set_bit(self) -> &'a mut W {
480        self.bit(true)
481    }
482    #[doc = r" Clears the field bit"]
483    pub fn clear_bit(self) -> &'a mut W {
484        self.bit(false)
485    }
486    #[doc = r" Writes raw bits to the field"]
487    #[inline]
488    pub fn bit(self, value: bool) -> &'a mut W {
489        const MASK: bool = true;
490        const OFFSET: u8 = 4;
491        self.w.bits &= !((MASK as u32) << OFFSET);
492        self.w.bits |= ((value & MASK) as u32) << OFFSET;
493        self.w
494    }
495}
496#[doc = "Values that can be written to the field `CC3IF`"]
497pub type CC3IFW = CC4IFW;
498#[doc = r" Proxy"]
499pub struct _CC3IFW<'a> {
500    w: &'a mut W,
501}
502impl<'a> _CC3IFW<'a> {
503    #[doc = r" Writes `variant` to the field"]
504    #[inline]
505    pub fn variant(self, variant: CC3IFW) -> &'a mut W {
506        {
507            self.bit(variant._bits())
508        }
509    }
510    #[doc = "Clear flag"]
511    #[inline]
512    pub fn clear(self) -> &'a mut W {
513        self.variant(CC4IFW::CLEAR)
514    }
515    #[doc = r" Sets the field bit"]
516    pub fn set_bit(self) -> &'a mut W {
517        self.bit(true)
518    }
519    #[doc = r" Clears the field bit"]
520    pub fn clear_bit(self) -> &'a mut W {
521        self.bit(false)
522    }
523    #[doc = r" Writes raw bits to the field"]
524    #[inline]
525    pub fn bit(self, value: bool) -> &'a mut W {
526        const MASK: bool = true;
527        const OFFSET: u8 = 3;
528        self.w.bits &= !((MASK as u32) << OFFSET);
529        self.w.bits |= ((value & MASK) as u32) << OFFSET;
530        self.w
531    }
532}
533#[doc = "Values that can be written to the field `CC2IF`"]
534pub type CC2IFW = CC4IFW;
535#[doc = r" Proxy"]
536pub struct _CC2IFW<'a> {
537    w: &'a mut W,
538}
539impl<'a> _CC2IFW<'a> {
540    #[doc = r" Writes `variant` to the field"]
541    #[inline]
542    pub fn variant(self, variant: CC2IFW) -> &'a mut W {
543        {
544            self.bit(variant._bits())
545        }
546    }
547    #[doc = "Clear flag"]
548    #[inline]
549    pub fn clear(self) -> &'a mut W {
550        self.variant(CC4IFW::CLEAR)
551    }
552    #[doc = r" Sets the field bit"]
553    pub fn set_bit(self) -> &'a mut W {
554        self.bit(true)
555    }
556    #[doc = r" Clears the field bit"]
557    pub fn clear_bit(self) -> &'a mut W {
558        self.bit(false)
559    }
560    #[doc = r" Writes raw bits to the field"]
561    #[inline]
562    pub fn bit(self, value: bool) -> &'a mut W {
563        const MASK: bool = true;
564        const OFFSET: u8 = 2;
565        self.w.bits &= !((MASK as u32) << OFFSET);
566        self.w.bits |= ((value & MASK) as u32) << OFFSET;
567        self.w
568    }
569}
570#[doc = "Values that can be written to the field `CC1IF`"]
571pub type CC1IFW = CC4IFW;
572#[doc = r" Proxy"]
573pub struct _CC1IFW<'a> {
574    w: &'a mut W,
575}
576impl<'a> _CC1IFW<'a> {
577    #[doc = r" Writes `variant` to the field"]
578    #[inline]
579    pub fn variant(self, variant: CC1IFW) -> &'a mut W {
580        {
581            self.bit(variant._bits())
582        }
583    }
584    #[doc = "Clear flag"]
585    #[inline]
586    pub fn clear(self) -> &'a mut W {
587        self.variant(CC4IFW::CLEAR)
588    }
589    #[doc = r" Sets the field bit"]
590    pub fn set_bit(self) -> &'a mut W {
591        self.bit(true)
592    }
593    #[doc = r" Clears the field bit"]
594    pub fn clear_bit(self) -> &'a mut W {
595        self.bit(false)
596    }
597    #[doc = r" Writes raw bits to the field"]
598    #[inline]
599    pub fn bit(self, value: bool) -> &'a mut W {
600        const MASK: bool = true;
601        const OFFSET: u8 = 1;
602        self.w.bits &= !((MASK as u32) << OFFSET);
603        self.w.bits |= ((value & MASK) as u32) << OFFSET;
604        self.w
605    }
606}
607#[doc = "Values that can be written to the field `UIF`"]
608pub enum UIFW {
609    #[doc = "No update occurred"]
610    CLEAR,
611    #[doc = "Update interrupt pending."]
612    UPDATEPENDING,
613}
614impl UIFW {
615    #[allow(missing_docs)]
616    #[doc(hidden)]
617    #[inline]
618    pub fn _bits(&self) -> bool {
619        match *self {
620            UIFW::CLEAR => false,
621            UIFW::UPDATEPENDING => true,
622        }
623    }
624}
625#[doc = r" Proxy"]
626pub struct _UIFW<'a> {
627    w: &'a mut W,
628}
629impl<'a> _UIFW<'a> {
630    #[doc = r" Writes `variant` to the field"]
631    #[inline]
632    pub fn variant(self, variant: UIFW) -> &'a mut W {
633        {
634            self.bit(variant._bits())
635        }
636    }
637    #[doc = "No update occurred"]
638    #[inline]
639    pub fn clear(self) -> &'a mut W {
640        self.variant(UIFW::CLEAR)
641    }
642    #[doc = "Update interrupt pending."]
643    #[inline]
644    pub fn update_pending(self) -> &'a mut W {
645        self.variant(UIFW::UPDATEPENDING)
646    }
647    #[doc = r" Sets the field bit"]
648    pub fn set_bit(self) -> &'a mut W {
649        self.bit(true)
650    }
651    #[doc = r" Clears the field bit"]
652    pub fn clear_bit(self) -> &'a mut W {
653        self.bit(false)
654    }
655    #[doc = r" Writes raw bits to the field"]
656    #[inline]
657    pub fn bit(self, value: bool) -> &'a mut W {
658        const MASK: bool = true;
659        const OFFSET: u8 = 0;
660        self.w.bits &= !((MASK as u32) << OFFSET);
661        self.w.bits |= ((value & MASK) as u32) << OFFSET;
662        self.w
663    }
664}
665impl R {
666    #[doc = r" Value of the register as raw bits"]
667    #[inline]
668    pub fn bits(&self) -> u32 {
669        self.bits
670    }
671    #[doc = "Bit 12 - Capture/Compare 4 overcapture flag"]
672    #[inline]
673    pub fn cc4of(&self) -> CC4OFR {
674        CC4OFR::_from({
675            const MASK: bool = true;
676            const OFFSET: u8 = 12;
677            ((self.bits >> OFFSET) & MASK as u32) != 0
678        })
679    }
680    #[doc = "Bit 11 - Capture/Compare 3 overcapture flag"]
681    #[inline]
682    pub fn cc3of(&self) -> CC3OFR {
683        CC3OFR::_from({
684            const MASK: bool = true;
685            const OFFSET: u8 = 11;
686            ((self.bits >> OFFSET) & MASK as u32) != 0
687        })
688    }
689    #[doc = "Bit 10 - Capture/compare 2 overcapture flag"]
690    #[inline]
691    pub fn cc2of(&self) -> CC2OFR {
692        CC2OFR::_from({
693            const MASK: bool = true;
694            const OFFSET: u8 = 10;
695            ((self.bits >> OFFSET) & MASK as u32) != 0
696        })
697    }
698    #[doc = "Bit 9 - Capture/Compare 1 overcapture flag"]
699    #[inline]
700    pub fn cc1of(&self) -> CC1OFR {
701        CC1OFR::_from({
702            const MASK: bool = true;
703            const OFFSET: u8 = 9;
704            ((self.bits >> OFFSET) & MASK as u32) != 0
705        })
706    }
707    #[doc = "Bit 6 - Trigger interrupt flag"]
708    #[inline]
709    pub fn tif(&self) -> TIFR {
710        TIFR::_from({
711            const MASK: bool = true;
712            const OFFSET: u8 = 6;
713            ((self.bits >> OFFSET) & MASK as u32) != 0
714        })
715    }
716    #[doc = "Bit 4 - Capture/Compare 4 interrupt flag"]
717    #[inline]
718    pub fn cc4if(&self) -> CC4IFR {
719        CC4IFR::_from({
720            const MASK: bool = true;
721            const OFFSET: u8 = 4;
722            ((self.bits >> OFFSET) & MASK as u32) != 0
723        })
724    }
725    #[doc = "Bit 3 - Capture/Compare 3 interrupt flag"]
726    #[inline]
727    pub fn cc3if(&self) -> CC3IFR {
728        CC3IFR::_from({
729            const MASK: bool = true;
730            const OFFSET: u8 = 3;
731            ((self.bits >> OFFSET) & MASK as u32) != 0
732        })
733    }
734    #[doc = "Bit 2 - Capture/Compare 2 interrupt flag"]
735    #[inline]
736    pub fn cc2if(&self) -> CC2IFR {
737        CC2IFR::_from({
738            const MASK: bool = true;
739            const OFFSET: u8 = 2;
740            ((self.bits >> OFFSET) & MASK as u32) != 0
741        })
742    }
743    #[doc = "Bit 1 - Capture/compare 1 interrupt flag"]
744    #[inline]
745    pub fn cc1if(&self) -> CC1IFR {
746        CC1IFR::_from({
747            const MASK: bool = true;
748            const OFFSET: u8 = 1;
749            ((self.bits >> OFFSET) & MASK as u32) != 0
750        })
751    }
752    #[doc = "Bit 0 - Update interrupt flag"]
753    #[inline]
754    pub fn uif(&self) -> UIFR {
755        UIFR::_from({
756            const MASK: bool = true;
757            const OFFSET: u8 = 0;
758            ((self.bits >> OFFSET) & MASK as u32) != 0
759        })
760    }
761}
762impl W {
763    #[doc = r" Reset value of the register"]
764    #[inline]
765    pub fn reset_value() -> W {
766        W { bits: 0 }
767    }
768    #[doc = r" Writes raw bits to the register"]
769    #[inline]
770    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
771        self.bits = bits;
772        self
773    }
774    #[doc = "Bit 12 - Capture/Compare 4 overcapture flag"]
775    #[inline]
776    pub fn cc4of(&mut self) -> _CC4OFW {
777        _CC4OFW { w: self }
778    }
779    #[doc = "Bit 11 - Capture/Compare 3 overcapture flag"]
780    #[inline]
781    pub fn cc3of(&mut self) -> _CC3OFW {
782        _CC3OFW { w: self }
783    }
784    #[doc = "Bit 10 - Capture/compare 2 overcapture flag"]
785    #[inline]
786    pub fn cc2of(&mut self) -> _CC2OFW {
787        _CC2OFW { w: self }
788    }
789    #[doc = "Bit 9 - Capture/Compare 1 overcapture flag"]
790    #[inline]
791    pub fn cc1of(&mut self) -> _CC1OFW {
792        _CC1OFW { w: self }
793    }
794    #[doc = "Bit 6 - Trigger interrupt flag"]
795    #[inline]
796    pub fn tif(&mut self) -> _TIFW {
797        _TIFW { w: self }
798    }
799    #[doc = "Bit 4 - Capture/Compare 4 interrupt flag"]
800    #[inline]
801    pub fn cc4if(&mut self) -> _CC4IFW {
802        _CC4IFW { w: self }
803    }
804    #[doc = "Bit 3 - Capture/Compare 3 interrupt flag"]
805    #[inline]
806    pub fn cc3if(&mut self) -> _CC3IFW {
807        _CC3IFW { w: self }
808    }
809    #[doc = "Bit 2 - Capture/Compare 2 interrupt flag"]
810    #[inline]
811    pub fn cc2if(&mut self) -> _CC2IFW {
812        _CC2IFW { w: self }
813    }
814    #[doc = "Bit 1 - Capture/compare 1 interrupt flag"]
815    #[inline]
816    pub fn cc1if(&mut self) -> _CC1IFW {
817        _CC1IFW { w: self }
818    }
819    #[doc = "Bit 0 - Update interrupt flag"]
820    #[inline]
821    pub fn uif(&mut self) -> _UIFW {
822        _UIFW { w: self }
823    }
824}