1#[doc = "Register `MR` reader"]
2pub struct R(crate::R<MR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<MR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<MR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<MR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `MR` writer"]
17pub struct W(crate::W<MR_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<MR_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<MR_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<MR_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `HRMOD` reader - 12-/24-hour Mode"]
38pub type HRMOD_R = crate::BitReader<bool>;
39#[doc = "Field `HRMOD` writer - 12-/24-hour Mode"]
40pub type HRMOD_W<'a, const O: u8> = crate::BitWriter<'a, u32, MR_SPEC, bool, O>;
41#[doc = "Field `PERSIAN` reader - PERSIAN Calendar"]
42pub type PERSIAN_R = crate::BitReader<bool>;
43#[doc = "Field `PERSIAN` writer - PERSIAN Calendar"]
44pub type PERSIAN_W<'a, const O: u8> = crate::BitWriter<'a, u32, MR_SPEC, bool, O>;
45#[doc = "Field `NEGPPM` reader - NEGative PPM Correction"]
46pub type NEGPPM_R = crate::BitReader<bool>;
47#[doc = "Field `NEGPPM` writer - NEGative PPM Correction"]
48pub type NEGPPM_W<'a, const O: u8> = crate::BitWriter<'a, u32, MR_SPEC, bool, O>;
49#[doc = "Field `CORRECTION` reader - Slow Clock Correction"]
50pub type CORRECTION_R = crate::FieldReader<u8, u8>;
51#[doc = "Field `CORRECTION` writer - Slow Clock Correction"]
52pub type CORRECTION_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MR_SPEC, u8, u8, 7, O>;
53#[doc = "Field `HIGHPPM` reader - HIGH PPM Correction"]
54pub type HIGHPPM_R = crate::BitReader<bool>;
55#[doc = "Field `HIGHPPM` writer - HIGH PPM Correction"]
56pub type HIGHPPM_W<'a, const O: u8> = crate::BitWriter<'a, u32, MR_SPEC, bool, O>;
57#[doc = "Field `OUT0` reader - RTCOUT0 OutputSource Selection"]
58pub type OUT0_R = crate::FieldReader<u8, OUT0_A>;
59#[doc = "RTCOUT0 OutputSource Selection\n\nValue on reset: 0"]
60#[derive(Clone, Copy, Debug, PartialEq, Eq)]
61#[repr(u8)]
62pub enum OUT0_A {
63 #[doc = "0: no waveform, stuck at '0'"]
64 NO_WAVE = 0,
65 #[doc = "1: 1 Hz square wave"]
66 FREQ1HZ = 1,
67 #[doc = "2: 32 Hz square wave"]
68 FREQ32HZ = 2,
69 #[doc = "3: 64 Hz square wave"]
70 FREQ64HZ = 3,
71 #[doc = "4: 512 Hz square wave"]
72 FREQ512HZ = 4,
73 #[doc = "5: output toggles when alarm flag rises"]
74 ALARM_TOGGLE = 5,
75 #[doc = "6: output is a copy of the alarm flag"]
76 ALARM_FLAG = 6,
77 #[doc = "7: duty cycle programmable pulse"]
78 PROG_PULSE = 7,
79}
80impl From<OUT0_A> for u8 {
81 #[inline(always)]
82 fn from(variant: OUT0_A) -> Self {
83 variant as _
84 }
85}
86impl OUT0_R {
87 #[doc = "Get enumerated values variant"]
88 #[inline(always)]
89 pub fn variant(&self) -> OUT0_A {
90 match self.bits {
91 0 => OUT0_A::NO_WAVE,
92 1 => OUT0_A::FREQ1HZ,
93 2 => OUT0_A::FREQ32HZ,
94 3 => OUT0_A::FREQ64HZ,
95 4 => OUT0_A::FREQ512HZ,
96 5 => OUT0_A::ALARM_TOGGLE,
97 6 => OUT0_A::ALARM_FLAG,
98 7 => OUT0_A::PROG_PULSE,
99 _ => unreachable!(),
100 }
101 }
102 #[doc = "Checks if the value of the field is `NO_WAVE`"]
103 #[inline(always)]
104 pub fn is_no_wave(&self) -> bool {
105 *self == OUT0_A::NO_WAVE
106 }
107 #[doc = "Checks if the value of the field is `FREQ1HZ`"]
108 #[inline(always)]
109 pub fn is_freq1hz(&self) -> bool {
110 *self == OUT0_A::FREQ1HZ
111 }
112 #[doc = "Checks if the value of the field is `FREQ32HZ`"]
113 #[inline(always)]
114 pub fn is_freq32hz(&self) -> bool {
115 *self == OUT0_A::FREQ32HZ
116 }
117 #[doc = "Checks if the value of the field is `FREQ64HZ`"]
118 #[inline(always)]
119 pub fn is_freq64hz(&self) -> bool {
120 *self == OUT0_A::FREQ64HZ
121 }
122 #[doc = "Checks if the value of the field is `FREQ512HZ`"]
123 #[inline(always)]
124 pub fn is_freq512hz(&self) -> bool {
125 *self == OUT0_A::FREQ512HZ
126 }
127 #[doc = "Checks if the value of the field is `ALARM_TOGGLE`"]
128 #[inline(always)]
129 pub fn is_alarm_toggle(&self) -> bool {
130 *self == OUT0_A::ALARM_TOGGLE
131 }
132 #[doc = "Checks if the value of the field is `ALARM_FLAG`"]
133 #[inline(always)]
134 pub fn is_alarm_flag(&self) -> bool {
135 *self == OUT0_A::ALARM_FLAG
136 }
137 #[doc = "Checks if the value of the field is `PROG_PULSE`"]
138 #[inline(always)]
139 pub fn is_prog_pulse(&self) -> bool {
140 *self == OUT0_A::PROG_PULSE
141 }
142}
143#[doc = "Field `OUT0` writer - RTCOUT0 OutputSource Selection"]
144pub type OUT0_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, MR_SPEC, u8, OUT0_A, 3, O>;
145impl<'a, const O: u8> OUT0_W<'a, O> {
146 #[doc = "no waveform, stuck at '0'"]
147 #[inline(always)]
148 pub fn no_wave(self) -> &'a mut W {
149 self.variant(OUT0_A::NO_WAVE)
150 }
151 #[doc = "1 Hz square wave"]
152 #[inline(always)]
153 pub fn freq1hz(self) -> &'a mut W {
154 self.variant(OUT0_A::FREQ1HZ)
155 }
156 #[doc = "32 Hz square wave"]
157 #[inline(always)]
158 pub fn freq32hz(self) -> &'a mut W {
159 self.variant(OUT0_A::FREQ32HZ)
160 }
161 #[doc = "64 Hz square wave"]
162 #[inline(always)]
163 pub fn freq64hz(self) -> &'a mut W {
164 self.variant(OUT0_A::FREQ64HZ)
165 }
166 #[doc = "512 Hz square wave"]
167 #[inline(always)]
168 pub fn freq512hz(self) -> &'a mut W {
169 self.variant(OUT0_A::FREQ512HZ)
170 }
171 #[doc = "output toggles when alarm flag rises"]
172 #[inline(always)]
173 pub fn alarm_toggle(self) -> &'a mut W {
174 self.variant(OUT0_A::ALARM_TOGGLE)
175 }
176 #[doc = "output is a copy of the alarm flag"]
177 #[inline(always)]
178 pub fn alarm_flag(self) -> &'a mut W {
179 self.variant(OUT0_A::ALARM_FLAG)
180 }
181 #[doc = "duty cycle programmable pulse"]
182 #[inline(always)]
183 pub fn prog_pulse(self) -> &'a mut W {
184 self.variant(OUT0_A::PROG_PULSE)
185 }
186}
187#[doc = "Field `OUT1` reader - RTCOUT1 Output Source Selection"]
188pub type OUT1_R = crate::FieldReader<u8, OUT1_A>;
189#[doc = "RTCOUT1 Output Source Selection\n\nValue on reset: 0"]
190#[derive(Clone, Copy, Debug, PartialEq, Eq)]
191#[repr(u8)]
192pub enum OUT1_A {
193 #[doc = "0: no waveform, stuck at '0'"]
194 NO_WAVE = 0,
195 #[doc = "1: 1 Hz square wave"]
196 FREQ1HZ = 1,
197 #[doc = "2: 32 Hz square wave"]
198 FREQ32HZ = 2,
199 #[doc = "3: 64 Hz square wave"]
200 FREQ64HZ = 3,
201 #[doc = "4: 512 Hz square wave"]
202 FREQ512HZ = 4,
203 #[doc = "5: output toggles when alarm flag rises"]
204 ALARM_TOGGLE = 5,
205 #[doc = "6: output is a copy of the alarm flag"]
206 ALARM_FLAG = 6,
207 #[doc = "7: duty cycle programmable pulse"]
208 PROG_PULSE = 7,
209}
210impl From<OUT1_A> for u8 {
211 #[inline(always)]
212 fn from(variant: OUT1_A) -> Self {
213 variant as _
214 }
215}
216impl OUT1_R {
217 #[doc = "Get enumerated values variant"]
218 #[inline(always)]
219 pub fn variant(&self) -> OUT1_A {
220 match self.bits {
221 0 => OUT1_A::NO_WAVE,
222 1 => OUT1_A::FREQ1HZ,
223 2 => OUT1_A::FREQ32HZ,
224 3 => OUT1_A::FREQ64HZ,
225 4 => OUT1_A::FREQ512HZ,
226 5 => OUT1_A::ALARM_TOGGLE,
227 6 => OUT1_A::ALARM_FLAG,
228 7 => OUT1_A::PROG_PULSE,
229 _ => unreachable!(),
230 }
231 }
232 #[doc = "Checks if the value of the field is `NO_WAVE`"]
233 #[inline(always)]
234 pub fn is_no_wave(&self) -> bool {
235 *self == OUT1_A::NO_WAVE
236 }
237 #[doc = "Checks if the value of the field is `FREQ1HZ`"]
238 #[inline(always)]
239 pub fn is_freq1hz(&self) -> bool {
240 *self == OUT1_A::FREQ1HZ
241 }
242 #[doc = "Checks if the value of the field is `FREQ32HZ`"]
243 #[inline(always)]
244 pub fn is_freq32hz(&self) -> bool {
245 *self == OUT1_A::FREQ32HZ
246 }
247 #[doc = "Checks if the value of the field is `FREQ64HZ`"]
248 #[inline(always)]
249 pub fn is_freq64hz(&self) -> bool {
250 *self == OUT1_A::FREQ64HZ
251 }
252 #[doc = "Checks if the value of the field is `FREQ512HZ`"]
253 #[inline(always)]
254 pub fn is_freq512hz(&self) -> bool {
255 *self == OUT1_A::FREQ512HZ
256 }
257 #[doc = "Checks if the value of the field is `ALARM_TOGGLE`"]
258 #[inline(always)]
259 pub fn is_alarm_toggle(&self) -> bool {
260 *self == OUT1_A::ALARM_TOGGLE
261 }
262 #[doc = "Checks if the value of the field is `ALARM_FLAG`"]
263 #[inline(always)]
264 pub fn is_alarm_flag(&self) -> bool {
265 *self == OUT1_A::ALARM_FLAG
266 }
267 #[doc = "Checks if the value of the field is `PROG_PULSE`"]
268 #[inline(always)]
269 pub fn is_prog_pulse(&self) -> bool {
270 *self == OUT1_A::PROG_PULSE
271 }
272}
273#[doc = "Field `OUT1` writer - RTCOUT1 Output Source Selection"]
274pub type OUT1_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, MR_SPEC, u8, OUT1_A, 3, O>;
275impl<'a, const O: u8> OUT1_W<'a, O> {
276 #[doc = "no waveform, stuck at '0'"]
277 #[inline(always)]
278 pub fn no_wave(self) -> &'a mut W {
279 self.variant(OUT1_A::NO_WAVE)
280 }
281 #[doc = "1 Hz square wave"]
282 #[inline(always)]
283 pub fn freq1hz(self) -> &'a mut W {
284 self.variant(OUT1_A::FREQ1HZ)
285 }
286 #[doc = "32 Hz square wave"]
287 #[inline(always)]
288 pub fn freq32hz(self) -> &'a mut W {
289 self.variant(OUT1_A::FREQ32HZ)
290 }
291 #[doc = "64 Hz square wave"]
292 #[inline(always)]
293 pub fn freq64hz(self) -> &'a mut W {
294 self.variant(OUT1_A::FREQ64HZ)
295 }
296 #[doc = "512 Hz square wave"]
297 #[inline(always)]
298 pub fn freq512hz(self) -> &'a mut W {
299 self.variant(OUT1_A::FREQ512HZ)
300 }
301 #[doc = "output toggles when alarm flag rises"]
302 #[inline(always)]
303 pub fn alarm_toggle(self) -> &'a mut W {
304 self.variant(OUT1_A::ALARM_TOGGLE)
305 }
306 #[doc = "output is a copy of the alarm flag"]
307 #[inline(always)]
308 pub fn alarm_flag(self) -> &'a mut W {
309 self.variant(OUT1_A::ALARM_FLAG)
310 }
311 #[doc = "duty cycle programmable pulse"]
312 #[inline(always)]
313 pub fn prog_pulse(self) -> &'a mut W {
314 self.variant(OUT1_A::PROG_PULSE)
315 }
316}
317#[doc = "Field `THIGH` reader - High Duration of the Output Pulse"]
318pub type THIGH_R = crate::FieldReader<u8, THIGH_A>;
319#[doc = "High Duration of the Output Pulse\n\nValue on reset: 0"]
320#[derive(Clone, Copy, Debug, PartialEq, Eq)]
321#[repr(u8)]
322pub enum THIGH_A {
323 #[doc = "0: 31.2 ms"]
324 H_31MS = 0,
325 #[doc = "1: 15.6 ms"]
326 H_16MS = 1,
327 #[doc = "2: 3.91 ms"]
328 H_4MS = 2,
329 #[doc = "3: 976 us"]
330 H_976US = 3,
331 #[doc = "4: 488 us"]
332 H_488US = 4,
333 #[doc = "5: 122 us"]
334 H_122US = 5,
335 #[doc = "6: 30.5 us"]
336 H_30US = 6,
337 #[doc = "7: 15.2 us"]
338 H_15US = 7,
339}
340impl From<THIGH_A> for u8 {
341 #[inline(always)]
342 fn from(variant: THIGH_A) -> Self {
343 variant as _
344 }
345}
346impl THIGH_R {
347 #[doc = "Get enumerated values variant"]
348 #[inline(always)]
349 pub fn variant(&self) -> THIGH_A {
350 match self.bits {
351 0 => THIGH_A::H_31MS,
352 1 => THIGH_A::H_16MS,
353 2 => THIGH_A::H_4MS,
354 3 => THIGH_A::H_976US,
355 4 => THIGH_A::H_488US,
356 5 => THIGH_A::H_122US,
357 6 => THIGH_A::H_30US,
358 7 => THIGH_A::H_15US,
359 _ => unreachable!(),
360 }
361 }
362 #[doc = "Checks if the value of the field is `H_31MS`"]
363 #[inline(always)]
364 pub fn is_h_31ms(&self) -> bool {
365 *self == THIGH_A::H_31MS
366 }
367 #[doc = "Checks if the value of the field is `H_16MS`"]
368 #[inline(always)]
369 pub fn is_h_16ms(&self) -> bool {
370 *self == THIGH_A::H_16MS
371 }
372 #[doc = "Checks if the value of the field is `H_4MS`"]
373 #[inline(always)]
374 pub fn is_h_4ms(&self) -> bool {
375 *self == THIGH_A::H_4MS
376 }
377 #[doc = "Checks if the value of the field is `H_976US`"]
378 #[inline(always)]
379 pub fn is_h_976us(&self) -> bool {
380 *self == THIGH_A::H_976US
381 }
382 #[doc = "Checks if the value of the field is `H_488US`"]
383 #[inline(always)]
384 pub fn is_h_488us(&self) -> bool {
385 *self == THIGH_A::H_488US
386 }
387 #[doc = "Checks if the value of the field is `H_122US`"]
388 #[inline(always)]
389 pub fn is_h_122us(&self) -> bool {
390 *self == THIGH_A::H_122US
391 }
392 #[doc = "Checks if the value of the field is `H_30US`"]
393 #[inline(always)]
394 pub fn is_h_30us(&self) -> bool {
395 *self == THIGH_A::H_30US
396 }
397 #[doc = "Checks if the value of the field is `H_15US`"]
398 #[inline(always)]
399 pub fn is_h_15us(&self) -> bool {
400 *self == THIGH_A::H_15US
401 }
402}
403#[doc = "Field `THIGH` writer - High Duration of the Output Pulse"]
404pub type THIGH_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, MR_SPEC, u8, THIGH_A, 3, O>;
405impl<'a, const O: u8> THIGH_W<'a, O> {
406 #[doc = "31.2 ms"]
407 #[inline(always)]
408 pub fn h_31ms(self) -> &'a mut W {
409 self.variant(THIGH_A::H_31MS)
410 }
411 #[doc = "15.6 ms"]
412 #[inline(always)]
413 pub fn h_16ms(self) -> &'a mut W {
414 self.variant(THIGH_A::H_16MS)
415 }
416 #[doc = "3.91 ms"]
417 #[inline(always)]
418 pub fn h_4ms(self) -> &'a mut W {
419 self.variant(THIGH_A::H_4MS)
420 }
421 #[doc = "976 us"]
422 #[inline(always)]
423 pub fn h_976us(self) -> &'a mut W {
424 self.variant(THIGH_A::H_976US)
425 }
426 #[doc = "488 us"]
427 #[inline(always)]
428 pub fn h_488us(self) -> &'a mut W {
429 self.variant(THIGH_A::H_488US)
430 }
431 #[doc = "122 us"]
432 #[inline(always)]
433 pub fn h_122us(self) -> &'a mut W {
434 self.variant(THIGH_A::H_122US)
435 }
436 #[doc = "30.5 us"]
437 #[inline(always)]
438 pub fn h_30us(self) -> &'a mut W {
439 self.variant(THIGH_A::H_30US)
440 }
441 #[doc = "15.2 us"]
442 #[inline(always)]
443 pub fn h_15us(self) -> &'a mut W {
444 self.variant(THIGH_A::H_15US)
445 }
446}
447#[doc = "Field `TPERIOD` reader - Period of the Output Pulse"]
448pub type TPERIOD_R = crate::FieldReader<u8, TPERIOD_A>;
449#[doc = "Period of the Output Pulse\n\nValue on reset: 0"]
450#[derive(Clone, Copy, Debug, PartialEq, Eq)]
451#[repr(u8)]
452pub enum TPERIOD_A {
453 #[doc = "0: 1 second"]
454 P_1S = 0,
455 #[doc = "1: 500 ms"]
456 P_500MS = 1,
457 #[doc = "2: 250 ms"]
458 P_250MS = 2,
459 #[doc = "3: 125 ms"]
460 P_125MS = 3,
461}
462impl From<TPERIOD_A> for u8 {
463 #[inline(always)]
464 fn from(variant: TPERIOD_A) -> Self {
465 variant as _
466 }
467}
468impl TPERIOD_R {
469 #[doc = "Get enumerated values variant"]
470 #[inline(always)]
471 pub fn variant(&self) -> TPERIOD_A {
472 match self.bits {
473 0 => TPERIOD_A::P_1S,
474 1 => TPERIOD_A::P_500MS,
475 2 => TPERIOD_A::P_250MS,
476 3 => TPERIOD_A::P_125MS,
477 _ => unreachable!(),
478 }
479 }
480 #[doc = "Checks if the value of the field is `P_1S`"]
481 #[inline(always)]
482 pub fn is_p_1s(&self) -> bool {
483 *self == TPERIOD_A::P_1S
484 }
485 #[doc = "Checks if the value of the field is `P_500MS`"]
486 #[inline(always)]
487 pub fn is_p_500ms(&self) -> bool {
488 *self == TPERIOD_A::P_500MS
489 }
490 #[doc = "Checks if the value of the field is `P_250MS`"]
491 #[inline(always)]
492 pub fn is_p_250ms(&self) -> bool {
493 *self == TPERIOD_A::P_250MS
494 }
495 #[doc = "Checks if the value of the field is `P_125MS`"]
496 #[inline(always)]
497 pub fn is_p_125ms(&self) -> bool {
498 *self == TPERIOD_A::P_125MS
499 }
500}
501#[doc = "Field `TPERIOD` writer - Period of the Output Pulse"]
502pub type TPERIOD_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, MR_SPEC, u8, TPERIOD_A, 2, O>;
503impl<'a, const O: u8> TPERIOD_W<'a, O> {
504 #[doc = "1 second"]
505 #[inline(always)]
506 pub fn p_1s(self) -> &'a mut W {
507 self.variant(TPERIOD_A::P_1S)
508 }
509 #[doc = "500 ms"]
510 #[inline(always)]
511 pub fn p_500ms(self) -> &'a mut W {
512 self.variant(TPERIOD_A::P_500MS)
513 }
514 #[doc = "250 ms"]
515 #[inline(always)]
516 pub fn p_250ms(self) -> &'a mut W {
517 self.variant(TPERIOD_A::P_250MS)
518 }
519 #[doc = "125 ms"]
520 #[inline(always)]
521 pub fn p_125ms(self) -> &'a mut W {
522 self.variant(TPERIOD_A::P_125MS)
523 }
524}
525impl R {
526 #[doc = "Bit 0 - 12-/24-hour Mode"]
527 #[inline(always)]
528 pub fn hrmod(&self) -> HRMOD_R {
529 HRMOD_R::new((self.bits & 1) != 0)
530 }
531 #[doc = "Bit 1 - PERSIAN Calendar"]
532 #[inline(always)]
533 pub fn persian(&self) -> PERSIAN_R {
534 PERSIAN_R::new(((self.bits >> 1) & 1) != 0)
535 }
536 #[doc = "Bit 4 - NEGative PPM Correction"]
537 #[inline(always)]
538 pub fn negppm(&self) -> NEGPPM_R {
539 NEGPPM_R::new(((self.bits >> 4) & 1) != 0)
540 }
541 #[doc = "Bits 8:14 - Slow Clock Correction"]
542 #[inline(always)]
543 pub fn correction(&self) -> CORRECTION_R {
544 CORRECTION_R::new(((self.bits >> 8) & 0x7f) as u8)
545 }
546 #[doc = "Bit 15 - HIGH PPM Correction"]
547 #[inline(always)]
548 pub fn highppm(&self) -> HIGHPPM_R {
549 HIGHPPM_R::new(((self.bits >> 15) & 1) != 0)
550 }
551 #[doc = "Bits 16:18 - RTCOUT0 OutputSource Selection"]
552 #[inline(always)]
553 pub fn out0(&self) -> OUT0_R {
554 OUT0_R::new(((self.bits >> 16) & 7) as u8)
555 }
556 #[doc = "Bits 20:22 - RTCOUT1 Output Source Selection"]
557 #[inline(always)]
558 pub fn out1(&self) -> OUT1_R {
559 OUT1_R::new(((self.bits >> 20) & 7) as u8)
560 }
561 #[doc = "Bits 24:26 - High Duration of the Output Pulse"]
562 #[inline(always)]
563 pub fn thigh(&self) -> THIGH_R {
564 THIGH_R::new(((self.bits >> 24) & 7) as u8)
565 }
566 #[doc = "Bits 28:29 - Period of the Output Pulse"]
567 #[inline(always)]
568 pub fn tperiod(&self) -> TPERIOD_R {
569 TPERIOD_R::new(((self.bits >> 28) & 3) as u8)
570 }
571}
572impl W {
573 #[doc = "Bit 0 - 12-/24-hour Mode"]
574 #[inline(always)]
575 #[must_use]
576 pub fn hrmod(&mut self) -> HRMOD_W<0> {
577 HRMOD_W::new(self)
578 }
579 #[doc = "Bit 1 - PERSIAN Calendar"]
580 #[inline(always)]
581 #[must_use]
582 pub fn persian(&mut self) -> PERSIAN_W<1> {
583 PERSIAN_W::new(self)
584 }
585 #[doc = "Bit 4 - NEGative PPM Correction"]
586 #[inline(always)]
587 #[must_use]
588 pub fn negppm(&mut self) -> NEGPPM_W<4> {
589 NEGPPM_W::new(self)
590 }
591 #[doc = "Bits 8:14 - Slow Clock Correction"]
592 #[inline(always)]
593 #[must_use]
594 pub fn correction(&mut self) -> CORRECTION_W<8> {
595 CORRECTION_W::new(self)
596 }
597 #[doc = "Bit 15 - HIGH PPM Correction"]
598 #[inline(always)]
599 #[must_use]
600 pub fn highppm(&mut self) -> HIGHPPM_W<15> {
601 HIGHPPM_W::new(self)
602 }
603 #[doc = "Bits 16:18 - RTCOUT0 OutputSource Selection"]
604 #[inline(always)]
605 #[must_use]
606 pub fn out0(&mut self) -> OUT0_W<16> {
607 OUT0_W::new(self)
608 }
609 #[doc = "Bits 20:22 - RTCOUT1 Output Source Selection"]
610 #[inline(always)]
611 #[must_use]
612 pub fn out1(&mut self) -> OUT1_W<20> {
613 OUT1_W::new(self)
614 }
615 #[doc = "Bits 24:26 - High Duration of the Output Pulse"]
616 #[inline(always)]
617 #[must_use]
618 pub fn thigh(&mut self) -> THIGH_W<24> {
619 THIGH_W::new(self)
620 }
621 #[doc = "Bits 28:29 - Period of the Output Pulse"]
622 #[inline(always)]
623 #[must_use]
624 pub fn tperiod(&mut self) -> TPERIOD_W<28> {
625 TPERIOD_W::new(self)
626 }
627 #[doc = "Writes raw bits to the register."]
628 #[inline(always)]
629 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
630 self.0.bits(bits);
631 self
632 }
633}
634#[doc = "Mode Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [mr](index.html) module"]
635pub struct MR_SPEC;
636impl crate::RegisterSpec for MR_SPEC {
637 type Ux = u32;
638}
639#[doc = "`read()` method returns [mr::R](R) reader structure"]
640impl crate::Readable for MR_SPEC {
641 type Reader = R;
642}
643#[doc = "`write(|w| ..)` method takes [mr::W](W) writer structure"]
644impl crate::Writable for MR_SPEC {
645 type Writer = W;
646 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
647 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
648}
649#[doc = "`reset()` method sets MR to value 0"]
650impl crate::Resettable for MR_SPEC {
651 const RESET_VALUE: Self::Ux = 0;
652}