stm32l4x2_pac/tim1/
ccer.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::CCER {
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 CC4PR {
47    bits: bool,
48}
49impl CC4PR {
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 CC4ER {
68    bits: bool,
69}
70impl CC4ER {
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 CC3NPR {
89    bits: bool,
90}
91impl CC3NPR {
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 CC3NER {
110    bits: bool,
111}
112impl CC3NER {
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 CC3PR {
131    bits: bool,
132}
133impl CC3PR {
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 CC3ER {
152    bits: bool,
153}
154impl CC3ER {
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 CC2NPR {
173    bits: bool,
174}
175impl CC2NPR {
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" Value of the field"]
193pub struct CC2NER {
194    bits: bool,
195}
196impl CC2NER {
197    #[doc = r" Value of the field as raw bits"]
198    #[inline]
199    pub fn bit(&self) -> bool {
200        self.bits
201    }
202    #[doc = r" Returns `true` if the bit is clear (0)"]
203    #[inline]
204    pub fn bit_is_clear(&self) -> bool {
205        !self.bit()
206    }
207    #[doc = r" Returns `true` if the bit is set (1)"]
208    #[inline]
209    pub fn bit_is_set(&self) -> bool {
210        self.bit()
211    }
212}
213#[doc = r" Value of the field"]
214pub struct CC2PR {
215    bits: bool,
216}
217impl CC2PR {
218    #[doc = r" Value of the field as raw bits"]
219    #[inline]
220    pub fn bit(&self) -> bool {
221        self.bits
222    }
223    #[doc = r" Returns `true` if the bit is clear (0)"]
224    #[inline]
225    pub fn bit_is_clear(&self) -> bool {
226        !self.bit()
227    }
228    #[doc = r" Returns `true` if the bit is set (1)"]
229    #[inline]
230    pub fn bit_is_set(&self) -> bool {
231        self.bit()
232    }
233}
234#[doc = r" Value of the field"]
235pub struct CC2ER {
236    bits: bool,
237}
238impl CC2ER {
239    #[doc = r" Value of the field as raw bits"]
240    #[inline]
241    pub fn bit(&self) -> bool {
242        self.bits
243    }
244    #[doc = r" Returns `true` if the bit is clear (0)"]
245    #[inline]
246    pub fn bit_is_clear(&self) -> bool {
247        !self.bit()
248    }
249    #[doc = r" Returns `true` if the bit is set (1)"]
250    #[inline]
251    pub fn bit_is_set(&self) -> bool {
252        self.bit()
253    }
254}
255#[doc = r" Value of the field"]
256pub struct CC1NPR {
257    bits: bool,
258}
259impl CC1NPR {
260    #[doc = r" Value of the field as raw bits"]
261    #[inline]
262    pub fn bit(&self) -> bool {
263        self.bits
264    }
265    #[doc = r" Returns `true` if the bit is clear (0)"]
266    #[inline]
267    pub fn bit_is_clear(&self) -> bool {
268        !self.bit()
269    }
270    #[doc = r" Returns `true` if the bit is set (1)"]
271    #[inline]
272    pub fn bit_is_set(&self) -> bool {
273        self.bit()
274    }
275}
276#[doc = r" Value of the field"]
277pub struct CC1NER {
278    bits: bool,
279}
280impl CC1NER {
281    #[doc = r" Value of the field as raw bits"]
282    #[inline]
283    pub fn bit(&self) -> bool {
284        self.bits
285    }
286    #[doc = r" Returns `true` if the bit is clear (0)"]
287    #[inline]
288    pub fn bit_is_clear(&self) -> bool {
289        !self.bit()
290    }
291    #[doc = r" Returns `true` if the bit is set (1)"]
292    #[inline]
293    pub fn bit_is_set(&self) -> bool {
294        self.bit()
295    }
296}
297#[doc = r" Value of the field"]
298pub struct CC1PR {
299    bits: bool,
300}
301impl CC1PR {
302    #[doc = r" Value of the field as raw bits"]
303    #[inline]
304    pub fn bit(&self) -> bool {
305        self.bits
306    }
307    #[doc = r" Returns `true` if the bit is clear (0)"]
308    #[inline]
309    pub fn bit_is_clear(&self) -> bool {
310        !self.bit()
311    }
312    #[doc = r" Returns `true` if the bit is set (1)"]
313    #[inline]
314    pub fn bit_is_set(&self) -> bool {
315        self.bit()
316    }
317}
318#[doc = r" Value of the field"]
319pub struct CC1ER {
320    bits: bool,
321}
322impl CC1ER {
323    #[doc = r" Value of the field as raw bits"]
324    #[inline]
325    pub fn bit(&self) -> bool {
326        self.bits
327    }
328    #[doc = r" Returns `true` if the bit is clear (0)"]
329    #[inline]
330    pub fn bit_is_clear(&self) -> bool {
331        !self.bit()
332    }
333    #[doc = r" Returns `true` if the bit is set (1)"]
334    #[inline]
335    pub fn bit_is_set(&self) -> bool {
336        self.bit()
337    }
338}
339#[doc = r" Proxy"]
340pub struct _CC4PW<'a> {
341    w: &'a mut W,
342}
343impl<'a> _CC4PW<'a> {
344    #[doc = r" Sets the field bit"]
345    pub fn set_bit(self) -> &'a mut W {
346        self.bit(true)
347    }
348    #[doc = r" Clears the field bit"]
349    pub fn clear_bit(self) -> &'a mut W {
350        self.bit(false)
351    }
352    #[doc = r" Writes raw bits to the field"]
353    #[inline]
354    pub fn bit(self, value: bool) -> &'a mut W {
355        const MASK: bool = true;
356        const OFFSET: u8 = 13;
357        self.w.bits &= !((MASK as u32) << OFFSET);
358        self.w.bits |= ((value & MASK) as u32) << OFFSET;
359        self.w
360    }
361}
362#[doc = r" Proxy"]
363pub struct _CC4EW<'a> {
364    w: &'a mut W,
365}
366impl<'a> _CC4EW<'a> {
367    #[doc = r" Sets the field bit"]
368    pub fn set_bit(self) -> &'a mut W {
369        self.bit(true)
370    }
371    #[doc = r" Clears the field bit"]
372    pub fn clear_bit(self) -> &'a mut W {
373        self.bit(false)
374    }
375    #[doc = r" Writes raw bits to the field"]
376    #[inline]
377    pub fn bit(self, value: bool) -> &'a mut W {
378        const MASK: bool = true;
379        const OFFSET: u8 = 12;
380        self.w.bits &= !((MASK as u32) << OFFSET);
381        self.w.bits |= ((value & MASK) as u32) << OFFSET;
382        self.w
383    }
384}
385#[doc = r" Proxy"]
386pub struct _CC3NPW<'a> {
387    w: &'a mut W,
388}
389impl<'a> _CC3NPW<'a> {
390    #[doc = r" Sets the field bit"]
391    pub fn set_bit(self) -> &'a mut W {
392        self.bit(true)
393    }
394    #[doc = r" Clears the field bit"]
395    pub fn clear_bit(self) -> &'a mut W {
396        self.bit(false)
397    }
398    #[doc = r" Writes raw bits to the field"]
399    #[inline]
400    pub fn bit(self, value: bool) -> &'a mut W {
401        const MASK: bool = true;
402        const OFFSET: u8 = 11;
403        self.w.bits &= !((MASK as u32) << OFFSET);
404        self.w.bits |= ((value & MASK) as u32) << OFFSET;
405        self.w
406    }
407}
408#[doc = r" Proxy"]
409pub struct _CC3NEW<'a> {
410    w: &'a mut W,
411}
412impl<'a> _CC3NEW<'a> {
413    #[doc = r" Sets the field bit"]
414    pub fn set_bit(self) -> &'a mut W {
415        self.bit(true)
416    }
417    #[doc = r" Clears the field bit"]
418    pub fn clear_bit(self) -> &'a mut W {
419        self.bit(false)
420    }
421    #[doc = r" Writes raw bits to the field"]
422    #[inline]
423    pub fn bit(self, value: bool) -> &'a mut W {
424        const MASK: bool = true;
425        const OFFSET: u8 = 10;
426        self.w.bits &= !((MASK as u32) << OFFSET);
427        self.w.bits |= ((value & MASK) as u32) << OFFSET;
428        self.w
429    }
430}
431#[doc = r" Proxy"]
432pub struct _CC3PW<'a> {
433    w: &'a mut W,
434}
435impl<'a> _CC3PW<'a> {
436    #[doc = r" Sets the field bit"]
437    pub fn set_bit(self) -> &'a mut W {
438        self.bit(true)
439    }
440    #[doc = r" Clears the field bit"]
441    pub fn clear_bit(self) -> &'a mut W {
442        self.bit(false)
443    }
444    #[doc = r" Writes raw bits to the field"]
445    #[inline]
446    pub fn bit(self, value: bool) -> &'a mut W {
447        const MASK: bool = true;
448        const OFFSET: u8 = 9;
449        self.w.bits &= !((MASK as u32) << OFFSET);
450        self.w.bits |= ((value & MASK) as u32) << OFFSET;
451        self.w
452    }
453}
454#[doc = r" Proxy"]
455pub struct _CC3EW<'a> {
456    w: &'a mut W,
457}
458impl<'a> _CC3EW<'a> {
459    #[doc = r" Sets the field bit"]
460    pub fn set_bit(self) -> &'a mut W {
461        self.bit(true)
462    }
463    #[doc = r" Clears the field bit"]
464    pub fn clear_bit(self) -> &'a mut W {
465        self.bit(false)
466    }
467    #[doc = r" Writes raw bits to the field"]
468    #[inline]
469    pub fn bit(self, value: bool) -> &'a mut W {
470        const MASK: bool = true;
471        const OFFSET: u8 = 8;
472        self.w.bits &= !((MASK as u32) << OFFSET);
473        self.w.bits |= ((value & MASK) as u32) << OFFSET;
474        self.w
475    }
476}
477#[doc = r" Proxy"]
478pub struct _CC2NPW<'a> {
479    w: &'a mut W,
480}
481impl<'a> _CC2NPW<'a> {
482    #[doc = r" Sets the field bit"]
483    pub fn set_bit(self) -> &'a mut W {
484        self.bit(true)
485    }
486    #[doc = r" Clears the field bit"]
487    pub fn clear_bit(self) -> &'a mut W {
488        self.bit(false)
489    }
490    #[doc = r" Writes raw bits to the field"]
491    #[inline]
492    pub fn bit(self, value: bool) -> &'a mut W {
493        const MASK: bool = true;
494        const OFFSET: u8 = 7;
495        self.w.bits &= !((MASK as u32) << OFFSET);
496        self.w.bits |= ((value & MASK) as u32) << OFFSET;
497        self.w
498    }
499}
500#[doc = r" Proxy"]
501pub struct _CC2NEW<'a> {
502    w: &'a mut W,
503}
504impl<'a> _CC2NEW<'a> {
505    #[doc = r" Sets the field bit"]
506    pub fn set_bit(self) -> &'a mut W {
507        self.bit(true)
508    }
509    #[doc = r" Clears the field bit"]
510    pub fn clear_bit(self) -> &'a mut W {
511        self.bit(false)
512    }
513    #[doc = r" Writes raw bits to the field"]
514    #[inline]
515    pub fn bit(self, value: bool) -> &'a mut W {
516        const MASK: bool = true;
517        const OFFSET: u8 = 6;
518        self.w.bits &= !((MASK as u32) << OFFSET);
519        self.w.bits |= ((value & MASK) as u32) << OFFSET;
520        self.w
521    }
522}
523#[doc = r" Proxy"]
524pub struct _CC2PW<'a> {
525    w: &'a mut W,
526}
527impl<'a> _CC2PW<'a> {
528    #[doc = r" Sets the field bit"]
529    pub fn set_bit(self) -> &'a mut W {
530        self.bit(true)
531    }
532    #[doc = r" Clears the field bit"]
533    pub fn clear_bit(self) -> &'a mut W {
534        self.bit(false)
535    }
536    #[doc = r" Writes raw bits to the field"]
537    #[inline]
538    pub fn bit(self, value: bool) -> &'a mut W {
539        const MASK: bool = true;
540        const OFFSET: u8 = 5;
541        self.w.bits &= !((MASK as u32) << OFFSET);
542        self.w.bits |= ((value & MASK) as u32) << OFFSET;
543        self.w
544    }
545}
546#[doc = r" Proxy"]
547pub struct _CC2EW<'a> {
548    w: &'a mut W,
549}
550impl<'a> _CC2EW<'a> {
551    #[doc = r" Sets the field bit"]
552    pub fn set_bit(self) -> &'a mut W {
553        self.bit(true)
554    }
555    #[doc = r" Clears the field bit"]
556    pub fn clear_bit(self) -> &'a mut W {
557        self.bit(false)
558    }
559    #[doc = r" Writes raw bits to the field"]
560    #[inline]
561    pub fn bit(self, value: bool) -> &'a mut W {
562        const MASK: bool = true;
563        const OFFSET: u8 = 4;
564        self.w.bits &= !((MASK as u32) << OFFSET);
565        self.w.bits |= ((value & MASK) as u32) << OFFSET;
566        self.w
567    }
568}
569#[doc = r" Proxy"]
570pub struct _CC1NPW<'a> {
571    w: &'a mut W,
572}
573impl<'a> _CC1NPW<'a> {
574    #[doc = r" Sets the field bit"]
575    pub fn set_bit(self) -> &'a mut W {
576        self.bit(true)
577    }
578    #[doc = r" Clears the field bit"]
579    pub fn clear_bit(self) -> &'a mut W {
580        self.bit(false)
581    }
582    #[doc = r" Writes raw bits to the field"]
583    #[inline]
584    pub fn bit(self, value: bool) -> &'a mut W {
585        const MASK: bool = true;
586        const OFFSET: u8 = 3;
587        self.w.bits &= !((MASK as u32) << OFFSET);
588        self.w.bits |= ((value & MASK) as u32) << OFFSET;
589        self.w
590    }
591}
592#[doc = r" Proxy"]
593pub struct _CC1NEW<'a> {
594    w: &'a mut W,
595}
596impl<'a> _CC1NEW<'a> {
597    #[doc = r" Sets the field bit"]
598    pub fn set_bit(self) -> &'a mut W {
599        self.bit(true)
600    }
601    #[doc = r" Clears the field bit"]
602    pub fn clear_bit(self) -> &'a mut W {
603        self.bit(false)
604    }
605    #[doc = r" Writes raw bits to the field"]
606    #[inline]
607    pub fn bit(self, value: bool) -> &'a mut W {
608        const MASK: bool = true;
609        const OFFSET: u8 = 2;
610        self.w.bits &= !((MASK as u32) << OFFSET);
611        self.w.bits |= ((value & MASK) as u32) << OFFSET;
612        self.w
613    }
614}
615#[doc = r" Proxy"]
616pub struct _CC1PW<'a> {
617    w: &'a mut W,
618}
619impl<'a> _CC1PW<'a> {
620    #[doc = r" Sets the field bit"]
621    pub fn set_bit(self) -> &'a mut W {
622        self.bit(true)
623    }
624    #[doc = r" Clears the field bit"]
625    pub fn clear_bit(self) -> &'a mut W {
626        self.bit(false)
627    }
628    #[doc = r" Writes raw bits to the field"]
629    #[inline]
630    pub fn bit(self, value: bool) -> &'a mut W {
631        const MASK: bool = true;
632        const OFFSET: u8 = 1;
633        self.w.bits &= !((MASK as u32) << OFFSET);
634        self.w.bits |= ((value & MASK) as u32) << OFFSET;
635        self.w
636    }
637}
638#[doc = r" Proxy"]
639pub struct _CC1EW<'a> {
640    w: &'a mut W,
641}
642impl<'a> _CC1EW<'a> {
643    #[doc = r" Sets the field bit"]
644    pub fn set_bit(self) -> &'a mut W {
645        self.bit(true)
646    }
647    #[doc = r" Clears the field bit"]
648    pub fn clear_bit(self) -> &'a mut W {
649        self.bit(false)
650    }
651    #[doc = r" Writes raw bits to the field"]
652    #[inline]
653    pub fn bit(self, value: bool) -> &'a mut W {
654        const MASK: bool = true;
655        const OFFSET: u8 = 0;
656        self.w.bits &= !((MASK as u32) << OFFSET);
657        self.w.bits |= ((value & MASK) as u32) << OFFSET;
658        self.w
659    }
660}
661impl R {
662    #[doc = r" Value of the register as raw bits"]
663    #[inline]
664    pub fn bits(&self) -> u32 {
665        self.bits
666    }
667    #[doc = "Bit 13 - Capture/Compare 3 output Polarity"]
668    #[inline]
669    pub fn cc4p(&self) -> CC4PR {
670        let bits = {
671            const MASK: bool = true;
672            const OFFSET: u8 = 13;
673            ((self.bits >> OFFSET) & MASK as u32) != 0
674        };
675        CC4PR { bits }
676    }
677    #[doc = "Bit 12 - Capture/Compare 4 output enable"]
678    #[inline]
679    pub fn cc4e(&self) -> CC4ER {
680        let bits = {
681            const MASK: bool = true;
682            const OFFSET: u8 = 12;
683            ((self.bits >> OFFSET) & MASK as u32) != 0
684        };
685        CC4ER { bits }
686    }
687    #[doc = "Bit 11 - Capture/Compare 3 output Polarity"]
688    #[inline]
689    pub fn cc3np(&self) -> CC3NPR {
690        let bits = {
691            const MASK: bool = true;
692            const OFFSET: u8 = 11;
693            ((self.bits >> OFFSET) & MASK as u32) != 0
694        };
695        CC3NPR { bits }
696    }
697    #[doc = "Bit 10 - Capture/Compare 3 complementary output enable"]
698    #[inline]
699    pub fn cc3ne(&self) -> CC3NER {
700        let bits = {
701            const MASK: bool = true;
702            const OFFSET: u8 = 10;
703            ((self.bits >> OFFSET) & MASK as u32) != 0
704        };
705        CC3NER { bits }
706    }
707    #[doc = "Bit 9 - Capture/Compare 3 output Polarity"]
708    #[inline]
709    pub fn cc3p(&self) -> CC3PR {
710        let bits = {
711            const MASK: bool = true;
712            const OFFSET: u8 = 9;
713            ((self.bits >> OFFSET) & MASK as u32) != 0
714        };
715        CC3PR { bits }
716    }
717    #[doc = "Bit 8 - Capture/Compare 3 output enable"]
718    #[inline]
719    pub fn cc3e(&self) -> CC3ER {
720        let bits = {
721            const MASK: bool = true;
722            const OFFSET: u8 = 8;
723            ((self.bits >> OFFSET) & MASK as u32) != 0
724        };
725        CC3ER { bits }
726    }
727    #[doc = "Bit 7 - Capture/Compare 2 output Polarity"]
728    #[inline]
729    pub fn cc2np(&self) -> CC2NPR {
730        let bits = {
731            const MASK: bool = true;
732            const OFFSET: u8 = 7;
733            ((self.bits >> OFFSET) & MASK as u32) != 0
734        };
735        CC2NPR { bits }
736    }
737    #[doc = "Bit 6 - Capture/Compare 2 complementary output enable"]
738    #[inline]
739    pub fn cc2ne(&self) -> CC2NER {
740        let bits = {
741            const MASK: bool = true;
742            const OFFSET: u8 = 6;
743            ((self.bits >> OFFSET) & MASK as u32) != 0
744        };
745        CC2NER { bits }
746    }
747    #[doc = "Bit 5 - Capture/Compare 2 output Polarity"]
748    #[inline]
749    pub fn cc2p(&self) -> CC2PR {
750        let bits = {
751            const MASK: bool = true;
752            const OFFSET: u8 = 5;
753            ((self.bits >> OFFSET) & MASK as u32) != 0
754        };
755        CC2PR { bits }
756    }
757    #[doc = "Bit 4 - Capture/Compare 2 output enable"]
758    #[inline]
759    pub fn cc2e(&self) -> CC2ER {
760        let bits = {
761            const MASK: bool = true;
762            const OFFSET: u8 = 4;
763            ((self.bits >> OFFSET) & MASK as u32) != 0
764        };
765        CC2ER { bits }
766    }
767    #[doc = "Bit 3 - Capture/Compare 1 output Polarity"]
768    #[inline]
769    pub fn cc1np(&self) -> CC1NPR {
770        let bits = {
771            const MASK: bool = true;
772            const OFFSET: u8 = 3;
773            ((self.bits >> OFFSET) & MASK as u32) != 0
774        };
775        CC1NPR { bits }
776    }
777    #[doc = "Bit 2 - Capture/Compare 1 complementary output enable"]
778    #[inline]
779    pub fn cc1ne(&self) -> CC1NER {
780        let bits = {
781            const MASK: bool = true;
782            const OFFSET: u8 = 2;
783            ((self.bits >> OFFSET) & MASK as u32) != 0
784        };
785        CC1NER { bits }
786    }
787    #[doc = "Bit 1 - Capture/Compare 1 output Polarity"]
788    #[inline]
789    pub fn cc1p(&self) -> CC1PR {
790        let bits = {
791            const MASK: bool = true;
792            const OFFSET: u8 = 1;
793            ((self.bits >> OFFSET) & MASK as u32) != 0
794        };
795        CC1PR { bits }
796    }
797    #[doc = "Bit 0 - Capture/Compare 1 output enable"]
798    #[inline]
799    pub fn cc1e(&self) -> CC1ER {
800        let bits = {
801            const MASK: bool = true;
802            const OFFSET: u8 = 0;
803            ((self.bits >> OFFSET) & MASK as u32) != 0
804        };
805        CC1ER { bits }
806    }
807}
808impl W {
809    #[doc = r" Reset value of the register"]
810    #[inline]
811    pub fn reset_value() -> W {
812        W { bits: 0 }
813    }
814    #[doc = r" Writes raw bits to the register"]
815    #[inline]
816    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
817        self.bits = bits;
818        self
819    }
820    #[doc = "Bit 13 - Capture/Compare 3 output Polarity"]
821    #[inline]
822    pub fn cc4p(&mut self) -> _CC4PW {
823        _CC4PW { w: self }
824    }
825    #[doc = "Bit 12 - Capture/Compare 4 output enable"]
826    #[inline]
827    pub fn cc4e(&mut self) -> _CC4EW {
828        _CC4EW { w: self }
829    }
830    #[doc = "Bit 11 - Capture/Compare 3 output Polarity"]
831    #[inline]
832    pub fn cc3np(&mut self) -> _CC3NPW {
833        _CC3NPW { w: self }
834    }
835    #[doc = "Bit 10 - Capture/Compare 3 complementary output enable"]
836    #[inline]
837    pub fn cc3ne(&mut self) -> _CC3NEW {
838        _CC3NEW { w: self }
839    }
840    #[doc = "Bit 9 - Capture/Compare 3 output Polarity"]
841    #[inline]
842    pub fn cc3p(&mut self) -> _CC3PW {
843        _CC3PW { w: self }
844    }
845    #[doc = "Bit 8 - Capture/Compare 3 output enable"]
846    #[inline]
847    pub fn cc3e(&mut self) -> _CC3EW {
848        _CC3EW { w: self }
849    }
850    #[doc = "Bit 7 - Capture/Compare 2 output Polarity"]
851    #[inline]
852    pub fn cc2np(&mut self) -> _CC2NPW {
853        _CC2NPW { w: self }
854    }
855    #[doc = "Bit 6 - Capture/Compare 2 complementary output enable"]
856    #[inline]
857    pub fn cc2ne(&mut self) -> _CC2NEW {
858        _CC2NEW { w: self }
859    }
860    #[doc = "Bit 5 - Capture/Compare 2 output Polarity"]
861    #[inline]
862    pub fn cc2p(&mut self) -> _CC2PW {
863        _CC2PW { w: self }
864    }
865    #[doc = "Bit 4 - Capture/Compare 2 output enable"]
866    #[inline]
867    pub fn cc2e(&mut self) -> _CC2EW {
868        _CC2EW { w: self }
869    }
870    #[doc = "Bit 3 - Capture/Compare 1 output Polarity"]
871    #[inline]
872    pub fn cc1np(&mut self) -> _CC1NPW {
873        _CC1NPW { w: self }
874    }
875    #[doc = "Bit 2 - Capture/Compare 1 complementary output enable"]
876    #[inline]
877    pub fn cc1ne(&mut self) -> _CC1NEW {
878        _CC1NEW { w: self }
879    }
880    #[doc = "Bit 1 - Capture/Compare 1 output Polarity"]
881    #[inline]
882    pub fn cc1p(&mut self) -> _CC1PW {
883        _CC1PW { w: self }
884    }
885    #[doc = "Bit 0 - Capture/Compare 1 output enable"]
886    #[inline]
887    pub fn cc1e(&mut self) -> _CC1EW {
888        _CC1EW { w: self }
889    }
890}