1#![allow(clippy::identity_op)]
21#![allow(clippy::module_inception)]
22#![allow(clippy::derivable_impls)]
23#[allow(unused_imports)]
24use crate::common::sealed;
25#[allow(unused_imports)]
26use crate::common::*;
27#[doc = r"System Control"]
28unsafe impl ::core::marker::Send for super::System {}
29unsafe impl ::core::marker::Sync for super::System {}
30impl super::System {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36
37 #[doc = "System Clock Division Control Register"]
38 #[inline(always)]
39 pub const fn sckdivcr(
40 &self,
41 ) -> &'static crate::common::Reg<self::Sckdivcr_SPEC, crate::common::RW> {
42 unsafe {
43 crate::common::Reg::<self::Sckdivcr_SPEC, crate::common::RW>::from_ptr(
44 self._svd2pac_as_ptr().add(32usize),
45 )
46 }
47 }
48
49 #[doc = "System Clock Source Control Register"]
50 #[inline(always)]
51 pub const fn sckscr(
52 &self,
53 ) -> &'static crate::common::Reg<self::Sckscr_SPEC, crate::common::RW> {
54 unsafe {
55 crate::common::Reg::<self::Sckscr_SPEC, crate::common::RW>::from_ptr(
56 self._svd2pac_as_ptr().add(38usize),
57 )
58 }
59 }
60
61 #[doc = "Memory Wait Cycle Control Register"]
62 #[inline(always)]
63 pub const fn memwait(
64 &self,
65 ) -> &'static crate::common::Reg<self::Memwait_SPEC, crate::common::RW> {
66 unsafe {
67 crate::common::Reg::<self::Memwait_SPEC, crate::common::RW>::from_ptr(
68 self._svd2pac_as_ptr().add(49usize),
69 )
70 }
71 }
72
73 #[doc = "Main Clock Oscillator Control Register"]
74 #[inline(always)]
75 pub const fn mosccr(
76 &self,
77 ) -> &'static crate::common::Reg<self::Mosccr_SPEC, crate::common::RW> {
78 unsafe {
79 crate::common::Reg::<self::Mosccr_SPEC, crate::common::RW>::from_ptr(
80 self._svd2pac_as_ptr().add(50usize),
81 )
82 }
83 }
84
85 #[doc = "High-Speed On-Chip Oscillator Control Register"]
86 #[inline(always)]
87 pub const fn hococr(
88 &self,
89 ) -> &'static crate::common::Reg<self::Hococr_SPEC, crate::common::RW> {
90 unsafe {
91 crate::common::Reg::<self::Hococr_SPEC, crate::common::RW>::from_ptr(
92 self._svd2pac_as_ptr().add(54usize),
93 )
94 }
95 }
96
97 #[doc = "Middle-Speed On-Chip Oscillator Control Register"]
98 #[inline(always)]
99 pub const fn mococr(
100 &self,
101 ) -> &'static crate::common::Reg<self::Mococr_SPEC, crate::common::RW> {
102 unsafe {
103 crate::common::Reg::<self::Mococr_SPEC, crate::common::RW>::from_ptr(
104 self._svd2pac_as_ptr().add(56usize),
105 )
106 }
107 }
108
109 #[doc = "Oscillation Stabilization Flag Register"]
110 #[inline(always)]
111 pub const fn oscsf(&self) -> &'static crate::common::Reg<self::Oscsf_SPEC, crate::common::R> {
112 unsafe {
113 crate::common::Reg::<self::Oscsf_SPEC, crate::common::R>::from_ptr(
114 self._svd2pac_as_ptr().add(60usize),
115 )
116 }
117 }
118
119 #[doc = "Clock Out Control Register"]
120 #[inline(always)]
121 pub const fn ckocr(&self) -> &'static crate::common::Reg<self::Ckocr_SPEC, crate::common::RW> {
122 unsafe {
123 crate::common::Reg::<self::Ckocr_SPEC, crate::common::RW>::from_ptr(
124 self._svd2pac_as_ptr().add(62usize),
125 )
126 }
127 }
128
129 #[doc = "Oscillation Stop Detection Control Register"]
130 #[inline(always)]
131 pub const fn ostdcr(
132 &self,
133 ) -> &'static crate::common::Reg<self::Ostdcr_SPEC, crate::common::RW> {
134 unsafe {
135 crate::common::Reg::<self::Ostdcr_SPEC, crate::common::RW>::from_ptr(
136 self._svd2pac_as_ptr().add(64usize),
137 )
138 }
139 }
140
141 #[doc = "Oscillation Stop Detection Status Register"]
142 #[inline(always)]
143 pub const fn ostdsr(
144 &self,
145 ) -> &'static crate::common::Reg<self::Ostdsr_SPEC, crate::common::RW> {
146 unsafe {
147 crate::common::Reg::<self::Ostdsr_SPEC, crate::common::RW>::from_ptr(
148 self._svd2pac_as_ptr().add(65usize),
149 )
150 }
151 }
152
153 #[doc = "MOCO User Trimming Control Register"]
154 #[inline(always)]
155 pub const fn mocoutcr(
156 &self,
157 ) -> &'static crate::common::Reg<self::Mocoutcr_SPEC, crate::common::RW> {
158 unsafe {
159 crate::common::Reg::<self::Mocoutcr_SPEC, crate::common::RW>::from_ptr(
160 self._svd2pac_as_ptr().add(97usize),
161 )
162 }
163 }
164
165 #[doc = "HOCO User Trimming Control Register"]
166 #[inline(always)]
167 pub const fn hocoutcr(
168 &self,
169 ) -> &'static crate::common::Reg<self::Hocoutcr_SPEC, crate::common::RW> {
170 unsafe {
171 crate::common::Reg::<self::Hocoutcr_SPEC, crate::common::RW>::from_ptr(
172 self._svd2pac_as_ptr().add(98usize),
173 )
174 }
175 }
176
177 #[doc = "24-bit Sigma-Delta A/D Converter Clock Control Register"]
178 #[inline(always)]
179 pub const fn sdadcckcr(
180 &self,
181 ) -> &'static crate::common::Reg<self::Sdadcckcr_SPEC, crate::common::RW> {
182 unsafe {
183 crate::common::Reg::<self::Sdadcckcr_SPEC, crate::common::RW>::from_ptr(
184 self._svd2pac_as_ptr().add(209usize),
185 )
186 }
187 }
188
189 #[doc = "Main Clock Oscillator Mode Oscillation Control Register"]
190 #[inline(always)]
191 pub const fn momcr(&self) -> &'static crate::common::Reg<self::Momcr_SPEC, crate::common::RW> {
192 unsafe {
193 crate::common::Reg::<self::Momcr_SPEC, crate::common::RW>::from_ptr(
194 self._svd2pac_as_ptr().add(1043usize),
195 )
196 }
197 }
198
199 #[doc = "Sub-clock Oscillator Control Register"]
200 #[inline(always)]
201 pub const fn sosccr(
202 &self,
203 ) -> &'static crate::common::Reg<self::Sosccr_SPEC, crate::common::RW> {
204 unsafe {
205 crate::common::Reg::<self::Sosccr_SPEC, crate::common::RW>::from_ptr(
206 self._svd2pac_as_ptr().add(1152usize),
207 )
208 }
209 }
210
211 #[doc = "Sub-clock Oscillator Mode Control Register"]
212 #[inline(always)]
213 pub const fn somcr(&self) -> &'static crate::common::Reg<self::Somcr_SPEC, crate::common::RW> {
214 unsafe {
215 crate::common::Reg::<self::Somcr_SPEC, crate::common::RW>::from_ptr(
216 self._svd2pac_as_ptr().add(1153usize),
217 )
218 }
219 }
220
221 #[doc = "Low-Speed On-Chip Oscillator Control Register"]
222 #[inline(always)]
223 pub const fn lococr(
224 &self,
225 ) -> &'static crate::common::Reg<self::Lococr_SPEC, crate::common::RW> {
226 unsafe {
227 crate::common::Reg::<self::Lococr_SPEC, crate::common::RW>::from_ptr(
228 self._svd2pac_as_ptr().add(1168usize),
229 )
230 }
231 }
232
233 #[doc = "LOCO User Trimming Control Register"]
234 #[inline(always)]
235 pub const fn locoutcr(
236 &self,
237 ) -> &'static crate::common::Reg<self::Locoutcr_SPEC, crate::common::RW> {
238 unsafe {
239 crate::common::Reg::<self::Locoutcr_SPEC, crate::common::RW>::from_ptr(
240 self._svd2pac_as_ptr().add(1170usize),
241 )
242 }
243 }
244
245 #[doc = "Main Clock Oscillator Wait Control Register"]
246 #[inline(always)]
247 pub const fn moscwtcr(
248 &self,
249 ) -> &'static crate::common::Reg<self::Moscwtcr_SPEC, crate::common::RW> {
250 unsafe {
251 crate::common::Reg::<self::Moscwtcr_SPEC, crate::common::RW>::from_ptr(
252 self._svd2pac_as_ptr().add(162usize),
253 )
254 }
255 }
256
257 #[doc = "High-Speed On-Chip Oscillator Wait Control Register"]
258 #[inline(always)]
259 pub const fn hocowtcr(
260 &self,
261 ) -> &'static crate::common::Reg<self::Hocowtcr_SPEC, crate::common::RW> {
262 unsafe {
263 crate::common::Reg::<self::Hocowtcr_SPEC, crate::common::RW>::from_ptr(
264 self._svd2pac_as_ptr().add(165usize),
265 )
266 }
267 }
268
269 #[doc = "Standby Control Register"]
270 #[inline(always)]
271 pub const fn sbycr(&self) -> &'static crate::common::Reg<self::Sbycr_SPEC, crate::common::RW> {
272 unsafe {
273 crate::common::Reg::<self::Sbycr_SPEC, crate::common::RW>::from_ptr(
274 self._svd2pac_as_ptr().add(12usize),
275 )
276 }
277 }
278
279 #[doc = "Module Stop Control Register A"]
280 #[inline(always)]
281 pub const fn mstpcra(
282 &self,
283 ) -> &'static crate::common::Reg<self::Mstpcra_SPEC, crate::common::RW> {
284 unsafe {
285 crate::common::Reg::<self::Mstpcra_SPEC, crate::common::RW>::from_ptr(
286 self._svd2pac_as_ptr().add(28usize),
287 )
288 }
289 }
290
291 #[doc = "Snooze Control Register"]
292 #[inline(always)]
293 pub const fn snzcr(&self) -> &'static crate::common::Reg<self::Snzcr_SPEC, crate::common::RW> {
294 unsafe {
295 crate::common::Reg::<self::Snzcr_SPEC, crate::common::RW>::from_ptr(
296 self._svd2pac_as_ptr().add(146usize),
297 )
298 }
299 }
300
301 #[doc = "Snooze End Control Register"]
302 #[inline(always)]
303 pub const fn snzedcr(
304 &self,
305 ) -> &'static crate::common::Reg<self::Snzedcr_SPEC, crate::common::RW> {
306 unsafe {
307 crate::common::Reg::<self::Snzedcr_SPEC, crate::common::RW>::from_ptr(
308 self._svd2pac_as_ptr().add(148usize),
309 )
310 }
311 }
312
313 #[doc = "Snooze Request Control Register"]
314 #[inline(always)]
315 pub const fn snzreqcr(
316 &self,
317 ) -> &'static crate::common::Reg<self::Snzreqcr_SPEC, crate::common::RW> {
318 unsafe {
319 crate::common::Reg::<self::Snzreqcr_SPEC, crate::common::RW>::from_ptr(
320 self._svd2pac_as_ptr().add(152usize),
321 )
322 }
323 }
324
325 #[doc = "Flash Operation Control Register"]
326 #[inline(always)]
327 pub const fn flstop(
328 &self,
329 ) -> &'static crate::common::Reg<self::Flstop_SPEC, crate::common::RW> {
330 unsafe {
331 crate::common::Reg::<self::Flstop_SPEC, crate::common::RW>::from_ptr(
332 self._svd2pac_as_ptr().add(158usize),
333 )
334 }
335 }
336
337 #[doc = "Operating Power Control Register"]
338 #[inline(always)]
339 pub const fn opccr(&self) -> &'static crate::common::Reg<self::Opccr_SPEC, crate::common::RW> {
340 unsafe {
341 crate::common::Reg::<self::Opccr_SPEC, crate::common::RW>::from_ptr(
342 self._svd2pac_as_ptr().add(160usize),
343 )
344 }
345 }
346
347 #[doc = "Sub Operating Power Control Register"]
348 #[inline(always)]
349 pub const fn sopccr(
350 &self,
351 ) -> &'static crate::common::Reg<self::Sopccr_SPEC, crate::common::RW> {
352 unsafe {
353 crate::common::Reg::<self::Sopccr_SPEC, crate::common::RW>::from_ptr(
354 self._svd2pac_as_ptr().add(170usize),
355 )
356 }
357 }
358
359 #[doc = "Voltage Monitor Circuit Control Register"]
360 #[inline(always)]
361 pub const fn lvcmpcr(
362 &self,
363 ) -> &'static crate::common::Reg<self::Lvcmpcr_SPEC, crate::common::RW> {
364 unsafe {
365 crate::common::Reg::<self::Lvcmpcr_SPEC, crate::common::RW>::from_ptr(
366 self._svd2pac_as_ptr().add(1047usize),
367 )
368 }
369 }
370
371 #[doc = "Voltage Detection Level Select Register"]
372 #[inline(always)]
373 pub const fn lvdlvlr(
374 &self,
375 ) -> &'static crate::common::Reg<self::Lvdlvlr_SPEC, crate::common::RW> {
376 unsafe {
377 crate::common::Reg::<self::Lvdlvlr_SPEC, crate::common::RW>::from_ptr(
378 self._svd2pac_as_ptr().add(1048usize),
379 )
380 }
381 }
382
383 #[doc = "Voltage Monitor 1 Circuit Control Register 0"]
384 #[inline(always)]
385 pub const fn lvd1cr0(
386 &self,
387 ) -> &'static crate::common::Reg<self::Lvd1Cr0_SPEC, crate::common::RW> {
388 unsafe {
389 crate::common::Reg::<self::Lvd1Cr0_SPEC, crate::common::RW>::from_ptr(
390 self._svd2pac_as_ptr().add(1050usize),
391 )
392 }
393 }
394
395 #[doc = "Voltage Monitor 2 Circuit Control Register 0"]
396 #[inline(always)]
397 pub const fn lvd2cr0(
398 &self,
399 ) -> &'static crate::common::Reg<self::Lvd2Cr0_SPEC, crate::common::RW> {
400 unsafe {
401 crate::common::Reg::<self::Lvd2Cr0_SPEC, crate::common::RW>::from_ptr(
402 self._svd2pac_as_ptr().add(1051usize),
403 )
404 }
405 }
406
407 #[doc = "Voltage Monitor 1 Circuit Control Register 1"]
408 #[inline(always)]
409 pub const fn lvd1cr1(
410 &self,
411 ) -> &'static crate::common::Reg<self::Lvd1Cr1_SPEC, crate::common::RW> {
412 unsafe {
413 crate::common::Reg::<self::Lvd1Cr1_SPEC, crate::common::RW>::from_ptr(
414 self._svd2pac_as_ptr().add(224usize),
415 )
416 }
417 }
418
419 #[doc = "Voltage Monitor 1 Circuit Status Register"]
420 #[inline(always)]
421 pub const fn lvd1sr(
422 &self,
423 ) -> &'static crate::common::Reg<self::Lvd1Sr_SPEC, crate::common::RW> {
424 unsafe {
425 crate::common::Reg::<self::Lvd1Sr_SPEC, crate::common::RW>::from_ptr(
426 self._svd2pac_as_ptr().add(225usize),
427 )
428 }
429 }
430
431 #[doc = "Voltage Monitor 2 Circuit Control Register 1"]
432 #[inline(always)]
433 pub const fn lvd2cr1(
434 &self,
435 ) -> &'static crate::common::Reg<self::Lvd2Cr1_SPEC, crate::common::RW> {
436 unsafe {
437 crate::common::Reg::<self::Lvd2Cr1_SPEC, crate::common::RW>::from_ptr(
438 self._svd2pac_as_ptr().add(226usize),
439 )
440 }
441 }
442
443 #[doc = "Voltage Monitor 2 Circuit Status Register"]
444 #[inline(always)]
445 pub const fn lvd2sr(
446 &self,
447 ) -> &'static crate::common::Reg<self::Lvd2Sr_SPEC, crate::common::RW> {
448 unsafe {
449 crate::common::Reg::<self::Lvd2Sr_SPEC, crate::common::RW>::from_ptr(
450 self._svd2pac_as_ptr().add(227usize),
451 )
452 }
453 }
454
455 #[doc = "System Control OCD Control Register"]
456 #[inline(always)]
457 pub const fn syocdcr(
458 &self,
459 ) -> &'static crate::common::Reg<self::Syocdcr_SPEC, crate::common::RW> {
460 unsafe {
461 crate::common::Reg::<self::Syocdcr_SPEC, crate::common::RW>::from_ptr(
462 self._svd2pac_as_ptr().add(1038usize),
463 )
464 }
465 }
466
467 #[doc = "Protect Register"]
468 #[inline(always)]
469 pub const fn prcr(&self) -> &'static crate::common::Reg<self::Prcr_SPEC, crate::common::RW> {
470 unsafe {
471 crate::common::Reg::<self::Prcr_SPEC, crate::common::RW>::from_ptr(
472 self._svd2pac_as_ptr().add(1022usize),
473 )
474 }
475 }
476
477 #[doc = "Reset Status Register 0"]
478 #[inline(always)]
479 pub const fn rstsr0(
480 &self,
481 ) -> &'static crate::common::Reg<self::Rstsr0_SPEC, crate::common::RW> {
482 unsafe {
483 crate::common::Reg::<self::Rstsr0_SPEC, crate::common::RW>::from_ptr(
484 self._svd2pac_as_ptr().add(1040usize),
485 )
486 }
487 }
488
489 #[doc = "Reset Status Register 2"]
490 #[inline(always)]
491 pub const fn rstsr2(
492 &self,
493 ) -> &'static crate::common::Reg<self::Rstsr2_SPEC, crate::common::RW> {
494 unsafe {
495 crate::common::Reg::<self::Rstsr2_SPEC, crate::common::RW>::from_ptr(
496 self._svd2pac_as_ptr().add(1041usize),
497 )
498 }
499 }
500
501 #[doc = "Reset Status Register 1"]
502 #[inline(always)]
503 pub const fn rstsr1(
504 &self,
505 ) -> &'static crate::common::Reg<self::Rstsr1_SPEC, crate::common::RW> {
506 unsafe {
507 crate::common::Reg::<self::Rstsr1_SPEC, crate::common::RW>::from_ptr(
508 self._svd2pac_as_ptr().add(192usize),
509 )
510 }
511 }
512}
513#[doc(hidden)]
514#[derive(Copy, Clone, Eq, PartialEq)]
515pub struct Sckdivcr_SPEC;
516impl crate::sealed::RegSpec for Sckdivcr_SPEC {
517 type DataType = u32;
518}
519
520#[doc = "System Clock Division Control Register"]
521pub type Sckdivcr = crate::RegValueT<Sckdivcr_SPEC>;
522
523impl Sckdivcr {
524 #[doc = "Flash IF Clock (FCLK) Select"]
525 #[inline(always)]
526 pub fn fck(
527 self,
528 ) -> crate::common::RegisterField<
529 28,
530 0x7,
531 1,
532 0,
533 sckdivcr::Fck,
534 sckdivcr::Fck,
535 Sckdivcr_SPEC,
536 crate::common::RW,
537 > {
538 crate::common::RegisterField::<
539 28,
540 0x7,
541 1,
542 0,
543 sckdivcr::Fck,
544 sckdivcr::Fck,
545 Sckdivcr_SPEC,
546 crate::common::RW,
547 >::from_register(self, 0)
548 }
549
550 #[doc = "System Clock (ICLK) Select"]
551 #[inline(always)]
552 pub fn ick(
553 self,
554 ) -> crate::common::RegisterField<
555 24,
556 0x7,
557 1,
558 0,
559 sckdivcr::Ick,
560 sckdivcr::Ick,
561 Sckdivcr_SPEC,
562 crate::common::RW,
563 > {
564 crate::common::RegisterField::<
565 24,
566 0x7,
567 1,
568 0,
569 sckdivcr::Ick,
570 sckdivcr::Ick,
571 Sckdivcr_SPEC,
572 crate::common::RW,
573 >::from_register(self, 0)
574 }
575
576 #[doc = "Peripheral Module Clock B (PCLKB) Select"]
577 #[inline(always)]
578 pub fn pckb(
579 self,
580 ) -> crate::common::RegisterField<
581 8,
582 0x7,
583 1,
584 0,
585 sckdivcr::Pckb,
586 sckdivcr::Pckb,
587 Sckdivcr_SPEC,
588 crate::common::RW,
589 > {
590 crate::common::RegisterField::<
591 8,
592 0x7,
593 1,
594 0,
595 sckdivcr::Pckb,
596 sckdivcr::Pckb,
597 Sckdivcr_SPEC,
598 crate::common::RW,
599 >::from_register(self, 0)
600 }
601
602 #[doc = "These bits are read as 00000. The write value should be 00000."]
603 #[inline(always)]
604 pub fn reserved(
605 self,
606 ) -> crate::common::RegisterField<3, 0x1f, 1, 0, u8, u8, Sckdivcr_SPEC, crate::common::RW> {
607 crate::common::RegisterField::<3,0x1f,1,0,u8,u8,Sckdivcr_SPEC,crate::common::RW>::from_register(self,0)
608 }
609
610 #[doc = "Peripheral Module Clock D (PCLKD) Select"]
611 #[inline(always)]
612 pub fn pckd(
613 self,
614 ) -> crate::common::RegisterField<
615 0,
616 0x7,
617 1,
618 0,
619 sckdivcr::Pckd,
620 sckdivcr::Pckd,
621 Sckdivcr_SPEC,
622 crate::common::RW,
623 > {
624 crate::common::RegisterField::<
625 0,
626 0x7,
627 1,
628 0,
629 sckdivcr::Pckd,
630 sckdivcr::Pckd,
631 Sckdivcr_SPEC,
632 crate::common::RW,
633 >::from_register(self, 0)
634 }
635}
636impl ::core::default::Default for Sckdivcr {
637 #[inline(always)]
638 fn default() -> Sckdivcr {
639 <crate::RegValueT<Sckdivcr_SPEC> as RegisterValue<_>>::new(1140851716)
640 }
641}
642pub mod sckdivcr {
643
644 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
645 pub struct Fck_SPEC;
646 pub type Fck = crate::EnumBitfieldStruct<u8, Fck_SPEC>;
647 impl Fck {
648 #[doc = "/1"]
649 pub const _000: Self = Self::new(0);
650
651 #[doc = "/2"]
652 pub const _001: Self = Self::new(1);
653
654 #[doc = "/4"]
655 pub const _010: Self = Self::new(2);
656
657 #[doc = "/8"]
658 pub const _011: Self = Self::new(3);
659
660 #[doc = "/16"]
661 pub const _100: Self = Self::new(4);
662
663 #[doc = "/32"]
664 pub const _101: Self = Self::new(5);
665
666 #[doc = "/64"]
667 pub const _110: Self = Self::new(6);
668 }
669 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
670 pub struct Ick_SPEC;
671 pub type Ick = crate::EnumBitfieldStruct<u8, Ick_SPEC>;
672 impl Ick {
673 #[doc = "/1"]
674 pub const _000: Self = Self::new(0);
675
676 #[doc = "/2"]
677 pub const _001: Self = Self::new(1);
678
679 #[doc = "/4"]
680 pub const _010: Self = Self::new(2);
681
682 #[doc = "/8"]
683 pub const _011: Self = Self::new(3);
684
685 #[doc = "/16"]
686 pub const _100: Self = Self::new(4);
687
688 #[doc = "/32"]
689 pub const _101: Self = Self::new(5);
690
691 #[doc = "/64"]
692 pub const _110: Self = Self::new(6);
693 }
694 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
695 pub struct Pckb_SPEC;
696 pub type Pckb = crate::EnumBitfieldStruct<u8, Pckb_SPEC>;
697 impl Pckb {
698 #[doc = "/1"]
699 pub const _000: Self = Self::new(0);
700
701 #[doc = "/2"]
702 pub const _001: Self = Self::new(1);
703
704 #[doc = "/4"]
705 pub const _010: Self = Self::new(2);
706
707 #[doc = "/8"]
708 pub const _011: Self = Self::new(3);
709
710 #[doc = "/16"]
711 pub const _100: Self = Self::new(4);
712
713 #[doc = "/32"]
714 pub const _101: Self = Self::new(5);
715
716 #[doc = "/64"]
717 pub const _110: Self = Self::new(6);
718 }
719 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
720 pub struct Pckd_SPEC;
721 pub type Pckd = crate::EnumBitfieldStruct<u8, Pckd_SPEC>;
722 impl Pckd {
723 #[doc = "/1"]
724 pub const _000: Self = Self::new(0);
725
726 #[doc = "/2"]
727 pub const _001: Self = Self::new(1);
728
729 #[doc = "/4"]
730 pub const _010: Self = Self::new(2);
731
732 #[doc = "/8"]
733 pub const _011: Self = Self::new(3);
734
735 #[doc = "/16"]
736 pub const _100: Self = Self::new(4);
737
738 #[doc = "/32"]
739 pub const _101: Self = Self::new(5);
740
741 #[doc = "/64"]
742 pub const _110: Self = Self::new(6);
743 }
744}
745#[doc(hidden)]
746#[derive(Copy, Clone, Eq, PartialEq)]
747pub struct Sckscr_SPEC;
748impl crate::sealed::RegSpec for Sckscr_SPEC {
749 type DataType = u8;
750}
751
752#[doc = "System Clock Source Control Register"]
753pub type Sckscr = crate::RegValueT<Sckscr_SPEC>;
754
755impl Sckscr {
756 #[doc = "These bits are read as 00000. The write value should be 00000."]
757 #[inline(always)]
758 pub fn reserved(
759 self,
760 ) -> crate::common::RegisterField<3, 0x1f, 1, 0, u8, u8, Sckscr_SPEC, crate::common::RW> {
761 crate::common::RegisterField::<3,0x1f,1,0,u8,u8,Sckscr_SPEC,crate::common::RW>::from_register(self,0)
762 }
763
764 #[doc = "Clock Source Select"]
765 #[inline(always)]
766 pub fn cksel(
767 self,
768 ) -> crate::common::RegisterField<
769 0,
770 0x7,
771 1,
772 0,
773 sckscr::Cksel,
774 sckscr::Cksel,
775 Sckscr_SPEC,
776 crate::common::RW,
777 > {
778 crate::common::RegisterField::<
779 0,
780 0x7,
781 1,
782 0,
783 sckscr::Cksel,
784 sckscr::Cksel,
785 Sckscr_SPEC,
786 crate::common::RW,
787 >::from_register(self, 0)
788 }
789}
790impl ::core::default::Default for Sckscr {
791 #[inline(always)]
792 fn default() -> Sckscr {
793 <crate::RegValueT<Sckscr_SPEC> as RegisterValue<_>>::new(1)
794 }
795}
796pub mod sckscr {
797
798 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
799 pub struct Cksel_SPEC;
800 pub type Cksel = crate::EnumBitfieldStruct<u8, Cksel_SPEC>;
801 impl Cksel {
802 #[doc = "HOCO"]
803 pub const _000: Self = Self::new(0);
804
805 #[doc = "MOCO"]
806 pub const _001: Self = Self::new(1);
807
808 #[doc = "LOCO"]
809 pub const _010: Self = Self::new(2);
810
811 #[doc = "Main clock oscillator"]
812 pub const _011: Self = Self::new(3);
813
814 #[doc = "Sub-clock oscillator"]
815 pub const _100: Self = Self::new(4);
816 }
817}
818#[doc(hidden)]
819#[derive(Copy, Clone, Eq, PartialEq)]
820pub struct Memwait_SPEC;
821impl crate::sealed::RegSpec for Memwait_SPEC {
822 type DataType = u8;
823}
824
825#[doc = "Memory Wait Cycle Control Register"]
826pub type Memwait = crate::RegValueT<Memwait_SPEC>;
827
828impl Memwait {
829 #[doc = "These bits are read as 0000000. The write value should be 0000000."]
830 #[inline(always)]
831 pub fn reserved(
832 self,
833 ) -> crate::common::RegisterField<1, 0x7f, 1, 0, u8, u8, Memwait_SPEC, crate::common::RW> {
834 crate::common::RegisterField::<1,0x7f,1,0,u8,u8,Memwait_SPEC,crate::common::RW>::from_register(self,0)
835 }
836
837 #[doc = "Memory Wait Cycle Select"]
838 #[inline(always)]
839 pub fn memwait(
840 self,
841 ) -> crate::common::RegisterField<
842 0,
843 0x1,
844 1,
845 0,
846 memwait::Memwait,
847 memwait::Memwait,
848 Memwait_SPEC,
849 crate::common::RW,
850 > {
851 crate::common::RegisterField::<
852 0,
853 0x1,
854 1,
855 0,
856 memwait::Memwait,
857 memwait::Memwait,
858 Memwait_SPEC,
859 crate::common::RW,
860 >::from_register(self, 0)
861 }
862}
863impl ::core::default::Default for Memwait {
864 #[inline(always)]
865 fn default() -> Memwait {
866 <crate::RegValueT<Memwait_SPEC> as RegisterValue<_>>::new(0)
867 }
868}
869pub mod memwait {
870
871 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
872 pub struct Memwait_SPEC;
873 pub type Memwait = crate::EnumBitfieldStruct<u8, Memwait_SPEC>;
874 impl Memwait {
875 #[doc = "No wait"]
876 pub const _0: Self = Self::new(0);
877
878 #[doc = "Wait"]
879 pub const _1: Self = Self::new(1);
880 }
881}
882#[doc(hidden)]
883#[derive(Copy, Clone, Eq, PartialEq)]
884pub struct Mosccr_SPEC;
885impl crate::sealed::RegSpec for Mosccr_SPEC {
886 type DataType = u8;
887}
888
889#[doc = "Main Clock Oscillator Control Register"]
890pub type Mosccr = crate::RegValueT<Mosccr_SPEC>;
891
892impl Mosccr {
893 #[doc = "These bits are read as 0000000. The write value should be 0000000."]
894 #[inline(always)]
895 pub fn reserved(
896 self,
897 ) -> crate::common::RegisterField<1, 0x7f, 1, 0, u8, u8, Mosccr_SPEC, crate::common::RW> {
898 crate::common::RegisterField::<1,0x7f,1,0,u8,u8,Mosccr_SPEC,crate::common::RW>::from_register(self,0)
899 }
900
901 #[doc = "Main Clock Oscillator Stop"]
902 #[inline(always)]
903 pub fn mostp(
904 self,
905 ) -> crate::common::RegisterField<
906 0,
907 0x1,
908 1,
909 0,
910 mosccr::Mostp,
911 mosccr::Mostp,
912 Mosccr_SPEC,
913 crate::common::RW,
914 > {
915 crate::common::RegisterField::<
916 0,
917 0x1,
918 1,
919 0,
920 mosccr::Mostp,
921 mosccr::Mostp,
922 Mosccr_SPEC,
923 crate::common::RW,
924 >::from_register(self, 0)
925 }
926}
927impl ::core::default::Default for Mosccr {
928 #[inline(always)]
929 fn default() -> Mosccr {
930 <crate::RegValueT<Mosccr_SPEC> as RegisterValue<_>>::new(1)
931 }
932}
933pub mod mosccr {
934
935 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
936 pub struct Mostp_SPEC;
937 pub type Mostp = crate::EnumBitfieldStruct<u8, Mostp_SPEC>;
938 impl Mostp {
939 #[doc = "Main clock oscillator is operating."]
940 pub const _0: Self = Self::new(0);
941
942 #[doc = "Main clock oscillator is stopped."]
943 pub const _1: Self = Self::new(1);
944 }
945}
946#[doc(hidden)]
947#[derive(Copy, Clone, Eq, PartialEq)]
948pub struct Hococr_SPEC;
949impl crate::sealed::RegSpec for Hococr_SPEC {
950 type DataType = u8;
951}
952
953#[doc = "High-Speed On-Chip Oscillator Control Register"]
954pub type Hococr = crate::RegValueT<Hococr_SPEC>;
955
956impl Hococr {
957 #[doc = "These bits are read as 0000000. The write value should be 0000000."]
958 #[inline(always)]
959 pub fn reserved(
960 self,
961 ) -> crate::common::RegisterField<1, 0x7f, 1, 0, u8, u8, Hococr_SPEC, crate::common::RW> {
962 crate::common::RegisterField::<1,0x7f,1,0,u8,u8,Hococr_SPEC,crate::common::RW>::from_register(self,0)
963 }
964
965 #[doc = "HOCO Stop"]
966 #[inline(always)]
967 pub fn hcstp(
968 self,
969 ) -> crate::common::RegisterField<
970 0,
971 0x1,
972 1,
973 0,
974 hococr::Hcstp,
975 hococr::Hcstp,
976 Hococr_SPEC,
977 crate::common::RW,
978 > {
979 crate::common::RegisterField::<
980 0,
981 0x1,
982 1,
983 0,
984 hococr::Hcstp,
985 hococr::Hcstp,
986 Hococr_SPEC,
987 crate::common::RW,
988 >::from_register(self, 0)
989 }
990}
991impl ::core::default::Default for Hococr {
992 #[inline(always)]
993 fn default() -> Hococr {
994 <crate::RegValueT<Hococr_SPEC> as RegisterValue<_>>::new(0)
995 }
996}
997pub mod hococr {
998
999 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1000 pub struct Hcstp_SPEC;
1001 pub type Hcstp = crate::EnumBitfieldStruct<u8, Hcstp_SPEC>;
1002 impl Hcstp {
1003 #[doc = "HOCO is operating."]
1004 pub const _0: Self = Self::new(0);
1005
1006 #[doc = "HOCO is stopped."]
1007 pub const _1: Self = Self::new(1);
1008 }
1009}
1010#[doc(hidden)]
1011#[derive(Copy, Clone, Eq, PartialEq)]
1012pub struct Mococr_SPEC;
1013impl crate::sealed::RegSpec for Mococr_SPEC {
1014 type DataType = u8;
1015}
1016
1017#[doc = "Middle-Speed On-Chip Oscillator Control Register"]
1018pub type Mococr = crate::RegValueT<Mococr_SPEC>;
1019
1020impl Mococr {
1021 #[doc = "These bits are read as 0000000. The write value should be 0000000."]
1022 #[inline(always)]
1023 pub fn reserved(
1024 self,
1025 ) -> crate::common::RegisterField<1, 0x7f, 1, 0, u8, u8, Mococr_SPEC, crate::common::RW> {
1026 crate::common::RegisterField::<1,0x7f,1,0,u8,u8,Mococr_SPEC,crate::common::RW>::from_register(self,0)
1027 }
1028
1029 #[doc = "MOCO Stop"]
1030 #[inline(always)]
1031 pub fn mcstp(
1032 self,
1033 ) -> crate::common::RegisterField<
1034 0,
1035 0x1,
1036 1,
1037 0,
1038 mococr::Mcstp,
1039 mococr::Mcstp,
1040 Mococr_SPEC,
1041 crate::common::RW,
1042 > {
1043 crate::common::RegisterField::<
1044 0,
1045 0x1,
1046 1,
1047 0,
1048 mococr::Mcstp,
1049 mococr::Mcstp,
1050 Mococr_SPEC,
1051 crate::common::RW,
1052 >::from_register(self, 0)
1053 }
1054}
1055impl ::core::default::Default for Mococr {
1056 #[inline(always)]
1057 fn default() -> Mococr {
1058 <crate::RegValueT<Mococr_SPEC> as RegisterValue<_>>::new(0)
1059 }
1060}
1061pub mod mococr {
1062
1063 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1064 pub struct Mcstp_SPEC;
1065 pub type Mcstp = crate::EnumBitfieldStruct<u8, Mcstp_SPEC>;
1066 impl Mcstp {
1067 #[doc = "MOCO is operating."]
1068 pub const _0: Self = Self::new(0);
1069
1070 #[doc = "MOCO is stopped."]
1071 pub const _1: Self = Self::new(1);
1072 }
1073}
1074#[doc(hidden)]
1075#[derive(Copy, Clone, Eq, PartialEq)]
1076pub struct Oscsf_SPEC;
1077impl crate::sealed::RegSpec for Oscsf_SPEC {
1078 type DataType = u8;
1079}
1080
1081#[doc = "Oscillation Stabilization Flag Register"]
1082pub type Oscsf = crate::RegValueT<Oscsf_SPEC>;
1083
1084impl Oscsf {
1085 #[doc = "Main Clock Oscillation Stabilization Flag"]
1086 #[inline(always)]
1087 pub fn moscsf(
1088 self,
1089 ) -> crate::common::RegisterField<
1090 3,
1091 0x1,
1092 1,
1093 0,
1094 oscsf::Moscsf,
1095 oscsf::Moscsf,
1096 Oscsf_SPEC,
1097 crate::common::R,
1098 > {
1099 crate::common::RegisterField::<
1100 3,
1101 0x1,
1102 1,
1103 0,
1104 oscsf::Moscsf,
1105 oscsf::Moscsf,
1106 Oscsf_SPEC,
1107 crate::common::R,
1108 >::from_register(self, 0)
1109 }
1110
1111 #[doc = "These bits are read as 00."]
1112 #[inline(always)]
1113 pub fn reserved(
1114 self,
1115 ) -> crate::common::RegisterField<1, 0x3, 1, 0, u8, u8, Oscsf_SPEC, crate::common::R> {
1116 crate::common::RegisterField::<1,0x3,1,0,u8,u8,Oscsf_SPEC,crate::common::R>::from_register(self,0)
1117 }
1118
1119 #[doc = "HOCO Clock Oscillation Stabilization FlagNOTE: The HOCOSF bit value after a reset is 1 when the OFS1.HOCOEN bit is 0. It is 0 when the OFS1.HOCOEN bit is 1."]
1120 #[inline(always)]
1121 pub fn hocosf(
1122 self,
1123 ) -> crate::common::RegisterField<
1124 0,
1125 0x1,
1126 1,
1127 0,
1128 oscsf::Hocosf,
1129 oscsf::Hocosf,
1130 Oscsf_SPEC,
1131 crate::common::R,
1132 > {
1133 crate::common::RegisterField::<
1134 0,
1135 0x1,
1136 1,
1137 0,
1138 oscsf::Hocosf,
1139 oscsf::Hocosf,
1140 Oscsf_SPEC,
1141 crate::common::R,
1142 >::from_register(self, 0)
1143 }
1144}
1145impl ::core::default::Default for Oscsf {
1146 #[inline(always)]
1147 fn default() -> Oscsf {
1148 <crate::RegValueT<Oscsf_SPEC> as RegisterValue<_>>::new(0)
1149 }
1150}
1151pub mod oscsf {
1152
1153 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1154 pub struct Moscsf_SPEC;
1155 pub type Moscsf = crate::EnumBitfieldStruct<u8, Moscsf_SPEC>;
1156 impl Moscsf {
1157 #[doc = "MOSTP = 1 (stopping the main clock oscillator) or oscillation of the main clock has not yet become stable."]
1158 pub const _0: Self = Self::new(0);
1159
1160 #[doc = "Oscillation of the main clock is stable so the clock is available for use as the system clock."]
1161 pub const _1: Self = Self::new(1);
1162 }
1163 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1164 pub struct Hocosf_SPEC;
1165 pub type Hocosf = crate::EnumBitfieldStruct<u8, Hocosf_SPEC>;
1166 impl Hocosf {
1167 #[doc = "The HOCO clock is stopped or oscillation of the HOCO clock has not yet become stable."]
1168 pub const _0: Self = Self::new(0);
1169
1170 #[doc = "Oscillation of the HOCO clock is stable so the clock is available for use as the system clock."]
1171 pub const _1: Self = Self::new(1);
1172 }
1173}
1174#[doc(hidden)]
1175#[derive(Copy, Clone, Eq, PartialEq)]
1176pub struct Ckocr_SPEC;
1177impl crate::sealed::RegSpec for Ckocr_SPEC {
1178 type DataType = u8;
1179}
1180
1181#[doc = "Clock Out Control Register"]
1182pub type Ckocr = crate::RegValueT<Ckocr_SPEC>;
1183
1184impl Ckocr {
1185 #[doc = "Clock out enable"]
1186 #[inline(always)]
1187 pub fn ckoen(
1188 self,
1189 ) -> crate::common::RegisterField<
1190 7,
1191 0x1,
1192 1,
1193 0,
1194 ckocr::Ckoen,
1195 ckocr::Ckoen,
1196 Ckocr_SPEC,
1197 crate::common::RW,
1198 > {
1199 crate::common::RegisterField::<
1200 7,
1201 0x1,
1202 1,
1203 0,
1204 ckocr::Ckoen,
1205 ckocr::Ckoen,
1206 Ckocr_SPEC,
1207 crate::common::RW,
1208 >::from_register(self, 0)
1209 }
1210
1211 #[doc = "Clock out input frequency Division Select"]
1212 #[inline(always)]
1213 pub fn ckodiv(
1214 self,
1215 ) -> crate::common::RegisterField<
1216 4,
1217 0x7,
1218 1,
1219 0,
1220 ckocr::Ckodiv,
1221 ckocr::Ckodiv,
1222 Ckocr_SPEC,
1223 crate::common::RW,
1224 > {
1225 crate::common::RegisterField::<
1226 4,
1227 0x7,
1228 1,
1229 0,
1230 ckocr::Ckodiv,
1231 ckocr::Ckodiv,
1232 Ckocr_SPEC,
1233 crate::common::RW,
1234 >::from_register(self, 0)
1235 }
1236
1237 #[doc = "This bit is read as 0. The write value should be 0."]
1238 #[inline(always)]
1239 pub fn reserved(
1240 self,
1241 ) -> crate::common::RegisterFieldBool<3, 1, 0, Ckocr_SPEC, crate::common::RW> {
1242 crate::common::RegisterFieldBool::<3, 1, 0, Ckocr_SPEC, crate::common::RW>::from_register(
1243 self, 0,
1244 )
1245 }
1246
1247 #[doc = "Clock out source select"]
1248 #[inline(always)]
1249 pub fn ckosel(
1250 self,
1251 ) -> crate::common::RegisterField<
1252 0,
1253 0x7,
1254 1,
1255 0,
1256 ckocr::Ckosel,
1257 ckocr::Ckosel,
1258 Ckocr_SPEC,
1259 crate::common::RW,
1260 > {
1261 crate::common::RegisterField::<
1262 0,
1263 0x7,
1264 1,
1265 0,
1266 ckocr::Ckosel,
1267 ckocr::Ckosel,
1268 Ckocr_SPEC,
1269 crate::common::RW,
1270 >::from_register(self, 0)
1271 }
1272}
1273impl ::core::default::Default for Ckocr {
1274 #[inline(always)]
1275 fn default() -> Ckocr {
1276 <crate::RegValueT<Ckocr_SPEC> as RegisterValue<_>>::new(0)
1277 }
1278}
1279pub mod ckocr {
1280
1281 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1282 pub struct Ckoen_SPEC;
1283 pub type Ckoen = crate::EnumBitfieldStruct<u8, Ckoen_SPEC>;
1284 impl Ckoen {
1285 #[doc = "Clock Out disable"]
1286 pub const _0: Self = Self::new(0);
1287
1288 #[doc = "Clock Out enable"]
1289 pub const _1: Self = Self::new(1);
1290 }
1291 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1292 pub struct Ckodiv_SPEC;
1293 pub type Ckodiv = crate::EnumBitfieldStruct<u8, Ckodiv_SPEC>;
1294 impl Ckodiv {
1295 #[doc = "/1"]
1296 pub const _000: Self = Self::new(0);
1297
1298 #[doc = "/2"]
1299 pub const _001: Self = Self::new(1);
1300
1301 #[doc = "/4"]
1302 pub const _010: Self = Self::new(2);
1303
1304 #[doc = "/8"]
1305 pub const _011: Self = Self::new(3);
1306
1307 #[doc = "/16"]
1308 pub const _100: Self = Self::new(4);
1309
1310 #[doc = "/32"]
1311 pub const _101: Self = Self::new(5);
1312
1313 #[doc = "/64"]
1314 pub const _110: Self = Self::new(6);
1315
1316 #[doc = "/128"]
1317 pub const _111: Self = Self::new(7);
1318 }
1319 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1320 pub struct Ckosel_SPEC;
1321 pub type Ckosel = crate::EnumBitfieldStruct<u8, Ckosel_SPEC>;
1322 impl Ckosel {
1323 #[doc = "HOCO"]
1324 pub const _000: Self = Self::new(0);
1325
1326 #[doc = "MOCO"]
1327 pub const _001: Self = Self::new(1);
1328
1329 #[doc = "LOCO"]
1330 pub const _010: Self = Self::new(2);
1331
1332 #[doc = "MOSC"]
1333 pub const _011: Self = Self::new(3);
1334
1335 #[doc = "SOSC"]
1336 pub const _100: Self = Self::new(4);
1337 }
1338}
1339#[doc(hidden)]
1340#[derive(Copy, Clone, Eq, PartialEq)]
1341pub struct Ostdcr_SPEC;
1342impl crate::sealed::RegSpec for Ostdcr_SPEC {
1343 type DataType = u8;
1344}
1345
1346#[doc = "Oscillation Stop Detection Control Register"]
1347pub type Ostdcr = crate::RegValueT<Ostdcr_SPEC>;
1348
1349impl Ostdcr {
1350 #[doc = "Oscillation Stop Detection Function Enable"]
1351 #[inline(always)]
1352 pub fn ostde(
1353 self,
1354 ) -> crate::common::RegisterField<
1355 7,
1356 0x1,
1357 1,
1358 0,
1359 ostdcr::Ostde,
1360 ostdcr::Ostde,
1361 Ostdcr_SPEC,
1362 crate::common::RW,
1363 > {
1364 crate::common::RegisterField::<
1365 7,
1366 0x1,
1367 1,
1368 0,
1369 ostdcr::Ostde,
1370 ostdcr::Ostde,
1371 Ostdcr_SPEC,
1372 crate::common::RW,
1373 >::from_register(self, 0)
1374 }
1375
1376 #[doc = "These bits are read as 000000. The write value should be 000000."]
1377 #[inline(always)]
1378 pub fn reserved(
1379 self,
1380 ) -> crate::common::RegisterField<1, 0x3f, 1, 0, u8, u8, Ostdcr_SPEC, crate::common::RW> {
1381 crate::common::RegisterField::<1,0x3f,1,0,u8,u8,Ostdcr_SPEC,crate::common::RW>::from_register(self,0)
1382 }
1383
1384 #[doc = "Oscillation Stop Detection Interrupt Enable"]
1385 #[inline(always)]
1386 pub fn ostdie(
1387 self,
1388 ) -> crate::common::RegisterField<
1389 0,
1390 0x1,
1391 1,
1392 0,
1393 ostdcr::Ostdie,
1394 ostdcr::Ostdie,
1395 Ostdcr_SPEC,
1396 crate::common::RW,
1397 > {
1398 crate::common::RegisterField::<
1399 0,
1400 0x1,
1401 1,
1402 0,
1403 ostdcr::Ostdie,
1404 ostdcr::Ostdie,
1405 Ostdcr_SPEC,
1406 crate::common::RW,
1407 >::from_register(self, 0)
1408 }
1409}
1410impl ::core::default::Default for Ostdcr {
1411 #[inline(always)]
1412 fn default() -> Ostdcr {
1413 <crate::RegValueT<Ostdcr_SPEC> as RegisterValue<_>>::new(0)
1414 }
1415}
1416pub mod ostdcr {
1417
1418 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1419 pub struct Ostde_SPEC;
1420 pub type Ostde = crate::EnumBitfieldStruct<u8, Ostde_SPEC>;
1421 impl Ostde {
1422 #[doc = "Oscillation stop detection function is disabled."]
1423 pub const _0: Self = Self::new(0);
1424
1425 #[doc = "Oscillation stop detection function is enabled."]
1426 pub const _1: Self = Self::new(1);
1427 }
1428 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1429 pub struct Ostdie_SPEC;
1430 pub type Ostdie = crate::EnumBitfieldStruct<u8, Ostdie_SPEC>;
1431 impl Ostdie {
1432 #[doc = "The oscillation stop detection interrupt is disabled. Oscillation stop detection is not notified to the POEG."]
1433 pub const _0: Self = Self::new(0);
1434
1435 #[doc = "The oscillation stop detection interrupt is enabled. Oscillation stop detection is notified to the POEG."]
1436 pub const _1: Self = Self::new(1);
1437 }
1438}
1439#[doc(hidden)]
1440#[derive(Copy, Clone, Eq, PartialEq)]
1441pub struct Ostdsr_SPEC;
1442impl crate::sealed::RegSpec for Ostdsr_SPEC {
1443 type DataType = u8;
1444}
1445
1446#[doc = "Oscillation Stop Detection Status Register"]
1447pub type Ostdsr = crate::RegValueT<Ostdsr_SPEC>;
1448
1449impl Ostdsr {
1450 #[doc = "These bits are read as 0000000. The write value should be 0000000."]
1451 #[inline(always)]
1452 pub fn reserved(
1453 self,
1454 ) -> crate::common::RegisterField<1, 0x7f, 1, 0, u8, u8, Ostdsr_SPEC, crate::common::RW> {
1455 crate::common::RegisterField::<1,0x7f,1,0,u8,u8,Ostdsr_SPEC,crate::common::RW>::from_register(self,0)
1456 }
1457
1458 #[doc = "Oscillation Stop Detection Flag"]
1459 #[inline(always)]
1460 pub fn ostdf(
1461 self,
1462 ) -> crate::common::RegisterField<
1463 0,
1464 0x1,
1465 1,
1466 0,
1467 ostdsr::Ostdf,
1468 ostdsr::Ostdf,
1469 Ostdsr_SPEC,
1470 crate::common::RW,
1471 > {
1472 crate::common::RegisterField::<
1473 0,
1474 0x1,
1475 1,
1476 0,
1477 ostdsr::Ostdf,
1478 ostdsr::Ostdf,
1479 Ostdsr_SPEC,
1480 crate::common::RW,
1481 >::from_register(self, 0)
1482 }
1483}
1484impl ::core::default::Default for Ostdsr {
1485 #[inline(always)]
1486 fn default() -> Ostdsr {
1487 <crate::RegValueT<Ostdsr_SPEC> as RegisterValue<_>>::new(0)
1488 }
1489}
1490pub mod ostdsr {
1491
1492 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1493 pub struct Ostdf_SPEC;
1494 pub type Ostdf = crate::EnumBitfieldStruct<u8, Ostdf_SPEC>;
1495 impl Ostdf {
1496 #[doc = "The main clock oscillation stop has not been detected."]
1497 pub const _0: Self = Self::new(0);
1498
1499 #[doc = "The main clock oscillation stop has been detected."]
1500 pub const _1: Self = Self::new(1);
1501 }
1502}
1503#[doc(hidden)]
1504#[derive(Copy, Clone, Eq, PartialEq)]
1505pub struct Mocoutcr_SPEC;
1506impl crate::sealed::RegSpec for Mocoutcr_SPEC {
1507 type DataType = u8;
1508}
1509
1510#[doc = "MOCO User Trimming Control Register"]
1511pub type Mocoutcr = crate::RegValueT<Mocoutcr_SPEC>;
1512
1513impl Mocoutcr {
1514 #[doc = "MOCO User Trimming 1000_0000 : -128 1000_0001 : -127 1000_0010 : -126 . . . 1111_1111 : -1 0000_0000 : Center Code 0000_0001 : +1 . . . 0111_1101 : +125 0111_1110 : +126 0111_1111 : +127These bits are added to original MOCO trimming bits"]
1515 #[inline(always)]
1516 pub fn mocoutrm(
1517 self,
1518 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Mocoutcr_SPEC, crate::common::RW> {
1519 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Mocoutcr_SPEC,crate::common::RW>::from_register(self,0)
1520 }
1521}
1522impl ::core::default::Default for Mocoutcr {
1523 #[inline(always)]
1524 fn default() -> Mocoutcr {
1525 <crate::RegValueT<Mocoutcr_SPEC> as RegisterValue<_>>::new(0)
1526 }
1527}
1528
1529#[doc(hidden)]
1530#[derive(Copy, Clone, Eq, PartialEq)]
1531pub struct Hocoutcr_SPEC;
1532impl crate::sealed::RegSpec for Hocoutcr_SPEC {
1533 type DataType = u8;
1534}
1535
1536#[doc = "HOCO User Trimming Control Register"]
1537pub type Hocoutcr = crate::RegValueT<Hocoutcr_SPEC>;
1538
1539impl Hocoutcr {
1540 #[doc = "HOCO User Trimming 1000_0000 : -128 1000_0001 : -127 1000_0010 : -126 . . . 1111_1111 : -1 0000_0000 : Center Code 0000_0001 : +1 . . . 0111_1101 : +125 0111_1110 : +126 0111_1111 : +127These bits are added to original HOCO trimming bits"]
1541 #[inline(always)]
1542 pub fn hocoutrm(
1543 self,
1544 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Hocoutcr_SPEC, crate::common::RW> {
1545 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Hocoutcr_SPEC,crate::common::RW>::from_register(self,0)
1546 }
1547}
1548impl ::core::default::Default for Hocoutcr {
1549 #[inline(always)]
1550 fn default() -> Hocoutcr {
1551 <crate::RegValueT<Hocoutcr_SPEC> as RegisterValue<_>>::new(0)
1552 }
1553}
1554
1555#[doc(hidden)]
1556#[derive(Copy, Clone, Eq, PartialEq)]
1557pub struct Sdadcckcr_SPEC;
1558impl crate::sealed::RegSpec for Sdadcckcr_SPEC {
1559 type DataType = u8;
1560}
1561
1562#[doc = "24-bit Sigma-Delta A/D Converter Clock Control Register"]
1563pub type Sdadcckcr = crate::RegValueT<Sdadcckcr_SPEC>;
1564
1565impl Sdadcckcr {
1566 #[doc = "24-bit Sigma-Delta A/D Converter Clock Select"]
1567 #[inline(always)]
1568 pub fn sdadccken(
1569 self,
1570 ) -> crate::common::RegisterField<
1571 7,
1572 0x1,
1573 1,
1574 0,
1575 sdadcckcr::Sdadccken,
1576 sdadcckcr::Sdadccken,
1577 Sdadcckcr_SPEC,
1578 crate::common::RW,
1579 > {
1580 crate::common::RegisterField::<
1581 7,
1582 0x1,
1583 1,
1584 0,
1585 sdadcckcr::Sdadccken,
1586 sdadcckcr::Sdadccken,
1587 Sdadcckcr_SPEC,
1588 crate::common::RW,
1589 >::from_register(self, 0)
1590 }
1591
1592 #[doc = "These bits are read as 000000. The write value should be 000000."]
1593 #[inline(always)]
1594 pub fn reserved(
1595 self,
1596 ) -> crate::common::RegisterField<1, 0x3f, 1, 0, u8, u8, Sdadcckcr_SPEC, crate::common::RW>
1597 {
1598 crate::common::RegisterField::<1,0x3f,1,0,u8,u8,Sdadcckcr_SPEC,crate::common::RW>::from_register(self,0)
1599 }
1600
1601 #[doc = "24-bit Sigma-Delta A/D Converter Clock Enable"]
1602 #[inline(always)]
1603 pub fn sdadccksel(
1604 self,
1605 ) -> crate::common::RegisterField<
1606 0,
1607 0x1,
1608 1,
1609 0,
1610 sdadcckcr::Sdadccksel,
1611 sdadcckcr::Sdadccksel,
1612 Sdadcckcr_SPEC,
1613 crate::common::RW,
1614 > {
1615 crate::common::RegisterField::<
1616 0,
1617 0x1,
1618 1,
1619 0,
1620 sdadcckcr::Sdadccksel,
1621 sdadcckcr::Sdadccksel,
1622 Sdadcckcr_SPEC,
1623 crate::common::RW,
1624 >::from_register(self, 0)
1625 }
1626}
1627impl ::core::default::Default for Sdadcckcr {
1628 #[inline(always)]
1629 fn default() -> Sdadcckcr {
1630 <crate::RegValueT<Sdadcckcr_SPEC> as RegisterValue<_>>::new(0)
1631 }
1632}
1633pub mod sdadcckcr {
1634
1635 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1636 pub struct Sdadccken_SPEC;
1637 pub type Sdadccken = crate::EnumBitfieldStruct<u8, Sdadccken_SPEC>;
1638 impl Sdadccken {
1639 #[doc = "MOSC is chosen by a source clock of 24-bit Sigma-Delta A/D Converter Clock"]
1640 pub const _0: Self = Self::new(0);
1641
1642 #[doc = "HOCO is chosen by a source clock of 24-bit Sigma-Delta A/D Converter Clock"]
1643 pub const _1: Self = Self::new(1);
1644 }
1645 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1646 pub struct Sdadccksel_SPEC;
1647 pub type Sdadccksel = crate::EnumBitfieldStruct<u8, Sdadccksel_SPEC>;
1648 impl Sdadccksel {
1649 #[doc = "24-bit Sigma-Delta A/D Converter Clock is disabled"]
1650 pub const _0: Self = Self::new(0);
1651
1652 #[doc = "24-bit Sigma-Delta A/D Converter Clock is enabled"]
1653 pub const _1: Self = Self::new(1);
1654 }
1655}
1656#[doc(hidden)]
1657#[derive(Copy, Clone, Eq, PartialEq)]
1658pub struct Momcr_SPEC;
1659impl crate::sealed::RegSpec for Momcr_SPEC {
1660 type DataType = u8;
1661}
1662
1663#[doc = "Main Clock Oscillator Mode Oscillation Control Register"]
1664pub type Momcr = crate::RegValueT<Momcr_SPEC>;
1665
1666impl Momcr {
1667 #[doc = "Main Clock Oscillator Switching"]
1668 #[inline(always)]
1669 pub fn mosel(
1670 self,
1671 ) -> crate::common::RegisterField<
1672 6,
1673 0x1,
1674 1,
1675 0,
1676 momcr::Mosel,
1677 momcr::Mosel,
1678 Momcr_SPEC,
1679 crate::common::RW,
1680 > {
1681 crate::common::RegisterField::<
1682 6,
1683 0x1,
1684 1,
1685 0,
1686 momcr::Mosel,
1687 momcr::Mosel,
1688 Momcr_SPEC,
1689 crate::common::RW,
1690 >::from_register(self, 0)
1691 }
1692
1693 #[doc = "Main Clock Oscillator Drive Capability 1 Switching"]
1694 #[inline(always)]
1695 pub fn modrv1(
1696 self,
1697 ) -> crate::common::RegisterField<
1698 3,
1699 0x1,
1700 1,
1701 0,
1702 momcr::Modrv1,
1703 momcr::Modrv1,
1704 Momcr_SPEC,
1705 crate::common::RW,
1706 > {
1707 crate::common::RegisterField::<
1708 3,
1709 0x1,
1710 1,
1711 0,
1712 momcr::Modrv1,
1713 momcr::Modrv1,
1714 Momcr_SPEC,
1715 crate::common::RW,
1716 >::from_register(self, 0)
1717 }
1718
1719 #[doc = "These bits are read as 000. The write value should be 000."]
1720 #[inline(always)]
1721 pub fn reserved(
1722 self,
1723 ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, Momcr_SPEC, crate::common::RW> {
1724 crate::common::RegisterField::<0,0x7,1,0,u8,u8,Momcr_SPEC,crate::common::RW>::from_register(self,0)
1725 }
1726}
1727impl ::core::default::Default for Momcr {
1728 #[inline(always)]
1729 fn default() -> Momcr {
1730 <crate::RegValueT<Momcr_SPEC> as RegisterValue<_>>::new(0)
1731 }
1732}
1733pub mod momcr {
1734
1735 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1736 pub struct Mosel_SPEC;
1737 pub type Mosel = crate::EnumBitfieldStruct<u8, Mosel_SPEC>;
1738 impl Mosel {
1739 #[doc = "Resonator"]
1740 pub const _0: Self = Self::new(0);
1741
1742 #[doc = "External clock input"]
1743 pub const _1: Self = Self::new(1);
1744 }
1745 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1746 pub struct Modrv1_SPEC;
1747 pub type Modrv1 = crate::EnumBitfieldStruct<u8, Modrv1_SPEC>;
1748 impl Modrv1 {
1749 #[doc = "10 MHz to 20 MHz"]
1750 pub const _0: Self = Self::new(0);
1751
1752 #[doc = "1 MHz to 10 MHz"]
1753 pub const _1: Self = Self::new(1);
1754 }
1755}
1756#[doc(hidden)]
1757#[derive(Copy, Clone, Eq, PartialEq)]
1758pub struct Sosccr_SPEC;
1759impl crate::sealed::RegSpec for Sosccr_SPEC {
1760 type DataType = u8;
1761}
1762
1763#[doc = "Sub-clock Oscillator Control Register"]
1764pub type Sosccr = crate::RegValueT<Sosccr_SPEC>;
1765
1766impl Sosccr {
1767 #[doc = "These bits are read as 0000000. The write value should be 0000000."]
1768 #[inline(always)]
1769 pub fn reserved(
1770 self,
1771 ) -> crate::common::RegisterField<1, 0x7f, 1, 0, u8, u8, Sosccr_SPEC, crate::common::RW> {
1772 crate::common::RegisterField::<1,0x7f,1,0,u8,u8,Sosccr_SPEC,crate::common::RW>::from_register(self,0)
1773 }
1774
1775 #[doc = "Sub-Clock Oscillator Stop"]
1776 #[inline(always)]
1777 pub fn sostp(
1778 self,
1779 ) -> crate::common::RegisterField<
1780 0,
1781 0x1,
1782 1,
1783 0,
1784 sosccr::Sostp,
1785 sosccr::Sostp,
1786 Sosccr_SPEC,
1787 crate::common::RW,
1788 > {
1789 crate::common::RegisterField::<
1790 0,
1791 0x1,
1792 1,
1793 0,
1794 sosccr::Sostp,
1795 sosccr::Sostp,
1796 Sosccr_SPEC,
1797 crate::common::RW,
1798 >::from_register(self, 0)
1799 }
1800}
1801impl ::core::default::Default for Sosccr {
1802 #[inline(always)]
1803 fn default() -> Sosccr {
1804 <crate::RegValueT<Sosccr_SPEC> as RegisterValue<_>>::new(1)
1805 }
1806}
1807pub mod sosccr {
1808
1809 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1810 pub struct Sostp_SPEC;
1811 pub type Sostp = crate::EnumBitfieldStruct<u8, Sostp_SPEC>;
1812 impl Sostp {
1813 #[doc = "Sub-clock oscillator is operating."]
1814 pub const _0: Self = Self::new(0);
1815
1816 #[doc = "Sub-clock oscillator is stopped."]
1817 pub const _1: Self = Self::new(1);
1818 }
1819}
1820#[doc(hidden)]
1821#[derive(Copy, Clone, Eq, PartialEq)]
1822pub struct Somcr_SPEC;
1823impl crate::sealed::RegSpec for Somcr_SPEC {
1824 type DataType = u8;
1825}
1826
1827#[doc = "Sub-clock Oscillator Mode Control Register"]
1828pub type Somcr = crate::RegValueT<Somcr_SPEC>;
1829
1830impl Somcr {
1831 #[doc = "These bits are read as 000000. The write value should be 000000."]
1832 #[inline(always)]
1833 pub fn reserved(
1834 self,
1835 ) -> crate::common::RegisterField<2, 0x3f, 1, 0, u8, u8, Somcr_SPEC, crate::common::RW> {
1836 crate::common::RegisterField::<2,0x3f,1,0,u8,u8,Somcr_SPEC,crate::common::RW>::from_register(self,0)
1837 }
1838
1839 #[doc = "Sub Clock Oscillator Drive Capability Switching"]
1840 #[inline(always)]
1841 pub fn sodrv(
1842 self,
1843 ) -> crate::common::RegisterField<
1844 0,
1845 0x3,
1846 1,
1847 0,
1848 somcr::Sodrv,
1849 somcr::Sodrv,
1850 Somcr_SPEC,
1851 crate::common::RW,
1852 > {
1853 crate::common::RegisterField::<
1854 0,
1855 0x3,
1856 1,
1857 0,
1858 somcr::Sodrv,
1859 somcr::Sodrv,
1860 Somcr_SPEC,
1861 crate::common::RW,
1862 >::from_register(self, 0)
1863 }
1864}
1865impl ::core::default::Default for Somcr {
1866 #[inline(always)]
1867 fn default() -> Somcr {
1868 <crate::RegValueT<Somcr_SPEC> as RegisterValue<_>>::new(0)
1869 }
1870}
1871pub mod somcr {
1872
1873 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1874 pub struct Sodrv_SPEC;
1875 pub type Sodrv = crate::EnumBitfieldStruct<u8, Sodrv_SPEC>;
1876 impl Sodrv {
1877 #[doc = "Normal Mode"]
1878 pub const _00: Self = Self::new(0);
1879
1880 #[doc = "Low power mode 1"]
1881 pub const _01: Self = Self::new(1);
1882
1883 #[doc = "Low power mode 2"]
1884 pub const _10: Self = Self::new(2);
1885
1886 #[doc = "Low power mode 3"]
1887 pub const _11: Self = Self::new(3);
1888 }
1889}
1890#[doc(hidden)]
1891#[derive(Copy, Clone, Eq, PartialEq)]
1892pub struct Lococr_SPEC;
1893impl crate::sealed::RegSpec for Lococr_SPEC {
1894 type DataType = u8;
1895}
1896
1897#[doc = "Low-Speed On-Chip Oscillator Control Register"]
1898pub type Lococr = crate::RegValueT<Lococr_SPEC>;
1899
1900impl Lococr {
1901 #[doc = "These bits are read as 0000000. The write value should be 0000000."]
1902 #[inline(always)]
1903 pub fn reserved(
1904 self,
1905 ) -> crate::common::RegisterField<1, 0x7f, 1, 0, u8, u8, Lococr_SPEC, crate::common::RW> {
1906 crate::common::RegisterField::<1,0x7f,1,0,u8,u8,Lococr_SPEC,crate::common::RW>::from_register(self,0)
1907 }
1908
1909 #[doc = "LOCO Stop"]
1910 #[inline(always)]
1911 pub fn lcstp(
1912 self,
1913 ) -> crate::common::RegisterField<
1914 0,
1915 0x1,
1916 1,
1917 0,
1918 lococr::Lcstp,
1919 lococr::Lcstp,
1920 Lococr_SPEC,
1921 crate::common::RW,
1922 > {
1923 crate::common::RegisterField::<
1924 0,
1925 0x1,
1926 1,
1927 0,
1928 lococr::Lcstp,
1929 lococr::Lcstp,
1930 Lococr_SPEC,
1931 crate::common::RW,
1932 >::from_register(self, 0)
1933 }
1934}
1935impl ::core::default::Default for Lococr {
1936 #[inline(always)]
1937 fn default() -> Lococr {
1938 <crate::RegValueT<Lococr_SPEC> as RegisterValue<_>>::new(0)
1939 }
1940}
1941pub mod lococr {
1942
1943 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1944 pub struct Lcstp_SPEC;
1945 pub type Lcstp = crate::EnumBitfieldStruct<u8, Lcstp_SPEC>;
1946 impl Lcstp {
1947 #[doc = "LOCO is operating."]
1948 pub const _0: Self = Self::new(0);
1949
1950 #[doc = "LOCO is stopped."]
1951 pub const _1: Self = Self::new(1);
1952 }
1953}
1954#[doc(hidden)]
1955#[derive(Copy, Clone, Eq, PartialEq)]
1956pub struct Locoutcr_SPEC;
1957impl crate::sealed::RegSpec for Locoutcr_SPEC {
1958 type DataType = u8;
1959}
1960
1961#[doc = "LOCO User Trimming Control Register"]
1962pub type Locoutcr = crate::RegValueT<Locoutcr_SPEC>;
1963
1964impl Locoutcr {
1965 #[doc = "LOCO User Trimming 1000_0000 : -128 1000_0001 : -127 1000_0010 : -126 . . . 1111_1111 : -1 0000_0000 : Center Code 0000_0001 : +1 . . . 0111_1101 : +125 0111_1110 : +126 0111_1111 : +127These bits are added to original LOCO trimming bits"]
1966 #[inline(always)]
1967 pub fn locoutrm(
1968 self,
1969 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Locoutcr_SPEC, crate::common::RW> {
1970 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Locoutcr_SPEC,crate::common::RW>::from_register(self,0)
1971 }
1972}
1973impl ::core::default::Default for Locoutcr {
1974 #[inline(always)]
1975 fn default() -> Locoutcr {
1976 <crate::RegValueT<Locoutcr_SPEC> as RegisterValue<_>>::new(0)
1977 }
1978}
1979
1980#[doc(hidden)]
1981#[derive(Copy, Clone, Eq, PartialEq)]
1982pub struct Moscwtcr_SPEC;
1983impl crate::sealed::RegSpec for Moscwtcr_SPEC {
1984 type DataType = u8;
1985}
1986
1987#[doc = "Main Clock Oscillator Wait Control Register"]
1988pub type Moscwtcr = crate::RegValueT<Moscwtcr_SPEC>;
1989
1990impl Moscwtcr {
1991 #[doc = "These bits are read as 0000. The write value should be 0000."]
1992 #[inline(always)]
1993 pub fn reserved(
1994 self,
1995 ) -> crate::common::RegisterField<4, 0xf, 1, 0, u8, u8, Moscwtcr_SPEC, crate::common::RW> {
1996 crate::common::RegisterField::<4,0xf,1,0,u8,u8,Moscwtcr_SPEC,crate::common::RW>::from_register(self,0)
1997 }
1998
1999 #[doc = "Main clock oscillator wait time setting"]
2000 #[inline(always)]
2001 pub fn msts(
2002 self,
2003 ) -> crate::common::RegisterField<
2004 0,
2005 0xf,
2006 1,
2007 0,
2008 moscwtcr::Msts,
2009 moscwtcr::Msts,
2010 Moscwtcr_SPEC,
2011 crate::common::RW,
2012 > {
2013 crate::common::RegisterField::<
2014 0,
2015 0xf,
2016 1,
2017 0,
2018 moscwtcr::Msts,
2019 moscwtcr::Msts,
2020 Moscwtcr_SPEC,
2021 crate::common::RW,
2022 >::from_register(self, 0)
2023 }
2024}
2025impl ::core::default::Default for Moscwtcr {
2026 #[inline(always)]
2027 fn default() -> Moscwtcr {
2028 <crate::RegValueT<Moscwtcr_SPEC> as RegisterValue<_>>::new(5)
2029 }
2030}
2031pub mod moscwtcr {
2032
2033 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2034 pub struct Msts_SPEC;
2035 pub type Msts = crate::EnumBitfieldStruct<u8, Msts_SPEC>;
2036 impl Msts {
2037 #[doc = "Wait time= 3 cycles (11.4us : calculated at LOCO=262.144KHz (3.81us TYP.))"]
2038 pub const _0000: Self = Self::new(0);
2039
2040 #[doc = "Wait time= 35 cycles (133.5us : calculated at LOCO=262.144KHz (3.81us TYP.))"]
2041 pub const _0001: Self = Self::new(1);
2042
2043 #[doc = "Wait time= 67 cycles (255.6us: calculated at LOCO=262.144KHz (3.81us TYP.))"]
2044 pub const _0010: Self = Self::new(2);
2045
2046 #[doc = "Wait time= 131 cycles (499.7us: calculated at LOCO=262.144KHz (3.81us TYP.))"]
2047 pub const _0011: Self = Self::new(3);
2048
2049 #[doc = "Wait time= 259 cycles (988.0us: calculated at LOCO=262.144KHz (3.81us TYP.))"]
2050 pub const _0100: Self = Self::new(4);
2051
2052 #[doc = "Wait time= 547 cycles (2086.6us: calculated at LOCO=262.144KHz (3.81us TYP.))"]
2053 pub const _0101: Self = Self::new(5);
2054
2055 #[doc = "Wait time= 1059 cycles (4039.8us: calculated at LOCO=262.144KHz (3.81us TYP.))"]
2056 pub const _0110: Self = Self::new(6);
2057
2058 #[doc = "Wait time= 2147 cycles (8190.2us: calculated at LOCO=262.144KHz (3.81us TYP.))"]
2059 pub const _0111: Self = Self::new(7);
2060
2061 #[doc = "Wait time= 4291 cycles (16368.9us: calculated at LOCO=262.144KHz (3.81us TYP.))"]
2062 pub const _1000: Self = Self::new(8);
2063
2064 #[doc = "Wait time= 8163 cycles (31139.4us: calculated at LOCO=262.144KHz (3.81us TYP.))"]
2065 pub const _1001: Self = Self::new(9);
2066 }
2067}
2068#[doc(hidden)]
2069#[derive(Copy, Clone, Eq, PartialEq)]
2070pub struct Hocowtcr_SPEC;
2071impl crate::sealed::RegSpec for Hocowtcr_SPEC {
2072 type DataType = u8;
2073}
2074
2075#[doc = "High-Speed On-Chip Oscillator Wait Control Register"]
2076pub type Hocowtcr = crate::RegValueT<Hocowtcr_SPEC>;
2077
2078impl Hocowtcr {
2079 #[doc = "These bits are read as 00000. The write value should be 00000."]
2080 #[inline(always)]
2081 pub fn reserved(
2082 self,
2083 ) -> crate::common::RegisterField<3, 0x1f, 1, 0, u8, u8, Hocowtcr_SPEC, crate::common::RW> {
2084 crate::common::RegisterField::<3,0x1f,1,0,u8,u8,Hocowtcr_SPEC,crate::common::RW>::from_register(self,0)
2085 }
2086
2087 #[doc = "HOCO wait time setting"]
2088 #[inline(always)]
2089 pub fn hsts(
2090 self,
2091 ) -> crate::common::RegisterField<
2092 0,
2093 0x7,
2094 1,
2095 0,
2096 hocowtcr::Hsts,
2097 hocowtcr::Hsts,
2098 Hocowtcr_SPEC,
2099 crate::common::RW,
2100 > {
2101 crate::common::RegisterField::<
2102 0,
2103 0x7,
2104 1,
2105 0,
2106 hocowtcr::Hsts,
2107 hocowtcr::Hsts,
2108 Hocowtcr_SPEC,
2109 crate::common::RW,
2110 >::from_register(self, 0)
2111 }
2112}
2113impl ::core::default::Default for Hocowtcr {
2114 #[inline(always)]
2115 fn default() -> Hocowtcr {
2116 <crate::RegValueT<Hocowtcr_SPEC> as RegisterValue<_>>::new(5)
2117 }
2118}
2119pub mod hocowtcr {
2120
2121 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2122 pub struct Hsts_SPEC;
2123 pub type Hsts = crate::EnumBitfieldStruct<u8, Hsts_SPEC>;
2124 impl Hsts {
2125 #[doc = "If HOCO frequency is other than 64MHz, should set the value to 101b."]
2126 pub const _101: Self = Self::new(5);
2127
2128 #[doc = "If HOCO frequency = 64MHz, should set the value to 110b."]
2129 pub const _110: Self = Self::new(6);
2130 }
2131}
2132#[doc(hidden)]
2133#[derive(Copy, Clone, Eq, PartialEq)]
2134pub struct Sbycr_SPEC;
2135impl crate::sealed::RegSpec for Sbycr_SPEC {
2136 type DataType = u16;
2137}
2138
2139#[doc = "Standby Control Register"]
2140pub type Sbycr = crate::RegValueT<Sbycr_SPEC>;
2141
2142impl Sbycr {
2143 #[doc = "Software Standby"]
2144 #[inline(always)]
2145 pub fn ssby(
2146 self,
2147 ) -> crate::common::RegisterField<
2148 15,
2149 0x1,
2150 1,
2151 0,
2152 sbycr::Ssby,
2153 sbycr::Ssby,
2154 Sbycr_SPEC,
2155 crate::common::RW,
2156 > {
2157 crate::common::RegisterField::<
2158 15,
2159 0x1,
2160 1,
2161 0,
2162 sbycr::Ssby,
2163 sbycr::Ssby,
2164 Sbycr_SPEC,
2165 crate::common::RW,
2166 >::from_register(self, 0)
2167 }
2168
2169 #[doc = "These bits are read as 000000000000000. The write value should be 000000000000000."]
2170 #[inline(always)]
2171 pub fn reserved(
2172 self,
2173 ) -> crate::common::RegisterField<0, 0x7fff, 1, 0, u16, u16, Sbycr_SPEC, crate::common::RW>
2174 {
2175 crate::common::RegisterField::<0,0x7fff,1,0,u16,u16,Sbycr_SPEC,crate::common::RW>::from_register(self,0)
2176 }
2177}
2178impl ::core::default::Default for Sbycr {
2179 #[inline(always)]
2180 fn default() -> Sbycr {
2181 <crate::RegValueT<Sbycr_SPEC> as RegisterValue<_>>::new(0)
2182 }
2183}
2184pub mod sbycr {
2185
2186 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2187 pub struct Ssby_SPEC;
2188 pub type Ssby = crate::EnumBitfieldStruct<u8, Ssby_SPEC>;
2189 impl Ssby {
2190 #[doc = "Sleep Mode"]
2191 pub const _0: Self = Self::new(0);
2192
2193 #[doc = "Software Standby Mode"]
2194 pub const _1: Self = Self::new(1);
2195 }
2196}
2197#[doc(hidden)]
2198#[derive(Copy, Clone, Eq, PartialEq)]
2199pub struct Mstpcra_SPEC;
2200impl crate::sealed::RegSpec for Mstpcra_SPEC {
2201 type DataType = u32;
2202}
2203
2204#[doc = "Module Stop Control Register A"]
2205pub type Mstpcra = crate::RegValueT<Mstpcra_SPEC>;
2206
2207impl Mstpcra {
2208 #[doc = "Data Transfer Controller Module Stop"]
2209 #[inline(always)]
2210 pub fn mstpa22(
2211 self,
2212 ) -> crate::common::RegisterField<
2213 22,
2214 0x1,
2215 1,
2216 0,
2217 mstpcra::Mstpa22,
2218 mstpcra::Mstpa22,
2219 Mstpcra_SPEC,
2220 crate::common::RW,
2221 > {
2222 crate::common::RegisterField::<
2223 22,
2224 0x1,
2225 1,
2226 0,
2227 mstpcra::Mstpa22,
2228 mstpcra::Mstpa22,
2229 Mstpcra_SPEC,
2230 crate::common::RW,
2231 >::from_register(self, 0)
2232 }
2233
2234 #[doc = "These bits are read as 1111111111111111111111. The write value should be 1111111111111111111111."]
2235 #[inline(always)]
2236 pub fn reserved(
2237 self,
2238 ) -> crate::common::RegisterField<0, 0x3fffff, 1, 0, u32, u32, Mstpcra_SPEC, crate::common::RW>
2239 {
2240 crate::common::RegisterField::<0,0x3fffff,1,0,u32,u32,Mstpcra_SPEC,crate::common::RW>::from_register(self,0)
2241 }
2242}
2243impl ::core::default::Default for Mstpcra {
2244 #[inline(always)]
2245 fn default() -> Mstpcra {
2246 <crate::RegValueT<Mstpcra_SPEC> as RegisterValue<_>>::new(4290772991)
2247 }
2248}
2249pub mod mstpcra {
2250
2251 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2252 pub struct Mstpa22_SPEC;
2253 pub type Mstpa22 = crate::EnumBitfieldStruct<u8, Mstpa22_SPEC>;
2254 impl Mstpa22 {
2255 #[doc = "Cancel the module-stop state"]
2256 pub const _0: Self = Self::new(0);
2257
2258 #[doc = "Enter the module-stop state"]
2259 pub const _1: Self = Self::new(1);
2260 }
2261}
2262#[doc(hidden)]
2263#[derive(Copy, Clone, Eq, PartialEq)]
2264pub struct Snzcr_SPEC;
2265impl crate::sealed::RegSpec for Snzcr_SPEC {
2266 type DataType = u8;
2267}
2268
2269#[doc = "Snooze Control Register"]
2270pub type Snzcr = crate::RegValueT<Snzcr_SPEC>;
2271
2272impl Snzcr {
2273 #[doc = "Snooze Mode Enable"]
2274 #[inline(always)]
2275 pub fn snze(
2276 self,
2277 ) -> crate::common::RegisterField<
2278 7,
2279 0x1,
2280 1,
2281 0,
2282 snzcr::Snze,
2283 snzcr::Snze,
2284 Snzcr_SPEC,
2285 crate::common::RW,
2286 > {
2287 crate::common::RegisterField::<
2288 7,
2289 0x1,
2290 1,
2291 0,
2292 snzcr::Snze,
2293 snzcr::Snze,
2294 Snzcr_SPEC,
2295 crate::common::RW,
2296 >::from_register(self, 0)
2297 }
2298
2299 #[doc = "These bits are read as 00000. The write value should be 00000."]
2300 #[inline(always)]
2301 pub fn reserved(
2302 self,
2303 ) -> crate::common::RegisterField<2, 0x1f, 1, 0, u8, u8, Snzcr_SPEC, crate::common::RW> {
2304 crate::common::RegisterField::<2,0x1f,1,0,u8,u8,Snzcr_SPEC,crate::common::RW>::from_register(self,0)
2305 }
2306
2307 #[doc = "DTC Enable in Snooze Mode"]
2308 #[inline(always)]
2309 pub fn snzdtcen(
2310 self,
2311 ) -> crate::common::RegisterField<
2312 1,
2313 0x1,
2314 1,
2315 0,
2316 snzcr::Snzdtcen,
2317 snzcr::Snzdtcen,
2318 Snzcr_SPEC,
2319 crate::common::RW,
2320 > {
2321 crate::common::RegisterField::<
2322 1,
2323 0x1,
2324 1,
2325 0,
2326 snzcr::Snzdtcen,
2327 snzcr::Snzdtcen,
2328 Snzcr_SPEC,
2329 crate::common::RW,
2330 >::from_register(self, 0)
2331 }
2332
2333 #[doc = "RXD0 Snooze Request Enable NOTE: Do not set to 1 other than in asynchronous mode."]
2334 #[inline(always)]
2335 pub fn rxdreqen(
2336 self,
2337 ) -> crate::common::RegisterField<
2338 0,
2339 0x1,
2340 1,
2341 0,
2342 snzcr::Rxdreqen,
2343 snzcr::Rxdreqen,
2344 Snzcr_SPEC,
2345 crate::common::RW,
2346 > {
2347 crate::common::RegisterField::<
2348 0,
2349 0x1,
2350 1,
2351 0,
2352 snzcr::Rxdreqen,
2353 snzcr::Rxdreqen,
2354 Snzcr_SPEC,
2355 crate::common::RW,
2356 >::from_register(self, 0)
2357 }
2358}
2359impl ::core::default::Default for Snzcr {
2360 #[inline(always)]
2361 fn default() -> Snzcr {
2362 <crate::RegValueT<Snzcr_SPEC> as RegisterValue<_>>::new(0)
2363 }
2364}
2365pub mod snzcr {
2366
2367 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2368 pub struct Snze_SPEC;
2369 pub type Snze = crate::EnumBitfieldStruct<u8, Snze_SPEC>;
2370 impl Snze {
2371 #[doc = "Disable Snooze Mode"]
2372 pub const _0: Self = Self::new(0);
2373
2374 #[doc = "Enable Snooze Mode"]
2375 pub const _1: Self = Self::new(1);
2376 }
2377 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2378 pub struct Snzdtcen_SPEC;
2379 pub type Snzdtcen = crate::EnumBitfieldStruct<u8, Snzdtcen_SPEC>;
2380 impl Snzdtcen {
2381 #[doc = "Disable DTC operation"]
2382 pub const _0: Self = Self::new(0);
2383
2384 #[doc = "Enable DTC operation"]
2385 pub const _1: Self = Self::new(1);
2386 }
2387 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2388 pub struct Rxdreqen_SPEC;
2389 pub type Rxdreqen = crate::EnumBitfieldStruct<u8, Rxdreqen_SPEC>;
2390 impl Rxdreqen {
2391 #[doc = "Ignore RXD0 falling edge in Standby mode."]
2392 pub const _0: Self = Self::new(0);
2393
2394 #[doc = "Accept RXD0 falling edge in Standby mode as a request to transit to Snooze mode."]
2395 pub const _1: Self = Self::new(1);
2396 }
2397}
2398#[doc(hidden)]
2399#[derive(Copy, Clone, Eq, PartialEq)]
2400pub struct Snzedcr_SPEC;
2401impl crate::sealed::RegSpec for Snzedcr_SPEC {
2402 type DataType = u8;
2403}
2404
2405#[doc = "Snooze End Control Register"]
2406pub type Snzedcr = crate::RegValueT<Snzedcr_SPEC>;
2407
2408impl Snzedcr {
2409 #[doc = "SCI0 address unmatch Snooze End EnableNote: Do not set to 1 other than in asynchronous mode."]
2410 #[inline(always)]
2411 pub fn sci0umted(
2412 self,
2413 ) -> crate::common::RegisterField<
2414 7,
2415 0x1,
2416 1,
2417 0,
2418 snzedcr::Sci0Umted,
2419 snzedcr::Sci0Umted,
2420 Snzedcr_SPEC,
2421 crate::common::RW,
2422 > {
2423 crate::common::RegisterField::<
2424 7,
2425 0x1,
2426 1,
2427 0,
2428 snzedcr::Sci0Umted,
2429 snzedcr::Sci0Umted,
2430 Snzedcr_SPEC,
2431 crate::common::RW,
2432 >::from_register(self, 0)
2433 }
2434
2435 #[doc = "These bits are read as 00. The write value should be 00."]
2436 #[inline(always)]
2437 pub fn reserved(
2438 self,
2439 ) -> crate::common::RegisterField<5, 0x3, 1, 0, u8, u8, Snzedcr_SPEC, crate::common::RW> {
2440 crate::common::RegisterField::<5,0x3,1,0,u8,u8,Snzedcr_SPEC,crate::common::RW>::from_register(self,0)
2441 }
2442
2443 #[doc = "AD compare mismatch 0 Snooze End Enable"]
2444 #[inline(always)]
2445 pub fn ad0umted(
2446 self,
2447 ) -> crate::common::RegisterField<
2448 4,
2449 0x1,
2450 1,
2451 0,
2452 snzedcr::Ad0Umted,
2453 snzedcr::Ad0Umted,
2454 Snzedcr_SPEC,
2455 crate::common::RW,
2456 > {
2457 crate::common::RegisterField::<
2458 4,
2459 0x1,
2460 1,
2461 0,
2462 snzedcr::Ad0Umted,
2463 snzedcr::Ad0Umted,
2464 Snzedcr_SPEC,
2465 crate::common::RW,
2466 >::from_register(self, 0)
2467 }
2468
2469 #[doc = "AD compare match 0 Snooze End Enable"]
2470 #[inline(always)]
2471 pub fn ad0mated(
2472 self,
2473 ) -> crate::common::RegisterField<
2474 3,
2475 0x1,
2476 1,
2477 0,
2478 snzedcr::Ad0Mated,
2479 snzedcr::Ad0Mated,
2480 Snzedcr_SPEC,
2481 crate::common::RW,
2482 > {
2483 crate::common::RegisterField::<
2484 3,
2485 0x1,
2486 1,
2487 0,
2488 snzedcr::Ad0Mated,
2489 snzedcr::Ad0Mated,
2490 Snzedcr_SPEC,
2491 crate::common::RW,
2492 >::from_register(self, 0)
2493 }
2494
2495 #[doc = "Not Last DTC transmission completion Snooze End Enable"]
2496 #[inline(always)]
2497 pub fn dtcnzred(
2498 self,
2499 ) -> crate::common::RegisterField<
2500 2,
2501 0x1,
2502 1,
2503 0,
2504 snzedcr::Dtcnzred,
2505 snzedcr::Dtcnzred,
2506 Snzedcr_SPEC,
2507 crate::common::RW,
2508 > {
2509 crate::common::RegisterField::<
2510 2,
2511 0x1,
2512 1,
2513 0,
2514 snzedcr::Dtcnzred,
2515 snzedcr::Dtcnzred,
2516 Snzedcr_SPEC,
2517 crate::common::RW,
2518 >::from_register(self, 0)
2519 }
2520
2521 #[doc = "Last DTC transmission completion Snooze End Enable"]
2522 #[inline(always)]
2523 pub fn dtczred(
2524 self,
2525 ) -> crate::common::RegisterField<
2526 1,
2527 0x1,
2528 1,
2529 0,
2530 snzedcr::Dtczred,
2531 snzedcr::Dtczred,
2532 Snzedcr_SPEC,
2533 crate::common::RW,
2534 > {
2535 crate::common::RegisterField::<
2536 1,
2537 0x1,
2538 1,
2539 0,
2540 snzedcr::Dtczred,
2541 snzedcr::Dtczred,
2542 Snzedcr_SPEC,
2543 crate::common::RW,
2544 >::from_register(self, 0)
2545 }
2546
2547 #[doc = "AGT1 underflow Snooze End Enable"]
2548 #[inline(always)]
2549 pub fn agtunfed(
2550 self,
2551 ) -> crate::common::RegisterField<
2552 0,
2553 0x1,
2554 1,
2555 0,
2556 snzedcr::Agtunfed,
2557 snzedcr::Agtunfed,
2558 Snzedcr_SPEC,
2559 crate::common::RW,
2560 > {
2561 crate::common::RegisterField::<
2562 0,
2563 0x1,
2564 1,
2565 0,
2566 snzedcr::Agtunfed,
2567 snzedcr::Agtunfed,
2568 Snzedcr_SPEC,
2569 crate::common::RW,
2570 >::from_register(self, 0)
2571 }
2572}
2573impl ::core::default::Default for Snzedcr {
2574 #[inline(always)]
2575 fn default() -> Snzedcr {
2576 <crate::RegValueT<Snzedcr_SPEC> as RegisterValue<_>>::new(0)
2577 }
2578}
2579pub mod snzedcr {
2580
2581 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2582 pub struct Sci0Umted_SPEC;
2583 pub type Sci0Umted = crate::EnumBitfieldStruct<u8, Sci0Umted_SPEC>;
2584 impl Sci0Umted {
2585 #[doc = "Disable the Snooze End request"]
2586 pub const _0: Self = Self::new(0);
2587
2588 #[doc = "Enable the Snooze End request"]
2589 pub const _1: Self = Self::new(1);
2590 }
2591 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2592 pub struct Ad0Umted_SPEC;
2593 pub type Ad0Umted = crate::EnumBitfieldStruct<u8, Ad0Umted_SPEC>;
2594 impl Ad0Umted {
2595 #[doc = "Disable the Snooze End request"]
2596 pub const _0: Self = Self::new(0);
2597
2598 #[doc = "Enable the Snooze End request"]
2599 pub const _1: Self = Self::new(1);
2600 }
2601 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2602 pub struct Ad0Mated_SPEC;
2603 pub type Ad0Mated = crate::EnumBitfieldStruct<u8, Ad0Mated_SPEC>;
2604 impl Ad0Mated {
2605 #[doc = "Disable the Snooze End request"]
2606 pub const _0: Self = Self::new(0);
2607
2608 #[doc = "Enable the Snooze End request"]
2609 pub const _1: Self = Self::new(1);
2610 }
2611 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2612 pub struct Dtcnzred_SPEC;
2613 pub type Dtcnzred = crate::EnumBitfieldStruct<u8, Dtcnzred_SPEC>;
2614 impl Dtcnzred {
2615 #[doc = "Disable the Snooze End request"]
2616 pub const _0: Self = Self::new(0);
2617
2618 #[doc = "Enable the Snooze End request"]
2619 pub const _1: Self = Self::new(1);
2620 }
2621 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2622 pub struct Dtczred_SPEC;
2623 pub type Dtczred = crate::EnumBitfieldStruct<u8, Dtczred_SPEC>;
2624 impl Dtczred {
2625 #[doc = "Disable the Snooze End request"]
2626 pub const _0: Self = Self::new(0);
2627
2628 #[doc = "Enable the Snooze End request"]
2629 pub const _1: Self = Self::new(1);
2630 }
2631 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2632 pub struct Agtunfed_SPEC;
2633 pub type Agtunfed = crate::EnumBitfieldStruct<u8, Agtunfed_SPEC>;
2634 impl Agtunfed {
2635 #[doc = "Disable the Snooze End request"]
2636 pub const _0: Self = Self::new(0);
2637
2638 #[doc = "Enable the Snooze End request"]
2639 pub const _1: Self = Self::new(1);
2640 }
2641}
2642#[doc(hidden)]
2643#[derive(Copy, Clone, Eq, PartialEq)]
2644pub struct Snzreqcr_SPEC;
2645impl crate::sealed::RegSpec for Snzreqcr_SPEC {
2646 type DataType = u32;
2647}
2648
2649#[doc = "Snooze Request Control Register"]
2650pub type Snzreqcr = crate::RegValueT<Snzreqcr_SPEC>;
2651
2652impl Snzreqcr {
2653 #[doc = "Snooze Request Enable 30Enable AGT1 compare match B snooze request"]
2654 #[inline(always)]
2655 pub fn snzreqen30(
2656 self,
2657 ) -> crate::common::RegisterField<
2658 30,
2659 0x1,
2660 1,
2661 0,
2662 snzreqcr::Snzreqen30,
2663 snzreqcr::Snzreqen30,
2664 Snzreqcr_SPEC,
2665 crate::common::RW,
2666 > {
2667 crate::common::RegisterField::<
2668 30,
2669 0x1,
2670 1,
2671 0,
2672 snzreqcr::Snzreqen30,
2673 snzreqcr::Snzreqen30,
2674 Snzreqcr_SPEC,
2675 crate::common::RW,
2676 >::from_register(self, 0)
2677 }
2678
2679 #[doc = "Snooze Request Enable 29Enable AGT1 compare match A snooze request"]
2680 #[inline(always)]
2681 pub fn snzreqen29(
2682 self,
2683 ) -> crate::common::RegisterField<
2684 29,
2685 0x1,
2686 1,
2687 0,
2688 snzreqcr::Snzreqen29,
2689 snzreqcr::Snzreqen29,
2690 Snzreqcr_SPEC,
2691 crate::common::RW,
2692 > {
2693 crate::common::RegisterField::<
2694 29,
2695 0x1,
2696 1,
2697 0,
2698 snzreqcr::Snzreqen29,
2699 snzreqcr::Snzreqen29,
2700 Snzreqcr_SPEC,
2701 crate::common::RW,
2702 >::from_register(self, 0)
2703 }
2704
2705 #[doc = "Snooze Request Enable 28Enable AGT1 underflow snooze request"]
2706 #[inline(always)]
2707 pub fn snzreqen28(
2708 self,
2709 ) -> crate::common::RegisterField<
2710 28,
2711 0x1,
2712 1,
2713 0,
2714 snzreqcr::Snzreqen28,
2715 snzreqcr::Snzreqen28,
2716 Snzreqcr_SPEC,
2717 crate::common::RW,
2718 > {
2719 crate::common::RegisterField::<
2720 28,
2721 0x1,
2722 1,
2723 0,
2724 snzreqcr::Snzreqen28,
2725 snzreqcr::Snzreqen28,
2726 Snzreqcr_SPEC,
2727 crate::common::RW,
2728 >::from_register(self, 0)
2729 }
2730
2731 #[doc = "Snooze Request Enable 25Enable RTC period snooze request"]
2732 #[inline(always)]
2733 pub fn snzreqen25(
2734 self,
2735 ) -> crate::common::RegisterField<
2736 25,
2737 0x1,
2738 1,
2739 0,
2740 snzreqcr::Snzreqen25,
2741 snzreqcr::Snzreqen25,
2742 Snzreqcr_SPEC,
2743 crate::common::RW,
2744 > {
2745 crate::common::RegisterField::<
2746 25,
2747 0x1,
2748 1,
2749 0,
2750 snzreqcr::Snzreqen25,
2751 snzreqcr::Snzreqen25,
2752 Snzreqcr_SPEC,
2753 crate::common::RW,
2754 >::from_register(self, 0)
2755 }
2756
2757 #[doc = "Snooze Request Enable 24Enable RTC alarm snooze request"]
2758 #[inline(always)]
2759 pub fn snzreqen24(
2760 self,
2761 ) -> crate::common::RegisterField<
2762 24,
2763 0x1,
2764 1,
2765 0,
2766 snzreqcr::Snzreqen24,
2767 snzreqcr::Snzreqen24,
2768 Snzreqcr_SPEC,
2769 crate::common::RW,
2770 > {
2771 crate::common::RegisterField::<
2772 24,
2773 0x1,
2774 1,
2775 0,
2776 snzreqcr::Snzreqen24,
2777 snzreqcr::Snzreqen24,
2778 Snzreqcr_SPEC,
2779 crate::common::RW,
2780 >::from_register(self, 0)
2781 }
2782
2783 #[doc = "Snooze Request Enable 24Enable RTC alarm snooze request"]
2784 #[inline(always)]
2785 pub fn snzreqen23(
2786 self,
2787 ) -> crate::common::RegisterField<
2788 23,
2789 0x1,
2790 1,
2791 0,
2792 snzreqcr::Snzreqen23,
2793 snzreqcr::Snzreqen23,
2794 Snzreqcr_SPEC,
2795 crate::common::RW,
2796 > {
2797 crate::common::RegisterField::<
2798 23,
2799 0x1,
2800 1,
2801 0,
2802 snzreqcr::Snzreqen23,
2803 snzreqcr::Snzreqen23,
2804 Snzreqcr_SPEC,
2805 crate::common::RW,
2806 >::from_register(self, 0)
2807 }
2808
2809 #[doc = "Snooze Request Enable 17Enable KINT snooze request"]
2810 #[inline(always)]
2811 pub fn snzreqen17(
2812 self,
2813 ) -> crate::common::RegisterField<
2814 17,
2815 0x1,
2816 1,
2817 0,
2818 snzreqcr::Snzreqen17,
2819 snzreqcr::Snzreqen17,
2820 Snzreqcr_SPEC,
2821 crate::common::RW,
2822 > {
2823 crate::common::RegisterField::<
2824 17,
2825 0x1,
2826 1,
2827 0,
2828 snzreqcr::Snzreqen17,
2829 snzreqcr::Snzreqen17,
2830 Snzreqcr_SPEC,
2831 crate::common::RW,
2832 >::from_register(self, 0)
2833 }
2834
2835 #[doc = "These bits are read as 000000000. The write value should be 000000000."]
2836 #[inline(always)]
2837 pub fn reserved(
2838 self,
2839 ) -> crate::common::RegisterField<8, 0x1ff, 1, 0, u16, u16, Snzreqcr_SPEC, crate::common::RW>
2840 {
2841 crate::common::RegisterField::<8,0x1ff,1,0,u16,u16,Snzreqcr_SPEC,crate::common::RW>::from_register(self,0)
2842 }
2843
2844 #[doc = "Snooze Request Enable 7Enable IRQ7 pin snooze request"]
2845 #[inline(always)]
2846 pub fn snzreqen7(
2847 self,
2848 ) -> crate::common::RegisterField<
2849 7,
2850 0x1,
2851 1,
2852 0,
2853 snzreqcr::Snzreqen7,
2854 snzreqcr::Snzreqen7,
2855 Snzreqcr_SPEC,
2856 crate::common::RW,
2857 > {
2858 crate::common::RegisterField::<
2859 7,
2860 0x1,
2861 1,
2862 0,
2863 snzreqcr::Snzreqen7,
2864 snzreqcr::Snzreqen7,
2865 Snzreqcr_SPEC,
2866 crate::common::RW,
2867 >::from_register(self, 0)
2868 }
2869
2870 #[doc = "Snooze Request Enable 6Enable IRQ6 pin snooze request"]
2871 #[inline(always)]
2872 pub fn snzreqen6(
2873 self,
2874 ) -> crate::common::RegisterField<
2875 6,
2876 0x1,
2877 1,
2878 0,
2879 snzreqcr::Snzreqen6,
2880 snzreqcr::Snzreqen6,
2881 Snzreqcr_SPEC,
2882 crate::common::RW,
2883 > {
2884 crate::common::RegisterField::<
2885 6,
2886 0x1,
2887 1,
2888 0,
2889 snzreqcr::Snzreqen6,
2890 snzreqcr::Snzreqen6,
2891 Snzreqcr_SPEC,
2892 crate::common::RW,
2893 >::from_register(self, 0)
2894 }
2895
2896 #[doc = "Snooze Request Enable 5Enable IRQ5 pin snooze request"]
2897 #[inline(always)]
2898 pub fn snzreqen5(
2899 self,
2900 ) -> crate::common::RegisterField<
2901 5,
2902 0x1,
2903 1,
2904 0,
2905 snzreqcr::Snzreqen5,
2906 snzreqcr::Snzreqen5,
2907 Snzreqcr_SPEC,
2908 crate::common::RW,
2909 > {
2910 crate::common::RegisterField::<
2911 5,
2912 0x1,
2913 1,
2914 0,
2915 snzreqcr::Snzreqen5,
2916 snzreqcr::Snzreqen5,
2917 Snzreqcr_SPEC,
2918 crate::common::RW,
2919 >::from_register(self, 0)
2920 }
2921
2922 #[doc = "Snooze Request Enable 4Enable IRQ4 pin snooze request"]
2923 #[inline(always)]
2924 pub fn snzreqen4(
2925 self,
2926 ) -> crate::common::RegisterField<
2927 4,
2928 0x1,
2929 1,
2930 0,
2931 snzreqcr::Snzreqen4,
2932 snzreqcr::Snzreqen4,
2933 Snzreqcr_SPEC,
2934 crate::common::RW,
2935 > {
2936 crate::common::RegisterField::<
2937 4,
2938 0x1,
2939 1,
2940 0,
2941 snzreqcr::Snzreqen4,
2942 snzreqcr::Snzreqen4,
2943 Snzreqcr_SPEC,
2944 crate::common::RW,
2945 >::from_register(self, 0)
2946 }
2947
2948 #[doc = "Snooze Request Enable 3Enable IRQ3 pin snooze request"]
2949 #[inline(always)]
2950 pub fn snzreqen3(
2951 self,
2952 ) -> crate::common::RegisterField<
2953 3,
2954 0x1,
2955 1,
2956 0,
2957 snzreqcr::Snzreqen3,
2958 snzreqcr::Snzreqen3,
2959 Snzreqcr_SPEC,
2960 crate::common::RW,
2961 > {
2962 crate::common::RegisterField::<
2963 3,
2964 0x1,
2965 1,
2966 0,
2967 snzreqcr::Snzreqen3,
2968 snzreqcr::Snzreqen3,
2969 Snzreqcr_SPEC,
2970 crate::common::RW,
2971 >::from_register(self, 0)
2972 }
2973
2974 #[doc = "Snooze Request Enable 2Enable IRQ2 pin snooze request"]
2975 #[inline(always)]
2976 pub fn snzreqen2(
2977 self,
2978 ) -> crate::common::RegisterField<
2979 2,
2980 0x1,
2981 1,
2982 0,
2983 snzreqcr::Snzreqen2,
2984 snzreqcr::Snzreqen2,
2985 Snzreqcr_SPEC,
2986 crate::common::RW,
2987 > {
2988 crate::common::RegisterField::<
2989 2,
2990 0x1,
2991 1,
2992 0,
2993 snzreqcr::Snzreqen2,
2994 snzreqcr::Snzreqen2,
2995 Snzreqcr_SPEC,
2996 crate::common::RW,
2997 >::from_register(self, 0)
2998 }
2999
3000 #[doc = "Snooze Request Enable 1Enable IRQ1 pin snooze request"]
3001 #[inline(always)]
3002 pub fn snzreqen1(
3003 self,
3004 ) -> crate::common::RegisterField<
3005 1,
3006 0x1,
3007 1,
3008 0,
3009 snzreqcr::Snzreqen1,
3010 snzreqcr::Snzreqen1,
3011 Snzreqcr_SPEC,
3012 crate::common::RW,
3013 > {
3014 crate::common::RegisterField::<
3015 1,
3016 0x1,
3017 1,
3018 0,
3019 snzreqcr::Snzreqen1,
3020 snzreqcr::Snzreqen1,
3021 Snzreqcr_SPEC,
3022 crate::common::RW,
3023 >::from_register(self, 0)
3024 }
3025
3026 #[doc = "Snooze Request Enable 0Enable IRQ0 pin snooze request"]
3027 #[inline(always)]
3028 pub fn snzreqen0(
3029 self,
3030 ) -> crate::common::RegisterField<
3031 0,
3032 0x1,
3033 1,
3034 0,
3035 snzreqcr::Snzreqen0,
3036 snzreqcr::Snzreqen0,
3037 Snzreqcr_SPEC,
3038 crate::common::RW,
3039 > {
3040 crate::common::RegisterField::<
3041 0,
3042 0x1,
3043 1,
3044 0,
3045 snzreqcr::Snzreqen0,
3046 snzreqcr::Snzreqen0,
3047 Snzreqcr_SPEC,
3048 crate::common::RW,
3049 >::from_register(self, 0)
3050 }
3051}
3052impl ::core::default::Default for Snzreqcr {
3053 #[inline(always)]
3054 fn default() -> Snzreqcr {
3055 <crate::RegValueT<Snzreqcr_SPEC> as RegisterValue<_>>::new(0)
3056 }
3057}
3058pub mod snzreqcr {
3059
3060 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3061 pub struct Snzreqen30_SPEC;
3062 pub type Snzreqen30 = crate::EnumBitfieldStruct<u8, Snzreqen30_SPEC>;
3063 impl Snzreqen30 {
3064 #[doc = "Disable snooze request"]
3065 pub const _0: Self = Self::new(0);
3066
3067 #[doc = "Enable snooze request"]
3068 pub const _1: Self = Self::new(1);
3069 }
3070 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3071 pub struct Snzreqen29_SPEC;
3072 pub type Snzreqen29 = crate::EnumBitfieldStruct<u8, Snzreqen29_SPEC>;
3073 impl Snzreqen29 {
3074 #[doc = "Disable snooze request"]
3075 pub const _0: Self = Self::new(0);
3076
3077 #[doc = "Enable snooze request"]
3078 pub const _1: Self = Self::new(1);
3079 }
3080 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3081 pub struct Snzreqen28_SPEC;
3082 pub type Snzreqen28 = crate::EnumBitfieldStruct<u8, Snzreqen28_SPEC>;
3083 impl Snzreqen28 {
3084 #[doc = "Disable snooze request"]
3085 pub const _0: Self = Self::new(0);
3086
3087 #[doc = "Enable snooze request"]
3088 pub const _1: Self = Self::new(1);
3089 }
3090 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3091 pub struct Snzreqen25_SPEC;
3092 pub type Snzreqen25 = crate::EnumBitfieldStruct<u8, Snzreqen25_SPEC>;
3093 impl Snzreqen25 {
3094 #[doc = "Disable snooze request"]
3095 pub const _0: Self = Self::new(0);
3096
3097 #[doc = "Enable snooze request"]
3098 pub const _1: Self = Self::new(1);
3099 }
3100 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3101 pub struct Snzreqen24_SPEC;
3102 pub type Snzreqen24 = crate::EnumBitfieldStruct<u8, Snzreqen24_SPEC>;
3103 impl Snzreqen24 {
3104 #[doc = "Disable snooze request"]
3105 pub const _0: Self = Self::new(0);
3106
3107 #[doc = "Enable snooze request"]
3108 pub const _1: Self = Self::new(1);
3109 }
3110 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3111 pub struct Snzreqen23_SPEC;
3112 pub type Snzreqen23 = crate::EnumBitfieldStruct<u8, Snzreqen23_SPEC>;
3113 impl Snzreqen23 {
3114 #[doc = "Disable snooze request"]
3115 pub const _0: Self = Self::new(0);
3116
3117 #[doc = "Enable snooze request"]
3118 pub const _1: Self = Self::new(1);
3119 }
3120 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3121 pub struct Snzreqen17_SPEC;
3122 pub type Snzreqen17 = crate::EnumBitfieldStruct<u8, Snzreqen17_SPEC>;
3123 impl Snzreqen17 {
3124 #[doc = "Disable snooze request"]
3125 pub const _0: Self = Self::new(0);
3126
3127 #[doc = "Enable snooze request"]
3128 pub const _1: Self = Self::new(1);
3129 }
3130 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3131 pub struct Snzreqen7_SPEC;
3132 pub type Snzreqen7 = crate::EnumBitfieldStruct<u8, Snzreqen7_SPEC>;
3133 impl Snzreqen7 {
3134 #[doc = "Disable snooze request"]
3135 pub const _0: Self = Self::new(0);
3136
3137 #[doc = "Enable snooze request"]
3138 pub const _1: Self = Self::new(1);
3139 }
3140 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3141 pub struct Snzreqen6_SPEC;
3142 pub type Snzreqen6 = crate::EnumBitfieldStruct<u8, Snzreqen6_SPEC>;
3143 impl Snzreqen6 {
3144 #[doc = "Disable snooze request"]
3145 pub const _0: Self = Self::new(0);
3146
3147 #[doc = "Enable snooze request"]
3148 pub const _1: Self = Self::new(1);
3149 }
3150 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3151 pub struct Snzreqen5_SPEC;
3152 pub type Snzreqen5 = crate::EnumBitfieldStruct<u8, Snzreqen5_SPEC>;
3153 impl Snzreqen5 {
3154 #[doc = "Disable snooze request"]
3155 pub const _0: Self = Self::new(0);
3156
3157 #[doc = "Enable snooze request"]
3158 pub const _1: Self = Self::new(1);
3159 }
3160 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3161 pub struct Snzreqen4_SPEC;
3162 pub type Snzreqen4 = crate::EnumBitfieldStruct<u8, Snzreqen4_SPEC>;
3163 impl Snzreqen4 {
3164 #[doc = "Disable snooze request"]
3165 pub const _0: Self = Self::new(0);
3166
3167 #[doc = "Enable snooze request"]
3168 pub const _1: Self = Self::new(1);
3169 }
3170 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3171 pub struct Snzreqen3_SPEC;
3172 pub type Snzreqen3 = crate::EnumBitfieldStruct<u8, Snzreqen3_SPEC>;
3173 impl Snzreqen3 {
3174 #[doc = "Disable snooze request"]
3175 pub const _0: Self = Self::new(0);
3176
3177 #[doc = "Enable snooze request"]
3178 pub const _1: Self = Self::new(1);
3179 }
3180 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3181 pub struct Snzreqen2_SPEC;
3182 pub type Snzreqen2 = crate::EnumBitfieldStruct<u8, Snzreqen2_SPEC>;
3183 impl Snzreqen2 {
3184 #[doc = "Disable snooze request"]
3185 pub const _0: Self = Self::new(0);
3186
3187 #[doc = "Enable snooze request"]
3188 pub const _1: Self = Self::new(1);
3189 }
3190 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3191 pub struct Snzreqen1_SPEC;
3192 pub type Snzreqen1 = crate::EnumBitfieldStruct<u8, Snzreqen1_SPEC>;
3193 impl Snzreqen1 {
3194 #[doc = "Disable snooze request"]
3195 pub const _0: Self = Self::new(0);
3196
3197 #[doc = "Enable snooze request"]
3198 pub const _1: Self = Self::new(1);
3199 }
3200 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3201 pub struct Snzreqen0_SPEC;
3202 pub type Snzreqen0 = crate::EnumBitfieldStruct<u8, Snzreqen0_SPEC>;
3203 impl Snzreqen0 {
3204 #[doc = "Disable snooze request"]
3205 pub const _0: Self = Self::new(0);
3206
3207 #[doc = "Enable snooze request"]
3208 pub const _1: Self = Self::new(1);
3209 }
3210}
3211#[doc(hidden)]
3212#[derive(Copy, Clone, Eq, PartialEq)]
3213pub struct Flstop_SPEC;
3214impl crate::sealed::RegSpec for Flstop_SPEC {
3215 type DataType = u8;
3216}
3217
3218#[doc = "Flash Operation Control Register"]
3219pub type Flstop = crate::RegValueT<Flstop_SPEC>;
3220
3221impl Flstop {
3222 #[doc = "Flash Memory Operation Status Flag"]
3223 #[inline(always)]
3224 pub fn flstpf(
3225 self,
3226 ) -> crate::common::RegisterField<
3227 4,
3228 0x1,
3229 1,
3230 0,
3231 flstop::Flstpf,
3232 flstop::Flstpf,
3233 Flstop_SPEC,
3234 crate::common::R,
3235 > {
3236 crate::common::RegisterField::<
3237 4,
3238 0x1,
3239 1,
3240 0,
3241 flstop::Flstpf,
3242 flstop::Flstpf,
3243 Flstop_SPEC,
3244 crate::common::R,
3245 >::from_register(self, 0)
3246 }
3247
3248 #[doc = "These bits are read as 000. The write value should be 000."]
3249 #[inline(always)]
3250 pub fn reserved(
3251 self,
3252 ) -> crate::common::RegisterField<1, 0x7, 1, 0, u8, u8, Flstop_SPEC, crate::common::RW> {
3253 crate::common::RegisterField::<1,0x7,1,0,u8,u8,Flstop_SPEC,crate::common::RW>::from_register(self,0)
3254 }
3255
3256 #[doc = "Selecting ON/OFF of the Flash Memory Operation"]
3257 #[inline(always)]
3258 pub fn flstop(
3259 self,
3260 ) -> crate::common::RegisterField<
3261 0,
3262 0x1,
3263 1,
3264 0,
3265 flstop::Flstop,
3266 flstop::Flstop,
3267 Flstop_SPEC,
3268 crate::common::RW,
3269 > {
3270 crate::common::RegisterField::<
3271 0,
3272 0x1,
3273 1,
3274 0,
3275 flstop::Flstop,
3276 flstop::Flstop,
3277 Flstop_SPEC,
3278 crate::common::RW,
3279 >::from_register(self, 0)
3280 }
3281}
3282impl ::core::default::Default for Flstop {
3283 #[inline(always)]
3284 fn default() -> Flstop {
3285 <crate::RegValueT<Flstop_SPEC> as RegisterValue<_>>::new(0)
3286 }
3287}
3288pub mod flstop {
3289
3290 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3291 pub struct Flstpf_SPEC;
3292 pub type Flstpf = crate::EnumBitfieldStruct<u8, Flstpf_SPEC>;
3293 impl Flstpf {
3294 #[doc = "Transition completed"]
3295 pub const _0: Self = Self::new(0);
3296
3297 #[doc = "During transition (from the flash-stop-status to flashoperating- status or vice versa)"]
3298 pub const _1: Self = Self::new(1);
3299 }
3300 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3301 pub struct Flstop_SPEC;
3302 pub type Flstop = crate::EnumBitfieldStruct<u8, Flstop_SPEC>;
3303 impl Flstop {
3304 #[doc = "Code flash memory operates. Data flash memory operation depends on DFLCTL.DFLEN bit"]
3305 pub const _0: Self = Self::new(0);
3306
3307 #[doc = "Code flash/Data flash memory stops"]
3308 pub const _1: Self = Self::new(1);
3309 }
3310}
3311#[doc(hidden)]
3312#[derive(Copy, Clone, Eq, PartialEq)]
3313pub struct Opccr_SPEC;
3314impl crate::sealed::RegSpec for Opccr_SPEC {
3315 type DataType = u8;
3316}
3317
3318#[doc = "Operating Power Control Register"]
3319pub type Opccr = crate::RegValueT<Opccr_SPEC>;
3320
3321impl Opccr {
3322 #[doc = "Operating Power Control Mode Transition Status Flag"]
3323 #[inline(always)]
3324 pub fn opcmtsf(
3325 self,
3326 ) -> crate::common::RegisterField<
3327 4,
3328 0x1,
3329 1,
3330 0,
3331 opccr::Opcmtsf,
3332 opccr::Opcmtsf,
3333 Opccr_SPEC,
3334 crate::common::R,
3335 > {
3336 crate::common::RegisterField::<
3337 4,
3338 0x1,
3339 1,
3340 0,
3341 opccr::Opcmtsf,
3342 opccr::Opcmtsf,
3343 Opccr_SPEC,
3344 crate::common::R,
3345 >::from_register(self, 0)
3346 }
3347
3348 #[doc = "These bits are read as 00. The write value should be 00."]
3349 #[inline(always)]
3350 pub fn reserved(
3351 self,
3352 ) -> crate::common::RegisterField<2, 0x3, 1, 0, u8, u8, Opccr_SPEC, crate::common::RW> {
3353 crate::common::RegisterField::<2,0x3,1,0,u8,u8,Opccr_SPEC,crate::common::RW>::from_register(self,0)
3354 }
3355
3356 #[doc = "Operating Power Control Mode Select"]
3357 #[inline(always)]
3358 pub fn opcm(
3359 self,
3360 ) -> crate::common::RegisterField<
3361 0,
3362 0x3,
3363 1,
3364 0,
3365 opccr::Opcm,
3366 opccr::Opcm,
3367 Opccr_SPEC,
3368 crate::common::RW,
3369 > {
3370 crate::common::RegisterField::<
3371 0,
3372 0x3,
3373 1,
3374 0,
3375 opccr::Opcm,
3376 opccr::Opcm,
3377 Opccr_SPEC,
3378 crate::common::RW,
3379 >::from_register(self, 0)
3380 }
3381}
3382impl ::core::default::Default for Opccr {
3383 #[inline(always)]
3384 fn default() -> Opccr {
3385 <crate::RegValueT<Opccr_SPEC> as RegisterValue<_>>::new(2)
3386 }
3387}
3388pub mod opccr {
3389
3390 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3391 pub struct Opcmtsf_SPEC;
3392 pub type Opcmtsf = crate::EnumBitfieldStruct<u8, Opcmtsf_SPEC>;
3393 impl Opcmtsf {
3394 #[doc = "Transition completed"]
3395 pub const _0: Self = Self::new(0);
3396
3397 #[doc = "During transition"]
3398 pub const _1: Self = Self::new(1);
3399 }
3400 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3401 pub struct Opcm_SPEC;
3402 pub type Opcm = crate::EnumBitfieldStruct<u8, Opcm_SPEC>;
3403 impl Opcm {
3404 #[doc = "High-speed mode"]
3405 pub const _00: Self = Self::new(0);
3406
3407 #[doc = "Prohibited"]
3408 pub const _01: Self = Self::new(1);
3409
3410 #[doc = "Prohibited"]
3411 pub const _10: Self = Self::new(2);
3412
3413 #[doc = "Low-speed mode"]
3414 pub const _11: Self = Self::new(3);
3415 }
3416}
3417#[doc(hidden)]
3418#[derive(Copy, Clone, Eq, PartialEq)]
3419pub struct Sopccr_SPEC;
3420impl crate::sealed::RegSpec for Sopccr_SPEC {
3421 type DataType = u8;
3422}
3423
3424#[doc = "Sub Operating Power Control Register"]
3425pub type Sopccr = crate::RegValueT<Sopccr_SPEC>;
3426
3427impl Sopccr {
3428 #[doc = "Sub Operating Power Control Mode Transition Status Flag"]
3429 #[inline(always)]
3430 pub fn sopcmtsf(
3431 self,
3432 ) -> crate::common::RegisterField<
3433 4,
3434 0x1,
3435 1,
3436 0,
3437 sopccr::Sopcmtsf,
3438 sopccr::Sopcmtsf,
3439 Sopccr_SPEC,
3440 crate::common::R,
3441 > {
3442 crate::common::RegisterField::<
3443 4,
3444 0x1,
3445 1,
3446 0,
3447 sopccr::Sopcmtsf,
3448 sopccr::Sopcmtsf,
3449 Sopccr_SPEC,
3450 crate::common::R,
3451 >::from_register(self, 0)
3452 }
3453
3454 #[doc = "These bits are read as 000. The write value should be 000."]
3455 #[inline(always)]
3456 pub fn reserved(
3457 self,
3458 ) -> crate::common::RegisterField<1, 0x7, 1, 0, u8, u8, Sopccr_SPEC, crate::common::RW> {
3459 crate::common::RegisterField::<1,0x7,1,0,u8,u8,Sopccr_SPEC,crate::common::RW>::from_register(self,0)
3460 }
3461
3462 #[doc = "Sub Operating Power Control Mode Select"]
3463 #[inline(always)]
3464 pub fn sopcm(
3465 self,
3466 ) -> crate::common::RegisterField<
3467 0,
3468 0x1,
3469 1,
3470 0,
3471 sopccr::Sopcm,
3472 sopccr::Sopcm,
3473 Sopccr_SPEC,
3474 crate::common::RW,
3475 > {
3476 crate::common::RegisterField::<
3477 0,
3478 0x1,
3479 1,
3480 0,
3481 sopccr::Sopcm,
3482 sopccr::Sopcm,
3483 Sopccr_SPEC,
3484 crate::common::RW,
3485 >::from_register(self, 0)
3486 }
3487}
3488impl ::core::default::Default for Sopccr {
3489 #[inline(always)]
3490 fn default() -> Sopccr {
3491 <crate::RegValueT<Sopccr_SPEC> as RegisterValue<_>>::new(0)
3492 }
3493}
3494pub mod sopccr {
3495
3496 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3497 pub struct Sopcmtsf_SPEC;
3498 pub type Sopcmtsf = crate::EnumBitfieldStruct<u8, Sopcmtsf_SPEC>;
3499 impl Sopcmtsf {
3500 #[doc = "Transition completed"]
3501 pub const _0: Self = Self::new(0);
3502
3503 #[doc = "During transition"]
3504 pub const _1: Self = Self::new(1);
3505 }
3506 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3507 pub struct Sopcm_SPEC;
3508 pub type Sopcm = crate::EnumBitfieldStruct<u8, Sopcm_SPEC>;
3509 impl Sopcm {
3510 #[doc = "Other than Subosc-speed mode"]
3511 pub const _0: Self = Self::new(0);
3512
3513 #[doc = "Subosc-speed mode"]
3514 pub const _1: Self = Self::new(1);
3515 }
3516}
3517#[doc(hidden)]
3518#[derive(Copy, Clone, Eq, PartialEq)]
3519pub struct Lvcmpcr_SPEC;
3520impl crate::sealed::RegSpec for Lvcmpcr_SPEC {
3521 type DataType = u8;
3522}
3523
3524#[doc = "Voltage Monitor Circuit Control Register"]
3525pub type Lvcmpcr = crate::RegValueT<Lvcmpcr_SPEC>;
3526
3527impl Lvcmpcr {
3528 #[doc = "Voltage Detection 2 Enable"]
3529 #[inline(always)]
3530 pub fn lvd2e(
3531 self,
3532 ) -> crate::common::RegisterField<
3533 6,
3534 0x1,
3535 1,
3536 0,
3537 lvcmpcr::Lvd2E,
3538 lvcmpcr::Lvd2E,
3539 Lvcmpcr_SPEC,
3540 crate::common::RW,
3541 > {
3542 crate::common::RegisterField::<
3543 6,
3544 0x1,
3545 1,
3546 0,
3547 lvcmpcr::Lvd2E,
3548 lvcmpcr::Lvd2E,
3549 Lvcmpcr_SPEC,
3550 crate::common::RW,
3551 >::from_register(self, 0)
3552 }
3553
3554 #[doc = "Voltage Detection 1 Enable"]
3555 #[inline(always)]
3556 pub fn lvd1e(
3557 self,
3558 ) -> crate::common::RegisterField<
3559 5,
3560 0x1,
3561 1,
3562 0,
3563 lvcmpcr::Lvd1E,
3564 lvcmpcr::Lvd1E,
3565 Lvcmpcr_SPEC,
3566 crate::common::RW,
3567 > {
3568 crate::common::RegisterField::<
3569 5,
3570 0x1,
3571 1,
3572 0,
3573 lvcmpcr::Lvd1E,
3574 lvcmpcr::Lvd1E,
3575 Lvcmpcr_SPEC,
3576 crate::common::RW,
3577 >::from_register(self, 0)
3578 }
3579
3580 #[doc = "These bits are read as 00000. The write value should be 00000."]
3581 #[inline(always)]
3582 pub fn reserved(
3583 self,
3584 ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, Lvcmpcr_SPEC, crate::common::RW> {
3585 crate::common::RegisterField::<0,0x1f,1,0,u8,u8,Lvcmpcr_SPEC,crate::common::RW>::from_register(self,0)
3586 }
3587}
3588impl ::core::default::Default for Lvcmpcr {
3589 #[inline(always)]
3590 fn default() -> Lvcmpcr {
3591 <crate::RegValueT<Lvcmpcr_SPEC> as RegisterValue<_>>::new(0)
3592 }
3593}
3594pub mod lvcmpcr {
3595
3596 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3597 pub struct Lvd2E_SPEC;
3598 pub type Lvd2E = crate::EnumBitfieldStruct<u8, Lvd2E_SPEC>;
3599 impl Lvd2E {
3600 #[doc = "Voltage detection 2 circuit disabled"]
3601 pub const _0: Self = Self::new(0);
3602
3603 #[doc = "Voltage detection 2 circuit enabled"]
3604 pub const _1: Self = Self::new(1);
3605 }
3606 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3607 pub struct Lvd1E_SPEC;
3608 pub type Lvd1E = crate::EnumBitfieldStruct<u8, Lvd1E_SPEC>;
3609 impl Lvd1E {
3610 #[doc = "Voltage detection 1 circuit disabled"]
3611 pub const _0: Self = Self::new(0);
3612
3613 #[doc = "Voltage detection 1 circuit enabled"]
3614 pub const _1: Self = Self::new(1);
3615 }
3616}
3617#[doc(hidden)]
3618#[derive(Copy, Clone, Eq, PartialEq)]
3619pub struct Lvdlvlr_SPEC;
3620impl crate::sealed::RegSpec for Lvdlvlr_SPEC {
3621 type DataType = u8;
3622}
3623
3624#[doc = "Voltage Detection Level Select Register"]
3625pub type Lvdlvlr = crate::RegValueT<Lvdlvlr_SPEC>;
3626
3627impl Lvdlvlr {
3628 #[doc = "Voltage Detection 2 Level Select (Standard voltage during drop in voltage)"]
3629 #[inline(always)]
3630 pub fn lvd2lvl(
3631 self,
3632 ) -> crate::common::RegisterField<
3633 5,
3634 0x7,
3635 1,
3636 0,
3637 lvdlvlr::Lvd2Lvl,
3638 lvdlvlr::Lvd2Lvl,
3639 Lvdlvlr_SPEC,
3640 crate::common::RW,
3641 > {
3642 crate::common::RegisterField::<
3643 5,
3644 0x7,
3645 1,
3646 0,
3647 lvdlvlr::Lvd2Lvl,
3648 lvdlvlr::Lvd2Lvl,
3649 Lvdlvlr_SPEC,
3650 crate::common::RW,
3651 >::from_register(self, 0)
3652 }
3653
3654 #[doc = "Voltage Detection 1 Level Select (Standard voltage during drop in voltage)"]
3655 #[inline(always)]
3656 pub fn lvd1lvl(
3657 self,
3658 ) -> crate::common::RegisterField<
3659 0,
3660 0x1f,
3661 1,
3662 0,
3663 lvdlvlr::Lvd1Lvl,
3664 lvdlvlr::Lvd1Lvl,
3665 Lvdlvlr_SPEC,
3666 crate::common::RW,
3667 > {
3668 crate::common::RegisterField::<
3669 0,
3670 0x1f,
3671 1,
3672 0,
3673 lvdlvlr::Lvd1Lvl,
3674 lvdlvlr::Lvd1Lvl,
3675 Lvdlvlr_SPEC,
3676 crate::common::RW,
3677 >::from_register(self, 0)
3678 }
3679}
3680impl ::core::default::Default for Lvdlvlr {
3681 #[inline(always)]
3682 fn default() -> Lvdlvlr {
3683 <crate::RegValueT<Lvdlvlr_SPEC> as RegisterValue<_>>::new(7)
3684 }
3685}
3686pub mod lvdlvlr {
3687
3688 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3689 pub struct Lvd2Lvl_SPEC;
3690 pub type Lvd2Lvl = crate::EnumBitfieldStruct<u8, Lvd2Lvl_SPEC>;
3691 impl Lvd2Lvl {
3692 #[doc = "4.29V(Vdet2_0)"]
3693 pub const _000: Self = Self::new(0);
3694
3695 #[doc = "4.14V(Vdet2_1)"]
3696 pub const _001: Self = Self::new(1);
3697
3698 #[doc = "4.02V(Vdet2_2)"]
3699 pub const _010: Self = Self::new(2);
3700
3701 #[doc = "3.84V(Vdet2_3)"]
3702 pub const _011: Self = Self::new(3);
3703 }
3704 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3705 pub struct Lvd1Lvl_SPEC;
3706 pub type Lvd1Lvl = crate::EnumBitfieldStruct<u8, Lvd1Lvl_SPEC>;
3707 impl Lvd1Lvl {
3708 #[doc = "4.29V(Vdet1_0)"]
3709 pub const _00000: Self = Self::new(0);
3710
3711 #[doc = "4.14V(Vdet1_1)"]
3712 pub const _00001: Self = Self::new(1);
3713
3714 #[doc = "4.02V(Vdet1_2)"]
3715 pub const _00010: Self = Self::new(2);
3716
3717 #[doc = "3.84V(Vdet1_3)"]
3718 pub const _00011: Self = Self::new(3);
3719
3720 #[doc = "3.10V(Vdet1_4)"]
3721 pub const _00100: Self = Self::new(4);
3722
3723 #[doc = "3.00V(Vdet1_5)"]
3724 pub const _00101: Self = Self::new(5);
3725
3726 #[doc = "2.90V(Vdet1_6)"]
3727 pub const _00110: Self = Self::new(6);
3728
3729 #[doc = "2.79V(Vdet1_7)"]
3730 pub const _00111: Self = Self::new(7);
3731
3732 #[doc = "2.68V(Vdet1_8)"]
3733 pub const _01000: Self = Self::new(8);
3734
3735 #[doc = "2.58V(Vdet1_9)"]
3736 pub const _01001: Self = Self::new(9);
3737
3738 #[doc = "2.48V(Vdet1_A)"]
3739 pub const _01010: Self = Self::new(10);
3740
3741 #[doc = "2.20V(Vdet1_B)"]
3742 pub const _01011: Self = Self::new(11);
3743
3744 #[doc = "1.96V(Vdet1_C)"]
3745 pub const _01100: Self = Self::new(12);
3746
3747 #[doc = "1.86V(Vdet1_D)"]
3748 pub const _01101: Self = Self::new(13);
3749
3750 #[doc = "1.75V(Vdet1_E)"]
3751 pub const _01110: Self = Self::new(14);
3752
3753 #[doc = "1.65V(Vdet1_F)"]
3754 pub const _01111: Self = Self::new(15);
3755 }
3756}
3757#[doc(hidden)]
3758#[derive(Copy, Clone, Eq, PartialEq)]
3759pub struct Lvd1Cr0_SPEC;
3760impl crate::sealed::RegSpec for Lvd1Cr0_SPEC {
3761 type DataType = u8;
3762}
3763
3764#[doc = "Voltage Monitor 1 Circuit Control Register 0"]
3765pub type Lvd1Cr0 = crate::RegValueT<Lvd1Cr0_SPEC>;
3766
3767impl Lvd1Cr0 {
3768 #[doc = "Voltage Monitor 1 Reset Negate Select"]
3769 #[inline(always)]
3770 pub fn rn(
3771 self,
3772 ) -> crate::common::RegisterField<
3773 7,
3774 0x1,
3775 1,
3776 0,
3777 lvd1cr0::Rn,
3778 lvd1cr0::Rn,
3779 Lvd1Cr0_SPEC,
3780 crate::common::RW,
3781 > {
3782 crate::common::RegisterField::<
3783 7,
3784 0x1,
3785 1,
3786 0,
3787 lvd1cr0::Rn,
3788 lvd1cr0::Rn,
3789 Lvd1Cr0_SPEC,
3790 crate::common::RW,
3791 >::from_register(self, 0)
3792 }
3793
3794 #[doc = "Voltage Monitor 1 Circuit Mode Select"]
3795 #[inline(always)]
3796 pub fn ri(
3797 self,
3798 ) -> crate::common::RegisterField<
3799 6,
3800 0x1,
3801 1,
3802 0,
3803 lvd1cr0::Ri,
3804 lvd1cr0::Ri,
3805 Lvd1Cr0_SPEC,
3806 crate::common::RW,
3807 > {
3808 crate::common::RegisterField::<
3809 6,
3810 0x1,
3811 1,
3812 0,
3813 lvd1cr0::Ri,
3814 lvd1cr0::Ri,
3815 Lvd1Cr0_SPEC,
3816 crate::common::RW,
3817 >::from_register(self, 0)
3818 }
3819
3820 #[doc = "Voltage Monitor 1 Circuit Comparison Result Output Enable"]
3821 #[inline(always)]
3822 pub fn cmpe(
3823 self,
3824 ) -> crate::common::RegisterField<
3825 2,
3826 0x1,
3827 1,
3828 0,
3829 lvd1cr0::Cmpe,
3830 lvd1cr0::Cmpe,
3831 Lvd1Cr0_SPEC,
3832 crate::common::RW,
3833 > {
3834 crate::common::RegisterField::<
3835 2,
3836 0x1,
3837 1,
3838 0,
3839 lvd1cr0::Cmpe,
3840 lvd1cr0::Cmpe,
3841 Lvd1Cr0_SPEC,
3842 crate::common::RW,
3843 >::from_register(self, 0)
3844 }
3845
3846 #[doc = "This bit is read as 0. The write value should be 0."]
3847 #[inline(always)]
3848 pub fn reserved(
3849 self,
3850 ) -> crate::common::RegisterFieldBool<1, 1, 0, Lvd1Cr0_SPEC, crate::common::RW> {
3851 crate::common::RegisterFieldBool::<1, 1, 0, Lvd1Cr0_SPEC, crate::common::RW>::from_register(
3852 self, 0,
3853 )
3854 }
3855
3856 #[doc = "Voltage Monitor 1 Interrupt/ Reset Enable"]
3857 #[inline(always)]
3858 pub fn rie(
3859 self,
3860 ) -> crate::common::RegisterField<
3861 0,
3862 0x1,
3863 1,
3864 0,
3865 lvd1cr0::Rie,
3866 lvd1cr0::Rie,
3867 Lvd1Cr0_SPEC,
3868 crate::common::RW,
3869 > {
3870 crate::common::RegisterField::<
3871 0,
3872 0x1,
3873 1,
3874 0,
3875 lvd1cr0::Rie,
3876 lvd1cr0::Rie,
3877 Lvd1Cr0_SPEC,
3878 crate::common::RW,
3879 >::from_register(self, 0)
3880 }
3881}
3882impl ::core::default::Default for Lvd1Cr0 {
3883 #[inline(always)]
3884 fn default() -> Lvd1Cr0 {
3885 <crate::RegValueT<Lvd1Cr0_SPEC> as RegisterValue<_>>::new(128)
3886 }
3887}
3888pub mod lvd1cr0 {
3889
3890 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3891 pub struct Rn_SPEC;
3892 pub type Rn = crate::EnumBitfieldStruct<u8, Rn_SPEC>;
3893 impl Rn {
3894 #[doc = "Negation follows a stabilization time (tLVD1) after VCC > Vdet1 is detected."]
3895 pub const _0: Self = Self::new(0);
3896
3897 #[doc = "Negation follows a stabilization time (tLVD1) after assertion of the LVD1 reset."]
3898 pub const _1: Self = Self::new(1);
3899 }
3900 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3901 pub struct Ri_SPEC;
3902 pub type Ri = crate::EnumBitfieldStruct<u8, Ri_SPEC>;
3903 impl Ri {
3904 #[doc = "Voltage monitor 1 interrupt during Vdet1 passage"]
3905 pub const _0: Self = Self::new(0);
3906
3907 #[doc = "Voltage monitor 1 reset enabled when the voltage falls to and below Vdet1"]
3908 pub const _1: Self = Self::new(1);
3909 }
3910 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3911 pub struct Cmpe_SPEC;
3912 pub type Cmpe = crate::EnumBitfieldStruct<u8, Cmpe_SPEC>;
3913 impl Cmpe {
3914 #[doc = "Voltage monitor 1 circuit comparison result output disabled."]
3915 pub const _0: Self = Self::new(0);
3916
3917 #[doc = "Voltage monitor 1 circuit comparison result output enabled."]
3918 pub const _1: Self = Self::new(1);
3919 }
3920 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3921 pub struct Rie_SPEC;
3922 pub type Rie = crate::EnumBitfieldStruct<u8, Rie_SPEC>;
3923 impl Rie {
3924 #[doc = "Disabled"]
3925 pub const _0: Self = Self::new(0);
3926
3927 #[doc = "Enabled"]
3928 pub const _1: Self = Self::new(1);
3929 }
3930}
3931#[doc(hidden)]
3932#[derive(Copy, Clone, Eq, PartialEq)]
3933pub struct Lvd2Cr0_SPEC;
3934impl crate::sealed::RegSpec for Lvd2Cr0_SPEC {
3935 type DataType = u8;
3936}
3937
3938#[doc = "Voltage Monitor 2 Circuit Control Register 0"]
3939pub type Lvd2Cr0 = crate::RegValueT<Lvd2Cr0_SPEC>;
3940
3941impl Lvd2Cr0 {
3942 #[doc = "Voltage Monitor 2 Reset Negate Select"]
3943 #[inline(always)]
3944 pub fn rn(
3945 self,
3946 ) -> crate::common::RegisterField<
3947 7,
3948 0x1,
3949 1,
3950 0,
3951 lvd2cr0::Rn,
3952 lvd2cr0::Rn,
3953 Lvd2Cr0_SPEC,
3954 crate::common::RW,
3955 > {
3956 crate::common::RegisterField::<
3957 7,
3958 0x1,
3959 1,
3960 0,
3961 lvd2cr0::Rn,
3962 lvd2cr0::Rn,
3963 Lvd2Cr0_SPEC,
3964 crate::common::RW,
3965 >::from_register(self, 0)
3966 }
3967
3968 #[doc = "Voltage Monitor 2 Circuit Mode Select"]
3969 #[inline(always)]
3970 pub fn ri(
3971 self,
3972 ) -> crate::common::RegisterField<
3973 6,
3974 0x1,
3975 1,
3976 0,
3977 lvd2cr0::Ri,
3978 lvd2cr0::Ri,
3979 Lvd2Cr0_SPEC,
3980 crate::common::RW,
3981 > {
3982 crate::common::RegisterField::<
3983 6,
3984 0x1,
3985 1,
3986 0,
3987 lvd2cr0::Ri,
3988 lvd2cr0::Ri,
3989 Lvd2Cr0_SPEC,
3990 crate::common::RW,
3991 >::from_register(self, 0)
3992 }
3993
3994 #[doc = "Voltage Monitor 2 Circuit Comparison Result Output Enable"]
3995 #[inline(always)]
3996 pub fn cmpe(
3997 self,
3998 ) -> crate::common::RegisterField<
3999 2,
4000 0x1,
4001 1,
4002 0,
4003 lvd2cr0::Cmpe,
4004 lvd2cr0::Cmpe,
4005 Lvd2Cr0_SPEC,
4006 crate::common::RW,
4007 > {
4008 crate::common::RegisterField::<
4009 2,
4010 0x1,
4011 1,
4012 0,
4013 lvd2cr0::Cmpe,
4014 lvd2cr0::Cmpe,
4015 Lvd2Cr0_SPEC,
4016 crate::common::RW,
4017 >::from_register(self, 0)
4018 }
4019
4020 #[doc = "This bit is read as 0. The write value should be 0."]
4021 #[inline(always)]
4022 pub fn reserved(
4023 self,
4024 ) -> crate::common::RegisterFieldBool<1, 1, 0, Lvd2Cr0_SPEC, crate::common::RW> {
4025 crate::common::RegisterFieldBool::<1, 1, 0, Lvd2Cr0_SPEC, crate::common::RW>::from_register(
4026 self, 0,
4027 )
4028 }
4029
4030 #[doc = "Voltage Monitor 2 Interrupt/Reset Enable"]
4031 #[inline(always)]
4032 pub fn rie(
4033 self,
4034 ) -> crate::common::RegisterField<
4035 0,
4036 0x1,
4037 1,
4038 0,
4039 lvd2cr0::Rie,
4040 lvd2cr0::Rie,
4041 Lvd2Cr0_SPEC,
4042 crate::common::RW,
4043 > {
4044 crate::common::RegisterField::<
4045 0,
4046 0x1,
4047 1,
4048 0,
4049 lvd2cr0::Rie,
4050 lvd2cr0::Rie,
4051 Lvd2Cr0_SPEC,
4052 crate::common::RW,
4053 >::from_register(self, 0)
4054 }
4055}
4056impl ::core::default::Default for Lvd2Cr0 {
4057 #[inline(always)]
4058 fn default() -> Lvd2Cr0 {
4059 <crate::RegValueT<Lvd2Cr0_SPEC> as RegisterValue<_>>::new(128)
4060 }
4061}
4062pub mod lvd2cr0 {
4063
4064 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4065 pub struct Rn_SPEC;
4066 pub type Rn = crate::EnumBitfieldStruct<u8, Rn_SPEC>;
4067 impl Rn {
4068 #[doc = "Negation follows a stabilization time (tLVD2) after VCC > Vdet2 is detected."]
4069 pub const _0: Self = Self::new(0);
4070
4071 #[doc = "Negation follows a stabilization time (tLVD2) after assertion of the LVD2 reset."]
4072 pub const _1: Self = Self::new(1);
4073 }
4074 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4075 pub struct Ri_SPEC;
4076 pub type Ri = crate::EnumBitfieldStruct<u8, Ri_SPEC>;
4077 impl Ri {
4078 #[doc = "Voltage monitor 2 interrupt during Vdet2 passage"]
4079 pub const _0: Self = Self::new(0);
4080
4081 #[doc = "Voltage monitor 2 reset enabled when the voltage falls to and below Vdet2"]
4082 pub const _1: Self = Self::new(1);
4083 }
4084 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4085 pub struct Cmpe_SPEC;
4086 pub type Cmpe = crate::EnumBitfieldStruct<u8, Cmpe_SPEC>;
4087 impl Cmpe {
4088 #[doc = "Voltage monitor 2 circuit comparison result output disabled."]
4089 pub const _0: Self = Self::new(0);
4090
4091 #[doc = "Voltage monitor 2 circuit comparison result output enabled."]
4092 pub const _1: Self = Self::new(1);
4093 }
4094 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4095 pub struct Rie_SPEC;
4096 pub type Rie = crate::EnumBitfieldStruct<u8, Rie_SPEC>;
4097 impl Rie {
4098 #[doc = "Disabled"]
4099 pub const _0: Self = Self::new(0);
4100
4101 #[doc = "Enabled"]
4102 pub const _1: Self = Self::new(1);
4103 }
4104}
4105#[doc(hidden)]
4106#[derive(Copy, Clone, Eq, PartialEq)]
4107pub struct Lvd1Cr1_SPEC;
4108impl crate::sealed::RegSpec for Lvd1Cr1_SPEC {
4109 type DataType = u8;
4110}
4111
4112#[doc = "Voltage Monitor 1 Circuit Control Register 1"]
4113pub type Lvd1Cr1 = crate::RegValueT<Lvd1Cr1_SPEC>;
4114
4115impl Lvd1Cr1 {
4116 #[doc = "These bits are read as 00000. The write value should be 00000."]
4117 #[inline(always)]
4118 pub fn reserved(
4119 self,
4120 ) -> crate::common::RegisterField<3, 0x1f, 1, 0, u8, u8, Lvd1Cr1_SPEC, crate::common::RW> {
4121 crate::common::RegisterField::<3,0x1f,1,0,u8,u8,Lvd1Cr1_SPEC,crate::common::RW>::from_register(self,0)
4122 }
4123
4124 #[doc = "Voltage Monitor 1 Interrupt Type Select"]
4125 #[inline(always)]
4126 pub fn irqsel(
4127 self,
4128 ) -> crate::common::RegisterField<
4129 2,
4130 0x1,
4131 1,
4132 0,
4133 lvd1cr1::Irqsel,
4134 lvd1cr1::Irqsel,
4135 Lvd1Cr1_SPEC,
4136 crate::common::RW,
4137 > {
4138 crate::common::RegisterField::<
4139 2,
4140 0x1,
4141 1,
4142 0,
4143 lvd1cr1::Irqsel,
4144 lvd1cr1::Irqsel,
4145 Lvd1Cr1_SPEC,
4146 crate::common::RW,
4147 >::from_register(self, 0)
4148 }
4149
4150 #[doc = "Voltage Monitor 1 Interrupt Generation Condition Select"]
4151 #[inline(always)]
4152 pub fn idtsel(
4153 self,
4154 ) -> crate::common::RegisterField<
4155 0,
4156 0x3,
4157 1,
4158 0,
4159 lvd1cr1::Idtsel,
4160 lvd1cr1::Idtsel,
4161 Lvd1Cr1_SPEC,
4162 crate::common::RW,
4163 > {
4164 crate::common::RegisterField::<
4165 0,
4166 0x3,
4167 1,
4168 0,
4169 lvd1cr1::Idtsel,
4170 lvd1cr1::Idtsel,
4171 Lvd1Cr1_SPEC,
4172 crate::common::RW,
4173 >::from_register(self, 0)
4174 }
4175}
4176impl ::core::default::Default for Lvd1Cr1 {
4177 #[inline(always)]
4178 fn default() -> Lvd1Cr1 {
4179 <crate::RegValueT<Lvd1Cr1_SPEC> as RegisterValue<_>>::new(1)
4180 }
4181}
4182pub mod lvd1cr1 {
4183
4184 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4185 pub struct Irqsel_SPEC;
4186 pub type Irqsel = crate::EnumBitfieldStruct<u8, Irqsel_SPEC>;
4187 impl Irqsel {
4188 #[doc = "Non-maskable interrupt"]
4189 pub const _0: Self = Self::new(0);
4190
4191 #[doc = "Maskable interrupt"]
4192 pub const _1: Self = Self::new(1);
4193 }
4194 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4195 pub struct Idtsel_SPEC;
4196 pub type Idtsel = crate::EnumBitfieldStruct<u8, Idtsel_SPEC>;
4197 impl Idtsel {
4198 #[doc = "When VCC>=Vdet1 (rise) is detected"]
4199 pub const _00: Self = Self::new(0);
4200
4201 #[doc = "When VCC<Vdet1 (drop) is detected"]
4202 pub const _01: Self = Self::new(1);
4203
4204 #[doc = "When drop and rise are detected"]
4205 pub const _10: Self = Self::new(2);
4206
4207 #[doc = "Settings prohibited"]
4208 pub const _11: Self = Self::new(3);
4209 }
4210}
4211#[doc(hidden)]
4212#[derive(Copy, Clone, Eq, PartialEq)]
4213pub struct Lvd1Sr_SPEC;
4214impl crate::sealed::RegSpec for Lvd1Sr_SPEC {
4215 type DataType = u8;
4216}
4217
4218#[doc = "Voltage Monitor 1 Circuit Status Register"]
4219pub type Lvd1Sr = crate::RegValueT<Lvd1Sr_SPEC>;
4220
4221impl Lvd1Sr {
4222 #[doc = "These bits are read as 000000. The write value should be 000000."]
4223 #[inline(always)]
4224 pub fn reserved(
4225 self,
4226 ) -> crate::common::RegisterField<2, 0x3f, 1, 0, u8, u8, Lvd1Sr_SPEC, crate::common::RW> {
4227 crate::common::RegisterField::<2,0x3f,1,0,u8,u8,Lvd1Sr_SPEC,crate::common::RW>::from_register(self,0)
4228 }
4229
4230 #[doc = "Voltage Monitor 1 Signal Monitor Flag"]
4231 #[inline(always)]
4232 pub fn mon(
4233 self,
4234 ) -> crate::common::RegisterField<
4235 1,
4236 0x1,
4237 1,
4238 0,
4239 lvd1sr::Mon,
4240 lvd1sr::Mon,
4241 Lvd1Sr_SPEC,
4242 crate::common::R,
4243 > {
4244 crate::common::RegisterField::<
4245 1,
4246 0x1,
4247 1,
4248 0,
4249 lvd1sr::Mon,
4250 lvd1sr::Mon,
4251 Lvd1Sr_SPEC,
4252 crate::common::R,
4253 >::from_register(self, 0)
4254 }
4255
4256 #[doc = "Voltage Monitor 1 Voltage Change Detection Flag"]
4257 #[inline(always)]
4258 pub fn det(
4259 self,
4260 ) -> crate::common::RegisterField<
4261 0,
4262 0x1,
4263 1,
4264 0,
4265 lvd1sr::Det,
4266 lvd1sr::Det,
4267 Lvd1Sr_SPEC,
4268 crate::common::RW,
4269 > {
4270 crate::common::RegisterField::<
4271 0,
4272 0x1,
4273 1,
4274 0,
4275 lvd1sr::Det,
4276 lvd1sr::Det,
4277 Lvd1Sr_SPEC,
4278 crate::common::RW,
4279 >::from_register(self, 0)
4280 }
4281}
4282impl ::core::default::Default for Lvd1Sr {
4283 #[inline(always)]
4284 fn default() -> Lvd1Sr {
4285 <crate::RegValueT<Lvd1Sr_SPEC> as RegisterValue<_>>::new(2)
4286 }
4287}
4288pub mod lvd1sr {
4289
4290 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4291 pub struct Mon_SPEC;
4292 pub type Mon = crate::EnumBitfieldStruct<u8, Mon_SPEC>;
4293 impl Mon {
4294 #[doc = "VCC < Vdet1"]
4295 pub const _0: Self = Self::new(0);
4296
4297 #[doc = "VCC >= Vdet1 or MON is disabled"]
4298 pub const _1: Self = Self::new(1);
4299 }
4300 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4301 pub struct Det_SPEC;
4302 pub type Det = crate::EnumBitfieldStruct<u8, Det_SPEC>;
4303 impl Det {
4304 #[doc = "Not detected"]
4305 pub const _0: Self = Self::new(0);
4306
4307 #[doc = "Vdet1 passage detection"]
4308 pub const _1: Self = Self::new(1);
4309 }
4310}
4311#[doc(hidden)]
4312#[derive(Copy, Clone, Eq, PartialEq)]
4313pub struct Lvd2Cr1_SPEC;
4314impl crate::sealed::RegSpec for Lvd2Cr1_SPEC {
4315 type DataType = u8;
4316}
4317
4318#[doc = "Voltage Monitor 2 Circuit Control Register 1"]
4319pub type Lvd2Cr1 = crate::RegValueT<Lvd2Cr1_SPEC>;
4320
4321impl Lvd2Cr1 {
4322 #[doc = "These bits are read as 00000. The write value should be 00000."]
4323 #[inline(always)]
4324 pub fn reserved(
4325 self,
4326 ) -> crate::common::RegisterField<3, 0x1f, 1, 0, u8, u8, Lvd2Cr1_SPEC, crate::common::RW> {
4327 crate::common::RegisterField::<3,0x1f,1,0,u8,u8,Lvd2Cr1_SPEC,crate::common::RW>::from_register(self,0)
4328 }
4329
4330 #[doc = "Voltage Monitor 2 Interrupt Type Select"]
4331 #[inline(always)]
4332 pub fn irqsel(
4333 self,
4334 ) -> crate::common::RegisterField<
4335 2,
4336 0x1,
4337 1,
4338 0,
4339 lvd2cr1::Irqsel,
4340 lvd2cr1::Irqsel,
4341 Lvd2Cr1_SPEC,
4342 crate::common::RW,
4343 > {
4344 crate::common::RegisterField::<
4345 2,
4346 0x1,
4347 1,
4348 0,
4349 lvd2cr1::Irqsel,
4350 lvd2cr1::Irqsel,
4351 Lvd2Cr1_SPEC,
4352 crate::common::RW,
4353 >::from_register(self, 0)
4354 }
4355
4356 #[doc = "Voltage Monitor 2 Interrupt Generation Condition Select"]
4357 #[inline(always)]
4358 pub fn idtsel(
4359 self,
4360 ) -> crate::common::RegisterField<
4361 0,
4362 0x3,
4363 1,
4364 0,
4365 lvd2cr1::Idtsel,
4366 lvd2cr1::Idtsel,
4367 Lvd2Cr1_SPEC,
4368 crate::common::RW,
4369 > {
4370 crate::common::RegisterField::<
4371 0,
4372 0x3,
4373 1,
4374 0,
4375 lvd2cr1::Idtsel,
4376 lvd2cr1::Idtsel,
4377 Lvd2Cr1_SPEC,
4378 crate::common::RW,
4379 >::from_register(self, 0)
4380 }
4381}
4382impl ::core::default::Default for Lvd2Cr1 {
4383 #[inline(always)]
4384 fn default() -> Lvd2Cr1 {
4385 <crate::RegValueT<Lvd2Cr1_SPEC> as RegisterValue<_>>::new(1)
4386 }
4387}
4388pub mod lvd2cr1 {
4389
4390 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4391 pub struct Irqsel_SPEC;
4392 pub type Irqsel = crate::EnumBitfieldStruct<u8, Irqsel_SPEC>;
4393 impl Irqsel {
4394 #[doc = "Non-maskable interrupt"]
4395 pub const _0: Self = Self::new(0);
4396
4397 #[doc = "Maskable interrupt"]
4398 pub const _1: Self = Self::new(1);
4399 }
4400 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4401 pub struct Idtsel_SPEC;
4402 pub type Idtsel = crate::EnumBitfieldStruct<u8, Idtsel_SPEC>;
4403 impl Idtsel {
4404 #[doc = "When VCC>=Vdet2 (rise) is detected"]
4405 pub const _00: Self = Self::new(0);
4406
4407 #[doc = "When VCC<Vdet2 (drop) is detected"]
4408 pub const _01: Self = Self::new(1);
4409
4410 #[doc = "When drop and rise are detected"]
4411 pub const _10: Self = Self::new(2);
4412
4413 #[doc = "Settings prohibited"]
4414 pub const _11: Self = Self::new(3);
4415 }
4416}
4417#[doc(hidden)]
4418#[derive(Copy, Clone, Eq, PartialEq)]
4419pub struct Lvd2Sr_SPEC;
4420impl crate::sealed::RegSpec for Lvd2Sr_SPEC {
4421 type DataType = u8;
4422}
4423
4424#[doc = "Voltage Monitor 2 Circuit Status Register"]
4425pub type Lvd2Sr = crate::RegValueT<Lvd2Sr_SPEC>;
4426
4427impl Lvd2Sr {
4428 #[doc = "These bits are read as 000000. The write value should be 000000."]
4429 #[inline(always)]
4430 pub fn reserved(
4431 self,
4432 ) -> crate::common::RegisterField<2, 0x3f, 1, 0, u8, u8, Lvd2Sr_SPEC, crate::common::RW> {
4433 crate::common::RegisterField::<2,0x3f,1,0,u8,u8,Lvd2Sr_SPEC,crate::common::RW>::from_register(self,0)
4434 }
4435
4436 #[doc = "Voltage Monitor 2 Signal Monitor Flag"]
4437 #[inline(always)]
4438 pub fn mon(
4439 self,
4440 ) -> crate::common::RegisterField<
4441 1,
4442 0x1,
4443 1,
4444 0,
4445 lvd2sr::Mon,
4446 lvd2sr::Mon,
4447 Lvd2Sr_SPEC,
4448 crate::common::R,
4449 > {
4450 crate::common::RegisterField::<
4451 1,
4452 0x1,
4453 1,
4454 0,
4455 lvd2sr::Mon,
4456 lvd2sr::Mon,
4457 Lvd2Sr_SPEC,
4458 crate::common::R,
4459 >::from_register(self, 0)
4460 }
4461
4462 #[doc = "Voltage Monitor 2 Voltage Change Detection Flag"]
4463 #[inline(always)]
4464 pub fn det(
4465 self,
4466 ) -> crate::common::RegisterField<
4467 0,
4468 0x1,
4469 1,
4470 0,
4471 lvd2sr::Det,
4472 lvd2sr::Det,
4473 Lvd2Sr_SPEC,
4474 crate::common::RW,
4475 > {
4476 crate::common::RegisterField::<
4477 0,
4478 0x1,
4479 1,
4480 0,
4481 lvd2sr::Det,
4482 lvd2sr::Det,
4483 Lvd2Sr_SPEC,
4484 crate::common::RW,
4485 >::from_register(self, 0)
4486 }
4487}
4488impl ::core::default::Default for Lvd2Sr {
4489 #[inline(always)]
4490 fn default() -> Lvd2Sr {
4491 <crate::RegValueT<Lvd2Sr_SPEC> as RegisterValue<_>>::new(2)
4492 }
4493}
4494pub mod lvd2sr {
4495
4496 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4497 pub struct Mon_SPEC;
4498 pub type Mon = crate::EnumBitfieldStruct<u8, Mon_SPEC>;
4499 impl Mon {
4500 #[doc = "VCC < Vdet2"]
4501 pub const _0: Self = Self::new(0);
4502
4503 #[doc = "VCC >= Vdet2 or MON is disabled"]
4504 pub const _1: Self = Self::new(1);
4505 }
4506 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4507 pub struct Det_SPEC;
4508 pub type Det = crate::EnumBitfieldStruct<u8, Det_SPEC>;
4509 impl Det {
4510 #[doc = "Not detected"]
4511 pub const _0: Self = Self::new(0);
4512
4513 #[doc = "Vdet2 passage detection"]
4514 pub const _1: Self = Self::new(1);
4515 }
4516}
4517#[doc(hidden)]
4518#[derive(Copy, Clone, Eq, PartialEq)]
4519pub struct Syocdcr_SPEC;
4520impl crate::sealed::RegSpec for Syocdcr_SPEC {
4521 type DataType = u8;
4522}
4523
4524#[doc = "System Control OCD Control Register"]
4525pub type Syocdcr = crate::RegValueT<Syocdcr_SPEC>;
4526
4527impl Syocdcr {
4528 #[doc = "Debugger Enable"]
4529 #[inline(always)]
4530 pub fn dbgen(
4531 self,
4532 ) -> crate::common::RegisterField<
4533 7,
4534 0x1,
4535 1,
4536 0,
4537 syocdcr::Dbgen,
4538 syocdcr::Dbgen,
4539 Syocdcr_SPEC,
4540 crate::common::RW,
4541 > {
4542 crate::common::RegisterField::<
4543 7,
4544 0x1,
4545 1,
4546 0,
4547 syocdcr::Dbgen,
4548 syocdcr::Dbgen,
4549 Syocdcr_SPEC,
4550 crate::common::RW,
4551 >::from_register(self, 0)
4552 }
4553
4554 #[doc = "These bits are read as 0000000. The write value should be 0000000."]
4555 #[inline(always)]
4556 pub fn reserved(
4557 self,
4558 ) -> crate::common::RegisterField<0, 0x7f, 1, 0, u8, u8, Syocdcr_SPEC, crate::common::RW> {
4559 crate::common::RegisterField::<0,0x7f,1,0,u8,u8,Syocdcr_SPEC,crate::common::RW>::from_register(self,0)
4560 }
4561}
4562impl ::core::default::Default for Syocdcr {
4563 #[inline(always)]
4564 fn default() -> Syocdcr {
4565 <crate::RegValueT<Syocdcr_SPEC> as RegisterValue<_>>::new(0)
4566 }
4567}
4568pub mod syocdcr {
4569
4570 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4571 pub struct Dbgen_SPEC;
4572 pub type Dbgen = crate::EnumBitfieldStruct<u8, Dbgen_SPEC>;
4573 impl Dbgen {
4574 #[doc = "On-chip debugger is disabled"]
4575 pub const _0: Self = Self::new(0);
4576
4577 #[doc = "On-chip debugger is enabled"]
4578 pub const _1: Self = Self::new(1);
4579 }
4580}
4581#[doc(hidden)]
4582#[derive(Copy, Clone, Eq, PartialEq)]
4583pub struct Prcr_SPEC;
4584impl crate::sealed::RegSpec for Prcr_SPEC {
4585 type DataType = u16;
4586}
4587
4588#[doc = "Protect Register"]
4589pub type Prcr = crate::RegValueT<Prcr_SPEC>;
4590
4591impl Prcr {
4592 #[doc = "PRKEY Key Code"]
4593 #[inline(always)]
4594 pub fn prkey(
4595 self,
4596 ) -> crate::common::RegisterField<
4597 8,
4598 0xff,
4599 1,
4600 0,
4601 prcr::Prkey,
4602 prcr::Prkey,
4603 Prcr_SPEC,
4604 crate::common::W,
4605 > {
4606 crate::common::RegisterField::<
4607 8,
4608 0xff,
4609 1,
4610 0,
4611 prcr::Prkey,
4612 prcr::Prkey,
4613 Prcr_SPEC,
4614 crate::common::W,
4615 >::from_register(self, 0)
4616 }
4617
4618 #[doc = "Enables writing to the registers related to the LVD."]
4619 #[inline(always)]
4620 pub fn prc3(
4621 self,
4622 ) -> crate::common::RegisterField<
4623 3,
4624 0x1,
4625 1,
4626 0,
4627 prcr::Prc3,
4628 prcr::Prc3,
4629 Prcr_SPEC,
4630 crate::common::RW,
4631 > {
4632 crate::common::RegisterField::<
4633 3,
4634 0x1,
4635 1,
4636 0,
4637 prcr::Prc3,
4638 prcr::Prc3,
4639 Prcr_SPEC,
4640 crate::common::RW,
4641 >::from_register(self, 0)
4642 }
4643
4644 #[doc = "This bit is read as 0. The write value should be 0."]
4645 #[inline(always)]
4646 pub fn reserved(
4647 self,
4648 ) -> crate::common::RegisterFieldBool<2, 1, 0, Prcr_SPEC, crate::common::RW> {
4649 crate::common::RegisterFieldBool::<2, 1, 0, Prcr_SPEC, crate::common::RW>::from_register(
4650 self, 0,
4651 )
4652 }
4653
4654 #[doc = "Enables writing to the registers related to the operating modes, the low power consumption modes and the battery backup function."]
4655 #[inline(always)]
4656 pub fn prc1(
4657 self,
4658 ) -> crate::common::RegisterField<
4659 1,
4660 0x1,
4661 1,
4662 0,
4663 prcr::Prc1,
4664 prcr::Prc1,
4665 Prcr_SPEC,
4666 crate::common::RW,
4667 > {
4668 crate::common::RegisterField::<
4669 1,
4670 0x1,
4671 1,
4672 0,
4673 prcr::Prc1,
4674 prcr::Prc1,
4675 Prcr_SPEC,
4676 crate::common::RW,
4677 >::from_register(self, 0)
4678 }
4679
4680 #[doc = "Enables writing to the registers related to the clock generation circuit."]
4681 #[inline(always)]
4682 pub fn prc0(
4683 self,
4684 ) -> crate::common::RegisterField<
4685 0,
4686 0x1,
4687 1,
4688 0,
4689 prcr::Prc0,
4690 prcr::Prc0,
4691 Prcr_SPEC,
4692 crate::common::RW,
4693 > {
4694 crate::common::RegisterField::<
4695 0,
4696 0x1,
4697 1,
4698 0,
4699 prcr::Prc0,
4700 prcr::Prc0,
4701 Prcr_SPEC,
4702 crate::common::RW,
4703 >::from_register(self, 0)
4704 }
4705}
4706impl ::core::default::Default for Prcr {
4707 #[inline(always)]
4708 fn default() -> Prcr {
4709 <crate::RegValueT<Prcr_SPEC> as RegisterValue<_>>::new(0)
4710 }
4711}
4712pub mod prcr {
4713
4714 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4715 pub struct Prkey_SPEC;
4716 pub type Prkey = crate::EnumBitfieldStruct<u8, Prkey_SPEC>;
4717 impl Prkey {
4718 #[doc = "Enables writing to the PRCR register."]
4719 pub const _0_X_5_A: Self = Self::new(90);
4720 }
4721 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4722 pub struct Prc3_SPEC;
4723 pub type Prc3 = crate::EnumBitfieldStruct<u8, Prc3_SPEC>;
4724 impl Prc3 {
4725 #[doc = "Writes protected."]
4726 pub const _0: Self = Self::new(0);
4727
4728 #[doc = "Writes not protected."]
4729 pub const _1: Self = Self::new(1);
4730 }
4731 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4732 pub struct Prc1_SPEC;
4733 pub type Prc1 = crate::EnumBitfieldStruct<u8, Prc1_SPEC>;
4734 impl Prc1 {
4735 #[doc = "Writes protected."]
4736 pub const _0: Self = Self::new(0);
4737
4738 #[doc = "Writes not protected."]
4739 pub const _1: Self = Self::new(1);
4740 }
4741 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4742 pub struct Prc0_SPEC;
4743 pub type Prc0 = crate::EnumBitfieldStruct<u8, Prc0_SPEC>;
4744 impl Prc0 {
4745 #[doc = "Writes protected."]
4746 pub const _0: Self = Self::new(0);
4747
4748 #[doc = "Writes not protected."]
4749 pub const _1: Self = Self::new(1);
4750 }
4751}
4752#[doc(hidden)]
4753#[derive(Copy, Clone, Eq, PartialEq)]
4754pub struct Rstsr0_SPEC;
4755impl crate::sealed::RegSpec for Rstsr0_SPEC {
4756 type DataType = u8;
4757}
4758
4759#[doc = "Reset Status Register 0"]
4760pub type Rstsr0 = crate::RegValueT<Rstsr0_SPEC>;
4761
4762impl Rstsr0 {
4763 #[doc = "These bits are read as 0000. The write value should be 0000."]
4764 #[inline(always)]
4765 pub fn reserved(
4766 self,
4767 ) -> crate::common::RegisterField<4, 0xf, 1, 0, u8, u8, Rstsr0_SPEC, crate::common::RW> {
4768 crate::common::RegisterField::<4,0xf,1,0,u8,u8,Rstsr0_SPEC,crate::common::RW>::from_register(self,0)
4769 }
4770
4771 #[doc = "Voltage Monitor 2 Reset Detect FlagNote: Only 0 can be written to clear the flag. The reset flag must be written with 0 after the reset flag is read as 1."]
4772 #[inline(always)]
4773 pub fn lvd2rf(
4774 self,
4775 ) -> crate::common::RegisterField<
4776 3,
4777 0x1,
4778 1,
4779 0,
4780 rstsr0::Lvd2Rf,
4781 rstsr0::Lvd2Rf,
4782 Rstsr0_SPEC,
4783 crate::common::RW,
4784 > {
4785 crate::common::RegisterField::<
4786 3,
4787 0x1,
4788 1,
4789 0,
4790 rstsr0::Lvd2Rf,
4791 rstsr0::Lvd2Rf,
4792 Rstsr0_SPEC,
4793 crate::common::RW,
4794 >::from_register(self, 0)
4795 }
4796
4797 #[doc = "Voltage Monitor 1 Reset Detect FlagNote: Only 0 can be written to clear the flag. The reset flag must be written with 0 after the reset flag is read as 1."]
4798 #[inline(always)]
4799 pub fn lvd1rf(
4800 self,
4801 ) -> crate::common::RegisterField<
4802 2,
4803 0x1,
4804 1,
4805 0,
4806 rstsr0::Lvd1Rf,
4807 rstsr0::Lvd1Rf,
4808 Rstsr0_SPEC,
4809 crate::common::RW,
4810 > {
4811 crate::common::RegisterField::<
4812 2,
4813 0x1,
4814 1,
4815 0,
4816 rstsr0::Lvd1Rf,
4817 rstsr0::Lvd1Rf,
4818 Rstsr0_SPEC,
4819 crate::common::RW,
4820 >::from_register(self, 0)
4821 }
4822
4823 #[doc = "Voltage Monitor 0 Reset Detect FlagNote: Only 0 can be written to clear the flag. The reset flag must be written with 0 after the reset flag is read as 1."]
4824 #[inline(always)]
4825 pub fn lvd0rf(
4826 self,
4827 ) -> crate::common::RegisterField<
4828 1,
4829 0x1,
4830 1,
4831 0,
4832 rstsr0::Lvd0Rf,
4833 rstsr0::Lvd0Rf,
4834 Rstsr0_SPEC,
4835 crate::common::RW,
4836 > {
4837 crate::common::RegisterField::<
4838 1,
4839 0x1,
4840 1,
4841 0,
4842 rstsr0::Lvd0Rf,
4843 rstsr0::Lvd0Rf,
4844 Rstsr0_SPEC,
4845 crate::common::RW,
4846 >::from_register(self, 0)
4847 }
4848
4849 #[doc = "Power-On Reset Detect FlagNote: Only 0 can be written to clear the flag. The reset flag must be written with 0 after the reset flag is read as 1."]
4850 #[inline(always)]
4851 pub fn porf(
4852 self,
4853 ) -> crate::common::RegisterField<
4854 0,
4855 0x1,
4856 1,
4857 0,
4858 rstsr0::Porf,
4859 rstsr0::Porf,
4860 Rstsr0_SPEC,
4861 crate::common::RW,
4862 > {
4863 crate::common::RegisterField::<
4864 0,
4865 0x1,
4866 1,
4867 0,
4868 rstsr0::Porf,
4869 rstsr0::Porf,
4870 Rstsr0_SPEC,
4871 crate::common::RW,
4872 >::from_register(self, 0)
4873 }
4874}
4875impl ::core::default::Default for Rstsr0 {
4876 #[inline(always)]
4877 fn default() -> Rstsr0 {
4878 <crate::RegValueT<Rstsr0_SPEC> as RegisterValue<_>>::new(0)
4879 }
4880}
4881pub mod rstsr0 {
4882
4883 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4884 pub struct Lvd2Rf_SPEC;
4885 pub type Lvd2Rf = crate::EnumBitfieldStruct<u8, Lvd2Rf_SPEC>;
4886 impl Lvd2Rf {
4887 #[doc = "Voltage Monitor 2 reset not detected."]
4888 pub const _0: Self = Self::new(0);
4889
4890 #[doc = "Voltage Monitor 2 reset detected."]
4891 pub const _1: Self = Self::new(1);
4892 }
4893 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4894 pub struct Lvd1Rf_SPEC;
4895 pub type Lvd1Rf = crate::EnumBitfieldStruct<u8, Lvd1Rf_SPEC>;
4896 impl Lvd1Rf {
4897 #[doc = "Voltage Monitor 1 reset not detected."]
4898 pub const _0: Self = Self::new(0);
4899
4900 #[doc = "Voltage Monitor 1 reset detected."]
4901 pub const _1: Self = Self::new(1);
4902 }
4903 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4904 pub struct Lvd0Rf_SPEC;
4905 pub type Lvd0Rf = crate::EnumBitfieldStruct<u8, Lvd0Rf_SPEC>;
4906 impl Lvd0Rf {
4907 #[doc = "Voltage Monitor 0 reset not detected."]
4908 pub const _0: Self = Self::new(0);
4909
4910 #[doc = "Voltage Monitor 0 reset detected."]
4911 pub const _1: Self = Self::new(1);
4912 }
4913 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4914 pub struct Porf_SPEC;
4915 pub type Porf = crate::EnumBitfieldStruct<u8, Porf_SPEC>;
4916 impl Porf {
4917 #[doc = "Power-on reset not detected."]
4918 pub const _0: Self = Self::new(0);
4919
4920 #[doc = "Power-on reset detected."]
4921 pub const _1: Self = Self::new(1);
4922 }
4923}
4924#[doc(hidden)]
4925#[derive(Copy, Clone, Eq, PartialEq)]
4926pub struct Rstsr2_SPEC;
4927impl crate::sealed::RegSpec for Rstsr2_SPEC {
4928 type DataType = u8;
4929}
4930
4931#[doc = "Reset Status Register 2"]
4932pub type Rstsr2 = crate::RegValueT<Rstsr2_SPEC>;
4933
4934impl Rstsr2 {
4935 #[doc = "These bits are read as 0000000. The write value should be 0000000."]
4936 #[inline(always)]
4937 pub fn reserved(
4938 self,
4939 ) -> crate::common::RegisterField<1, 0x7f, 1, 0, u8, u8, Rstsr2_SPEC, crate::common::RW> {
4940 crate::common::RegisterField::<1,0x7f,1,0,u8,u8,Rstsr2_SPEC,crate::common::RW>::from_register(self,0)
4941 }
4942
4943 #[doc = "Cold/Warm Start Determination FlagNote: Only 1 can be written to set the flag."]
4944 #[inline(always)]
4945 pub fn cwsf(
4946 self,
4947 ) -> crate::common::RegisterField<
4948 0,
4949 0x1,
4950 1,
4951 0,
4952 rstsr2::Cwsf,
4953 rstsr2::Cwsf,
4954 Rstsr2_SPEC,
4955 crate::common::RW,
4956 > {
4957 crate::common::RegisterField::<
4958 0,
4959 0x1,
4960 1,
4961 0,
4962 rstsr2::Cwsf,
4963 rstsr2::Cwsf,
4964 Rstsr2_SPEC,
4965 crate::common::RW,
4966 >::from_register(self, 0)
4967 }
4968}
4969impl ::core::default::Default for Rstsr2 {
4970 #[inline(always)]
4971 fn default() -> Rstsr2 {
4972 <crate::RegValueT<Rstsr2_SPEC> as RegisterValue<_>>::new(0)
4973 }
4974}
4975pub mod rstsr2 {
4976
4977 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4978 pub struct Cwsf_SPEC;
4979 pub type Cwsf = crate::EnumBitfieldStruct<u8, Cwsf_SPEC>;
4980 impl Cwsf {
4981 #[doc = "Cold start"]
4982 pub const _0: Self = Self::new(0);
4983
4984 #[doc = "Warm start"]
4985 pub const _1: Self = Self::new(1);
4986 }
4987}
4988#[doc(hidden)]
4989#[derive(Copy, Clone, Eq, PartialEq)]
4990pub struct Rstsr1_SPEC;
4991impl crate::sealed::RegSpec for Rstsr1_SPEC {
4992 type DataType = u16;
4993}
4994
4995#[doc = "Reset Status Register 1"]
4996pub type Rstsr1 = crate::RegValueT<Rstsr1_SPEC>;
4997
4998impl Rstsr1 {
4999 #[doc = "SP Error Reset Detect FlagNote: Only 0 can be written to clear the flag. The reset flag must be written as 0 after the reset flag is read as 1."]
5000 #[inline(always)]
5001 pub fn sperf(
5002 self,
5003 ) -> crate::common::RegisterField<
5004 12,
5005 0x1,
5006 1,
5007 0,
5008 rstsr1::Sperf,
5009 rstsr1::Sperf,
5010 Rstsr1_SPEC,
5011 crate::common::RW,
5012 > {
5013 crate::common::RegisterField::<
5014 12,
5015 0x1,
5016 1,
5017 0,
5018 rstsr1::Sperf,
5019 rstsr1::Sperf,
5020 Rstsr1_SPEC,
5021 crate::common::RW,
5022 >::from_register(self, 0)
5023 }
5024
5025 #[doc = "Bus Master MPU Reset Detect FlagNote: Only 0 can be written to clear the flag. The reset flag must be written as 0 after the reset flag is read as 1."]
5026 #[inline(always)]
5027 pub fn busmrf(
5028 self,
5029 ) -> crate::common::RegisterField<
5030 11,
5031 0x1,
5032 1,
5033 0,
5034 rstsr1::Busmrf,
5035 rstsr1::Busmrf,
5036 Rstsr1_SPEC,
5037 crate::common::RW,
5038 > {
5039 crate::common::RegisterField::<
5040 11,
5041 0x1,
5042 1,
5043 0,
5044 rstsr1::Busmrf,
5045 rstsr1::Busmrf,
5046 Rstsr1_SPEC,
5047 crate::common::RW,
5048 >::from_register(self, 0)
5049 }
5050
5051 #[doc = "Bus Slave MPU Reset Detect FlagNote: Only 0 can be written to clear the flag. The reset flag must be written as 0 after the reset flag is read as 1."]
5052 #[inline(always)]
5053 pub fn bussrf(
5054 self,
5055 ) -> crate::common::RegisterField<
5056 10,
5057 0x1,
5058 1,
5059 0,
5060 rstsr1::Bussrf,
5061 rstsr1::Bussrf,
5062 Rstsr1_SPEC,
5063 crate::common::RW,
5064 > {
5065 crate::common::RegisterField::<
5066 10,
5067 0x1,
5068 1,
5069 0,
5070 rstsr1::Bussrf,
5071 rstsr1::Bussrf,
5072 Rstsr1_SPEC,
5073 crate::common::RW,
5074 >::from_register(self, 0)
5075 }
5076
5077 #[doc = "RAM ECC Error Reset Detect FlagNote: Only 0 can be written to clear the flag. The reset flag must be written as 0 after the reset flag is read as 1."]
5078 #[inline(always)]
5079 pub fn reerf(
5080 self,
5081 ) -> crate::common::RegisterField<
5082 9,
5083 0x1,
5084 1,
5085 0,
5086 rstsr1::Reerf,
5087 rstsr1::Reerf,
5088 Rstsr1_SPEC,
5089 crate::common::RW,
5090 > {
5091 crate::common::RegisterField::<
5092 9,
5093 0x1,
5094 1,
5095 0,
5096 rstsr1::Reerf,
5097 rstsr1::Reerf,
5098 Rstsr1_SPEC,
5099 crate::common::RW,
5100 >::from_register(self, 0)
5101 }
5102
5103 #[doc = "RAM Parity Error Reset Detect FlagNote: Only 0 can be written to clear the flag. The reset flag must be written as 0 after the reset flag is read as 1."]
5104 #[inline(always)]
5105 pub fn rperf(
5106 self,
5107 ) -> crate::common::RegisterField<
5108 8,
5109 0x1,
5110 1,
5111 0,
5112 rstsr1::Rperf,
5113 rstsr1::Rperf,
5114 Rstsr1_SPEC,
5115 crate::common::RW,
5116 > {
5117 crate::common::RegisterField::<
5118 8,
5119 0x1,
5120 1,
5121 0,
5122 rstsr1::Rperf,
5123 rstsr1::Rperf,
5124 Rstsr1_SPEC,
5125 crate::common::RW,
5126 >::from_register(self, 0)
5127 }
5128
5129 #[doc = "These bits are read as 00000. The write value should be 00000."]
5130 #[inline(always)]
5131 pub fn reserved(
5132 self,
5133 ) -> crate::common::RegisterField<3, 0x1f, 1, 0, u8, u8, Rstsr1_SPEC, crate::common::RW> {
5134 crate::common::RegisterField::<3,0x1f,1,0,u8,u8,Rstsr1_SPEC,crate::common::RW>::from_register(self,0)
5135 }
5136
5137 #[doc = "Software Reset Detect FlagNote: Only 0 can be written to clear the flag. The reset flag must be written as 0 after the reset flag is read as 1."]
5138 #[inline(always)]
5139 pub fn swrf(
5140 self,
5141 ) -> crate::common::RegisterField<
5142 2,
5143 0x1,
5144 1,
5145 0,
5146 rstsr1::Swrf,
5147 rstsr1::Swrf,
5148 Rstsr1_SPEC,
5149 crate::common::RW,
5150 > {
5151 crate::common::RegisterField::<
5152 2,
5153 0x1,
5154 1,
5155 0,
5156 rstsr1::Swrf,
5157 rstsr1::Swrf,
5158 Rstsr1_SPEC,
5159 crate::common::RW,
5160 >::from_register(self, 0)
5161 }
5162
5163 #[doc = "Watchdog Timer Reset Detect FlagNote: Only 0 can be written to clear the flag. The reset flag must be written as 0 after the reset flag is read as 1."]
5164 #[inline(always)]
5165 pub fn wdtrf(
5166 self,
5167 ) -> crate::common::RegisterField<
5168 1,
5169 0x1,
5170 1,
5171 0,
5172 rstsr1::Wdtrf,
5173 rstsr1::Wdtrf,
5174 Rstsr1_SPEC,
5175 crate::common::RW,
5176 > {
5177 crate::common::RegisterField::<
5178 1,
5179 0x1,
5180 1,
5181 0,
5182 rstsr1::Wdtrf,
5183 rstsr1::Wdtrf,
5184 Rstsr1_SPEC,
5185 crate::common::RW,
5186 >::from_register(self, 0)
5187 }
5188
5189 #[doc = "Independent Watchdog Timer Reset Detect FlagNote: Only 0 can be written to clear the flag. The reset flag must be written as 0 after the reset flag is read as 1."]
5190 #[inline(always)]
5191 pub fn iwdtrf(
5192 self,
5193 ) -> crate::common::RegisterField<
5194 0,
5195 0x1,
5196 1,
5197 0,
5198 rstsr1::Iwdtrf,
5199 rstsr1::Iwdtrf,
5200 Rstsr1_SPEC,
5201 crate::common::RW,
5202 > {
5203 crate::common::RegisterField::<
5204 0,
5205 0x1,
5206 1,
5207 0,
5208 rstsr1::Iwdtrf,
5209 rstsr1::Iwdtrf,
5210 Rstsr1_SPEC,
5211 crate::common::RW,
5212 >::from_register(self, 0)
5213 }
5214}
5215impl ::core::default::Default for Rstsr1 {
5216 #[inline(always)]
5217 fn default() -> Rstsr1 {
5218 <crate::RegValueT<Rstsr1_SPEC> as RegisterValue<_>>::new(0)
5219 }
5220}
5221pub mod rstsr1 {
5222
5223 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5224 pub struct Sperf_SPEC;
5225 pub type Sperf = crate::EnumBitfieldStruct<u8, Sperf_SPEC>;
5226 impl Sperf {
5227 #[doc = "SP error reset not detected."]
5228 pub const _0: Self = Self::new(0);
5229
5230 #[doc = "SP error reset detected."]
5231 pub const _1: Self = Self::new(1);
5232 }
5233 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5234 pub struct Busmrf_SPEC;
5235 pub type Busmrf = crate::EnumBitfieldStruct<u8, Busmrf_SPEC>;
5236 impl Busmrf {
5237 #[doc = "Bus Master MPU reset not detected."]
5238 pub const _0: Self = Self::new(0);
5239
5240 #[doc = "Bus Master MPU reset detected."]
5241 pub const _1: Self = Self::new(1);
5242 }
5243 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5244 pub struct Bussrf_SPEC;
5245 pub type Bussrf = crate::EnumBitfieldStruct<u8, Bussrf_SPEC>;
5246 impl Bussrf {
5247 #[doc = "Bus Slave MPU reset not detected."]
5248 pub const _0: Self = Self::new(0);
5249
5250 #[doc = "Bus Slave MPU reset detected."]
5251 pub const _1: Self = Self::new(1);
5252 }
5253 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5254 pub struct Reerf_SPEC;
5255 pub type Reerf = crate::EnumBitfieldStruct<u8, Reerf_SPEC>;
5256 impl Reerf {
5257 #[doc = "RAM ECC error reset not detected."]
5258 pub const _0: Self = Self::new(0);
5259
5260 #[doc = "RAM ECC error reset detected."]
5261 pub const _1: Self = Self::new(1);
5262 }
5263 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5264 pub struct Rperf_SPEC;
5265 pub type Rperf = crate::EnumBitfieldStruct<u8, Rperf_SPEC>;
5266 impl Rperf {
5267 #[doc = "RAM parity error reset not detected."]
5268 pub const _0: Self = Self::new(0);
5269
5270 #[doc = "RAM parity error reset detected."]
5271 pub const _1: Self = Self::new(1);
5272 }
5273 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5274 pub struct Swrf_SPEC;
5275 pub type Swrf = crate::EnumBitfieldStruct<u8, Swrf_SPEC>;
5276 impl Swrf {
5277 #[doc = "Software reset not detected."]
5278 pub const _0: Self = Self::new(0);
5279
5280 #[doc = "Software reset detected."]
5281 pub const _1: Self = Self::new(1);
5282 }
5283 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5284 pub struct Wdtrf_SPEC;
5285 pub type Wdtrf = crate::EnumBitfieldStruct<u8, Wdtrf_SPEC>;
5286 impl Wdtrf {
5287 #[doc = "Watchdog timer reset not detected."]
5288 pub const _0: Self = Self::new(0);
5289
5290 #[doc = "Watchdog timer reset detected."]
5291 pub const _1: Self = Self::new(1);
5292 }
5293 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5294 pub struct Iwdtrf_SPEC;
5295 pub type Iwdtrf = crate::EnumBitfieldStruct<u8, Iwdtrf_SPEC>;
5296 impl Iwdtrf {
5297 #[doc = "Independent watchdog timer reset not detected."]
5298 pub const _0: Self = Self::new(0);
5299
5300 #[doc = "Independent watchdog timer reset detected."]
5301 pub const _1: Self = Self::new(1);
5302 }
5303}