eos_s3/ext_regs_ffe/
status.rs1#[doc = "Register `STATUS` reader"]
2pub struct R(crate::R<STATUS_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<STATUS_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<STATUS_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<STATUS_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `STATUS` writer"]
17pub struct W(crate::W<STATUS_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<STATUS_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<STATUS_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<STATUS_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `SM0_BUSY` reader - This bit is set whenever the Sensor Manager is busy."]
38pub struct SM0_BUSY_R(crate::FieldReader<bool, bool>);
39impl SM0_BUSY_R {
40 #[inline(always)]
41 pub(crate) fn new(bits: bool) -> Self {
42 SM0_BUSY_R(crate::FieldReader::new(bits))
43 }
44}
45impl core::ops::Deref for SM0_BUSY_R {
46 type Target = crate::FieldReader<bool, bool>;
47 #[inline(always)]
48 fn deref(&self) -> &Self::Target {
49 &self.0
50 }
51}
52#[doc = "Field `SM1_BUSY` reader - This bit is set whenever the Sensor Manager is busy."]
53pub struct SM1_BUSY_R(crate::FieldReader<bool, bool>);
54impl SM1_BUSY_R {
55 #[inline(always)]
56 pub(crate) fn new(bits: bool) -> Self {
57 SM1_BUSY_R(crate::FieldReader::new(bits))
58 }
59}
60impl core::ops::Deref for SM1_BUSY_R {
61 type Target = crate::FieldReader<bool, bool>;
62 #[inline(always)]
63 fn deref(&self) -> &Self::Target {
64 &self.0
65 }
66}
67#[doc = "Field `FFE0_BUSY` reader - This bit is set whenever the FFE0 is busy."]
68pub struct FFE0_BUSY_R(crate::FieldReader<bool, bool>);
69impl FFE0_BUSY_R {
70 #[inline(always)]
71 pub(crate) fn new(bits: bool) -> Self {
72 FFE0_BUSY_R(crate::FieldReader::new(bits))
73 }
74}
75impl core::ops::Deref for FFE0_BUSY_R {
76 type Target = crate::FieldReader<bool, bool>;
77 #[inline(always)]
78 fn deref(&self) -> &Self::Target {
79 &self.0
80 }
81}
82#[doc = "Field `FFE0_BUSY` writer - This bit is set whenever the FFE0 is busy."]
83pub struct FFE0_BUSY_W<'a> {
84 w: &'a mut W,
85}
86impl<'a> FFE0_BUSY_W<'a> {
87 #[doc = r"Sets the field bit"]
88 #[inline(always)]
89 pub fn set_bit(self) -> &'a mut W {
90 self.bit(true)
91 }
92 #[doc = r"Clears the field bit"]
93 #[inline(always)]
94 pub fn clear_bit(self) -> &'a mut W {
95 self.bit(false)
96 }
97 #[doc = r"Writes raw bits to the field"]
98 #[inline(always)]
99 pub fn bit(self, value: bool) -> &'a mut W {
100 self.w.bits =
101 (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
102 self.w
103 }
104}
105#[doc = "Field `FFE1_BUSY` reader - This bit is set whenever the FFE1 is busy."]
106pub struct FFE1_BUSY_R(crate::FieldReader<bool, bool>);
107impl FFE1_BUSY_R {
108 #[inline(always)]
109 pub(crate) fn new(bits: bool) -> Self {
110 FFE1_BUSY_R(crate::FieldReader::new(bits))
111 }
112}
113impl core::ops::Deref for FFE1_BUSY_R {
114 type Target = crate::FieldReader<bool, bool>;
115 #[inline(always)]
116 fn deref(&self) -> &Self::Target {
117 &self.0
118 }
119}
120#[doc = "Field `FFE1_BUSY` writer - This bit is set whenever the FFE1 is busy."]
121pub struct FFE1_BUSY_W<'a> {
122 w: &'a mut W,
123}
124impl<'a> FFE1_BUSY_W<'a> {
125 #[doc = r"Sets the field bit"]
126 #[inline(always)]
127 pub fn set_bit(self) -> &'a mut W {
128 self.bit(true)
129 }
130 #[doc = r"Clears the field bit"]
131 #[inline(always)]
132 pub fn clear_bit(self) -> &'a mut W {
133 self.bit(false)
134 }
135 #[doc = r"Writes raw bits to the field"]
136 #[inline(always)]
137 pub fn bit(self, value: bool) -> &'a mut W {
138 self.w.bits =
139 (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
140 self.w
141 }
142}
143#[doc = "Field `FFE0_BG_FLAG` reader - This is the ffe0 background thread status"]
144pub struct FFE0_BG_FLAG_R(crate::FieldReader<bool, bool>);
145impl FFE0_BG_FLAG_R {
146 #[inline(always)]
147 pub(crate) fn new(bits: bool) -> Self {
148 FFE0_BG_FLAG_R(crate::FieldReader::new(bits))
149 }
150}
151impl core::ops::Deref for FFE0_BG_FLAG_R {
152 type Target = crate::FieldReader<bool, bool>;
153 #[inline(always)]
154 fn deref(&self) -> &Self::Target {
155 &self.0
156 }
157}
158#[doc = "Field `FFE0_BG_FLAG` writer - This is the ffe0 background thread status"]
159pub struct FFE0_BG_FLAG_W<'a> {
160 w: &'a mut W,
161}
162impl<'a> FFE0_BG_FLAG_W<'a> {
163 #[doc = r"Sets the field bit"]
164 #[inline(always)]
165 pub fn set_bit(self) -> &'a mut W {
166 self.bit(true)
167 }
168 #[doc = r"Clears the field bit"]
169 #[inline(always)]
170 pub fn clear_bit(self) -> &'a mut W {
171 self.bit(false)
172 }
173 #[doc = r"Writes raw bits to the field"]
174 #[inline(always)]
175 pub fn bit(self, value: bool) -> &'a mut W {
176 self.w.bits =
177 (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
178 self.w
179 }
180}
181#[doc = "Field `FFE0_FG_FLAG` reader - This is the ffe0 background thread status"]
182pub struct FFE0_FG_FLAG_R(crate::FieldReader<bool, bool>);
183impl FFE0_FG_FLAG_R {
184 #[inline(always)]
185 pub(crate) fn new(bits: bool) -> Self {
186 FFE0_FG_FLAG_R(crate::FieldReader::new(bits))
187 }
188}
189impl core::ops::Deref for FFE0_FG_FLAG_R {
190 type Target = crate::FieldReader<bool, bool>;
191 #[inline(always)]
192 fn deref(&self) -> &Self::Target {
193 &self.0
194 }
195}
196#[doc = "Field `FFE0_FG_FLAG` writer - This is the ffe0 background thread status"]
197pub struct FFE0_FG_FLAG_W<'a> {
198 w: &'a mut W,
199}
200impl<'a> FFE0_FG_FLAG_W<'a> {
201 #[doc = r"Sets the field bit"]
202 #[inline(always)]
203 pub fn set_bit(self) -> &'a mut W {
204 self.bit(true)
205 }
206 #[doc = r"Clears the field bit"]
207 #[inline(always)]
208 pub fn clear_bit(self) -> &'a mut W {
209 self.bit(false)
210 }
211 #[doc = r"Writes raw bits to the field"]
212 #[inline(always)]
213 pub fn bit(self, value: bool) -> &'a mut W {
214 self.w.bits =
215 (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5);
216 self.w
217 }
218}
219impl R {
220 #[doc = "Bit 0 - This bit is set whenever the Sensor Manager is busy."]
221 #[inline(always)]
222 pub fn sm0_busy(&self) -> SM0_BUSY_R {
223 SM0_BUSY_R::new((self.bits & 0x01) != 0)
224 }
225 #[doc = "Bit 1 - This bit is set whenever the Sensor Manager is busy."]
226 #[inline(always)]
227 pub fn sm1_busy(&self) -> SM1_BUSY_R {
228 SM1_BUSY_R::new(((self.bits >> 1) & 0x01) != 0)
229 }
230 #[doc = "Bit 2 - This bit is set whenever the FFE0 is busy."]
231 #[inline(always)]
232 pub fn ffe0_busy(&self) -> FFE0_BUSY_R {
233 FFE0_BUSY_R::new(((self.bits >> 2) & 0x01) != 0)
234 }
235 #[doc = "Bit 3 - This bit is set whenever the FFE1 is busy."]
236 #[inline(always)]
237 pub fn ffe1_busy(&self) -> FFE1_BUSY_R {
238 FFE1_BUSY_R::new(((self.bits >> 3) & 0x01) != 0)
239 }
240 #[doc = "Bit 4 - This is the ffe0 background thread status"]
241 #[inline(always)]
242 pub fn ffe0_bg_flag(&self) -> FFE0_BG_FLAG_R {
243 FFE0_BG_FLAG_R::new(((self.bits >> 4) & 0x01) != 0)
244 }
245 #[doc = "Bit 5 - This is the ffe0 background thread status"]
246 #[inline(always)]
247 pub fn ffe0_fg_flag(&self) -> FFE0_FG_FLAG_R {
248 FFE0_FG_FLAG_R::new(((self.bits >> 5) & 0x01) != 0)
249 }
250}
251impl W {
252 #[doc = "Bit 2 - This bit is set whenever the FFE0 is busy."]
253 #[inline(always)]
254 pub fn ffe0_busy(&mut self) -> FFE0_BUSY_W {
255 FFE0_BUSY_W { w: self }
256 }
257 #[doc = "Bit 3 - This bit is set whenever the FFE1 is busy."]
258 #[inline(always)]
259 pub fn ffe1_busy(&mut self) -> FFE1_BUSY_W {
260 FFE1_BUSY_W { w: self }
261 }
262 #[doc = "Bit 4 - This is the ffe0 background thread status"]
263 #[inline(always)]
264 pub fn ffe0_bg_flag(&mut self) -> FFE0_BG_FLAG_W {
265 FFE0_BG_FLAG_W { w: self }
266 }
267 #[doc = "Bit 5 - This is the ffe0 background thread status"]
268 #[inline(always)]
269 pub fn ffe0_fg_flag(&mut self) -> FFE0_FG_FLAG_W {
270 FFE0_FG_FLAG_W { w: self }
271 }
272 #[doc = "Writes raw bits to the register."]
273 #[inline(always)]
274 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
275 self.0.bits(bits);
276 self
277 }
278}
279#[doc = "FFE 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 [status](index.html) module"]
280pub struct STATUS_SPEC;
281impl crate::RegisterSpec for STATUS_SPEC {
282 type Ux = u32;
283}
284#[doc = "`read()` method returns [status::R](R) reader structure"]
285impl crate::Readable for STATUS_SPEC {
286 type Reader = R;
287}
288#[doc = "`write(|w| ..)` method takes [status::W](W) writer structure"]
289impl crate::Writable for STATUS_SPEC {
290 type Writer = W;
291}
292#[doc = "`reset()` method sets STATUS to value 0"]
293impl crate::Resettable for STATUS_SPEC {
294 #[inline(always)]
295 fn reset_value() -> Self::Ux {
296 0
297 }
298}