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