1#[doc = "Register `CONTROL` reader"]
2pub type R = crate::R<ControlSpec>;
3#[doc = "Register `CONTROL` writer"]
4pub type W = crate::W<ControlSpec>;
5#[doc = "Lock control\n\nValue on reset: 2"]
6#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8#[repr(u8)]
9pub enum LockCtrl {
10 #[doc = "1: Locked"]
11 Locked = 1,
12 #[doc = "2: Unlocked"]
13 Unlocked = 2,
14}
15impl From<LockCtrl> for u8 {
16 #[inline(always)]
17 fn from(variant: LockCtrl) -> Self {
18 variant as _
19 }
20}
21impl crate::FieldSpec for LockCtrl {
22 type Ux = u8;
23}
24impl crate::IsEnum for LockCtrl {}
25#[doc = "Field `LOCK_CTRL` reader - Lock control"]
26pub type LockCtrlR = crate::FieldReader<LockCtrl>;
27impl LockCtrlR {
28 #[doc = "Get enumerated values variant"]
29 #[inline(always)]
30 pub const fn variant(&self) -> Option<LockCtrl> {
31 match self.bits {
32 1 => Some(LockCtrl::Locked),
33 2 => Some(LockCtrl::Unlocked),
34 _ => None,
35 }
36 }
37 #[doc = "Locked"]
38 #[inline(always)]
39 pub fn is_locked(&self) -> bool {
40 *self == LockCtrl::Locked
41 }
42 #[doc = "Unlocked"]
43 #[inline(always)]
44 pub fn is_unlocked(&self) -> bool {
45 *self == LockCtrl::Unlocked
46 }
47}
48#[doc = "Field `LOCK_CTRL` writer - Lock control"]
49pub type LockCtrlW<'a, REG> = crate::FieldWriter<'a, REG, 2, LockCtrl>;
50impl<'a, REG> LockCtrlW<'a, REG>
51where
52 REG: crate::Writable + crate::RegisterSpec,
53 REG::Ux: From<u8>,
54{
55 #[doc = "Locked"]
56 #[inline(always)]
57 pub fn locked(self) -> &'a mut crate::W<REG> {
58 self.variant(LockCtrl::Locked)
59 }
60 #[doc = "Unlocked"]
61 #[inline(always)]
62 pub fn unlocked(self) -> &'a mut crate::W<REG> {
63 self.variant(LockCtrl::Unlocked)
64 }
65}
66#[doc = "TIMEOUT fault control\n\nValue on reset: 4"]
67#[cfg_attr(feature = "defmt", derive(defmt::Format))]
68#[derive(Clone, Copy, Debug, PartialEq, Eq)]
69#[repr(u8)]
70pub enum TimeoutCtrl {
71 #[doc = "1: Enable reset"]
72 EnableReset = 1,
73 #[doc = "2: Enable interrupt"]
74 EnableInterrupt = 2,
75 #[doc = "4: Disable both reset and interrupt"]
76 DisableBoth = 4,
77}
78impl From<TimeoutCtrl> for u8 {
79 #[inline(always)]
80 fn from(variant: TimeoutCtrl) -> Self {
81 variant as _
82 }
83}
84impl crate::FieldSpec for TimeoutCtrl {
85 type Ux = u8;
86}
87impl crate::IsEnum for TimeoutCtrl {}
88#[doc = "Field `TIMEOUT_CTRL` reader - TIMEOUT fault control"]
89pub type TimeoutCtrlR = crate::FieldReader<TimeoutCtrl>;
90impl TimeoutCtrlR {
91 #[doc = "Get enumerated values variant"]
92 #[inline(always)]
93 pub const fn variant(&self) -> Option<TimeoutCtrl> {
94 match self.bits {
95 1 => Some(TimeoutCtrl::EnableReset),
96 2 => Some(TimeoutCtrl::EnableInterrupt),
97 4 => Some(TimeoutCtrl::DisableBoth),
98 _ => None,
99 }
100 }
101 #[doc = "Enable reset"]
102 #[inline(always)]
103 pub fn is_enable_reset(&self) -> bool {
104 *self == TimeoutCtrl::EnableReset
105 }
106 #[doc = "Enable interrupt"]
107 #[inline(always)]
108 pub fn is_enable_interrupt(&self) -> bool {
109 *self == TimeoutCtrl::EnableInterrupt
110 }
111 #[doc = "Disable both reset and interrupt"]
112 #[inline(always)]
113 pub fn is_disable_both(&self) -> bool {
114 *self == TimeoutCtrl::DisableBoth
115 }
116}
117#[doc = "Field `TIMEOUT_CTRL` writer - TIMEOUT fault control"]
118pub type TimeoutCtrlW<'a, REG> = crate::FieldWriter<'a, REG, 3, TimeoutCtrl>;
119impl<'a, REG> TimeoutCtrlW<'a, REG>
120where
121 REG: crate::Writable + crate::RegisterSpec,
122 REG::Ux: From<u8>,
123{
124 #[doc = "Enable reset"]
125 #[inline(always)]
126 pub fn enable_reset(self) -> &'a mut crate::W<REG> {
127 self.variant(TimeoutCtrl::EnableReset)
128 }
129 #[doc = "Enable interrupt"]
130 #[inline(always)]
131 pub fn enable_interrupt(self) -> &'a mut crate::W<REG> {
132 self.variant(TimeoutCtrl::EnableInterrupt)
133 }
134 #[doc = "Disable both reset and interrupt"]
135 #[inline(always)]
136 pub fn disable_both(self) -> &'a mut crate::W<REG> {
137 self.variant(TimeoutCtrl::DisableBoth)
138 }
139}
140#[doc = "MISCOMPARE fault control\n\nValue on reset: 4"]
141#[cfg_attr(feature = "defmt", derive(defmt::Format))]
142#[derive(Clone, Copy, Debug, PartialEq, Eq)]
143#[repr(u8)]
144pub enum MiscompareCtrl {
145 #[doc = "1: Enable reset"]
146 EnableReset = 1,
147 #[doc = "2: Enable interrupt"]
148 EnableInterrupt = 2,
149 #[doc = "4: Disable both reset and interrupt"]
150 DisableBoth = 4,
151}
152impl From<MiscompareCtrl> for u8 {
153 #[inline(always)]
154 fn from(variant: MiscompareCtrl) -> Self {
155 variant as _
156 }
157}
158impl crate::FieldSpec for MiscompareCtrl {
159 type Ux = u8;
160}
161impl crate::IsEnum for MiscompareCtrl {}
162#[doc = "Field `MISCOMPARE_CTRL` reader - MISCOMPARE fault control"]
163pub type MiscompareCtrlR = crate::FieldReader<MiscompareCtrl>;
164impl MiscompareCtrlR {
165 #[doc = "Get enumerated values variant"]
166 #[inline(always)]
167 pub const fn variant(&self) -> Option<MiscompareCtrl> {
168 match self.bits {
169 1 => Some(MiscompareCtrl::EnableReset),
170 2 => Some(MiscompareCtrl::EnableInterrupt),
171 4 => Some(MiscompareCtrl::DisableBoth),
172 _ => None,
173 }
174 }
175 #[doc = "Enable reset"]
176 #[inline(always)]
177 pub fn is_enable_reset(&self) -> bool {
178 *self == MiscompareCtrl::EnableReset
179 }
180 #[doc = "Enable interrupt"]
181 #[inline(always)]
182 pub fn is_enable_interrupt(&self) -> bool {
183 *self == MiscompareCtrl::EnableInterrupt
184 }
185 #[doc = "Disable both reset and interrupt"]
186 #[inline(always)]
187 pub fn is_disable_both(&self) -> bool {
188 *self == MiscompareCtrl::DisableBoth
189 }
190}
191#[doc = "Field `MISCOMPARE_CTRL` writer - MISCOMPARE fault control"]
192pub type MiscompareCtrlW<'a, REG> = crate::FieldWriter<'a, REG, 3, MiscompareCtrl>;
193impl<'a, REG> MiscompareCtrlW<'a, REG>
194where
195 REG: crate::Writable + crate::RegisterSpec,
196 REG::Ux: From<u8>,
197{
198 #[doc = "Enable reset"]
199 #[inline(always)]
200 pub fn enable_reset(self) -> &'a mut crate::W<REG> {
201 self.variant(MiscompareCtrl::EnableReset)
202 }
203 #[doc = "Enable interrupt"]
204 #[inline(always)]
205 pub fn enable_interrupt(self) -> &'a mut crate::W<REG> {
206 self.variant(MiscompareCtrl::EnableInterrupt)
207 }
208 #[doc = "Disable both reset and interrupt"]
209 #[inline(always)]
210 pub fn disable_both(self) -> &'a mut crate::W<REG> {
211 self.variant(MiscompareCtrl::DisableBoth)
212 }
213}
214#[doc = "SEQUENCE fault control\n\nValue on reset: 4"]
215#[cfg_attr(feature = "defmt", derive(defmt::Format))]
216#[derive(Clone, Copy, Debug, PartialEq, Eq)]
217#[repr(u8)]
218pub enum SequenceCtrl {
219 #[doc = "1: Enable reset"]
220 EnableReset = 1,
221 #[doc = "2: Enable interrupt"]
222 EnableInterrupt = 2,
223 #[doc = "4: Disable both reset and interrupt"]
224 DisableBoth = 4,
225}
226impl From<SequenceCtrl> for u8 {
227 #[inline(always)]
228 fn from(variant: SequenceCtrl) -> Self {
229 variant as _
230 }
231}
232impl crate::FieldSpec for SequenceCtrl {
233 type Ux = u8;
234}
235impl crate::IsEnum for SequenceCtrl {}
236#[doc = "Field `SEQUENCE_CTRL` reader - SEQUENCE fault control"]
237pub type SequenceCtrlR = crate::FieldReader<SequenceCtrl>;
238impl SequenceCtrlR {
239 #[doc = "Get enumerated values variant"]
240 #[inline(always)]
241 pub const fn variant(&self) -> Option<SequenceCtrl> {
242 match self.bits {
243 1 => Some(SequenceCtrl::EnableReset),
244 2 => Some(SequenceCtrl::EnableInterrupt),
245 4 => Some(SequenceCtrl::DisableBoth),
246 _ => None,
247 }
248 }
249 #[doc = "Enable reset"]
250 #[inline(always)]
251 pub fn is_enable_reset(&self) -> bool {
252 *self == SequenceCtrl::EnableReset
253 }
254 #[doc = "Enable interrupt"]
255 #[inline(always)]
256 pub fn is_enable_interrupt(&self) -> bool {
257 *self == SequenceCtrl::EnableInterrupt
258 }
259 #[doc = "Disable both reset and interrupt"]
260 #[inline(always)]
261 pub fn is_disable_both(&self) -> bool {
262 *self == SequenceCtrl::DisableBoth
263 }
264}
265#[doc = "Field `SEQUENCE_CTRL` writer - SEQUENCE fault control"]
266pub type SequenceCtrlW<'a, REG> = crate::FieldWriter<'a, REG, 3, SequenceCtrl>;
267impl<'a, REG> SequenceCtrlW<'a, REG>
268where
269 REG: crate::Writable + crate::RegisterSpec,
270 REG::Ux: From<u8>,
271{
272 #[doc = "Enable reset"]
273 #[inline(always)]
274 pub fn enable_reset(self) -> &'a mut crate::W<REG> {
275 self.variant(SequenceCtrl::EnableReset)
276 }
277 #[doc = "Enable interrupt"]
278 #[inline(always)]
279 pub fn enable_interrupt(self) -> &'a mut crate::W<REG> {
280 self.variant(SequenceCtrl::EnableInterrupt)
281 }
282 #[doc = "Disable both reset and interrupt"]
283 #[inline(always)]
284 pub fn disable_both(self) -> &'a mut crate::W<REG> {
285 self.variant(SequenceCtrl::DisableBoth)
286 }
287}
288#[doc = "STATE fault control\n\nValue on reset: 4"]
289#[cfg_attr(feature = "defmt", derive(defmt::Format))]
290#[derive(Clone, Copy, Debug, PartialEq, Eq)]
291#[repr(u8)]
292pub enum StateCtrl {
293 #[doc = "1: Enable reset"]
294 EnableReset = 1,
295 #[doc = "2: Enable interrupt"]
296 EnableInterrupt = 2,
297 #[doc = "4: Disable both reset and interrupt"]
298 DisableBoth = 4,
299}
300impl From<StateCtrl> for u8 {
301 #[inline(always)]
302 fn from(variant: StateCtrl) -> Self {
303 variant as _
304 }
305}
306impl crate::FieldSpec for StateCtrl {
307 type Ux = u8;
308}
309impl crate::IsEnum for StateCtrl {}
310#[doc = "Field `STATE_CTRL` reader - STATE fault control"]
311pub type StateCtrlR = crate::FieldReader<StateCtrl>;
312impl StateCtrlR {
313 #[doc = "Get enumerated values variant"]
314 #[inline(always)]
315 pub const fn variant(&self) -> Option<StateCtrl> {
316 match self.bits {
317 1 => Some(StateCtrl::EnableReset),
318 2 => Some(StateCtrl::EnableInterrupt),
319 4 => Some(StateCtrl::DisableBoth),
320 _ => None,
321 }
322 }
323 #[doc = "Enable reset"]
324 #[inline(always)]
325 pub fn is_enable_reset(&self) -> bool {
326 *self == StateCtrl::EnableReset
327 }
328 #[doc = "Enable interrupt"]
329 #[inline(always)]
330 pub fn is_enable_interrupt(&self) -> bool {
331 *self == StateCtrl::EnableInterrupt
332 }
333 #[doc = "Disable both reset and interrupt"]
334 #[inline(always)]
335 pub fn is_disable_both(&self) -> bool {
336 *self == StateCtrl::DisableBoth
337 }
338}
339#[doc = "Field `STATE_CTRL` writer - STATE fault control"]
340pub type StateCtrlW<'a, REG> = crate::FieldWriter<'a, REG, 3, StateCtrl>;
341impl<'a, REG> StateCtrlW<'a, REG>
342where
343 REG: crate::Writable + crate::RegisterSpec,
344 REG::Ux: From<u8>,
345{
346 #[doc = "Enable reset"]
347 #[inline(always)]
348 pub fn enable_reset(self) -> &'a mut crate::W<REG> {
349 self.variant(StateCtrl::EnableReset)
350 }
351 #[doc = "Enable interrupt"]
352 #[inline(always)]
353 pub fn enable_interrupt(self) -> &'a mut crate::W<REG> {
354 self.variant(StateCtrl::EnableInterrupt)
355 }
356 #[doc = "Disable both reset and interrupt"]
357 #[inline(always)]
358 pub fn disable_both(self) -> &'a mut crate::W<REG> {
359 self.variant(StateCtrl::DisableBoth)
360 }
361}
362#[doc = "ADDRESS fault control\n\nValue on reset: 4"]
363#[cfg_attr(feature = "defmt", derive(defmt::Format))]
364#[derive(Clone, Copy, Debug, PartialEq, Eq)]
365#[repr(u8)]
366pub enum AddressCtrl {
367 #[doc = "1: Enable reset"]
368 EnableReset = 1,
369 #[doc = "2: Enable interrupt"]
370 EnableInterrupt = 2,
371 #[doc = "4: Disable both reset and interrupt"]
372 DisableBoth = 4,
373}
374impl From<AddressCtrl> for u8 {
375 #[inline(always)]
376 fn from(variant: AddressCtrl) -> Self {
377 variant as _
378 }
379}
380impl crate::FieldSpec for AddressCtrl {
381 type Ux = u8;
382}
383impl crate::IsEnum for AddressCtrl {}
384#[doc = "Field `ADDRESS_CTRL` reader - ADDRESS fault control"]
385pub type AddressCtrlR = crate::FieldReader<AddressCtrl>;
386impl AddressCtrlR {
387 #[doc = "Get enumerated values variant"]
388 #[inline(always)]
389 pub const fn variant(&self) -> Option<AddressCtrl> {
390 match self.bits {
391 1 => Some(AddressCtrl::EnableReset),
392 2 => Some(AddressCtrl::EnableInterrupt),
393 4 => Some(AddressCtrl::DisableBoth),
394 _ => None,
395 }
396 }
397 #[doc = "Enable reset"]
398 #[inline(always)]
399 pub fn is_enable_reset(&self) -> bool {
400 *self == AddressCtrl::EnableReset
401 }
402 #[doc = "Enable interrupt"]
403 #[inline(always)]
404 pub fn is_enable_interrupt(&self) -> bool {
405 *self == AddressCtrl::EnableInterrupt
406 }
407 #[doc = "Disable both reset and interrupt"]
408 #[inline(always)]
409 pub fn is_disable_both(&self) -> bool {
410 *self == AddressCtrl::DisableBoth
411 }
412}
413#[doc = "Field `ADDRESS_CTRL` writer - ADDRESS fault control"]
414pub type AddressCtrlW<'a, REG> = crate::FieldWriter<'a, REG, 3, AddressCtrl>;
415impl<'a, REG> AddressCtrlW<'a, REG>
416where
417 REG: crate::Writable + crate::RegisterSpec,
418 REG::Ux: From<u8>,
419{
420 #[doc = "Enable reset"]
421 #[inline(always)]
422 pub fn enable_reset(self) -> &'a mut crate::W<REG> {
423 self.variant(AddressCtrl::EnableReset)
424 }
425 #[doc = "Enable interrupt"]
426 #[inline(always)]
427 pub fn enable_interrupt(self) -> &'a mut crate::W<REG> {
428 self.variant(AddressCtrl::EnableInterrupt)
429 }
430 #[doc = "Disable both reset and interrupt"]
431 #[inline(always)]
432 pub fn disable_both(self) -> &'a mut crate::W<REG> {
433 self.variant(AddressCtrl::DisableBoth)
434 }
435}
436#[doc = "IRQ pause control\n\nValue on reset: 1"]
437#[cfg_attr(feature = "defmt", derive(defmt::Format))]
438#[derive(Clone, Copy, Debug, PartialEq, Eq)]
439#[repr(u8)]
440pub enum IrqPause {
441 #[doc = "1: Keep the timer running"]
442 RunTimer = 1,
443 #[doc = "2: Stop the timer"]
444 PauseTimer = 2,
445}
446impl From<IrqPause> for u8 {
447 #[inline(always)]
448 fn from(variant: IrqPause) -> Self {
449 variant as _
450 }
451}
452impl crate::FieldSpec for IrqPause {
453 type Ux = u8;
454}
455impl crate::IsEnum for IrqPause {}
456#[doc = "Field `IRQ_PAUSE` reader - IRQ pause control"]
457pub type IrqPauseR = crate::FieldReader<IrqPause>;
458impl IrqPauseR {
459 #[doc = "Get enumerated values variant"]
460 #[inline(always)]
461 pub const fn variant(&self) -> Option<IrqPause> {
462 match self.bits {
463 1 => Some(IrqPause::RunTimer),
464 2 => Some(IrqPause::PauseTimer),
465 _ => None,
466 }
467 }
468 #[doc = "Keep the timer running"]
469 #[inline(always)]
470 pub fn is_run_timer(&self) -> bool {
471 *self == IrqPause::RunTimer
472 }
473 #[doc = "Stop the timer"]
474 #[inline(always)]
475 pub fn is_pause_timer(&self) -> bool {
476 *self == IrqPause::PauseTimer
477 }
478}
479#[doc = "Field `IRQ_PAUSE` writer - IRQ pause control"]
480pub type IrqPauseW<'a, REG> = crate::FieldWriter<'a, REG, 2, IrqPause>;
481impl<'a, REG> IrqPauseW<'a, REG>
482where
483 REG: crate::Writable + crate::RegisterSpec,
484 REG::Ux: From<u8>,
485{
486 #[doc = "Keep the timer running"]
487 #[inline(always)]
488 pub fn run_timer(self) -> &'a mut crate::W<REG> {
489 self.variant(IrqPause::RunTimer)
490 }
491 #[doc = "Stop the timer"]
492 #[inline(always)]
493 pub fn pause_timer(self) -> &'a mut crate::W<REG> {
494 self.variant(IrqPause::PauseTimer)
495 }
496}
497#[doc = "DEBUG_HALT control\n\nValue on reset: 1"]
498#[cfg_attr(feature = "defmt", derive(defmt::Format))]
499#[derive(Clone, Copy, Debug, PartialEq, Eq)]
500#[repr(u8)]
501pub enum DebugHaltCtrl {
502 #[doc = "1: Keep the timer running"]
503 RunTimer = 1,
504 #[doc = "2: Stop the timer"]
505 PauseTimer = 2,
506}
507impl From<DebugHaltCtrl> for u8 {
508 #[inline(always)]
509 fn from(variant: DebugHaltCtrl) -> Self {
510 variant as _
511 }
512}
513impl crate::FieldSpec for DebugHaltCtrl {
514 type Ux = u8;
515}
516impl crate::IsEnum for DebugHaltCtrl {}
517#[doc = "Field `DEBUG_HALT_CTRL` reader - DEBUG_HALT control"]
518pub type DebugHaltCtrlR = crate::FieldReader<DebugHaltCtrl>;
519impl DebugHaltCtrlR {
520 #[doc = "Get enumerated values variant"]
521 #[inline(always)]
522 pub const fn variant(&self) -> Option<DebugHaltCtrl> {
523 match self.bits {
524 1 => Some(DebugHaltCtrl::RunTimer),
525 2 => Some(DebugHaltCtrl::PauseTimer),
526 _ => None,
527 }
528 }
529 #[doc = "Keep the timer running"]
530 #[inline(always)]
531 pub fn is_run_timer(&self) -> bool {
532 *self == DebugHaltCtrl::RunTimer
533 }
534 #[doc = "Stop the timer"]
535 #[inline(always)]
536 pub fn is_pause_timer(&self) -> bool {
537 *self == DebugHaltCtrl::PauseTimer
538 }
539}
540#[doc = "Field `DEBUG_HALT_CTRL` writer - DEBUG_HALT control"]
541pub type DebugHaltCtrlW<'a, REG> = crate::FieldWriter<'a, REG, 2, DebugHaltCtrl>;
542impl<'a, REG> DebugHaltCtrlW<'a, REG>
543where
544 REG: crate::Writable + crate::RegisterSpec,
545 REG::Ux: From<u8>,
546{
547 #[doc = "Keep the timer running"]
548 #[inline(always)]
549 pub fn run_timer(self) -> &'a mut crate::W<REG> {
550 self.variant(DebugHaltCtrl::RunTimer)
551 }
552 #[doc = "Stop the timer"]
553 #[inline(always)]
554 pub fn pause_timer(self) -> &'a mut crate::W<REG> {
555 self.variant(DebugHaltCtrl::PauseTimer)
556 }
557}
558impl R {
559 #[doc = "Bits 0:1 - Lock control"]
560 #[inline(always)]
561 pub fn lock_ctrl(&self) -> LockCtrlR {
562 LockCtrlR::new((self.bits & 3) as u8)
563 }
564 #[doc = "Bits 2:4 - TIMEOUT fault control"]
565 #[inline(always)]
566 pub fn timeout_ctrl(&self) -> TimeoutCtrlR {
567 TimeoutCtrlR::new(((self.bits >> 2) & 7) as u8)
568 }
569 #[doc = "Bits 5:7 - MISCOMPARE fault control"]
570 #[inline(always)]
571 pub fn miscompare_ctrl(&self) -> MiscompareCtrlR {
572 MiscompareCtrlR::new(((self.bits >> 5) & 7) as u8)
573 }
574 #[doc = "Bits 8:10 - SEQUENCE fault control"]
575 #[inline(always)]
576 pub fn sequence_ctrl(&self) -> SequenceCtrlR {
577 SequenceCtrlR::new(((self.bits >> 8) & 7) as u8)
578 }
579 #[doc = "Bits 14:16 - STATE fault control"]
580 #[inline(always)]
581 pub fn state_ctrl(&self) -> StateCtrlR {
582 StateCtrlR::new(((self.bits >> 14) & 7) as u8)
583 }
584 #[doc = "Bits 17:19 - ADDRESS fault control"]
585 #[inline(always)]
586 pub fn address_ctrl(&self) -> AddressCtrlR {
587 AddressCtrlR::new(((self.bits >> 17) & 7) as u8)
588 }
589 #[doc = "Bits 28:29 - IRQ pause control"]
590 #[inline(always)]
591 pub fn irq_pause(&self) -> IrqPauseR {
592 IrqPauseR::new(((self.bits >> 28) & 3) as u8)
593 }
594 #[doc = "Bits 30:31 - DEBUG_HALT control"]
595 #[inline(always)]
596 pub fn debug_halt_ctrl(&self) -> DebugHaltCtrlR {
597 DebugHaltCtrlR::new(((self.bits >> 30) & 3) as u8)
598 }
599}
600#[cfg(feature = "debug")]
601impl core::fmt::Debug for R {
602 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
603 f.debug_struct("CONTROL")
604 .field("lock_ctrl", &self.lock_ctrl())
605 .field("timeout_ctrl", &self.timeout_ctrl())
606 .field("miscompare_ctrl", &self.miscompare_ctrl())
607 .field("sequence_ctrl", &self.sequence_ctrl())
608 .field("state_ctrl", &self.state_ctrl())
609 .field("address_ctrl", &self.address_ctrl())
610 .field("irq_pause", &self.irq_pause())
611 .field("debug_halt_ctrl", &self.debug_halt_ctrl())
612 .finish()
613 }
614}
615impl W {
616 #[doc = "Bits 0:1 - Lock control"]
617 #[inline(always)]
618 pub fn lock_ctrl(&mut self) -> LockCtrlW<'_, ControlSpec> {
619 LockCtrlW::new(self, 0)
620 }
621 #[doc = "Bits 2:4 - TIMEOUT fault control"]
622 #[inline(always)]
623 pub fn timeout_ctrl(&mut self) -> TimeoutCtrlW<'_, ControlSpec> {
624 TimeoutCtrlW::new(self, 2)
625 }
626 #[doc = "Bits 5:7 - MISCOMPARE fault control"]
627 #[inline(always)]
628 pub fn miscompare_ctrl(&mut self) -> MiscompareCtrlW<'_, ControlSpec> {
629 MiscompareCtrlW::new(self, 5)
630 }
631 #[doc = "Bits 8:10 - SEQUENCE fault control"]
632 #[inline(always)]
633 pub fn sequence_ctrl(&mut self) -> SequenceCtrlW<'_, ControlSpec> {
634 SequenceCtrlW::new(self, 8)
635 }
636 #[doc = "Bits 14:16 - STATE fault control"]
637 #[inline(always)]
638 pub fn state_ctrl(&mut self) -> StateCtrlW<'_, ControlSpec> {
639 StateCtrlW::new(self, 14)
640 }
641 #[doc = "Bits 17:19 - ADDRESS fault control"]
642 #[inline(always)]
643 pub fn address_ctrl(&mut self) -> AddressCtrlW<'_, ControlSpec> {
644 AddressCtrlW::new(self, 17)
645 }
646 #[doc = "Bits 28:29 - IRQ pause control"]
647 #[inline(always)]
648 pub fn irq_pause(&mut self) -> IrqPauseW<'_, ControlSpec> {
649 IrqPauseW::new(self, 28)
650 }
651 #[doc = "Bits 30:31 - DEBUG_HALT control"]
652 #[inline(always)]
653 pub fn debug_halt_ctrl(&mut self) -> DebugHaltCtrlW<'_, ControlSpec> {
654 DebugHaltCtrlW::new(self, 30)
655 }
656}
657#[doc = "Control Register\n\nYou can [`read`](crate::Reg::read) this register and get [`control::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`control::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
658pub struct ControlSpec;
659impl crate::RegisterSpec for ControlSpec {
660 type Ux = u32;
661}
662#[doc = "`read()` method returns [`control::R`](R) reader structure"]
663impl crate::Readable for ControlSpec {}
664#[doc = "`write(|w| ..)` method takes [`control::W`](W) writer structure"]
665impl crate::Writable for ControlSpec {
666 type Safety = crate::Unsafe;
667}
668#[doc = "`reset()` method sets CONTROL to value 0x5009_2492"]
669impl crate::Resettable for ControlSpec {
670 const RESET_VALUE: u32 = 0x5009_2492;
671}