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"Realtime Clock"]
28unsafe impl ::core::marker::Send for super::Rtc {}
29unsafe impl ::core::marker::Sync for super::Rtc {}
30impl super::Rtc {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36
37 #[doc = "64-Hz Counter"]
38 #[inline(always)]
39 pub const fn r64cnt(&self) -> &'static crate::common::Reg<self::R64Cnt_SPEC, crate::common::R> {
40 unsafe {
41 crate::common::Reg::<self::R64Cnt_SPEC, crate::common::R>::from_ptr(
42 self._svd2pac_as_ptr().add(0usize),
43 )
44 }
45 }
46
47 #[doc = "Binary Counter %s"]
48 #[inline(always)]
49 pub const fn bcnt(
50 &self,
51 ) -> &'static crate::common::ClusterRegisterArray<
52 crate::common::Reg<self::Bcnt_SPEC, crate::common::RW>,
53 4,
54 0x2,
55 > {
56 unsafe {
57 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x2usize))
58 }
59 }
60 #[inline(always)]
61 pub const fn bcnt0(&self) -> &'static crate::common::Reg<self::Bcnt_SPEC, crate::common::RW> {
62 unsafe {
63 crate::common::Reg::<self::Bcnt_SPEC, crate::common::RW>::from_ptr(
64 self._svd2pac_as_ptr().add(0x2usize),
65 )
66 }
67 }
68 #[inline(always)]
69 pub const fn bcnt1(&self) -> &'static crate::common::Reg<self::Bcnt_SPEC, crate::common::RW> {
70 unsafe {
71 crate::common::Reg::<self::Bcnt_SPEC, crate::common::RW>::from_ptr(
72 self._svd2pac_as_ptr().add(0x4usize),
73 )
74 }
75 }
76 #[inline(always)]
77 pub const fn bcnt2(&self) -> &'static crate::common::Reg<self::Bcnt_SPEC, crate::common::RW> {
78 unsafe {
79 crate::common::Reg::<self::Bcnt_SPEC, crate::common::RW>::from_ptr(
80 self._svd2pac_as_ptr().add(0x6usize),
81 )
82 }
83 }
84 #[inline(always)]
85 pub const fn bcnt3(&self) -> &'static crate::common::Reg<self::Bcnt_SPEC, crate::common::RW> {
86 unsafe {
87 crate::common::Reg::<self::Bcnt_SPEC, crate::common::RW>::from_ptr(
88 self._svd2pac_as_ptr().add(0x8usize),
89 )
90 }
91 }
92
93 #[doc = "Second Counter (in Calendar Count Mode)"]
94 #[inline(always)]
95 pub const fn rseccnt(
96 &self,
97 ) -> &'static crate::common::Reg<self::Rseccnt_SPEC, crate::common::RW> {
98 unsafe {
99 crate::common::Reg::<self::Rseccnt_SPEC, crate::common::RW>::from_ptr(
100 self._svd2pac_as_ptr().add(2usize),
101 )
102 }
103 }
104
105 #[doc = "Minute Counter (in Calendar Count Mode)"]
106 #[inline(always)]
107 pub const fn rmincnt(
108 &self,
109 ) -> &'static crate::common::Reg<self::Rmincnt_SPEC, crate::common::RW> {
110 unsafe {
111 crate::common::Reg::<self::Rmincnt_SPEC, crate::common::RW>::from_ptr(
112 self._svd2pac_as_ptr().add(4usize),
113 )
114 }
115 }
116
117 #[doc = "Hour Counter (in Calendar Count Mode)"]
118 #[inline(always)]
119 pub const fn rhrcnt(
120 &self,
121 ) -> &'static crate::common::Reg<self::Rhrcnt_SPEC, crate::common::RW> {
122 unsafe {
123 crate::common::Reg::<self::Rhrcnt_SPEC, crate::common::RW>::from_ptr(
124 self._svd2pac_as_ptr().add(6usize),
125 )
126 }
127 }
128
129 #[doc = "Day-of-Week Counter (in Calendar Count Mode)"]
130 #[inline(always)]
131 pub const fn rwkcnt(
132 &self,
133 ) -> &'static crate::common::Reg<self::Rwkcnt_SPEC, crate::common::RW> {
134 unsafe {
135 crate::common::Reg::<self::Rwkcnt_SPEC, crate::common::RW>::from_ptr(
136 self._svd2pac_as_ptr().add(8usize),
137 )
138 }
139 }
140
141 #[doc = "Day Counter"]
142 #[inline(always)]
143 pub const fn rdaycnt(
144 &self,
145 ) -> &'static crate::common::Reg<self::Rdaycnt_SPEC, crate::common::RW> {
146 unsafe {
147 crate::common::Reg::<self::Rdaycnt_SPEC, crate::common::RW>::from_ptr(
148 self._svd2pac_as_ptr().add(10usize),
149 )
150 }
151 }
152
153 #[doc = "Month Counter"]
154 #[inline(always)]
155 pub const fn rmoncnt(
156 &self,
157 ) -> &'static crate::common::Reg<self::Rmoncnt_SPEC, crate::common::RW> {
158 unsafe {
159 crate::common::Reg::<self::Rmoncnt_SPEC, crate::common::RW>::from_ptr(
160 self._svd2pac_as_ptr().add(12usize),
161 )
162 }
163 }
164
165 #[doc = "Year Counter"]
166 #[inline(always)]
167 pub const fn ryrcnt(
168 &self,
169 ) -> &'static crate::common::Reg<self::Ryrcnt_SPEC, crate::common::RW> {
170 unsafe {
171 crate::common::Reg::<self::Ryrcnt_SPEC, crate::common::RW>::from_ptr(
172 self._svd2pac_as_ptr().add(14usize),
173 )
174 }
175 }
176
177 #[doc = "Binary Counter %s Alarm Register"]
178 #[inline(always)]
179 pub const fn bcntar(
180 &self,
181 ) -> &'static crate::common::ClusterRegisterArray<
182 crate::common::Reg<self::Bcntar_SPEC, crate::common::RW>,
183 4,
184 0x2,
185 > {
186 unsafe {
187 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x10usize))
188 }
189 }
190 #[inline(always)]
191 pub const fn bcnt0ar(
192 &self,
193 ) -> &'static crate::common::Reg<self::Bcntar_SPEC, crate::common::RW> {
194 unsafe {
195 crate::common::Reg::<self::Bcntar_SPEC, crate::common::RW>::from_ptr(
196 self._svd2pac_as_ptr().add(0x10usize),
197 )
198 }
199 }
200 #[inline(always)]
201 pub const fn bcnt1ar(
202 &self,
203 ) -> &'static crate::common::Reg<self::Bcntar_SPEC, crate::common::RW> {
204 unsafe {
205 crate::common::Reg::<self::Bcntar_SPEC, crate::common::RW>::from_ptr(
206 self._svd2pac_as_ptr().add(0x12usize),
207 )
208 }
209 }
210 #[inline(always)]
211 pub const fn bcnt2ar(
212 &self,
213 ) -> &'static crate::common::Reg<self::Bcntar_SPEC, crate::common::RW> {
214 unsafe {
215 crate::common::Reg::<self::Bcntar_SPEC, crate::common::RW>::from_ptr(
216 self._svd2pac_as_ptr().add(0x14usize),
217 )
218 }
219 }
220 #[inline(always)]
221 pub const fn bcnt3ar(
222 &self,
223 ) -> &'static crate::common::Reg<self::Bcntar_SPEC, crate::common::RW> {
224 unsafe {
225 crate::common::Reg::<self::Bcntar_SPEC, crate::common::RW>::from_ptr(
226 self._svd2pac_as_ptr().add(0x16usize),
227 )
228 }
229 }
230
231 #[doc = "Second Alarm Register (in Calendar Count Mode)"]
232 #[inline(always)]
233 pub const fn rsecar(
234 &self,
235 ) -> &'static crate::common::Reg<self::Rsecar_SPEC, crate::common::RW> {
236 unsafe {
237 crate::common::Reg::<self::Rsecar_SPEC, crate::common::RW>::from_ptr(
238 self._svd2pac_as_ptr().add(16usize),
239 )
240 }
241 }
242
243 #[doc = "Minute Alarm Register (in Calendar Count Mode)"]
244 #[inline(always)]
245 pub const fn rminar(
246 &self,
247 ) -> &'static crate::common::Reg<self::Rminar_SPEC, crate::common::RW> {
248 unsafe {
249 crate::common::Reg::<self::Rminar_SPEC, crate::common::RW>::from_ptr(
250 self._svd2pac_as_ptr().add(18usize),
251 )
252 }
253 }
254
255 #[doc = "Hour Alarm Register (in Calendar Count Mode)"]
256 #[inline(always)]
257 pub const fn rhrar(&self) -> &'static crate::common::Reg<self::Rhrar_SPEC, crate::common::RW> {
258 unsafe {
259 crate::common::Reg::<self::Rhrar_SPEC, crate::common::RW>::from_ptr(
260 self._svd2pac_as_ptr().add(20usize),
261 )
262 }
263 }
264
265 #[doc = "Day-of-Week Alarm Register (in Calendar Count Mode)"]
266 #[inline(always)]
267 pub const fn rwkar(&self) -> &'static crate::common::Reg<self::Rwkar_SPEC, crate::common::RW> {
268 unsafe {
269 crate::common::Reg::<self::Rwkar_SPEC, crate::common::RW>::from_ptr(
270 self._svd2pac_as_ptr().add(22usize),
271 )
272 }
273 }
274
275 #[doc = "Binary Counter %s Alarm Enable Register"]
276 #[inline(always)]
277 pub const fn bcntaer(
278 &self,
279 ) -> &'static crate::common::ClusterRegisterArray<
280 crate::common::Reg<self::Bcntaer_SPEC, crate::common::RW>,
281 2,
282 0x2,
283 > {
284 unsafe {
285 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x18usize))
286 }
287 }
288 #[inline(always)]
289 pub const fn bcnt0aer(
290 &self,
291 ) -> &'static crate::common::Reg<self::Bcntaer_SPEC, crate::common::RW> {
292 unsafe {
293 crate::common::Reg::<self::Bcntaer_SPEC, crate::common::RW>::from_ptr(
294 self._svd2pac_as_ptr().add(0x18usize),
295 )
296 }
297 }
298 #[inline(always)]
299 pub const fn bcnt1aer(
300 &self,
301 ) -> &'static crate::common::Reg<self::Bcntaer_SPEC, crate::common::RW> {
302 unsafe {
303 crate::common::Reg::<self::Bcntaer_SPEC, crate::common::RW>::from_ptr(
304 self._svd2pac_as_ptr().add(0x1ausize),
305 )
306 }
307 }
308
309 #[doc = "Date Alarm Register (in Calendar Count Mode)"]
310 #[inline(always)]
311 pub const fn rdayar(
312 &self,
313 ) -> &'static crate::common::Reg<self::Rdayar_SPEC, crate::common::RW> {
314 unsafe {
315 crate::common::Reg::<self::Rdayar_SPEC, crate::common::RW>::from_ptr(
316 self._svd2pac_as_ptr().add(24usize),
317 )
318 }
319 }
320
321 #[doc = "Month Alarm Register (in Calendar Count Mode)"]
322 #[inline(always)]
323 pub const fn rmonar(
324 &self,
325 ) -> &'static crate::common::Reg<self::Rmonar_SPEC, crate::common::RW> {
326 unsafe {
327 crate::common::Reg::<self::Rmonar_SPEC, crate::common::RW>::from_ptr(
328 self._svd2pac_as_ptr().add(26usize),
329 )
330 }
331 }
332
333 #[doc = "Binary Counter 2 Alarm Enable Register"]
334 #[inline(always)]
335 pub const fn bcnt2aer(
336 &self,
337 ) -> &'static crate::common::Reg<self::Bcnt2Aer_SPEC, crate::common::RW> {
338 unsafe {
339 crate::common::Reg::<self::Bcnt2Aer_SPEC, crate::common::RW>::from_ptr(
340 self._svd2pac_as_ptr().add(28usize),
341 )
342 }
343 }
344
345 #[doc = "Year Alarm Register (in Calendar Count Mode)"]
346 #[inline(always)]
347 pub const fn ryrar(&self) -> &'static crate::common::Reg<self::Ryrar_SPEC, crate::common::RW> {
348 unsafe {
349 crate::common::Reg::<self::Ryrar_SPEC, crate::common::RW>::from_ptr(
350 self._svd2pac_as_ptr().add(28usize),
351 )
352 }
353 }
354
355 #[doc = "Binary Counter 3 Alarm Enable Register"]
356 #[inline(always)]
357 pub const fn bcnt3aer(
358 &self,
359 ) -> &'static crate::common::Reg<self::Bcnt3Aer_SPEC, crate::common::RW> {
360 unsafe {
361 crate::common::Reg::<self::Bcnt3Aer_SPEC, crate::common::RW>::from_ptr(
362 self._svd2pac_as_ptr().add(30usize),
363 )
364 }
365 }
366
367 #[doc = "Year Alarm Enable Register (in Calendar Count Mode)"]
368 #[inline(always)]
369 pub const fn ryraren(
370 &self,
371 ) -> &'static crate::common::Reg<self::Ryraren_SPEC, crate::common::RW> {
372 unsafe {
373 crate::common::Reg::<self::Ryraren_SPEC, crate::common::RW>::from_ptr(
374 self._svd2pac_as_ptr().add(30usize),
375 )
376 }
377 }
378
379 #[doc = "RTC Control Register 1"]
380 #[inline(always)]
381 pub const fn rcr1(&self) -> &'static crate::common::Reg<self::Rcr1_SPEC, crate::common::RW> {
382 unsafe {
383 crate::common::Reg::<self::Rcr1_SPEC, crate::common::RW>::from_ptr(
384 self._svd2pac_as_ptr().add(34usize),
385 )
386 }
387 }
388
389 #[doc = "RTC Control Register 2 (in Calendar Count Mode)"]
390 #[inline(always)]
391 pub const fn rcr2(&self) -> &'static crate::common::Reg<self::Rcr2_SPEC, crate::common::RW> {
392 unsafe {
393 crate::common::Reg::<self::Rcr2_SPEC, crate::common::RW>::from_ptr(
394 self._svd2pac_as_ptr().add(36usize),
395 )
396 }
397 }
398
399 #[doc = "RTC Control Register 2 (in Binary Count Mode)"]
400 #[inline(always)]
401 pub const fn rcr2_bcnt(
402 &self,
403 ) -> &'static crate::common::Reg<self::Rcr2Bcnt_SPEC, crate::common::RW> {
404 unsafe {
405 crate::common::Reg::<self::Rcr2Bcnt_SPEC, crate::common::RW>::from_ptr(
406 self._svd2pac_as_ptr().add(36usize),
407 )
408 }
409 }
410
411 #[doc = "RTC Control Register 4"]
412 #[inline(always)]
413 pub const fn rcr4(&self) -> &'static crate::common::Reg<self::Rcr4_SPEC, crate::common::RW> {
414 unsafe {
415 crate::common::Reg::<self::Rcr4_SPEC, crate::common::RW>::from_ptr(
416 self._svd2pac_as_ptr().add(40usize),
417 )
418 }
419 }
420
421 #[doc = "Frequency Register H"]
422 #[inline(always)]
423 pub const fn rfrh(&self) -> &'static crate::common::Reg<self::Rfrh_SPEC, crate::common::RW> {
424 unsafe {
425 crate::common::Reg::<self::Rfrh_SPEC, crate::common::RW>::from_ptr(
426 self._svd2pac_as_ptr().add(42usize),
427 )
428 }
429 }
430
431 #[doc = "Frequency Register L"]
432 #[inline(always)]
433 pub const fn rfrl(&self) -> &'static crate::common::Reg<self::Rfrl_SPEC, crate::common::RW> {
434 unsafe {
435 crate::common::Reg::<self::Rfrl_SPEC, crate::common::RW>::from_ptr(
436 self._svd2pac_as_ptr().add(44usize),
437 )
438 }
439 }
440
441 #[doc = "Time Error Adjustment Register"]
442 #[inline(always)]
443 pub const fn radj(&self) -> &'static crate::common::Reg<self::Radj_SPEC, crate::common::RW> {
444 unsafe {
445 crate::common::Reg::<self::Radj_SPEC, crate::common::RW>::from_ptr(
446 self._svd2pac_as_ptr().add(46usize),
447 )
448 }
449 }
450}
451#[doc(hidden)]
452#[derive(Copy, Clone, Eq, PartialEq)]
453pub struct R64Cnt_SPEC;
454impl crate::sealed::RegSpec for R64Cnt_SPEC {
455 type DataType = u8;
456}
457
458#[doc = "64-Hz Counter"]
459pub type R64Cnt = crate::RegValueT<R64Cnt_SPEC>;
460
461impl R64Cnt {
462 #[doc = "64-Hz Flag"]
463 #[inline(always)]
464 pub fn f64hz(self) -> crate::common::RegisterFieldBool<0, 1, 0, R64Cnt_SPEC, crate::common::R> {
465 crate::common::RegisterFieldBool::<0, 1, 0, R64Cnt_SPEC, crate::common::R>::from_register(
466 self, 0,
467 )
468 }
469
470 #[doc = "32-Hz Flag"]
471 #[inline(always)]
472 pub fn f32hz(self) -> crate::common::RegisterFieldBool<1, 1, 0, R64Cnt_SPEC, crate::common::R> {
473 crate::common::RegisterFieldBool::<1, 1, 0, R64Cnt_SPEC, crate::common::R>::from_register(
474 self, 0,
475 )
476 }
477
478 #[doc = "16-Hz Flag"]
479 #[inline(always)]
480 pub fn f16hz(self) -> crate::common::RegisterFieldBool<2, 1, 0, R64Cnt_SPEC, crate::common::R> {
481 crate::common::RegisterFieldBool::<2, 1, 0, R64Cnt_SPEC, crate::common::R>::from_register(
482 self, 0,
483 )
484 }
485
486 #[doc = "8-Hz Flag"]
487 #[inline(always)]
488 pub fn f8hz(self) -> crate::common::RegisterFieldBool<3, 1, 0, R64Cnt_SPEC, crate::common::R> {
489 crate::common::RegisterFieldBool::<3, 1, 0, R64Cnt_SPEC, crate::common::R>::from_register(
490 self, 0,
491 )
492 }
493
494 #[doc = "4-Hz Flag"]
495 #[inline(always)]
496 pub fn f4hz(self) -> crate::common::RegisterFieldBool<4, 1, 0, R64Cnt_SPEC, crate::common::R> {
497 crate::common::RegisterFieldBool::<4, 1, 0, R64Cnt_SPEC, crate::common::R>::from_register(
498 self, 0,
499 )
500 }
501
502 #[doc = "2-Hz Flag"]
503 #[inline(always)]
504 pub fn f2hz(self) -> crate::common::RegisterFieldBool<5, 1, 0, R64Cnt_SPEC, crate::common::R> {
505 crate::common::RegisterFieldBool::<5, 1, 0, R64Cnt_SPEC, crate::common::R>::from_register(
506 self, 0,
507 )
508 }
509
510 #[doc = "1-Hz Flag"]
511 #[inline(always)]
512 pub fn f1hz(self) -> crate::common::RegisterFieldBool<6, 1, 0, R64Cnt_SPEC, crate::common::R> {
513 crate::common::RegisterFieldBool::<6, 1, 0, R64Cnt_SPEC, crate::common::R>::from_register(
514 self, 0,
515 )
516 }
517
518 #[inline(always)]
519 pub fn r64ovf(
520 self,
521 ) -> crate::common::RegisterFieldBool<7, 1, 0, R64Cnt_SPEC, crate::common::R> {
522 crate::common::RegisterFieldBool::<7, 1, 0, R64Cnt_SPEC, crate::common::R>::from_register(
523 self, 0,
524 )
525 }
526}
527impl ::core::default::Default for R64Cnt {
528 #[inline(always)]
529 fn default() -> R64Cnt {
530 <crate::RegValueT<R64Cnt_SPEC> as RegisterValue<_>>::new(0)
531 }
532}
533
534#[doc(hidden)]
535#[derive(Copy, Clone, Eq, PartialEq)]
536pub struct Bcnt_SPEC;
537impl crate::sealed::RegSpec for Bcnt_SPEC {
538 type DataType = u8;
539}
540
541#[doc = "Binary Counter %s"]
542pub type Bcnt = crate::RegValueT<Bcnt_SPEC>;
543
544impl Bcnt {
545 #[doc = "Binary Counter"]
546 #[inline(always)]
547 pub fn bcnt(
548 self,
549 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Bcnt_SPEC, crate::common::RW> {
550 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Bcnt_SPEC,crate::common::RW>::from_register(self,0)
551 }
552}
553impl ::core::default::Default for Bcnt {
554 #[inline(always)]
555 fn default() -> Bcnt {
556 <crate::RegValueT<Bcnt_SPEC> as RegisterValue<_>>::new(0)
557 }
558}
559
560#[doc(hidden)]
561#[derive(Copy, Clone, Eq, PartialEq)]
562pub struct Rseccnt_SPEC;
563impl crate::sealed::RegSpec for Rseccnt_SPEC {
564 type DataType = u8;
565}
566
567#[doc = "Second Counter (in Calendar Count Mode)"]
568pub type Rseccnt = crate::RegValueT<Rseccnt_SPEC>;
569
570impl Rseccnt {
571 #[doc = "1-Second Count"]
572 #[inline(always)]
573 pub fn sec1(
574 self,
575 ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Rseccnt_SPEC, crate::common::RW> {
576 crate::common::RegisterField::<0,0xf,1,0,u8,u8,Rseccnt_SPEC,crate::common::RW>::from_register(self,0)
577 }
578
579 #[doc = "10-Second Count"]
580 #[inline(always)]
581 pub fn sec10(
582 self,
583 ) -> crate::common::RegisterField<4, 0x7, 1, 0, u8, u8, Rseccnt_SPEC, crate::common::RW> {
584 crate::common::RegisterField::<4,0x7,1,0,u8,u8,Rseccnt_SPEC,crate::common::RW>::from_register(self,0)
585 }
586}
587impl ::core::default::Default for Rseccnt {
588 #[inline(always)]
589 fn default() -> Rseccnt {
590 <crate::RegValueT<Rseccnt_SPEC> as RegisterValue<_>>::new(0)
591 }
592}
593
594#[doc(hidden)]
595#[derive(Copy, Clone, Eq, PartialEq)]
596pub struct Rmincnt_SPEC;
597impl crate::sealed::RegSpec for Rmincnt_SPEC {
598 type DataType = u8;
599}
600
601#[doc = "Minute Counter (in Calendar Count Mode)"]
602pub type Rmincnt = crate::RegValueT<Rmincnt_SPEC>;
603
604impl Rmincnt {
605 #[doc = "1-Minute Count"]
606 #[inline(always)]
607 pub fn min1(
608 self,
609 ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Rmincnt_SPEC, crate::common::RW> {
610 crate::common::RegisterField::<0,0xf,1,0,u8,u8,Rmincnt_SPEC,crate::common::RW>::from_register(self,0)
611 }
612
613 #[doc = "10-Minute Count"]
614 #[inline(always)]
615 pub fn min10(
616 self,
617 ) -> crate::common::RegisterField<4, 0x7, 1, 0, u8, u8, Rmincnt_SPEC, crate::common::RW> {
618 crate::common::RegisterField::<4,0x7,1,0,u8,u8,Rmincnt_SPEC,crate::common::RW>::from_register(self,0)
619 }
620}
621impl ::core::default::Default for Rmincnt {
622 #[inline(always)]
623 fn default() -> Rmincnt {
624 <crate::RegValueT<Rmincnt_SPEC> as RegisterValue<_>>::new(0)
625 }
626}
627
628#[doc(hidden)]
629#[derive(Copy, Clone, Eq, PartialEq)]
630pub struct Rhrcnt_SPEC;
631impl crate::sealed::RegSpec for Rhrcnt_SPEC {
632 type DataType = u8;
633}
634
635#[doc = "Hour Counter (in Calendar Count Mode)"]
636pub type Rhrcnt = crate::RegValueT<Rhrcnt_SPEC>;
637
638impl Rhrcnt {
639 #[doc = "1-Hour Count"]
640 #[inline(always)]
641 pub fn hr1(
642 self,
643 ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Rhrcnt_SPEC, crate::common::RW> {
644 crate::common::RegisterField::<0,0xf,1,0,u8,u8,Rhrcnt_SPEC,crate::common::RW>::from_register(self,0)
645 }
646
647 #[doc = "10-Hour Count"]
648 #[inline(always)]
649 pub fn hr10(
650 self,
651 ) -> crate::common::RegisterField<4, 0x3, 1, 0, u8, u8, Rhrcnt_SPEC, crate::common::RW> {
652 crate::common::RegisterField::<4,0x3,1,0,u8,u8,Rhrcnt_SPEC,crate::common::RW>::from_register(self,0)
653 }
654
655 #[doc = "AM/PM select for time counter setting."]
656 #[inline(always)]
657 pub fn pm(
658 self,
659 ) -> crate::common::RegisterField<
660 6,
661 0x1,
662 1,
663 0,
664 rhrcnt::Pm,
665 rhrcnt::Pm,
666 Rhrcnt_SPEC,
667 crate::common::RW,
668 > {
669 crate::common::RegisterField::<
670 6,
671 0x1,
672 1,
673 0,
674 rhrcnt::Pm,
675 rhrcnt::Pm,
676 Rhrcnt_SPEC,
677 crate::common::RW,
678 >::from_register(self, 0)
679 }
680}
681impl ::core::default::Default for Rhrcnt {
682 #[inline(always)]
683 fn default() -> Rhrcnt {
684 <crate::RegValueT<Rhrcnt_SPEC> as RegisterValue<_>>::new(0)
685 }
686}
687pub mod rhrcnt {
688
689 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
690 pub struct Pm_SPEC;
691 pub type Pm = crate::EnumBitfieldStruct<u8, Pm_SPEC>;
692 impl Pm {
693 #[doc = "AM"]
694 pub const _0: Self = Self::new(0);
695
696 #[doc = "PM"]
697 pub const _1: Self = Self::new(1);
698 }
699}
700#[doc(hidden)]
701#[derive(Copy, Clone, Eq, PartialEq)]
702pub struct Rwkcnt_SPEC;
703impl crate::sealed::RegSpec for Rwkcnt_SPEC {
704 type DataType = u8;
705}
706
707#[doc = "Day-of-Week Counter (in Calendar Count Mode)"]
708pub type Rwkcnt = crate::RegValueT<Rwkcnt_SPEC>;
709
710impl Rwkcnt {
711 #[doc = "Day-of-Week Counting"]
712 #[inline(always)]
713 pub fn dayw(
714 self,
715 ) -> crate::common::RegisterField<
716 0,
717 0x7,
718 1,
719 0,
720 rwkcnt::Dayw,
721 rwkcnt::Dayw,
722 Rwkcnt_SPEC,
723 crate::common::RW,
724 > {
725 crate::common::RegisterField::<
726 0,
727 0x7,
728 1,
729 0,
730 rwkcnt::Dayw,
731 rwkcnt::Dayw,
732 Rwkcnt_SPEC,
733 crate::common::RW,
734 >::from_register(self, 0)
735 }
736}
737impl ::core::default::Default for Rwkcnt {
738 #[inline(always)]
739 fn default() -> Rwkcnt {
740 <crate::RegValueT<Rwkcnt_SPEC> as RegisterValue<_>>::new(0)
741 }
742}
743pub mod rwkcnt {
744
745 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
746 pub struct Dayw_SPEC;
747 pub type Dayw = crate::EnumBitfieldStruct<u8, Dayw_SPEC>;
748 impl Dayw {
749 #[doc = "Sunday"]
750 pub const _000: Self = Self::new(0);
751
752 #[doc = "Monday"]
753 pub const _001: Self = Self::new(1);
754
755 #[doc = "Tuesday"]
756 pub const _010: Self = Self::new(2);
757
758 #[doc = "Wednesday"]
759 pub const _011: Self = Self::new(3);
760
761 #[doc = "Thursday"]
762 pub const _100: Self = Self::new(4);
763
764 #[doc = "Friday"]
765 pub const _101: Self = Self::new(5);
766
767 #[doc = "Saturday"]
768 pub const _110: Self = Self::new(6);
769
770 #[doc = "Setting prohibited"]
771 pub const _111: Self = Self::new(7);
772 }
773}
774#[doc(hidden)]
775#[derive(Copy, Clone, Eq, PartialEq)]
776pub struct Rdaycnt_SPEC;
777impl crate::sealed::RegSpec for Rdaycnt_SPEC {
778 type DataType = u8;
779}
780
781#[doc = "Day Counter"]
782pub type Rdaycnt = crate::RegValueT<Rdaycnt_SPEC>;
783
784impl Rdaycnt {
785 #[doc = "1-Day Count"]
786 #[inline(always)]
787 pub fn date1(
788 self,
789 ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Rdaycnt_SPEC, crate::common::RW> {
790 crate::common::RegisterField::<0,0xf,1,0,u8,u8,Rdaycnt_SPEC,crate::common::RW>::from_register(self,0)
791 }
792
793 #[doc = "10-Day Count"]
794 #[inline(always)]
795 pub fn date10(
796 self,
797 ) -> crate::common::RegisterField<4, 0x3, 1, 0, u8, u8, Rdaycnt_SPEC, crate::common::RW> {
798 crate::common::RegisterField::<4,0x3,1,0,u8,u8,Rdaycnt_SPEC,crate::common::RW>::from_register(self,0)
799 }
800}
801impl ::core::default::Default for Rdaycnt {
802 #[inline(always)]
803 fn default() -> Rdaycnt {
804 <crate::RegValueT<Rdaycnt_SPEC> as RegisterValue<_>>::new(0)
805 }
806}
807
808#[doc(hidden)]
809#[derive(Copy, Clone, Eq, PartialEq)]
810pub struct Rmoncnt_SPEC;
811impl crate::sealed::RegSpec for Rmoncnt_SPEC {
812 type DataType = u8;
813}
814
815#[doc = "Month Counter"]
816pub type Rmoncnt = crate::RegValueT<Rmoncnt_SPEC>;
817
818impl Rmoncnt {
819 #[doc = "1-Month Count"]
820 #[inline(always)]
821 pub fn mon1(
822 self,
823 ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Rmoncnt_SPEC, crate::common::RW> {
824 crate::common::RegisterField::<0,0xf,1,0,u8,u8,Rmoncnt_SPEC,crate::common::RW>::from_register(self,0)
825 }
826
827 #[doc = "10-Month Count"]
828 #[inline(always)]
829 pub fn mon10(
830 self,
831 ) -> crate::common::RegisterFieldBool<4, 1, 0, Rmoncnt_SPEC, crate::common::RW> {
832 crate::common::RegisterFieldBool::<4, 1, 0, Rmoncnt_SPEC, crate::common::RW>::from_register(
833 self, 0,
834 )
835 }
836}
837impl ::core::default::Default for Rmoncnt {
838 #[inline(always)]
839 fn default() -> Rmoncnt {
840 <crate::RegValueT<Rmoncnt_SPEC> as RegisterValue<_>>::new(0)
841 }
842}
843
844#[doc(hidden)]
845#[derive(Copy, Clone, Eq, PartialEq)]
846pub struct Ryrcnt_SPEC;
847impl crate::sealed::RegSpec for Ryrcnt_SPEC {
848 type DataType = u16;
849}
850
851#[doc = "Year Counter"]
852pub type Ryrcnt = crate::RegValueT<Ryrcnt_SPEC>;
853
854impl Ryrcnt {
855 #[doc = "1-Year Count"]
856 #[inline(always)]
857 pub fn yr1(
858 self,
859 ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Ryrcnt_SPEC, crate::common::RW> {
860 crate::common::RegisterField::<0,0xf,1,0,u8,u8,Ryrcnt_SPEC,crate::common::RW>::from_register(self,0)
861 }
862
863 #[doc = "10-Year Count"]
864 #[inline(always)]
865 pub fn yr10(
866 self,
867 ) -> crate::common::RegisterField<4, 0xf, 1, 0, u8, u8, Ryrcnt_SPEC, crate::common::RW> {
868 crate::common::RegisterField::<4,0xf,1,0,u8,u8,Ryrcnt_SPEC,crate::common::RW>::from_register(self,0)
869 }
870}
871impl ::core::default::Default for Ryrcnt {
872 #[inline(always)]
873 fn default() -> Ryrcnt {
874 <crate::RegValueT<Ryrcnt_SPEC> as RegisterValue<_>>::new(0)
875 }
876}
877
878#[doc(hidden)]
879#[derive(Copy, Clone, Eq, PartialEq)]
880pub struct Bcntar_SPEC;
881impl crate::sealed::RegSpec for Bcntar_SPEC {
882 type DataType = u8;
883}
884
885#[doc = "Binary Counter %s Alarm Register"]
886pub type Bcntar = crate::RegValueT<Bcntar_SPEC>;
887
888impl Bcntar {
889 #[doc = "Alarm register associated with the 32-bit binary counter"]
890 #[inline(always)]
891 pub fn bcntar(
892 self,
893 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Bcntar_SPEC, crate::common::RW> {
894 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Bcntar_SPEC,crate::common::RW>::from_register(self,0)
895 }
896}
897impl ::core::default::Default for Bcntar {
898 #[inline(always)]
899 fn default() -> Bcntar {
900 <crate::RegValueT<Bcntar_SPEC> as RegisterValue<_>>::new(0)
901 }
902}
903
904#[doc(hidden)]
905#[derive(Copy, Clone, Eq, PartialEq)]
906pub struct Rsecar_SPEC;
907impl crate::sealed::RegSpec for Rsecar_SPEC {
908 type DataType = u8;
909}
910
911#[doc = "Second Alarm Register (in Calendar Count Mode)"]
912pub type Rsecar = crate::RegValueT<Rsecar_SPEC>;
913
914impl Rsecar {
915 #[doc = "1 Second"]
916 #[inline(always)]
917 pub fn sec1(
918 self,
919 ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Rsecar_SPEC, crate::common::RW> {
920 crate::common::RegisterField::<0,0xf,1,0,u8,u8,Rsecar_SPEC,crate::common::RW>::from_register(self,0)
921 }
922
923 #[doc = "10 Seconds"]
924 #[inline(always)]
925 pub fn sec10(
926 self,
927 ) -> crate::common::RegisterField<4, 0x7, 1, 0, u8, u8, Rsecar_SPEC, crate::common::RW> {
928 crate::common::RegisterField::<4,0x7,1,0,u8,u8,Rsecar_SPEC,crate::common::RW>::from_register(self,0)
929 }
930
931 #[doc = "ENB"]
932 #[inline(always)]
933 pub fn enb(
934 self,
935 ) -> crate::common::RegisterField<
936 7,
937 0x1,
938 1,
939 0,
940 rsecar::Enb,
941 rsecar::Enb,
942 Rsecar_SPEC,
943 crate::common::RW,
944 > {
945 crate::common::RegisterField::<
946 7,
947 0x1,
948 1,
949 0,
950 rsecar::Enb,
951 rsecar::Enb,
952 Rsecar_SPEC,
953 crate::common::RW,
954 >::from_register(self, 0)
955 }
956}
957impl ::core::default::Default for Rsecar {
958 #[inline(always)]
959 fn default() -> Rsecar {
960 <crate::RegValueT<Rsecar_SPEC> as RegisterValue<_>>::new(0)
961 }
962}
963pub mod rsecar {
964
965 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
966 pub struct Enb_SPEC;
967 pub type Enb = crate::EnumBitfieldStruct<u8, Enb_SPEC>;
968 impl Enb {
969 #[doc = "Do not compare register value with RSECCNT counter value"]
970 pub const _0: Self = Self::new(0);
971
972 #[doc = "Compare register value with RSECCNT counter value"]
973 pub const _1: Self = Self::new(1);
974 }
975}
976#[doc(hidden)]
977#[derive(Copy, Clone, Eq, PartialEq)]
978pub struct Rminar_SPEC;
979impl crate::sealed::RegSpec for Rminar_SPEC {
980 type DataType = u8;
981}
982
983#[doc = "Minute Alarm Register (in Calendar Count Mode)"]
984pub type Rminar = crate::RegValueT<Rminar_SPEC>;
985
986impl Rminar {
987 #[doc = "1 Minute"]
988 #[inline(always)]
989 pub fn min1(
990 self,
991 ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Rminar_SPEC, crate::common::RW> {
992 crate::common::RegisterField::<0,0xf,1,0,u8,u8,Rminar_SPEC,crate::common::RW>::from_register(self,0)
993 }
994
995 #[doc = "10 Minutes"]
996 #[inline(always)]
997 pub fn min10(
998 self,
999 ) -> crate::common::RegisterField<4, 0x7, 1, 0, u8, u8, Rminar_SPEC, crate::common::RW> {
1000 crate::common::RegisterField::<4,0x7,1,0,u8,u8,Rminar_SPEC,crate::common::RW>::from_register(self,0)
1001 }
1002
1003 #[doc = "ENB"]
1004 #[inline(always)]
1005 pub fn enb(
1006 self,
1007 ) -> crate::common::RegisterField<
1008 7,
1009 0x1,
1010 1,
1011 0,
1012 rminar::Enb,
1013 rminar::Enb,
1014 Rminar_SPEC,
1015 crate::common::RW,
1016 > {
1017 crate::common::RegisterField::<
1018 7,
1019 0x1,
1020 1,
1021 0,
1022 rminar::Enb,
1023 rminar::Enb,
1024 Rminar_SPEC,
1025 crate::common::RW,
1026 >::from_register(self, 0)
1027 }
1028}
1029impl ::core::default::Default for Rminar {
1030 #[inline(always)]
1031 fn default() -> Rminar {
1032 <crate::RegValueT<Rminar_SPEC> as RegisterValue<_>>::new(0)
1033 }
1034}
1035pub mod rminar {
1036
1037 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1038 pub struct Enb_SPEC;
1039 pub type Enb = crate::EnumBitfieldStruct<u8, Enb_SPEC>;
1040 impl Enb {
1041 #[doc = "Do not compare register value with RMINCNT counter value"]
1042 pub const _0: Self = Self::new(0);
1043
1044 #[doc = "Compare register value with RMINCNT counter value"]
1045 pub const _1: Self = Self::new(1);
1046 }
1047}
1048#[doc(hidden)]
1049#[derive(Copy, Clone, Eq, PartialEq)]
1050pub struct Rhrar_SPEC;
1051impl crate::sealed::RegSpec for Rhrar_SPEC {
1052 type DataType = u8;
1053}
1054
1055#[doc = "Hour Alarm Register (in Calendar Count Mode)"]
1056pub type Rhrar = crate::RegValueT<Rhrar_SPEC>;
1057
1058impl Rhrar {
1059 #[doc = "1 Hour"]
1060 #[inline(always)]
1061 pub fn hr1(
1062 self,
1063 ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Rhrar_SPEC, crate::common::RW> {
1064 crate::common::RegisterField::<0,0xf,1,0,u8,u8,Rhrar_SPEC,crate::common::RW>::from_register(self,0)
1065 }
1066
1067 #[doc = "10 Hours"]
1068 #[inline(always)]
1069 pub fn hr10(
1070 self,
1071 ) -> crate::common::RegisterField<4, 0x3, 1, 0, u8, u8, Rhrar_SPEC, crate::common::RW> {
1072 crate::common::RegisterField::<4,0x3,1,0,u8,u8,Rhrar_SPEC,crate::common::RW>::from_register(self,0)
1073 }
1074
1075 #[doc = "AM/PM select for alarm setting."]
1076 #[inline(always)]
1077 pub fn pm(
1078 self,
1079 ) -> crate::common::RegisterField<
1080 6,
1081 0x1,
1082 1,
1083 0,
1084 rhrar::Pm,
1085 rhrar::Pm,
1086 Rhrar_SPEC,
1087 crate::common::RW,
1088 > {
1089 crate::common::RegisterField::<
1090 6,
1091 0x1,
1092 1,
1093 0,
1094 rhrar::Pm,
1095 rhrar::Pm,
1096 Rhrar_SPEC,
1097 crate::common::RW,
1098 >::from_register(self, 0)
1099 }
1100
1101 #[doc = "ENB"]
1102 #[inline(always)]
1103 pub fn enb(
1104 self,
1105 ) -> crate::common::RegisterField<
1106 7,
1107 0x1,
1108 1,
1109 0,
1110 rhrar::Enb,
1111 rhrar::Enb,
1112 Rhrar_SPEC,
1113 crate::common::RW,
1114 > {
1115 crate::common::RegisterField::<
1116 7,
1117 0x1,
1118 1,
1119 0,
1120 rhrar::Enb,
1121 rhrar::Enb,
1122 Rhrar_SPEC,
1123 crate::common::RW,
1124 >::from_register(self, 0)
1125 }
1126}
1127impl ::core::default::Default for Rhrar {
1128 #[inline(always)]
1129 fn default() -> Rhrar {
1130 <crate::RegValueT<Rhrar_SPEC> as RegisterValue<_>>::new(0)
1131 }
1132}
1133pub mod rhrar {
1134
1135 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1136 pub struct Pm_SPEC;
1137 pub type Pm = crate::EnumBitfieldStruct<u8, Pm_SPEC>;
1138 impl Pm {
1139 #[doc = "AM"]
1140 pub const _0: Self = Self::new(0);
1141
1142 #[doc = "PM"]
1143 pub const _1: Self = Self::new(1);
1144 }
1145 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1146 pub struct Enb_SPEC;
1147 pub type Enb = crate::EnumBitfieldStruct<u8, Enb_SPEC>;
1148 impl Enb {
1149 #[doc = "Do not compare register value with RHRCNT counter value"]
1150 pub const _0: Self = Self::new(0);
1151
1152 #[doc = "Compare register value with RHRCNT counter value"]
1153 pub const _1: Self = Self::new(1);
1154 }
1155}
1156#[doc(hidden)]
1157#[derive(Copy, Clone, Eq, PartialEq)]
1158pub struct Rwkar_SPEC;
1159impl crate::sealed::RegSpec for Rwkar_SPEC {
1160 type DataType = u8;
1161}
1162
1163#[doc = "Day-of-Week Alarm Register (in Calendar Count Mode)"]
1164pub type Rwkar = crate::RegValueT<Rwkar_SPEC>;
1165
1166impl Rwkar {
1167 #[doc = "Day-of-Week Setting"]
1168 #[inline(always)]
1169 pub fn dayw(
1170 self,
1171 ) -> crate::common::RegisterField<
1172 0,
1173 0x7,
1174 1,
1175 0,
1176 rwkar::Dayw,
1177 rwkar::Dayw,
1178 Rwkar_SPEC,
1179 crate::common::RW,
1180 > {
1181 crate::common::RegisterField::<
1182 0,
1183 0x7,
1184 1,
1185 0,
1186 rwkar::Dayw,
1187 rwkar::Dayw,
1188 Rwkar_SPEC,
1189 crate::common::RW,
1190 >::from_register(self, 0)
1191 }
1192
1193 #[doc = "ENB"]
1194 #[inline(always)]
1195 pub fn enb(
1196 self,
1197 ) -> crate::common::RegisterField<
1198 7,
1199 0x1,
1200 1,
1201 0,
1202 rwkar::Enb,
1203 rwkar::Enb,
1204 Rwkar_SPEC,
1205 crate::common::RW,
1206 > {
1207 crate::common::RegisterField::<
1208 7,
1209 0x1,
1210 1,
1211 0,
1212 rwkar::Enb,
1213 rwkar::Enb,
1214 Rwkar_SPEC,
1215 crate::common::RW,
1216 >::from_register(self, 0)
1217 }
1218}
1219impl ::core::default::Default for Rwkar {
1220 #[inline(always)]
1221 fn default() -> Rwkar {
1222 <crate::RegValueT<Rwkar_SPEC> as RegisterValue<_>>::new(0)
1223 }
1224}
1225pub mod rwkar {
1226
1227 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1228 pub struct Dayw_SPEC;
1229 pub type Dayw = crate::EnumBitfieldStruct<u8, Dayw_SPEC>;
1230 impl Dayw {
1231 #[doc = "Sunday"]
1232 pub const _000: Self = Self::new(0);
1233
1234 #[doc = "Monday"]
1235 pub const _001: Self = Self::new(1);
1236
1237 #[doc = "Tuesday"]
1238 pub const _010: Self = Self::new(2);
1239
1240 #[doc = "Wednesday"]
1241 pub const _011: Self = Self::new(3);
1242
1243 #[doc = "Thursday"]
1244 pub const _100: Self = Self::new(4);
1245
1246 #[doc = "Friday"]
1247 pub const _101: Self = Self::new(5);
1248
1249 #[doc = "Saturday"]
1250 pub const _110: Self = Self::new(6);
1251
1252 #[doc = "Setting prohibited"]
1253 pub const _111: Self = Self::new(7);
1254 }
1255 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1256 pub struct Enb_SPEC;
1257 pub type Enb = crate::EnumBitfieldStruct<u8, Enb_SPEC>;
1258 impl Enb {
1259 #[doc = "Do not compare register value with RWKCNT counter value"]
1260 pub const _0: Self = Self::new(0);
1261
1262 #[doc = "Compare register value with RWKCNT counter value"]
1263 pub const _1: Self = Self::new(1);
1264 }
1265}
1266#[doc(hidden)]
1267#[derive(Copy, Clone, Eq, PartialEq)]
1268pub struct Bcntaer_SPEC;
1269impl crate::sealed::RegSpec for Bcntaer_SPEC {
1270 type DataType = u8;
1271}
1272
1273#[doc = "Binary Counter %s Alarm Enable Register"]
1274pub type Bcntaer = crate::RegValueT<Bcntaer_SPEC>;
1275
1276impl Bcntaer {
1277 #[doc = "Setting the alarm enable associated with the 32-bit binary counter"]
1278 #[inline(always)]
1279 pub fn enb(
1280 self,
1281 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Bcntaer_SPEC, crate::common::RW> {
1282 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Bcntaer_SPEC,crate::common::RW>::from_register(self,0)
1283 }
1284}
1285impl ::core::default::Default for Bcntaer {
1286 #[inline(always)]
1287 fn default() -> Bcntaer {
1288 <crate::RegValueT<Bcntaer_SPEC> as RegisterValue<_>>::new(0)
1289 }
1290}
1291
1292#[doc(hidden)]
1293#[derive(Copy, Clone, Eq, PartialEq)]
1294pub struct Rdayar_SPEC;
1295impl crate::sealed::RegSpec for Rdayar_SPEC {
1296 type DataType = u8;
1297}
1298
1299#[doc = "Date Alarm Register (in Calendar Count Mode)"]
1300pub type Rdayar = crate::RegValueT<Rdayar_SPEC>;
1301
1302impl Rdayar {
1303 #[doc = "1 Day"]
1304 #[inline(always)]
1305 pub fn date1(
1306 self,
1307 ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Rdayar_SPEC, crate::common::RW> {
1308 crate::common::RegisterField::<0,0xf,1,0,u8,u8,Rdayar_SPEC,crate::common::RW>::from_register(self,0)
1309 }
1310
1311 #[doc = "10 Days"]
1312 #[inline(always)]
1313 pub fn date10(
1314 self,
1315 ) -> crate::common::RegisterField<4, 0x3, 1, 0, u8, u8, Rdayar_SPEC, crate::common::RW> {
1316 crate::common::RegisterField::<4,0x3,1,0,u8,u8,Rdayar_SPEC,crate::common::RW>::from_register(self,0)
1317 }
1318
1319 #[doc = "ENB"]
1320 #[inline(always)]
1321 pub fn enb(
1322 self,
1323 ) -> crate::common::RegisterField<
1324 7,
1325 0x1,
1326 1,
1327 0,
1328 rdayar::Enb,
1329 rdayar::Enb,
1330 Rdayar_SPEC,
1331 crate::common::RW,
1332 > {
1333 crate::common::RegisterField::<
1334 7,
1335 0x1,
1336 1,
1337 0,
1338 rdayar::Enb,
1339 rdayar::Enb,
1340 Rdayar_SPEC,
1341 crate::common::RW,
1342 >::from_register(self, 0)
1343 }
1344}
1345impl ::core::default::Default for Rdayar {
1346 #[inline(always)]
1347 fn default() -> Rdayar {
1348 <crate::RegValueT<Rdayar_SPEC> as RegisterValue<_>>::new(0)
1349 }
1350}
1351pub mod rdayar {
1352
1353 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1354 pub struct Enb_SPEC;
1355 pub type Enb = crate::EnumBitfieldStruct<u8, Enb_SPEC>;
1356 impl Enb {
1357 #[doc = "Do not compare register value with RDAYCNT counter value"]
1358 pub const _0: Self = Self::new(0);
1359
1360 #[doc = "Compare register value with RDAYCNT counter value"]
1361 pub const _1: Self = Self::new(1);
1362 }
1363}
1364#[doc(hidden)]
1365#[derive(Copy, Clone, Eq, PartialEq)]
1366pub struct Rmonar_SPEC;
1367impl crate::sealed::RegSpec for Rmonar_SPEC {
1368 type DataType = u8;
1369}
1370
1371#[doc = "Month Alarm Register (in Calendar Count Mode)"]
1372pub type Rmonar = crate::RegValueT<Rmonar_SPEC>;
1373
1374impl Rmonar {
1375 #[doc = "1 Month"]
1376 #[inline(always)]
1377 pub fn mon1(
1378 self,
1379 ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Rmonar_SPEC, crate::common::RW> {
1380 crate::common::RegisterField::<0,0xf,1,0,u8,u8,Rmonar_SPEC,crate::common::RW>::from_register(self,0)
1381 }
1382
1383 #[doc = "10 Months"]
1384 #[inline(always)]
1385 pub fn mon10(
1386 self,
1387 ) -> crate::common::RegisterFieldBool<4, 1, 0, Rmonar_SPEC, crate::common::RW> {
1388 crate::common::RegisterFieldBool::<4, 1, 0, Rmonar_SPEC, crate::common::RW>::from_register(
1389 self, 0,
1390 )
1391 }
1392
1393 #[doc = "ENB"]
1394 #[inline(always)]
1395 pub fn enb(
1396 self,
1397 ) -> crate::common::RegisterField<
1398 7,
1399 0x1,
1400 1,
1401 0,
1402 rmonar::Enb,
1403 rmonar::Enb,
1404 Rmonar_SPEC,
1405 crate::common::RW,
1406 > {
1407 crate::common::RegisterField::<
1408 7,
1409 0x1,
1410 1,
1411 0,
1412 rmonar::Enb,
1413 rmonar::Enb,
1414 Rmonar_SPEC,
1415 crate::common::RW,
1416 >::from_register(self, 0)
1417 }
1418}
1419impl ::core::default::Default for Rmonar {
1420 #[inline(always)]
1421 fn default() -> Rmonar {
1422 <crate::RegValueT<Rmonar_SPEC> as RegisterValue<_>>::new(0)
1423 }
1424}
1425pub mod rmonar {
1426
1427 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1428 pub struct Enb_SPEC;
1429 pub type Enb = crate::EnumBitfieldStruct<u8, Enb_SPEC>;
1430 impl Enb {
1431 #[doc = "Do not compare register value with RMONCNT counter value"]
1432 pub const _0: Self = Self::new(0);
1433
1434 #[doc = "Compare register value with RMONCNT counter value"]
1435 pub const _1: Self = Self::new(1);
1436 }
1437}
1438#[doc(hidden)]
1439#[derive(Copy, Clone, Eq, PartialEq)]
1440pub struct Bcnt2Aer_SPEC;
1441impl crate::sealed::RegSpec for Bcnt2Aer_SPEC {
1442 type DataType = u16;
1443}
1444
1445#[doc = "Binary Counter 2 Alarm Enable Register"]
1446pub type Bcnt2Aer = crate::RegValueT<Bcnt2Aer_SPEC>;
1447
1448impl Bcnt2Aer {
1449 #[doc = "Setting the alarm enable associated with the 32-bit binary counter"]
1450 #[inline(always)]
1451 pub fn enb(
1452 self,
1453 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Bcnt2Aer_SPEC, crate::common::RW> {
1454 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Bcnt2Aer_SPEC,crate::common::RW>::from_register(self,0)
1455 }
1456}
1457impl ::core::default::Default for Bcnt2Aer {
1458 #[inline(always)]
1459 fn default() -> Bcnt2Aer {
1460 <crate::RegValueT<Bcnt2Aer_SPEC> as RegisterValue<_>>::new(0)
1461 }
1462}
1463
1464#[doc(hidden)]
1465#[derive(Copy, Clone, Eq, PartialEq)]
1466pub struct Ryrar_SPEC;
1467impl crate::sealed::RegSpec for Ryrar_SPEC {
1468 type DataType = u16;
1469}
1470
1471#[doc = "Year Alarm Register (in Calendar Count Mode)"]
1472pub type Ryrar = crate::RegValueT<Ryrar_SPEC>;
1473
1474impl Ryrar {
1475 #[doc = "1 Year"]
1476 #[inline(always)]
1477 pub fn yr1(
1478 self,
1479 ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Ryrar_SPEC, crate::common::RW> {
1480 crate::common::RegisterField::<0,0xf,1,0,u8,u8,Ryrar_SPEC,crate::common::RW>::from_register(self,0)
1481 }
1482
1483 #[doc = "10 Years"]
1484 #[inline(always)]
1485 pub fn yr10(
1486 self,
1487 ) -> crate::common::RegisterField<4, 0xf, 1, 0, u8, u8, Ryrar_SPEC, crate::common::RW> {
1488 crate::common::RegisterField::<4,0xf,1,0,u8,u8,Ryrar_SPEC,crate::common::RW>::from_register(self,0)
1489 }
1490}
1491impl ::core::default::Default for Ryrar {
1492 #[inline(always)]
1493 fn default() -> Ryrar {
1494 <crate::RegValueT<Ryrar_SPEC> as RegisterValue<_>>::new(0)
1495 }
1496}
1497
1498#[doc(hidden)]
1499#[derive(Copy, Clone, Eq, PartialEq)]
1500pub struct Bcnt3Aer_SPEC;
1501impl crate::sealed::RegSpec for Bcnt3Aer_SPEC {
1502 type DataType = u8;
1503}
1504
1505#[doc = "Binary Counter 3 Alarm Enable Register"]
1506pub type Bcnt3Aer = crate::RegValueT<Bcnt3Aer_SPEC>;
1507
1508impl Bcnt3Aer {
1509 #[doc = "Setting the alarm enable associated with the 32-bit binary counter"]
1510 #[inline(always)]
1511 pub fn enb(
1512 self,
1513 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Bcnt3Aer_SPEC, crate::common::RW> {
1514 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Bcnt3Aer_SPEC,crate::common::RW>::from_register(self,0)
1515 }
1516}
1517impl ::core::default::Default for Bcnt3Aer {
1518 #[inline(always)]
1519 fn default() -> Bcnt3Aer {
1520 <crate::RegValueT<Bcnt3Aer_SPEC> as RegisterValue<_>>::new(0)
1521 }
1522}
1523
1524#[doc(hidden)]
1525#[derive(Copy, Clone, Eq, PartialEq)]
1526pub struct Ryraren_SPEC;
1527impl crate::sealed::RegSpec for Ryraren_SPEC {
1528 type DataType = u8;
1529}
1530
1531#[doc = "Year Alarm Enable Register (in Calendar Count Mode)"]
1532pub type Ryraren = crate::RegValueT<Ryraren_SPEC>;
1533
1534impl Ryraren {
1535 #[doc = "ENB"]
1536 #[inline(always)]
1537 pub fn enb(
1538 self,
1539 ) -> crate::common::RegisterField<
1540 7,
1541 0x1,
1542 1,
1543 0,
1544 ryraren::Enb,
1545 ryraren::Enb,
1546 Ryraren_SPEC,
1547 crate::common::RW,
1548 > {
1549 crate::common::RegisterField::<
1550 7,
1551 0x1,
1552 1,
1553 0,
1554 ryraren::Enb,
1555 ryraren::Enb,
1556 Ryraren_SPEC,
1557 crate::common::RW,
1558 >::from_register(self, 0)
1559 }
1560}
1561impl ::core::default::Default for Ryraren {
1562 #[inline(always)]
1563 fn default() -> Ryraren {
1564 <crate::RegValueT<Ryraren_SPEC> as RegisterValue<_>>::new(0)
1565 }
1566}
1567pub mod ryraren {
1568
1569 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1570 pub struct Enb_SPEC;
1571 pub type Enb = crate::EnumBitfieldStruct<u8, Enb_SPEC>;
1572 impl Enb {
1573 #[doc = "Do not compare register value with the RYRCNT counter value"]
1574 pub const _0: Self = Self::new(0);
1575
1576 #[doc = "Compare register value with the RYRCNT counter value"]
1577 pub const _1: Self = Self::new(1);
1578 }
1579}
1580#[doc(hidden)]
1581#[derive(Copy, Clone, Eq, PartialEq)]
1582pub struct Rcr1_SPEC;
1583impl crate::sealed::RegSpec for Rcr1_SPEC {
1584 type DataType = u8;
1585}
1586
1587#[doc = "RTC Control Register 1"]
1588pub type Rcr1 = crate::RegValueT<Rcr1_SPEC>;
1589
1590impl Rcr1 {
1591 #[doc = "Alarm Interrupt Enable"]
1592 #[inline(always)]
1593 pub fn aie(
1594 self,
1595 ) -> crate::common::RegisterField<
1596 0,
1597 0x1,
1598 1,
1599 0,
1600 rcr1::Aie,
1601 rcr1::Aie,
1602 Rcr1_SPEC,
1603 crate::common::RW,
1604 > {
1605 crate::common::RegisterField::<
1606 0,
1607 0x1,
1608 1,
1609 0,
1610 rcr1::Aie,
1611 rcr1::Aie,
1612 Rcr1_SPEC,
1613 crate::common::RW,
1614 >::from_register(self, 0)
1615 }
1616
1617 #[doc = "Carry Interrupt Enable"]
1618 #[inline(always)]
1619 pub fn cie(
1620 self,
1621 ) -> crate::common::RegisterField<
1622 1,
1623 0x1,
1624 1,
1625 0,
1626 rcr1::Cie,
1627 rcr1::Cie,
1628 Rcr1_SPEC,
1629 crate::common::RW,
1630 > {
1631 crate::common::RegisterField::<
1632 1,
1633 0x1,
1634 1,
1635 0,
1636 rcr1::Cie,
1637 rcr1::Cie,
1638 Rcr1_SPEC,
1639 crate::common::RW,
1640 >::from_register(self, 0)
1641 }
1642
1643 #[doc = "Periodic Interrupt Enable"]
1644 #[inline(always)]
1645 pub fn pie(
1646 self,
1647 ) -> crate::common::RegisterField<
1648 2,
1649 0x1,
1650 1,
1651 0,
1652 rcr1::Pie,
1653 rcr1::Pie,
1654 Rcr1_SPEC,
1655 crate::common::RW,
1656 > {
1657 crate::common::RegisterField::<
1658 2,
1659 0x1,
1660 1,
1661 0,
1662 rcr1::Pie,
1663 rcr1::Pie,
1664 Rcr1_SPEC,
1665 crate::common::RW,
1666 >::from_register(self, 0)
1667 }
1668
1669 #[doc = "RTCOUT Output Select"]
1670 #[inline(always)]
1671 pub fn rtcos(
1672 self,
1673 ) -> crate::common::RegisterField<
1674 3,
1675 0x1,
1676 1,
1677 0,
1678 rcr1::Rtcos,
1679 rcr1::Rtcos,
1680 Rcr1_SPEC,
1681 crate::common::RW,
1682 > {
1683 crate::common::RegisterField::<
1684 3,
1685 0x1,
1686 1,
1687 0,
1688 rcr1::Rtcos,
1689 rcr1::Rtcos,
1690 Rcr1_SPEC,
1691 crate::common::RW,
1692 >::from_register(self, 0)
1693 }
1694
1695 #[doc = "Periodic Interrupt Select"]
1696 #[inline(always)]
1697 pub fn pes(
1698 self,
1699 ) -> crate::common::RegisterField<
1700 4,
1701 0xf,
1702 1,
1703 0,
1704 rcr1::Pes,
1705 rcr1::Pes,
1706 Rcr1_SPEC,
1707 crate::common::RW,
1708 > {
1709 crate::common::RegisterField::<
1710 4,
1711 0xf,
1712 1,
1713 0,
1714 rcr1::Pes,
1715 rcr1::Pes,
1716 Rcr1_SPEC,
1717 crate::common::RW,
1718 >::from_register(self, 0)
1719 }
1720}
1721impl ::core::default::Default for Rcr1 {
1722 #[inline(always)]
1723 fn default() -> Rcr1 {
1724 <crate::RegValueT<Rcr1_SPEC> as RegisterValue<_>>::new(0)
1725 }
1726}
1727pub mod rcr1 {
1728
1729 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1730 pub struct Aie_SPEC;
1731 pub type Aie = crate::EnumBitfieldStruct<u8, Aie_SPEC>;
1732 impl Aie {
1733 #[doc = "Disable alarm interrupt requests"]
1734 pub const _0: Self = Self::new(0);
1735
1736 #[doc = "Enable alarm interrupt requests"]
1737 pub const _1: Self = Self::new(1);
1738 }
1739 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1740 pub struct Cie_SPEC;
1741 pub type Cie = crate::EnumBitfieldStruct<u8, Cie_SPEC>;
1742 impl Cie {
1743 #[doc = "Disable carry interrupt requests"]
1744 pub const _0: Self = Self::new(0);
1745
1746 #[doc = "Enable carry interrupt requests"]
1747 pub const _1: Self = Self::new(1);
1748 }
1749 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1750 pub struct Pie_SPEC;
1751 pub type Pie = crate::EnumBitfieldStruct<u8, Pie_SPEC>;
1752 impl Pie {
1753 #[doc = "Disable periodic interrupt requests"]
1754 pub const _0: Self = Self::new(0);
1755
1756 #[doc = "Enable periodic interrupt requests"]
1757 pub const _1: Self = Self::new(1);
1758 }
1759 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1760 pub struct Rtcos_SPEC;
1761 pub type Rtcos = crate::EnumBitfieldStruct<u8, Rtcos_SPEC>;
1762 impl Rtcos {
1763 #[doc = "Outputs 1 Hz on RTCOUT"]
1764 pub const _0: Self = Self::new(0);
1765
1766 #[doc = "Outputs 64 Hz RTCOUT"]
1767 pub const _1: Self = Self::new(1);
1768 }
1769 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1770 pub struct Pes_SPEC;
1771 pub type Pes = crate::EnumBitfieldStruct<u8, Pes_SPEC>;
1772 impl Pes {
1773 #[doc = "Generate periodic interrupt every 1/256 second"]
1774 pub const _0_X_6: Self = Self::new(6);
1775
1776 #[doc = "Generate periodic interrupt every 1/128 second"]
1777 pub const _0_X_7: Self = Self::new(7);
1778
1779 #[doc = "Generate periodic interrupt every 1/64 second"]
1780 pub const _0_X_8: Self = Self::new(8);
1781
1782 #[doc = "Generate periodic interrupt every 1/32 second"]
1783 pub const _0_X_9: Self = Self::new(9);
1784
1785 #[doc = "Generate periodic interrupt every 1/16 second"]
1786 pub const _0_X_A: Self = Self::new(10);
1787
1788 #[doc = "Generate periodic interrupt every 1/8 second"]
1789 pub const _0_X_B: Self = Self::new(11);
1790
1791 #[doc = "Generate periodic interrupt every 1/4 second"]
1792 pub const _0_X_C: Self = Self::new(12);
1793
1794 #[doc = "Generate periodic interrupt every 1/2 second"]
1795 pub const _0_X_D: Self = Self::new(13);
1796
1797 #[doc = "Generate periodic interrupt every 1 second"]
1798 pub const _0_X_E: Self = Self::new(14);
1799
1800 #[doc = "Generate periodic interrupt every 2 seconds"]
1801 pub const _0_X_F: Self = Self::new(15);
1802 }
1803}
1804#[doc(hidden)]
1805#[derive(Copy, Clone, Eq, PartialEq)]
1806pub struct Rcr2_SPEC;
1807impl crate::sealed::RegSpec for Rcr2_SPEC {
1808 type DataType = u8;
1809}
1810
1811#[doc = "RTC Control Register 2 (in Calendar Count Mode)"]
1812pub type Rcr2 = crate::RegValueT<Rcr2_SPEC>;
1813
1814impl Rcr2 {
1815 #[doc = "Start"]
1816 #[inline(always)]
1817 pub fn start(
1818 self,
1819 ) -> crate::common::RegisterField<
1820 0,
1821 0x1,
1822 1,
1823 0,
1824 rcr2::Start,
1825 rcr2::Start,
1826 Rcr2_SPEC,
1827 crate::common::RW,
1828 > {
1829 crate::common::RegisterField::<
1830 0,
1831 0x1,
1832 1,
1833 0,
1834 rcr2::Start,
1835 rcr2::Start,
1836 Rcr2_SPEC,
1837 crate::common::RW,
1838 >::from_register(self, 0)
1839 }
1840
1841 #[doc = "RTC Software Reset"]
1842 #[inline(always)]
1843 pub fn reset(
1844 self,
1845 ) -> crate::common::RegisterField<
1846 1,
1847 0x1,
1848 1,
1849 0,
1850 rcr2::Reset,
1851 rcr2::Reset,
1852 Rcr2_SPEC,
1853 crate::common::RW,
1854 > {
1855 crate::common::RegisterField::<
1856 1,
1857 0x1,
1858 1,
1859 0,
1860 rcr2::Reset,
1861 rcr2::Reset,
1862 Rcr2_SPEC,
1863 crate::common::RW,
1864 >::from_register(self, 0)
1865 }
1866
1867 #[doc = "30-Second Adjustment"]
1868 #[inline(always)]
1869 pub fn adj30(
1870 self,
1871 ) -> crate::common::RegisterField<
1872 2,
1873 0x1,
1874 1,
1875 0,
1876 rcr2::Adj30,
1877 rcr2::Adj30,
1878 Rcr2_SPEC,
1879 crate::common::RW,
1880 > {
1881 crate::common::RegisterField::<
1882 2,
1883 0x1,
1884 1,
1885 0,
1886 rcr2::Adj30,
1887 rcr2::Adj30,
1888 Rcr2_SPEC,
1889 crate::common::RW,
1890 >::from_register(self, 0)
1891 }
1892
1893 #[doc = "RTCOUT Output Enable"]
1894 #[inline(always)]
1895 pub fn rtcoe(
1896 self,
1897 ) -> crate::common::RegisterField<
1898 3,
1899 0x1,
1900 1,
1901 0,
1902 rcr2::Rtcoe,
1903 rcr2::Rtcoe,
1904 Rcr2_SPEC,
1905 crate::common::RW,
1906 > {
1907 crate::common::RegisterField::<
1908 3,
1909 0x1,
1910 1,
1911 0,
1912 rcr2::Rtcoe,
1913 rcr2::Rtcoe,
1914 Rcr2_SPEC,
1915 crate::common::RW,
1916 >::from_register(self, 0)
1917 }
1918
1919 #[doc = "Automatic Adjustment Enable"]
1920 #[inline(always)]
1921 pub fn aadje(
1922 self,
1923 ) -> crate::common::RegisterField<
1924 4,
1925 0x1,
1926 1,
1927 0,
1928 rcr2::Aadje,
1929 rcr2::Aadje,
1930 Rcr2_SPEC,
1931 crate::common::RW,
1932 > {
1933 crate::common::RegisterField::<
1934 4,
1935 0x1,
1936 1,
1937 0,
1938 rcr2::Aadje,
1939 rcr2::Aadje,
1940 Rcr2_SPEC,
1941 crate::common::RW,
1942 >::from_register(self, 0)
1943 }
1944
1945 #[doc = "Automatic Adjustment Period Select"]
1946 #[inline(always)]
1947 pub fn aadjp(
1948 self,
1949 ) -> crate::common::RegisterField<
1950 5,
1951 0x1,
1952 1,
1953 0,
1954 rcr2::Aadjp,
1955 rcr2::Aadjp,
1956 Rcr2_SPEC,
1957 crate::common::RW,
1958 > {
1959 crate::common::RegisterField::<
1960 5,
1961 0x1,
1962 1,
1963 0,
1964 rcr2::Aadjp,
1965 rcr2::Aadjp,
1966 Rcr2_SPEC,
1967 crate::common::RW,
1968 >::from_register(self, 0)
1969 }
1970
1971 #[doc = "Hours Mode"]
1972 #[inline(always)]
1973 pub fn hr24(
1974 self,
1975 ) -> crate::common::RegisterField<
1976 6,
1977 0x1,
1978 1,
1979 0,
1980 rcr2::Hr24,
1981 rcr2::Hr24,
1982 Rcr2_SPEC,
1983 crate::common::RW,
1984 > {
1985 crate::common::RegisterField::<
1986 6,
1987 0x1,
1988 1,
1989 0,
1990 rcr2::Hr24,
1991 rcr2::Hr24,
1992 Rcr2_SPEC,
1993 crate::common::RW,
1994 >::from_register(self, 0)
1995 }
1996
1997 #[doc = "Count Mode Select"]
1998 #[inline(always)]
1999 pub fn cntmd(
2000 self,
2001 ) -> crate::common::RegisterField<
2002 7,
2003 0x1,
2004 1,
2005 0,
2006 rcr2::Cntmd,
2007 rcr2::Cntmd,
2008 Rcr2_SPEC,
2009 crate::common::RW,
2010 > {
2011 crate::common::RegisterField::<
2012 7,
2013 0x1,
2014 1,
2015 0,
2016 rcr2::Cntmd,
2017 rcr2::Cntmd,
2018 Rcr2_SPEC,
2019 crate::common::RW,
2020 >::from_register(self, 0)
2021 }
2022}
2023impl ::core::default::Default for Rcr2 {
2024 #[inline(always)]
2025 fn default() -> Rcr2 {
2026 <crate::RegValueT<Rcr2_SPEC> as RegisterValue<_>>::new(0)
2027 }
2028}
2029pub mod rcr2 {
2030
2031 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2032 pub struct Start_SPEC;
2033 pub type Start = crate::EnumBitfieldStruct<u8, Start_SPEC>;
2034 impl Start {
2035 #[doc = "Stop prescaler and time counter"]
2036 pub const _0: Self = Self::new(0);
2037
2038 #[doc = "Operate prescaler and time counter normally"]
2039 pub const _1: Self = Self::new(1);
2040 }
2041 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2042 pub struct Reset_SPEC;
2043 pub type Reset = crate::EnumBitfieldStruct<u8, Reset_SPEC>;
2044 impl Reset {
2045 #[doc = "In writing: Invalid (writing 0 has no effect). In reading: Normal time operation in progress, or an RTC software reset has completed."]
2046 pub const _0: Self = Self::new(0);
2047
2048 #[doc = "In writing: Initialize the prescaler and target registers for RTC software reset. In reading: RTC software reset in progress."]
2049 pub const _1: Self = Self::new(1);
2050 }
2051 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2052 pub struct Adj30_SPEC;
2053 pub type Adj30 = crate::EnumBitfieldStruct<u8, Adj30_SPEC>;
2054 impl Adj30 {
2055 #[doc = "In writing: Invalid (writing 0 has no effect). In reading: Normal time operation in progress, or 30-second adjustment has completed."]
2056 pub const _0: Self = Self::new(0);
2057
2058 #[doc = "In writing: Execute 30-second adjustment. In reading: 30-second adjustment in progress."]
2059 pub const _1: Self = Self::new(1);
2060 }
2061 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2062 pub struct Rtcoe_SPEC;
2063 pub type Rtcoe = crate::EnumBitfieldStruct<u8, Rtcoe_SPEC>;
2064 impl Rtcoe {
2065 #[doc = "Disable RTCOUT output"]
2066 pub const _0: Self = Self::new(0);
2067
2068 #[doc = "Enable RTCOUT output"]
2069 pub const _1: Self = Self::new(1);
2070 }
2071 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2072 pub struct Aadje_SPEC;
2073 pub type Aadje = crate::EnumBitfieldStruct<u8, Aadje_SPEC>;
2074 impl Aadje {
2075 #[doc = "Disable automatic adjustment"]
2076 pub const _0: Self = Self::new(0);
2077
2078 #[doc = "Enable automatic adjustment"]
2079 pub const _1: Self = Self::new(1);
2080 }
2081 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2082 pub struct Aadjp_SPEC;
2083 pub type Aadjp = crate::EnumBitfieldStruct<u8, Aadjp_SPEC>;
2084 impl Aadjp {
2085 #[doc = "In normal operation mode, adjust RADJ.ADJ\\[5:0\\] setting from the count value of the prescaler every minute. In low-consumption clock mode, adjust RADJ.ADJ\\[5:0\\] setting from the count value of the 64-Hz counter every day."]
2086 pub const _0: Self = Self::new(0);
2087
2088 #[doc = "In normal operation mode, adjust RADJ.ADJ\\[5:0\\] setting from the count value of the prescaler every 10 seconds. In low-consumption clock mode, adjust RADJ.ADJ\\[5:0\\] setting from the count value of the 64-Hz counter every hour."]
2089 pub const _1: Self = Self::new(1);
2090 }
2091 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2092 pub struct Hr24_SPEC;
2093 pub type Hr24 = crate::EnumBitfieldStruct<u8, Hr24_SPEC>;
2094 impl Hr24 {
2095 #[doc = "Operate RTC in 12-hour mode"]
2096 pub const _0: Self = Self::new(0);
2097
2098 #[doc = "Operate RTC in 24-hour mode"]
2099 pub const _1: Self = Self::new(1);
2100 }
2101 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2102 pub struct Cntmd_SPEC;
2103 pub type Cntmd = crate::EnumBitfieldStruct<u8, Cntmd_SPEC>;
2104 impl Cntmd {
2105 #[doc = "Calendar count mode"]
2106 pub const _0: Self = Self::new(0);
2107
2108 #[doc = "Binary count mode"]
2109 pub const _1: Self = Self::new(1);
2110 }
2111}
2112#[doc(hidden)]
2113#[derive(Copy, Clone, Eq, PartialEq)]
2114pub struct Rcr2Bcnt_SPEC;
2115impl crate::sealed::RegSpec for Rcr2Bcnt_SPEC {
2116 type DataType = u8;
2117}
2118
2119#[doc = "RTC Control Register 2 (in Binary Count Mode)"]
2120pub type Rcr2Bcnt = crate::RegValueT<Rcr2Bcnt_SPEC>;
2121
2122impl Rcr2Bcnt {
2123 #[doc = "Start"]
2124 #[inline(always)]
2125 pub fn start(
2126 self,
2127 ) -> crate::common::RegisterField<
2128 0,
2129 0x1,
2130 1,
2131 0,
2132 rcr2_bcnt::Start,
2133 rcr2_bcnt::Start,
2134 Rcr2Bcnt_SPEC,
2135 crate::common::RW,
2136 > {
2137 crate::common::RegisterField::<
2138 0,
2139 0x1,
2140 1,
2141 0,
2142 rcr2_bcnt::Start,
2143 rcr2_bcnt::Start,
2144 Rcr2Bcnt_SPEC,
2145 crate::common::RW,
2146 >::from_register(self, 0)
2147 }
2148
2149 #[doc = "RTC Software Reset"]
2150 #[inline(always)]
2151 pub fn reset(
2152 self,
2153 ) -> crate::common::RegisterField<
2154 1,
2155 0x1,
2156 1,
2157 0,
2158 rcr2_bcnt::Reset,
2159 rcr2_bcnt::Reset,
2160 Rcr2Bcnt_SPEC,
2161 crate::common::RW,
2162 > {
2163 crate::common::RegisterField::<
2164 1,
2165 0x1,
2166 1,
2167 0,
2168 rcr2_bcnt::Reset,
2169 rcr2_bcnt::Reset,
2170 Rcr2Bcnt_SPEC,
2171 crate::common::RW,
2172 >::from_register(self, 0)
2173 }
2174
2175 #[doc = "RTCOUT Output Enable"]
2176 #[inline(always)]
2177 pub fn rtcoe(
2178 self,
2179 ) -> crate::common::RegisterField<
2180 3,
2181 0x1,
2182 1,
2183 0,
2184 rcr2_bcnt::Rtcoe,
2185 rcr2_bcnt::Rtcoe,
2186 Rcr2Bcnt_SPEC,
2187 crate::common::RW,
2188 > {
2189 crate::common::RegisterField::<
2190 3,
2191 0x1,
2192 1,
2193 0,
2194 rcr2_bcnt::Rtcoe,
2195 rcr2_bcnt::Rtcoe,
2196 Rcr2Bcnt_SPEC,
2197 crate::common::RW,
2198 >::from_register(self, 0)
2199 }
2200
2201 #[doc = "Automatic Adjustment Enable"]
2202 #[inline(always)]
2203 pub fn aadje(
2204 self,
2205 ) -> crate::common::RegisterField<
2206 4,
2207 0x1,
2208 1,
2209 0,
2210 rcr2_bcnt::Aadje,
2211 rcr2_bcnt::Aadje,
2212 Rcr2Bcnt_SPEC,
2213 crate::common::RW,
2214 > {
2215 crate::common::RegisterField::<
2216 4,
2217 0x1,
2218 1,
2219 0,
2220 rcr2_bcnt::Aadje,
2221 rcr2_bcnt::Aadje,
2222 Rcr2Bcnt_SPEC,
2223 crate::common::RW,
2224 >::from_register(self, 0)
2225 }
2226
2227 #[doc = "Automatic Adjustment Period Select"]
2228 #[inline(always)]
2229 pub fn aadjp(
2230 self,
2231 ) -> crate::common::RegisterField<
2232 5,
2233 0x1,
2234 1,
2235 0,
2236 rcr2_bcnt::Aadjp,
2237 rcr2_bcnt::Aadjp,
2238 Rcr2Bcnt_SPEC,
2239 crate::common::RW,
2240 > {
2241 crate::common::RegisterField::<
2242 5,
2243 0x1,
2244 1,
2245 0,
2246 rcr2_bcnt::Aadjp,
2247 rcr2_bcnt::Aadjp,
2248 Rcr2Bcnt_SPEC,
2249 crate::common::RW,
2250 >::from_register(self, 0)
2251 }
2252
2253 #[doc = "Count Mode Select"]
2254 #[inline(always)]
2255 pub fn cntmd(
2256 self,
2257 ) -> crate::common::RegisterField<
2258 7,
2259 0x1,
2260 1,
2261 0,
2262 rcr2_bcnt::Cntmd,
2263 rcr2_bcnt::Cntmd,
2264 Rcr2Bcnt_SPEC,
2265 crate::common::RW,
2266 > {
2267 crate::common::RegisterField::<
2268 7,
2269 0x1,
2270 1,
2271 0,
2272 rcr2_bcnt::Cntmd,
2273 rcr2_bcnt::Cntmd,
2274 Rcr2Bcnt_SPEC,
2275 crate::common::RW,
2276 >::from_register(self, 0)
2277 }
2278}
2279impl ::core::default::Default for Rcr2Bcnt {
2280 #[inline(always)]
2281 fn default() -> Rcr2Bcnt {
2282 <crate::RegValueT<Rcr2Bcnt_SPEC> as RegisterValue<_>>::new(0)
2283 }
2284}
2285pub mod rcr2_bcnt {
2286
2287 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2288 pub struct Start_SPEC;
2289 pub type Start = crate::EnumBitfieldStruct<u8, Start_SPEC>;
2290 impl Start {
2291 #[doc = "Stop the 32-bit binary counter, 64-Hz counter, and prescaler"]
2292 pub const _0: Self = Self::new(0);
2293
2294 #[doc = "Operate the 32-bit binary counter, 64-Hz counter, and prescaler normally"]
2295 pub const _1: Self = Self::new(1);
2296 }
2297 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2298 pub struct Reset_SPEC;
2299 pub type Reset = crate::EnumBitfieldStruct<u8, Reset_SPEC>;
2300 impl Reset {
2301 #[doc = "In writing: Invalid (writing 0 has no effect). In reading: Normal time operation in progress, or an RTC software reset has completed."]
2302 pub const _0: Self = Self::new(0);
2303
2304 #[doc = "In writing: Initialize the prescaler and target registers for RTC software reset. In reading: RTC software reset in progress."]
2305 pub const _1: Self = Self::new(1);
2306 }
2307 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2308 pub struct Rtcoe_SPEC;
2309 pub type Rtcoe = crate::EnumBitfieldStruct<u8, Rtcoe_SPEC>;
2310 impl Rtcoe {
2311 #[doc = "Disable RTCOUT output"]
2312 pub const _0: Self = Self::new(0);
2313
2314 #[doc = "Enable RTCOUT output"]
2315 pub const _1: Self = Self::new(1);
2316 }
2317 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2318 pub struct Aadje_SPEC;
2319 pub type Aadje = crate::EnumBitfieldStruct<u8, Aadje_SPEC>;
2320 impl Aadje {
2321 #[doc = "Disable automatic adjustment"]
2322 pub const _0: Self = Self::new(0);
2323
2324 #[doc = "Enable automatic adjustment"]
2325 pub const _1: Self = Self::new(1);
2326 }
2327 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2328 pub struct Aadjp_SPEC;
2329 pub type Aadjp = crate::EnumBitfieldStruct<u8, Aadjp_SPEC>;
2330 impl Aadjp {
2331 #[doc = "In normal operation mode, add or subtract the RADJ.ADJ\\[5:0\\] bits from the prescaler count value every 32 seconds. In low-consumption clock mode, add or subtract the RADJ.ADJ\\[5:0\\] bits from the 64-Hz counter count value every 8192 seconds."]
2332 pub const _0: Self = Self::new(0);
2333
2334 #[doc = "In normal operation mode, add or subtract the RADJ.ADJ\\[5:0\\] bits from the prescaler count value every 8 seconds. In low-consumption clock mode, add or subtract the RADJ.ADJ\\[5:0\\] bits from the 64-Hz counter count value every 2048 seconds."]
2335 pub const _1: Self = Self::new(1);
2336 }
2337 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2338 pub struct Cntmd_SPEC;
2339 pub type Cntmd = crate::EnumBitfieldStruct<u8, Cntmd_SPEC>;
2340 impl Cntmd {
2341 #[doc = "Calendar count mode"]
2342 pub const _0: Self = Self::new(0);
2343
2344 #[doc = "Binary count mode"]
2345 pub const _1: Self = Self::new(1);
2346 }
2347}
2348#[doc(hidden)]
2349#[derive(Copy, Clone, Eq, PartialEq)]
2350pub struct Rcr4_SPEC;
2351impl crate::sealed::RegSpec for Rcr4_SPEC {
2352 type DataType = u8;
2353}
2354
2355#[doc = "RTC Control Register 4"]
2356pub type Rcr4 = crate::RegValueT<Rcr4_SPEC>;
2357
2358impl Rcr4 {
2359 #[doc = "Count Source Select in normal operation mode"]
2360 #[inline(always)]
2361 pub fn rcksel(
2362 self,
2363 ) -> crate::common::RegisterField<
2364 0,
2365 0x1,
2366 1,
2367 0,
2368 rcr4::Rcksel,
2369 rcr4::Rcksel,
2370 Rcr4_SPEC,
2371 crate::common::RW,
2372 > {
2373 crate::common::RegisterField::<
2374 0,
2375 0x1,
2376 1,
2377 0,
2378 rcr4::Rcksel,
2379 rcr4::Rcksel,
2380 Rcr4_SPEC,
2381 crate::common::RW,
2382 >::from_register(self, 0)
2383 }
2384
2385 #[doc = "RTC Operation Mode Select"]
2386 #[inline(always)]
2387 pub fn ropsel(
2388 self,
2389 ) -> crate::common::RegisterField<
2390 7,
2391 0x1,
2392 1,
2393 0,
2394 rcr4::Ropsel,
2395 rcr4::Ropsel,
2396 Rcr4_SPEC,
2397 crate::common::RW,
2398 > {
2399 crate::common::RegisterField::<
2400 7,
2401 0x1,
2402 1,
2403 0,
2404 rcr4::Ropsel,
2405 rcr4::Ropsel,
2406 Rcr4_SPEC,
2407 crate::common::RW,
2408 >::from_register(self, 0)
2409 }
2410}
2411impl ::core::default::Default for Rcr4 {
2412 #[inline(always)]
2413 fn default() -> Rcr4 {
2414 <crate::RegValueT<Rcr4_SPEC> as RegisterValue<_>>::new(0)
2415 }
2416}
2417pub mod rcr4 {
2418
2419 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2420 pub struct Rcksel_SPEC;
2421 pub type Rcksel = crate::EnumBitfieldStruct<u8, Rcksel_SPEC>;
2422 impl Rcksel {
2423 #[doc = "Sub-clock oscillator is selected"]
2424 pub const _0: Self = Self::new(0);
2425
2426 #[doc = "LOCO is selected"]
2427 pub const _1: Self = Self::new(1);
2428 }
2429 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2430 pub struct Ropsel_SPEC;
2431 pub type Ropsel = crate::EnumBitfieldStruct<u8, Ropsel_SPEC>;
2432 impl Ropsel {
2433 #[doc = "Normal operation mode is selected."]
2434 pub const _0: Self = Self::new(0);
2435
2436 #[doc = "Low-consumption clock mode is selected."]
2437 pub const _1: Self = Self::new(1);
2438 }
2439}
2440#[doc(hidden)]
2441#[derive(Copy, Clone, Eq, PartialEq)]
2442pub struct Rfrh_SPEC;
2443impl crate::sealed::RegSpec for Rfrh_SPEC {
2444 type DataType = u16;
2445}
2446
2447#[doc = "Frequency Register H"]
2448pub type Rfrh = crate::RegValueT<Rfrh_SPEC>;
2449
2450impl Rfrh {
2451 #[doc = "Write 0 before writing to the RFRL register after a cold start."]
2452 #[inline(always)]
2453 pub fn rfc16(self) -> crate::common::RegisterFieldBool<0, 1, 0, Rfrh_SPEC, crate::common::RW> {
2454 crate::common::RegisterFieldBool::<0, 1, 0, Rfrh_SPEC, crate::common::RW>::from_register(
2455 self, 0,
2456 )
2457 }
2458}
2459impl ::core::default::Default for Rfrh {
2460 #[inline(always)]
2461 fn default() -> Rfrh {
2462 <crate::RegValueT<Rfrh_SPEC> as RegisterValue<_>>::new(0)
2463 }
2464}
2465
2466#[doc(hidden)]
2467#[derive(Copy, Clone, Eq, PartialEq)]
2468pub struct Rfrl_SPEC;
2469impl crate::sealed::RegSpec for Rfrl_SPEC {
2470 type DataType = u16;
2471}
2472
2473#[doc = "Frequency Register L"]
2474pub type Rfrl = crate::RegValueT<Rfrl_SPEC>;
2475
2476impl Rfrl {
2477 #[doc = "Frequency Comparison Value"]
2478 #[inline(always)]
2479 pub fn rfc(
2480 self,
2481 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Rfrl_SPEC, crate::common::RW> {
2482 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Rfrl_SPEC,crate::common::RW>::from_register(self,0)
2483 }
2484}
2485impl ::core::default::Default for Rfrl {
2486 #[inline(always)]
2487 fn default() -> Rfrl {
2488 <crate::RegValueT<Rfrl_SPEC> as RegisterValue<_>>::new(0)
2489 }
2490}
2491
2492#[doc(hidden)]
2493#[derive(Copy, Clone, Eq, PartialEq)]
2494pub struct Radj_SPEC;
2495impl crate::sealed::RegSpec for Radj_SPEC {
2496 type DataType = u8;
2497}
2498
2499#[doc = "Time Error Adjustment Register"]
2500pub type Radj = crate::RegValueT<Radj_SPEC>;
2501
2502impl Radj {
2503 #[doc = "Adjustment Value"]
2504 #[inline(always)]
2505 pub fn adj(
2506 self,
2507 ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, Radj_SPEC, crate::common::RW> {
2508 crate::common::RegisterField::<0,0x3f,1,0,u8,u8,Radj_SPEC,crate::common::RW>::from_register(self,0)
2509 }
2510
2511 #[doc = "Plus-Minus"]
2512 #[inline(always)]
2513 pub fn pmadj(
2514 self,
2515 ) -> crate::common::RegisterField<
2516 6,
2517 0x3,
2518 1,
2519 0,
2520 radj::Pmadj,
2521 radj::Pmadj,
2522 Radj_SPEC,
2523 crate::common::RW,
2524 > {
2525 crate::common::RegisterField::<
2526 6,
2527 0x3,
2528 1,
2529 0,
2530 radj::Pmadj,
2531 radj::Pmadj,
2532 Radj_SPEC,
2533 crate::common::RW,
2534 >::from_register(self, 0)
2535 }
2536}
2537impl ::core::default::Default for Radj {
2538 #[inline(always)]
2539 fn default() -> Radj {
2540 <crate::RegValueT<Radj_SPEC> as RegisterValue<_>>::new(0)
2541 }
2542}
2543pub mod radj {
2544
2545 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2546 pub struct Pmadj_SPEC;
2547 pub type Pmadj = crate::EnumBitfieldStruct<u8, Pmadj_SPEC>;
2548 impl Pmadj {
2549 #[doc = "Do not perform adjustment."]
2550 pub const _00: Self = Self::new(0);
2551
2552 #[doc = "In normal operation mode, adjustment is performed by the addition to the prescaler. In low-consumption clock mode, adjustment is performed by the addition to the 64-Hz counter."]
2553 pub const _01: Self = Self::new(1);
2554
2555 #[doc = "In normal operation mode, adjustment is performed by the subtraction from the prescaler. In low-consumption clock mode, adjustment is performed by the subtraction from the 64-Hz counter."]
2556 pub const _10: Self = Self::new(2);
2557
2558 #[doc = "Setting prohibited."]
2559 pub const _11: Self = Self::new(3);
2560 }
2561}