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::CCR {
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 `CAP0RE`"]
46#[derive(Clone, Copy, Debug, PartialEq)]
47pub enum CAP0RER {
48 #[doc = "Enabled."]
49 ENABLED,
50 #[doc = "Disabled."]
51 DISABLED,
52}
53impl CAP0RER {
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 CAP0RER::ENABLED => true,
69 CAP0RER::DISABLED => false,
70 }
71 }
72 #[allow(missing_docs)]
73 #[doc(hidden)]
74 #[inline]
75 pub fn _from(value: bool) -> CAP0RER {
76 match value {
77 true => CAP0RER::ENABLED,
78 false => CAP0RER::DISABLED,
79 }
80 }
81 #[doc = "Checks if the value of the field is `ENABLED`"]
82 #[inline]
83 pub fn is_enabled(&self) -> bool {
84 *self == CAP0RER::ENABLED
85 }
86 #[doc = "Checks if the value of the field is `DISABLED`"]
87 #[inline]
88 pub fn is_disabled(&self) -> bool {
89 *self == CAP0RER::DISABLED
90 }
91}
92#[doc = "Possible values of the field `CAP0FE`"]
93#[derive(Clone, Copy, Debug, PartialEq)]
94pub enum CAP0FER {
95 #[doc = "Enabled."]
96 ENABLED,
97 #[doc = "Disabled."]
98 DISABLED,
99}
100impl CAP0FER {
101 #[doc = r" Returns `true` if the bit is clear (0)"]
102 #[inline]
103 pub fn bit_is_clear(&self) -> bool {
104 !self.bit()
105 }
106 #[doc = r" Returns `true` if the bit is set (1)"]
107 #[inline]
108 pub fn bit_is_set(&self) -> bool {
109 self.bit()
110 }
111 #[doc = r" Value of the field as raw bits"]
112 #[inline]
113 pub fn bit(&self) -> bool {
114 match *self {
115 CAP0FER::ENABLED => true,
116 CAP0FER::DISABLED => false,
117 }
118 }
119 #[allow(missing_docs)]
120 #[doc(hidden)]
121 #[inline]
122 pub fn _from(value: bool) -> CAP0FER {
123 match value {
124 true => CAP0FER::ENABLED,
125 false => CAP0FER::DISABLED,
126 }
127 }
128 #[doc = "Checks if the value of the field is `ENABLED`"]
129 #[inline]
130 pub fn is_enabled(&self) -> bool {
131 *self == CAP0FER::ENABLED
132 }
133 #[doc = "Checks if the value of the field is `DISABLED`"]
134 #[inline]
135 pub fn is_disabled(&self) -> bool {
136 *self == CAP0FER::DISABLED
137 }
138}
139#[doc = "Possible values of the field `CAP0I`"]
140#[derive(Clone, Copy, Debug, PartialEq)]
141pub enum CAP0IR {
142 #[doc = "Enabled."]
143 ENABLED,
144 #[doc = "Disabled."]
145 DISABLED,
146}
147impl CAP0IR {
148 #[doc = r" Returns `true` if the bit is clear (0)"]
149 #[inline]
150 pub fn bit_is_clear(&self) -> bool {
151 !self.bit()
152 }
153 #[doc = r" Returns `true` if the bit is set (1)"]
154 #[inline]
155 pub fn bit_is_set(&self) -> bool {
156 self.bit()
157 }
158 #[doc = r" Value of the field as raw bits"]
159 #[inline]
160 pub fn bit(&self) -> bool {
161 match *self {
162 CAP0IR::ENABLED => true,
163 CAP0IR::DISABLED => false,
164 }
165 }
166 #[allow(missing_docs)]
167 #[doc(hidden)]
168 #[inline]
169 pub fn _from(value: bool) -> CAP0IR {
170 match value {
171 true => CAP0IR::ENABLED,
172 false => CAP0IR::DISABLED,
173 }
174 }
175 #[doc = "Checks if the value of the field is `ENABLED`"]
176 #[inline]
177 pub fn is_enabled(&self) -> bool {
178 *self == CAP0IR::ENABLED
179 }
180 #[doc = "Checks if the value of the field is `DISABLED`"]
181 #[inline]
182 pub fn is_disabled(&self) -> bool {
183 *self == CAP0IR::DISABLED
184 }
185}
186#[doc = "Possible values of the field `CAP1RE`"]
187#[derive(Clone, Copy, Debug, PartialEq)]
188pub enum CAP1RER {
189 #[doc = "Enabled."]
190 ENABLED,
191 #[doc = "Disabled."]
192 DISABLED,
193}
194impl CAP1RER {
195 #[doc = r" Returns `true` if the bit is clear (0)"]
196 #[inline]
197 pub fn bit_is_clear(&self) -> bool {
198 !self.bit()
199 }
200 #[doc = r" Returns `true` if the bit is set (1)"]
201 #[inline]
202 pub fn bit_is_set(&self) -> bool {
203 self.bit()
204 }
205 #[doc = r" Value of the field as raw bits"]
206 #[inline]
207 pub fn bit(&self) -> bool {
208 match *self {
209 CAP1RER::ENABLED => true,
210 CAP1RER::DISABLED => false,
211 }
212 }
213 #[allow(missing_docs)]
214 #[doc(hidden)]
215 #[inline]
216 pub fn _from(value: bool) -> CAP1RER {
217 match value {
218 true => CAP1RER::ENABLED,
219 false => CAP1RER::DISABLED,
220 }
221 }
222 #[doc = "Checks if the value of the field is `ENABLED`"]
223 #[inline]
224 pub fn is_enabled(&self) -> bool {
225 *self == CAP1RER::ENABLED
226 }
227 #[doc = "Checks if the value of the field is `DISABLED`"]
228 #[inline]
229 pub fn is_disabled(&self) -> bool {
230 *self == CAP1RER::DISABLED
231 }
232}
233#[doc = "Possible values of the field `CAP1FE`"]
234#[derive(Clone, Copy, Debug, PartialEq)]
235pub enum CAP1FER {
236 #[doc = "Enabled."]
237 ENABLED,
238 #[doc = "Disabled."]
239 DISABLED,
240}
241impl CAP1FER {
242 #[doc = r" Returns `true` if the bit is clear (0)"]
243 #[inline]
244 pub fn bit_is_clear(&self) -> bool {
245 !self.bit()
246 }
247 #[doc = r" Returns `true` if the bit is set (1)"]
248 #[inline]
249 pub fn bit_is_set(&self) -> bool {
250 self.bit()
251 }
252 #[doc = r" Value of the field as raw bits"]
253 #[inline]
254 pub fn bit(&self) -> bool {
255 match *self {
256 CAP1FER::ENABLED => true,
257 CAP1FER::DISABLED => false,
258 }
259 }
260 #[allow(missing_docs)]
261 #[doc(hidden)]
262 #[inline]
263 pub fn _from(value: bool) -> CAP1FER {
264 match value {
265 true => CAP1FER::ENABLED,
266 false => CAP1FER::DISABLED,
267 }
268 }
269 #[doc = "Checks if the value of the field is `ENABLED`"]
270 #[inline]
271 pub fn is_enabled(&self) -> bool {
272 *self == CAP1FER::ENABLED
273 }
274 #[doc = "Checks if the value of the field is `DISABLED`"]
275 #[inline]
276 pub fn is_disabled(&self) -> bool {
277 *self == CAP1FER::DISABLED
278 }
279}
280#[doc = "Possible values of the field `CAP1I`"]
281#[derive(Clone, Copy, Debug, PartialEq)]
282pub enum CAP1IR {
283 #[doc = "Enabled."]
284 ENABLED,
285 #[doc = "Disabled."]
286 DISABLED,
287}
288impl CAP1IR {
289 #[doc = r" Returns `true` if the bit is clear (0)"]
290 #[inline]
291 pub fn bit_is_clear(&self) -> bool {
292 !self.bit()
293 }
294 #[doc = r" Returns `true` if the bit is set (1)"]
295 #[inline]
296 pub fn bit_is_set(&self) -> bool {
297 self.bit()
298 }
299 #[doc = r" Value of the field as raw bits"]
300 #[inline]
301 pub fn bit(&self) -> bool {
302 match *self {
303 CAP1IR::ENABLED => true,
304 CAP1IR::DISABLED => false,
305 }
306 }
307 #[allow(missing_docs)]
308 #[doc(hidden)]
309 #[inline]
310 pub fn _from(value: bool) -> CAP1IR {
311 match value {
312 true => CAP1IR::ENABLED,
313 false => CAP1IR::DISABLED,
314 }
315 }
316 #[doc = "Checks if the value of the field is `ENABLED`"]
317 #[inline]
318 pub fn is_enabled(&self) -> bool {
319 *self == CAP1IR::ENABLED
320 }
321 #[doc = "Checks if the value of the field is `DISABLED`"]
322 #[inline]
323 pub fn is_disabled(&self) -> bool {
324 *self == CAP1IR::DISABLED
325 }
326}
327#[doc = "Values that can be written to the field `CAP0RE`"]
328pub enum CAP0REW {
329 #[doc = "Enabled."]
330 ENABLED,
331 #[doc = "Disabled."]
332 DISABLED,
333}
334impl CAP0REW {
335 #[allow(missing_docs)]
336 #[doc(hidden)]
337 #[inline]
338 pub fn _bits(&self) -> bool {
339 match *self {
340 CAP0REW::ENABLED => true,
341 CAP0REW::DISABLED => false,
342 }
343 }
344}
345#[doc = r" Proxy"]
346pub struct _CAP0REW<'a> {
347 w: &'a mut W,
348}
349impl<'a> _CAP0REW<'a> {
350 #[doc = r" Writes `variant` to the field"]
351 #[inline]
352 pub fn variant(self, variant: CAP0REW) -> &'a mut W {
353 {
354 self.bit(variant._bits())
355 }
356 }
357 #[doc = "Enabled."]
358 #[inline]
359 pub fn enabled(self) -> &'a mut W {
360 self.variant(CAP0REW::ENABLED)
361 }
362 #[doc = "Disabled."]
363 #[inline]
364 pub fn disabled(self) -> &'a mut W {
365 self.variant(CAP0REW::DISABLED)
366 }
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 = 0;
380 self.w.bits &= !((MASK as u32) << OFFSET);
381 self.w.bits |= ((value & MASK) as u32) << OFFSET;
382 self.w
383 }
384}
385#[doc = "Values that can be written to the field `CAP0FE`"]
386pub enum CAP0FEW {
387 #[doc = "Enabled."]
388 ENABLED,
389 #[doc = "Disabled."]
390 DISABLED,
391}
392impl CAP0FEW {
393 #[allow(missing_docs)]
394 #[doc(hidden)]
395 #[inline]
396 pub fn _bits(&self) -> bool {
397 match *self {
398 CAP0FEW::ENABLED => true,
399 CAP0FEW::DISABLED => false,
400 }
401 }
402}
403#[doc = r" Proxy"]
404pub struct _CAP0FEW<'a> {
405 w: &'a mut W,
406}
407impl<'a> _CAP0FEW<'a> {
408 #[doc = r" Writes `variant` to the field"]
409 #[inline]
410 pub fn variant(self, variant: CAP0FEW) -> &'a mut W {
411 {
412 self.bit(variant._bits())
413 }
414 }
415 #[doc = "Enabled."]
416 #[inline]
417 pub fn enabled(self) -> &'a mut W {
418 self.variant(CAP0FEW::ENABLED)
419 }
420 #[doc = "Disabled."]
421 #[inline]
422 pub fn disabled(self) -> &'a mut W {
423 self.variant(CAP0FEW::DISABLED)
424 }
425 #[doc = r" Sets the field bit"]
426 pub fn set_bit(self) -> &'a mut W {
427 self.bit(true)
428 }
429 #[doc = r" Clears the field bit"]
430 pub fn clear_bit(self) -> &'a mut W {
431 self.bit(false)
432 }
433 #[doc = r" Writes raw bits to the field"]
434 #[inline]
435 pub fn bit(self, value: bool) -> &'a mut W {
436 const MASK: bool = true;
437 const OFFSET: u8 = 1;
438 self.w.bits &= !((MASK as u32) << OFFSET);
439 self.w.bits |= ((value & MASK) as u32) << OFFSET;
440 self.w
441 }
442}
443#[doc = "Values that can be written to the field `CAP0I`"]
444pub enum CAP0IW {
445 #[doc = "Enabled."]
446 ENABLED,
447 #[doc = "Disabled."]
448 DISABLED,
449}
450impl CAP0IW {
451 #[allow(missing_docs)]
452 #[doc(hidden)]
453 #[inline]
454 pub fn _bits(&self) -> bool {
455 match *self {
456 CAP0IW::ENABLED => true,
457 CAP0IW::DISABLED => false,
458 }
459 }
460}
461#[doc = r" Proxy"]
462pub struct _CAP0IW<'a> {
463 w: &'a mut W,
464}
465impl<'a> _CAP0IW<'a> {
466 #[doc = r" Writes `variant` to the field"]
467 #[inline]
468 pub fn variant(self, variant: CAP0IW) -> &'a mut W {
469 {
470 self.bit(variant._bits())
471 }
472 }
473 #[doc = "Enabled."]
474 #[inline]
475 pub fn enabled(self) -> &'a mut W {
476 self.variant(CAP0IW::ENABLED)
477 }
478 #[doc = "Disabled."]
479 #[inline]
480 pub fn disabled(self) -> &'a mut W {
481 self.variant(CAP0IW::DISABLED)
482 }
483 #[doc = r" Sets the field bit"]
484 pub fn set_bit(self) -> &'a mut W {
485 self.bit(true)
486 }
487 #[doc = r" Clears the field bit"]
488 pub fn clear_bit(self) -> &'a mut W {
489 self.bit(false)
490 }
491 #[doc = r" Writes raw bits to the field"]
492 #[inline]
493 pub fn bit(self, value: bool) -> &'a mut W {
494 const MASK: bool = true;
495 const OFFSET: u8 = 2;
496 self.w.bits &= !((MASK as u32) << OFFSET);
497 self.w.bits |= ((value & MASK) as u32) << OFFSET;
498 self.w
499 }
500}
501#[doc = "Values that can be written to the field `CAP1RE`"]
502pub enum CAP1REW {
503 #[doc = "Enabled."]
504 ENABLED,
505 #[doc = "Disabled."]
506 DISABLED,
507}
508impl CAP1REW {
509 #[allow(missing_docs)]
510 #[doc(hidden)]
511 #[inline]
512 pub fn _bits(&self) -> bool {
513 match *self {
514 CAP1REW::ENABLED => true,
515 CAP1REW::DISABLED => false,
516 }
517 }
518}
519#[doc = r" Proxy"]
520pub struct _CAP1REW<'a> {
521 w: &'a mut W,
522}
523impl<'a> _CAP1REW<'a> {
524 #[doc = r" Writes `variant` to the field"]
525 #[inline]
526 pub fn variant(self, variant: CAP1REW) -> &'a mut W {
527 {
528 self.bit(variant._bits())
529 }
530 }
531 #[doc = "Enabled."]
532 #[inline]
533 pub fn enabled(self) -> &'a mut W {
534 self.variant(CAP1REW::ENABLED)
535 }
536 #[doc = "Disabled."]
537 #[inline]
538 pub fn disabled(self) -> &'a mut W {
539 self.variant(CAP1REW::DISABLED)
540 }
541 #[doc = r" Sets the field bit"]
542 pub fn set_bit(self) -> &'a mut W {
543 self.bit(true)
544 }
545 #[doc = r" Clears the field bit"]
546 pub fn clear_bit(self) -> &'a mut W {
547 self.bit(false)
548 }
549 #[doc = r" Writes raw bits to the field"]
550 #[inline]
551 pub fn bit(self, value: bool) -> &'a mut W {
552 const MASK: bool = true;
553 const OFFSET: u8 = 6;
554 self.w.bits &= !((MASK as u32) << OFFSET);
555 self.w.bits |= ((value & MASK) as u32) << OFFSET;
556 self.w
557 }
558}
559#[doc = "Values that can be written to the field `CAP1FE`"]
560pub enum CAP1FEW {
561 #[doc = "Enabled."]
562 ENABLED,
563 #[doc = "Disabled."]
564 DISABLED,
565}
566impl CAP1FEW {
567 #[allow(missing_docs)]
568 #[doc(hidden)]
569 #[inline]
570 pub fn _bits(&self) -> bool {
571 match *self {
572 CAP1FEW::ENABLED => true,
573 CAP1FEW::DISABLED => false,
574 }
575 }
576}
577#[doc = r" Proxy"]
578pub struct _CAP1FEW<'a> {
579 w: &'a mut W,
580}
581impl<'a> _CAP1FEW<'a> {
582 #[doc = r" Writes `variant` to the field"]
583 #[inline]
584 pub fn variant(self, variant: CAP1FEW) -> &'a mut W {
585 {
586 self.bit(variant._bits())
587 }
588 }
589 #[doc = "Enabled."]
590 #[inline]
591 pub fn enabled(self) -> &'a mut W {
592 self.variant(CAP1FEW::ENABLED)
593 }
594 #[doc = "Disabled."]
595 #[inline]
596 pub fn disabled(self) -> &'a mut W {
597 self.variant(CAP1FEW::DISABLED)
598 }
599 #[doc = r" Sets the field bit"]
600 pub fn set_bit(self) -> &'a mut W {
601 self.bit(true)
602 }
603 #[doc = r" Clears the field bit"]
604 pub fn clear_bit(self) -> &'a mut W {
605 self.bit(false)
606 }
607 #[doc = r" Writes raw bits to the field"]
608 #[inline]
609 pub fn bit(self, value: bool) -> &'a mut W {
610 const MASK: bool = true;
611 const OFFSET: u8 = 7;
612 self.w.bits &= !((MASK as u32) << OFFSET);
613 self.w.bits |= ((value & MASK) as u32) << OFFSET;
614 self.w
615 }
616}
617#[doc = "Values that can be written to the field `CAP1I`"]
618pub enum CAP1IW {
619 #[doc = "Enabled."]
620 ENABLED,
621 #[doc = "Disabled."]
622 DISABLED,
623}
624impl CAP1IW {
625 #[allow(missing_docs)]
626 #[doc(hidden)]
627 #[inline]
628 pub fn _bits(&self) -> bool {
629 match *self {
630 CAP1IW::ENABLED => true,
631 CAP1IW::DISABLED => false,
632 }
633 }
634}
635#[doc = r" Proxy"]
636pub struct _CAP1IW<'a> {
637 w: &'a mut W,
638}
639impl<'a> _CAP1IW<'a> {
640 #[doc = r" Writes `variant` to the field"]
641 #[inline]
642 pub fn variant(self, variant: CAP1IW) -> &'a mut W {
643 {
644 self.bit(variant._bits())
645 }
646 }
647 #[doc = "Enabled."]
648 #[inline]
649 pub fn enabled(self) -> &'a mut W {
650 self.variant(CAP1IW::ENABLED)
651 }
652 #[doc = "Disabled."]
653 #[inline]
654 pub fn disabled(self) -> &'a mut W {
655 self.variant(CAP1IW::DISABLED)
656 }
657 #[doc = r" Sets the field bit"]
658 pub fn set_bit(self) -> &'a mut W {
659 self.bit(true)
660 }
661 #[doc = r" Clears the field bit"]
662 pub fn clear_bit(self) -> &'a mut W {
663 self.bit(false)
664 }
665 #[doc = r" Writes raw bits to the field"]
666 #[inline]
667 pub fn bit(self, value: bool) -> &'a mut W {
668 const MASK: bool = true;
669 const OFFSET: u8 = 8;
670 self.w.bits &= !((MASK as u32) << OFFSET);
671 self.w.bits |= ((value & MASK) as u32) << OFFSET;
672 self.w
673 }
674}
675impl R {
676 #[doc = r" Value of the register as raw bits"]
677 #[inline]
678 pub fn bits(&self) -> u32 {
679 self.bits
680 }
681 #[doc = "Bit 0 - Capture on CT16B0_CAP0 rising edge: a sequence of 0 then 1 on CT16B0_CAP0 will cause CR0 to be loaded with the contents of TC."]
682 #[inline]
683 pub fn cap0re(&self) -> CAP0RER {
684 CAP0RER::_from({
685 const MASK: bool = true;
686 const OFFSET: u8 = 0;
687 ((self.bits >> OFFSET) & MASK as u32) != 0
688 })
689 }
690 #[doc = "Bit 1 - Capture on CT16B0_CAP0 falling edge: a sequence of 1 then 0 on CT16B0_CAP0 will cause CR0 to be loaded with the contents of TC."]
691 #[inline]
692 pub fn cap0fe(&self) -> CAP0FER {
693 CAP0FER::_from({
694 const MASK: bool = true;
695 const OFFSET: u8 = 1;
696 ((self.bits >> OFFSET) & MASK as u32) != 0
697 })
698 }
699 #[doc = "Bit 2 - Interrupt on CT16B0_CAP0 event: a CR0 load due to a CT16B0_CAP0 event will generate an interrupt."]
700 #[inline]
701 pub fn cap0i(&self) -> CAP0IR {
702 CAP0IR::_from({
703 const MASK: bool = true;
704 const OFFSET: u8 = 2;
705 ((self.bits >> OFFSET) & MASK as u32) != 0
706 })
707 }
708 #[doc = "Bit 6 - Capture on CT16B0_CAP1 rising edge: a sequence of 0 then 1 on CT16B0_CAP1 will cause CR1 to be loaded with the contents of TC. This bit is reserved for 16-bit timer1 CT16B1."]
709 #[inline]
710 pub fn cap1re(&self) -> CAP1RER {
711 CAP1RER::_from({
712 const MASK: bool = true;
713 const OFFSET: u8 = 6;
714 ((self.bits >> OFFSET) & MASK as u32) != 0
715 })
716 }
717 #[doc = "Bit 7 - Capture on CT16B0_CAP1 falling edge: a sequence of 1 then 0 on CT16B0_CAP1 will cause CR1 to be loaded with the contents of TC. This bit is reserved for 16-bit timer1 CT16B1."]
718 #[inline]
719 pub fn cap1fe(&self) -> CAP1FER {
720 CAP1FER::_from({
721 const MASK: bool = true;
722 const OFFSET: u8 = 7;
723 ((self.bits >> OFFSET) & MASK as u32) != 0
724 })
725 }
726 #[doc = "Bit 8 - Interrupt on CT16B0_CAP1 event: a CR1 load due to a CT16B0_CAP1 event will generate an interrupt. This bit is reserved for 16-bit timer1 CT16B1."]
727 #[inline]
728 pub fn cap1i(&self) -> CAP1IR {
729 CAP1IR::_from({
730 const MASK: bool = true;
731 const OFFSET: u8 = 8;
732 ((self.bits >> OFFSET) & MASK as u32) != 0
733 })
734 }
735}
736impl W {
737 #[doc = r" Reset value of the register"]
738 #[inline]
739 pub fn reset_value() -> W {
740 W { bits: 0 }
741 }
742 #[doc = r" Writes raw bits to the register"]
743 #[inline]
744 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
745 self.bits = bits;
746 self
747 }
748 #[doc = "Bit 0 - Capture on CT16B0_CAP0 rising edge: a sequence of 0 then 1 on CT16B0_CAP0 will cause CR0 to be loaded with the contents of TC."]
749 #[inline]
750 pub fn cap0re(&mut self) -> _CAP0REW {
751 _CAP0REW { w: self }
752 }
753 #[doc = "Bit 1 - Capture on CT16B0_CAP0 falling edge: a sequence of 1 then 0 on CT16B0_CAP0 will cause CR0 to be loaded with the contents of TC."]
754 #[inline]
755 pub fn cap0fe(&mut self) -> _CAP0FEW {
756 _CAP0FEW { w: self }
757 }
758 #[doc = "Bit 2 - Interrupt on CT16B0_CAP0 event: a CR0 load due to a CT16B0_CAP0 event will generate an interrupt."]
759 #[inline]
760 pub fn cap0i(&mut self) -> _CAP0IW {
761 _CAP0IW { w: self }
762 }
763 #[doc = "Bit 6 - Capture on CT16B0_CAP1 rising edge: a sequence of 0 then 1 on CT16B0_CAP1 will cause CR1 to be loaded with the contents of TC. This bit is reserved for 16-bit timer1 CT16B1."]
764 #[inline]
765 pub fn cap1re(&mut self) -> _CAP1REW {
766 _CAP1REW { w: self }
767 }
768 #[doc = "Bit 7 - Capture on CT16B0_CAP1 falling edge: a sequence of 1 then 0 on CT16B0_CAP1 will cause CR1 to be loaded with the contents of TC. This bit is reserved for 16-bit timer1 CT16B1."]
769 #[inline]
770 pub fn cap1fe(&mut self) -> _CAP1FEW {
771 _CAP1FEW { w: self }
772 }
773 #[doc = "Bit 8 - Interrupt on CT16B0_CAP1 event: a CR1 load due to a CT16B0_CAP1 event will generate an interrupt. This bit is reserved for 16-bit timer1 CT16B1."]
774 #[inline]
775 pub fn cap1i(&mut self) -> _CAP1IW {
776 _CAP1IW { w: self }
777 }
778}