s32k118_pac/rcm/
ssrs.rs

1#[doc = "Register `SSRS` reader"]
2pub struct R(crate::R<SSRS_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SSRS_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SSRS_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SSRS_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `SSRS` writer"]
17pub struct W(crate::W<SSRS_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<SSRS_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<SSRS_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<SSRS_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Sticky Low-Voltage Detect Reset\n\nValue on reset: 1"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39pub enum SLVD_A {
40    #[doc = "0: Reset not caused by LVD trip or POR"]
41    _0 = 0,
42    #[doc = "1: Reset caused by LVD trip or POR"]
43    _1 = 1,
44}
45impl From<SLVD_A> for bool {
46    #[inline(always)]
47    fn from(variant: SLVD_A) -> Self {
48        variant as u8 != 0
49    }
50}
51#[doc = "Field `SLVD` reader - Sticky Low-Voltage Detect Reset"]
52pub struct SLVD_R(crate::FieldReader<bool, SLVD_A>);
53impl SLVD_R {
54    #[inline(always)]
55    pub(crate) fn new(bits: bool) -> Self {
56        SLVD_R(crate::FieldReader::new(bits))
57    }
58    #[doc = r"Get enumerated values variant"]
59    #[inline(always)]
60    pub fn variant(&self) -> SLVD_A {
61        match self.bits {
62            false => SLVD_A::_0,
63            true => SLVD_A::_1,
64        }
65    }
66    #[doc = "Checks if the value of the field is `_0`"]
67    #[inline(always)]
68    pub fn is_0(&self) -> bool {
69        **self == SLVD_A::_0
70    }
71    #[doc = "Checks if the value of the field is `_1`"]
72    #[inline(always)]
73    pub fn is_1(&self) -> bool {
74        **self == SLVD_A::_1
75    }
76}
77impl core::ops::Deref for SLVD_R {
78    type Target = crate::FieldReader<bool, SLVD_A>;
79    #[inline(always)]
80    fn deref(&self) -> &Self::Target {
81        &self.0
82    }
83}
84#[doc = "Field `SLVD` writer - Sticky Low-Voltage Detect Reset"]
85pub struct SLVD_W<'a> {
86    w: &'a mut W,
87}
88impl<'a> SLVD_W<'a> {
89    #[doc = r"Writes `variant` to the field"]
90    #[inline(always)]
91    pub fn variant(self, variant: SLVD_A) -> &'a mut W {
92        self.bit(variant.into())
93    }
94    #[doc = "Reset not caused by LVD trip or POR"]
95    #[inline(always)]
96    pub fn _0(self) -> &'a mut W {
97        self.variant(SLVD_A::_0)
98    }
99    #[doc = "Reset caused by LVD trip or POR"]
100    #[inline(always)]
101    pub fn _1(self) -> &'a mut W {
102        self.variant(SLVD_A::_1)
103    }
104    #[doc = r"Sets the field bit"]
105    #[inline(always)]
106    pub fn set_bit(self) -> &'a mut W {
107        self.bit(true)
108    }
109    #[doc = r"Clears the field bit"]
110    #[inline(always)]
111    pub fn clear_bit(self) -> &'a mut W {
112        self.bit(false)
113    }
114    #[doc = r"Writes raw bits to the field"]
115    #[inline(always)]
116    pub fn bit(self, value: bool) -> &'a mut W {
117        self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
118        self.w
119    }
120}
121#[doc = "Sticky Loss-of-Clock Reset\n\nValue on reset: 0"]
122#[derive(Clone, Copy, Debug, PartialEq)]
123pub enum SLOC_A {
124    #[doc = "0: Reset not caused by a loss of external clock."]
125    _0 = 0,
126    #[doc = "1: Reset caused by a loss of external clock."]
127    _1 = 1,
128}
129impl From<SLOC_A> for bool {
130    #[inline(always)]
131    fn from(variant: SLOC_A) -> Self {
132        variant as u8 != 0
133    }
134}
135#[doc = "Field `SLOC` reader - Sticky Loss-of-Clock Reset"]
136pub struct SLOC_R(crate::FieldReader<bool, SLOC_A>);
137impl SLOC_R {
138    #[inline(always)]
139    pub(crate) fn new(bits: bool) -> Self {
140        SLOC_R(crate::FieldReader::new(bits))
141    }
142    #[doc = r"Get enumerated values variant"]
143    #[inline(always)]
144    pub fn variant(&self) -> SLOC_A {
145        match self.bits {
146            false => SLOC_A::_0,
147            true => SLOC_A::_1,
148        }
149    }
150    #[doc = "Checks if the value of the field is `_0`"]
151    #[inline(always)]
152    pub fn is_0(&self) -> bool {
153        **self == SLOC_A::_0
154    }
155    #[doc = "Checks if the value of the field is `_1`"]
156    #[inline(always)]
157    pub fn is_1(&self) -> bool {
158        **self == SLOC_A::_1
159    }
160}
161impl core::ops::Deref for SLOC_R {
162    type Target = crate::FieldReader<bool, SLOC_A>;
163    #[inline(always)]
164    fn deref(&self) -> &Self::Target {
165        &self.0
166    }
167}
168#[doc = "Field `SLOC` writer - Sticky Loss-of-Clock Reset"]
169pub struct SLOC_W<'a> {
170    w: &'a mut W,
171}
172impl<'a> SLOC_W<'a> {
173    #[doc = r"Writes `variant` to the field"]
174    #[inline(always)]
175    pub fn variant(self, variant: SLOC_A) -> &'a mut W {
176        self.bit(variant.into())
177    }
178    #[doc = "Reset not caused by a loss of external clock."]
179    #[inline(always)]
180    pub fn _0(self) -> &'a mut W {
181        self.variant(SLOC_A::_0)
182    }
183    #[doc = "Reset caused by a loss of external clock."]
184    #[inline(always)]
185    pub fn _1(self) -> &'a mut W {
186        self.variant(SLOC_A::_1)
187    }
188    #[doc = r"Sets the field bit"]
189    #[inline(always)]
190    pub fn set_bit(self) -> &'a mut W {
191        self.bit(true)
192    }
193    #[doc = r"Clears the field bit"]
194    #[inline(always)]
195    pub fn clear_bit(self) -> &'a mut W {
196        self.bit(false)
197    }
198    #[doc = r"Writes raw bits to the field"]
199    #[inline(always)]
200    pub fn bit(self, value: bool) -> &'a mut W {
201        self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
202        self.w
203    }
204}
205#[doc = "Sticky Loss-of-Lock Reset\n\nValue on reset: 0"]
206#[derive(Clone, Copy, Debug, PartialEq)]
207pub enum SLOL_A {
208    #[doc = "0: Reset not caused by a loss of lock in the PLL/FLL"]
209    _0 = 0,
210    #[doc = "1: Reset caused by a loss of lock in the PLL/FLL"]
211    _1 = 1,
212}
213impl From<SLOL_A> for bool {
214    #[inline(always)]
215    fn from(variant: SLOL_A) -> Self {
216        variant as u8 != 0
217    }
218}
219#[doc = "Field `SLOL` reader - Sticky Loss-of-Lock Reset"]
220pub struct SLOL_R(crate::FieldReader<bool, SLOL_A>);
221impl SLOL_R {
222    #[inline(always)]
223    pub(crate) fn new(bits: bool) -> Self {
224        SLOL_R(crate::FieldReader::new(bits))
225    }
226    #[doc = r"Get enumerated values variant"]
227    #[inline(always)]
228    pub fn variant(&self) -> SLOL_A {
229        match self.bits {
230            false => SLOL_A::_0,
231            true => SLOL_A::_1,
232        }
233    }
234    #[doc = "Checks if the value of the field is `_0`"]
235    #[inline(always)]
236    pub fn is_0(&self) -> bool {
237        **self == SLOL_A::_0
238    }
239    #[doc = "Checks if the value of the field is `_1`"]
240    #[inline(always)]
241    pub fn is_1(&self) -> bool {
242        **self == SLOL_A::_1
243    }
244}
245impl core::ops::Deref for SLOL_R {
246    type Target = crate::FieldReader<bool, SLOL_A>;
247    #[inline(always)]
248    fn deref(&self) -> &Self::Target {
249        &self.0
250    }
251}
252#[doc = "Field `SLOL` writer - Sticky Loss-of-Lock Reset"]
253pub struct SLOL_W<'a> {
254    w: &'a mut W,
255}
256impl<'a> SLOL_W<'a> {
257    #[doc = r"Writes `variant` to the field"]
258    #[inline(always)]
259    pub fn variant(self, variant: SLOL_A) -> &'a mut W {
260        self.bit(variant.into())
261    }
262    #[doc = "Reset not caused by a loss of lock in the PLL/FLL"]
263    #[inline(always)]
264    pub fn _0(self) -> &'a mut W {
265        self.variant(SLOL_A::_0)
266    }
267    #[doc = "Reset caused by a loss of lock in the PLL/FLL"]
268    #[inline(always)]
269    pub fn _1(self) -> &'a mut W {
270        self.variant(SLOL_A::_1)
271    }
272    #[doc = r"Sets the field bit"]
273    #[inline(always)]
274    pub fn set_bit(self) -> &'a mut W {
275        self.bit(true)
276    }
277    #[doc = r"Clears the field bit"]
278    #[inline(always)]
279    pub fn clear_bit(self) -> &'a mut W {
280        self.bit(false)
281    }
282    #[doc = r"Writes raw bits to the field"]
283    #[inline(always)]
284    pub fn bit(self, value: bool) -> &'a mut W {
285        self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
286        self.w
287    }
288}
289#[doc = "Sticky CMU Loss-of-Clock Reset\n\nValue on reset: 0"]
290#[derive(Clone, Copy, Debug, PartialEq)]
291pub enum SCMU_LOC_A {
292    #[doc = "0: Reset not caused by the CMU loss-of-clock circuit."]
293    _0 = 0,
294    #[doc = "1: Reset caused by the CMU loss-of-clock circuit."]
295    _1 = 1,
296}
297impl From<SCMU_LOC_A> for bool {
298    #[inline(always)]
299    fn from(variant: SCMU_LOC_A) -> Self {
300        variant as u8 != 0
301    }
302}
303#[doc = "Field `SCMU_LOC` reader - Sticky CMU Loss-of-Clock Reset"]
304pub struct SCMU_LOC_R(crate::FieldReader<bool, SCMU_LOC_A>);
305impl SCMU_LOC_R {
306    #[inline(always)]
307    pub(crate) fn new(bits: bool) -> Self {
308        SCMU_LOC_R(crate::FieldReader::new(bits))
309    }
310    #[doc = r"Get enumerated values variant"]
311    #[inline(always)]
312    pub fn variant(&self) -> SCMU_LOC_A {
313        match self.bits {
314            false => SCMU_LOC_A::_0,
315            true => SCMU_LOC_A::_1,
316        }
317    }
318    #[doc = "Checks if the value of the field is `_0`"]
319    #[inline(always)]
320    pub fn is_0(&self) -> bool {
321        **self == SCMU_LOC_A::_0
322    }
323    #[doc = "Checks if the value of the field is `_1`"]
324    #[inline(always)]
325    pub fn is_1(&self) -> bool {
326        **self == SCMU_LOC_A::_1
327    }
328}
329impl core::ops::Deref for SCMU_LOC_R {
330    type Target = crate::FieldReader<bool, SCMU_LOC_A>;
331    #[inline(always)]
332    fn deref(&self) -> &Self::Target {
333        &self.0
334    }
335}
336#[doc = "Field `SCMU_LOC` writer - Sticky CMU Loss-of-Clock Reset"]
337pub struct SCMU_LOC_W<'a> {
338    w: &'a mut W,
339}
340impl<'a> SCMU_LOC_W<'a> {
341    #[doc = r"Writes `variant` to the field"]
342    #[inline(always)]
343    pub fn variant(self, variant: SCMU_LOC_A) -> &'a mut W {
344        self.bit(variant.into())
345    }
346    #[doc = "Reset not caused by the CMU loss-of-clock circuit."]
347    #[inline(always)]
348    pub fn _0(self) -> &'a mut W {
349        self.variant(SCMU_LOC_A::_0)
350    }
351    #[doc = "Reset caused by the CMU loss-of-clock circuit."]
352    #[inline(always)]
353    pub fn _1(self) -> &'a mut W {
354        self.variant(SCMU_LOC_A::_1)
355    }
356    #[doc = r"Sets the field bit"]
357    #[inline(always)]
358    pub fn set_bit(self) -> &'a mut W {
359        self.bit(true)
360    }
361    #[doc = r"Clears the field bit"]
362    #[inline(always)]
363    pub fn clear_bit(self) -> &'a mut W {
364        self.bit(false)
365    }
366    #[doc = r"Writes raw bits to the field"]
367    #[inline(always)]
368    pub fn bit(self, value: bool) -> &'a mut W {
369        self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
370        self.w
371    }
372}
373#[doc = "Sticky Watchdog\n\nValue on reset: 0"]
374#[derive(Clone, Copy, Debug, PartialEq)]
375pub enum SWDOG_A {
376    #[doc = "0: Reset not caused by watchdog timeout"]
377    _0 = 0,
378    #[doc = "1: Reset caused by watchdog timeout"]
379    _1 = 1,
380}
381impl From<SWDOG_A> for bool {
382    #[inline(always)]
383    fn from(variant: SWDOG_A) -> Self {
384        variant as u8 != 0
385    }
386}
387#[doc = "Field `SWDOG` reader - Sticky Watchdog"]
388pub struct SWDOG_R(crate::FieldReader<bool, SWDOG_A>);
389impl SWDOG_R {
390    #[inline(always)]
391    pub(crate) fn new(bits: bool) -> Self {
392        SWDOG_R(crate::FieldReader::new(bits))
393    }
394    #[doc = r"Get enumerated values variant"]
395    #[inline(always)]
396    pub fn variant(&self) -> SWDOG_A {
397        match self.bits {
398            false => SWDOG_A::_0,
399            true => SWDOG_A::_1,
400        }
401    }
402    #[doc = "Checks if the value of the field is `_0`"]
403    #[inline(always)]
404    pub fn is_0(&self) -> bool {
405        **self == SWDOG_A::_0
406    }
407    #[doc = "Checks if the value of the field is `_1`"]
408    #[inline(always)]
409    pub fn is_1(&self) -> bool {
410        **self == SWDOG_A::_1
411    }
412}
413impl core::ops::Deref for SWDOG_R {
414    type Target = crate::FieldReader<bool, SWDOG_A>;
415    #[inline(always)]
416    fn deref(&self) -> &Self::Target {
417        &self.0
418    }
419}
420#[doc = "Field `SWDOG` writer - Sticky Watchdog"]
421pub struct SWDOG_W<'a> {
422    w: &'a mut W,
423}
424impl<'a> SWDOG_W<'a> {
425    #[doc = r"Writes `variant` to the field"]
426    #[inline(always)]
427    pub fn variant(self, variant: SWDOG_A) -> &'a mut W {
428        self.bit(variant.into())
429    }
430    #[doc = "Reset not caused by watchdog timeout"]
431    #[inline(always)]
432    pub fn _0(self) -> &'a mut W {
433        self.variant(SWDOG_A::_0)
434    }
435    #[doc = "Reset caused by watchdog timeout"]
436    #[inline(always)]
437    pub fn _1(self) -> &'a mut W {
438        self.variant(SWDOG_A::_1)
439    }
440    #[doc = r"Sets the field bit"]
441    #[inline(always)]
442    pub fn set_bit(self) -> &'a mut W {
443        self.bit(true)
444    }
445    #[doc = r"Clears the field bit"]
446    #[inline(always)]
447    pub fn clear_bit(self) -> &'a mut W {
448        self.bit(false)
449    }
450    #[doc = r"Writes raw bits to the field"]
451    #[inline(always)]
452    pub fn bit(self, value: bool) -> &'a mut W {
453        self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5);
454        self.w
455    }
456}
457#[doc = "Sticky External Reset Pin\n\nValue on reset: 0"]
458#[derive(Clone, Copy, Debug, PartialEq)]
459pub enum SPIN_A {
460    #[doc = "0: Reset not caused by external reset pin"]
461    _0 = 0,
462    #[doc = "1: Reset caused by external reset pin"]
463    _1 = 1,
464}
465impl From<SPIN_A> for bool {
466    #[inline(always)]
467    fn from(variant: SPIN_A) -> Self {
468        variant as u8 != 0
469    }
470}
471#[doc = "Field `SPIN` reader - Sticky External Reset Pin"]
472pub struct SPIN_R(crate::FieldReader<bool, SPIN_A>);
473impl SPIN_R {
474    #[inline(always)]
475    pub(crate) fn new(bits: bool) -> Self {
476        SPIN_R(crate::FieldReader::new(bits))
477    }
478    #[doc = r"Get enumerated values variant"]
479    #[inline(always)]
480    pub fn variant(&self) -> SPIN_A {
481        match self.bits {
482            false => SPIN_A::_0,
483            true => SPIN_A::_1,
484        }
485    }
486    #[doc = "Checks if the value of the field is `_0`"]
487    #[inline(always)]
488    pub fn is_0(&self) -> bool {
489        **self == SPIN_A::_0
490    }
491    #[doc = "Checks if the value of the field is `_1`"]
492    #[inline(always)]
493    pub fn is_1(&self) -> bool {
494        **self == SPIN_A::_1
495    }
496}
497impl core::ops::Deref for SPIN_R {
498    type Target = crate::FieldReader<bool, SPIN_A>;
499    #[inline(always)]
500    fn deref(&self) -> &Self::Target {
501        &self.0
502    }
503}
504#[doc = "Field `SPIN` writer - Sticky External Reset Pin"]
505pub struct SPIN_W<'a> {
506    w: &'a mut W,
507}
508impl<'a> SPIN_W<'a> {
509    #[doc = r"Writes `variant` to the field"]
510    #[inline(always)]
511    pub fn variant(self, variant: SPIN_A) -> &'a mut W {
512        self.bit(variant.into())
513    }
514    #[doc = "Reset not caused by external reset pin"]
515    #[inline(always)]
516    pub fn _0(self) -> &'a mut W {
517        self.variant(SPIN_A::_0)
518    }
519    #[doc = "Reset caused by external reset pin"]
520    #[inline(always)]
521    pub fn _1(self) -> &'a mut W {
522        self.variant(SPIN_A::_1)
523    }
524    #[doc = r"Sets the field bit"]
525    #[inline(always)]
526    pub fn set_bit(self) -> &'a mut W {
527        self.bit(true)
528    }
529    #[doc = r"Clears the field bit"]
530    #[inline(always)]
531    pub fn clear_bit(self) -> &'a mut W {
532        self.bit(false)
533    }
534    #[doc = r"Writes raw bits to the field"]
535    #[inline(always)]
536    pub fn bit(self, value: bool) -> &'a mut W {
537        self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6);
538        self.w
539    }
540}
541#[doc = "Sticky Power-On Reset\n\nValue on reset: 1"]
542#[derive(Clone, Copy, Debug, PartialEq)]
543pub enum SPOR_A {
544    #[doc = "0: Reset not caused by POR"]
545    _0 = 0,
546    #[doc = "1: Reset caused by POR"]
547    _1 = 1,
548}
549impl From<SPOR_A> for bool {
550    #[inline(always)]
551    fn from(variant: SPOR_A) -> Self {
552        variant as u8 != 0
553    }
554}
555#[doc = "Field `SPOR` reader - Sticky Power-On Reset"]
556pub struct SPOR_R(crate::FieldReader<bool, SPOR_A>);
557impl SPOR_R {
558    #[inline(always)]
559    pub(crate) fn new(bits: bool) -> Self {
560        SPOR_R(crate::FieldReader::new(bits))
561    }
562    #[doc = r"Get enumerated values variant"]
563    #[inline(always)]
564    pub fn variant(&self) -> SPOR_A {
565        match self.bits {
566            false => SPOR_A::_0,
567            true => SPOR_A::_1,
568        }
569    }
570    #[doc = "Checks if the value of the field is `_0`"]
571    #[inline(always)]
572    pub fn is_0(&self) -> bool {
573        **self == SPOR_A::_0
574    }
575    #[doc = "Checks if the value of the field is `_1`"]
576    #[inline(always)]
577    pub fn is_1(&self) -> bool {
578        **self == SPOR_A::_1
579    }
580}
581impl core::ops::Deref for SPOR_R {
582    type Target = crate::FieldReader<bool, SPOR_A>;
583    #[inline(always)]
584    fn deref(&self) -> &Self::Target {
585        &self.0
586    }
587}
588#[doc = "Field `SPOR` writer - Sticky Power-On Reset"]
589pub struct SPOR_W<'a> {
590    w: &'a mut W,
591}
592impl<'a> SPOR_W<'a> {
593    #[doc = r"Writes `variant` to the field"]
594    #[inline(always)]
595    pub fn variant(self, variant: SPOR_A) -> &'a mut W {
596        self.bit(variant.into())
597    }
598    #[doc = "Reset not caused by POR"]
599    #[inline(always)]
600    pub fn _0(self) -> &'a mut W {
601        self.variant(SPOR_A::_0)
602    }
603    #[doc = "Reset caused by POR"]
604    #[inline(always)]
605    pub fn _1(self) -> &'a mut W {
606        self.variant(SPOR_A::_1)
607    }
608    #[doc = r"Sets the field bit"]
609    #[inline(always)]
610    pub fn set_bit(self) -> &'a mut W {
611        self.bit(true)
612    }
613    #[doc = r"Clears the field bit"]
614    #[inline(always)]
615    pub fn clear_bit(self) -> &'a mut W {
616        self.bit(false)
617    }
618    #[doc = r"Writes raw bits to the field"]
619    #[inline(always)]
620    pub fn bit(self, value: bool) -> &'a mut W {
621        self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7);
622        self.w
623    }
624}
625#[doc = "Sticky JTAG generated reset\n\nValue on reset: 0"]
626#[derive(Clone, Copy, Debug, PartialEq)]
627pub enum SJTAG_A {
628    #[doc = "0: Reset not caused by JTAG"]
629    _0 = 0,
630    #[doc = "1: Reset caused by JTAG"]
631    _1 = 1,
632}
633impl From<SJTAG_A> for bool {
634    #[inline(always)]
635    fn from(variant: SJTAG_A) -> Self {
636        variant as u8 != 0
637    }
638}
639#[doc = "Field `SJTAG` reader - Sticky JTAG generated reset"]
640pub struct SJTAG_R(crate::FieldReader<bool, SJTAG_A>);
641impl SJTAG_R {
642    #[inline(always)]
643    pub(crate) fn new(bits: bool) -> Self {
644        SJTAG_R(crate::FieldReader::new(bits))
645    }
646    #[doc = r"Get enumerated values variant"]
647    #[inline(always)]
648    pub fn variant(&self) -> SJTAG_A {
649        match self.bits {
650            false => SJTAG_A::_0,
651            true => SJTAG_A::_1,
652        }
653    }
654    #[doc = "Checks if the value of the field is `_0`"]
655    #[inline(always)]
656    pub fn is_0(&self) -> bool {
657        **self == SJTAG_A::_0
658    }
659    #[doc = "Checks if the value of the field is `_1`"]
660    #[inline(always)]
661    pub fn is_1(&self) -> bool {
662        **self == SJTAG_A::_1
663    }
664}
665impl core::ops::Deref for SJTAG_R {
666    type Target = crate::FieldReader<bool, SJTAG_A>;
667    #[inline(always)]
668    fn deref(&self) -> &Self::Target {
669        &self.0
670    }
671}
672#[doc = "Field `SJTAG` writer - Sticky JTAG generated reset"]
673pub struct SJTAG_W<'a> {
674    w: &'a mut W,
675}
676impl<'a> SJTAG_W<'a> {
677    #[doc = r"Writes `variant` to the field"]
678    #[inline(always)]
679    pub fn variant(self, variant: SJTAG_A) -> &'a mut W {
680        self.bit(variant.into())
681    }
682    #[doc = "Reset not caused by JTAG"]
683    #[inline(always)]
684    pub fn _0(self) -> &'a mut W {
685        self.variant(SJTAG_A::_0)
686    }
687    #[doc = "Reset caused by JTAG"]
688    #[inline(always)]
689    pub fn _1(self) -> &'a mut W {
690        self.variant(SJTAG_A::_1)
691    }
692    #[doc = r"Sets the field bit"]
693    #[inline(always)]
694    pub fn set_bit(self) -> &'a mut W {
695        self.bit(true)
696    }
697    #[doc = r"Clears the field bit"]
698    #[inline(always)]
699    pub fn clear_bit(self) -> &'a mut W {
700        self.bit(false)
701    }
702    #[doc = r"Writes raw bits to the field"]
703    #[inline(always)]
704    pub fn bit(self, value: bool) -> &'a mut W {
705        self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8);
706        self.w
707    }
708}
709#[doc = "Sticky Core Lockup\n\nValue on reset: 0"]
710#[derive(Clone, Copy, Debug, PartialEq)]
711pub enum SLOCKUP_A {
712    #[doc = "0: Reset not caused by core LOCKUP event"]
713    _0 = 0,
714    #[doc = "1: Reset caused by core LOCKUP event"]
715    _1 = 1,
716}
717impl From<SLOCKUP_A> for bool {
718    #[inline(always)]
719    fn from(variant: SLOCKUP_A) -> Self {
720        variant as u8 != 0
721    }
722}
723#[doc = "Field `SLOCKUP` reader - Sticky Core Lockup"]
724pub struct SLOCKUP_R(crate::FieldReader<bool, SLOCKUP_A>);
725impl SLOCKUP_R {
726    #[inline(always)]
727    pub(crate) fn new(bits: bool) -> Self {
728        SLOCKUP_R(crate::FieldReader::new(bits))
729    }
730    #[doc = r"Get enumerated values variant"]
731    #[inline(always)]
732    pub fn variant(&self) -> SLOCKUP_A {
733        match self.bits {
734            false => SLOCKUP_A::_0,
735            true => SLOCKUP_A::_1,
736        }
737    }
738    #[doc = "Checks if the value of the field is `_0`"]
739    #[inline(always)]
740    pub fn is_0(&self) -> bool {
741        **self == SLOCKUP_A::_0
742    }
743    #[doc = "Checks if the value of the field is `_1`"]
744    #[inline(always)]
745    pub fn is_1(&self) -> bool {
746        **self == SLOCKUP_A::_1
747    }
748}
749impl core::ops::Deref for SLOCKUP_R {
750    type Target = crate::FieldReader<bool, SLOCKUP_A>;
751    #[inline(always)]
752    fn deref(&self) -> &Self::Target {
753        &self.0
754    }
755}
756#[doc = "Field `SLOCKUP` writer - Sticky Core Lockup"]
757pub struct SLOCKUP_W<'a> {
758    w: &'a mut W,
759}
760impl<'a> SLOCKUP_W<'a> {
761    #[doc = r"Writes `variant` to the field"]
762    #[inline(always)]
763    pub fn variant(self, variant: SLOCKUP_A) -> &'a mut W {
764        self.bit(variant.into())
765    }
766    #[doc = "Reset not caused by core LOCKUP event"]
767    #[inline(always)]
768    pub fn _0(self) -> &'a mut W {
769        self.variant(SLOCKUP_A::_0)
770    }
771    #[doc = "Reset caused by core LOCKUP event"]
772    #[inline(always)]
773    pub fn _1(self) -> &'a mut W {
774        self.variant(SLOCKUP_A::_1)
775    }
776    #[doc = r"Sets the field bit"]
777    #[inline(always)]
778    pub fn set_bit(self) -> &'a mut W {
779        self.bit(true)
780    }
781    #[doc = r"Clears the field bit"]
782    #[inline(always)]
783    pub fn clear_bit(self) -> &'a mut W {
784        self.bit(false)
785    }
786    #[doc = r"Writes raw bits to the field"]
787    #[inline(always)]
788    pub fn bit(self, value: bool) -> &'a mut W {
789        self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9);
790        self.w
791    }
792}
793#[doc = "Sticky Software\n\nValue on reset: 0"]
794#[derive(Clone, Copy, Debug, PartialEq)]
795pub enum SSW_A {
796    #[doc = "0: Reset not caused by software setting of SYSRESETREQ bit"]
797    _0 = 0,
798    #[doc = "1: Reset caused by software setting of SYSRESETREQ bit"]
799    _1 = 1,
800}
801impl From<SSW_A> for bool {
802    #[inline(always)]
803    fn from(variant: SSW_A) -> Self {
804        variant as u8 != 0
805    }
806}
807#[doc = "Field `SSW` reader - Sticky Software"]
808pub struct SSW_R(crate::FieldReader<bool, SSW_A>);
809impl SSW_R {
810    #[inline(always)]
811    pub(crate) fn new(bits: bool) -> Self {
812        SSW_R(crate::FieldReader::new(bits))
813    }
814    #[doc = r"Get enumerated values variant"]
815    #[inline(always)]
816    pub fn variant(&self) -> SSW_A {
817        match self.bits {
818            false => SSW_A::_0,
819            true => SSW_A::_1,
820        }
821    }
822    #[doc = "Checks if the value of the field is `_0`"]
823    #[inline(always)]
824    pub fn is_0(&self) -> bool {
825        **self == SSW_A::_0
826    }
827    #[doc = "Checks if the value of the field is `_1`"]
828    #[inline(always)]
829    pub fn is_1(&self) -> bool {
830        **self == SSW_A::_1
831    }
832}
833impl core::ops::Deref for SSW_R {
834    type Target = crate::FieldReader<bool, SSW_A>;
835    #[inline(always)]
836    fn deref(&self) -> &Self::Target {
837        &self.0
838    }
839}
840#[doc = "Field `SSW` writer - Sticky Software"]
841pub struct SSW_W<'a> {
842    w: &'a mut W,
843}
844impl<'a> SSW_W<'a> {
845    #[doc = r"Writes `variant` to the field"]
846    #[inline(always)]
847    pub fn variant(self, variant: SSW_A) -> &'a mut W {
848        self.bit(variant.into())
849    }
850    #[doc = "Reset not caused by software setting of SYSRESETREQ bit"]
851    #[inline(always)]
852    pub fn _0(self) -> &'a mut W {
853        self.variant(SSW_A::_0)
854    }
855    #[doc = "Reset caused by software setting of SYSRESETREQ bit"]
856    #[inline(always)]
857    pub fn _1(self) -> &'a mut W {
858        self.variant(SSW_A::_1)
859    }
860    #[doc = r"Sets the field bit"]
861    #[inline(always)]
862    pub fn set_bit(self) -> &'a mut W {
863        self.bit(true)
864    }
865    #[doc = r"Clears the field bit"]
866    #[inline(always)]
867    pub fn clear_bit(self) -> &'a mut W {
868        self.bit(false)
869    }
870    #[doc = r"Writes raw bits to the field"]
871    #[inline(always)]
872    pub fn bit(self, value: bool) -> &'a mut W {
873        self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10);
874        self.w
875    }
876}
877#[doc = "Sticky MDM-AP System Reset Request\n\nValue on reset: 0"]
878#[derive(Clone, Copy, Debug, PartialEq)]
879pub enum SMDM_AP_A {
880    #[doc = "0: Reset was not caused by host debugger system setting of the System Reset Request bit"]
881    _0 = 0,
882    #[doc = "1: Reset was caused by host debugger system setting of the System Reset Request bit"]
883    _1 = 1,
884}
885impl From<SMDM_AP_A> for bool {
886    #[inline(always)]
887    fn from(variant: SMDM_AP_A) -> Self {
888        variant as u8 != 0
889    }
890}
891#[doc = "Field `SMDM_AP` reader - Sticky MDM-AP System Reset Request"]
892pub struct SMDM_AP_R(crate::FieldReader<bool, SMDM_AP_A>);
893impl SMDM_AP_R {
894    #[inline(always)]
895    pub(crate) fn new(bits: bool) -> Self {
896        SMDM_AP_R(crate::FieldReader::new(bits))
897    }
898    #[doc = r"Get enumerated values variant"]
899    #[inline(always)]
900    pub fn variant(&self) -> SMDM_AP_A {
901        match self.bits {
902            false => SMDM_AP_A::_0,
903            true => SMDM_AP_A::_1,
904        }
905    }
906    #[doc = "Checks if the value of the field is `_0`"]
907    #[inline(always)]
908    pub fn is_0(&self) -> bool {
909        **self == SMDM_AP_A::_0
910    }
911    #[doc = "Checks if the value of the field is `_1`"]
912    #[inline(always)]
913    pub fn is_1(&self) -> bool {
914        **self == SMDM_AP_A::_1
915    }
916}
917impl core::ops::Deref for SMDM_AP_R {
918    type Target = crate::FieldReader<bool, SMDM_AP_A>;
919    #[inline(always)]
920    fn deref(&self) -> &Self::Target {
921        &self.0
922    }
923}
924#[doc = "Field `SMDM_AP` writer - Sticky MDM-AP System Reset Request"]
925pub struct SMDM_AP_W<'a> {
926    w: &'a mut W,
927}
928impl<'a> SMDM_AP_W<'a> {
929    #[doc = r"Writes `variant` to the field"]
930    #[inline(always)]
931    pub fn variant(self, variant: SMDM_AP_A) -> &'a mut W {
932        self.bit(variant.into())
933    }
934    #[doc = "Reset was not caused by host debugger system setting of the System Reset Request bit"]
935    #[inline(always)]
936    pub fn _0(self) -> &'a mut W {
937        self.variant(SMDM_AP_A::_0)
938    }
939    #[doc = "Reset was caused by host debugger system setting of the System Reset Request bit"]
940    #[inline(always)]
941    pub fn _1(self) -> &'a mut W {
942        self.variant(SMDM_AP_A::_1)
943    }
944    #[doc = r"Sets the field bit"]
945    #[inline(always)]
946    pub fn set_bit(self) -> &'a mut W {
947        self.bit(true)
948    }
949    #[doc = r"Clears the field bit"]
950    #[inline(always)]
951    pub fn clear_bit(self) -> &'a mut W {
952        self.bit(false)
953    }
954    #[doc = r"Writes raw bits to the field"]
955    #[inline(always)]
956    pub fn bit(self, value: bool) -> &'a mut W {
957        self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11);
958        self.w
959    }
960}
961#[doc = "Sticky Stop Acknowledge Error\n\nValue on reset: 0"]
962#[derive(Clone, Copy, Debug, PartialEq)]
963pub enum SSACKERR_A {
964    #[doc = "0: Reset not caused by peripheral failure to acknowledge attempt to enter stop mode"]
965    _0 = 0,
966    #[doc = "1: Reset caused by peripheral failure to acknowledge attempt to enter stop mode"]
967    _1 = 1,
968}
969impl From<SSACKERR_A> for bool {
970    #[inline(always)]
971    fn from(variant: SSACKERR_A) -> Self {
972        variant as u8 != 0
973    }
974}
975#[doc = "Field `SSACKERR` reader - Sticky Stop Acknowledge Error"]
976pub struct SSACKERR_R(crate::FieldReader<bool, SSACKERR_A>);
977impl SSACKERR_R {
978    #[inline(always)]
979    pub(crate) fn new(bits: bool) -> Self {
980        SSACKERR_R(crate::FieldReader::new(bits))
981    }
982    #[doc = r"Get enumerated values variant"]
983    #[inline(always)]
984    pub fn variant(&self) -> SSACKERR_A {
985        match self.bits {
986            false => SSACKERR_A::_0,
987            true => SSACKERR_A::_1,
988        }
989    }
990    #[doc = "Checks if the value of the field is `_0`"]
991    #[inline(always)]
992    pub fn is_0(&self) -> bool {
993        **self == SSACKERR_A::_0
994    }
995    #[doc = "Checks if the value of the field is `_1`"]
996    #[inline(always)]
997    pub fn is_1(&self) -> bool {
998        **self == SSACKERR_A::_1
999    }
1000}
1001impl core::ops::Deref for SSACKERR_R {
1002    type Target = crate::FieldReader<bool, SSACKERR_A>;
1003    #[inline(always)]
1004    fn deref(&self) -> &Self::Target {
1005        &self.0
1006    }
1007}
1008#[doc = "Field `SSACKERR` writer - Sticky Stop Acknowledge Error"]
1009pub struct SSACKERR_W<'a> {
1010    w: &'a mut W,
1011}
1012impl<'a> SSACKERR_W<'a> {
1013    #[doc = r"Writes `variant` to the field"]
1014    #[inline(always)]
1015    pub fn variant(self, variant: SSACKERR_A) -> &'a mut W {
1016        self.bit(variant.into())
1017    }
1018    #[doc = "Reset not caused by peripheral failure to acknowledge attempt to enter stop mode"]
1019    #[inline(always)]
1020    pub fn _0(self) -> &'a mut W {
1021        self.variant(SSACKERR_A::_0)
1022    }
1023    #[doc = "Reset caused by peripheral failure to acknowledge attempt to enter stop mode"]
1024    #[inline(always)]
1025    pub fn _1(self) -> &'a mut W {
1026        self.variant(SSACKERR_A::_1)
1027    }
1028    #[doc = r"Sets the field bit"]
1029    #[inline(always)]
1030    pub fn set_bit(self) -> &'a mut W {
1031        self.bit(true)
1032    }
1033    #[doc = r"Clears the field bit"]
1034    #[inline(always)]
1035    pub fn clear_bit(self) -> &'a mut W {
1036        self.bit(false)
1037    }
1038    #[doc = r"Writes raw bits to the field"]
1039    #[inline(always)]
1040    pub fn bit(self, value: bool) -> &'a mut W {
1041        self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13);
1042        self.w
1043    }
1044}
1045impl R {
1046    #[doc = "Bit 1 - Sticky Low-Voltage Detect Reset"]
1047    #[inline(always)]
1048    pub fn slvd(&self) -> SLVD_R {
1049        SLVD_R::new(((self.bits >> 1) & 0x01) != 0)
1050    }
1051    #[doc = "Bit 2 - Sticky Loss-of-Clock Reset"]
1052    #[inline(always)]
1053    pub fn sloc(&self) -> SLOC_R {
1054        SLOC_R::new(((self.bits >> 2) & 0x01) != 0)
1055    }
1056    #[doc = "Bit 3 - Sticky Loss-of-Lock Reset"]
1057    #[inline(always)]
1058    pub fn slol(&self) -> SLOL_R {
1059        SLOL_R::new(((self.bits >> 3) & 0x01) != 0)
1060    }
1061    #[doc = "Bit 4 - Sticky CMU Loss-of-Clock Reset"]
1062    #[inline(always)]
1063    pub fn scmu_loc(&self) -> SCMU_LOC_R {
1064        SCMU_LOC_R::new(((self.bits >> 4) & 0x01) != 0)
1065    }
1066    #[doc = "Bit 5 - Sticky Watchdog"]
1067    #[inline(always)]
1068    pub fn swdog(&self) -> SWDOG_R {
1069        SWDOG_R::new(((self.bits >> 5) & 0x01) != 0)
1070    }
1071    #[doc = "Bit 6 - Sticky External Reset Pin"]
1072    #[inline(always)]
1073    pub fn spin(&self) -> SPIN_R {
1074        SPIN_R::new(((self.bits >> 6) & 0x01) != 0)
1075    }
1076    #[doc = "Bit 7 - Sticky Power-On Reset"]
1077    #[inline(always)]
1078    pub fn spor(&self) -> SPOR_R {
1079        SPOR_R::new(((self.bits >> 7) & 0x01) != 0)
1080    }
1081    #[doc = "Bit 8 - Sticky JTAG generated reset"]
1082    #[inline(always)]
1083    pub fn sjtag(&self) -> SJTAG_R {
1084        SJTAG_R::new(((self.bits >> 8) & 0x01) != 0)
1085    }
1086    #[doc = "Bit 9 - Sticky Core Lockup"]
1087    #[inline(always)]
1088    pub fn slockup(&self) -> SLOCKUP_R {
1089        SLOCKUP_R::new(((self.bits >> 9) & 0x01) != 0)
1090    }
1091    #[doc = "Bit 10 - Sticky Software"]
1092    #[inline(always)]
1093    pub fn ssw(&self) -> SSW_R {
1094        SSW_R::new(((self.bits >> 10) & 0x01) != 0)
1095    }
1096    #[doc = "Bit 11 - Sticky MDM-AP System Reset Request"]
1097    #[inline(always)]
1098    pub fn smdm_ap(&self) -> SMDM_AP_R {
1099        SMDM_AP_R::new(((self.bits >> 11) & 0x01) != 0)
1100    }
1101    #[doc = "Bit 13 - Sticky Stop Acknowledge Error"]
1102    #[inline(always)]
1103    pub fn ssackerr(&self) -> SSACKERR_R {
1104        SSACKERR_R::new(((self.bits >> 13) & 0x01) != 0)
1105    }
1106}
1107impl W {
1108    #[doc = "Bit 1 - Sticky Low-Voltage Detect Reset"]
1109    #[inline(always)]
1110    pub fn slvd(&mut self) -> SLVD_W {
1111        SLVD_W { w: self }
1112    }
1113    #[doc = "Bit 2 - Sticky Loss-of-Clock Reset"]
1114    #[inline(always)]
1115    pub fn sloc(&mut self) -> SLOC_W {
1116        SLOC_W { w: self }
1117    }
1118    #[doc = "Bit 3 - Sticky Loss-of-Lock Reset"]
1119    #[inline(always)]
1120    pub fn slol(&mut self) -> SLOL_W {
1121        SLOL_W { w: self }
1122    }
1123    #[doc = "Bit 4 - Sticky CMU Loss-of-Clock Reset"]
1124    #[inline(always)]
1125    pub fn scmu_loc(&mut self) -> SCMU_LOC_W {
1126        SCMU_LOC_W { w: self }
1127    }
1128    #[doc = "Bit 5 - Sticky Watchdog"]
1129    #[inline(always)]
1130    pub fn swdog(&mut self) -> SWDOG_W {
1131        SWDOG_W { w: self }
1132    }
1133    #[doc = "Bit 6 - Sticky External Reset Pin"]
1134    #[inline(always)]
1135    pub fn spin(&mut self) -> SPIN_W {
1136        SPIN_W { w: self }
1137    }
1138    #[doc = "Bit 7 - Sticky Power-On Reset"]
1139    #[inline(always)]
1140    pub fn spor(&mut self) -> SPOR_W {
1141        SPOR_W { w: self }
1142    }
1143    #[doc = "Bit 8 - Sticky JTAG generated reset"]
1144    #[inline(always)]
1145    pub fn sjtag(&mut self) -> SJTAG_W {
1146        SJTAG_W { w: self }
1147    }
1148    #[doc = "Bit 9 - Sticky Core Lockup"]
1149    #[inline(always)]
1150    pub fn slockup(&mut self) -> SLOCKUP_W {
1151        SLOCKUP_W { w: self }
1152    }
1153    #[doc = "Bit 10 - Sticky Software"]
1154    #[inline(always)]
1155    pub fn ssw(&mut self) -> SSW_W {
1156        SSW_W { w: self }
1157    }
1158    #[doc = "Bit 11 - Sticky MDM-AP System Reset Request"]
1159    #[inline(always)]
1160    pub fn smdm_ap(&mut self) -> SMDM_AP_W {
1161        SMDM_AP_W { w: self }
1162    }
1163    #[doc = "Bit 13 - Sticky Stop Acknowledge Error"]
1164    #[inline(always)]
1165    pub fn ssackerr(&mut self) -> SSACKERR_W {
1166        SSACKERR_W { w: self }
1167    }
1168    #[doc = "Writes raw bits to the register."]
1169    #[inline(always)]
1170    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1171        self.0.bits(bits);
1172        self
1173    }
1174}
1175#[doc = "Sticky System Reset Status 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 [ssrs](index.html) module"]
1176pub struct SSRS_SPEC;
1177impl crate::RegisterSpec for SSRS_SPEC {
1178    type Ux = u32;
1179}
1180#[doc = "`read()` method returns [ssrs::R](R) reader structure"]
1181impl crate::Readable for SSRS_SPEC {
1182    type Reader = R;
1183}
1184#[doc = "`write(|w| ..)` method takes [ssrs::W](W) writer structure"]
1185impl crate::Writable for SSRS_SPEC {
1186    type Writer = W;
1187}
1188#[doc = "`reset()` method sets SSRS to value 0x82"]
1189impl crate::Resettable for SSRS_SPEC {
1190    #[inline(always)]
1191    fn reset_value() -> Self::Ux {
1192        0x82
1193    }
1194}