stm32l4x2_pac/rtc/
tampcr.rs1#[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::TAMPCR {
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 TAMP1ER {
47 bits: bool,
48}
49impl TAMP1ER {
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 TAMP1TRGR {
68 bits: bool,
69}
70impl TAMP1TRGR {
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 TAMPIER {
89 bits: bool,
90}
91impl TAMPIER {
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 TAMP2ER {
110 bits: bool,
111}
112impl TAMP2ER {
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 TAMP2TRGR {
131 bits: bool,
132}
133impl TAMP2TRGR {
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 TAMP3ER {
152 bits: bool,
153}
154impl TAMP3ER {
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 TAMP3TRGR {
173 bits: bool,
174}
175impl TAMP3TRGR {
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 TAMPTSR {
194 bits: bool,
195}
196impl TAMPTSR {
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 TAMPFREQR {
215 bits: u8,
216}
217impl TAMPFREQR {
218 #[doc = r" Value of the field as raw bits"]
219 #[inline]
220 pub fn bits(&self) -> u8 {
221 self.bits
222 }
223}
224#[doc = r" Value of the field"]
225pub struct TAMPFLTR {
226 bits: u8,
227}
228impl TAMPFLTR {
229 #[doc = r" Value of the field as raw bits"]
230 #[inline]
231 pub fn bits(&self) -> u8 {
232 self.bits
233 }
234}
235#[doc = r" Value of the field"]
236pub struct TAMPPRCHR {
237 bits: u8,
238}
239impl TAMPPRCHR {
240 #[doc = r" Value of the field as raw bits"]
241 #[inline]
242 pub fn bits(&self) -> u8 {
243 self.bits
244 }
245}
246#[doc = r" Value of the field"]
247pub struct TAMPPUDISR {
248 bits: bool,
249}
250impl TAMPPUDISR {
251 #[doc = r" Value of the field as raw bits"]
252 #[inline]
253 pub fn bit(&self) -> bool {
254 self.bits
255 }
256 #[doc = r" Returns `true` if the bit is clear (0)"]
257 #[inline]
258 pub fn bit_is_clear(&self) -> bool {
259 !self.bit()
260 }
261 #[doc = r" Returns `true` if the bit is set (1)"]
262 #[inline]
263 pub fn bit_is_set(&self) -> bool {
264 self.bit()
265 }
266}
267#[doc = r" Value of the field"]
268pub struct TAMP1IER {
269 bits: bool,
270}
271impl TAMP1IER {
272 #[doc = r" Value of the field as raw bits"]
273 #[inline]
274 pub fn bit(&self) -> bool {
275 self.bits
276 }
277 #[doc = r" Returns `true` if the bit is clear (0)"]
278 #[inline]
279 pub fn bit_is_clear(&self) -> bool {
280 !self.bit()
281 }
282 #[doc = r" Returns `true` if the bit is set (1)"]
283 #[inline]
284 pub fn bit_is_set(&self) -> bool {
285 self.bit()
286 }
287}
288#[doc = r" Value of the field"]
289pub struct TAMP1NOERASER {
290 bits: bool,
291}
292impl TAMP1NOERASER {
293 #[doc = r" Value of the field as raw bits"]
294 #[inline]
295 pub fn bit(&self) -> bool {
296 self.bits
297 }
298 #[doc = r" Returns `true` if the bit is clear (0)"]
299 #[inline]
300 pub fn bit_is_clear(&self) -> bool {
301 !self.bit()
302 }
303 #[doc = r" Returns `true` if the bit is set (1)"]
304 #[inline]
305 pub fn bit_is_set(&self) -> bool {
306 self.bit()
307 }
308}
309#[doc = r" Value of the field"]
310pub struct TAMP1MFR {
311 bits: bool,
312}
313impl TAMP1MFR {
314 #[doc = r" Value of the field as raw bits"]
315 #[inline]
316 pub fn bit(&self) -> bool {
317 self.bits
318 }
319 #[doc = r" Returns `true` if the bit is clear (0)"]
320 #[inline]
321 pub fn bit_is_clear(&self) -> bool {
322 !self.bit()
323 }
324 #[doc = r" Returns `true` if the bit is set (1)"]
325 #[inline]
326 pub fn bit_is_set(&self) -> bool {
327 self.bit()
328 }
329}
330#[doc = r" Value of the field"]
331pub struct TAMP2IER {
332 bits: bool,
333}
334impl TAMP2IER {
335 #[doc = r" Value of the field as raw bits"]
336 #[inline]
337 pub fn bit(&self) -> bool {
338 self.bits
339 }
340 #[doc = r" Returns `true` if the bit is clear (0)"]
341 #[inline]
342 pub fn bit_is_clear(&self) -> bool {
343 !self.bit()
344 }
345 #[doc = r" Returns `true` if the bit is set (1)"]
346 #[inline]
347 pub fn bit_is_set(&self) -> bool {
348 self.bit()
349 }
350}
351#[doc = r" Value of the field"]
352pub struct TAMP2NOERASER {
353 bits: bool,
354}
355impl TAMP2NOERASER {
356 #[doc = r" Value of the field as raw bits"]
357 #[inline]
358 pub fn bit(&self) -> bool {
359 self.bits
360 }
361 #[doc = r" Returns `true` if the bit is clear (0)"]
362 #[inline]
363 pub fn bit_is_clear(&self) -> bool {
364 !self.bit()
365 }
366 #[doc = r" Returns `true` if the bit is set (1)"]
367 #[inline]
368 pub fn bit_is_set(&self) -> bool {
369 self.bit()
370 }
371}
372#[doc = r" Value of the field"]
373pub struct TAMP2MFR {
374 bits: bool,
375}
376impl TAMP2MFR {
377 #[doc = r" Value of the field as raw bits"]
378 #[inline]
379 pub fn bit(&self) -> bool {
380 self.bits
381 }
382 #[doc = r" Returns `true` if the bit is clear (0)"]
383 #[inline]
384 pub fn bit_is_clear(&self) -> bool {
385 !self.bit()
386 }
387 #[doc = r" Returns `true` if the bit is set (1)"]
388 #[inline]
389 pub fn bit_is_set(&self) -> bool {
390 self.bit()
391 }
392}
393#[doc = r" Value of the field"]
394pub struct TAMP3IER {
395 bits: bool,
396}
397impl TAMP3IER {
398 #[doc = r" Value of the field as raw bits"]
399 #[inline]
400 pub fn bit(&self) -> bool {
401 self.bits
402 }
403 #[doc = r" Returns `true` if the bit is clear (0)"]
404 #[inline]
405 pub fn bit_is_clear(&self) -> bool {
406 !self.bit()
407 }
408 #[doc = r" Returns `true` if the bit is set (1)"]
409 #[inline]
410 pub fn bit_is_set(&self) -> bool {
411 self.bit()
412 }
413}
414#[doc = r" Value of the field"]
415pub struct TAMP3NOERASER {
416 bits: bool,
417}
418impl TAMP3NOERASER {
419 #[doc = r" Value of the field as raw bits"]
420 #[inline]
421 pub fn bit(&self) -> bool {
422 self.bits
423 }
424 #[doc = r" Returns `true` if the bit is clear (0)"]
425 #[inline]
426 pub fn bit_is_clear(&self) -> bool {
427 !self.bit()
428 }
429 #[doc = r" Returns `true` if the bit is set (1)"]
430 #[inline]
431 pub fn bit_is_set(&self) -> bool {
432 self.bit()
433 }
434}
435#[doc = r" Value of the field"]
436pub struct TAMP3MFR {
437 bits: bool,
438}
439impl TAMP3MFR {
440 #[doc = r" Value of the field as raw bits"]
441 #[inline]
442 pub fn bit(&self) -> bool {
443 self.bits
444 }
445 #[doc = r" Returns `true` if the bit is clear (0)"]
446 #[inline]
447 pub fn bit_is_clear(&self) -> bool {
448 !self.bit()
449 }
450 #[doc = r" Returns `true` if the bit is set (1)"]
451 #[inline]
452 pub fn bit_is_set(&self) -> bool {
453 self.bit()
454 }
455}
456#[doc = r" Proxy"]
457pub struct _TAMP1EW<'a> {
458 w: &'a mut W,
459}
460impl<'a> _TAMP1EW<'a> {
461 #[doc = r" Sets the field bit"]
462 pub fn set_bit(self) -> &'a mut W {
463 self.bit(true)
464 }
465 #[doc = r" Clears the field bit"]
466 pub fn clear_bit(self) -> &'a mut W {
467 self.bit(false)
468 }
469 #[doc = r" Writes raw bits to the field"]
470 #[inline]
471 pub fn bit(self, value: bool) -> &'a mut W {
472 const MASK: bool = true;
473 const OFFSET: u8 = 0;
474 self.w.bits &= !((MASK as u32) << OFFSET);
475 self.w.bits |= ((value & MASK) as u32) << OFFSET;
476 self.w
477 }
478}
479#[doc = r" Proxy"]
480pub struct _TAMP1TRGW<'a> {
481 w: &'a mut W,
482}
483impl<'a> _TAMP1TRGW<'a> {
484 #[doc = r" Sets the field bit"]
485 pub fn set_bit(self) -> &'a mut W {
486 self.bit(true)
487 }
488 #[doc = r" Clears the field bit"]
489 pub fn clear_bit(self) -> &'a mut W {
490 self.bit(false)
491 }
492 #[doc = r" Writes raw bits to the field"]
493 #[inline]
494 pub fn bit(self, value: bool) -> &'a mut W {
495 const MASK: bool = true;
496 const OFFSET: u8 = 1;
497 self.w.bits &= !((MASK as u32) << OFFSET);
498 self.w.bits |= ((value & MASK) as u32) << OFFSET;
499 self.w
500 }
501}
502#[doc = r" Proxy"]
503pub struct _TAMPIEW<'a> {
504 w: &'a mut W,
505}
506impl<'a> _TAMPIEW<'a> {
507 #[doc = r" Sets the field bit"]
508 pub fn set_bit(self) -> &'a mut W {
509 self.bit(true)
510 }
511 #[doc = r" Clears the field bit"]
512 pub fn clear_bit(self) -> &'a mut W {
513 self.bit(false)
514 }
515 #[doc = r" Writes raw bits to the field"]
516 #[inline]
517 pub fn bit(self, value: bool) -> &'a mut W {
518 const MASK: bool = true;
519 const OFFSET: u8 = 2;
520 self.w.bits &= !((MASK as u32) << OFFSET);
521 self.w.bits |= ((value & MASK) as u32) << OFFSET;
522 self.w
523 }
524}
525#[doc = r" Proxy"]
526pub struct _TAMP2EW<'a> {
527 w: &'a mut W,
528}
529impl<'a> _TAMP2EW<'a> {
530 #[doc = r" Sets the field bit"]
531 pub fn set_bit(self) -> &'a mut W {
532 self.bit(true)
533 }
534 #[doc = r" Clears the field bit"]
535 pub fn clear_bit(self) -> &'a mut W {
536 self.bit(false)
537 }
538 #[doc = r" Writes raw bits to the field"]
539 #[inline]
540 pub fn bit(self, value: bool) -> &'a mut W {
541 const MASK: bool = true;
542 const OFFSET: u8 = 3;
543 self.w.bits &= !((MASK as u32) << OFFSET);
544 self.w.bits |= ((value & MASK) as u32) << OFFSET;
545 self.w
546 }
547}
548#[doc = r" Proxy"]
549pub struct _TAMP2TRGW<'a> {
550 w: &'a mut W,
551}
552impl<'a> _TAMP2TRGW<'a> {
553 #[doc = r" Sets the field bit"]
554 pub fn set_bit(self) -> &'a mut W {
555 self.bit(true)
556 }
557 #[doc = r" Clears the field bit"]
558 pub fn clear_bit(self) -> &'a mut W {
559 self.bit(false)
560 }
561 #[doc = r" Writes raw bits to the field"]
562 #[inline]
563 pub fn bit(self, value: bool) -> &'a mut W {
564 const MASK: bool = true;
565 const OFFSET: u8 = 4;
566 self.w.bits &= !((MASK as u32) << OFFSET);
567 self.w.bits |= ((value & MASK) as u32) << OFFSET;
568 self.w
569 }
570}
571#[doc = r" Proxy"]
572pub struct _TAMP3EW<'a> {
573 w: &'a mut W,
574}
575impl<'a> _TAMP3EW<'a> {
576 #[doc = r" Sets the field bit"]
577 pub fn set_bit(self) -> &'a mut W {
578 self.bit(true)
579 }
580 #[doc = r" Clears the field bit"]
581 pub fn clear_bit(self) -> &'a mut W {
582 self.bit(false)
583 }
584 #[doc = r" Writes raw bits to the field"]
585 #[inline]
586 pub fn bit(self, value: bool) -> &'a mut W {
587 const MASK: bool = true;
588 const OFFSET: u8 = 5;
589 self.w.bits &= !((MASK as u32) << OFFSET);
590 self.w.bits |= ((value & MASK) as u32) << OFFSET;
591 self.w
592 }
593}
594#[doc = r" Proxy"]
595pub struct _TAMP3TRGW<'a> {
596 w: &'a mut W,
597}
598impl<'a> _TAMP3TRGW<'a> {
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 = 6;
612 self.w.bits &= !((MASK as u32) << OFFSET);
613 self.w.bits |= ((value & MASK) as u32) << OFFSET;
614 self.w
615 }
616}
617#[doc = r" Proxy"]
618pub struct _TAMPTSW<'a> {
619 w: &'a mut W,
620}
621impl<'a> _TAMPTSW<'a> {
622 #[doc = r" Sets the field bit"]
623 pub fn set_bit(self) -> &'a mut W {
624 self.bit(true)
625 }
626 #[doc = r" Clears the field bit"]
627 pub fn clear_bit(self) -> &'a mut W {
628 self.bit(false)
629 }
630 #[doc = r" Writes raw bits to the field"]
631 #[inline]
632 pub fn bit(self, value: bool) -> &'a mut W {
633 const MASK: bool = true;
634 const OFFSET: u8 = 7;
635 self.w.bits &= !((MASK as u32) << OFFSET);
636 self.w.bits |= ((value & MASK) as u32) << OFFSET;
637 self.w
638 }
639}
640#[doc = r" Proxy"]
641pub struct _TAMPFREQW<'a> {
642 w: &'a mut W,
643}
644impl<'a> _TAMPFREQW<'a> {
645 #[doc = r" Writes raw bits to the field"]
646 #[inline]
647 pub unsafe fn bits(self, value: u8) -> &'a mut W {
648 const MASK: u8 = 7;
649 const OFFSET: u8 = 8;
650 self.w.bits &= !((MASK as u32) << OFFSET);
651 self.w.bits |= ((value & MASK) as u32) << OFFSET;
652 self.w
653 }
654}
655#[doc = r" Proxy"]
656pub struct _TAMPFLTW<'a> {
657 w: &'a mut W,
658}
659impl<'a> _TAMPFLTW<'a> {
660 #[doc = r" Writes raw bits to the field"]
661 #[inline]
662 pub unsafe fn bits(self, value: u8) -> &'a mut W {
663 const MASK: u8 = 3;
664 const OFFSET: u8 = 11;
665 self.w.bits &= !((MASK as u32) << OFFSET);
666 self.w.bits |= ((value & MASK) as u32) << OFFSET;
667 self.w
668 }
669}
670#[doc = r" Proxy"]
671pub struct _TAMPPRCHW<'a> {
672 w: &'a mut W,
673}
674impl<'a> _TAMPPRCHW<'a> {
675 #[doc = r" Writes raw bits to the field"]
676 #[inline]
677 pub unsafe fn bits(self, value: u8) -> &'a mut W {
678 const MASK: u8 = 3;
679 const OFFSET: u8 = 13;
680 self.w.bits &= !((MASK as u32) << OFFSET);
681 self.w.bits |= ((value & MASK) as u32) << OFFSET;
682 self.w
683 }
684}
685#[doc = r" Proxy"]
686pub struct _TAMPPUDISW<'a> {
687 w: &'a mut W,
688}
689impl<'a> _TAMPPUDISW<'a> {
690 #[doc = r" Sets the field bit"]
691 pub fn set_bit(self) -> &'a mut W {
692 self.bit(true)
693 }
694 #[doc = r" Clears the field bit"]
695 pub fn clear_bit(self) -> &'a mut W {
696 self.bit(false)
697 }
698 #[doc = r" Writes raw bits to the field"]
699 #[inline]
700 pub fn bit(self, value: bool) -> &'a mut W {
701 const MASK: bool = true;
702 const OFFSET: u8 = 15;
703 self.w.bits &= !((MASK as u32) << OFFSET);
704 self.w.bits |= ((value & MASK) as u32) << OFFSET;
705 self.w
706 }
707}
708#[doc = r" Proxy"]
709pub struct _TAMP1IEW<'a> {
710 w: &'a mut W,
711}
712impl<'a> _TAMP1IEW<'a> {
713 #[doc = r" Sets the field bit"]
714 pub fn set_bit(self) -> &'a mut W {
715 self.bit(true)
716 }
717 #[doc = r" Clears the field bit"]
718 pub fn clear_bit(self) -> &'a mut W {
719 self.bit(false)
720 }
721 #[doc = r" Writes raw bits to the field"]
722 #[inline]
723 pub fn bit(self, value: bool) -> &'a mut W {
724 const MASK: bool = true;
725 const OFFSET: u8 = 16;
726 self.w.bits &= !((MASK as u32) << OFFSET);
727 self.w.bits |= ((value & MASK) as u32) << OFFSET;
728 self.w
729 }
730}
731#[doc = r" Proxy"]
732pub struct _TAMP1NOERASEW<'a> {
733 w: &'a mut W,
734}
735impl<'a> _TAMP1NOERASEW<'a> {
736 #[doc = r" Sets the field bit"]
737 pub fn set_bit(self) -> &'a mut W {
738 self.bit(true)
739 }
740 #[doc = r" Clears the field bit"]
741 pub fn clear_bit(self) -> &'a mut W {
742 self.bit(false)
743 }
744 #[doc = r" Writes raw bits to the field"]
745 #[inline]
746 pub fn bit(self, value: bool) -> &'a mut W {
747 const MASK: bool = true;
748 const OFFSET: u8 = 17;
749 self.w.bits &= !((MASK as u32) << OFFSET);
750 self.w.bits |= ((value & MASK) as u32) << OFFSET;
751 self.w
752 }
753}
754#[doc = r" Proxy"]
755pub struct _TAMP1MFW<'a> {
756 w: &'a mut W,
757}
758impl<'a> _TAMP1MFW<'a> {
759 #[doc = r" Sets the field bit"]
760 pub fn set_bit(self) -> &'a mut W {
761 self.bit(true)
762 }
763 #[doc = r" Clears the field bit"]
764 pub fn clear_bit(self) -> &'a mut W {
765 self.bit(false)
766 }
767 #[doc = r" Writes raw bits to the field"]
768 #[inline]
769 pub fn bit(self, value: bool) -> &'a mut W {
770 const MASK: bool = true;
771 const OFFSET: u8 = 18;
772 self.w.bits &= !((MASK as u32) << OFFSET);
773 self.w.bits |= ((value & MASK) as u32) << OFFSET;
774 self.w
775 }
776}
777#[doc = r" Proxy"]
778pub struct _TAMP2IEW<'a> {
779 w: &'a mut W,
780}
781impl<'a> _TAMP2IEW<'a> {
782 #[doc = r" Sets the field bit"]
783 pub fn set_bit(self) -> &'a mut W {
784 self.bit(true)
785 }
786 #[doc = r" Clears the field bit"]
787 pub fn clear_bit(self) -> &'a mut W {
788 self.bit(false)
789 }
790 #[doc = r" Writes raw bits to the field"]
791 #[inline]
792 pub fn bit(self, value: bool) -> &'a mut W {
793 const MASK: bool = true;
794 const OFFSET: u8 = 19;
795 self.w.bits &= !((MASK as u32) << OFFSET);
796 self.w.bits |= ((value & MASK) as u32) << OFFSET;
797 self.w
798 }
799}
800#[doc = r" Proxy"]
801pub struct _TAMP2NOERASEW<'a> {
802 w: &'a mut W,
803}
804impl<'a> _TAMP2NOERASEW<'a> {
805 #[doc = r" Sets the field bit"]
806 pub fn set_bit(self) -> &'a mut W {
807 self.bit(true)
808 }
809 #[doc = r" Clears the field bit"]
810 pub fn clear_bit(self) -> &'a mut W {
811 self.bit(false)
812 }
813 #[doc = r" Writes raw bits to the field"]
814 #[inline]
815 pub fn bit(self, value: bool) -> &'a mut W {
816 const MASK: bool = true;
817 const OFFSET: u8 = 20;
818 self.w.bits &= !((MASK as u32) << OFFSET);
819 self.w.bits |= ((value & MASK) as u32) << OFFSET;
820 self.w
821 }
822}
823#[doc = r" Proxy"]
824pub struct _TAMP2MFW<'a> {
825 w: &'a mut W,
826}
827impl<'a> _TAMP2MFW<'a> {
828 #[doc = r" Sets the field bit"]
829 pub fn set_bit(self) -> &'a mut W {
830 self.bit(true)
831 }
832 #[doc = r" Clears the field bit"]
833 pub fn clear_bit(self) -> &'a mut W {
834 self.bit(false)
835 }
836 #[doc = r" Writes raw bits to the field"]
837 #[inline]
838 pub fn bit(self, value: bool) -> &'a mut W {
839 const MASK: bool = true;
840 const OFFSET: u8 = 21;
841 self.w.bits &= !((MASK as u32) << OFFSET);
842 self.w.bits |= ((value & MASK) as u32) << OFFSET;
843 self.w
844 }
845}
846#[doc = r" Proxy"]
847pub struct _TAMP3IEW<'a> {
848 w: &'a mut W,
849}
850impl<'a> _TAMP3IEW<'a> {
851 #[doc = r" Sets the field bit"]
852 pub fn set_bit(self) -> &'a mut W {
853 self.bit(true)
854 }
855 #[doc = r" Clears the field bit"]
856 pub fn clear_bit(self) -> &'a mut W {
857 self.bit(false)
858 }
859 #[doc = r" Writes raw bits to the field"]
860 #[inline]
861 pub fn bit(self, value: bool) -> &'a mut W {
862 const MASK: bool = true;
863 const OFFSET: u8 = 22;
864 self.w.bits &= !((MASK as u32) << OFFSET);
865 self.w.bits |= ((value & MASK) as u32) << OFFSET;
866 self.w
867 }
868}
869#[doc = r" Proxy"]
870pub struct _TAMP3NOERASEW<'a> {
871 w: &'a mut W,
872}
873impl<'a> _TAMP3NOERASEW<'a> {
874 #[doc = r" Sets the field bit"]
875 pub fn set_bit(self) -> &'a mut W {
876 self.bit(true)
877 }
878 #[doc = r" Clears the field bit"]
879 pub fn clear_bit(self) -> &'a mut W {
880 self.bit(false)
881 }
882 #[doc = r" Writes raw bits to the field"]
883 #[inline]
884 pub fn bit(self, value: bool) -> &'a mut W {
885 const MASK: bool = true;
886 const OFFSET: u8 = 23;
887 self.w.bits &= !((MASK as u32) << OFFSET);
888 self.w.bits |= ((value & MASK) as u32) << OFFSET;
889 self.w
890 }
891}
892#[doc = r" Proxy"]
893pub struct _TAMP3MFW<'a> {
894 w: &'a mut W,
895}
896impl<'a> _TAMP3MFW<'a> {
897 #[doc = r" Sets the field bit"]
898 pub fn set_bit(self) -> &'a mut W {
899 self.bit(true)
900 }
901 #[doc = r" Clears the field bit"]
902 pub fn clear_bit(self) -> &'a mut W {
903 self.bit(false)
904 }
905 #[doc = r" Writes raw bits to the field"]
906 #[inline]
907 pub fn bit(self, value: bool) -> &'a mut W {
908 const MASK: bool = true;
909 const OFFSET: u8 = 24;
910 self.w.bits &= !((MASK as u32) << OFFSET);
911 self.w.bits |= ((value & MASK) as u32) << OFFSET;
912 self.w
913 }
914}
915impl R {
916 #[doc = r" Value of the register as raw bits"]
917 #[inline]
918 pub fn bits(&self) -> u32 {
919 self.bits
920 }
921 #[doc = "Bit 0 - Tamper 1 detection enable"]
922 #[inline]
923 pub fn tamp1e(&self) -> TAMP1ER {
924 let bits = {
925 const MASK: bool = true;
926 const OFFSET: u8 = 0;
927 ((self.bits >> OFFSET) & MASK as u32) != 0
928 };
929 TAMP1ER { bits }
930 }
931 #[doc = "Bit 1 - Active level for tamper 1"]
932 #[inline]
933 pub fn tamp1trg(&self) -> TAMP1TRGR {
934 let bits = {
935 const MASK: bool = true;
936 const OFFSET: u8 = 1;
937 ((self.bits >> OFFSET) & MASK as u32) != 0
938 };
939 TAMP1TRGR { bits }
940 }
941 #[doc = "Bit 2 - Tamper interrupt enable"]
942 #[inline]
943 pub fn tampie(&self) -> TAMPIER {
944 let bits = {
945 const MASK: bool = true;
946 const OFFSET: u8 = 2;
947 ((self.bits >> OFFSET) & MASK as u32) != 0
948 };
949 TAMPIER { bits }
950 }
951 #[doc = "Bit 3 - Tamper 2 detection enable"]
952 #[inline]
953 pub fn tamp2e(&self) -> TAMP2ER {
954 let bits = {
955 const MASK: bool = true;
956 const OFFSET: u8 = 3;
957 ((self.bits >> OFFSET) & MASK as u32) != 0
958 };
959 TAMP2ER { bits }
960 }
961 #[doc = "Bit 4 - Active level for tamper 2"]
962 #[inline]
963 pub fn tamp2trg(&self) -> TAMP2TRGR {
964 let bits = {
965 const MASK: bool = true;
966 const OFFSET: u8 = 4;
967 ((self.bits >> OFFSET) & MASK as u32) != 0
968 };
969 TAMP2TRGR { bits }
970 }
971 #[doc = "Bit 5 - Tamper 3 detection enable"]
972 #[inline]
973 pub fn tamp3e(&self) -> TAMP3ER {
974 let bits = {
975 const MASK: bool = true;
976 const OFFSET: u8 = 5;
977 ((self.bits >> OFFSET) & MASK as u32) != 0
978 };
979 TAMP3ER { bits }
980 }
981 #[doc = "Bit 6 - Active level for tamper 3"]
982 #[inline]
983 pub fn tamp3trg(&self) -> TAMP3TRGR {
984 let bits = {
985 const MASK: bool = true;
986 const OFFSET: u8 = 6;
987 ((self.bits >> OFFSET) & MASK as u32) != 0
988 };
989 TAMP3TRGR { bits }
990 }
991 #[doc = "Bit 7 - Activate timestamp on tamper detection event"]
992 #[inline]
993 pub fn tampts(&self) -> TAMPTSR {
994 let bits = {
995 const MASK: bool = true;
996 const OFFSET: u8 = 7;
997 ((self.bits >> OFFSET) & MASK as u32) != 0
998 };
999 TAMPTSR { bits }
1000 }
1001 #[doc = "Bits 8:10 - Tamper sampling frequency"]
1002 #[inline]
1003 pub fn tampfreq(&self) -> TAMPFREQR {
1004 let bits = {
1005 const MASK: u8 = 7;
1006 const OFFSET: u8 = 8;
1007 ((self.bits >> OFFSET) & MASK as u32) as u8
1008 };
1009 TAMPFREQR { bits }
1010 }
1011 #[doc = "Bits 11:12 - Tamper filter count"]
1012 #[inline]
1013 pub fn tampflt(&self) -> TAMPFLTR {
1014 let bits = {
1015 const MASK: u8 = 3;
1016 const OFFSET: u8 = 11;
1017 ((self.bits >> OFFSET) & MASK as u32) as u8
1018 };
1019 TAMPFLTR { bits }
1020 }
1021 #[doc = "Bits 13:14 - Tamper precharge duration"]
1022 #[inline]
1023 pub fn tampprch(&self) -> TAMPPRCHR {
1024 let bits = {
1025 const MASK: u8 = 3;
1026 const OFFSET: u8 = 13;
1027 ((self.bits >> OFFSET) & MASK as u32) as u8
1028 };
1029 TAMPPRCHR { bits }
1030 }
1031 #[doc = "Bit 15 - TAMPER pull-up disable"]
1032 #[inline]
1033 pub fn tamppudis(&self) -> TAMPPUDISR {
1034 let bits = {
1035 const MASK: bool = true;
1036 const OFFSET: u8 = 15;
1037 ((self.bits >> OFFSET) & MASK as u32) != 0
1038 };
1039 TAMPPUDISR { bits }
1040 }
1041 #[doc = "Bit 16 - Tamper 1 interrupt enable"]
1042 #[inline]
1043 pub fn tamp1ie(&self) -> TAMP1IER {
1044 let bits = {
1045 const MASK: bool = true;
1046 const OFFSET: u8 = 16;
1047 ((self.bits >> OFFSET) & MASK as u32) != 0
1048 };
1049 TAMP1IER { bits }
1050 }
1051 #[doc = "Bit 17 - Tamper 1 no erase"]
1052 #[inline]
1053 pub fn tamp1noerase(&self) -> TAMP1NOERASER {
1054 let bits = {
1055 const MASK: bool = true;
1056 const OFFSET: u8 = 17;
1057 ((self.bits >> OFFSET) & MASK as u32) != 0
1058 };
1059 TAMP1NOERASER { bits }
1060 }
1061 #[doc = "Bit 18 - Tamper 1 mask flag"]
1062 #[inline]
1063 pub fn tamp1mf(&self) -> TAMP1MFR {
1064 let bits = {
1065 const MASK: bool = true;
1066 const OFFSET: u8 = 18;
1067 ((self.bits >> OFFSET) & MASK as u32) != 0
1068 };
1069 TAMP1MFR { bits }
1070 }
1071 #[doc = "Bit 19 - Tamper 2 interrupt enable"]
1072 #[inline]
1073 pub fn tamp2ie(&self) -> TAMP2IER {
1074 let bits = {
1075 const MASK: bool = true;
1076 const OFFSET: u8 = 19;
1077 ((self.bits >> OFFSET) & MASK as u32) != 0
1078 };
1079 TAMP2IER { bits }
1080 }
1081 #[doc = "Bit 20 - Tamper 2 no erase"]
1082 #[inline]
1083 pub fn tamp2noerase(&self) -> TAMP2NOERASER {
1084 let bits = {
1085 const MASK: bool = true;
1086 const OFFSET: u8 = 20;
1087 ((self.bits >> OFFSET) & MASK as u32) != 0
1088 };
1089 TAMP2NOERASER { bits }
1090 }
1091 #[doc = "Bit 21 - Tamper 2 mask flag"]
1092 #[inline]
1093 pub fn tamp2mf(&self) -> TAMP2MFR {
1094 let bits = {
1095 const MASK: bool = true;
1096 const OFFSET: u8 = 21;
1097 ((self.bits >> OFFSET) & MASK as u32) != 0
1098 };
1099 TAMP2MFR { bits }
1100 }
1101 #[doc = "Bit 22 - Tamper 3 interrupt enable"]
1102 #[inline]
1103 pub fn tamp3ie(&self) -> TAMP3IER {
1104 let bits = {
1105 const MASK: bool = true;
1106 const OFFSET: u8 = 22;
1107 ((self.bits >> OFFSET) & MASK as u32) != 0
1108 };
1109 TAMP3IER { bits }
1110 }
1111 #[doc = "Bit 23 - Tamper 3 no erase"]
1112 #[inline]
1113 pub fn tamp3noerase(&self) -> TAMP3NOERASER {
1114 let bits = {
1115 const MASK: bool = true;
1116 const OFFSET: u8 = 23;
1117 ((self.bits >> OFFSET) & MASK as u32) != 0
1118 };
1119 TAMP3NOERASER { bits }
1120 }
1121 #[doc = "Bit 24 - Tamper 3 mask flag"]
1122 #[inline]
1123 pub fn tamp3mf(&self) -> TAMP3MFR {
1124 let bits = {
1125 const MASK: bool = true;
1126 const OFFSET: u8 = 24;
1127 ((self.bits >> OFFSET) & MASK as u32) != 0
1128 };
1129 TAMP3MFR { bits }
1130 }
1131}
1132impl W {
1133 #[doc = r" Reset value of the register"]
1134 #[inline]
1135 pub fn reset_value() -> W {
1136 W { bits: 0 }
1137 }
1138 #[doc = r" Writes raw bits to the register"]
1139 #[inline]
1140 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1141 self.bits = bits;
1142 self
1143 }
1144 #[doc = "Bit 0 - Tamper 1 detection enable"]
1145 #[inline]
1146 pub fn tamp1e(&mut self) -> _TAMP1EW {
1147 _TAMP1EW { w: self }
1148 }
1149 #[doc = "Bit 1 - Active level for tamper 1"]
1150 #[inline]
1151 pub fn tamp1trg(&mut self) -> _TAMP1TRGW {
1152 _TAMP1TRGW { w: self }
1153 }
1154 #[doc = "Bit 2 - Tamper interrupt enable"]
1155 #[inline]
1156 pub fn tampie(&mut self) -> _TAMPIEW {
1157 _TAMPIEW { w: self }
1158 }
1159 #[doc = "Bit 3 - Tamper 2 detection enable"]
1160 #[inline]
1161 pub fn tamp2e(&mut self) -> _TAMP2EW {
1162 _TAMP2EW { w: self }
1163 }
1164 #[doc = "Bit 4 - Active level for tamper 2"]
1165 #[inline]
1166 pub fn tamp2trg(&mut self) -> _TAMP2TRGW {
1167 _TAMP2TRGW { w: self }
1168 }
1169 #[doc = "Bit 5 - Tamper 3 detection enable"]
1170 #[inline]
1171 pub fn tamp3e(&mut self) -> _TAMP3EW {
1172 _TAMP3EW { w: self }
1173 }
1174 #[doc = "Bit 6 - Active level for tamper 3"]
1175 #[inline]
1176 pub fn tamp3trg(&mut self) -> _TAMP3TRGW {
1177 _TAMP3TRGW { w: self }
1178 }
1179 #[doc = "Bit 7 - Activate timestamp on tamper detection event"]
1180 #[inline]
1181 pub fn tampts(&mut self) -> _TAMPTSW {
1182 _TAMPTSW { w: self }
1183 }
1184 #[doc = "Bits 8:10 - Tamper sampling frequency"]
1185 #[inline]
1186 pub fn tampfreq(&mut self) -> _TAMPFREQW {
1187 _TAMPFREQW { w: self }
1188 }
1189 #[doc = "Bits 11:12 - Tamper filter count"]
1190 #[inline]
1191 pub fn tampflt(&mut self) -> _TAMPFLTW {
1192 _TAMPFLTW { w: self }
1193 }
1194 #[doc = "Bits 13:14 - Tamper precharge duration"]
1195 #[inline]
1196 pub fn tampprch(&mut self) -> _TAMPPRCHW {
1197 _TAMPPRCHW { w: self }
1198 }
1199 #[doc = "Bit 15 - TAMPER pull-up disable"]
1200 #[inline]
1201 pub fn tamppudis(&mut self) -> _TAMPPUDISW {
1202 _TAMPPUDISW { w: self }
1203 }
1204 #[doc = "Bit 16 - Tamper 1 interrupt enable"]
1205 #[inline]
1206 pub fn tamp1ie(&mut self) -> _TAMP1IEW {
1207 _TAMP1IEW { w: self }
1208 }
1209 #[doc = "Bit 17 - Tamper 1 no erase"]
1210 #[inline]
1211 pub fn tamp1noerase(&mut self) -> _TAMP1NOERASEW {
1212 _TAMP1NOERASEW { w: self }
1213 }
1214 #[doc = "Bit 18 - Tamper 1 mask flag"]
1215 #[inline]
1216 pub fn tamp1mf(&mut self) -> _TAMP1MFW {
1217 _TAMP1MFW { w: self }
1218 }
1219 #[doc = "Bit 19 - Tamper 2 interrupt enable"]
1220 #[inline]
1221 pub fn tamp2ie(&mut self) -> _TAMP2IEW {
1222 _TAMP2IEW { w: self }
1223 }
1224 #[doc = "Bit 20 - Tamper 2 no erase"]
1225 #[inline]
1226 pub fn tamp2noerase(&mut self) -> _TAMP2NOERASEW {
1227 _TAMP2NOERASEW { w: self }
1228 }
1229 #[doc = "Bit 21 - Tamper 2 mask flag"]
1230 #[inline]
1231 pub fn tamp2mf(&mut self) -> _TAMP2MFW {
1232 _TAMP2MFW { w: self }
1233 }
1234 #[doc = "Bit 22 - Tamper 3 interrupt enable"]
1235 #[inline]
1236 pub fn tamp3ie(&mut self) -> _TAMP3IEW {
1237 _TAMP3IEW { w: self }
1238 }
1239 #[doc = "Bit 23 - Tamper 3 no erase"]
1240 #[inline]
1241 pub fn tamp3noerase(&mut self) -> _TAMP3NOERASEW {
1242 _TAMP3NOERASEW { w: self }
1243 }
1244 #[doc = "Bit 24 - Tamper 3 mask flag"]
1245 #[inline]
1246 pub fn tamp3mf(&mut self) -> _TAMP3MFW {
1247 _TAMP3MFW { w: self }
1248 }
1249}