Skip to main content

ra0e1_pac/
rtc_c.rs

1/*
2DISCLAIMER
3This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
4No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
5applicable laws, including copyright laws.
6THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
7OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
8NON-INFRINGEMENT.  ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
9LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
10INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
11ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
13of this software. By using this software, you agree to the additional terms and conditions found by accessing the
14following link:
15http://www.renesas.com/disclaimer
16
17*/
18// Generated from SVD 1.10.00, with svd2pac 0.6.1 on Sun, 15 Mar 2026 07:00:13 +0000
19
20#![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::RtcC {}
29unsafe impl ::core::marker::Sync for super::RtcC {}
30impl super::RtcC {
31    #[allow(unused)]
32    #[inline(always)]
33    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34        self.ptr
35    }
36
37    #[doc = "Second Count Register"]
38    #[inline(always)]
39    pub const fn sec(&self) -> &'static crate::common::Reg<self::Sec_SPEC, crate::common::RW> {
40        unsafe {
41            crate::common::Reg::<self::Sec_SPEC, crate::common::RW>::from_ptr(
42                self._svd2pac_as_ptr().add(0usize),
43            )
44        }
45    }
46
47    #[doc = "Minute Count Register"]
48    #[inline(always)]
49    pub const fn min(&self) -> &'static crate::common::Reg<self::Min_SPEC, crate::common::RW> {
50        unsafe {
51            crate::common::Reg::<self::Min_SPEC, crate::common::RW>::from_ptr(
52                self._svd2pac_as_ptr().add(1usize),
53            )
54        }
55    }
56
57    #[doc = "Hour Count Register"]
58    #[inline(always)]
59    pub const fn hour(&self) -> &'static crate::common::Reg<self::Hour_SPEC, crate::common::RW> {
60        unsafe {
61            crate::common::Reg::<self::Hour_SPEC, crate::common::RW>::from_ptr(
62                self._svd2pac_as_ptr().add(2usize),
63            )
64        }
65    }
66
67    #[doc = "Day-of-Week Count Register"]
68    #[inline(always)]
69    pub const fn week(&self) -> &'static crate::common::Reg<self::Week_SPEC, crate::common::RW> {
70        unsafe {
71            crate::common::Reg::<self::Week_SPEC, crate::common::RW>::from_ptr(
72                self._svd2pac_as_ptr().add(3usize),
73            )
74        }
75    }
76
77    #[doc = "Day Count Register"]
78    #[inline(always)]
79    pub const fn day(&self) -> &'static crate::common::Reg<self::Day_SPEC, crate::common::RW> {
80        unsafe {
81            crate::common::Reg::<self::Day_SPEC, crate::common::RW>::from_ptr(
82                self._svd2pac_as_ptr().add(4usize),
83            )
84        }
85    }
86
87    #[doc = "Month Count Register"]
88    #[inline(always)]
89    pub const fn month(&self) -> &'static crate::common::Reg<self::Month_SPEC, crate::common::RW> {
90        unsafe {
91            crate::common::Reg::<self::Month_SPEC, crate::common::RW>::from_ptr(
92                self._svd2pac_as_ptr().add(5usize),
93            )
94        }
95    }
96
97    #[doc = "Year Count Register"]
98    #[inline(always)]
99    pub const fn year(&self) -> &'static crate::common::Reg<self::Year_SPEC, crate::common::RW> {
100        unsafe {
101            crate::common::Reg::<self::Year_SPEC, crate::common::RW>::from_ptr(
102                self._svd2pac_as_ptr().add(6usize),
103            )
104        }
105    }
106
107    #[doc = "Time Error Correction Register"]
108    #[inline(always)]
109    pub const fn subcud(
110        &self,
111    ) -> &'static crate::common::Reg<self::Subcud_SPEC, crate::common::RW> {
112        unsafe {
113            crate::common::Reg::<self::Subcud_SPEC, crate::common::RW>::from_ptr(
114                self._svd2pac_as_ptr().add(7usize),
115            )
116        }
117    }
118
119    #[doc = "Alarm Minute Register"]
120    #[inline(always)]
121    pub const fn alarmwm(
122        &self,
123    ) -> &'static crate::common::Reg<self::Alarmwm_SPEC, crate::common::RW> {
124        unsafe {
125            crate::common::Reg::<self::Alarmwm_SPEC, crate::common::RW>::from_ptr(
126                self._svd2pac_as_ptr().add(8usize),
127            )
128        }
129    }
130
131    #[doc = "Alarm Hour Register"]
132    #[inline(always)]
133    pub const fn alarmwh(
134        &self,
135    ) -> &'static crate::common::Reg<self::Alarmwh_SPEC, crate::common::RW> {
136        unsafe {
137            crate::common::Reg::<self::Alarmwh_SPEC, crate::common::RW>::from_ptr(
138                self._svd2pac_as_ptr().add(9usize),
139            )
140        }
141    }
142
143    #[doc = "Alarm Day-of-Week Register"]
144    #[inline(always)]
145    pub const fn alarmww(
146        &self,
147    ) -> &'static crate::common::Reg<self::Alarmww_SPEC, crate::common::RW> {
148        unsafe {
149            crate::common::Reg::<self::Alarmww_SPEC, crate::common::RW>::from_ptr(
150                self._svd2pac_as_ptr().add(10usize),
151            )
152        }
153    }
154
155    #[doc = "Realtime Clock Control Register 0"]
156    #[inline(always)]
157    pub const fn rtcc0(&self) -> &'static crate::common::Reg<self::Rtcc0_SPEC, crate::common::RW> {
158        unsafe {
159            crate::common::Reg::<self::Rtcc0_SPEC, crate::common::RW>::from_ptr(
160                self._svd2pac_as_ptr().add(11usize),
161            )
162        }
163    }
164
165    #[doc = "Realtime Clock Control Register 1"]
166    #[inline(always)]
167    pub const fn rtcc1(&self) -> &'static crate::common::Reg<self::Rtcc1_SPEC, crate::common::RW> {
168        unsafe {
169            crate::common::Reg::<self::Rtcc1_SPEC, crate::common::RW>::from_ptr(
170                self._svd2pac_as_ptr().add(12usize),
171            )
172        }
173    }
174}
175#[doc(hidden)]
176#[derive(Copy, Clone, Eq, PartialEq)]
177pub struct Sec_SPEC;
178impl crate::sealed::RegSpec for Sec_SPEC {
179    type DataType = u8;
180}
181
182#[doc = "Second Count Register"]
183pub type Sec = crate::RegValueT<Sec_SPEC>;
184
185impl Sec {
186    #[doc = "1-second count"]
187    #[inline(always)]
188    pub fn sec1(
189        self,
190    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Sec_SPEC, crate::common::RW> {
191        crate::common::RegisterField::<0,0xf,1,0,u8,u8,Sec_SPEC,crate::common::RW>::from_register(self,0)
192    }
193
194    #[doc = "10-second count"]
195    #[inline(always)]
196    pub fn sec10(
197        self,
198    ) -> crate::common::RegisterField<4, 0x7, 1, 0, u8, u8, Sec_SPEC, crate::common::RW> {
199        crate::common::RegisterField::<4,0x7,1,0,u8,u8,Sec_SPEC,crate::common::RW>::from_register(self,0)
200    }
201}
202impl ::core::default::Default for Sec {
203    #[inline(always)]
204    fn default() -> Sec {
205        <crate::RegValueT<Sec_SPEC> as RegisterValue<_>>::new(0)
206    }
207}
208
209#[doc(hidden)]
210#[derive(Copy, Clone, Eq, PartialEq)]
211pub struct Min_SPEC;
212impl crate::sealed::RegSpec for Min_SPEC {
213    type DataType = u8;
214}
215
216#[doc = "Minute Count Register"]
217pub type Min = crate::RegValueT<Min_SPEC>;
218
219impl Min {
220    #[doc = "1-minute count"]
221    #[inline(always)]
222    pub fn min1(
223        self,
224    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Min_SPEC, crate::common::RW> {
225        crate::common::RegisterField::<0,0xf,1,0,u8,u8,Min_SPEC,crate::common::RW>::from_register(self,0)
226    }
227
228    #[doc = "10- minute count"]
229    #[inline(always)]
230    pub fn min10(
231        self,
232    ) -> crate::common::RegisterField<4, 0x7, 1, 0, u8, u8, Min_SPEC, crate::common::RW> {
233        crate::common::RegisterField::<4,0x7,1,0,u8,u8,Min_SPEC,crate::common::RW>::from_register(self,0)
234    }
235}
236impl ::core::default::Default for Min {
237    #[inline(always)]
238    fn default() -> Min {
239        <crate::RegValueT<Min_SPEC> as RegisterValue<_>>::new(0)
240    }
241}
242
243#[doc(hidden)]
244#[derive(Copy, Clone, Eq, PartialEq)]
245pub struct Hour_SPEC;
246impl crate::sealed::RegSpec for Hour_SPEC {
247    type DataType = u8;
248}
249
250#[doc = "Hour Count Register"]
251pub type Hour = crate::RegValueT<Hour_SPEC>;
252
253impl Hour {
254    #[doc = "1-hour count"]
255    #[inline(always)]
256    pub fn hour1(
257        self,
258    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Hour_SPEC, crate::common::RW> {
259        crate::common::RegisterField::<0,0xf,1,0,u8,u8,Hour_SPEC,crate::common::RW>::from_register(self,0)
260    }
261
262    #[doc = "10-hour count"]
263    #[inline(always)]
264    pub fn hour10(
265        self,
266    ) -> crate::common::RegisterField<4, 0x3, 1, 0, u8, u8, Hour_SPEC, crate::common::RW> {
267        crate::common::RegisterField::<4,0x3,1,0,u8,u8,Hour_SPEC,crate::common::RW>::from_register(self,0)
268    }
269}
270impl ::core::default::Default for Hour {
271    #[inline(always)]
272    fn default() -> Hour {
273        <crate::RegValueT<Hour_SPEC> as RegisterValue<_>>::new(0)
274    }
275}
276
277#[doc(hidden)]
278#[derive(Copy, Clone, Eq, PartialEq)]
279pub struct Week_SPEC;
280impl crate::sealed::RegSpec for Week_SPEC {
281    type DataType = u8;
282}
283
284#[doc = "Day-of-Week Count Register"]
285pub type Week = crate::RegValueT<Week_SPEC>;
286
287impl Week {
288    #[doc = "Day-of-Week Counting"]
289    #[inline(always)]
290    pub fn week(
291        self,
292    ) -> crate::common::RegisterField<
293        0,
294        0x7,
295        1,
296        0,
297        week::Week,
298        week::Week,
299        Week_SPEC,
300        crate::common::RW,
301    > {
302        crate::common::RegisterField::<
303            0,
304            0x7,
305            1,
306            0,
307            week::Week,
308            week::Week,
309            Week_SPEC,
310            crate::common::RW,
311        >::from_register(self, 0)
312    }
313}
314impl ::core::default::Default for Week {
315    #[inline(always)]
316    fn default() -> Week {
317        <crate::RegValueT<Week_SPEC> as RegisterValue<_>>::new(0)
318    }
319}
320pub mod week {
321
322    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
323    pub struct Week_SPEC;
324    pub type Week = crate::EnumBitfieldStruct<u8, Week_SPEC>;
325    impl Week {
326        #[doc = "Sunday"]
327        pub const _000: Self = Self::new(0);
328
329        #[doc = "Monday"]
330        pub const _001: Self = Self::new(1);
331
332        #[doc = "Tuesday"]
333        pub const _010: Self = Self::new(2);
334
335        #[doc = "Wednesday"]
336        pub const _011: Self = Self::new(3);
337
338        #[doc = "Thursday"]
339        pub const _100: Self = Self::new(4);
340
341        #[doc = "Friday"]
342        pub const _101: Self = Self::new(5);
343
344        #[doc = "Saturday"]
345        pub const _110: Self = Self::new(6);
346    }
347}
348#[doc(hidden)]
349#[derive(Copy, Clone, Eq, PartialEq)]
350pub struct Day_SPEC;
351impl crate::sealed::RegSpec for Day_SPEC {
352    type DataType = u8;
353}
354
355#[doc = "Day Count Register"]
356pub type Day = crate::RegValueT<Day_SPEC>;
357
358impl Day {
359    #[doc = "1-day count"]
360    #[inline(always)]
361    pub fn day1(
362        self,
363    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Day_SPEC, crate::common::RW> {
364        crate::common::RegisterField::<0,0xf,1,0,u8,u8,Day_SPEC,crate::common::RW>::from_register(self,0)
365    }
366
367    #[doc = "10-day count"]
368    #[inline(always)]
369    pub fn day10(
370        self,
371    ) -> crate::common::RegisterField<4, 0x3, 1, 0, u8, u8, Day_SPEC, crate::common::RW> {
372        crate::common::RegisterField::<4,0x3,1,0,u8,u8,Day_SPEC,crate::common::RW>::from_register(self,0)
373    }
374}
375impl ::core::default::Default for Day {
376    #[inline(always)]
377    fn default() -> Day {
378        <crate::RegValueT<Day_SPEC> as RegisterValue<_>>::new(0)
379    }
380}
381
382#[doc(hidden)]
383#[derive(Copy, Clone, Eq, PartialEq)]
384pub struct Month_SPEC;
385impl crate::sealed::RegSpec for Month_SPEC {
386    type DataType = u8;
387}
388
389#[doc = "Month Count Register"]
390pub type Month = crate::RegValueT<Month_SPEC>;
391
392impl Month {
393    #[doc = "1-month count"]
394    #[inline(always)]
395    pub fn month1(
396        self,
397    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Month_SPEC, crate::common::RW> {
398        crate::common::RegisterField::<0,0xf,1,0,u8,u8,Month_SPEC,crate::common::RW>::from_register(self,0)
399    }
400
401    #[doc = "10-month count"]
402    #[inline(always)]
403    pub fn month10(
404        self,
405    ) -> crate::common::RegisterFieldBool<4, 1, 0, Month_SPEC, crate::common::RW> {
406        crate::common::RegisterFieldBool::<4, 1, 0, Month_SPEC, crate::common::RW>::from_register(
407            self, 0,
408        )
409    }
410}
411impl ::core::default::Default for Month {
412    #[inline(always)]
413    fn default() -> Month {
414        <crate::RegValueT<Month_SPEC> as RegisterValue<_>>::new(0)
415    }
416}
417
418#[doc(hidden)]
419#[derive(Copy, Clone, Eq, PartialEq)]
420pub struct Year_SPEC;
421impl crate::sealed::RegSpec for Year_SPEC {
422    type DataType = u8;
423}
424
425#[doc = "Year Count Register"]
426pub type Year = crate::RegValueT<Year_SPEC>;
427
428impl Year {
429    #[doc = "1-year count"]
430    #[inline(always)]
431    pub fn year1(
432        self,
433    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Year_SPEC, crate::common::RW> {
434        crate::common::RegisterField::<0,0xf,1,0,u8,u8,Year_SPEC,crate::common::RW>::from_register(self,0)
435    }
436
437    #[doc = "10-year count"]
438    #[inline(always)]
439    pub fn year10(
440        self,
441    ) -> crate::common::RegisterField<4, 0xf, 1, 0, u8, u8, Year_SPEC, crate::common::RW> {
442        crate::common::RegisterField::<4,0xf,1,0,u8,u8,Year_SPEC,crate::common::RW>::from_register(self,0)
443    }
444}
445impl ::core::default::Default for Year {
446    #[inline(always)]
447    fn default() -> Year {
448        <crate::RegValueT<Year_SPEC> as RegisterValue<_>>::new(0)
449    }
450}
451
452#[doc(hidden)]
453#[derive(Copy, Clone, Eq, PartialEq)]
454pub struct Subcud_SPEC;
455impl crate::sealed::RegSpec for Subcud_SPEC {
456    type DataType = u8;
457}
458
459#[doc = "Time Error Correction Register"]
460pub type Subcud = crate::RegValueT<Subcud_SPEC>;
461
462impl Subcud {
463    #[doc = "Adjustment Value"]
464    #[inline(always)]
465    pub fn f(
466        self,
467    ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, Subcud_SPEC, crate::common::RW> {
468        crate::common::RegisterField::<0,0x3f,1,0,u8,u8,Subcud_SPEC,crate::common::RW>::from_register(self,0)
469    }
470
471    #[doc = "Setting of time error correction value"]
472    #[inline(always)]
473    pub fn f6(
474        self,
475    ) -> crate::common::RegisterField<
476        6,
477        0x1,
478        1,
479        0,
480        subcud::F6,
481        subcud::F6,
482        Subcud_SPEC,
483        crate::common::RW,
484    > {
485        crate::common::RegisterField::<
486            6,
487            0x1,
488            1,
489            0,
490            subcud::F6,
491            subcud::F6,
492            Subcud_SPEC,
493            crate::common::RW,
494        >::from_register(self, 0)
495    }
496
497    #[doc = "Setting of time error correction timing"]
498    #[inline(always)]
499    pub fn dev(
500        self,
501    ) -> crate::common::RegisterField<
502        7,
503        0x1,
504        1,
505        0,
506        subcud::Dev,
507        subcud::Dev,
508        Subcud_SPEC,
509        crate::common::RW,
510    > {
511        crate::common::RegisterField::<
512            7,
513            0x1,
514            1,
515            0,
516            subcud::Dev,
517            subcud::Dev,
518            Subcud_SPEC,
519            crate::common::RW,
520        >::from_register(self, 0)
521    }
522}
523impl ::core::default::Default for Subcud {
524    #[inline(always)]
525    fn default() -> Subcud {
526        <crate::RegValueT<Subcud_SPEC> as RegisterValue<_>>::new(0)
527    }
528}
529pub mod subcud {
530
531    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
532    pub struct F6_SPEC;
533    pub type F6 = crate::EnumBitfieldStruct<u8, F6_SPEC>;
534    impl F6 {
535        #[doc = "Increases by {F\\[5:0\\] – 1} × 2"]
536        pub const _0: Self = Self::new(0);
537
538        #[doc = "Decreases by {/F\\[5:0\\] + 1} × 2"]
539        pub const _1: Self = Self::new(1);
540    }
541    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
542    pub struct Dev_SPEC;
543    pub type Dev = crate::EnumBitfieldStruct<u8, Dev_SPEC>;
544    impl Dev {
545        #[doc = "Corrects time error when the second digits are at 00, 20, or 40 (every 20 seconds)"]
546        pub const _0: Self = Self::new(0);
547
548        #[doc = "Corrects time error only when the second digits are at 00 (every 60 seconds)"]
549        pub const _1: Self = Self::new(1);
550    }
551}
552#[doc(hidden)]
553#[derive(Copy, Clone, Eq, PartialEq)]
554pub struct Alarmwm_SPEC;
555impl crate::sealed::RegSpec for Alarmwm_SPEC {
556    type DataType = u8;
557}
558
559#[doc = "Alarm Minute Register"]
560pub type Alarmwm = crate::RegValueT<Alarmwm_SPEC>;
561
562impl Alarmwm {
563    #[doc = "1-digit minute setting"]
564    #[inline(always)]
565    pub fn wm1(
566        self,
567    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Alarmwm_SPEC, crate::common::RW> {
568        crate::common::RegisterField::<0,0xf,1,0,u8,u8,Alarmwm_SPEC,crate::common::RW>::from_register(self,0)
569    }
570
571    #[doc = "10-digit minute setting"]
572    #[inline(always)]
573    pub fn wm10(
574        self,
575    ) -> crate::common::RegisterField<4, 0x7, 1, 0, u8, u8, Alarmwm_SPEC, crate::common::RW> {
576        crate::common::RegisterField::<4,0x7,1,0,u8,u8,Alarmwm_SPEC,crate::common::RW>::from_register(self,0)
577    }
578}
579impl ::core::default::Default for Alarmwm {
580    #[inline(always)]
581    fn default() -> Alarmwm {
582        <crate::RegValueT<Alarmwm_SPEC> as RegisterValue<_>>::new(0)
583    }
584}
585
586#[doc(hidden)]
587#[derive(Copy, Clone, Eq, PartialEq)]
588pub struct Alarmwh_SPEC;
589impl crate::sealed::RegSpec for Alarmwh_SPEC {
590    type DataType = u8;
591}
592
593#[doc = "Alarm Hour Register"]
594pub type Alarmwh = crate::RegValueT<Alarmwh_SPEC>;
595
596impl Alarmwh {
597    #[doc = "1-digit hour setting"]
598    #[inline(always)]
599    pub fn wh1(
600        self,
601    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Alarmwh_SPEC, crate::common::RW> {
602        crate::common::RegisterField::<0,0xf,1,0,u8,u8,Alarmwh_SPEC,crate::common::RW>::from_register(self,0)
603    }
604
605    #[doc = "10-digit hour setting"]
606    #[inline(always)]
607    pub fn wh10(
608        self,
609    ) -> crate::common::RegisterField<4, 0x3, 1, 0, u8, u8, Alarmwh_SPEC, crate::common::RW> {
610        crate::common::RegisterField::<4,0x3,1,0,u8,u8,Alarmwh_SPEC,crate::common::RW>::from_register(self,0)
611    }
612}
613impl ::core::default::Default for Alarmwh {
614    #[inline(always)]
615    fn default() -> Alarmwh {
616        <crate::RegValueT<Alarmwh_SPEC> as RegisterValue<_>>::new(0)
617    }
618}
619
620#[doc(hidden)]
621#[derive(Copy, Clone, Eq, PartialEq)]
622pub struct Alarmww_SPEC;
623impl crate::sealed::RegSpec for Alarmww_SPEC {
624    type DataType = u8;
625}
626
627#[doc = "Alarm Day-of-Week Register"]
628pub type Alarmww = crate::RegValueT<Alarmww_SPEC>;
629
630impl Alarmww {
631    #[doc = "Alarm enabled setting \"Sunday\""]
632    #[inline(always)]
633    pub fn ww0(
634        self,
635    ) -> crate::common::RegisterField<
636        0,
637        0x1,
638        1,
639        0,
640        alarmww::Ww0,
641        alarmww::Ww0,
642        Alarmww_SPEC,
643        crate::common::RW,
644    > {
645        crate::common::RegisterField::<
646            0,
647            0x1,
648            1,
649            0,
650            alarmww::Ww0,
651            alarmww::Ww0,
652            Alarmww_SPEC,
653            crate::common::RW,
654        >::from_register(self, 0)
655    }
656
657    #[doc = "Alarm enabled setting \"Monday\""]
658    #[inline(always)]
659    pub fn ww1(
660        self,
661    ) -> crate::common::RegisterField<
662        1,
663        0x1,
664        1,
665        0,
666        alarmww::Ww1,
667        alarmww::Ww1,
668        Alarmww_SPEC,
669        crate::common::RW,
670    > {
671        crate::common::RegisterField::<
672            1,
673            0x1,
674            1,
675            0,
676            alarmww::Ww1,
677            alarmww::Ww1,
678            Alarmww_SPEC,
679            crate::common::RW,
680        >::from_register(self, 0)
681    }
682
683    #[doc = "Alarm enabled setting \"Tuesday\""]
684    #[inline(always)]
685    pub fn ww2(
686        self,
687    ) -> crate::common::RegisterField<
688        2,
689        0x1,
690        1,
691        0,
692        alarmww::Ww2,
693        alarmww::Ww2,
694        Alarmww_SPEC,
695        crate::common::RW,
696    > {
697        crate::common::RegisterField::<
698            2,
699            0x1,
700            1,
701            0,
702            alarmww::Ww2,
703            alarmww::Ww2,
704            Alarmww_SPEC,
705            crate::common::RW,
706        >::from_register(self, 0)
707    }
708
709    #[doc = "Alarm enabled setting \"Wednesday\""]
710    #[inline(always)]
711    pub fn ww3(
712        self,
713    ) -> crate::common::RegisterField<
714        3,
715        0x1,
716        1,
717        0,
718        alarmww::Ww3,
719        alarmww::Ww3,
720        Alarmww_SPEC,
721        crate::common::RW,
722    > {
723        crate::common::RegisterField::<
724            3,
725            0x1,
726            1,
727            0,
728            alarmww::Ww3,
729            alarmww::Ww3,
730            Alarmww_SPEC,
731            crate::common::RW,
732        >::from_register(self, 0)
733    }
734
735    #[doc = "Alarm enabled setting \"Thursday\""]
736    #[inline(always)]
737    pub fn ww4(
738        self,
739    ) -> crate::common::RegisterField<
740        4,
741        0x1,
742        1,
743        0,
744        alarmww::Ww4,
745        alarmww::Ww4,
746        Alarmww_SPEC,
747        crate::common::RW,
748    > {
749        crate::common::RegisterField::<
750            4,
751            0x1,
752            1,
753            0,
754            alarmww::Ww4,
755            alarmww::Ww4,
756            Alarmww_SPEC,
757            crate::common::RW,
758        >::from_register(self, 0)
759    }
760
761    #[doc = "Alarm enabled setting \"Friday\""]
762    #[inline(always)]
763    pub fn ww5(
764        self,
765    ) -> crate::common::RegisterField<
766        5,
767        0x1,
768        1,
769        0,
770        alarmww::Ww5,
771        alarmww::Ww5,
772        Alarmww_SPEC,
773        crate::common::RW,
774    > {
775        crate::common::RegisterField::<
776            5,
777            0x1,
778            1,
779            0,
780            alarmww::Ww5,
781            alarmww::Ww5,
782            Alarmww_SPEC,
783            crate::common::RW,
784        >::from_register(self, 0)
785    }
786
787    #[doc = "Alarm enabled setting \"Saturday\""]
788    #[inline(always)]
789    pub fn ww6(
790        self,
791    ) -> crate::common::RegisterField<
792        6,
793        0x1,
794        1,
795        0,
796        alarmww::Ww6,
797        alarmww::Ww6,
798        Alarmww_SPEC,
799        crate::common::RW,
800    > {
801        crate::common::RegisterField::<
802            6,
803            0x1,
804            1,
805            0,
806            alarmww::Ww6,
807            alarmww::Ww6,
808            Alarmww_SPEC,
809            crate::common::RW,
810        >::from_register(self, 0)
811    }
812}
813impl ::core::default::Default for Alarmww {
814    #[inline(always)]
815    fn default() -> Alarmww {
816        <crate::RegValueT<Alarmww_SPEC> as RegisterValue<_>>::new(0)
817    }
818}
819pub mod alarmww {
820
821    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
822    pub struct Ww0_SPEC;
823    pub type Ww0 = crate::EnumBitfieldStruct<u8, Ww0_SPEC>;
824    impl Ww0 {
825        #[doc = "Disable alarm settings for that day of the week"]
826        pub const _0: Self = Self::new(0);
827
828        #[doc = "Enable alarm settings for that day of the week"]
829        pub const _1: Self = Self::new(1);
830    }
831    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
832    pub struct Ww1_SPEC;
833    pub type Ww1 = crate::EnumBitfieldStruct<u8, Ww1_SPEC>;
834    impl Ww1 {
835        #[doc = "Disable alarm settings for that day of the week"]
836        pub const _0: Self = Self::new(0);
837
838        #[doc = "Enable alarm settings for that day of the week"]
839        pub const _1: Self = Self::new(1);
840    }
841    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
842    pub struct Ww2_SPEC;
843    pub type Ww2 = crate::EnumBitfieldStruct<u8, Ww2_SPEC>;
844    impl Ww2 {
845        #[doc = "Disable alarm settings for that day of the week"]
846        pub const _0: Self = Self::new(0);
847
848        #[doc = "Enable alarm settings for that day of the week"]
849        pub const _1: Self = Self::new(1);
850    }
851    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
852    pub struct Ww3_SPEC;
853    pub type Ww3 = crate::EnumBitfieldStruct<u8, Ww3_SPEC>;
854    impl Ww3 {
855        #[doc = "Disable alarm settings for that day of the week"]
856        pub const _0: Self = Self::new(0);
857
858        #[doc = "Enable alarm settings for that day of the week"]
859        pub const _1: Self = Self::new(1);
860    }
861    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
862    pub struct Ww4_SPEC;
863    pub type Ww4 = crate::EnumBitfieldStruct<u8, Ww4_SPEC>;
864    impl Ww4 {
865        #[doc = "Disable alarm settings for that day of the week"]
866        pub const _0: Self = Self::new(0);
867
868        #[doc = "Enable alarm settings for that day of the week"]
869        pub const _1: Self = Self::new(1);
870    }
871    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
872    pub struct Ww5_SPEC;
873    pub type Ww5 = crate::EnumBitfieldStruct<u8, Ww5_SPEC>;
874    impl Ww5 {
875        #[doc = "Disable alarm settings for that day of the week"]
876        pub const _0: Self = Self::new(0);
877
878        #[doc = "Enable alarm settings for that day of the week"]
879        pub const _1: Self = Self::new(1);
880    }
881    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
882    pub struct Ww6_SPEC;
883    pub type Ww6 = crate::EnumBitfieldStruct<u8, Ww6_SPEC>;
884    impl Ww6 {
885        #[doc = "Disable alarm settings for that day of the week"]
886        pub const _0: Self = Self::new(0);
887
888        #[doc = "Enable alarm settings for that day of the week"]
889        pub const _1: Self = Self::new(1);
890    }
891}
892#[doc(hidden)]
893#[derive(Copy, Clone, Eq, PartialEq)]
894pub struct Rtcc0_SPEC;
895impl crate::sealed::RegSpec for Rtcc0_SPEC {
896    type DataType = u8;
897}
898
899#[doc = "Realtime Clock Control Register 0"]
900pub type Rtcc0 = crate::RegValueT<Rtcc0_SPEC>;
901
902impl Rtcc0 {
903    #[doc = "Fixed-cycle interrupt (RTC_ALM_OR_PRD) selection"]
904    #[inline(always)]
905    pub fn ct(
906        self,
907    ) -> crate::common::RegisterField<
908        0,
909        0x7,
910        1,
911        0,
912        rtcc0::Ct,
913        rtcc0::Ct,
914        Rtcc0_SPEC,
915        crate::common::RW,
916    > {
917        crate::common::RegisterField::<
918            0,
919            0x7,
920            1,
921            0,
922            rtcc0::Ct,
923            rtcc0::Ct,
924            Rtcc0_SPEC,
925            crate::common::RW,
926        >::from_register(self, 0)
927    }
928
929    #[doc = "Selection of 12- or 24-hour system"]
930    #[inline(always)]
931    pub fn ampm(
932        self,
933    ) -> crate::common::RegisterField<
934        3,
935        0x1,
936        1,
937        0,
938        rtcc0::Ampm,
939        rtcc0::Ampm,
940        Rtcc0_SPEC,
941        crate::common::RW,
942    > {
943        crate::common::RegisterField::<
944            3,
945            0x1,
946            1,
947            0,
948            rtcc0::Ampm,
949            rtcc0::Ampm,
950            Rtcc0_SPEC,
951            crate::common::RW,
952        >::from_register(self, 0)
953    }
954
955    #[doc = "Selection of the operating clock for the realtime clock (RTCCLK)"]
956    #[inline(always)]
957    pub fn rtc128en(
958        self,
959    ) -> crate::common::RegisterField<
960        4,
961        0x1,
962        1,
963        0,
964        rtcc0::Rtc128En,
965        rtcc0::Rtc128En,
966        Rtcc0_SPEC,
967        crate::common::RW,
968    > {
969        crate::common::RegisterField::<
970            4,
971            0x1,
972            1,
973            0,
974            rtcc0::Rtc128En,
975            rtcc0::Rtc128En,
976            Rtcc0_SPEC,
977            crate::common::RW,
978        >::from_register(self, 0)
979    }
980
981    #[doc = "RTCOUT pin output control"]
982    #[inline(always)]
983    pub fn rcloe1(
984        self,
985    ) -> crate::common::RegisterField<
986        5,
987        0x1,
988        1,
989        0,
990        rtcc0::Rcloe1,
991        rtcc0::Rcloe1,
992        Rtcc0_SPEC,
993        crate::common::RW,
994    > {
995        crate::common::RegisterField::<
996            5,
997            0x1,
998            1,
999            0,
1000            rtcc0::Rcloe1,
1001            rtcc0::Rcloe1,
1002            Rtcc0_SPEC,
1003            crate::common::RW,
1004        >::from_register(self, 0)
1005    }
1006
1007    #[doc = "Realtime clock operation control"]
1008    #[inline(always)]
1009    pub fn rtce(
1010        self,
1011    ) -> crate::common::RegisterField<
1012        7,
1013        0x1,
1014        1,
1015        0,
1016        rtcc0::Rtce,
1017        rtcc0::Rtce,
1018        Rtcc0_SPEC,
1019        crate::common::RW,
1020    > {
1021        crate::common::RegisterField::<
1022            7,
1023            0x1,
1024            1,
1025            0,
1026            rtcc0::Rtce,
1027            rtcc0::Rtce,
1028            Rtcc0_SPEC,
1029            crate::common::RW,
1030        >::from_register(self, 0)
1031    }
1032}
1033impl ::core::default::Default for Rtcc0 {
1034    #[inline(always)]
1035    fn default() -> Rtcc0 {
1036        <crate::RegValueT<Rtcc0_SPEC> as RegisterValue<_>>::new(0)
1037    }
1038}
1039pub mod rtcc0 {
1040
1041    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1042    pub struct Ct_SPEC;
1043    pub type Ct = crate::EnumBitfieldStruct<u8, Ct_SPEC>;
1044    impl Ct {
1045        #[doc = "Does not use fixed-cycle interrupt"]
1046        pub const _000: Self = Self::new(0);
1047
1048        #[doc = "Once per 0.5 s (synchronized with second count up)"]
1049        pub const _001: Self = Self::new(1);
1050
1051        #[doc = "Once per 1 s (same time as second count up)"]
1052        pub const _010: Self = Self::new(2);
1053
1054        #[doc = "Once per 1 m (second 00 of every minute)"]
1055        pub const _011: Self = Self::new(3);
1056
1057        #[doc = "Once per 1 hour (minute 00 and second 00 of every hour)"]
1058        pub const _100: Self = Self::new(4);
1059
1060        #[doc = "Once per 1 day (hour 00, minute 00, and second 00 of every day)"]
1061        pub const _101: Self = Self::new(5);
1062    }
1063    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1064    pub struct Ampm_SPEC;
1065    pub type Ampm = crate::EnumBitfieldStruct<u8, Ampm_SPEC>;
1066    impl Ampm {
1067        #[doc = "12-hour system (a.m. and p.m. are displayed.)"]
1068        pub const _0: Self = Self::new(0);
1069
1070        #[doc = "24-hour system"]
1071        pub const _1: Self = Self::new(1);
1072    }
1073    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1074    pub struct Rtc128En_SPEC;
1075    pub type Rtc128En = crate::EnumBitfieldStruct<u8, Rtc128En_SPEC>;
1076    impl Rtc128En {
1077        #[doc = "SOSC (32.768 kHz)"]
1078        pub const _0: Self = Self::new(0);
1079
1080        #[doc = "SOSC/256 (128 Hz)"]
1081        pub const _1: Self = Self::new(1);
1082    }
1083    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1084    pub struct Rcloe1_SPEC;
1085    pub type Rcloe1 = crate::EnumBitfieldStruct<u8, Rcloe1_SPEC>;
1086    impl Rcloe1 {
1087        #[doc = "Disables output of the RTCOUT pin (1 Hz)"]
1088        pub const _0: Self = Self::new(0);
1089
1090        #[doc = "Enables output of the RTCOUT pin (1 Hz)"]
1091        pub const _1: Self = Self::new(1);
1092    }
1093    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1094    pub struct Rtce_SPEC;
1095    pub type Rtce = crate::EnumBitfieldStruct<u8, Rtce_SPEC>;
1096    impl Rtce {
1097        #[doc = "Stops counter operation"]
1098        pub const _0: Self = Self::new(0);
1099
1100        #[doc = "Starts counter operation"]
1101        pub const _1: Self = Self::new(1);
1102    }
1103}
1104#[doc(hidden)]
1105#[derive(Copy, Clone, Eq, PartialEq)]
1106pub struct Rtcc1_SPEC;
1107impl crate::sealed::RegSpec for Rtcc1_SPEC {
1108    type DataType = u8;
1109}
1110
1111#[doc = "Realtime Clock Control Register 1"]
1112pub type Rtcc1 = crate::RegValueT<Rtcc1_SPEC>;
1113
1114impl Rtcc1 {
1115    #[doc = "Wait control of realtime clock"]
1116    #[inline(always)]
1117    pub fn rwait(
1118        self,
1119    ) -> crate::common::RegisterField<
1120        0,
1121        0x1,
1122        1,
1123        0,
1124        rtcc1::Rwait,
1125        rtcc1::Rwait,
1126        Rtcc1_SPEC,
1127        crate::common::RW,
1128    > {
1129        crate::common::RegisterField::<
1130            0,
1131            0x1,
1132            1,
1133            0,
1134            rtcc1::Rwait,
1135            rtcc1::Rwait,
1136            Rtcc1_SPEC,
1137            crate::common::RW,
1138        >::from_register(self, 0)
1139    }
1140
1141    #[doc = "Wait status flag of realtime clock"]
1142    #[inline(always)]
1143    pub fn rwst(
1144        self,
1145    ) -> crate::common::RegisterField<
1146        1,
1147        0x1,
1148        1,
1149        0,
1150        rtcc1::Rwst,
1151        rtcc1::Rwst,
1152        Rtcc1_SPEC,
1153        crate::common::R,
1154    > {
1155        crate::common::RegisterField::<
1156            1,
1157            0x1,
1158            1,
1159            0,
1160            rtcc1::Rwst,
1161            rtcc1::Rwst,
1162            Rtcc1_SPEC,
1163            crate::common::R,
1164        >::from_register(self, 0)
1165    }
1166
1167    #[doc = "Fixed-cycle interrupt status flag"]
1168    #[inline(always)]
1169    pub fn rifg(
1170        self,
1171    ) -> crate::common::RegisterField<
1172        3,
1173        0x1,
1174        1,
1175        0,
1176        rtcc1::Rifg,
1177        rtcc1::Rifg,
1178        Rtcc1_SPEC,
1179        crate::common::RW,
1180    > {
1181        crate::common::RegisterField::<
1182            3,
1183            0x1,
1184            1,
1185            0,
1186            rtcc1::Rifg,
1187            rtcc1::Rifg,
1188            Rtcc1_SPEC,
1189            crate::common::RW,
1190        >::from_register(self, 0)
1191    }
1192
1193    #[doc = "Alarm detection status flag"]
1194    #[inline(always)]
1195    pub fn wafg(
1196        self,
1197    ) -> crate::common::RegisterField<
1198        4,
1199        0x1,
1200        1,
1201        0,
1202        rtcc1::Wafg,
1203        rtcc1::Wafg,
1204        Rtcc1_SPEC,
1205        crate::common::RW,
1206    > {
1207        crate::common::RegisterField::<
1208            4,
1209            0x1,
1210            1,
1211            0,
1212            rtcc1::Wafg,
1213            rtcc1::Wafg,
1214            Rtcc1_SPEC,
1215            crate::common::RW,
1216        >::from_register(self, 0)
1217    }
1218
1219    #[doc = "Control of alarm interrupt (RTC_ALM_OR_PRD)"]
1220    #[inline(always)]
1221    pub fn walie(
1222        self,
1223    ) -> crate::common::RegisterField<
1224        6,
1225        0x1,
1226        1,
1227        0,
1228        rtcc1::Walie,
1229        rtcc1::Walie,
1230        Rtcc1_SPEC,
1231        crate::common::RW,
1232    > {
1233        crate::common::RegisterField::<
1234            6,
1235            0x1,
1236            1,
1237            0,
1238            rtcc1::Walie,
1239            rtcc1::Walie,
1240            Rtcc1_SPEC,
1241            crate::common::RW,
1242        >::from_register(self, 0)
1243    }
1244
1245    #[doc = "Alarm operation control"]
1246    #[inline(always)]
1247    pub fn wale(
1248        self,
1249    ) -> crate::common::RegisterField<
1250        7,
1251        0x1,
1252        1,
1253        0,
1254        rtcc1::Wale,
1255        rtcc1::Wale,
1256        Rtcc1_SPEC,
1257        crate::common::RW,
1258    > {
1259        crate::common::RegisterField::<
1260            7,
1261            0x1,
1262            1,
1263            0,
1264            rtcc1::Wale,
1265            rtcc1::Wale,
1266            Rtcc1_SPEC,
1267            crate::common::RW,
1268        >::from_register(self, 0)
1269    }
1270}
1271impl ::core::default::Default for Rtcc1 {
1272    #[inline(always)]
1273    fn default() -> Rtcc1 {
1274        <crate::RegValueT<Rtcc1_SPEC> as RegisterValue<_>>::new(0)
1275    }
1276}
1277pub mod rtcc1 {
1278
1279    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1280    pub struct Rwait_SPEC;
1281    pub type Rwait = crate::EnumBitfieldStruct<u8, Rwait_SPEC>;
1282    impl Rwait {
1283        #[doc = "Counting proceeds"]
1284        pub const _0: Self = Self::new(0);
1285
1286        #[doc = "Stops the SEC to YEAR counters. Counter values are readable and writable."]
1287        pub const _1: Self = Self::new(1);
1288    }
1289    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1290    pub struct Rwst_SPEC;
1291    pub type Rwst = crate::EnumBitfieldStruct<u8, Rwst_SPEC>;
1292    impl Rwst {
1293        #[doc = "Counting is in progress."]
1294        pub const _0: Self = Self::new(0);
1295
1296        #[doc = "Counter values are readable and writable."]
1297        pub const _1: Self = Self::new(1);
1298    }
1299    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1300    pub struct Rifg_SPEC;
1301    pub type Rifg = crate::EnumBitfieldStruct<u8, Rifg_SPEC>;
1302    impl Rifg {
1303        #[doc = "Fixed-cycle interrupt is not generated."]
1304        pub const _0: Self = Self::new(0);
1305
1306        #[doc = "Fixed-cycle interrupt is generated."]
1307        pub const _1: Self = Self::new(1);
1308    }
1309    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1310    pub struct Wafg_SPEC;
1311    pub type Wafg = crate::EnumBitfieldStruct<u8, Wafg_SPEC>;
1312    impl Wafg {
1313        #[doc = "Alarm mismatch"]
1314        pub const _0: Self = Self::new(0);
1315
1316        #[doc = "Detection of matching of alarm"]
1317        pub const _1: Self = Self::new(1);
1318    }
1319    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1320    pub struct Walie_SPEC;
1321    pub type Walie = crate::EnumBitfieldStruct<u8, Walie_SPEC>;
1322    impl Walie {
1323        #[doc = "Does not generate interrupt on matching of alarm."]
1324        pub const _0: Self = Self::new(0);
1325
1326        #[doc = "Generates interrupt on matching of alarm."]
1327        pub const _1: Self = Self::new(1);
1328    }
1329    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1330    pub struct Wale_SPEC;
1331    pub type Wale = crate::EnumBitfieldStruct<u8, Wale_SPEC>;
1332    impl Wale {
1333        #[doc = "Match operation is invalid."]
1334        pub const _0: Self = Self::new(0);
1335
1336        #[doc = "Match operation is valid."]
1337        pub const _1: Self = Self::new(1);
1338    }
1339}