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::CR {
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 WCKSELR {
47 bits: u8,
48}
49impl WCKSELR {
50 #[doc = r" Value of the field as raw bits"]
51 #[inline]
52 pub fn bits(&self) -> u8 {
53 self.bits
54 }
55}
56#[doc = r" Value of the field"]
57pub struct TSEDGER {
58 bits: bool,
59}
60impl TSEDGER {
61 #[doc = r" Value of the field as raw bits"]
62 #[inline]
63 pub fn bit(&self) -> bool {
64 self.bits
65 }
66 #[doc = r" Returns `true` if the bit is clear (0)"]
67 #[inline]
68 pub fn bit_is_clear(&self) -> bool {
69 !self.bit()
70 }
71 #[doc = r" Returns `true` if the bit is set (1)"]
72 #[inline]
73 pub fn bit_is_set(&self) -> bool {
74 self.bit()
75 }
76}
77#[doc = r" Value of the field"]
78pub struct REFCKONR {
79 bits: bool,
80}
81impl REFCKONR {
82 #[doc = r" Value of the field as raw bits"]
83 #[inline]
84 pub fn bit(&self) -> bool {
85 self.bits
86 }
87 #[doc = r" Returns `true` if the bit is clear (0)"]
88 #[inline]
89 pub fn bit_is_clear(&self) -> bool {
90 !self.bit()
91 }
92 #[doc = r" Returns `true` if the bit is set (1)"]
93 #[inline]
94 pub fn bit_is_set(&self) -> bool {
95 self.bit()
96 }
97}
98#[doc = r" Value of the field"]
99pub struct BYPSHADR {
100 bits: bool,
101}
102impl BYPSHADR {
103 #[doc = r" Value of the field as raw bits"]
104 #[inline]
105 pub fn bit(&self) -> bool {
106 self.bits
107 }
108 #[doc = r" Returns `true` if the bit is clear (0)"]
109 #[inline]
110 pub fn bit_is_clear(&self) -> bool {
111 !self.bit()
112 }
113 #[doc = r" Returns `true` if the bit is set (1)"]
114 #[inline]
115 pub fn bit_is_set(&self) -> bool {
116 self.bit()
117 }
118}
119#[doc = r" Value of the field"]
120pub struct FMTR {
121 bits: bool,
122}
123impl FMTR {
124 #[doc = r" Value of the field as raw bits"]
125 #[inline]
126 pub fn bit(&self) -> bool {
127 self.bits
128 }
129 #[doc = r" Returns `true` if the bit is clear (0)"]
130 #[inline]
131 pub fn bit_is_clear(&self) -> bool {
132 !self.bit()
133 }
134 #[doc = r" Returns `true` if the bit is set (1)"]
135 #[inline]
136 pub fn bit_is_set(&self) -> bool {
137 self.bit()
138 }
139}
140#[doc = r" Value of the field"]
141pub struct ALRAER {
142 bits: bool,
143}
144impl ALRAER {
145 #[doc = r" Value of the field as raw bits"]
146 #[inline]
147 pub fn bit(&self) -> bool {
148 self.bits
149 }
150 #[doc = r" Returns `true` if the bit is clear (0)"]
151 #[inline]
152 pub fn bit_is_clear(&self) -> bool {
153 !self.bit()
154 }
155 #[doc = r" Returns `true` if the bit is set (1)"]
156 #[inline]
157 pub fn bit_is_set(&self) -> bool {
158 self.bit()
159 }
160}
161#[doc = r" Value of the field"]
162pub struct ALRBER {
163 bits: bool,
164}
165impl ALRBER {
166 #[doc = r" Value of the field as raw bits"]
167 #[inline]
168 pub fn bit(&self) -> bool {
169 self.bits
170 }
171 #[doc = r" Returns `true` if the bit is clear (0)"]
172 #[inline]
173 pub fn bit_is_clear(&self) -> bool {
174 !self.bit()
175 }
176 #[doc = r" Returns `true` if the bit is set (1)"]
177 #[inline]
178 pub fn bit_is_set(&self) -> bool {
179 self.bit()
180 }
181}
182#[doc = r" Value of the field"]
183pub struct WUTER {
184 bits: bool,
185}
186impl WUTER {
187 #[doc = r" Value of the field as raw bits"]
188 #[inline]
189 pub fn bit(&self) -> bool {
190 self.bits
191 }
192 #[doc = r" Returns `true` if the bit is clear (0)"]
193 #[inline]
194 pub fn bit_is_clear(&self) -> bool {
195 !self.bit()
196 }
197 #[doc = r" Returns `true` if the bit is set (1)"]
198 #[inline]
199 pub fn bit_is_set(&self) -> bool {
200 self.bit()
201 }
202}
203#[doc = r" Value of the field"]
204pub struct TSER {
205 bits: bool,
206}
207impl TSER {
208 #[doc = r" Value of the field as raw bits"]
209 #[inline]
210 pub fn bit(&self) -> bool {
211 self.bits
212 }
213 #[doc = r" Returns `true` if the bit is clear (0)"]
214 #[inline]
215 pub fn bit_is_clear(&self) -> bool {
216 !self.bit()
217 }
218 #[doc = r" Returns `true` if the bit is set (1)"]
219 #[inline]
220 pub fn bit_is_set(&self) -> bool {
221 self.bit()
222 }
223}
224#[doc = r" Value of the field"]
225pub struct ALRAIER {
226 bits: bool,
227}
228impl ALRAIER {
229 #[doc = r" Value of the field as raw bits"]
230 #[inline]
231 pub fn bit(&self) -> bool {
232 self.bits
233 }
234 #[doc = r" Returns `true` if the bit is clear (0)"]
235 #[inline]
236 pub fn bit_is_clear(&self) -> bool {
237 !self.bit()
238 }
239 #[doc = r" Returns `true` if the bit is set (1)"]
240 #[inline]
241 pub fn bit_is_set(&self) -> bool {
242 self.bit()
243 }
244}
245#[doc = r" Value of the field"]
246pub struct ALRBIER {
247 bits: bool,
248}
249impl ALRBIER {
250 #[doc = r" Value of the field as raw bits"]
251 #[inline]
252 pub fn bit(&self) -> bool {
253 self.bits
254 }
255 #[doc = r" Returns `true` if the bit is clear (0)"]
256 #[inline]
257 pub fn bit_is_clear(&self) -> bool {
258 !self.bit()
259 }
260 #[doc = r" Returns `true` if the bit is set (1)"]
261 #[inline]
262 pub fn bit_is_set(&self) -> bool {
263 self.bit()
264 }
265}
266#[doc = r" Value of the field"]
267pub struct WUTIER {
268 bits: bool,
269}
270impl WUTIER {
271 #[doc = r" Value of the field as raw bits"]
272 #[inline]
273 pub fn bit(&self) -> bool {
274 self.bits
275 }
276 #[doc = r" Returns `true` if the bit is clear (0)"]
277 #[inline]
278 pub fn bit_is_clear(&self) -> bool {
279 !self.bit()
280 }
281 #[doc = r" Returns `true` if the bit is set (1)"]
282 #[inline]
283 pub fn bit_is_set(&self) -> bool {
284 self.bit()
285 }
286}
287#[doc = r" Value of the field"]
288pub struct TSIER {
289 bits: bool,
290}
291impl TSIER {
292 #[doc = r" Value of the field as raw bits"]
293 #[inline]
294 pub fn bit(&self) -> bool {
295 self.bits
296 }
297 #[doc = r" Returns `true` if the bit is clear (0)"]
298 #[inline]
299 pub fn bit_is_clear(&self) -> bool {
300 !self.bit()
301 }
302 #[doc = r" Returns `true` if the bit is set (1)"]
303 #[inline]
304 pub fn bit_is_set(&self) -> bool {
305 self.bit()
306 }
307}
308#[doc = r" Value of the field"]
309pub struct ADD1HR {
310 bits: bool,
311}
312impl ADD1HR {
313 #[doc = r" Value of the field as raw bits"]
314 #[inline]
315 pub fn bit(&self) -> bool {
316 self.bits
317 }
318 #[doc = r" Returns `true` if the bit is clear (0)"]
319 #[inline]
320 pub fn bit_is_clear(&self) -> bool {
321 !self.bit()
322 }
323 #[doc = r" Returns `true` if the bit is set (1)"]
324 #[inline]
325 pub fn bit_is_set(&self) -> bool {
326 self.bit()
327 }
328}
329#[doc = r" Value of the field"]
330pub struct SUB1HR {
331 bits: bool,
332}
333impl SUB1HR {
334 #[doc = r" Value of the field as raw bits"]
335 #[inline]
336 pub fn bit(&self) -> bool {
337 self.bits
338 }
339 #[doc = r" Returns `true` if the bit is clear (0)"]
340 #[inline]
341 pub fn bit_is_clear(&self) -> bool {
342 !self.bit()
343 }
344 #[doc = r" Returns `true` if the bit is set (1)"]
345 #[inline]
346 pub fn bit_is_set(&self) -> bool {
347 self.bit()
348 }
349}
350#[doc = r" Value of the field"]
351pub struct BKPR {
352 bits: bool,
353}
354impl BKPR {
355 #[doc = r" Value of the field as raw bits"]
356 #[inline]
357 pub fn bit(&self) -> bool {
358 self.bits
359 }
360 #[doc = r" Returns `true` if the bit is clear (0)"]
361 #[inline]
362 pub fn bit_is_clear(&self) -> bool {
363 !self.bit()
364 }
365 #[doc = r" Returns `true` if the bit is set (1)"]
366 #[inline]
367 pub fn bit_is_set(&self) -> bool {
368 self.bit()
369 }
370}
371#[doc = r" Value of the field"]
372pub struct COSELR {
373 bits: bool,
374}
375impl COSELR {
376 #[doc = r" Value of the field as raw bits"]
377 #[inline]
378 pub fn bit(&self) -> bool {
379 self.bits
380 }
381 #[doc = r" Returns `true` if the bit is clear (0)"]
382 #[inline]
383 pub fn bit_is_clear(&self) -> bool {
384 !self.bit()
385 }
386 #[doc = r" Returns `true` if the bit is set (1)"]
387 #[inline]
388 pub fn bit_is_set(&self) -> bool {
389 self.bit()
390 }
391}
392#[doc = r" Value of the field"]
393pub struct POLR {
394 bits: bool,
395}
396impl POLR {
397 #[doc = r" Value of the field as raw bits"]
398 #[inline]
399 pub fn bit(&self) -> bool {
400 self.bits
401 }
402 #[doc = r" Returns `true` if the bit is clear (0)"]
403 #[inline]
404 pub fn bit_is_clear(&self) -> bool {
405 !self.bit()
406 }
407 #[doc = r" Returns `true` if the bit is set (1)"]
408 #[inline]
409 pub fn bit_is_set(&self) -> bool {
410 self.bit()
411 }
412}
413#[doc = r" Value of the field"]
414pub struct OSELR {
415 bits: u8,
416}
417impl OSELR {
418 #[doc = r" Value of the field as raw bits"]
419 #[inline]
420 pub fn bits(&self) -> u8 {
421 self.bits
422 }
423}
424#[doc = r" Value of the field"]
425pub struct COER {
426 bits: bool,
427}
428impl COER {
429 #[doc = r" Value of the field as raw bits"]
430 #[inline]
431 pub fn bit(&self) -> bool {
432 self.bits
433 }
434 #[doc = r" Returns `true` if the bit is clear (0)"]
435 #[inline]
436 pub fn bit_is_clear(&self) -> bool {
437 !self.bit()
438 }
439 #[doc = r" Returns `true` if the bit is set (1)"]
440 #[inline]
441 pub fn bit_is_set(&self) -> bool {
442 self.bit()
443 }
444}
445#[doc = r" Value of the field"]
446pub struct ITSER {
447 bits: bool,
448}
449impl ITSER {
450 #[doc = r" Value of the field as raw bits"]
451 #[inline]
452 pub fn bit(&self) -> bool {
453 self.bits
454 }
455 #[doc = r" Returns `true` if the bit is clear (0)"]
456 #[inline]
457 pub fn bit_is_clear(&self) -> bool {
458 !self.bit()
459 }
460 #[doc = r" Returns `true` if the bit is set (1)"]
461 #[inline]
462 pub fn bit_is_set(&self) -> bool {
463 self.bit()
464 }
465}
466#[doc = r" Proxy"]
467pub struct _WCKSELW<'a> {
468 w: &'a mut W,
469}
470impl<'a> _WCKSELW<'a> {
471 #[doc = r" Writes raw bits to the field"]
472 #[inline]
473 pub unsafe fn bits(self, value: u8) -> &'a mut W {
474 const MASK: u8 = 7;
475 const OFFSET: u8 = 0;
476 self.w.bits &= !((MASK as u32) << OFFSET);
477 self.w.bits |= ((value & MASK) as u32) << OFFSET;
478 self.w
479 }
480}
481#[doc = r" Proxy"]
482pub struct _TSEDGEW<'a> {
483 w: &'a mut W,
484}
485impl<'a> _TSEDGEW<'a> {
486 #[doc = r" Sets the field bit"]
487 pub fn set_bit(self) -> &'a mut W {
488 self.bit(true)
489 }
490 #[doc = r" Clears the field bit"]
491 pub fn clear_bit(self) -> &'a mut W {
492 self.bit(false)
493 }
494 #[doc = r" Writes raw bits to the field"]
495 #[inline]
496 pub fn bit(self, value: bool) -> &'a mut W {
497 const MASK: bool = true;
498 const OFFSET: u8 = 3;
499 self.w.bits &= !((MASK as u32) << OFFSET);
500 self.w.bits |= ((value & MASK) as u32) << OFFSET;
501 self.w
502 }
503}
504#[doc = r" Proxy"]
505pub struct _REFCKONW<'a> {
506 w: &'a mut W,
507}
508impl<'a> _REFCKONW<'a> {
509 #[doc = r" Sets the field bit"]
510 pub fn set_bit(self) -> &'a mut W {
511 self.bit(true)
512 }
513 #[doc = r" Clears the field bit"]
514 pub fn clear_bit(self) -> &'a mut W {
515 self.bit(false)
516 }
517 #[doc = r" Writes raw bits to the field"]
518 #[inline]
519 pub fn bit(self, value: bool) -> &'a mut W {
520 const MASK: bool = true;
521 const OFFSET: u8 = 4;
522 self.w.bits &= !((MASK as u32) << OFFSET);
523 self.w.bits |= ((value & MASK) as u32) << OFFSET;
524 self.w
525 }
526}
527#[doc = r" Proxy"]
528pub struct _BYPSHADW<'a> {
529 w: &'a mut W,
530}
531impl<'a> _BYPSHADW<'a> {
532 #[doc = r" Sets the field bit"]
533 pub fn set_bit(self) -> &'a mut W {
534 self.bit(true)
535 }
536 #[doc = r" Clears the field bit"]
537 pub fn clear_bit(self) -> &'a mut W {
538 self.bit(false)
539 }
540 #[doc = r" Writes raw bits to the field"]
541 #[inline]
542 pub fn bit(self, value: bool) -> &'a mut W {
543 const MASK: bool = true;
544 const OFFSET: u8 = 5;
545 self.w.bits &= !((MASK as u32) << OFFSET);
546 self.w.bits |= ((value & MASK) as u32) << OFFSET;
547 self.w
548 }
549}
550#[doc = r" Proxy"]
551pub struct _FMTW<'a> {
552 w: &'a mut W,
553}
554impl<'a> _FMTW<'a> {
555 #[doc = r" Sets the field bit"]
556 pub fn set_bit(self) -> &'a mut W {
557 self.bit(true)
558 }
559 #[doc = r" Clears the field bit"]
560 pub fn clear_bit(self) -> &'a mut W {
561 self.bit(false)
562 }
563 #[doc = r" Writes raw bits to the field"]
564 #[inline]
565 pub fn bit(self, value: bool) -> &'a mut W {
566 const MASK: bool = true;
567 const OFFSET: u8 = 6;
568 self.w.bits &= !((MASK as u32) << OFFSET);
569 self.w.bits |= ((value & MASK) as u32) << OFFSET;
570 self.w
571 }
572}
573#[doc = r" Proxy"]
574pub struct _ALRAEW<'a> {
575 w: &'a mut W,
576}
577impl<'a> _ALRAEW<'a> {
578 #[doc = r" Sets the field bit"]
579 pub fn set_bit(self) -> &'a mut W {
580 self.bit(true)
581 }
582 #[doc = r" Clears the field bit"]
583 pub fn clear_bit(self) -> &'a mut W {
584 self.bit(false)
585 }
586 #[doc = r" Writes raw bits to the field"]
587 #[inline]
588 pub fn bit(self, value: bool) -> &'a mut W {
589 const MASK: bool = true;
590 const OFFSET: u8 = 8;
591 self.w.bits &= !((MASK as u32) << OFFSET);
592 self.w.bits |= ((value & MASK) as u32) << OFFSET;
593 self.w
594 }
595}
596#[doc = r" Proxy"]
597pub struct _ALRBEW<'a> {
598 w: &'a mut W,
599}
600impl<'a> _ALRBEW<'a> {
601 #[doc = r" Sets the field bit"]
602 pub fn set_bit(self) -> &'a mut W {
603 self.bit(true)
604 }
605 #[doc = r" Clears the field bit"]
606 pub fn clear_bit(self) -> &'a mut W {
607 self.bit(false)
608 }
609 #[doc = r" Writes raw bits to the field"]
610 #[inline]
611 pub fn bit(self, value: bool) -> &'a mut W {
612 const MASK: bool = true;
613 const OFFSET: u8 = 9;
614 self.w.bits &= !((MASK as u32) << OFFSET);
615 self.w.bits |= ((value & MASK) as u32) << OFFSET;
616 self.w
617 }
618}
619#[doc = r" Proxy"]
620pub struct _WUTEW<'a> {
621 w: &'a mut W,
622}
623impl<'a> _WUTEW<'a> {
624 #[doc = r" Sets the field bit"]
625 pub fn set_bit(self) -> &'a mut W {
626 self.bit(true)
627 }
628 #[doc = r" Clears the field bit"]
629 pub fn clear_bit(self) -> &'a mut W {
630 self.bit(false)
631 }
632 #[doc = r" Writes raw bits to the field"]
633 #[inline]
634 pub fn bit(self, value: bool) -> &'a mut W {
635 const MASK: bool = true;
636 const OFFSET: u8 = 10;
637 self.w.bits &= !((MASK as u32) << OFFSET);
638 self.w.bits |= ((value & MASK) as u32) << OFFSET;
639 self.w
640 }
641}
642#[doc = r" Proxy"]
643pub struct _TSEW<'a> {
644 w: &'a mut W,
645}
646impl<'a> _TSEW<'a> {
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 = 11;
660 self.w.bits &= !((MASK as u32) << OFFSET);
661 self.w.bits |= ((value & MASK) as u32) << OFFSET;
662 self.w
663 }
664}
665#[doc = r" Proxy"]
666pub struct _ALRAIEW<'a> {
667 w: &'a mut W,
668}
669impl<'a> _ALRAIEW<'a> {
670 #[doc = r" Sets the field bit"]
671 pub fn set_bit(self) -> &'a mut W {
672 self.bit(true)
673 }
674 #[doc = r" Clears the field bit"]
675 pub fn clear_bit(self) -> &'a mut W {
676 self.bit(false)
677 }
678 #[doc = r" Writes raw bits to the field"]
679 #[inline]
680 pub fn bit(self, value: bool) -> &'a mut W {
681 const MASK: bool = true;
682 const OFFSET: u8 = 12;
683 self.w.bits &= !((MASK as u32) << OFFSET);
684 self.w.bits |= ((value & MASK) as u32) << OFFSET;
685 self.w
686 }
687}
688#[doc = r" Proxy"]
689pub struct _ALRBIEW<'a> {
690 w: &'a mut W,
691}
692impl<'a> _ALRBIEW<'a> {
693 #[doc = r" Sets the field bit"]
694 pub fn set_bit(self) -> &'a mut W {
695 self.bit(true)
696 }
697 #[doc = r" Clears the field bit"]
698 pub fn clear_bit(self) -> &'a mut W {
699 self.bit(false)
700 }
701 #[doc = r" Writes raw bits to the field"]
702 #[inline]
703 pub fn bit(self, value: bool) -> &'a mut W {
704 const MASK: bool = true;
705 const OFFSET: u8 = 13;
706 self.w.bits &= !((MASK as u32) << OFFSET);
707 self.w.bits |= ((value & MASK) as u32) << OFFSET;
708 self.w
709 }
710}
711#[doc = r" Proxy"]
712pub struct _WUTIEW<'a> {
713 w: &'a mut W,
714}
715impl<'a> _WUTIEW<'a> {
716 #[doc = r" Sets the field bit"]
717 pub fn set_bit(self) -> &'a mut W {
718 self.bit(true)
719 }
720 #[doc = r" Clears the field bit"]
721 pub fn clear_bit(self) -> &'a mut W {
722 self.bit(false)
723 }
724 #[doc = r" Writes raw bits to the field"]
725 #[inline]
726 pub fn bit(self, value: bool) -> &'a mut W {
727 const MASK: bool = true;
728 const OFFSET: u8 = 14;
729 self.w.bits &= !((MASK as u32) << OFFSET);
730 self.w.bits |= ((value & MASK) as u32) << OFFSET;
731 self.w
732 }
733}
734#[doc = r" Proxy"]
735pub struct _TSIEW<'a> {
736 w: &'a mut W,
737}
738impl<'a> _TSIEW<'a> {
739 #[doc = r" Sets the field bit"]
740 pub fn set_bit(self) -> &'a mut W {
741 self.bit(true)
742 }
743 #[doc = r" Clears the field bit"]
744 pub fn clear_bit(self) -> &'a mut W {
745 self.bit(false)
746 }
747 #[doc = r" Writes raw bits to the field"]
748 #[inline]
749 pub fn bit(self, value: bool) -> &'a mut W {
750 const MASK: bool = true;
751 const OFFSET: u8 = 15;
752 self.w.bits &= !((MASK as u32) << OFFSET);
753 self.w.bits |= ((value & MASK) as u32) << OFFSET;
754 self.w
755 }
756}
757#[doc = r" Proxy"]
758pub struct _ADD1HW<'a> {
759 w: &'a mut W,
760}
761impl<'a> _ADD1HW<'a> {
762 #[doc = r" Sets the field bit"]
763 pub fn set_bit(self) -> &'a mut W {
764 self.bit(true)
765 }
766 #[doc = r" Clears the field bit"]
767 pub fn clear_bit(self) -> &'a mut W {
768 self.bit(false)
769 }
770 #[doc = r" Writes raw bits to the field"]
771 #[inline]
772 pub fn bit(self, value: bool) -> &'a mut W {
773 const MASK: bool = true;
774 const OFFSET: u8 = 16;
775 self.w.bits &= !((MASK as u32) << OFFSET);
776 self.w.bits |= ((value & MASK) as u32) << OFFSET;
777 self.w
778 }
779}
780#[doc = r" Proxy"]
781pub struct _SUB1HW<'a> {
782 w: &'a mut W,
783}
784impl<'a> _SUB1HW<'a> {
785 #[doc = r" Sets the field bit"]
786 pub fn set_bit(self) -> &'a mut W {
787 self.bit(true)
788 }
789 #[doc = r" Clears the field bit"]
790 pub fn clear_bit(self) -> &'a mut W {
791 self.bit(false)
792 }
793 #[doc = r" Writes raw bits to the field"]
794 #[inline]
795 pub fn bit(self, value: bool) -> &'a mut W {
796 const MASK: bool = true;
797 const OFFSET: u8 = 17;
798 self.w.bits &= !((MASK as u32) << OFFSET);
799 self.w.bits |= ((value & MASK) as u32) << OFFSET;
800 self.w
801 }
802}
803#[doc = r" Proxy"]
804pub struct _BKPW<'a> {
805 w: &'a mut W,
806}
807impl<'a> _BKPW<'a> {
808 #[doc = r" Sets the field bit"]
809 pub fn set_bit(self) -> &'a mut W {
810 self.bit(true)
811 }
812 #[doc = r" Clears the field bit"]
813 pub fn clear_bit(self) -> &'a mut W {
814 self.bit(false)
815 }
816 #[doc = r" Writes raw bits to the field"]
817 #[inline]
818 pub fn bit(self, value: bool) -> &'a mut W {
819 const MASK: bool = true;
820 const OFFSET: u8 = 18;
821 self.w.bits &= !((MASK as u32) << OFFSET);
822 self.w.bits |= ((value & MASK) as u32) << OFFSET;
823 self.w
824 }
825}
826#[doc = r" Proxy"]
827pub struct _COSELW<'a> {
828 w: &'a mut W,
829}
830impl<'a> _COSELW<'a> {
831 #[doc = r" Sets the field bit"]
832 pub fn set_bit(self) -> &'a mut W {
833 self.bit(true)
834 }
835 #[doc = r" Clears the field bit"]
836 pub fn clear_bit(self) -> &'a mut W {
837 self.bit(false)
838 }
839 #[doc = r" Writes raw bits to the field"]
840 #[inline]
841 pub fn bit(self, value: bool) -> &'a mut W {
842 const MASK: bool = true;
843 const OFFSET: u8 = 19;
844 self.w.bits &= !((MASK as u32) << OFFSET);
845 self.w.bits |= ((value & MASK) as u32) << OFFSET;
846 self.w
847 }
848}
849#[doc = r" Proxy"]
850pub struct _POLW<'a> {
851 w: &'a mut W,
852}
853impl<'a> _POLW<'a> {
854 #[doc = r" Sets the field bit"]
855 pub fn set_bit(self) -> &'a mut W {
856 self.bit(true)
857 }
858 #[doc = r" Clears the field bit"]
859 pub fn clear_bit(self) -> &'a mut W {
860 self.bit(false)
861 }
862 #[doc = r" Writes raw bits to the field"]
863 #[inline]
864 pub fn bit(self, value: bool) -> &'a mut W {
865 const MASK: bool = true;
866 const OFFSET: u8 = 20;
867 self.w.bits &= !((MASK as u32) << OFFSET);
868 self.w.bits |= ((value & MASK) as u32) << OFFSET;
869 self.w
870 }
871}
872#[doc = r" Proxy"]
873pub struct _OSELW<'a> {
874 w: &'a mut W,
875}
876impl<'a> _OSELW<'a> {
877 #[doc = r" Writes raw bits to the field"]
878 #[inline]
879 pub unsafe fn bits(self, value: u8) -> &'a mut W {
880 const MASK: u8 = 3;
881 const OFFSET: u8 = 21;
882 self.w.bits &= !((MASK as u32) << OFFSET);
883 self.w.bits |= ((value & MASK) as u32) << OFFSET;
884 self.w
885 }
886}
887#[doc = r" Proxy"]
888pub struct _COEW<'a> {
889 w: &'a mut W,
890}
891impl<'a> _COEW<'a> {
892 #[doc = r" Sets the field bit"]
893 pub fn set_bit(self) -> &'a mut W {
894 self.bit(true)
895 }
896 #[doc = r" Clears the field bit"]
897 pub fn clear_bit(self) -> &'a mut W {
898 self.bit(false)
899 }
900 #[doc = r" Writes raw bits to the field"]
901 #[inline]
902 pub fn bit(self, value: bool) -> &'a mut W {
903 const MASK: bool = true;
904 const OFFSET: u8 = 23;
905 self.w.bits &= !((MASK as u32) << OFFSET);
906 self.w.bits |= ((value & MASK) as u32) << OFFSET;
907 self.w
908 }
909}
910#[doc = r" Proxy"]
911pub struct _ITSEW<'a> {
912 w: &'a mut W,
913}
914impl<'a> _ITSEW<'a> {
915 #[doc = r" Sets the field bit"]
916 pub fn set_bit(self) -> &'a mut W {
917 self.bit(true)
918 }
919 #[doc = r" Clears the field bit"]
920 pub fn clear_bit(self) -> &'a mut W {
921 self.bit(false)
922 }
923 #[doc = r" Writes raw bits to the field"]
924 #[inline]
925 pub fn bit(self, value: bool) -> &'a mut W {
926 const MASK: bool = true;
927 const OFFSET: u8 = 24;
928 self.w.bits &= !((MASK as u32) << OFFSET);
929 self.w.bits |= ((value & MASK) as u32) << OFFSET;
930 self.w
931 }
932}
933impl R {
934 #[doc = r" Value of the register as raw bits"]
935 #[inline]
936 pub fn bits(&self) -> u32 {
937 self.bits
938 }
939 #[doc = "Bits 0:2 - Wakeup clock selection"]
940 #[inline]
941 pub fn wcksel(&self) -> WCKSELR {
942 let bits = {
943 const MASK: u8 = 7;
944 const OFFSET: u8 = 0;
945 ((self.bits >> OFFSET) & MASK as u32) as u8
946 };
947 WCKSELR { bits }
948 }
949 #[doc = "Bit 3 - Time-stamp event active edge"]
950 #[inline]
951 pub fn tsedge(&self) -> TSEDGER {
952 let bits = {
953 const MASK: bool = true;
954 const OFFSET: u8 = 3;
955 ((self.bits >> OFFSET) & MASK as u32) != 0
956 };
957 TSEDGER { bits }
958 }
959 #[doc = "Bit 4 - Reference clock detection enable (50 or 60 Hz)"]
960 #[inline]
961 pub fn refckon(&self) -> REFCKONR {
962 let bits = {
963 const MASK: bool = true;
964 const OFFSET: u8 = 4;
965 ((self.bits >> OFFSET) & MASK as u32) != 0
966 };
967 REFCKONR { bits }
968 }
969 #[doc = "Bit 5 - Bypass the shadow registers"]
970 #[inline]
971 pub fn bypshad(&self) -> BYPSHADR {
972 let bits = {
973 const MASK: bool = true;
974 const OFFSET: u8 = 5;
975 ((self.bits >> OFFSET) & MASK as u32) != 0
976 };
977 BYPSHADR { bits }
978 }
979 #[doc = "Bit 6 - Hour format"]
980 #[inline]
981 pub fn fmt(&self) -> FMTR {
982 let bits = {
983 const MASK: bool = true;
984 const OFFSET: u8 = 6;
985 ((self.bits >> OFFSET) & MASK as u32) != 0
986 };
987 FMTR { bits }
988 }
989 #[doc = "Bit 8 - Alarm A enable"]
990 #[inline]
991 pub fn alrae(&self) -> ALRAER {
992 let bits = {
993 const MASK: bool = true;
994 const OFFSET: u8 = 8;
995 ((self.bits >> OFFSET) & MASK as u32) != 0
996 };
997 ALRAER { bits }
998 }
999 #[doc = "Bit 9 - Alarm B enable"]
1000 #[inline]
1001 pub fn alrbe(&self) -> ALRBER {
1002 let bits = {
1003 const MASK: bool = true;
1004 const OFFSET: u8 = 9;
1005 ((self.bits >> OFFSET) & MASK as u32) != 0
1006 };
1007 ALRBER { bits }
1008 }
1009 #[doc = "Bit 10 - Wakeup timer enable"]
1010 #[inline]
1011 pub fn wute(&self) -> WUTER {
1012 let bits = {
1013 const MASK: bool = true;
1014 const OFFSET: u8 = 10;
1015 ((self.bits >> OFFSET) & MASK as u32) != 0
1016 };
1017 WUTER { bits }
1018 }
1019 #[doc = "Bit 11 - Time stamp enable"]
1020 #[inline]
1021 pub fn tse(&self) -> TSER {
1022 let bits = {
1023 const MASK: bool = true;
1024 const OFFSET: u8 = 11;
1025 ((self.bits >> OFFSET) & MASK as u32) != 0
1026 };
1027 TSER { bits }
1028 }
1029 #[doc = "Bit 12 - Alarm A interrupt enable"]
1030 #[inline]
1031 pub fn alraie(&self) -> ALRAIER {
1032 let bits = {
1033 const MASK: bool = true;
1034 const OFFSET: u8 = 12;
1035 ((self.bits >> OFFSET) & MASK as u32) != 0
1036 };
1037 ALRAIER { bits }
1038 }
1039 #[doc = "Bit 13 - Alarm B interrupt enable"]
1040 #[inline]
1041 pub fn alrbie(&self) -> ALRBIER {
1042 let bits = {
1043 const MASK: bool = true;
1044 const OFFSET: u8 = 13;
1045 ((self.bits >> OFFSET) & MASK as u32) != 0
1046 };
1047 ALRBIER { bits }
1048 }
1049 #[doc = "Bit 14 - Wakeup timer interrupt enable"]
1050 #[inline]
1051 pub fn wutie(&self) -> WUTIER {
1052 let bits = {
1053 const MASK: bool = true;
1054 const OFFSET: u8 = 14;
1055 ((self.bits >> OFFSET) & MASK as u32) != 0
1056 };
1057 WUTIER { bits }
1058 }
1059 #[doc = "Bit 15 - Time-stamp interrupt enable"]
1060 #[inline]
1061 pub fn tsie(&self) -> TSIER {
1062 let bits = {
1063 const MASK: bool = true;
1064 const OFFSET: u8 = 15;
1065 ((self.bits >> OFFSET) & MASK as u32) != 0
1066 };
1067 TSIER { bits }
1068 }
1069 #[doc = "Bit 16 - Add 1 hour (summer time change)"]
1070 #[inline]
1071 pub fn add1h(&self) -> ADD1HR {
1072 let bits = {
1073 const MASK: bool = true;
1074 const OFFSET: u8 = 16;
1075 ((self.bits >> OFFSET) & MASK as u32) != 0
1076 };
1077 ADD1HR { bits }
1078 }
1079 #[doc = "Bit 17 - Subtract 1 hour (winter time change)"]
1080 #[inline]
1081 pub fn sub1h(&self) -> SUB1HR {
1082 let bits = {
1083 const MASK: bool = true;
1084 const OFFSET: u8 = 17;
1085 ((self.bits >> OFFSET) & MASK as u32) != 0
1086 };
1087 SUB1HR { bits }
1088 }
1089 #[doc = "Bit 18 - Backup"]
1090 #[inline]
1091 pub fn bkp(&self) -> BKPR {
1092 let bits = {
1093 const MASK: bool = true;
1094 const OFFSET: u8 = 18;
1095 ((self.bits >> OFFSET) & MASK as u32) != 0
1096 };
1097 BKPR { bits }
1098 }
1099 #[doc = "Bit 19 - Calibration output selection"]
1100 #[inline]
1101 pub fn cosel(&self) -> COSELR {
1102 let bits = {
1103 const MASK: bool = true;
1104 const OFFSET: u8 = 19;
1105 ((self.bits >> OFFSET) & MASK as u32) != 0
1106 };
1107 COSELR { bits }
1108 }
1109 #[doc = "Bit 20 - Output polarity"]
1110 #[inline]
1111 pub fn pol(&self) -> POLR {
1112 let bits = {
1113 const MASK: bool = true;
1114 const OFFSET: u8 = 20;
1115 ((self.bits >> OFFSET) & MASK as u32) != 0
1116 };
1117 POLR { bits }
1118 }
1119 #[doc = "Bits 21:22 - Output selection"]
1120 #[inline]
1121 pub fn osel(&self) -> OSELR {
1122 let bits = {
1123 const MASK: u8 = 3;
1124 const OFFSET: u8 = 21;
1125 ((self.bits >> OFFSET) & MASK as u32) as u8
1126 };
1127 OSELR { bits }
1128 }
1129 #[doc = "Bit 23 - Calibration output enable"]
1130 #[inline]
1131 pub fn coe(&self) -> COER {
1132 let bits = {
1133 const MASK: bool = true;
1134 const OFFSET: u8 = 23;
1135 ((self.bits >> OFFSET) & MASK as u32) != 0
1136 };
1137 COER { bits }
1138 }
1139 #[doc = "Bit 24 - timestamp on internal event enable"]
1140 #[inline]
1141 pub fn itse(&self) -> ITSER {
1142 let bits = {
1143 const MASK: bool = true;
1144 const OFFSET: u8 = 24;
1145 ((self.bits >> OFFSET) & MASK as u32) != 0
1146 };
1147 ITSER { bits }
1148 }
1149}
1150impl W {
1151 #[doc = r" Reset value of the register"]
1152 #[inline]
1153 pub fn reset_value() -> W {
1154 W { bits: 0 }
1155 }
1156 #[doc = r" Writes raw bits to the register"]
1157 #[inline]
1158 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1159 self.bits = bits;
1160 self
1161 }
1162 #[doc = "Bits 0:2 - Wakeup clock selection"]
1163 #[inline]
1164 pub fn wcksel(&mut self) -> _WCKSELW {
1165 _WCKSELW { w: self }
1166 }
1167 #[doc = "Bit 3 - Time-stamp event active edge"]
1168 #[inline]
1169 pub fn tsedge(&mut self) -> _TSEDGEW {
1170 _TSEDGEW { w: self }
1171 }
1172 #[doc = "Bit 4 - Reference clock detection enable (50 or 60 Hz)"]
1173 #[inline]
1174 pub fn refckon(&mut self) -> _REFCKONW {
1175 _REFCKONW { w: self }
1176 }
1177 #[doc = "Bit 5 - Bypass the shadow registers"]
1178 #[inline]
1179 pub fn bypshad(&mut self) -> _BYPSHADW {
1180 _BYPSHADW { w: self }
1181 }
1182 #[doc = "Bit 6 - Hour format"]
1183 #[inline]
1184 pub fn fmt(&mut self) -> _FMTW {
1185 _FMTW { w: self }
1186 }
1187 #[doc = "Bit 8 - Alarm A enable"]
1188 #[inline]
1189 pub fn alrae(&mut self) -> _ALRAEW {
1190 _ALRAEW { w: self }
1191 }
1192 #[doc = "Bit 9 - Alarm B enable"]
1193 #[inline]
1194 pub fn alrbe(&mut self) -> _ALRBEW {
1195 _ALRBEW { w: self }
1196 }
1197 #[doc = "Bit 10 - Wakeup timer enable"]
1198 #[inline]
1199 pub fn wute(&mut self) -> _WUTEW {
1200 _WUTEW { w: self }
1201 }
1202 #[doc = "Bit 11 - Time stamp enable"]
1203 #[inline]
1204 pub fn tse(&mut self) -> _TSEW {
1205 _TSEW { w: self }
1206 }
1207 #[doc = "Bit 12 - Alarm A interrupt enable"]
1208 #[inline]
1209 pub fn alraie(&mut self) -> _ALRAIEW {
1210 _ALRAIEW { w: self }
1211 }
1212 #[doc = "Bit 13 - Alarm B interrupt enable"]
1213 #[inline]
1214 pub fn alrbie(&mut self) -> _ALRBIEW {
1215 _ALRBIEW { w: self }
1216 }
1217 #[doc = "Bit 14 - Wakeup timer interrupt enable"]
1218 #[inline]
1219 pub fn wutie(&mut self) -> _WUTIEW {
1220 _WUTIEW { w: self }
1221 }
1222 #[doc = "Bit 15 - Time-stamp interrupt enable"]
1223 #[inline]
1224 pub fn tsie(&mut self) -> _TSIEW {
1225 _TSIEW { w: self }
1226 }
1227 #[doc = "Bit 16 - Add 1 hour (summer time change)"]
1228 #[inline]
1229 pub fn add1h(&mut self) -> _ADD1HW {
1230 _ADD1HW { w: self }
1231 }
1232 #[doc = "Bit 17 - Subtract 1 hour (winter time change)"]
1233 #[inline]
1234 pub fn sub1h(&mut self) -> _SUB1HW {
1235 _SUB1HW { w: self }
1236 }
1237 #[doc = "Bit 18 - Backup"]
1238 #[inline]
1239 pub fn bkp(&mut self) -> _BKPW {
1240 _BKPW { w: self }
1241 }
1242 #[doc = "Bit 19 - Calibration output selection"]
1243 #[inline]
1244 pub fn cosel(&mut self) -> _COSELW {
1245 _COSELW { w: self }
1246 }
1247 #[doc = "Bit 20 - Output polarity"]
1248 #[inline]
1249 pub fn pol(&mut self) -> _POLW {
1250 _POLW { w: self }
1251 }
1252 #[doc = "Bits 21:22 - Output selection"]
1253 #[inline]
1254 pub fn osel(&mut self) -> _OSELW {
1255 _OSELW { w: self }
1256 }
1257 #[doc = "Bit 23 - Calibration output enable"]
1258 #[inline]
1259 pub fn coe(&mut self) -> _COEW {
1260 _COEW { w: self }
1261 }
1262 #[doc = "Bit 24 - timestamp on internal event enable"]
1263 #[inline]
1264 pub fn itse(&mut self) -> _ITSEW {
1265 _ITSEW { w: self }
1266 }
1267}