Skip to main content

da14531_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:44:12 +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 Flags Register"]
86    #[inline(always)]
87    pub const fn rtc_event_flags_reg(
88        &self,
89    ) -> &'static crate::common::Reg<self::RtcEventFlagsReg_SPEC, crate::common::RW> {
90        unsafe {
91            crate::common::Reg::<self::RtcEventFlagsReg_SPEC, crate::common::RW>::from_ptr(
92                self._svd2pac_as_ptr().add(28usize),
93            )
94        }
95    }
96
97    #[doc = "RTC Hour Mode Register"]
98    #[inline(always)]
99    pub const fn rtc_hour_mode_reg(
100        &self,
101    ) -> &'static crate::common::Reg<self::RtcHourModeReg_SPEC, crate::common::RW> {
102        unsafe {
103            crate::common::Reg::<self::RtcHourModeReg_SPEC, crate::common::RW>::from_ptr(
104                self._svd2pac_as_ptr().add(4usize),
105            )
106        }
107    }
108
109    #[doc = "RTC Interrupt Disable Register"]
110    #[inline(always)]
111    pub const fn rtc_interrupt_disable_reg(
112        &self,
113    ) -> &'static crate::common::Reg<self::RtcInterruptDisableReg_SPEC, crate::common::RW> {
114        unsafe {
115            crate::common::Reg::<self::RtcInterruptDisableReg_SPEC, crate::common::RW>::from_ptr(
116                self._svd2pac_as_ptr().add(36usize),
117            )
118        }
119    }
120
121    #[doc = "RTC Interrupt Enable Register"]
122    #[inline(always)]
123    pub const fn rtc_interrupt_enable_reg(
124        &self,
125    ) -> &'static crate::common::Reg<self::RtcInterruptEnableReg_SPEC, crate::common::RW> {
126        unsafe {
127            crate::common::Reg::<self::RtcInterruptEnableReg_SPEC, crate::common::RW>::from_ptr(
128                self._svd2pac_as_ptr().add(32usize),
129            )
130        }
131    }
132
133    #[doc = "RTC Interrupt Mask Register"]
134    #[inline(always)]
135    pub const fn rtc_interrupt_mask_reg(
136        &self,
137    ) -> &'static crate::common::Reg<self::RtcInterruptMaskReg_SPEC, crate::common::RW> {
138        unsafe {
139            crate::common::Reg::<self::RtcInterruptMaskReg_SPEC, crate::common::RW>::from_ptr(
140                self._svd2pac_as_ptr().add(40usize),
141            )
142        }
143    }
144
145    #[doc = "RTC Keep RTC Register"]
146    #[inline(always)]
147    pub const fn rtc_keep_rtc_reg(
148        &self,
149    ) -> &'static crate::common::Reg<self::RtcKeepRtcReg_SPEC, crate::common::RW> {
150        unsafe {
151            crate::common::Reg::<self::RtcKeepRtcReg_SPEC, crate::common::RW>::from_ptr(
152                self._svd2pac_as_ptr().add(48usize),
153            )
154        }
155    }
156
157    #[doc = "RTC Status Register"]
158    #[inline(always)]
159    pub const fn rtc_status_reg(
160        &self,
161    ) -> &'static crate::common::Reg<self::RtcStatusReg_SPEC, crate::common::RW> {
162        unsafe {
163            crate::common::Reg::<self::RtcStatusReg_SPEC, crate::common::RW>::from_ptr(
164                self._svd2pac_as_ptr().add(44usize),
165            )
166        }
167    }
168
169    #[doc = "RTC Time Alarm Register"]
170    #[inline(always)]
171    pub const fn rtc_time_alarm_reg(
172        &self,
173    ) -> &'static crate::common::Reg<self::RtcTimeAlarmReg_SPEC, crate::common::RW> {
174        unsafe {
175            crate::common::Reg::<self::RtcTimeAlarmReg_SPEC, crate::common::RW>::from_ptr(
176                self._svd2pac_as_ptr().add(16usize),
177            )
178        }
179    }
180
181    #[doc = "RTC Time Register"]
182    #[inline(always)]
183    pub const fn rtc_time_reg(
184        &self,
185    ) -> &'static crate::common::Reg<self::RtcTimeReg_SPEC, crate::common::RW> {
186        unsafe {
187            crate::common::Reg::<self::RtcTimeReg_SPEC, crate::common::RW>::from_ptr(
188                self._svd2pac_as_ptr().add(8usize),
189            )
190        }
191    }
192}
193#[doc(hidden)]
194#[derive(Copy, Clone, Eq, PartialEq)]
195pub struct RtcAlarmEnableReg_SPEC;
196impl crate::sealed::RegSpec for RtcAlarmEnableReg_SPEC {
197    type DataType = u32;
198}
199
200#[doc = "RTC Alarm Enable Register"]
201pub type RtcAlarmEnableReg = crate::RegValueT<RtcAlarmEnableReg_SPEC>;
202
203impl RtcAlarmEnableReg {
204    #[doc = "Alarm on month enable. Enable to trigger alarm when data specified in Calendar Alarm Register (M_T and M_U) has been reached."]
205    #[inline(always)]
206    pub fn rtc_alarm_mnth_en(
207        self,
208    ) -> crate::common::RegisterFieldBool<5, 1, 0, RtcAlarmEnableReg_SPEC, crate::common::RW> {
209        crate::common::RegisterFieldBool::<5,1,0,RtcAlarmEnableReg_SPEC,crate::common::RW>::from_register(self,0)
210    }
211
212    #[doc = "Alarm on date enable. Enable to trigger alarm when data specified in Calendar Alarm Register (D_T and D_U) has been reached."]
213    #[inline(always)]
214    pub fn rtc_alarm_date_en(
215        self,
216    ) -> crate::common::RegisterFieldBool<4, 1, 0, RtcAlarmEnableReg_SPEC, crate::common::RW> {
217        crate::common::RegisterFieldBool::<4,1,0,RtcAlarmEnableReg_SPEC,crate::common::RW>::from_register(self,0)
218    }
219
220    #[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."]
221    #[inline(always)]
222    pub fn rtc_alarm_hour_en(
223        self,
224    ) -> crate::common::RegisterFieldBool<3, 1, 0, RtcAlarmEnableReg_SPEC, crate::common::RW> {
225        crate::common::RegisterFieldBool::<3,1,0,RtcAlarmEnableReg_SPEC,crate::common::RW>::from_register(self,0)
226    }
227
228    #[doc = "Alarm on minute enable. Enable to trigger alarm when data specified in Time Alarm Register (M_T and M_U) has been reached."]
229    #[inline(always)]
230    pub fn rtc_alarm_min_en(
231        self,
232    ) -> crate::common::RegisterFieldBool<2, 1, 0, RtcAlarmEnableReg_SPEC, crate::common::RW> {
233        crate::common::RegisterFieldBool::<2,1,0,RtcAlarmEnableReg_SPEC,crate::common::RW>::from_register(self,0)
234    }
235
236    #[doc = "Alarm on second enable. Enable to trigger alarm when data specified in Time Alarm Register (S_T and S_U) has been reached."]
237    #[inline(always)]
238    pub fn rtc_alarm_sec_en(
239        self,
240    ) -> crate::common::RegisterFieldBool<1, 1, 0, RtcAlarmEnableReg_SPEC, crate::common::RW> {
241        crate::common::RegisterFieldBool::<1,1,0,RtcAlarmEnableReg_SPEC,crate::common::RW>::from_register(self,0)
242    }
243
244    #[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."]
245    #[inline(always)]
246    pub fn rtc_alarm_hos_en(
247        self,
248    ) -> crate::common::RegisterFieldBool<0, 1, 0, RtcAlarmEnableReg_SPEC, crate::common::RW> {
249        crate::common::RegisterFieldBool::<0,1,0,RtcAlarmEnableReg_SPEC,crate::common::RW>::from_register(self,0)
250    }
251}
252impl ::core::default::Default for RtcAlarmEnableReg {
253    #[inline(always)]
254    fn default() -> RtcAlarmEnableReg {
255        <crate::RegValueT<RtcAlarmEnableReg_SPEC> as RegisterValue<_>>::new(0)
256    }
257}
258
259#[doc(hidden)]
260#[derive(Copy, Clone, Eq, PartialEq)]
261pub struct RtcCalendarAlarmReg_SPEC;
262impl crate::sealed::RegSpec for RtcCalendarAlarmReg_SPEC {
263    type DataType = u32;
264}
265
266#[doc = "RTC Calendar Alram Register"]
267pub type RtcCalendarAlarmReg = crate::RegValueT<RtcCalendarAlarmReg_SPEC>;
268
269impl RtcCalendarAlarmReg {
270    #[doc = "Date tens. Represented in BCD digit (0-3)."]
271    #[inline(always)]
272    pub fn rtc_cal_d_t(
273        self,
274    ) -> crate::common::RegisterField<
275        12,
276        0x3,
277        1,
278        0,
279        u8,
280        u8,
281        RtcCalendarAlarmReg_SPEC,
282        crate::common::RW,
283    > {
284        crate::common::RegisterField::<
285            12,
286            0x3,
287            1,
288            0,
289            u8,
290            u8,
291            RtcCalendarAlarmReg_SPEC,
292            crate::common::RW,
293        >::from_register(self, 0)
294    }
295
296    #[doc = "Date units. Represented in BCD digit (0-9)."]
297    #[inline(always)]
298    pub fn rtc_cal_d_u(
299        self,
300    ) -> crate::common::RegisterField<
301        8,
302        0xf,
303        1,
304        0,
305        u8,
306        u8,
307        RtcCalendarAlarmReg_SPEC,
308        crate::common::RW,
309    > {
310        crate::common::RegisterField::<
311            8,
312            0xf,
313            1,
314            0,
315            u8,
316            u8,
317            RtcCalendarAlarmReg_SPEC,
318            crate::common::RW,
319        >::from_register(self, 0)
320    }
321
322    #[doc = "Month tens. Represented in BCD digit (0-1)."]
323    #[inline(always)]
324    pub fn rtc_cal_m_t(
325        self,
326    ) -> crate::common::RegisterFieldBool<7, 1, 0, RtcCalendarAlarmReg_SPEC, crate::common::RW>
327    {
328        crate::common::RegisterFieldBool::<7,1,0,RtcCalendarAlarmReg_SPEC,crate::common::RW>::from_register(self,0)
329    }
330
331    #[doc = "Month units. Represented in BCD digit (0-9)."]
332    #[inline(always)]
333    pub fn rtc_cal_m_u(
334        self,
335    ) -> crate::common::RegisterField<
336        3,
337        0xf,
338        1,
339        0,
340        u8,
341        u8,
342        RtcCalendarAlarmReg_SPEC,
343        crate::common::RW,
344    > {
345        crate::common::RegisterField::<
346            3,
347            0xf,
348            1,
349            0,
350            u8,
351            u8,
352            RtcCalendarAlarmReg_SPEC,
353            crate::common::RW,
354        >::from_register(self, 0)
355    }
356}
357impl ::core::default::Default for RtcCalendarAlarmReg {
358    #[inline(always)]
359    fn default() -> RtcCalendarAlarmReg {
360        <crate::RegValueT<RtcCalendarAlarmReg_SPEC> as RegisterValue<_>>::new(0)
361    }
362}
363
364#[doc(hidden)]
365#[derive(Copy, Clone, Eq, PartialEq)]
366pub struct RtcCalendarReg_SPEC;
367impl crate::sealed::RegSpec for RtcCalendarReg_SPEC {
368    type DataType = u32;
369}
370
371#[doc = "RTC Calendar Register"]
372pub type RtcCalendarReg = crate::RegValueT<RtcCalendarReg_SPEC>;
373
374impl RtcCalendarReg {
375    #[doc = "The value in this register has altered since last read. Read and clear"]
376    #[inline(always)]
377    pub fn rtc_cal_ch(
378        self,
379    ) -> crate::common::RegisterFieldBool<31, 1, 0, RtcCalendarReg_SPEC, crate::common::RW> {
380        crate::common::RegisterFieldBool::<31,1,0,RtcCalendarReg_SPEC,crate::common::RW>::from_register(self,0)
381    }
382
383    #[doc = "Century tens. Represented in BCD digit (1-2)."]
384    #[inline(always)]
385    pub fn rtc_cal_c_t(
386        self,
387    ) -> crate::common::RegisterField<28, 0x3, 1, 0, u8, u8, RtcCalendarReg_SPEC, crate::common::RW>
388    {
389        crate::common::RegisterField::<28,0x3,1,0,u8,u8,RtcCalendarReg_SPEC,crate::common::RW>::from_register(self,0)
390    }
391
392    #[doc = "Century units. Represented in BCD digit (0-9)."]
393    #[inline(always)]
394    pub fn rtc_cal_c_u(
395        self,
396    ) -> crate::common::RegisterField<24, 0xf, 1, 0, u8, u8, RtcCalendarReg_SPEC, crate::common::RW>
397    {
398        crate::common::RegisterField::<24,0xf,1,0,u8,u8,RtcCalendarReg_SPEC,crate::common::RW>::from_register(self,0)
399    }
400
401    #[doc = "Year tens. Represented in BCD digit (0-9)."]
402    #[inline(always)]
403    pub fn rtc_cal_y_t(
404        self,
405    ) -> crate::common::RegisterField<20, 0xf, 1, 0, u8, u8, RtcCalendarReg_SPEC, crate::common::RW>
406    {
407        crate::common::RegisterField::<20,0xf,1,0,u8,u8,RtcCalendarReg_SPEC,crate::common::RW>::from_register(self,0)
408    }
409
410    #[doc = "Year units. Represented in BCD digit (0-9)."]
411    #[inline(always)]
412    pub fn rtc_cal_y_u(
413        self,
414    ) -> crate::common::RegisterField<16, 0xf, 1, 0, u8, u8, RtcCalendarReg_SPEC, crate::common::RW>
415    {
416        crate::common::RegisterField::<16,0xf,1,0,u8,u8,RtcCalendarReg_SPEC,crate::common::RW>::from_register(self,0)
417    }
418
419    #[doc = "Date tens. Represented in BCD digit (0-3)."]
420    #[inline(always)]
421    pub fn rtc_cal_d_t(
422        self,
423    ) -> crate::common::RegisterField<12, 0x3, 1, 0, u8, u8, RtcCalendarReg_SPEC, crate::common::RW>
424    {
425        crate::common::RegisterField::<12,0x3,1,0,u8,u8,RtcCalendarReg_SPEC,crate::common::RW>::from_register(self,0)
426    }
427
428    #[doc = "Date units. Represented in BCD digit (0-9)."]
429    #[inline(always)]
430    pub fn rtc_cal_d_u(
431        self,
432    ) -> crate::common::RegisterField<8, 0xf, 1, 0, u8, u8, RtcCalendarReg_SPEC, crate::common::RW>
433    {
434        crate::common::RegisterField::<8,0xf,1,0,u8,u8,RtcCalendarReg_SPEC,crate::common::RW>::from_register(self,0)
435    }
436
437    #[doc = "Month tens. Represented in BCD digit (0-1)."]
438    #[inline(always)]
439    pub fn rtc_cal_m_t(
440        self,
441    ) -> crate::common::RegisterFieldBool<7, 1, 0, RtcCalendarReg_SPEC, crate::common::RW> {
442        crate::common::RegisterFieldBool::<7,1,0,RtcCalendarReg_SPEC,crate::common::RW>::from_register(self,0)
443    }
444
445    #[doc = "Month units. Represented in BCD digit (0-9)."]
446    #[inline(always)]
447    pub fn rtc_cal_m_u(
448        self,
449    ) -> crate::common::RegisterField<3, 0xf, 1, 0, u8, u8, RtcCalendarReg_SPEC, crate::common::RW>
450    {
451        crate::common::RegisterField::<3,0xf,1,0,u8,u8,RtcCalendarReg_SPEC,crate::common::RW>::from_register(self,0)
452    }
453
454    #[doc = "Day of the week (arbitrary) units. Represented in BCD digit (0-7)."]
455    #[inline(always)]
456    pub fn rtc_day(
457        self,
458    ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, u8, RtcCalendarReg_SPEC, crate::common::RW>
459    {
460        crate::common::RegisterField::<0,0x7,1,0,u8,u8,RtcCalendarReg_SPEC,crate::common::RW>::from_register(self,0)
461    }
462}
463impl ::core::default::Default for RtcCalendarReg {
464    #[inline(always)]
465    fn default() -> RtcCalendarReg {
466        <crate::RegValueT<RtcCalendarReg_SPEC> as RegisterValue<_>>::new(536871183)
467    }
468}
469
470#[doc(hidden)]
471#[derive(Copy, Clone, Eq, PartialEq)]
472pub struct RtcControlReg_SPEC;
473impl crate::sealed::RegSpec for RtcControlReg_SPEC {
474    type DataType = u32;
475}
476
477#[doc = "RTC Control Register"]
478pub type RtcControlReg = crate::RegValueT<RtcControlReg_SPEC>;
479
480impl RtcControlReg {
481    #[doc = "When this field is set high the RTC stops incrementing the calendar value."]
482    #[inline(always)]
483    pub fn rtc_cal_disable(
484        self,
485    ) -> crate::common::RegisterFieldBool<1, 1, 0, RtcControlReg_SPEC, crate::common::RW> {
486        crate::common::RegisterFieldBool::<1,1,0,RtcControlReg_SPEC,crate::common::RW>::from_register(self,0)
487    }
488
489    #[doc = "When this field is set high the RTC stops incrementing the time value."]
490    #[inline(always)]
491    pub fn rtc_time_disable(
492        self,
493    ) -> crate::common::RegisterFieldBool<0, 1, 0, RtcControlReg_SPEC, crate::common::RW> {
494        crate::common::RegisterFieldBool::<0,1,0,RtcControlReg_SPEC,crate::common::RW>::from_register(self,0)
495    }
496}
497impl ::core::default::Default for RtcControlReg {
498    #[inline(always)]
499    fn default() -> RtcControlReg {
500        <crate::RegValueT<RtcControlReg_SPEC> as RegisterValue<_>>::new(3)
501    }
502}
503
504#[doc(hidden)]
505#[derive(Copy, Clone, Eq, PartialEq)]
506pub struct RtcEventFlagsReg_SPEC;
507impl crate::sealed::RegSpec for RtcEventFlagsReg_SPEC {
508    type DataType = u32;
509}
510
511#[doc = "RTC Event Flags Register"]
512pub type RtcEventFlagsReg = crate::RegValueT<RtcEventFlagsReg_SPEC>;
513
514impl RtcEventFlagsReg {
515    #[doc = "Alarm event flag. Indicate that alarm event occurred since the last reset."]
516    #[inline(always)]
517    pub fn rtc_event_alrm(
518        self,
519    ) -> crate::common::RegisterFieldBool<6, 1, 0, RtcEventFlagsReg_SPEC, crate::common::R> {
520        crate::common::RegisterFieldBool::<6,1,0,RtcEventFlagsReg_SPEC,crate::common::R>::from_register(self,0)
521    }
522
523    #[doc = "Month rolls over event flag. Indicate that month rolls over event occurred since the last reset."]
524    #[inline(always)]
525    pub fn rtc_event_mnth(
526        self,
527    ) -> crate::common::RegisterFieldBool<5, 1, 0, RtcEventFlagsReg_SPEC, crate::common::R> {
528        crate::common::RegisterFieldBool::<5,1,0,RtcEventFlagsReg_SPEC,crate::common::R>::from_register(self,0)
529    }
530
531    #[doc = "Date rolls over event flag. Indicate that date rolls over event occurred since the last reset."]
532    #[inline(always)]
533    pub fn rtc_event_date(
534        self,
535    ) -> crate::common::RegisterFieldBool<4, 1, 0, RtcEventFlagsReg_SPEC, crate::common::R> {
536        crate::common::RegisterFieldBool::<4,1,0,RtcEventFlagsReg_SPEC,crate::common::R>::from_register(self,0)
537    }
538
539    #[doc = "Hour rolls over event flag. Indicate that hour rolls over event occurred since the last reset."]
540    #[inline(always)]
541    pub fn rtc_event_hour(
542        self,
543    ) -> crate::common::RegisterFieldBool<3, 1, 0, RtcEventFlagsReg_SPEC, crate::common::R> {
544        crate::common::RegisterFieldBool::<3,1,0,RtcEventFlagsReg_SPEC,crate::common::R>::from_register(self,0)
545    }
546
547    #[doc = "Minute rolls over event flag. Indicate that minute rolls over event occurred since the last reset."]
548    #[inline(always)]
549    pub fn rtc_event_min(
550        self,
551    ) -> crate::common::RegisterFieldBool<2, 1, 0, RtcEventFlagsReg_SPEC, crate::common::R> {
552        crate::common::RegisterFieldBool::<2,1,0,RtcEventFlagsReg_SPEC,crate::common::R>::from_register(self,0)
553    }
554
555    #[doc = "Second rolls over event flag. Indicate that second rolls over event occurred since the last reset."]
556    #[inline(always)]
557    pub fn rtc_event_sec(
558        self,
559    ) -> crate::common::RegisterFieldBool<1, 1, 0, RtcEventFlagsReg_SPEC, crate::common::R> {
560        crate::common::RegisterFieldBool::<1,1,0,RtcEventFlagsReg_SPEC,crate::common::R>::from_register(self,0)
561    }
562
563    #[doc = "Hundredths of a second event flag. Indicate that hundredths of a second rolls over event occurred since the last reset."]
564    #[inline(always)]
565    pub fn rtc_event_hos(
566        self,
567    ) -> crate::common::RegisterFieldBool<0, 1, 0, RtcEventFlagsReg_SPEC, crate::common::R> {
568        crate::common::RegisterFieldBool::<0,1,0,RtcEventFlagsReg_SPEC,crate::common::R>::from_register(self,0)
569    }
570}
571impl ::core::default::Default for RtcEventFlagsReg {
572    #[inline(always)]
573    fn default() -> RtcEventFlagsReg {
574        <crate::RegValueT<RtcEventFlagsReg_SPEC> as RegisterValue<_>>::new(0)
575    }
576}
577
578#[doc(hidden)]
579#[derive(Copy, Clone, Eq, PartialEq)]
580pub struct RtcHourModeReg_SPEC;
581impl crate::sealed::RegSpec for RtcHourModeReg_SPEC {
582    type DataType = u32;
583}
584
585#[doc = "RTC Hour Mode Register"]
586pub type RtcHourModeReg = crate::RegValueT<RtcHourModeReg_SPEC>;
587
588impl RtcHourModeReg {
589    #[doc = "When this field is set high the RTC operates in 12 hour clock mode; otherwise, times are in 24 hour clock format."]
590    #[inline(always)]
591    pub fn rtc_hms(
592        self,
593    ) -> crate::common::RegisterFieldBool<0, 1, 0, RtcHourModeReg_SPEC, crate::common::RW> {
594        crate::common::RegisterFieldBool::<0,1,0,RtcHourModeReg_SPEC,crate::common::RW>::from_register(self,0)
595    }
596}
597impl ::core::default::Default for RtcHourModeReg {
598    #[inline(always)]
599    fn default() -> RtcHourModeReg {
600        <crate::RegValueT<RtcHourModeReg_SPEC> as RegisterValue<_>>::new(0)
601    }
602}
603
604#[doc(hidden)]
605#[derive(Copy, Clone, Eq, PartialEq)]
606pub struct RtcInterruptDisableReg_SPEC;
607impl crate::sealed::RegSpec for RtcInterruptDisableReg_SPEC {
608    type DataType = u32;
609}
610
611#[doc = "RTC Interrupt Disable Register"]
612pub type RtcInterruptDisableReg = crate::RegValueT<RtcInterruptDisableReg_SPEC>;
613
614impl RtcInterruptDisableReg {
615    #[doc = "Interrupt on alarm disable. Disable to issue the interrupt when alarm event occurred."]
616    #[inline(always)]
617    pub fn rtc_alrm_int_dis(
618        self,
619    ) -> crate::common::RegisterFieldBool<6, 1, 0, RtcInterruptDisableReg_SPEC, crate::common::W>
620    {
621        crate::common::RegisterFieldBool::<6,1,0,RtcInterruptDisableReg_SPEC,crate::common::W>::from_register(self,0)
622    }
623
624    #[doc = "Interrupt on month disable. Disable to issue the interrupt when month event occurred."]
625    #[inline(always)]
626    pub fn rtc_mnth_int_dis(
627        self,
628    ) -> crate::common::RegisterFieldBool<5, 1, 0, RtcInterruptDisableReg_SPEC, crate::common::W>
629    {
630        crate::common::RegisterFieldBool::<5,1,0,RtcInterruptDisableReg_SPEC,crate::common::W>::from_register(self,0)
631    }
632
633    #[doc = "Interrupt on date disable. Disable to issue the interrupt when date event occurred."]
634    #[inline(always)]
635    pub fn rtc_date_int_dis(
636        self,
637    ) -> crate::common::RegisterFieldBool<4, 1, 0, RtcInterruptDisableReg_SPEC, crate::common::W>
638    {
639        crate::common::RegisterFieldBool::<4,1,0,RtcInterruptDisableReg_SPEC,crate::common::W>::from_register(self,0)
640    }
641
642    #[doc = "IInterrupt on hour disable. Disable to issue the interrupt when hour event occurred."]
643    #[inline(always)]
644    pub fn rtc_hour_int_dis(
645        self,
646    ) -> crate::common::RegisterFieldBool<3, 1, 0, RtcInterruptDisableReg_SPEC, crate::common::W>
647    {
648        crate::common::RegisterFieldBool::<3,1,0,RtcInterruptDisableReg_SPEC,crate::common::W>::from_register(self,0)
649    }
650
651    #[doc = "Interrupt on minute disable. Disable to issue the interrupt when minute event occurred."]
652    #[inline(always)]
653    pub fn rtc_min_int_dis(
654        self,
655    ) -> crate::common::RegisterFieldBool<2, 1, 0, RtcInterruptDisableReg_SPEC, crate::common::W>
656    {
657        crate::common::RegisterFieldBool::<2,1,0,RtcInterruptDisableReg_SPEC,crate::common::W>::from_register(self,0)
658    }
659
660    #[doc = "Interrupt on second disable. Disable to issue the interrupt when second event occurred."]
661    #[inline(always)]
662    pub fn rtc_sec_int_dis(
663        self,
664    ) -> crate::common::RegisterFieldBool<1, 1, 0, RtcInterruptDisableReg_SPEC, crate::common::W>
665    {
666        crate::common::RegisterFieldBool::<1,1,0,RtcInterruptDisableReg_SPEC,crate::common::W>::from_register(self,0)
667    }
668
669    #[doc = "Interrupt on hundredths of a second disable. Disable to issue the interrupt when hundredths of a second event occurred."]
670    #[inline(always)]
671    pub fn rtc_hos_int_dis(
672        self,
673    ) -> crate::common::RegisterFieldBool<0, 1, 0, RtcInterruptDisableReg_SPEC, crate::common::W>
674    {
675        crate::common::RegisterFieldBool::<0,1,0,RtcInterruptDisableReg_SPEC,crate::common::W>::from_register(self,0)
676    }
677}
678impl ::core::default::Default for RtcInterruptDisableReg {
679    #[inline(always)]
680    fn default() -> RtcInterruptDisableReg {
681        <crate::RegValueT<RtcInterruptDisableReg_SPEC> as RegisterValue<_>>::new(0)
682    }
683}
684
685#[doc(hidden)]
686#[derive(Copy, Clone, Eq, PartialEq)]
687pub struct RtcInterruptEnableReg_SPEC;
688impl crate::sealed::RegSpec for RtcInterruptEnableReg_SPEC {
689    type DataType = u32;
690}
691
692#[doc = "RTC Interrupt Enable Register"]
693pub type RtcInterruptEnableReg = crate::RegValueT<RtcInterruptEnableReg_SPEC>;
694
695impl RtcInterruptEnableReg {
696    #[doc = "Interrupt on alarm enable. Enable to issue the interrupt when alarm event occurred."]
697    #[inline(always)]
698    pub fn rtc_alrm_int_en(
699        self,
700    ) -> crate::common::RegisterFieldBool<6, 1, 0, RtcInterruptEnableReg_SPEC, crate::common::W>
701    {
702        crate::common::RegisterFieldBool::<6,1,0,RtcInterruptEnableReg_SPEC,crate::common::W>::from_register(self,0)
703    }
704
705    #[doc = "Interrupt on month enable. Enable to issue the interrupt when month event occurred."]
706    #[inline(always)]
707    pub fn rtc_mnth_int_en(
708        self,
709    ) -> crate::common::RegisterFieldBool<5, 1, 0, RtcInterruptEnableReg_SPEC, crate::common::W>
710    {
711        crate::common::RegisterFieldBool::<5,1,0,RtcInterruptEnableReg_SPEC,crate::common::W>::from_register(self,0)
712    }
713
714    #[doc = "Interrupt on date enable. Enable to issue the interrupt when date event occurred."]
715    #[inline(always)]
716    pub fn rtc_date_int_en(
717        self,
718    ) -> crate::common::RegisterFieldBool<4, 1, 0, RtcInterruptEnableReg_SPEC, crate::common::W>
719    {
720        crate::common::RegisterFieldBool::<4,1,0,RtcInterruptEnableReg_SPEC,crate::common::W>::from_register(self,0)
721    }
722
723    #[doc = "Interrupt on hour enable. Enable to issue the interrupt when hour event occurred."]
724    #[inline(always)]
725    pub fn rtc_hour_int_en(
726        self,
727    ) -> crate::common::RegisterFieldBool<3, 1, 0, RtcInterruptEnableReg_SPEC, crate::common::W>
728    {
729        crate::common::RegisterFieldBool::<3,1,0,RtcInterruptEnableReg_SPEC,crate::common::W>::from_register(self,0)
730    }
731
732    #[doc = "Interrupt on minute enable. Enable to issue the interrupt when minute event occurred."]
733    #[inline(always)]
734    pub fn rtc_min_int_en(
735        self,
736    ) -> crate::common::RegisterFieldBool<2, 1, 0, RtcInterruptEnableReg_SPEC, crate::common::W>
737    {
738        crate::common::RegisterFieldBool::<2,1,0,RtcInterruptEnableReg_SPEC,crate::common::W>::from_register(self,0)
739    }
740
741    #[doc = "Interrupt on second enable. Enable to issue the interrupt when second event occurred."]
742    #[inline(always)]
743    pub fn rtc_sec_int_en(
744        self,
745    ) -> crate::common::RegisterFieldBool<1, 1, 0, RtcInterruptEnableReg_SPEC, crate::common::W>
746    {
747        crate::common::RegisterFieldBool::<1,1,0,RtcInterruptEnableReg_SPEC,crate::common::W>::from_register(self,0)
748    }
749
750    #[doc = "Interrupt on hundredths of a second enable. Enable to issue the interrupt when hundredths of a second event occurred."]
751    #[inline(always)]
752    pub fn rtc_hos_int_en(
753        self,
754    ) -> crate::common::RegisterFieldBool<0, 1, 0, RtcInterruptEnableReg_SPEC, crate::common::W>
755    {
756        crate::common::RegisterFieldBool::<0,1,0,RtcInterruptEnableReg_SPEC,crate::common::W>::from_register(self,0)
757    }
758}
759impl ::core::default::Default for RtcInterruptEnableReg {
760    #[inline(always)]
761    fn default() -> RtcInterruptEnableReg {
762        <crate::RegValueT<RtcInterruptEnableReg_SPEC> as RegisterValue<_>>::new(0)
763    }
764}
765
766#[doc(hidden)]
767#[derive(Copy, Clone, Eq, PartialEq)]
768pub struct RtcInterruptMaskReg_SPEC;
769impl crate::sealed::RegSpec for RtcInterruptMaskReg_SPEC {
770    type DataType = u32;
771}
772
773#[doc = "RTC Interrupt Mask Register"]
774pub type RtcInterruptMaskReg = crate::RegValueT<RtcInterruptMaskReg_SPEC>;
775
776impl RtcInterruptMaskReg {
777    #[doc = "Mask alarm interrupt. It can be cleared (set) by setting corresponding bit (ALRM) in Interrupt Enable Register (Interrupt Disable Register)."]
778    #[inline(always)]
779    pub fn rtc_alrm_int_msk(
780        self,
781    ) -> crate::common::RegisterFieldBool<6, 1, 0, RtcInterruptMaskReg_SPEC, crate::common::R> {
782        crate::common::RegisterFieldBool::<6,1,0,RtcInterruptMaskReg_SPEC,crate::common::R>::from_register(self,0)
783    }
784
785    #[doc = "Mask month interrupt. It can be cleared (set) by setting corresponding bit (MNTH) in Interrupt Enable Register (Interrupt Disable Register)."]
786    #[inline(always)]
787    pub fn rtc_mnth_int_msk(
788        self,
789    ) -> crate::common::RegisterFieldBool<5, 1, 0, RtcInterruptMaskReg_SPEC, crate::common::R> {
790        crate::common::RegisterFieldBool::<5,1,0,RtcInterruptMaskReg_SPEC,crate::common::R>::from_register(self,0)
791    }
792
793    #[doc = "Mask date interrupt. It can be cleared (set) by setting corresponding bit (DATE) in Interrupt Enable Register (Interrupt Disable Register)."]
794    #[inline(always)]
795    pub fn rtc_date_int_msk(
796        self,
797    ) -> crate::common::RegisterFieldBool<4, 1, 0, RtcInterruptMaskReg_SPEC, crate::common::R> {
798        crate::common::RegisterFieldBool::<4,1,0,RtcInterruptMaskReg_SPEC,crate::common::R>::from_register(self,0)
799    }
800
801    #[doc = "Mask hour interrupt. It can be cleared (set) by setting corresponding bit (HOUR) in Interrupt Enable Register (Interrupt Disable Register)."]
802    #[inline(always)]
803    pub fn rtc_hour_int_msk(
804        self,
805    ) -> crate::common::RegisterFieldBool<3, 1, 0, RtcInterruptMaskReg_SPEC, crate::common::R> {
806        crate::common::RegisterFieldBool::<3,1,0,RtcInterruptMaskReg_SPEC,crate::common::R>::from_register(self,0)
807    }
808
809    #[doc = "Mask minute interrupt. It can be cleared (set) by setting corresponding bit (MIN) in Interrupt Enable Register (Interrupt Disable Register)."]
810    #[inline(always)]
811    pub fn rtc_min_int_msk(
812        self,
813    ) -> crate::common::RegisterFieldBool<2, 1, 0, RtcInterruptMaskReg_SPEC, crate::common::R> {
814        crate::common::RegisterFieldBool::<2,1,0,RtcInterruptMaskReg_SPEC,crate::common::R>::from_register(self,0)
815    }
816
817    #[doc = "Mask second interrupt. It can be cleared (set) by setting corresponding bit (SEC) in Interrupt Enable Register (Interrupt Disable Register)."]
818    #[inline(always)]
819    pub fn rtc_sec_int_msk(
820        self,
821    ) -> crate::common::RegisterFieldBool<1, 1, 0, RtcInterruptMaskReg_SPEC, crate::common::R> {
822        crate::common::RegisterFieldBool::<1,1,0,RtcInterruptMaskReg_SPEC,crate::common::R>::from_register(self,0)
823    }
824
825    #[doc = "Mask hundredths of a second interrupt. It can be cleared (set) by setting corresponding bit (HOS) in Interrupt Enable Register (Interrupt Disable Register)."]
826    #[inline(always)]
827    pub fn rtc_hos_int_msk(
828        self,
829    ) -> crate::common::RegisterFieldBool<0, 1, 0, RtcInterruptMaskReg_SPEC, crate::common::R> {
830        crate::common::RegisterFieldBool::<0,1,0,RtcInterruptMaskReg_SPEC,crate::common::R>::from_register(self,0)
831    }
832}
833impl ::core::default::Default for RtcInterruptMaskReg {
834    #[inline(always)]
835    fn default() -> RtcInterruptMaskReg {
836        <crate::RegValueT<RtcInterruptMaskReg_SPEC> as RegisterValue<_>>::new(127)
837    }
838}
839
840#[doc(hidden)]
841#[derive(Copy, Clone, Eq, PartialEq)]
842pub struct RtcKeepRtcReg_SPEC;
843impl crate::sealed::RegSpec for RtcKeepRtcReg_SPEC {
844    type DataType = u32;
845}
846
847#[doc = "RTC Keep RTC Register"]
848pub type RtcKeepRtcReg = crate::RegValueT<RtcKeepRtcReg_SPEC>;
849
850impl RtcKeepRtcReg {
851    #[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."]
852    #[inline(always)]
853    pub fn rtc_keep(
854        self,
855    ) -> crate::common::RegisterFieldBool<0, 1, 0, RtcKeepRtcReg_SPEC, crate::common::RW> {
856        crate::common::RegisterFieldBool::<0,1,0,RtcKeepRtcReg_SPEC,crate::common::RW>::from_register(self,0)
857    }
858}
859impl ::core::default::Default for RtcKeepRtcReg {
860    #[inline(always)]
861    fn default() -> RtcKeepRtcReg {
862        <crate::RegValueT<RtcKeepRtcReg_SPEC> as RegisterValue<_>>::new(1)
863    }
864}
865
866#[doc(hidden)]
867#[derive(Copy, Clone, Eq, PartialEq)]
868pub struct RtcStatusReg_SPEC;
869impl crate::sealed::RegSpec for RtcStatusReg_SPEC {
870    type DataType = u32;
871}
872
873#[doc = "RTC Status Register"]
874pub type RtcStatusReg = crate::RegValueT<RtcStatusReg_SPEC>;
875
876impl RtcStatusReg {
877    #[doc = "Valid Calendar Alarm. If cleared then indicates that invalid entry occurred when writing to Calendar Alarm Register."]
878    #[inline(always)]
879    pub fn rtc_valid_cal_alm(
880        self,
881    ) -> crate::common::RegisterFieldBool<3, 1, 0, RtcStatusReg_SPEC, crate::common::R> {
882        crate::common::RegisterFieldBool::<3,1,0,RtcStatusReg_SPEC,crate::common::R>::from_register(self,0)
883    }
884
885    #[doc = "Valid Time Alarm. If cleared then indicates that invalid entry occurred when writing to Time Alarm Register."]
886    #[inline(always)]
887    pub fn rtc_valid_time_alm(
888        self,
889    ) -> crate::common::RegisterFieldBool<2, 1, 0, RtcStatusReg_SPEC, crate::common::R> {
890        crate::common::RegisterFieldBool::<2,1,0,RtcStatusReg_SPEC,crate::common::R>::from_register(self,0)
891    }
892
893    #[doc = "Valid Calendar. If cleared then indicates that invalid entry occurred when writing to Calendar Register."]
894    #[inline(always)]
895    pub fn rtc_valid_cal(
896        self,
897    ) -> crate::common::RegisterFieldBool<1, 1, 0, RtcStatusReg_SPEC, crate::common::R> {
898        crate::common::RegisterFieldBool::<1,1,0,RtcStatusReg_SPEC,crate::common::R>::from_register(self,0)
899    }
900
901    #[doc = "Valid Time. If cleared then indicates that invalid entry occurred when writing to Time Register."]
902    #[inline(always)]
903    pub fn rtc_valid_time(
904        self,
905    ) -> crate::common::RegisterFieldBool<0, 1, 0, RtcStatusReg_SPEC, crate::common::R> {
906        crate::common::RegisterFieldBool::<0,1,0,RtcStatusReg_SPEC,crate::common::R>::from_register(self,0)
907    }
908}
909impl ::core::default::Default for RtcStatusReg {
910    #[inline(always)]
911    fn default() -> RtcStatusReg {
912        <crate::RegValueT<RtcStatusReg_SPEC> as RegisterValue<_>>::new(15)
913    }
914}
915
916#[doc(hidden)]
917#[derive(Copy, Clone, Eq, PartialEq)]
918pub struct RtcTimeAlarmReg_SPEC;
919impl crate::sealed::RegSpec for RtcTimeAlarmReg_SPEC {
920    type DataType = u32;
921}
922
923#[doc = "RTC Time Alarm Register"]
924pub type RtcTimeAlarmReg = crate::RegValueT<RtcTimeAlarmReg_SPEC>;
925
926impl RtcTimeAlarmReg {
927    #[doc = "In 12 hour clock mode, indicates PM when set."]
928    #[inline(always)]
929    pub fn rtc_time_pm(
930        self,
931    ) -> crate::common::RegisterFieldBool<30, 1, 0, RtcTimeAlarmReg_SPEC, crate::common::RW> {
932        crate::common::RegisterFieldBool::<30,1,0,RtcTimeAlarmReg_SPEC,crate::common::RW>::from_register(self,0)
933    }
934
935    #[doc = "Hours tens. Represented in BCD digit (0-2)."]
936    #[inline(always)]
937    pub fn rtc_time_hr_t(
938        self,
939    ) -> crate::common::RegisterField<28, 0x3, 1, 0, u8, u8, RtcTimeAlarmReg_SPEC, crate::common::RW>
940    {
941        crate::common::RegisterField::<28,0x3,1,0,u8,u8,RtcTimeAlarmReg_SPEC,crate::common::RW>::from_register(self,0)
942    }
943
944    #[doc = "Hours units. Represented in BCD digit (0-9)."]
945    #[inline(always)]
946    pub fn rtc_time_hr_u(
947        self,
948    ) -> crate::common::RegisterField<24, 0xf, 1, 0, u8, u8, RtcTimeAlarmReg_SPEC, crate::common::RW>
949    {
950        crate::common::RegisterField::<24,0xf,1,0,u8,u8,RtcTimeAlarmReg_SPEC,crate::common::RW>::from_register(self,0)
951    }
952
953    #[doc = "Minutes tens. Represented in BCD digit (0-5)."]
954    #[inline(always)]
955    pub fn rtc_time_m_t(
956        self,
957    ) -> crate::common::RegisterField<20, 0x7, 1, 0, u8, u8, RtcTimeAlarmReg_SPEC, crate::common::RW>
958    {
959        crate::common::RegisterField::<20,0x7,1,0,u8,u8,RtcTimeAlarmReg_SPEC,crate::common::RW>::from_register(self,0)
960    }
961
962    #[doc = "Minutes units. Represented in BCD digit (0-9)."]
963    #[inline(always)]
964    pub fn rtc_time_m_u(
965        self,
966    ) -> crate::common::RegisterField<16, 0xf, 1, 0, u8, u8, RtcTimeAlarmReg_SPEC, crate::common::RW>
967    {
968        crate::common::RegisterField::<16,0xf,1,0,u8,u8,RtcTimeAlarmReg_SPEC,crate::common::RW>::from_register(self,0)
969    }
970
971    #[doc = "Seconds tens. Represented in BCD digit (0-9)."]
972    #[inline(always)]
973    pub fn rtc_time_s_t(
974        self,
975    ) -> crate::common::RegisterField<12, 0x7, 1, 0, u8, u8, RtcTimeAlarmReg_SPEC, crate::common::RW>
976    {
977        crate::common::RegisterField::<12,0x7,1,0,u8,u8,RtcTimeAlarmReg_SPEC,crate::common::RW>::from_register(self,0)
978    }
979
980    #[doc = "Seconds units. Represented in BCD digit (0-9)."]
981    #[inline(always)]
982    pub fn rtc_time_s_u(
983        self,
984    ) -> crate::common::RegisterField<8, 0xf, 1, 0, u8, u8, RtcTimeAlarmReg_SPEC, crate::common::RW>
985    {
986        crate::common::RegisterField::<8,0xf,1,0,u8,u8,RtcTimeAlarmReg_SPEC,crate::common::RW>::from_register(self,0)
987    }
988
989    #[doc = "Hundredths of a second tens. Represented in BCD digit (0-9)."]
990    #[inline(always)]
991    pub fn rtc_time_h_t(
992        self,
993    ) -> crate::common::RegisterField<4, 0xf, 1, 0, u8, u8, RtcTimeAlarmReg_SPEC, crate::common::RW>
994    {
995        crate::common::RegisterField::<4,0xf,1,0,u8,u8,RtcTimeAlarmReg_SPEC,crate::common::RW>::from_register(self,0)
996    }
997
998    #[doc = "Hundredths of a second units. Represented in BCD digit (0-9)."]
999    #[inline(always)]
1000    pub fn rtc_time_h_u(
1001        self,
1002    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, RtcTimeAlarmReg_SPEC, crate::common::RW>
1003    {
1004        crate::common::RegisterField::<0,0xf,1,0,u8,u8,RtcTimeAlarmReg_SPEC,crate::common::RW>::from_register(self,0)
1005    }
1006}
1007impl ::core::default::Default for RtcTimeAlarmReg {
1008    #[inline(always)]
1009    fn default() -> RtcTimeAlarmReg {
1010        <crate::RegValueT<RtcTimeAlarmReg_SPEC> as RegisterValue<_>>::new(0)
1011    }
1012}
1013
1014#[doc(hidden)]
1015#[derive(Copy, Clone, Eq, PartialEq)]
1016pub struct RtcTimeReg_SPEC;
1017impl crate::sealed::RegSpec for RtcTimeReg_SPEC {
1018    type DataType = u32;
1019}
1020
1021#[doc = "RTC Time Register"]
1022pub type RtcTimeReg = crate::RegValueT<RtcTimeReg_SPEC>;
1023
1024impl RtcTimeReg {
1025    #[doc = "The value in this register has altered since last read. Read and clear."]
1026    #[inline(always)]
1027    pub fn rtc_time_ch(
1028        self,
1029    ) -> crate::common::RegisterFieldBool<31, 1, 0, RtcTimeReg_SPEC, crate::common::RW> {
1030        crate::common::RegisterFieldBool::<31,1,0,RtcTimeReg_SPEC,crate::common::RW>::from_register(self,0)
1031    }
1032
1033    #[doc = "In 12 hour clock mode, indicates PM when set."]
1034    #[inline(always)]
1035    pub fn rtc_time_pm(
1036        self,
1037    ) -> crate::common::RegisterFieldBool<30, 1, 0, RtcTimeReg_SPEC, crate::common::RW> {
1038        crate::common::RegisterFieldBool::<30,1,0,RtcTimeReg_SPEC,crate::common::RW>::from_register(self,0)
1039    }
1040
1041    #[doc = "Hours tens. Represented in BCD digit (0-2)."]
1042    #[inline(always)]
1043    pub fn rtc_time_hr_t(
1044        self,
1045    ) -> crate::common::RegisterField<28, 0x3, 1, 0, u8, u8, RtcTimeReg_SPEC, crate::common::RW>
1046    {
1047        crate::common::RegisterField::<28,0x3,1,0,u8,u8,RtcTimeReg_SPEC,crate::common::RW>::from_register(self,0)
1048    }
1049
1050    #[doc = "Hours units. Represented in BCD digit (0-9)."]
1051    #[inline(always)]
1052    pub fn rtc_time_hr_u(
1053        self,
1054    ) -> crate::common::RegisterField<24, 0xf, 1, 0, u8, u8, RtcTimeReg_SPEC, crate::common::RW>
1055    {
1056        crate::common::RegisterField::<24,0xf,1,0,u8,u8,RtcTimeReg_SPEC,crate::common::RW>::from_register(self,0)
1057    }
1058
1059    #[doc = "Minutes tens. Represented in BCD digit (0-5)."]
1060    #[inline(always)]
1061    pub fn rtc_time_m_t(
1062        self,
1063    ) -> crate::common::RegisterField<20, 0x7, 1, 0, u8, u8, RtcTimeReg_SPEC, crate::common::RW>
1064    {
1065        crate::common::RegisterField::<20,0x7,1,0,u8,u8,RtcTimeReg_SPEC,crate::common::RW>::from_register(self,0)
1066    }
1067
1068    #[doc = "Minutes units. Represented in BCD digit (0-9)."]
1069    #[inline(always)]
1070    pub fn rtc_time_m_u(
1071        self,
1072    ) -> crate::common::RegisterField<16, 0xf, 1, 0, u8, u8, RtcTimeReg_SPEC, crate::common::RW>
1073    {
1074        crate::common::RegisterField::<16,0xf,1,0,u8,u8,RtcTimeReg_SPEC,crate::common::RW>::from_register(self,0)
1075    }
1076
1077    #[doc = "Seconds tens. Represented in BCD digit (0-9)."]
1078    #[inline(always)]
1079    pub fn rtc_time_s_t(
1080        self,
1081    ) -> crate::common::RegisterField<12, 0x7, 1, 0, u8, u8, RtcTimeReg_SPEC, crate::common::RW>
1082    {
1083        crate::common::RegisterField::<12,0x7,1,0,u8,u8,RtcTimeReg_SPEC,crate::common::RW>::from_register(self,0)
1084    }
1085
1086    #[doc = "Seconds units. Represented in BCD digit (0-9)."]
1087    #[inline(always)]
1088    pub fn rtc_time_s_u(
1089        self,
1090    ) -> crate::common::RegisterField<8, 0xf, 1, 0, u8, u8, RtcTimeReg_SPEC, crate::common::RW>
1091    {
1092        crate::common::RegisterField::<8,0xf,1,0,u8,u8,RtcTimeReg_SPEC,crate::common::RW>::from_register(self,0)
1093    }
1094
1095    #[doc = "Hundredths of a second tens. Represented in BCD digit (0-9)."]
1096    #[inline(always)]
1097    pub fn rtc_time_h_t(
1098        self,
1099    ) -> crate::common::RegisterField<4, 0xf, 1, 0, u8, u8, RtcTimeReg_SPEC, crate::common::RW>
1100    {
1101        crate::common::RegisterField::<4,0xf,1,0,u8,u8,RtcTimeReg_SPEC,crate::common::RW>::from_register(self,0)
1102    }
1103
1104    #[doc = "Hundredths of a second units. Represented in BCD digit (0-9)."]
1105    #[inline(always)]
1106    pub fn rtc_time_h_u(
1107        self,
1108    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, RtcTimeReg_SPEC, crate::common::RW>
1109    {
1110        crate::common::RegisterField::<0,0xf,1,0,u8,u8,RtcTimeReg_SPEC,crate::common::RW>::from_register(self,0)
1111    }
1112}
1113impl ::core::default::Default for RtcTimeReg {
1114    #[inline(always)]
1115    fn default() -> RtcTimeReg {
1116        <crate::RegValueT<RtcTimeReg_SPEC> as RegisterValue<_>>::new(0)
1117    }
1118}