corstone300_pac/sau/
sfsr.rs1#[doc = "Register `SFSR` reader"]
6pub struct R(crate::R<SFSR_SPEC>);
7impl core::ops::Deref for R {
8 type Target = crate::R<SFSR_SPEC>;
9 #[inline(always)]
10 fn deref(&self) -> &Self::Target {
11 &self.0
12 }
13}
14impl From<crate::R<SFSR_SPEC>> for R {
15 #[inline(always)]
16 fn from(reader: crate::R<SFSR_SPEC>) -> Self {
17 R(reader)
18 }
19}
20#[doc = "Register `SFSR` writer"]
21pub struct W(crate::W<SFSR_SPEC>);
22impl core::ops::Deref for W {
23 type Target = crate::W<SFSR_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<SFSR_SPEC>> for W {
36 #[inline(always)]
37 fn from(writer: crate::W<SFSR_SPEC>) -> Self {
38 W(writer)
39 }
40}
41#[doc = "Field `INVEP` reader - Invalid entry pointd"]
42pub type INVEP_R = crate::BitReader<bool>;
43#[doc = "Field `INVEP` writer - Invalid entry pointd"]
44pub type INVEP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SFSR_SPEC, bool, O>;
45#[doc = "Field `INVIS` reader - Invalid integrity signature flag"]
46pub type INVIS_R = crate::BitReader<bool>;
47#[doc = "Field `INVIS` writer - Invalid integrity signature flag"]
48pub type INVIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, SFSR_SPEC, bool, O>;
49#[doc = "Field `INVER` reader - Invalid exception return flag"]
50pub type INVER_R = crate::BitReader<bool>;
51#[doc = "Field `INVER` writer - Invalid exception return flag"]
52pub type INVER_W<'a, const O: u8> = crate::BitWriter<'a, u32, SFSR_SPEC, bool, O>;
53#[doc = "Field `AUVIOL` reader - Attribution unit violation flag"]
54pub type AUVIOL_R = crate::BitReader<bool>;
55#[doc = "Field `AUVIOL` writer - Attribution unit violation flag"]
56pub type AUVIOL_W<'a, const O: u8> = crate::BitWriter<'a, u32, SFSR_SPEC, bool, O>;
57#[doc = "Field `INVTRAN` reader - Invalid transition flag"]
58pub type INVTRAN_R = crate::BitReader<bool>;
59#[doc = "Field `INVTRAN` writer - Invalid transition flag"]
60pub type INVTRAN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SFSR_SPEC, bool, O>;
61#[doc = "Field `LSPERR` reader - Lazy state preservation error flag"]
62pub type LSPERR_R = crate::BitReader<bool>;
63#[doc = "Field `LSPERR` writer - Lazy state preservation error flag"]
64pub type LSPERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, SFSR_SPEC, bool, O>;
65#[doc = "Field `SFARVALID` reader - Secure fault address valid"]
66pub type SFARVALID_R = crate::BitReader<bool>;
67#[doc = "Field `SFARVALID` writer - Secure fault address valid"]
68pub type SFARVALID_W<'a, const O: u8> = crate::BitWriter<'a, u32, SFSR_SPEC, bool, O>;
69#[doc = "Field `LSERR` reader - Lazy state error flag"]
70pub type LSERR_R = crate::BitReader<bool>;
71#[doc = "Field `LSERR` writer - Lazy state error flag"]
72pub type LSERR_W<'a, const O: u8> = crate::BitWriter<'a, u32, SFSR_SPEC, bool, O>;
73impl R {
74 #[doc = "Bit 0 - Invalid entry pointd"]
75 #[inline(always)]
76 pub fn invep(&self) -> INVEP_R {
77 INVEP_R::new((self.bits & 1) != 0)
78 }
79 #[doc = "Bit 1 - Invalid integrity signature flag"]
80 #[inline(always)]
81 pub fn invis(&self) -> INVIS_R {
82 INVIS_R::new(((self.bits >> 1) & 1) != 0)
83 }
84 #[doc = "Bit 2 - Invalid exception return flag"]
85 #[inline(always)]
86 pub fn inver(&self) -> INVER_R {
87 INVER_R::new(((self.bits >> 2) & 1) != 0)
88 }
89 #[doc = "Bit 3 - Attribution unit violation flag"]
90 #[inline(always)]
91 pub fn auviol(&self) -> AUVIOL_R {
92 AUVIOL_R::new(((self.bits >> 3) & 1) != 0)
93 }
94 #[doc = "Bit 4 - Invalid transition flag"]
95 #[inline(always)]
96 pub fn invtran(&self) -> INVTRAN_R {
97 INVTRAN_R::new(((self.bits >> 4) & 1) != 0)
98 }
99 #[doc = "Bit 5 - Lazy state preservation error flag"]
100 #[inline(always)]
101 pub fn lsperr(&self) -> LSPERR_R {
102 LSPERR_R::new(((self.bits >> 5) & 1) != 0)
103 }
104 #[doc = "Bit 6 - Secure fault address valid"]
105 #[inline(always)]
106 pub fn sfarvalid(&self) -> SFARVALID_R {
107 SFARVALID_R::new(((self.bits >> 6) & 1) != 0)
108 }
109 #[doc = "Bit 7 - Lazy state error flag"]
110 #[inline(always)]
111 pub fn lserr(&self) -> LSERR_R {
112 LSERR_R::new(((self.bits >> 7) & 1) != 0)
113 }
114}
115impl W {
116 #[doc = "Bit 0 - Invalid entry pointd"]
117 #[inline(always)]
118 pub fn invep(&mut self) -> INVEP_W<0> {
119 INVEP_W::new(self)
120 }
121 #[doc = "Bit 1 - Invalid integrity signature flag"]
122 #[inline(always)]
123 pub fn invis(&mut self) -> INVIS_W<1> {
124 INVIS_W::new(self)
125 }
126 #[doc = "Bit 2 - Invalid exception return flag"]
127 #[inline(always)]
128 pub fn inver(&mut self) -> INVER_W<2> {
129 INVER_W::new(self)
130 }
131 #[doc = "Bit 3 - Attribution unit violation flag"]
132 #[inline(always)]
133 pub fn auviol(&mut self) -> AUVIOL_W<3> {
134 AUVIOL_W::new(self)
135 }
136 #[doc = "Bit 4 - Invalid transition flag"]
137 #[inline(always)]
138 pub fn invtran(&mut self) -> INVTRAN_W<4> {
139 INVTRAN_W::new(self)
140 }
141 #[doc = "Bit 5 - Lazy state preservation error flag"]
142 #[inline(always)]
143 pub fn lsperr(&mut self) -> LSPERR_W<5> {
144 LSPERR_W::new(self)
145 }
146 #[doc = "Bit 6 - Secure fault address valid"]
147 #[inline(always)]
148 pub fn sfarvalid(&mut self) -> SFARVALID_W<6> {
149 SFARVALID_W::new(self)
150 }
151 #[doc = "Bit 7 - Lazy state error flag"]
152 #[inline(always)]
153 pub fn lserr(&mut self) -> LSERR_W<7> {
154 LSERR_W::new(self)
155 }
156 #[doc = "Writes raw bits to the register."]
157 #[inline(always)]
158 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
159 self.0.bits(bits);
160 self
161 }
162}
163#[doc = "Secure Fault 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 [sfsr](index.html) module"]
164pub struct SFSR_SPEC;
165impl crate::RegisterSpec for SFSR_SPEC {
166 type Ux = u32;
167}
168#[doc = "`read()` method returns [sfsr::R](R) reader structure"]
169impl crate::Readable for SFSR_SPEC {
170 type Reader = R;
171}
172#[doc = "`write(|w| ..)` method takes [sfsr::W](W) writer structure"]
173impl crate::Writable for SFSR_SPEC {
174 type Writer = W;
175}
176#[doc = "`reset()` method sets SFSR to value 0"]
177impl crate::Resettable for SFSR_SPEC {
178 #[inline(always)]
179 fn reset_value() -> Self::Ux {
180 0
181 }
182}