da14697_pac/
rtc.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.2, with svd2pac 0.6.0 on Thu, 24 Jul 2025 04:45:38 +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"RTC registers"]
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 = "RTC Alarm Enable Register"]
38    #[inline(always)]
39    pub const fn rtc_alarm_enable_reg(
40        &self,
41    ) -> &'static crate::common::Reg<self::RtcAlarmEnableReg_SPEC, crate::common::RW> {
42        unsafe {
43            crate::common::Reg::<self::RtcAlarmEnableReg_SPEC, crate::common::RW>::from_ptr(
44                self._svd2pac_as_ptr().add(24usize),
45            )
46        }
47    }
48
49    #[doc = "RTC Calendar Alram Register"]
50    #[inline(always)]
51    pub const fn rtc_calendar_alarm_reg(
52        &self,
53    ) -> &'static crate::common::Reg<self::RtcCalendarAlarmReg_SPEC, crate::common::RW> {
54        unsafe {
55            crate::common::Reg::<self::RtcCalendarAlarmReg_SPEC, crate::common::RW>::from_ptr(
56                self._svd2pac_as_ptr().add(20usize),
57            )
58        }
59    }
60
61    #[doc = "RTC Calendar Register"]
62    #[inline(always)]
63    pub const fn rtc_calendar_reg(
64        &self,
65    ) -> &'static crate::common::Reg<self::RtcCalendarReg_SPEC, crate::common::RW> {
66        unsafe {
67            crate::common::Reg::<self::RtcCalendarReg_SPEC, crate::common::RW>::from_ptr(
68                self._svd2pac_as_ptr().add(12usize),
69            )
70        }
71    }
72
73    #[doc = "RTC Control Register"]
74    #[inline(always)]
75    pub const fn rtc_control_reg(
76        &self,
77    ) -> &'static crate::common::Reg<self::RtcControlReg_SPEC, crate::common::RW> {
78        unsafe {
79            crate::common::Reg::<self::RtcControlReg_SPEC, crate::common::RW>::from_ptr(
80                self._svd2pac_as_ptr().add(0usize),
81            )
82        }
83    }
84
85    #[doc = "RTC Event Control Register"]
86    #[inline(always)]
87    pub const fn rtc_event_ctrl_reg(
88        &self,
89    ) -> &'static crate::common::Reg<self::RtcEventCtrlReg_SPEC, crate::common::RW> {
90        unsafe {
91            crate::common::Reg::<self::RtcEventCtrlReg_SPEC, crate::common::RW>::from_ptr(
92                self._svd2pac_as_ptr().add(128usize),
93            )
94        }
95    }
96
97    #[doc = "RTC Event Flags Register"]
98    #[inline(always)]
99    pub const fn rtc_event_flags_reg(
100        &self,
101    ) -> &'static crate::common::Reg<self::RtcEventFlagsReg_SPEC, crate::common::RW> {
102        unsafe {
103            crate::common::Reg::<self::RtcEventFlagsReg_SPEC, crate::common::RW>::from_ptr(
104                self._svd2pac_as_ptr().add(28usize),
105            )
106        }
107    }
108
109    #[doc = "RTC Hour Mode Register"]
110    #[inline(always)]
111    pub const fn rtc_hour_mode_reg(
112        &self,
113    ) -> &'static crate::common::Reg<self::RtcHourModeReg_SPEC, crate::common::RW> {
114        unsafe {
115            crate::common::Reg::<self::RtcHourModeReg_SPEC, crate::common::RW>::from_ptr(
116                self._svd2pac_as_ptr().add(4usize),
117            )
118        }
119    }
120
121    #[doc = "RTC Interrupt Disable Register"]
122    #[inline(always)]
123    pub const fn rtc_interrupt_disable_reg(
124        &self,
125    ) -> &'static crate::common::Reg<self::RtcInterruptDisableReg_SPEC, crate::common::RW> {
126        unsafe {
127            crate::common::Reg::<self::RtcInterruptDisableReg_SPEC, crate::common::RW>::from_ptr(
128                self._svd2pac_as_ptr().add(36usize),
129            )
130        }
131    }
132
133    #[doc = "RTC Interrupt Enable Register"]
134    #[inline(always)]
135    pub const fn rtc_interrupt_enable_reg(
136        &self,
137    ) -> &'static crate::common::Reg<self::RtcInterruptEnableReg_SPEC, crate::common::RW> {
138        unsafe {
139            crate::common::Reg::<self::RtcInterruptEnableReg_SPEC, crate::common::RW>::from_ptr(
140                self._svd2pac_as_ptr().add(32usize),
141            )
142        }
143    }
144
145    #[doc = "RTC Interrupt Mask Register"]
146    #[inline(always)]
147    pub const fn rtc_interrupt_mask_reg(
148        &self,
149    ) -> &'static crate::common::Reg<self::RtcInterruptMaskReg_SPEC, crate::common::RW> {
150        unsafe {
151            crate::common::Reg::<self::RtcInterruptMaskReg_SPEC, crate::common::RW>::from_ptr(
152                self._svd2pac_as_ptr().add(40usize),
153            )
154        }
155    }
156
157    #[doc = "RTC Keep RTC Register"]
158    #[inline(always)]
159    pub const fn rtc_keep_rtc_reg(
160        &self,
161    ) -> &'static crate::common::Reg<self::RtcKeepRtcReg_SPEC, crate::common::RW> {
162        unsafe {
163            crate::common::Reg::<self::RtcKeepRtcReg_SPEC, crate::common::RW>::from_ptr(
164                self._svd2pac_as_ptr().add(48usize),
165            )
166        }
167    }
168
169    #[doc = "RTC Motor Event Counter Register"]
170    #[inline(always)]
171    pub const fn rtc_motor_event_cnt_reg(
172        &self,
173    ) -> &'static crate::common::Reg<self::RtcMotorEventCntReg_SPEC, crate::common::RW> {
174        unsafe {
175            crate::common::Reg::<self::RtcMotorEventCntReg_SPEC, crate::common::RW>::from_ptr(
176                self._svd2pac_as_ptr().add(144usize),
177            )
178        }
179    }
180
181    #[doc = "RTC Motor Event Period Register"]
182    #[inline(always)]
183    pub const fn rtc_motor_event_period_reg(
184        &self,
185    ) -> &'static crate::common::Reg<self::RtcMotorEventPeriodReg_SPEC, crate::common::RW> {
186        unsafe {
187            crate::common::Reg::<self::RtcMotorEventPeriodReg_SPEC, crate::common::RW>::from_ptr(
188                self._svd2pac_as_ptr().add(132usize),
189            )
190        }
191    }
192
193    #[doc = "RTC PDC Event Clear Register"]
194    #[inline(always)]
195    pub const fn rtc_pdc_event_clear_reg(
196        &self,
197    ) -> &'static crate::common::Reg<self::RtcPdcEventClearReg_SPEC, crate::common::RW> {
198        unsafe {
199            crate::common::Reg::<self::RtcPdcEventClearReg_SPEC, crate::common::RW>::from_ptr(
200                self._svd2pac_as_ptr().add(140usize),
201            )
202        }
203    }
204
205    #[doc = "RTC PDC Event Counter Register"]
206    #[inline(always)]
207    pub const fn rtc_pdc_event_cnt_reg(
208        &self,
209    ) -> &'static crate::common::Reg<self::RtcPdcEventCntReg_SPEC, crate::common::RW> {
210        unsafe {
211            crate::common::Reg::<self::RtcPdcEventCntReg_SPEC, crate::common::RW>::from_ptr(
212                self._svd2pac_as_ptr().add(148usize),
213            )
214        }
215    }
216
217    #[doc = "RTC PDC Event Period Register"]
218    #[inline(always)]
219    pub const fn rtc_pdc_event_period_reg(
220        &self,
221    ) -> &'static crate::common::Reg<self::RtcPdcEventPeriodReg_SPEC, crate::common::RW> {
222        unsafe {
223            crate::common::Reg::<self::RtcPdcEventPeriodReg_SPEC, crate::common::RW>::from_ptr(
224                self._svd2pac_as_ptr().add(136usize),
225            )
226        }
227    }
228
229    #[doc = "RTC Status Register"]
230    #[inline(always)]
231    pub const fn rtc_status_reg(
232        &self,
233    ) -> &'static crate::common::Reg<self::RtcStatusReg_SPEC, crate::common::RW> {
234        unsafe {
235            crate::common::Reg::<self::RtcStatusReg_SPEC, crate::common::RW>::from_ptr(
236                self._svd2pac_as_ptr().add(44usize),
237            )
238        }
239    }
240
241    #[doc = "RTC Time Alarm Register"]
242    #[inline(always)]
243    pub const fn rtc_time_alarm_reg(
244        &self,
245    ) -> &'static crate::common::Reg<self::RtcTimeAlarmReg_SPEC, crate::common::RW> {
246        unsafe {
247            crate::common::Reg::<self::RtcTimeAlarmReg_SPEC, crate::common::RW>::from_ptr(
248                self._svd2pac_as_ptr().add(16usize),
249            )
250        }
251    }
252
253    #[doc = "RTC Time Register"]
254    #[inline(always)]
255    pub const fn rtc_time_reg(
256        &self,
257    ) -> &'static crate::common::Reg<self::RtcTimeReg_SPEC, crate::common::RW> {
258        unsafe {
259            crate::common::Reg::<self::RtcTimeReg_SPEC, crate::common::RW>::from_ptr(
260                self._svd2pac_as_ptr().add(8usize),
261            )
262        }
263    }
264}
265#[doc(hidden)]
266#[derive(Copy, Clone, Eq, PartialEq)]
267pub struct RtcAlarmEnableReg_SPEC;
268impl crate::sealed::RegSpec for RtcAlarmEnableReg_SPEC {
269    type DataType = u32;
270}
271
272#[doc = "RTC Alarm Enable Register"]
273pub type RtcAlarmEnableReg = crate::RegValueT<RtcAlarmEnableReg_SPEC>;
274
275impl RtcAlarmEnableReg {
276    #[doc = "Alarm on month enable. Enable to trigger alarm when data specified in Calendar Alarm Register (M_T and M_U) has been reached."]
277    #[inline(always)]
278    pub fn rtc_alarm_mnth_en(
279        self,
280    ) -> crate::common::RegisterFieldBool<5, 1, 0, RtcAlarmEnableReg_SPEC, crate::common::RW> {
281        crate::common::RegisterFieldBool::<5,1,0,RtcAlarmEnableReg_SPEC,crate::common::RW>::from_register(self,0)
282    }
283
284    #[doc = "Alarm on date enable. Enable to trigger alarm when data specified in Calendar Alarm Register (D_T and D_U) has been reached."]
285    #[inline(always)]
286    pub fn rtc_alarm_date_en(
287        self,
288    ) -> crate::common::RegisterFieldBool<4, 1, 0, RtcAlarmEnableReg_SPEC, crate::common::RW> {
289        crate::common::RegisterFieldBool::<4,1,0,RtcAlarmEnableReg_SPEC,crate::common::RW>::from_register(self,0)
290    }
291
292    #[doc = "Alarm on hour enable. Enable to trigger alarm when data specified in Time Alarm Register (PM, HR_T and HR_U) has been reached."]
293    #[inline(always)]
294    pub fn rtc_alarm_hour_en(
295        self,
296    ) -> crate::common::RegisterFieldBool<3, 1, 0, RtcAlarmEnableReg_SPEC, crate::common::RW> {
297        crate::common::RegisterFieldBool::<3,1,0,RtcAlarmEnableReg_SPEC,crate::common::RW>::from_register(self,0)
298    }
299
300    #[doc = "Alarm on minute enable. Enable to trigger alarm when data specified in Time Alarm Register (M_T and M_U) has been reached."]
301    #[inline(always)]
302    pub fn rtc_alarm_min_en(
303        self,
304    ) -> crate::common::RegisterFieldBool<2, 1, 0, RtcAlarmEnableReg_SPEC, crate::common::RW> {
305        crate::common::RegisterFieldBool::<2,1,0,RtcAlarmEnableReg_SPEC,crate::common::RW>::from_register(self,0)
306    }
307
308    #[doc = "Alarm on second enable. Enable to trigger alarm when data specified in Time Alarm Register (S_T and S_U) has been reached."]
309    #[inline(always)]
310    pub fn rtc_alarm_sec_en(
311        self,
312    ) -> crate::common::RegisterFieldBool<1, 1, 0, RtcAlarmEnableReg_SPEC, crate::common::RW> {
313        crate::common::RegisterFieldBool::<1,1,0,RtcAlarmEnableReg_SPEC,crate::common::RW>::from_register(self,0)
314    }
315
316    #[doc = "Alarm on hundredths of a second enable. Enable to trigger alarm when data specified in Time Alarm Register (H_T and H_U) has been reached."]
317    #[inline(always)]
318    pub fn rtc_alarm_hos_en(
319        self,
320    ) -> crate::common::RegisterFieldBool<0, 1, 0, RtcAlarmEnableReg_SPEC, crate::common::RW> {
321        crate::common::RegisterFieldBool::<0,1,0,RtcAlarmEnableReg_SPEC,crate::common::RW>::from_register(self,0)
322    }
323}
324impl ::core::default::Default for RtcAlarmEnableReg {
325    #[inline(always)]
326    fn default() -> RtcAlarmEnableReg {
327        <crate::RegValueT<RtcAlarmEnableReg_SPEC> as RegisterValue<_>>::new(0)
328    }
329}
330
331#[doc(hidden)]
332#[derive(Copy, Clone, Eq, PartialEq)]
333pub struct RtcCalendarAlarmReg_SPEC;
334impl crate::sealed::RegSpec for RtcCalendarAlarmReg_SPEC {
335    type DataType = u32;
336}
337
338#[doc = "RTC Calendar Alram Register"]
339pub type RtcCalendarAlarmReg = crate::RegValueT<RtcCalendarAlarmReg_SPEC>;
340
341impl RtcCalendarAlarmReg {
342    #[doc = "Date tens. Represented in BCD digit (0-3)."]
343    #[inline(always)]
344    pub fn rtc_cal_d_t(
345        self,
346    ) -> crate::common::RegisterField<
347        12,
348        0x3,
349        1,
350        0,
351        u8,
352        u8,
353        RtcCalendarAlarmReg_SPEC,
354        crate::common::RW,
355    > {
356        crate::common::RegisterField::<
357            12,
358            0x3,
359            1,
360            0,
361            u8,
362            u8,
363            RtcCalendarAlarmReg_SPEC,
364            crate::common::RW,
365        >::from_register(self, 0)
366    }
367
368    #[doc = "Date units. Represented in BCD digit (0-9)."]
369    #[inline(always)]
370    pub fn rtc_cal_d_u(
371        self,
372    ) -> crate::common::RegisterField<
373        8,
374        0xf,
375        1,
376        0,
377        u8,
378        u8,
379        RtcCalendarAlarmReg_SPEC,
380        crate::common::RW,
381    > {
382        crate::common::RegisterField::<
383            8,
384            0xf,
385            1,
386            0,
387            u8,
388            u8,
389            RtcCalendarAlarmReg_SPEC,
390            crate::common::RW,
391        >::from_register(self, 0)
392    }
393
394    #[doc = "Month tens. Represented in BCD digit (0-1)."]
395    #[inline(always)]
396    pub fn rtc_cal_m_t(
397        self,
398    ) -> crate::common::RegisterFieldBool<7, 1, 0, RtcCalendarAlarmReg_SPEC, crate::common::RW>
399    {
400        crate::common::RegisterFieldBool::<7,1,0,RtcCalendarAlarmReg_SPEC,crate::common::RW>::from_register(self,0)
401    }
402
403    #[doc = "Month units. Represented in BCD digit (0-9)."]
404    #[inline(always)]
405    pub fn rtc_cal_m_u(
406        self,
407    ) -> crate::common::RegisterField<
408        3,
409        0xf,
410        1,
411        0,
412        u8,
413        u8,
414        RtcCalendarAlarmReg_SPEC,
415        crate::common::RW,
416    > {
417        crate::common::RegisterField::<
418            3,
419            0xf,
420            1,
421            0,
422            u8,
423            u8,
424            RtcCalendarAlarmReg_SPEC,
425            crate::common::RW,
426        >::from_register(self, 0)
427    }
428}
429impl ::core::default::Default for RtcCalendarAlarmReg {
430    #[inline(always)]
431    fn default() -> RtcCalendarAlarmReg {
432        <crate::RegValueT<RtcCalendarAlarmReg_SPEC> as RegisterValue<_>>::new(0)
433    }
434}
435
436#[doc(hidden)]
437#[derive(Copy, Clone, Eq, PartialEq)]
438pub struct RtcCalendarReg_SPEC;
439impl crate::sealed::RegSpec for RtcCalendarReg_SPEC {
440    type DataType = u32;
441}
442
443#[doc = "RTC Calendar Register"]
444pub type RtcCalendarReg = crate::RegValueT<RtcCalendarReg_SPEC>;
445
446impl RtcCalendarReg {
447    #[doc = "The value in this register has altered since last read. Read and clear"]
448    #[inline(always)]
449    pub fn rtc_cal_ch(
450        self,
451    ) -> crate::common::RegisterFieldBool<31, 1, 0, RtcCalendarReg_SPEC, crate::common::RW> {
452        crate::common::RegisterFieldBool::<31,1,0,RtcCalendarReg_SPEC,crate::common::RW>::from_register(self,0)
453    }
454
455    #[doc = "Century tens. Represented in BCD digit (1-2)."]
456    #[inline(always)]
457    pub fn rtc_cal_c_t(
458        self,
459    ) -> crate::common::RegisterField<28, 0x3, 1, 0, u8, u8, RtcCalendarReg_SPEC, crate::common::RW>
460    {
461        crate::common::RegisterField::<28,0x3,1,0,u8,u8,RtcCalendarReg_SPEC,crate::common::RW>::from_register(self,0)
462    }
463
464    #[doc = "Century units. Represented in BCD digit (0-9)."]
465    #[inline(always)]
466    pub fn rtc_cal_c_u(
467        self,
468    ) -> crate::common::RegisterField<24, 0xf, 1, 0, u8, u8, RtcCalendarReg_SPEC, crate::common::RW>
469    {
470        crate::common::RegisterField::<24,0xf,1,0,u8,u8,RtcCalendarReg_SPEC,crate::common::RW>::from_register(self,0)
471    }
472
473    #[doc = "Year tens. Represented in BCD digit (0-9)."]
474    #[inline(always)]
475    pub fn rtc_cal_y_t(
476        self,
477    ) -> crate::common::RegisterField<20, 0xf, 1, 0, u8, u8, RtcCalendarReg_SPEC, crate::common::RW>
478    {
479        crate::common::RegisterField::<20,0xf,1,0,u8,u8,RtcCalendarReg_SPEC,crate::common::RW>::from_register(self,0)
480    }
481
482    #[doc = "Year units. Represented in BCD digit (0-9)."]
483    #[inline(always)]
484    pub fn rtc_cal_y_u(
485        self,
486    ) -> crate::common::RegisterField<16, 0xf, 1, 0, u8, u8, RtcCalendarReg_SPEC, crate::common::RW>
487    {
488        crate::common::RegisterField::<16,0xf,1,0,u8,u8,RtcCalendarReg_SPEC,crate::common::RW>::from_register(self,0)
489    }
490
491    #[doc = "Date tens. Represented in BCD digit (0-3)."]
492    #[inline(always)]
493    pub fn rtc_cal_d_t(
494        self,
495    ) -> crate::common::RegisterField<12, 0x3, 1, 0, u8, u8, RtcCalendarReg_SPEC, crate::common::RW>
496    {
497        crate::common::RegisterField::<12,0x3,1,0,u8,u8,RtcCalendarReg_SPEC,crate::common::RW>::from_register(self,0)
498    }
499
500    #[doc = "Date units. Represented in BCD digit (0-9)."]
501    #[inline(always)]
502    pub fn rtc_cal_d_u(
503        self,
504    ) -> crate::common::RegisterField<8, 0xf, 1, 0, u8, u8, RtcCalendarReg_SPEC, crate::common::RW>
505    {
506        crate::common::RegisterField::<8,0xf,1,0,u8,u8,RtcCalendarReg_SPEC,crate::common::RW>::from_register(self,0)
507    }
508
509    #[doc = "Month tens. Represented in BCD digit (0-1)."]
510    #[inline(always)]
511    pub fn rtc_cal_m_t(
512        self,
513    ) -> crate::common::RegisterFieldBool<7, 1, 0, RtcCalendarReg_SPEC, crate::common::RW> {
514        crate::common::RegisterFieldBool::<7,1,0,RtcCalendarReg_SPEC,crate::common::RW>::from_register(self,0)
515    }
516
517    #[doc = "Month units. Represented in BCD digit (0-9)."]
518    #[inline(always)]
519    pub fn rtc_cal_m_u(
520        self,
521    ) -> crate::common::RegisterField<3, 0xf, 1, 0, u8, u8, RtcCalendarReg_SPEC, crate::common::RW>
522    {
523        crate::common::RegisterField::<3,0xf,1,0,u8,u8,RtcCalendarReg_SPEC,crate::common::RW>::from_register(self,0)
524    }
525
526    #[doc = "Day of the week (arbitrary) units. Represented in BCD digit (0-7)."]
527    #[inline(always)]
528    pub fn rtc_day(
529        self,
530    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, RtcCalendarReg_SPEC, crate::common::RW>
531    {
532        crate::common::RegisterField::<0,0x7,1,0,u8,u8,RtcCalendarReg_SPEC,crate::common::RW>::from_register(self,0)
533    }
534}
535impl ::core::default::Default for RtcCalendarReg {
536    #[inline(always)]
537    fn default() -> RtcCalendarReg {
538        <crate::RegValueT<RtcCalendarReg_SPEC> as RegisterValue<_>>::new(536871183)
539    }
540}
541
542#[doc(hidden)]
543#[derive(Copy, Clone, Eq, PartialEq)]
544pub struct RtcControlReg_SPEC;
545impl crate::sealed::RegSpec for RtcControlReg_SPEC {
546    type DataType = u32;
547}
548
549#[doc = "RTC Control Register"]
550pub type RtcControlReg = crate::RegValueT<RtcControlReg_SPEC>;
551
552impl RtcControlReg {
553    #[doc = "When this field is set high the RTC stops incrementing the calendar value."]
554    #[inline(always)]
555    pub fn rtc_cal_disable(
556        self,
557    ) -> crate::common::RegisterFieldBool<1, 1, 0, RtcControlReg_SPEC, crate::common::RW> {
558        crate::common::RegisterFieldBool::<1,1,0,RtcControlReg_SPEC,crate::common::RW>::from_register(self,0)
559    }
560
561    #[doc = "When this field is set high the RTC stops incrementing the time value."]
562    #[inline(always)]
563    pub fn rtc_time_disable(
564        self,
565    ) -> crate::common::RegisterFieldBool<0, 1, 0, RtcControlReg_SPEC, crate::common::RW> {
566        crate::common::RegisterFieldBool::<0,1,0,RtcControlReg_SPEC,crate::common::RW>::from_register(self,0)
567    }
568}
569impl ::core::default::Default for RtcControlReg {
570    #[inline(always)]
571    fn default() -> RtcControlReg {
572        <crate::RegValueT<RtcControlReg_SPEC> as RegisterValue<_>>::new(3)
573    }
574}
575
576#[doc(hidden)]
577#[derive(Copy, Clone, Eq, PartialEq)]
578pub struct RtcEventCtrlReg_SPEC;
579impl crate::sealed::RegSpec for RtcEventCtrlReg_SPEC {
580    type DataType = u32;
581}
582
583#[doc = "RTC Event Control Register"]
584pub type RtcEventCtrlReg = crate::RegValueT<RtcEventCtrlReg_SPEC>;
585
586impl RtcEventCtrlReg {
587    #[doc = "0 = Event to PDC is disabled. No clear any pending event\n1 = Even to PDC is enabled"]
588    #[inline(always)]
589    pub fn rtc_pdc_event_en(
590        self,
591    ) -> crate::common::RegisterFieldBool<1, 1, 0, RtcEventCtrlReg_SPEC, crate::common::RW> {
592        crate::common::RegisterFieldBool::<1,1,0,RtcEventCtrlReg_SPEC,crate::common::RW>::from_register(self,0)
593    }
594
595    #[doc = "0 = Event to Motor is disabled\n1 = Event to Motor is enabled"]
596    #[inline(always)]
597    pub fn rtc_motor_event_en(
598        self,
599    ) -> crate::common::RegisterFieldBool<0, 1, 0, RtcEventCtrlReg_SPEC, crate::common::RW> {
600        crate::common::RegisterFieldBool::<0,1,0,RtcEventCtrlReg_SPEC,crate::common::RW>::from_register(self,0)
601    }
602}
603impl ::core::default::Default for RtcEventCtrlReg {
604    #[inline(always)]
605    fn default() -> RtcEventCtrlReg {
606        <crate::RegValueT<RtcEventCtrlReg_SPEC> as RegisterValue<_>>::new(0)
607    }
608}
609
610#[doc(hidden)]
611#[derive(Copy, Clone, Eq, PartialEq)]
612pub struct RtcEventFlagsReg_SPEC;
613impl crate::sealed::RegSpec for RtcEventFlagsReg_SPEC {
614    type DataType = u32;
615}
616
617#[doc = "RTC Event Flags Register"]
618pub type RtcEventFlagsReg = crate::RegValueT<RtcEventFlagsReg_SPEC>;
619
620impl RtcEventFlagsReg {
621    #[doc = "Alarm event flag. Indicate that alarm event occurred since the last reset."]
622    #[inline(always)]
623    pub fn rtc_event_alrm(
624        self,
625    ) -> crate::common::RegisterFieldBool<6, 1, 0, RtcEventFlagsReg_SPEC, crate::common::R> {
626        crate::common::RegisterFieldBool::<6,1,0,RtcEventFlagsReg_SPEC,crate::common::R>::from_register(self,0)
627    }
628
629    #[doc = "Month rolls over event flag. Indicate that month rolls over event occurred since the last reset."]
630    #[inline(always)]
631    pub fn rtc_event_mnth(
632        self,
633    ) -> crate::common::RegisterFieldBool<5, 1, 0, RtcEventFlagsReg_SPEC, crate::common::R> {
634        crate::common::RegisterFieldBool::<5,1,0,RtcEventFlagsReg_SPEC,crate::common::R>::from_register(self,0)
635    }
636
637    #[doc = "Date rolls over event flag. Indicate that date rolls over event occurred since the last reset."]
638    #[inline(always)]
639    pub fn rtc_event_date(
640        self,
641    ) -> crate::common::RegisterFieldBool<4, 1, 0, RtcEventFlagsReg_SPEC, crate::common::R> {
642        crate::common::RegisterFieldBool::<4,1,0,RtcEventFlagsReg_SPEC,crate::common::R>::from_register(self,0)
643    }
644
645    #[doc = "Hour rolls over event flag. Indicate that hour rolls over event occurred since the last reset."]
646    #[inline(always)]
647    pub fn rtc_event_hour(
648        self,
649    ) -> crate::common::RegisterFieldBool<3, 1, 0, RtcEventFlagsReg_SPEC, crate::common::R> {
650        crate::common::RegisterFieldBool::<3,1,0,RtcEventFlagsReg_SPEC,crate::common::R>::from_register(self,0)
651    }
652
653    #[doc = "Minute rolls over event flag. Indicate that minute rolls over event occurred since the last reset."]
654    #[inline(always)]
655    pub fn rtc_event_min(
656        self,
657    ) -> crate::common::RegisterFieldBool<2, 1, 0, RtcEventFlagsReg_SPEC, crate::common::R> {
658        crate::common::RegisterFieldBool::<2,1,0,RtcEventFlagsReg_SPEC,crate::common::R>::from_register(self,0)
659    }
660
661    #[doc = "Second rolls over event flag. Indicate that second rolls over event occurred since the last reset."]
662    #[inline(always)]
663    pub fn rtc_event_sec(
664        self,
665    ) -> crate::common::RegisterFieldBool<1, 1, 0, RtcEventFlagsReg_SPEC, crate::common::R> {
666        crate::common::RegisterFieldBool::<1,1,0,RtcEventFlagsReg_SPEC,crate::common::R>::from_register(self,0)
667    }
668
669    #[doc = "Hundredths of a second event flag. Indicate that hundredths of a second rolls over event occurred since the last reset."]
670    #[inline(always)]
671    pub fn rtc_event_hos(
672        self,
673    ) -> crate::common::RegisterFieldBool<0, 1, 0, RtcEventFlagsReg_SPEC, crate::common::R> {
674        crate::common::RegisterFieldBool::<0,1,0,RtcEventFlagsReg_SPEC,crate::common::R>::from_register(self,0)
675    }
676}
677impl ::core::default::Default for RtcEventFlagsReg {
678    #[inline(always)]
679    fn default() -> RtcEventFlagsReg {
680        <crate::RegValueT<RtcEventFlagsReg_SPEC> as RegisterValue<_>>::new(0)
681    }
682}
683
684#[doc(hidden)]
685#[derive(Copy, Clone, Eq, PartialEq)]
686pub struct RtcHourModeReg_SPEC;
687impl crate::sealed::RegSpec for RtcHourModeReg_SPEC {
688    type DataType = u32;
689}
690
691#[doc = "RTC Hour Mode Register"]
692pub type RtcHourModeReg = crate::RegValueT<RtcHourModeReg_SPEC>;
693
694impl RtcHourModeReg {
695    #[doc = "When this field is set high the RTC operates in 12 hour clock mode; otherwise, times are in 24 hour clock format."]
696    #[inline(always)]
697    pub fn rtc_hms(
698        self,
699    ) -> crate::common::RegisterFieldBool<0, 1, 0, RtcHourModeReg_SPEC, crate::common::RW> {
700        crate::common::RegisterFieldBool::<0,1,0,RtcHourModeReg_SPEC,crate::common::RW>::from_register(self,0)
701    }
702}
703impl ::core::default::Default for RtcHourModeReg {
704    #[inline(always)]
705    fn default() -> RtcHourModeReg {
706        <crate::RegValueT<RtcHourModeReg_SPEC> as RegisterValue<_>>::new(0)
707    }
708}
709
710#[doc(hidden)]
711#[derive(Copy, Clone, Eq, PartialEq)]
712pub struct RtcInterruptDisableReg_SPEC;
713impl crate::sealed::RegSpec for RtcInterruptDisableReg_SPEC {
714    type DataType = u32;
715}
716
717#[doc = "RTC Interrupt Disable Register"]
718pub type RtcInterruptDisableReg = crate::RegValueT<RtcInterruptDisableReg_SPEC>;
719
720impl RtcInterruptDisableReg {
721    #[doc = "Interrupt on alarm disable. Disable to issue the interrupt when alarm event occurred."]
722    #[inline(always)]
723    pub fn rtc_alrm_int_dis(
724        self,
725    ) -> crate::common::RegisterFieldBool<6, 1, 0, RtcInterruptDisableReg_SPEC, crate::common::W>
726    {
727        crate::common::RegisterFieldBool::<6,1,0,RtcInterruptDisableReg_SPEC,crate::common::W>::from_register(self,0)
728    }
729
730    #[doc = "Interrupt on month disable. Disable to issue the interrupt when month event occurred."]
731    #[inline(always)]
732    pub fn rtc_mnth_int_dis(
733        self,
734    ) -> crate::common::RegisterFieldBool<5, 1, 0, RtcInterruptDisableReg_SPEC, crate::common::W>
735    {
736        crate::common::RegisterFieldBool::<5,1,0,RtcInterruptDisableReg_SPEC,crate::common::W>::from_register(self,0)
737    }
738
739    #[doc = "Interrupt on date disable. Disable to issue the interrupt when date event occurred."]
740    #[inline(always)]
741    pub fn rtc_date_int_dis(
742        self,
743    ) -> crate::common::RegisterFieldBool<4, 1, 0, RtcInterruptDisableReg_SPEC, crate::common::W>
744    {
745        crate::common::RegisterFieldBool::<4,1,0,RtcInterruptDisableReg_SPEC,crate::common::W>::from_register(self,0)
746    }
747
748    #[doc = "IInterrupt on hour disable. Disable to issue the interrupt when hour event occurred."]
749    #[inline(always)]
750    pub fn rtc_hour_int_dis(
751        self,
752    ) -> crate::common::RegisterFieldBool<3, 1, 0, RtcInterruptDisableReg_SPEC, crate::common::W>
753    {
754        crate::common::RegisterFieldBool::<3,1,0,RtcInterruptDisableReg_SPEC,crate::common::W>::from_register(self,0)
755    }
756
757    #[doc = "Interrupt on minute disable. Disable to issue the interrupt when minute event occurred."]
758    #[inline(always)]
759    pub fn rtc_min_int_dis(
760        self,
761    ) -> crate::common::RegisterFieldBool<2, 1, 0, RtcInterruptDisableReg_SPEC, crate::common::W>
762    {
763        crate::common::RegisterFieldBool::<2,1,0,RtcInterruptDisableReg_SPEC,crate::common::W>::from_register(self,0)
764    }
765
766    #[doc = "Interrupt on second disable. Disable to issue the interrupt when second event occurred."]
767    #[inline(always)]
768    pub fn rtc_sec_int_dis(
769        self,
770    ) -> crate::common::RegisterFieldBool<1, 1, 0, RtcInterruptDisableReg_SPEC, crate::common::W>
771    {
772        crate::common::RegisterFieldBool::<1,1,0,RtcInterruptDisableReg_SPEC,crate::common::W>::from_register(self,0)
773    }
774
775    #[doc = "Interrupt on hundredths of a second disable. Disable to issue the interrupt when hundredths of a second event occurred."]
776    #[inline(always)]
777    pub fn rtc_hos_int_dis(
778        self,
779    ) -> crate::common::RegisterFieldBool<0, 1, 0, RtcInterruptDisableReg_SPEC, crate::common::W>
780    {
781        crate::common::RegisterFieldBool::<0,1,0,RtcInterruptDisableReg_SPEC,crate::common::W>::from_register(self,0)
782    }
783}
784impl ::core::default::Default for RtcInterruptDisableReg {
785    #[inline(always)]
786    fn default() -> RtcInterruptDisableReg {
787        <crate::RegValueT<RtcInterruptDisableReg_SPEC> as RegisterValue<_>>::new(0)
788    }
789}
790
791#[doc(hidden)]
792#[derive(Copy, Clone, Eq, PartialEq)]
793pub struct RtcInterruptEnableReg_SPEC;
794impl crate::sealed::RegSpec for RtcInterruptEnableReg_SPEC {
795    type DataType = u32;
796}
797
798#[doc = "RTC Interrupt Enable Register"]
799pub type RtcInterruptEnableReg = crate::RegValueT<RtcInterruptEnableReg_SPEC>;
800
801impl RtcInterruptEnableReg {
802    #[doc = "Interrupt on alarm enable. Enable to issue the interrupt when alarm event occurred."]
803    #[inline(always)]
804    pub fn rtc_alrm_int_en(
805        self,
806    ) -> crate::common::RegisterFieldBool<6, 1, 0, RtcInterruptEnableReg_SPEC, crate::common::W>
807    {
808        crate::common::RegisterFieldBool::<6,1,0,RtcInterruptEnableReg_SPEC,crate::common::W>::from_register(self,0)
809    }
810
811    #[doc = "Interrupt on month enable. Enable to issue the interrupt when month event occurred."]
812    #[inline(always)]
813    pub fn rtc_mnth_int_en(
814        self,
815    ) -> crate::common::RegisterFieldBool<5, 1, 0, RtcInterruptEnableReg_SPEC, crate::common::W>
816    {
817        crate::common::RegisterFieldBool::<5,1,0,RtcInterruptEnableReg_SPEC,crate::common::W>::from_register(self,0)
818    }
819
820    #[doc = "Interrupt on date enable. Enable to issue the interrupt when date event occurred."]
821    #[inline(always)]
822    pub fn rtc_date_int_en(
823        self,
824    ) -> crate::common::RegisterFieldBool<4, 1, 0, RtcInterruptEnableReg_SPEC, crate::common::W>
825    {
826        crate::common::RegisterFieldBool::<4,1,0,RtcInterruptEnableReg_SPEC,crate::common::W>::from_register(self,0)
827    }
828
829    #[doc = "Interrupt on hour enable. Enable to issue the interrupt when hour event occurred."]
830    #[inline(always)]
831    pub fn rtc_hour_int_en(
832        self,
833    ) -> crate::common::RegisterFieldBool<3, 1, 0, RtcInterruptEnableReg_SPEC, crate::common::W>
834    {
835        crate::common::RegisterFieldBool::<3,1,0,RtcInterruptEnableReg_SPEC,crate::common::W>::from_register(self,0)
836    }
837
838    #[doc = "Interrupt on minute enable. Enable to issue the interrupt when minute event occurred."]
839    #[inline(always)]
840    pub fn rtc_min_int_en(
841        self,
842    ) -> crate::common::RegisterFieldBool<2, 1, 0, RtcInterruptEnableReg_SPEC, crate::common::W>
843    {
844        crate::common::RegisterFieldBool::<2,1,0,RtcInterruptEnableReg_SPEC,crate::common::W>::from_register(self,0)
845    }
846
847    #[doc = "Interrupt on second enable. Enable to issue the interrupt when second event occurred."]
848    #[inline(always)]
849    pub fn rtc_sec_int_en(
850        self,
851    ) -> crate::common::RegisterFieldBool<1, 1, 0, RtcInterruptEnableReg_SPEC, crate::common::W>
852    {
853        crate::common::RegisterFieldBool::<1,1,0,RtcInterruptEnableReg_SPEC,crate::common::W>::from_register(self,0)
854    }
855
856    #[doc = "Interrupt on hundredths of a second enable. Enable to issue the interrupt when hundredths of a second event occurred."]
857    #[inline(always)]
858    pub fn rtc_hos_int_en(
859        self,
860    ) -> crate::common::RegisterFieldBool<0, 1, 0, RtcInterruptEnableReg_SPEC, crate::common::W>
861    {
862        crate::common::RegisterFieldBool::<0,1,0,RtcInterruptEnableReg_SPEC,crate::common::W>::from_register(self,0)
863    }
864}
865impl ::core::default::Default for RtcInterruptEnableReg {
866    #[inline(always)]
867    fn default() -> RtcInterruptEnableReg {
868        <crate::RegValueT<RtcInterruptEnableReg_SPEC> as RegisterValue<_>>::new(0)
869    }
870}
871
872#[doc(hidden)]
873#[derive(Copy, Clone, Eq, PartialEq)]
874pub struct RtcInterruptMaskReg_SPEC;
875impl crate::sealed::RegSpec for RtcInterruptMaskReg_SPEC {
876    type DataType = u32;
877}
878
879#[doc = "RTC Interrupt Mask Register"]
880pub type RtcInterruptMaskReg = crate::RegValueT<RtcInterruptMaskReg_SPEC>;
881
882impl RtcInterruptMaskReg {
883    #[doc = "Mask alarm interrupt. It can be cleared (set) by setting corresponding bit (ALRM) in Interrupt Enable Register (Interrupt Disable Register)."]
884    #[inline(always)]
885    pub fn rtc_alrm_int_msk(
886        self,
887    ) -> crate::common::RegisterFieldBool<6, 1, 0, RtcInterruptMaskReg_SPEC, crate::common::R> {
888        crate::common::RegisterFieldBool::<6,1,0,RtcInterruptMaskReg_SPEC,crate::common::R>::from_register(self,0)
889    }
890
891    #[doc = "IMask month interrupt. It can be cleared (set) by setting corresponding bit (MNTH) in Interrupt Enable Register (Interrupt Disable Register)."]
892    #[inline(always)]
893    pub fn rtc_mnth_int_msk(
894        self,
895    ) -> crate::common::RegisterFieldBool<5, 1, 0, RtcInterruptMaskReg_SPEC, crate::common::R> {
896        crate::common::RegisterFieldBool::<5,1,0,RtcInterruptMaskReg_SPEC,crate::common::R>::from_register(self,0)
897    }
898
899    #[doc = "Mask date interrupt. It can be cleared (set) by setting corresponding bit (DATE) in Interrupt Enable Register (Interrupt Disable Register)."]
900    #[inline(always)]
901    pub fn rtc_date_int_msk(
902        self,
903    ) -> crate::common::RegisterFieldBool<4, 1, 0, RtcInterruptMaskReg_SPEC, crate::common::R> {
904        crate::common::RegisterFieldBool::<4,1,0,RtcInterruptMaskReg_SPEC,crate::common::R>::from_register(self,0)
905    }
906
907    #[doc = "IMask hour interrupt. It can be cleared (set) by setting corresponding bit (HOUR) in Interrupt Enable Register (Interrupt Disable Register)."]
908    #[inline(always)]
909    pub fn rtc_hour_int_msk(
910        self,
911    ) -> crate::common::RegisterFieldBool<3, 1, 0, RtcInterruptMaskReg_SPEC, crate::common::R> {
912        crate::common::RegisterFieldBool::<3,1,0,RtcInterruptMaskReg_SPEC,crate::common::R>::from_register(self,0)
913    }
914
915    #[doc = "IMask minute interrupt. It can be cleared (set) by setting corresponding bit (MIN) in Interrupt Enable Register (Interrupt Disable Register)."]
916    #[inline(always)]
917    pub fn rtc_min_int_msk(
918        self,
919    ) -> crate::common::RegisterFieldBool<2, 1, 0, RtcInterruptMaskReg_SPEC, crate::common::R> {
920        crate::common::RegisterFieldBool::<2,1,0,RtcInterruptMaskReg_SPEC,crate::common::R>::from_register(self,0)
921    }
922
923    #[doc = "IMask second interrupt. It can be cleared (set) by setting corresponding bit (SEC) in Interrupt Enable Register (Interrupt Disable Register)."]
924    #[inline(always)]
925    pub fn rtc_sec_int_msk(
926        self,
927    ) -> crate::common::RegisterFieldBool<1, 1, 0, RtcInterruptMaskReg_SPEC, crate::common::R> {
928        crate::common::RegisterFieldBool::<1,1,0,RtcInterruptMaskReg_SPEC,crate::common::R>::from_register(self,0)
929    }
930
931    #[doc = "Mask hundredths of a second interrupt. It can be cleared (set) by setting corresponding bit (HOS) in Interrupt Enable Register (Interrupt Disable Register)."]
932    #[inline(always)]
933    pub fn rtc_hos_int_msk(
934        self,
935    ) -> crate::common::RegisterFieldBool<0, 1, 0, RtcInterruptMaskReg_SPEC, crate::common::R> {
936        crate::common::RegisterFieldBool::<0,1,0,RtcInterruptMaskReg_SPEC,crate::common::R>::from_register(self,0)
937    }
938}
939impl ::core::default::Default for RtcInterruptMaskReg {
940    #[inline(always)]
941    fn default() -> RtcInterruptMaskReg {
942        <crate::RegValueT<RtcInterruptMaskReg_SPEC> as RegisterValue<_>>::new(127)
943    }
944}
945
946#[doc(hidden)]
947#[derive(Copy, Clone, Eq, PartialEq)]
948pub struct RtcKeepRtcReg_SPEC;
949impl crate::sealed::RegSpec for RtcKeepRtcReg_SPEC {
950    type DataType = u32;
951}
952
953#[doc = "RTC Keep RTC Register"]
954pub type RtcKeepRtcReg = crate::RegValueT<RtcKeepRtcReg_SPEC>;
955
956impl RtcKeepRtcReg {
957    #[doc = "Keep RTC. When high, the time and calendar registers and any other registers which directly affect or are affected by the time and calendar registers are NOT reset when software reset is applied. When low, the software reset will reset every register except the keep RTC and control registers."]
958    #[inline(always)]
959    pub fn rtc_keep(
960        self,
961    ) -> crate::common::RegisterFieldBool<0, 1, 0, RtcKeepRtcReg_SPEC, crate::common::RW> {
962        crate::common::RegisterFieldBool::<0,1,0,RtcKeepRtcReg_SPEC,crate::common::RW>::from_register(self,0)
963    }
964}
965impl ::core::default::Default for RtcKeepRtcReg {
966    #[inline(always)]
967    fn default() -> RtcKeepRtcReg {
968        <crate::RegValueT<RtcKeepRtcReg_SPEC> as RegisterValue<_>>::new(1)
969    }
970}
971
972#[doc(hidden)]
973#[derive(Copy, Clone, Eq, PartialEq)]
974pub struct RtcMotorEventCntReg_SPEC;
975impl crate::sealed::RegSpec for RtcMotorEventCntReg_SPEC {
976    type DataType = u32;
977}
978
979#[doc = "RTC Motor Event Counter Register"]
980pub type RtcMotorEventCntReg = crate::RegValueT<RtcMotorEventCntReg_SPEC>;
981
982impl RtcMotorEventCntReg {
983    #[doc = "It gives the current value of the Motor event counter (0 to RTC_MOTOR_EVENT_PERIOD)"]
984    #[inline(always)]
985    pub fn rtc_motor_event_cnt(
986        self,
987    ) -> crate::common::RegisterField<
988        0,
989        0xfff,
990        1,
991        0,
992        u16,
993        u16,
994        RtcMotorEventCntReg_SPEC,
995        crate::common::R,
996    > {
997        crate::common::RegisterField::<
998            0,
999            0xfff,
1000            1,
1001            0,
1002            u16,
1003            u16,
1004            RtcMotorEventCntReg_SPEC,
1005            crate::common::R,
1006        >::from_register(self, 0)
1007    }
1008}
1009impl ::core::default::Default for RtcMotorEventCntReg {
1010    #[inline(always)]
1011    fn default() -> RtcMotorEventCntReg {
1012        <crate::RegValueT<RtcMotorEventCntReg_SPEC> as RegisterValue<_>>::new(0)
1013    }
1014}
1015
1016#[doc(hidden)]
1017#[derive(Copy, Clone, Eq, PartialEq)]
1018pub struct RtcMotorEventPeriodReg_SPEC;
1019impl crate::sealed::RegSpec for RtcMotorEventPeriodReg_SPEC {
1020    type DataType = u32;
1021}
1022
1023#[doc = "RTC Motor Event Period Register"]
1024pub type RtcMotorEventPeriodReg = crate::RegValueT<RtcMotorEventPeriodReg_SPEC>;
1025
1026impl RtcMotorEventPeriodReg {
1027    #[doc = "RTC wil send an event to motor (if RTC_MOTOR_EVENT_EN=1) every (RTC_MOTOR_EVENT_PERIOD+1)*10ms"]
1028    #[inline(always)]
1029    pub fn rtc_motor_event_period(
1030        self,
1031    ) -> crate::common::RegisterField<
1032        0,
1033        0xfff,
1034        1,
1035        0,
1036        u16,
1037        u16,
1038        RtcMotorEventPeriodReg_SPEC,
1039        crate::common::RW,
1040    > {
1041        crate::common::RegisterField::<
1042            0,
1043            0xfff,
1044            1,
1045            0,
1046            u16,
1047            u16,
1048            RtcMotorEventPeriodReg_SPEC,
1049            crate::common::RW,
1050        >::from_register(self, 0)
1051    }
1052}
1053impl ::core::default::Default for RtcMotorEventPeriodReg {
1054    #[inline(always)]
1055    fn default() -> RtcMotorEventPeriodReg {
1056        <crate::RegValueT<RtcMotorEventPeriodReg_SPEC> as RegisterValue<_>>::new(0)
1057    }
1058}
1059
1060#[doc(hidden)]
1061#[derive(Copy, Clone, Eq, PartialEq)]
1062pub struct RtcPdcEventClearReg_SPEC;
1063impl crate::sealed::RegSpec for RtcPdcEventClearReg_SPEC {
1064    type DataType = u32;
1065}
1066
1067#[doc = "RTC PDC Event Clear Register"]
1068pub type RtcPdcEventClearReg = crate::RegValueT<RtcPdcEventClearReg_SPEC>;
1069
1070impl RtcPdcEventClearReg {
1071    #[doc = "On read, PDC event is cleared"]
1072    #[inline(always)]
1073    pub fn pdc_event_clear(
1074        self,
1075    ) -> crate::common::RegisterFieldBool<0, 1, 0, RtcPdcEventClearReg_SPEC, crate::common::R> {
1076        crate::common::RegisterFieldBool::<0,1,0,RtcPdcEventClearReg_SPEC,crate::common::R>::from_register(self,0)
1077    }
1078}
1079impl ::core::default::Default for RtcPdcEventClearReg {
1080    #[inline(always)]
1081    fn default() -> RtcPdcEventClearReg {
1082        <crate::RegValueT<RtcPdcEventClearReg_SPEC> as RegisterValue<_>>::new(0)
1083    }
1084}
1085
1086#[doc(hidden)]
1087#[derive(Copy, Clone, Eq, PartialEq)]
1088pub struct RtcPdcEventCntReg_SPEC;
1089impl crate::sealed::RegSpec for RtcPdcEventCntReg_SPEC {
1090    type DataType = u32;
1091}
1092
1093#[doc = "RTC PDC Event Counter Register"]
1094pub type RtcPdcEventCntReg = crate::RegValueT<RtcPdcEventCntReg_SPEC>;
1095
1096impl RtcPdcEventCntReg {
1097    #[doc = "It gives the current value of the PDC event counter (0 to RTC_PDC_EVENT_PERIOD)"]
1098    #[inline(always)]
1099    pub fn rtc_pdc_event_cnt(
1100        self,
1101    ) -> crate::common::RegisterField<
1102        0,
1103        0x1fff,
1104        1,
1105        0,
1106        u16,
1107        u16,
1108        RtcPdcEventCntReg_SPEC,
1109        crate::common::R,
1110    > {
1111        crate::common::RegisterField::<
1112            0,
1113            0x1fff,
1114            1,
1115            0,
1116            u16,
1117            u16,
1118            RtcPdcEventCntReg_SPEC,
1119            crate::common::R,
1120        >::from_register(self, 0)
1121    }
1122}
1123impl ::core::default::Default for RtcPdcEventCntReg {
1124    #[inline(always)]
1125    fn default() -> RtcPdcEventCntReg {
1126        <crate::RegValueT<RtcPdcEventCntReg_SPEC> as RegisterValue<_>>::new(0)
1127    }
1128}
1129
1130#[doc(hidden)]
1131#[derive(Copy, Clone, Eq, PartialEq)]
1132pub struct RtcPdcEventPeriodReg_SPEC;
1133impl crate::sealed::RegSpec for RtcPdcEventPeriodReg_SPEC {
1134    type DataType = u32;
1135}
1136
1137#[doc = "RTC PDC Event Period Register"]
1138pub type RtcPdcEventPeriodReg = crate::RegValueT<RtcPdcEventPeriodReg_SPEC>;
1139
1140impl RtcPdcEventPeriodReg {
1141    #[doc = "RTC wil send an event to PDC (if RTC_PDC_EVENT_EN=1) every (RTC_PDC_EVENT_PERIOD+1)*10ms"]
1142    #[inline(always)]
1143    pub fn rtc_pdc_event_period(
1144        self,
1145    ) -> crate::common::RegisterField<
1146        0,
1147        0x1fff,
1148        1,
1149        0,
1150        u16,
1151        u16,
1152        RtcPdcEventPeriodReg_SPEC,
1153        crate::common::RW,
1154    > {
1155        crate::common::RegisterField::<
1156            0,
1157            0x1fff,
1158            1,
1159            0,
1160            u16,
1161            u16,
1162            RtcPdcEventPeriodReg_SPEC,
1163            crate::common::RW,
1164        >::from_register(self, 0)
1165    }
1166}
1167impl ::core::default::Default for RtcPdcEventPeriodReg {
1168    #[inline(always)]
1169    fn default() -> RtcPdcEventPeriodReg {
1170        <crate::RegValueT<RtcPdcEventPeriodReg_SPEC> as RegisterValue<_>>::new(0)
1171    }
1172}
1173
1174#[doc(hidden)]
1175#[derive(Copy, Clone, Eq, PartialEq)]
1176pub struct RtcStatusReg_SPEC;
1177impl crate::sealed::RegSpec for RtcStatusReg_SPEC {
1178    type DataType = u32;
1179}
1180
1181#[doc = "RTC Status Register"]
1182pub type RtcStatusReg = crate::RegValueT<RtcStatusReg_SPEC>;
1183
1184impl RtcStatusReg {
1185    #[doc = "Valid Calendar Alarm. If cleared then indicates that invalid entry occurred when writing to Calendar Alarm Register."]
1186    #[inline(always)]
1187    pub fn rtc_valid_cal_alm(
1188        self,
1189    ) -> crate::common::RegisterFieldBool<3, 1, 0, RtcStatusReg_SPEC, crate::common::R> {
1190        crate::common::RegisterFieldBool::<3,1,0,RtcStatusReg_SPEC,crate::common::R>::from_register(self,0)
1191    }
1192
1193    #[doc = "Valid Time Alarm. If cleared then indicates that invalid entry occurred when writing to Time Alarm Register."]
1194    #[inline(always)]
1195    pub fn rtc_valid_time_alm(
1196        self,
1197    ) -> crate::common::RegisterFieldBool<2, 1, 0, RtcStatusReg_SPEC, crate::common::R> {
1198        crate::common::RegisterFieldBool::<2,1,0,RtcStatusReg_SPEC,crate::common::R>::from_register(self,0)
1199    }
1200
1201    #[doc = "Valid Calendar. If cleared then indicates that invalid entry occurred when writing to Calendar Register."]
1202    #[inline(always)]
1203    pub fn rtc_valid_cal(
1204        self,
1205    ) -> crate::common::RegisterFieldBool<1, 1, 0, RtcStatusReg_SPEC, crate::common::R> {
1206        crate::common::RegisterFieldBool::<1,1,0,RtcStatusReg_SPEC,crate::common::R>::from_register(self,0)
1207    }
1208
1209    #[doc = "Valid Time. If cleared then indicates that invalid entry occurred when writing to Time Register."]
1210    #[inline(always)]
1211    pub fn rtc_valid_time(
1212        self,
1213    ) -> crate::common::RegisterFieldBool<0, 1, 0, RtcStatusReg_SPEC, crate::common::R> {
1214        crate::common::RegisterFieldBool::<0,1,0,RtcStatusReg_SPEC,crate::common::R>::from_register(self,0)
1215    }
1216}
1217impl ::core::default::Default for RtcStatusReg {
1218    #[inline(always)]
1219    fn default() -> RtcStatusReg {
1220        <crate::RegValueT<RtcStatusReg_SPEC> as RegisterValue<_>>::new(15)
1221    }
1222}
1223
1224#[doc(hidden)]
1225#[derive(Copy, Clone, Eq, PartialEq)]
1226pub struct RtcTimeAlarmReg_SPEC;
1227impl crate::sealed::RegSpec for RtcTimeAlarmReg_SPEC {
1228    type DataType = u32;
1229}
1230
1231#[doc = "RTC Time Alarm Register"]
1232pub type RtcTimeAlarmReg = crate::RegValueT<RtcTimeAlarmReg_SPEC>;
1233
1234impl RtcTimeAlarmReg {
1235    #[doc = "In 12 hour clock mode, indicates PM when set."]
1236    #[inline(always)]
1237    pub fn rtc_time_pm(
1238        self,
1239    ) -> crate::common::RegisterFieldBool<30, 1, 0, RtcTimeAlarmReg_SPEC, crate::common::RW> {
1240        crate::common::RegisterFieldBool::<30,1,0,RtcTimeAlarmReg_SPEC,crate::common::RW>::from_register(self,0)
1241    }
1242
1243    #[doc = "Hours tens. Represented in BCD digit (0-2)."]
1244    #[inline(always)]
1245    pub fn rtc_time_hr_t(
1246        self,
1247    ) -> crate::common::RegisterField<28, 0x3, 1, 0, u8, u8, RtcTimeAlarmReg_SPEC, crate::common::RW>
1248    {
1249        crate::common::RegisterField::<28,0x3,1,0,u8,u8,RtcTimeAlarmReg_SPEC,crate::common::RW>::from_register(self,0)
1250    }
1251
1252    #[doc = "Hours units. Represented in BCD digit (0-9)."]
1253    #[inline(always)]
1254    pub fn rtc_time_hr_u(
1255        self,
1256    ) -> crate::common::RegisterField<24, 0xf, 1, 0, u8, u8, RtcTimeAlarmReg_SPEC, crate::common::RW>
1257    {
1258        crate::common::RegisterField::<24,0xf,1,0,u8,u8,RtcTimeAlarmReg_SPEC,crate::common::RW>::from_register(self,0)
1259    }
1260
1261    #[doc = "Minutes tens. Represented in BCD digit (0-5)."]
1262    #[inline(always)]
1263    pub fn rtc_time_m_t(
1264        self,
1265    ) -> crate::common::RegisterField<20, 0x7, 1, 0, u8, u8, RtcTimeAlarmReg_SPEC, crate::common::RW>
1266    {
1267        crate::common::RegisterField::<20,0x7,1,0,u8,u8,RtcTimeAlarmReg_SPEC,crate::common::RW>::from_register(self,0)
1268    }
1269
1270    #[doc = "Minutes units. Represented in BCD digit (0-9)."]
1271    #[inline(always)]
1272    pub fn rtc_time_m_u(
1273        self,
1274    ) -> crate::common::RegisterField<16, 0xf, 1, 0, u8, u8, RtcTimeAlarmReg_SPEC, crate::common::RW>
1275    {
1276        crate::common::RegisterField::<16,0xf,1,0,u8,u8,RtcTimeAlarmReg_SPEC,crate::common::RW>::from_register(self,0)
1277    }
1278
1279    #[doc = "Seconds tens. Represented in BCD digit (0-9)."]
1280    #[inline(always)]
1281    pub fn rtc_time_s_t(
1282        self,
1283    ) -> crate::common::RegisterField<12, 0x7, 1, 0, u8, u8, RtcTimeAlarmReg_SPEC, crate::common::RW>
1284    {
1285        crate::common::RegisterField::<12,0x7,1,0,u8,u8,RtcTimeAlarmReg_SPEC,crate::common::RW>::from_register(self,0)
1286    }
1287
1288    #[doc = "Seconds units. Represented in BCD digit (0-9)."]
1289    #[inline(always)]
1290    pub fn rtc_time_s_u(
1291        self,
1292    ) -> crate::common::RegisterField<8, 0xf, 1, 0, u8, u8, RtcTimeAlarmReg_SPEC, crate::common::RW>
1293    {
1294        crate::common::RegisterField::<8,0xf,1,0,u8,u8,RtcTimeAlarmReg_SPEC,crate::common::RW>::from_register(self,0)
1295    }
1296
1297    #[doc = "Hundredths of a second tens. Represented in BCD digit (0-9)."]
1298    #[inline(always)]
1299    pub fn rtc_time_h_t(
1300        self,
1301    ) -> crate::common::RegisterField<4, 0xf, 1, 0, u8, u8, RtcTimeAlarmReg_SPEC, crate::common::RW>
1302    {
1303        crate::common::RegisterField::<4,0xf,1,0,u8,u8,RtcTimeAlarmReg_SPEC,crate::common::RW>::from_register(self,0)
1304    }
1305
1306    #[doc = "Hundredths of a second units. Represented in BCD digit (0-9)."]
1307    #[inline(always)]
1308    pub fn rtc_time_h_u(
1309        self,
1310    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, RtcTimeAlarmReg_SPEC, crate::common::RW>
1311    {
1312        crate::common::RegisterField::<0,0xf,1,0,u8,u8,RtcTimeAlarmReg_SPEC,crate::common::RW>::from_register(self,0)
1313    }
1314}
1315impl ::core::default::Default for RtcTimeAlarmReg {
1316    #[inline(always)]
1317    fn default() -> RtcTimeAlarmReg {
1318        <crate::RegValueT<RtcTimeAlarmReg_SPEC> as RegisterValue<_>>::new(0)
1319    }
1320}
1321
1322#[doc(hidden)]
1323#[derive(Copy, Clone, Eq, PartialEq)]
1324pub struct RtcTimeReg_SPEC;
1325impl crate::sealed::RegSpec for RtcTimeReg_SPEC {
1326    type DataType = u32;
1327}
1328
1329#[doc = "RTC Time Register"]
1330pub type RtcTimeReg = crate::RegValueT<RtcTimeReg_SPEC>;
1331
1332impl RtcTimeReg {
1333    #[doc = "The value in this register has altered since last read. Read and clear."]
1334    #[inline(always)]
1335    pub fn rtc_time_ch(
1336        self,
1337    ) -> crate::common::RegisterFieldBool<31, 1, 0, RtcTimeReg_SPEC, crate::common::RW> {
1338        crate::common::RegisterFieldBool::<31,1,0,RtcTimeReg_SPEC,crate::common::RW>::from_register(self,0)
1339    }
1340
1341    #[doc = "In 12 hour clock mode, indicates PM when set."]
1342    #[inline(always)]
1343    pub fn rtc_time_pm(
1344        self,
1345    ) -> crate::common::RegisterFieldBool<30, 1, 0, RtcTimeReg_SPEC, crate::common::RW> {
1346        crate::common::RegisterFieldBool::<30,1,0,RtcTimeReg_SPEC,crate::common::RW>::from_register(self,0)
1347    }
1348
1349    #[doc = "Hours tens. Represented in BCD digit (0-2)."]
1350    #[inline(always)]
1351    pub fn rtc_time_hr_t(
1352        self,
1353    ) -> crate::common::RegisterField<28, 0x3, 1, 0, u8, u8, RtcTimeReg_SPEC, crate::common::RW>
1354    {
1355        crate::common::RegisterField::<28,0x3,1,0,u8,u8,RtcTimeReg_SPEC,crate::common::RW>::from_register(self,0)
1356    }
1357
1358    #[doc = "Hours units. Represented in BCD digit (0-9)."]
1359    #[inline(always)]
1360    pub fn rtc_time_hr_u(
1361        self,
1362    ) -> crate::common::RegisterField<24, 0xf, 1, 0, u8, u8, RtcTimeReg_SPEC, crate::common::RW>
1363    {
1364        crate::common::RegisterField::<24,0xf,1,0,u8,u8,RtcTimeReg_SPEC,crate::common::RW>::from_register(self,0)
1365    }
1366
1367    #[doc = "Minutes tens. Represented in BCD digit (0-5)."]
1368    #[inline(always)]
1369    pub fn rtc_time_m_t(
1370        self,
1371    ) -> crate::common::RegisterField<20, 0x7, 1, 0, u8, u8, RtcTimeReg_SPEC, crate::common::RW>
1372    {
1373        crate::common::RegisterField::<20,0x7,1,0,u8,u8,RtcTimeReg_SPEC,crate::common::RW>::from_register(self,0)
1374    }
1375
1376    #[doc = "Minutes units. Represented in BCD digit (0-9)."]
1377    #[inline(always)]
1378    pub fn rtc_time_m_u(
1379        self,
1380    ) -> crate::common::RegisterField<16, 0xf, 1, 0, u8, u8, RtcTimeReg_SPEC, crate::common::RW>
1381    {
1382        crate::common::RegisterField::<16,0xf,1,0,u8,u8,RtcTimeReg_SPEC,crate::common::RW>::from_register(self,0)
1383    }
1384
1385    #[doc = "Seconds tens. Represented in BCD digit (0-9)."]
1386    #[inline(always)]
1387    pub fn rtc_time_s_t(
1388        self,
1389    ) -> crate::common::RegisterField<12, 0x7, 1, 0, u8, u8, RtcTimeReg_SPEC, crate::common::RW>
1390    {
1391        crate::common::RegisterField::<12,0x7,1,0,u8,u8,RtcTimeReg_SPEC,crate::common::RW>::from_register(self,0)
1392    }
1393
1394    #[doc = "Seconds units. Represented in BCD digit (0-9)."]
1395    #[inline(always)]
1396    pub fn rtc_time_s_u(
1397        self,
1398    ) -> crate::common::RegisterField<8, 0xf, 1, 0, u8, u8, RtcTimeReg_SPEC, crate::common::RW>
1399    {
1400        crate::common::RegisterField::<8,0xf,1,0,u8,u8,RtcTimeReg_SPEC,crate::common::RW>::from_register(self,0)
1401    }
1402
1403    #[doc = "Hundredths of a second tens. Represented in BCD digit (0-9)."]
1404    #[inline(always)]
1405    pub fn rtc_time_h_t(
1406        self,
1407    ) -> crate::common::RegisterField<4, 0xf, 1, 0, u8, u8, RtcTimeReg_SPEC, crate::common::RW>
1408    {
1409        crate::common::RegisterField::<4,0xf,1,0,u8,u8,RtcTimeReg_SPEC,crate::common::RW>::from_register(self,0)
1410    }
1411
1412    #[doc = "Hundredths of a second units. Represented in BCD digit (0-9)."]
1413    #[inline(always)]
1414    pub fn rtc_time_h_u(
1415        self,
1416    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, RtcTimeReg_SPEC, crate::common::RW>
1417    {
1418        crate::common::RegisterField::<0,0xf,1,0,u8,u8,RtcTimeReg_SPEC,crate::common::RW>::from_register(self,0)
1419    }
1420}
1421impl ::core::default::Default for RtcTimeReg {
1422    #[inline(always)]
1423    fn default() -> RtcTimeReg {
1424        <crate::RegValueT<RtcTimeReg_SPEC> as RegisterValue<_>>::new(0)
1425    }
1426}