corstone300_pac/syscontrol/
reset_syndrome.rs1#[doc = "Register `RESET_SYNDROME` reader"]
6pub struct R(crate::R<RESET_SYNDROME_SPEC>);
7impl core::ops::Deref for R {
8 type Target = crate::R<RESET_SYNDROME_SPEC>;
9 #[inline(always)]
10 fn deref(&self) -> &Self::Target {
11 &self.0
12 }
13}
14impl From<crate::R<RESET_SYNDROME_SPEC>> for R {
15 #[inline(always)]
16 fn from(reader: crate::R<RESET_SYNDROME_SPEC>) -> Self {
17 R(reader)
18 }
19}
20#[doc = "Register `RESET_SYNDROME` writer"]
21pub struct W(crate::W<RESET_SYNDROME_SPEC>);
22impl core::ops::Deref for W {
23 type Target = crate::W<RESET_SYNDROME_SPEC>;
24 #[inline(always)]
25 fn deref(&self) -> &Self::Target {
26 &self.0
27 }
28}
29impl core::ops::DerefMut for W {
30 #[inline(always)]
31 fn deref_mut(&mut self) -> &mut Self::Target {
32 &mut self.0
33 }
34}
35impl From<crate::W<RESET_SYNDROME_SPEC>> for W {
36 #[inline(always)]
37 fn from(writer: crate::W<RESET_SYNDROME_SPEC>) -> Self {
38 W(writer)
39 }
40}
41#[doc = "Field `PoR` writer - Power-on"]
42pub type PO_R_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESET_SYNDROME_SPEC, bool, O>;
43#[doc = "Field `NSWDRSTREQ` writer - Non-Secure Watchdog Cold Reset Request."]
44pub type NSWDRSTREQ_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESET_SYNDROME_SPEC, bool, O>;
45#[doc = "Field `SWDRSTREQ` writer - Secure Watchdog Cold Reset Request."]
46pub type SWDRSTREQ_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESET_SYNDROME_SPEC, bool, O>;
47#[doc = "Field `SLOWCLKWDRSTREQ` writer - SLOWCLK Watchdog Cold Reset Request."]
48pub type SLOWCLKWDRSTREQ_W<'a, const O: u8> =
49 crate::BitWriter<'a, u32, RESET_SYNDROME_SPEC, bool, O>;
50#[doc = "Field `RESETREQ` writer - Subsystem Hardware Cold Reset Request Input."]
51pub type RESETREQ_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESET_SYNDROME_SPEC, bool, O>;
52#[doc = "Field `SWRESETREQ` writer - Software Cold Reset Request."]
53pub type SWRESETREQ_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESET_SYNDROME_SPEC, bool, O>;
54#[doc = "Field `HOSTRESETREQ` writer - Host Level Cold Reset Request Input."]
55pub type HOSTRESETREQ_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESET_SYNDROME_SPEC, bool, O>;
56#[doc = "Field `CPU0RSTREQ` writer - CPU 0 Warm Reset Request."]
57pub type CPU0RSTREQ_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESET_SYNDROME_SPEC, bool, O>;
58#[doc = "Field `CPU0LOCKUP` writer - CPU 0 Lockup Status."]
59pub type CPU0LOCKUP_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESET_SYNDROME_SPEC, bool, O>;
60impl W {
61 #[doc = "Bit 0 - Power-on"]
62 #[inline(always)]
63 pub fn po_r(&mut self) -> PO_R_W<0> {
64 PO_R_W::new(self)
65 }
66 #[doc = "Bit 1 - Non-Secure Watchdog Cold Reset Request."]
67 #[inline(always)]
68 pub fn nswdrstreq(&mut self) -> NSWDRSTREQ_W<1> {
69 NSWDRSTREQ_W::new(self)
70 }
71 #[doc = "Bit 2 - Secure Watchdog Cold Reset Request."]
72 #[inline(always)]
73 pub fn swdrstreq(&mut self) -> SWDRSTREQ_W<2> {
74 SWDRSTREQ_W::new(self)
75 }
76 #[doc = "Bit 3 - SLOWCLK Watchdog Cold Reset Request."]
77 #[inline(always)]
78 pub fn slowclkwdrstreq(&mut self) -> SLOWCLKWDRSTREQ_W<3> {
79 SLOWCLKWDRSTREQ_W::new(self)
80 }
81 #[doc = "Bit 4 - Subsystem Hardware Cold Reset Request Input."]
82 #[inline(always)]
83 pub fn resetreq(&mut self) -> RESETREQ_W<4> {
84 RESETREQ_W::new(self)
85 }
86 #[doc = "Bit 5 - Software Cold Reset Request."]
87 #[inline(always)]
88 pub fn swresetreq(&mut self) -> SWRESETREQ_W<5> {
89 SWRESETREQ_W::new(self)
90 }
91 #[doc = "Bit 7 - Host Level Cold Reset Request Input."]
92 #[inline(always)]
93 pub fn hostresetreq(&mut self) -> HOSTRESETREQ_W<7> {
94 HOSTRESETREQ_W::new(self)
95 }
96 #[doc = "Bit 8 - CPU 0 Warm Reset Request."]
97 #[inline(always)]
98 pub fn cpu0rstreq(&mut self) -> CPU0RSTREQ_W<8> {
99 CPU0RSTREQ_W::new(self)
100 }
101 #[doc = "Bit 12 - CPU 0 Lockup Status."]
102 #[inline(always)]
103 pub fn cpu0lockup(&mut self) -> CPU0LOCKUP_W<12> {
104 CPU0LOCKUP_W::new(self)
105 }
106 #[doc = "Writes raw bits to the register."]
107 #[inline(always)]
108 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
109 self.0.bits(bits);
110 self
111 }
112}
113#[doc = "Reset Syndrome\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 [reset_syndrome](index.html) module"]
114pub struct RESET_SYNDROME_SPEC;
115impl crate::RegisterSpec for RESET_SYNDROME_SPEC {
116 type Ux = u32;
117}
118#[doc = "`read()` method returns [reset_syndrome::R](R) reader structure"]
119impl crate::Readable for RESET_SYNDROME_SPEC {
120 type Reader = R;
121}
122#[doc = "`write(|w| ..)` method takes [reset_syndrome::W](W) writer structure"]
123impl crate::Writable for RESET_SYNDROME_SPEC {
124 type Writer = W;
125}
126#[doc = "`reset()` method sets RESET_SYNDROME to value 0x01"]
127impl crate::Resettable for RESET_SYNDROME_SPEC {
128 #[inline(always)]
129 fn reset_value() -> Self::Ux {
130 0x01
131 }
132}