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