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::DIER {
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 `TDE`"]
46#[derive(Clone, Copy, Debug, PartialEq)]
47pub enum TDER {
48 #[doc = "Trigger DMA request disabled"]
49 DISABLED,
50 #[doc = "Trigger DMA request enabled"]
51 ENABLED,
52}
53impl TDER {
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 TDER::DISABLED => false,
69 TDER::ENABLED => true,
70 }
71 }
72 #[allow(missing_docs)]
73 #[doc(hidden)]
74 #[inline]
75 pub fn _from(value: bool) -> TDER {
76 match value {
77 false => TDER::DISABLED,
78 true => TDER::ENABLED,
79 }
80 }
81 #[doc = "Checks if the value of the field is `DISABLED`"]
82 #[inline]
83 pub fn is_disabled(&self) -> bool {
84 *self == TDER::DISABLED
85 }
86 #[doc = "Checks if the value of the field is `ENABLED`"]
87 #[inline]
88 pub fn is_enabled(&self) -> bool {
89 *self == TDER::ENABLED
90 }
91}
92#[doc = r" Value of the field"]
93pub struct COMDER {
94 bits: bool,
95}
96impl COMDER {
97 #[doc = r" Value of the field as raw bits"]
98 #[inline]
99 pub fn bit(&self) -> bool {
100 self.bits
101 }
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}
113#[doc = "Possible values of the field `CC4DE`"]
114#[derive(Clone, Copy, Debug, PartialEq)]
115pub enum CC4DER {
116 #[doc = "CCx DMA request disabled"]
117 DISABLED,
118 #[doc = "CCx DMA request enabled"]
119 ENABLED,
120}
121impl CC4DER {
122 #[doc = r" Returns `true` if the bit is clear (0)"]
123 #[inline]
124 pub fn bit_is_clear(&self) -> bool {
125 !self.bit()
126 }
127 #[doc = r" Returns `true` if the bit is set (1)"]
128 #[inline]
129 pub fn bit_is_set(&self) -> bool {
130 self.bit()
131 }
132 #[doc = r" Value of the field as raw bits"]
133 #[inline]
134 pub fn bit(&self) -> bool {
135 match *self {
136 CC4DER::DISABLED => false,
137 CC4DER::ENABLED => true,
138 }
139 }
140 #[allow(missing_docs)]
141 #[doc(hidden)]
142 #[inline]
143 pub fn _from(value: bool) -> CC4DER {
144 match value {
145 false => CC4DER::DISABLED,
146 true => CC4DER::ENABLED,
147 }
148 }
149 #[doc = "Checks if the value of the field is `DISABLED`"]
150 #[inline]
151 pub fn is_disabled(&self) -> bool {
152 *self == CC4DER::DISABLED
153 }
154 #[doc = "Checks if the value of the field is `ENABLED`"]
155 #[inline]
156 pub fn is_enabled(&self) -> bool {
157 *self == CC4DER::ENABLED
158 }
159}
160#[doc = "Possible values of the field `CC3DE`"]
161pub type CC3DER = CC4DER;
162#[doc = "Possible values of the field `CC2DE`"]
163pub type CC2DER = CC4DER;
164#[doc = "Possible values of the field `CC1DE`"]
165pub type CC1DER = CC4DER;
166#[doc = "Possible values of the field `UDE`"]
167#[derive(Clone, Copy, Debug, PartialEq)]
168pub enum UDER {
169 #[doc = "Update DMA request disabled"]
170 DISABLED,
171 #[doc = "Update DMA request enabled"]
172 ENABLED,
173}
174impl UDER {
175 #[doc = r" Returns `true` if the bit is clear (0)"]
176 #[inline]
177 pub fn bit_is_clear(&self) -> bool {
178 !self.bit()
179 }
180 #[doc = r" Returns `true` if the bit is set (1)"]
181 #[inline]
182 pub fn bit_is_set(&self) -> bool {
183 self.bit()
184 }
185 #[doc = r" Value of the field as raw bits"]
186 #[inline]
187 pub fn bit(&self) -> bool {
188 match *self {
189 UDER::DISABLED => false,
190 UDER::ENABLED => true,
191 }
192 }
193 #[allow(missing_docs)]
194 #[doc(hidden)]
195 #[inline]
196 pub fn _from(value: bool) -> UDER {
197 match value {
198 false => UDER::DISABLED,
199 true => UDER::ENABLED,
200 }
201 }
202 #[doc = "Checks if the value of the field is `DISABLED`"]
203 #[inline]
204 pub fn is_disabled(&self) -> bool {
205 *self == UDER::DISABLED
206 }
207 #[doc = "Checks if the value of the field is `ENABLED`"]
208 #[inline]
209 pub fn is_enabled(&self) -> bool {
210 *self == UDER::ENABLED
211 }
212}
213#[doc = "Possible values of the field `TIE`"]
214#[derive(Clone, Copy, Debug, PartialEq)]
215pub enum TIER {
216 #[doc = "Trigger interrupt disabled"]
217 DISABLED,
218 #[doc = "Trigger interrupt enabled"]
219 ENABLED,
220}
221impl TIER {
222 #[doc = r" Returns `true` if the bit is clear (0)"]
223 #[inline]
224 pub fn bit_is_clear(&self) -> bool {
225 !self.bit()
226 }
227 #[doc = r" Returns `true` if the bit is set (1)"]
228 #[inline]
229 pub fn bit_is_set(&self) -> bool {
230 self.bit()
231 }
232 #[doc = r" Value of the field as raw bits"]
233 #[inline]
234 pub fn bit(&self) -> bool {
235 match *self {
236 TIER::DISABLED => false,
237 TIER::ENABLED => true,
238 }
239 }
240 #[allow(missing_docs)]
241 #[doc(hidden)]
242 #[inline]
243 pub fn _from(value: bool) -> TIER {
244 match value {
245 false => TIER::DISABLED,
246 true => TIER::ENABLED,
247 }
248 }
249 #[doc = "Checks if the value of the field is `DISABLED`"]
250 #[inline]
251 pub fn is_disabled(&self) -> bool {
252 *self == TIER::DISABLED
253 }
254 #[doc = "Checks if the value of the field is `ENABLED`"]
255 #[inline]
256 pub fn is_enabled(&self) -> bool {
257 *self == TIER::ENABLED
258 }
259}
260#[doc = "Possible values of the field `CC4IE`"]
261#[derive(Clone, Copy, Debug, PartialEq)]
262pub enum CC4IER {
263 #[doc = "CCx interrupt disabled"]
264 DISABLED,
265 #[doc = "CCx interrupt enabled"]
266 ENABLED,
267}
268impl CC4IER {
269 #[doc = r" Returns `true` if the bit is clear (0)"]
270 #[inline]
271 pub fn bit_is_clear(&self) -> bool {
272 !self.bit()
273 }
274 #[doc = r" Returns `true` if the bit is set (1)"]
275 #[inline]
276 pub fn bit_is_set(&self) -> bool {
277 self.bit()
278 }
279 #[doc = r" Value of the field as raw bits"]
280 #[inline]
281 pub fn bit(&self) -> bool {
282 match *self {
283 CC4IER::DISABLED => false,
284 CC4IER::ENABLED => true,
285 }
286 }
287 #[allow(missing_docs)]
288 #[doc(hidden)]
289 #[inline]
290 pub fn _from(value: bool) -> CC4IER {
291 match value {
292 false => CC4IER::DISABLED,
293 true => CC4IER::ENABLED,
294 }
295 }
296 #[doc = "Checks if the value of the field is `DISABLED`"]
297 #[inline]
298 pub fn is_disabled(&self) -> bool {
299 *self == CC4IER::DISABLED
300 }
301 #[doc = "Checks if the value of the field is `ENABLED`"]
302 #[inline]
303 pub fn is_enabled(&self) -> bool {
304 *self == CC4IER::ENABLED
305 }
306}
307#[doc = "Possible values of the field `CC3IE`"]
308pub type CC3IER = CC4IER;
309#[doc = "Possible values of the field `CC2IE`"]
310pub type CC2IER = CC4IER;
311#[doc = "Possible values of the field `CC1IE`"]
312pub type CC1IER = CC4IER;
313#[doc = "Possible values of the field `UIE`"]
314#[derive(Clone, Copy, Debug, PartialEq)]
315pub enum UIER {
316 #[doc = "Update interrupt disabled"]
317 DISABLED,
318 #[doc = "Update interrupt enabled"]
319 ENABLED,
320}
321impl UIER {
322 #[doc = r" Returns `true` if the bit is clear (0)"]
323 #[inline]
324 pub fn bit_is_clear(&self) -> bool {
325 !self.bit()
326 }
327 #[doc = r" Returns `true` if the bit is set (1)"]
328 #[inline]
329 pub fn bit_is_set(&self) -> bool {
330 self.bit()
331 }
332 #[doc = r" Value of the field as raw bits"]
333 #[inline]
334 pub fn bit(&self) -> bool {
335 match *self {
336 UIER::DISABLED => false,
337 UIER::ENABLED => true,
338 }
339 }
340 #[allow(missing_docs)]
341 #[doc(hidden)]
342 #[inline]
343 pub fn _from(value: bool) -> UIER {
344 match value {
345 false => UIER::DISABLED,
346 true => UIER::ENABLED,
347 }
348 }
349 #[doc = "Checks if the value of the field is `DISABLED`"]
350 #[inline]
351 pub fn is_disabled(&self) -> bool {
352 *self == UIER::DISABLED
353 }
354 #[doc = "Checks if the value of the field is `ENABLED`"]
355 #[inline]
356 pub fn is_enabled(&self) -> bool {
357 *self == UIER::ENABLED
358 }
359}
360#[doc = "Values that can be written to the field `TDE`"]
361pub enum TDEW {
362 #[doc = "Trigger DMA request disabled"]
363 DISABLED,
364 #[doc = "Trigger DMA request enabled"]
365 ENABLED,
366}
367impl TDEW {
368 #[allow(missing_docs)]
369 #[doc(hidden)]
370 #[inline]
371 pub fn _bits(&self) -> bool {
372 match *self {
373 TDEW::DISABLED => false,
374 TDEW::ENABLED => true,
375 }
376 }
377}
378#[doc = r" Proxy"]
379pub struct _TDEW<'a> {
380 w: &'a mut W,
381}
382impl<'a> _TDEW<'a> {
383 #[doc = r" Writes `variant` to the field"]
384 #[inline]
385 pub fn variant(self, variant: TDEW) -> &'a mut W {
386 {
387 self.bit(variant._bits())
388 }
389 }
390 #[doc = "Trigger DMA request disabled"]
391 #[inline]
392 pub fn disabled(self) -> &'a mut W {
393 self.variant(TDEW::DISABLED)
394 }
395 #[doc = "Trigger DMA request enabled"]
396 #[inline]
397 pub fn enabled(self) -> &'a mut W {
398 self.variant(TDEW::ENABLED)
399 }
400 #[doc = r" Sets the field bit"]
401 pub fn set_bit(self) -> &'a mut W {
402 self.bit(true)
403 }
404 #[doc = r" Clears the field bit"]
405 pub fn clear_bit(self) -> &'a mut W {
406 self.bit(false)
407 }
408 #[doc = r" Writes raw bits to the field"]
409 #[inline]
410 pub fn bit(self, value: bool) -> &'a mut W {
411 const MASK: bool = true;
412 const OFFSET: u8 = 14;
413 self.w.bits &= !((MASK as u32) << OFFSET);
414 self.w.bits |= ((value & MASK) as u32) << OFFSET;
415 self.w
416 }
417}
418#[doc = r" Proxy"]
419pub struct _COMDEW<'a> {
420 w: &'a mut W,
421}
422impl<'a> _COMDEW<'a> {
423 #[doc = r" Sets the field bit"]
424 pub fn set_bit(self) -> &'a mut W {
425 self.bit(true)
426 }
427 #[doc = r" Clears the field bit"]
428 pub fn clear_bit(self) -> &'a mut W {
429 self.bit(false)
430 }
431 #[doc = r" Writes raw bits to the field"]
432 #[inline]
433 pub fn bit(self, value: bool) -> &'a mut W {
434 const MASK: bool = true;
435 const OFFSET: u8 = 13;
436 self.w.bits &= !((MASK as u32) << OFFSET);
437 self.w.bits |= ((value & MASK) as u32) << OFFSET;
438 self.w
439 }
440}
441#[doc = "Values that can be written to the field `CC4DE`"]
442pub enum CC4DEW {
443 #[doc = "CCx DMA request disabled"]
444 DISABLED,
445 #[doc = "CCx DMA request enabled"]
446 ENABLED,
447}
448impl CC4DEW {
449 #[allow(missing_docs)]
450 #[doc(hidden)]
451 #[inline]
452 pub fn _bits(&self) -> bool {
453 match *self {
454 CC4DEW::DISABLED => false,
455 CC4DEW::ENABLED => true,
456 }
457 }
458}
459#[doc = r" Proxy"]
460pub struct _CC4DEW<'a> {
461 w: &'a mut W,
462}
463impl<'a> _CC4DEW<'a> {
464 #[doc = r" Writes `variant` to the field"]
465 #[inline]
466 pub fn variant(self, variant: CC4DEW) -> &'a mut W {
467 {
468 self.bit(variant._bits())
469 }
470 }
471 #[doc = "CCx DMA request disabled"]
472 #[inline]
473 pub fn disabled(self) -> &'a mut W {
474 self.variant(CC4DEW::DISABLED)
475 }
476 #[doc = "CCx DMA request enabled"]
477 #[inline]
478 pub fn enabled(self) -> &'a mut W {
479 self.variant(CC4DEW::ENABLED)
480 }
481 #[doc = r" Sets the field bit"]
482 pub fn set_bit(self) -> &'a mut W {
483 self.bit(true)
484 }
485 #[doc = r" Clears the field bit"]
486 pub fn clear_bit(self) -> &'a mut W {
487 self.bit(false)
488 }
489 #[doc = r" Writes raw bits to the field"]
490 #[inline]
491 pub fn bit(self, value: bool) -> &'a mut W {
492 const MASK: bool = true;
493 const OFFSET: u8 = 12;
494 self.w.bits &= !((MASK as u32) << OFFSET);
495 self.w.bits |= ((value & MASK) as u32) << OFFSET;
496 self.w
497 }
498}
499#[doc = "Values that can be written to the field `CC3DE`"]
500pub type CC3DEW = CC4DEW;
501#[doc = r" Proxy"]
502pub struct _CC3DEW<'a> {
503 w: &'a mut W,
504}
505impl<'a> _CC3DEW<'a> {
506 #[doc = r" Writes `variant` to the field"]
507 #[inline]
508 pub fn variant(self, variant: CC3DEW) -> &'a mut W {
509 {
510 self.bit(variant._bits())
511 }
512 }
513 #[doc = "CCx DMA request disabled"]
514 #[inline]
515 pub fn disabled(self) -> &'a mut W {
516 self.variant(CC4DEW::DISABLED)
517 }
518 #[doc = "CCx DMA request enabled"]
519 #[inline]
520 pub fn enabled(self) -> &'a mut W {
521 self.variant(CC4DEW::ENABLED)
522 }
523 #[doc = r" Sets the field bit"]
524 pub fn set_bit(self) -> &'a mut W {
525 self.bit(true)
526 }
527 #[doc = r" Clears the field bit"]
528 pub fn clear_bit(self) -> &'a mut W {
529 self.bit(false)
530 }
531 #[doc = r" Writes raw bits to the field"]
532 #[inline]
533 pub fn bit(self, value: bool) -> &'a mut W {
534 const MASK: bool = true;
535 const OFFSET: u8 = 11;
536 self.w.bits &= !((MASK as u32) << OFFSET);
537 self.w.bits |= ((value & MASK) as u32) << OFFSET;
538 self.w
539 }
540}
541#[doc = "Values that can be written to the field `CC2DE`"]
542pub type CC2DEW = CC4DEW;
543#[doc = r" Proxy"]
544pub struct _CC2DEW<'a> {
545 w: &'a mut W,
546}
547impl<'a> _CC2DEW<'a> {
548 #[doc = r" Writes `variant` to the field"]
549 #[inline]
550 pub fn variant(self, variant: CC2DEW) -> &'a mut W {
551 {
552 self.bit(variant._bits())
553 }
554 }
555 #[doc = "CCx DMA request disabled"]
556 #[inline]
557 pub fn disabled(self) -> &'a mut W {
558 self.variant(CC4DEW::DISABLED)
559 }
560 #[doc = "CCx DMA request enabled"]
561 #[inline]
562 pub fn enabled(self) -> &'a mut W {
563 self.variant(CC4DEW::ENABLED)
564 }
565 #[doc = r" Sets the field bit"]
566 pub fn set_bit(self) -> &'a mut W {
567 self.bit(true)
568 }
569 #[doc = r" Clears the field bit"]
570 pub fn clear_bit(self) -> &'a mut W {
571 self.bit(false)
572 }
573 #[doc = r" Writes raw bits to the field"]
574 #[inline]
575 pub fn bit(self, value: bool) -> &'a mut W {
576 const MASK: bool = true;
577 const OFFSET: u8 = 10;
578 self.w.bits &= !((MASK as u32) << OFFSET);
579 self.w.bits |= ((value & MASK) as u32) << OFFSET;
580 self.w
581 }
582}
583#[doc = "Values that can be written to the field `CC1DE`"]
584pub type CC1DEW = CC4DEW;
585#[doc = r" Proxy"]
586pub struct _CC1DEW<'a> {
587 w: &'a mut W,
588}
589impl<'a> _CC1DEW<'a> {
590 #[doc = r" Writes `variant` to the field"]
591 #[inline]
592 pub fn variant(self, variant: CC1DEW) -> &'a mut W {
593 {
594 self.bit(variant._bits())
595 }
596 }
597 #[doc = "CCx DMA request disabled"]
598 #[inline]
599 pub fn disabled(self) -> &'a mut W {
600 self.variant(CC4DEW::DISABLED)
601 }
602 #[doc = "CCx DMA request enabled"]
603 #[inline]
604 pub fn enabled(self) -> &'a mut W {
605 self.variant(CC4DEW::ENABLED)
606 }
607 #[doc = r" Sets the field bit"]
608 pub fn set_bit(self) -> &'a mut W {
609 self.bit(true)
610 }
611 #[doc = r" Clears the field bit"]
612 pub fn clear_bit(self) -> &'a mut W {
613 self.bit(false)
614 }
615 #[doc = r" Writes raw bits to the field"]
616 #[inline]
617 pub fn bit(self, value: bool) -> &'a mut W {
618 const MASK: bool = true;
619 const OFFSET: u8 = 9;
620 self.w.bits &= !((MASK as u32) << OFFSET);
621 self.w.bits |= ((value & MASK) as u32) << OFFSET;
622 self.w
623 }
624}
625#[doc = "Values that can be written to the field `UDE`"]
626pub enum UDEW {
627 #[doc = "Update DMA request disabled"]
628 DISABLED,
629 #[doc = "Update DMA request enabled"]
630 ENABLED,
631}
632impl UDEW {
633 #[allow(missing_docs)]
634 #[doc(hidden)]
635 #[inline]
636 pub fn _bits(&self) -> bool {
637 match *self {
638 UDEW::DISABLED => false,
639 UDEW::ENABLED => true,
640 }
641 }
642}
643#[doc = r" Proxy"]
644pub struct _UDEW<'a> {
645 w: &'a mut W,
646}
647impl<'a> _UDEW<'a> {
648 #[doc = r" Writes `variant` to the field"]
649 #[inline]
650 pub fn variant(self, variant: UDEW) -> &'a mut W {
651 {
652 self.bit(variant._bits())
653 }
654 }
655 #[doc = "Update DMA request disabled"]
656 #[inline]
657 pub fn disabled(self) -> &'a mut W {
658 self.variant(UDEW::DISABLED)
659 }
660 #[doc = "Update DMA request enabled"]
661 #[inline]
662 pub fn enabled(self) -> &'a mut W {
663 self.variant(UDEW::ENABLED)
664 }
665 #[doc = r" Sets the field bit"]
666 pub fn set_bit(self) -> &'a mut W {
667 self.bit(true)
668 }
669 #[doc = r" Clears the field bit"]
670 pub fn clear_bit(self) -> &'a mut W {
671 self.bit(false)
672 }
673 #[doc = r" Writes raw bits to the field"]
674 #[inline]
675 pub fn bit(self, value: bool) -> &'a mut W {
676 const MASK: bool = true;
677 const OFFSET: u8 = 8;
678 self.w.bits &= !((MASK as u32) << OFFSET);
679 self.w.bits |= ((value & MASK) as u32) << OFFSET;
680 self.w
681 }
682}
683#[doc = "Values that can be written to the field `TIE`"]
684pub enum TIEW {
685 #[doc = "Trigger interrupt disabled"]
686 DISABLED,
687 #[doc = "Trigger interrupt enabled"]
688 ENABLED,
689}
690impl TIEW {
691 #[allow(missing_docs)]
692 #[doc(hidden)]
693 #[inline]
694 pub fn _bits(&self) -> bool {
695 match *self {
696 TIEW::DISABLED => false,
697 TIEW::ENABLED => true,
698 }
699 }
700}
701#[doc = r" Proxy"]
702pub struct _TIEW<'a> {
703 w: &'a mut W,
704}
705impl<'a> _TIEW<'a> {
706 #[doc = r" Writes `variant` to the field"]
707 #[inline]
708 pub fn variant(self, variant: TIEW) -> &'a mut W {
709 {
710 self.bit(variant._bits())
711 }
712 }
713 #[doc = "Trigger interrupt disabled"]
714 #[inline]
715 pub fn disabled(self) -> &'a mut W {
716 self.variant(TIEW::DISABLED)
717 }
718 #[doc = "Trigger interrupt enabled"]
719 #[inline]
720 pub fn enabled(self) -> &'a mut W {
721 self.variant(TIEW::ENABLED)
722 }
723 #[doc = r" Sets the field bit"]
724 pub fn set_bit(self) -> &'a mut W {
725 self.bit(true)
726 }
727 #[doc = r" Clears the field bit"]
728 pub fn clear_bit(self) -> &'a mut W {
729 self.bit(false)
730 }
731 #[doc = r" Writes raw bits to the field"]
732 #[inline]
733 pub fn bit(self, value: bool) -> &'a mut W {
734 const MASK: bool = true;
735 const OFFSET: u8 = 6;
736 self.w.bits &= !((MASK as u32) << OFFSET);
737 self.w.bits |= ((value & MASK) as u32) << OFFSET;
738 self.w
739 }
740}
741#[doc = "Values that can be written to the field `CC4IE`"]
742pub enum CC4IEW {
743 #[doc = "CCx interrupt disabled"]
744 DISABLED,
745 #[doc = "CCx interrupt enabled"]
746 ENABLED,
747}
748impl CC4IEW {
749 #[allow(missing_docs)]
750 #[doc(hidden)]
751 #[inline]
752 pub fn _bits(&self) -> bool {
753 match *self {
754 CC4IEW::DISABLED => false,
755 CC4IEW::ENABLED => true,
756 }
757 }
758}
759#[doc = r" Proxy"]
760pub struct _CC4IEW<'a> {
761 w: &'a mut W,
762}
763impl<'a> _CC4IEW<'a> {
764 #[doc = r" Writes `variant` to the field"]
765 #[inline]
766 pub fn variant(self, variant: CC4IEW) -> &'a mut W {
767 {
768 self.bit(variant._bits())
769 }
770 }
771 #[doc = "CCx interrupt disabled"]
772 #[inline]
773 pub fn disabled(self) -> &'a mut W {
774 self.variant(CC4IEW::DISABLED)
775 }
776 #[doc = "CCx interrupt enabled"]
777 #[inline]
778 pub fn enabled(self) -> &'a mut W {
779 self.variant(CC4IEW::ENABLED)
780 }
781 #[doc = r" Sets the field bit"]
782 pub fn set_bit(self) -> &'a mut W {
783 self.bit(true)
784 }
785 #[doc = r" Clears the field bit"]
786 pub fn clear_bit(self) -> &'a mut W {
787 self.bit(false)
788 }
789 #[doc = r" Writes raw bits to the field"]
790 #[inline]
791 pub fn bit(self, value: bool) -> &'a mut W {
792 const MASK: bool = true;
793 const OFFSET: u8 = 4;
794 self.w.bits &= !((MASK as u32) << OFFSET);
795 self.w.bits |= ((value & MASK) as u32) << OFFSET;
796 self.w
797 }
798}
799#[doc = "Values that can be written to the field `CC3IE`"]
800pub type CC3IEW = CC4IEW;
801#[doc = r" Proxy"]
802pub struct _CC3IEW<'a> {
803 w: &'a mut W,
804}
805impl<'a> _CC3IEW<'a> {
806 #[doc = r" Writes `variant` to the field"]
807 #[inline]
808 pub fn variant(self, variant: CC3IEW) -> &'a mut W {
809 {
810 self.bit(variant._bits())
811 }
812 }
813 #[doc = "CCx interrupt disabled"]
814 #[inline]
815 pub fn disabled(self) -> &'a mut W {
816 self.variant(CC4IEW::DISABLED)
817 }
818 #[doc = "CCx interrupt enabled"]
819 #[inline]
820 pub fn enabled(self) -> &'a mut W {
821 self.variant(CC4IEW::ENABLED)
822 }
823 #[doc = r" Sets the field bit"]
824 pub fn set_bit(self) -> &'a mut W {
825 self.bit(true)
826 }
827 #[doc = r" Clears the field bit"]
828 pub fn clear_bit(self) -> &'a mut W {
829 self.bit(false)
830 }
831 #[doc = r" Writes raw bits to the field"]
832 #[inline]
833 pub fn bit(self, value: bool) -> &'a mut W {
834 const MASK: bool = true;
835 const OFFSET: u8 = 3;
836 self.w.bits &= !((MASK as u32) << OFFSET);
837 self.w.bits |= ((value & MASK) as u32) << OFFSET;
838 self.w
839 }
840}
841#[doc = "Values that can be written to the field `CC2IE`"]
842pub type CC2IEW = CC4IEW;
843#[doc = r" Proxy"]
844pub struct _CC2IEW<'a> {
845 w: &'a mut W,
846}
847impl<'a> _CC2IEW<'a> {
848 #[doc = r" Writes `variant` to the field"]
849 #[inline]
850 pub fn variant(self, variant: CC2IEW) -> &'a mut W {
851 {
852 self.bit(variant._bits())
853 }
854 }
855 #[doc = "CCx interrupt disabled"]
856 #[inline]
857 pub fn disabled(self) -> &'a mut W {
858 self.variant(CC4IEW::DISABLED)
859 }
860 #[doc = "CCx interrupt enabled"]
861 #[inline]
862 pub fn enabled(self) -> &'a mut W {
863 self.variant(CC4IEW::ENABLED)
864 }
865 #[doc = r" Sets the field bit"]
866 pub fn set_bit(self) -> &'a mut W {
867 self.bit(true)
868 }
869 #[doc = r" Clears the field bit"]
870 pub fn clear_bit(self) -> &'a mut W {
871 self.bit(false)
872 }
873 #[doc = r" Writes raw bits to the field"]
874 #[inline]
875 pub fn bit(self, value: bool) -> &'a mut W {
876 const MASK: bool = true;
877 const OFFSET: u8 = 2;
878 self.w.bits &= !((MASK as u32) << OFFSET);
879 self.w.bits |= ((value & MASK) as u32) << OFFSET;
880 self.w
881 }
882}
883#[doc = "Values that can be written to the field `CC1IE`"]
884pub type CC1IEW = CC4IEW;
885#[doc = r" Proxy"]
886pub struct _CC1IEW<'a> {
887 w: &'a mut W,
888}
889impl<'a> _CC1IEW<'a> {
890 #[doc = r" Writes `variant` to the field"]
891 #[inline]
892 pub fn variant(self, variant: CC1IEW) -> &'a mut W {
893 {
894 self.bit(variant._bits())
895 }
896 }
897 #[doc = "CCx interrupt disabled"]
898 #[inline]
899 pub fn disabled(self) -> &'a mut W {
900 self.variant(CC4IEW::DISABLED)
901 }
902 #[doc = "CCx interrupt enabled"]
903 #[inline]
904 pub fn enabled(self) -> &'a mut W {
905 self.variant(CC4IEW::ENABLED)
906 }
907 #[doc = r" Sets the field bit"]
908 pub fn set_bit(self) -> &'a mut W {
909 self.bit(true)
910 }
911 #[doc = r" Clears the field bit"]
912 pub fn clear_bit(self) -> &'a mut W {
913 self.bit(false)
914 }
915 #[doc = r" Writes raw bits to the field"]
916 #[inline]
917 pub fn bit(self, value: bool) -> &'a mut W {
918 const MASK: bool = true;
919 const OFFSET: u8 = 1;
920 self.w.bits &= !((MASK as u32) << OFFSET);
921 self.w.bits |= ((value & MASK) as u32) << OFFSET;
922 self.w
923 }
924}
925#[doc = "Values that can be written to the field `UIE`"]
926pub enum UIEW {
927 #[doc = "Update interrupt disabled"]
928 DISABLED,
929 #[doc = "Update interrupt enabled"]
930 ENABLED,
931}
932impl UIEW {
933 #[allow(missing_docs)]
934 #[doc(hidden)]
935 #[inline]
936 pub fn _bits(&self) -> bool {
937 match *self {
938 UIEW::DISABLED => false,
939 UIEW::ENABLED => true,
940 }
941 }
942}
943#[doc = r" Proxy"]
944pub struct _UIEW<'a> {
945 w: &'a mut W,
946}
947impl<'a> _UIEW<'a> {
948 #[doc = r" Writes `variant` to the field"]
949 #[inline]
950 pub fn variant(self, variant: UIEW) -> &'a mut W {
951 {
952 self.bit(variant._bits())
953 }
954 }
955 #[doc = "Update interrupt disabled"]
956 #[inline]
957 pub fn disabled(self) -> &'a mut W {
958 self.variant(UIEW::DISABLED)
959 }
960 #[doc = "Update interrupt enabled"]
961 #[inline]
962 pub fn enabled(self) -> &'a mut W {
963 self.variant(UIEW::ENABLED)
964 }
965 #[doc = r" Sets the field bit"]
966 pub fn set_bit(self) -> &'a mut W {
967 self.bit(true)
968 }
969 #[doc = r" Clears the field bit"]
970 pub fn clear_bit(self) -> &'a mut W {
971 self.bit(false)
972 }
973 #[doc = r" Writes raw bits to the field"]
974 #[inline]
975 pub fn bit(self, value: bool) -> &'a mut W {
976 const MASK: bool = true;
977 const OFFSET: u8 = 0;
978 self.w.bits &= !((MASK as u32) << OFFSET);
979 self.w.bits |= ((value & MASK) as u32) << OFFSET;
980 self.w
981 }
982}
983impl R {
984 #[doc = r" Value of the register as raw bits"]
985 #[inline]
986 pub fn bits(&self) -> u32 {
987 self.bits
988 }
989 #[doc = "Bit 14 - Trigger DMA request enable"]
990 #[inline]
991 pub fn tde(&self) -> TDER {
992 TDER::_from({
993 const MASK: bool = true;
994 const OFFSET: u8 = 14;
995 ((self.bits >> OFFSET) & MASK as u32) != 0
996 })
997 }
998 #[doc = "Bit 13 - COM DMA request enable"]
999 #[inline]
1000 pub fn comde(&self) -> COMDER {
1001 let bits = {
1002 const MASK: bool = true;
1003 const OFFSET: u8 = 13;
1004 ((self.bits >> OFFSET) & MASK as u32) != 0
1005 };
1006 COMDER { bits }
1007 }
1008 #[doc = "Bit 12 - Capture/Compare 4 DMA request enable"]
1009 #[inline]
1010 pub fn cc4de(&self) -> CC4DER {
1011 CC4DER::_from({
1012 const MASK: bool = true;
1013 const OFFSET: u8 = 12;
1014 ((self.bits >> OFFSET) & MASK as u32) != 0
1015 })
1016 }
1017 #[doc = "Bit 11 - Capture/Compare 3 DMA request enable"]
1018 #[inline]
1019 pub fn cc3de(&self) -> CC3DER {
1020 CC3DER::_from({
1021 const MASK: bool = true;
1022 const OFFSET: u8 = 11;
1023 ((self.bits >> OFFSET) & MASK as u32) != 0
1024 })
1025 }
1026 #[doc = "Bit 10 - Capture/Compare 2 DMA request enable"]
1027 #[inline]
1028 pub fn cc2de(&self) -> CC2DER {
1029 CC2DER::_from({
1030 const MASK: bool = true;
1031 const OFFSET: u8 = 10;
1032 ((self.bits >> OFFSET) & MASK as u32) != 0
1033 })
1034 }
1035 #[doc = "Bit 9 - Capture/Compare 1 DMA request enable"]
1036 #[inline]
1037 pub fn cc1de(&self) -> CC1DER {
1038 CC1DER::_from({
1039 const MASK: bool = true;
1040 const OFFSET: u8 = 9;
1041 ((self.bits >> OFFSET) & MASK as u32) != 0
1042 })
1043 }
1044 #[doc = "Bit 8 - Update DMA request enable"]
1045 #[inline]
1046 pub fn ude(&self) -> UDER {
1047 UDER::_from({
1048 const MASK: bool = true;
1049 const OFFSET: u8 = 8;
1050 ((self.bits >> OFFSET) & MASK as u32) != 0
1051 })
1052 }
1053 #[doc = "Bit 6 - Trigger interrupt enable"]
1054 #[inline]
1055 pub fn tie(&self) -> TIER {
1056 TIER::_from({
1057 const MASK: bool = true;
1058 const OFFSET: u8 = 6;
1059 ((self.bits >> OFFSET) & MASK as u32) != 0
1060 })
1061 }
1062 #[doc = "Bit 4 - Capture/Compare 4 interrupt enable"]
1063 #[inline]
1064 pub fn cc4ie(&self) -> CC4IER {
1065 CC4IER::_from({
1066 const MASK: bool = true;
1067 const OFFSET: u8 = 4;
1068 ((self.bits >> OFFSET) & MASK as u32) != 0
1069 })
1070 }
1071 #[doc = "Bit 3 - Capture/Compare 3 interrupt enable"]
1072 #[inline]
1073 pub fn cc3ie(&self) -> CC3IER {
1074 CC3IER::_from({
1075 const MASK: bool = true;
1076 const OFFSET: u8 = 3;
1077 ((self.bits >> OFFSET) & MASK as u32) != 0
1078 })
1079 }
1080 #[doc = "Bit 2 - Capture/Compare 2 interrupt enable"]
1081 #[inline]
1082 pub fn cc2ie(&self) -> CC2IER {
1083 CC2IER::_from({
1084 const MASK: bool = true;
1085 const OFFSET: u8 = 2;
1086 ((self.bits >> OFFSET) & MASK as u32) != 0
1087 })
1088 }
1089 #[doc = "Bit 1 - Capture/Compare 1 interrupt enable"]
1090 #[inline]
1091 pub fn cc1ie(&self) -> CC1IER {
1092 CC1IER::_from({
1093 const MASK: bool = true;
1094 const OFFSET: u8 = 1;
1095 ((self.bits >> OFFSET) & MASK as u32) != 0
1096 })
1097 }
1098 #[doc = "Bit 0 - Update interrupt enable"]
1099 #[inline]
1100 pub fn uie(&self) -> UIER {
1101 UIER::_from({
1102 const MASK: bool = true;
1103 const OFFSET: u8 = 0;
1104 ((self.bits >> OFFSET) & MASK as u32) != 0
1105 })
1106 }
1107}
1108impl W {
1109 #[doc = r" Reset value of the register"]
1110 #[inline]
1111 pub fn reset_value() -> W {
1112 W { bits: 0 }
1113 }
1114 #[doc = r" Writes raw bits to the register"]
1115 #[inline]
1116 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1117 self.bits = bits;
1118 self
1119 }
1120 #[doc = "Bit 14 - Trigger DMA request enable"]
1121 #[inline]
1122 pub fn tde(&mut self) -> _TDEW {
1123 _TDEW { w: self }
1124 }
1125 #[doc = "Bit 13 - COM DMA request enable"]
1126 #[inline]
1127 pub fn comde(&mut self) -> _COMDEW {
1128 _COMDEW { w: self }
1129 }
1130 #[doc = "Bit 12 - Capture/Compare 4 DMA request enable"]
1131 #[inline]
1132 pub fn cc4de(&mut self) -> _CC4DEW {
1133 _CC4DEW { w: self }
1134 }
1135 #[doc = "Bit 11 - Capture/Compare 3 DMA request enable"]
1136 #[inline]
1137 pub fn cc3de(&mut self) -> _CC3DEW {
1138 _CC3DEW { w: self }
1139 }
1140 #[doc = "Bit 10 - Capture/Compare 2 DMA request enable"]
1141 #[inline]
1142 pub fn cc2de(&mut self) -> _CC2DEW {
1143 _CC2DEW { w: self }
1144 }
1145 #[doc = "Bit 9 - Capture/Compare 1 DMA request enable"]
1146 #[inline]
1147 pub fn cc1de(&mut self) -> _CC1DEW {
1148 _CC1DEW { w: self }
1149 }
1150 #[doc = "Bit 8 - Update DMA request enable"]
1151 #[inline]
1152 pub fn ude(&mut self) -> _UDEW {
1153 _UDEW { w: self }
1154 }
1155 #[doc = "Bit 6 - Trigger interrupt enable"]
1156 #[inline]
1157 pub fn tie(&mut self) -> _TIEW {
1158 _TIEW { w: self }
1159 }
1160 #[doc = "Bit 4 - Capture/Compare 4 interrupt enable"]
1161 #[inline]
1162 pub fn cc4ie(&mut self) -> _CC4IEW {
1163 _CC4IEW { w: self }
1164 }
1165 #[doc = "Bit 3 - Capture/Compare 3 interrupt enable"]
1166 #[inline]
1167 pub fn cc3ie(&mut self) -> _CC3IEW {
1168 _CC3IEW { w: self }
1169 }
1170 #[doc = "Bit 2 - Capture/Compare 2 interrupt enable"]
1171 #[inline]
1172 pub fn cc2ie(&mut self) -> _CC2IEW {
1173 _CC2IEW { w: self }
1174 }
1175 #[doc = "Bit 1 - Capture/Compare 1 interrupt enable"]
1176 #[inline]
1177 pub fn cc1ie(&mut self) -> _CC1IEW {
1178 _CC1IEW { w: self }
1179 }
1180 #[doc = "Bit 0 - Update interrupt enable"]
1181 #[inline]
1182 pub fn uie(&mut self) -> _UIEW {
1183 _UIEW { w: self }
1184 }
1185}