nrf52840_pac/wdt/
reqstatus.rs
1#[doc = "Register `REQSTATUS` reader"]
2pub struct R(crate::R<REQSTATUS_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<REQSTATUS_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<REQSTATUS_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<REQSTATUS_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `RR0` reader - Request status for RR\\[0\\]
17register"]
18pub type RR0_R = crate::BitReader<RR0_A>;
19#[doc = "Request status for RR\\[0\\]
20register\n\nValue on reset: 1"]
21#[derive(Clone, Copy, Debug, PartialEq)]
22pub enum RR0_A {
23 #[doc = "0: RR\\[0\\]
24register is not enabled, or are already requesting reload"]
25 DISABLED_OR_REQUESTED = 0,
26 #[doc = "1: RR\\[0\\]
27register is enabled, and are not yet requesting reload"]
28 ENABLED_AND_UNREQUESTED = 1,
29}
30impl From<RR0_A> for bool {
31 #[inline(always)]
32 fn from(variant: RR0_A) -> Self {
33 variant as u8 != 0
34 }
35}
36impl RR0_R {
37 #[doc = "Get enumerated values variant"]
38 #[inline(always)]
39 pub fn variant(&self) -> RR0_A {
40 match self.bits {
41 false => RR0_A::DISABLED_OR_REQUESTED,
42 true => RR0_A::ENABLED_AND_UNREQUESTED,
43 }
44 }
45 #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"]
46 #[inline(always)]
47 pub fn is_disabled_or_requested(&self) -> bool {
48 *self == RR0_A::DISABLED_OR_REQUESTED
49 }
50 #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"]
51 #[inline(always)]
52 pub fn is_enabled_and_unrequested(&self) -> bool {
53 *self == RR0_A::ENABLED_AND_UNREQUESTED
54 }
55}
56#[doc = "Field `RR1` reader - Request status for RR\\[1\\]
57register"]
58pub type RR1_R = crate::BitReader<RR1_A>;
59#[doc = "Request status for RR\\[1\\]
60register\n\nValue on reset: 0"]
61#[derive(Clone, Copy, Debug, PartialEq)]
62pub enum RR1_A {
63 #[doc = "0: RR\\[1\\]
64register is not enabled, or are already requesting reload"]
65 DISABLED_OR_REQUESTED = 0,
66 #[doc = "1: RR\\[1\\]
67register is enabled, and are not yet requesting reload"]
68 ENABLED_AND_UNREQUESTED = 1,
69}
70impl From<RR1_A> for bool {
71 #[inline(always)]
72 fn from(variant: RR1_A) -> Self {
73 variant as u8 != 0
74 }
75}
76impl RR1_R {
77 #[doc = "Get enumerated values variant"]
78 #[inline(always)]
79 pub fn variant(&self) -> RR1_A {
80 match self.bits {
81 false => RR1_A::DISABLED_OR_REQUESTED,
82 true => RR1_A::ENABLED_AND_UNREQUESTED,
83 }
84 }
85 #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"]
86 #[inline(always)]
87 pub fn is_disabled_or_requested(&self) -> bool {
88 *self == RR1_A::DISABLED_OR_REQUESTED
89 }
90 #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"]
91 #[inline(always)]
92 pub fn is_enabled_and_unrequested(&self) -> bool {
93 *self == RR1_A::ENABLED_AND_UNREQUESTED
94 }
95}
96#[doc = "Field `RR2` reader - Request status for RR\\[2\\]
97register"]
98pub type RR2_R = crate::BitReader<RR2_A>;
99#[doc = "Request status for RR\\[2\\]
100register\n\nValue on reset: 0"]
101#[derive(Clone, Copy, Debug, PartialEq)]
102pub enum RR2_A {
103 #[doc = "0: RR\\[2\\]
104register is not enabled, or are already requesting reload"]
105 DISABLED_OR_REQUESTED = 0,
106 #[doc = "1: RR\\[2\\]
107register is enabled, and are not yet requesting reload"]
108 ENABLED_AND_UNREQUESTED = 1,
109}
110impl From<RR2_A> for bool {
111 #[inline(always)]
112 fn from(variant: RR2_A) -> Self {
113 variant as u8 != 0
114 }
115}
116impl RR2_R {
117 #[doc = "Get enumerated values variant"]
118 #[inline(always)]
119 pub fn variant(&self) -> RR2_A {
120 match self.bits {
121 false => RR2_A::DISABLED_OR_REQUESTED,
122 true => RR2_A::ENABLED_AND_UNREQUESTED,
123 }
124 }
125 #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"]
126 #[inline(always)]
127 pub fn is_disabled_or_requested(&self) -> bool {
128 *self == RR2_A::DISABLED_OR_REQUESTED
129 }
130 #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"]
131 #[inline(always)]
132 pub fn is_enabled_and_unrequested(&self) -> bool {
133 *self == RR2_A::ENABLED_AND_UNREQUESTED
134 }
135}
136#[doc = "Field `RR3` reader - Request status for RR\\[3\\]
137register"]
138pub type RR3_R = crate::BitReader<RR3_A>;
139#[doc = "Request status for RR\\[3\\]
140register\n\nValue on reset: 0"]
141#[derive(Clone, Copy, Debug, PartialEq)]
142pub enum RR3_A {
143 #[doc = "0: RR\\[3\\]
144register is not enabled, or are already requesting reload"]
145 DISABLED_OR_REQUESTED = 0,
146 #[doc = "1: RR\\[3\\]
147register is enabled, and are not yet requesting reload"]
148 ENABLED_AND_UNREQUESTED = 1,
149}
150impl From<RR3_A> for bool {
151 #[inline(always)]
152 fn from(variant: RR3_A) -> Self {
153 variant as u8 != 0
154 }
155}
156impl RR3_R {
157 #[doc = "Get enumerated values variant"]
158 #[inline(always)]
159 pub fn variant(&self) -> RR3_A {
160 match self.bits {
161 false => RR3_A::DISABLED_OR_REQUESTED,
162 true => RR3_A::ENABLED_AND_UNREQUESTED,
163 }
164 }
165 #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"]
166 #[inline(always)]
167 pub fn is_disabled_or_requested(&self) -> bool {
168 *self == RR3_A::DISABLED_OR_REQUESTED
169 }
170 #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"]
171 #[inline(always)]
172 pub fn is_enabled_and_unrequested(&self) -> bool {
173 *self == RR3_A::ENABLED_AND_UNREQUESTED
174 }
175}
176#[doc = "Field `RR4` reader - Request status for RR\\[4\\]
177register"]
178pub type RR4_R = crate::BitReader<RR4_A>;
179#[doc = "Request status for RR\\[4\\]
180register\n\nValue on reset: 0"]
181#[derive(Clone, Copy, Debug, PartialEq)]
182pub enum RR4_A {
183 #[doc = "0: RR\\[4\\]
184register is not enabled, or are already requesting reload"]
185 DISABLED_OR_REQUESTED = 0,
186 #[doc = "1: RR\\[4\\]
187register is enabled, and are not yet requesting reload"]
188 ENABLED_AND_UNREQUESTED = 1,
189}
190impl From<RR4_A> for bool {
191 #[inline(always)]
192 fn from(variant: RR4_A) -> Self {
193 variant as u8 != 0
194 }
195}
196impl RR4_R {
197 #[doc = "Get enumerated values variant"]
198 #[inline(always)]
199 pub fn variant(&self) -> RR4_A {
200 match self.bits {
201 false => RR4_A::DISABLED_OR_REQUESTED,
202 true => RR4_A::ENABLED_AND_UNREQUESTED,
203 }
204 }
205 #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"]
206 #[inline(always)]
207 pub fn is_disabled_or_requested(&self) -> bool {
208 *self == RR4_A::DISABLED_OR_REQUESTED
209 }
210 #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"]
211 #[inline(always)]
212 pub fn is_enabled_and_unrequested(&self) -> bool {
213 *self == RR4_A::ENABLED_AND_UNREQUESTED
214 }
215}
216#[doc = "Field `RR5` reader - Request status for RR\\[5\\]
217register"]
218pub type RR5_R = crate::BitReader<RR5_A>;
219#[doc = "Request status for RR\\[5\\]
220register\n\nValue on reset: 0"]
221#[derive(Clone, Copy, Debug, PartialEq)]
222pub enum RR5_A {
223 #[doc = "0: RR\\[5\\]
224register is not enabled, or are already requesting reload"]
225 DISABLED_OR_REQUESTED = 0,
226 #[doc = "1: RR\\[5\\]
227register is enabled, and are not yet requesting reload"]
228 ENABLED_AND_UNREQUESTED = 1,
229}
230impl From<RR5_A> for bool {
231 #[inline(always)]
232 fn from(variant: RR5_A) -> Self {
233 variant as u8 != 0
234 }
235}
236impl RR5_R {
237 #[doc = "Get enumerated values variant"]
238 #[inline(always)]
239 pub fn variant(&self) -> RR5_A {
240 match self.bits {
241 false => RR5_A::DISABLED_OR_REQUESTED,
242 true => RR5_A::ENABLED_AND_UNREQUESTED,
243 }
244 }
245 #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"]
246 #[inline(always)]
247 pub fn is_disabled_or_requested(&self) -> bool {
248 *self == RR5_A::DISABLED_OR_REQUESTED
249 }
250 #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"]
251 #[inline(always)]
252 pub fn is_enabled_and_unrequested(&self) -> bool {
253 *self == RR5_A::ENABLED_AND_UNREQUESTED
254 }
255}
256#[doc = "Field `RR6` reader - Request status for RR\\[6\\]
257register"]
258pub type RR6_R = crate::BitReader<RR6_A>;
259#[doc = "Request status for RR\\[6\\]
260register\n\nValue on reset: 0"]
261#[derive(Clone, Copy, Debug, PartialEq)]
262pub enum RR6_A {
263 #[doc = "0: RR\\[6\\]
264register is not enabled, or are already requesting reload"]
265 DISABLED_OR_REQUESTED = 0,
266 #[doc = "1: RR\\[6\\]
267register is enabled, and are not yet requesting reload"]
268 ENABLED_AND_UNREQUESTED = 1,
269}
270impl From<RR6_A> for bool {
271 #[inline(always)]
272 fn from(variant: RR6_A) -> Self {
273 variant as u8 != 0
274 }
275}
276impl RR6_R {
277 #[doc = "Get enumerated values variant"]
278 #[inline(always)]
279 pub fn variant(&self) -> RR6_A {
280 match self.bits {
281 false => RR6_A::DISABLED_OR_REQUESTED,
282 true => RR6_A::ENABLED_AND_UNREQUESTED,
283 }
284 }
285 #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"]
286 #[inline(always)]
287 pub fn is_disabled_or_requested(&self) -> bool {
288 *self == RR6_A::DISABLED_OR_REQUESTED
289 }
290 #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"]
291 #[inline(always)]
292 pub fn is_enabled_and_unrequested(&self) -> bool {
293 *self == RR6_A::ENABLED_AND_UNREQUESTED
294 }
295}
296#[doc = "Field `RR7` reader - Request status for RR\\[7\\]
297register"]
298pub type RR7_R = crate::BitReader<RR7_A>;
299#[doc = "Request status for RR\\[7\\]
300register\n\nValue on reset: 0"]
301#[derive(Clone, Copy, Debug, PartialEq)]
302pub enum RR7_A {
303 #[doc = "0: RR\\[7\\]
304register is not enabled, or are already requesting reload"]
305 DISABLED_OR_REQUESTED = 0,
306 #[doc = "1: RR\\[7\\]
307register is enabled, and are not yet requesting reload"]
308 ENABLED_AND_UNREQUESTED = 1,
309}
310impl From<RR7_A> for bool {
311 #[inline(always)]
312 fn from(variant: RR7_A) -> Self {
313 variant as u8 != 0
314 }
315}
316impl RR7_R {
317 #[doc = "Get enumerated values variant"]
318 #[inline(always)]
319 pub fn variant(&self) -> RR7_A {
320 match self.bits {
321 false => RR7_A::DISABLED_OR_REQUESTED,
322 true => RR7_A::ENABLED_AND_UNREQUESTED,
323 }
324 }
325 #[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"]
326 #[inline(always)]
327 pub fn is_disabled_or_requested(&self) -> bool {
328 *self == RR7_A::DISABLED_OR_REQUESTED
329 }
330 #[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"]
331 #[inline(always)]
332 pub fn is_enabled_and_unrequested(&self) -> bool {
333 *self == RR7_A::ENABLED_AND_UNREQUESTED
334 }
335}
336impl R {
337 #[doc = "Bit 0 - Request status for RR\\[0\\]
338register"]
339 #[inline(always)]
340 pub fn rr0(&self) -> RR0_R {
341 RR0_R::new((self.bits & 1) != 0)
342 }
343 #[doc = "Bit 1 - Request status for RR\\[1\\]
344register"]
345 #[inline(always)]
346 pub fn rr1(&self) -> RR1_R {
347 RR1_R::new(((self.bits >> 1) & 1) != 0)
348 }
349 #[doc = "Bit 2 - Request status for RR\\[2\\]
350register"]
351 #[inline(always)]
352 pub fn rr2(&self) -> RR2_R {
353 RR2_R::new(((self.bits >> 2) & 1) != 0)
354 }
355 #[doc = "Bit 3 - Request status for RR\\[3\\]
356register"]
357 #[inline(always)]
358 pub fn rr3(&self) -> RR3_R {
359 RR3_R::new(((self.bits >> 3) & 1) != 0)
360 }
361 #[doc = "Bit 4 - Request status for RR\\[4\\]
362register"]
363 #[inline(always)]
364 pub fn rr4(&self) -> RR4_R {
365 RR4_R::new(((self.bits >> 4) & 1) != 0)
366 }
367 #[doc = "Bit 5 - Request status for RR\\[5\\]
368register"]
369 #[inline(always)]
370 pub fn rr5(&self) -> RR5_R {
371 RR5_R::new(((self.bits >> 5) & 1) != 0)
372 }
373 #[doc = "Bit 6 - Request status for RR\\[6\\]
374register"]
375 #[inline(always)]
376 pub fn rr6(&self) -> RR6_R {
377 RR6_R::new(((self.bits >> 6) & 1) != 0)
378 }
379 #[doc = "Bit 7 - Request status for RR\\[7\\]
380register"]
381 #[inline(always)]
382 pub fn rr7(&self) -> RR7_R {
383 RR7_R::new(((self.bits >> 7) & 1) != 0)
384 }
385}
386#[doc = "Request status\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [reqstatus](index.html) module"]
387pub struct REQSTATUS_SPEC;
388impl crate::RegisterSpec for REQSTATUS_SPEC {
389 type Ux = u32;
390}
391#[doc = "`read()` method returns [reqstatus::R](R) reader structure"]
392impl crate::Readable for REQSTATUS_SPEC {
393 type Reader = R;
394}
395#[doc = "`reset()` method sets REQSTATUS to value 0x01"]
396impl crate::Resettable for REQSTATUS_SPEC {
397 #[inline(always)]
398 fn reset_value() -> Self::Ux {
399 0x01
400 }
401}