nrf9160_pac/ipc_ns/
intpend.rs

1#[doc = "Register `INTPEND` reader"]
2pub struct R(crate::R<INTPEND_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<INTPEND_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<INTPEND_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<INTPEND_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `RECEIVE0` reader - Read pending status of interrupt for event RECEIVE\\[0\\]"]
17pub type RECEIVE0_R = crate::BitReader<RECEIVE0_A>;
18#[doc = "Read pending status of interrupt for event RECEIVE\\[0\\]\n\nValue on reset: 0"]
19#[derive(Clone, Copy, Debug, PartialEq)]
20pub enum RECEIVE0_A {
21    #[doc = "0: Read: Not pending"]
22    NOT_PENDING = 0,
23    #[doc = "1: Read: Pending"]
24    PENDING = 1,
25}
26impl From<RECEIVE0_A> for bool {
27    #[inline(always)]
28    fn from(variant: RECEIVE0_A) -> Self {
29        variant as u8 != 0
30    }
31}
32impl RECEIVE0_R {
33    #[doc = "Get enumerated values variant"]
34    #[inline(always)]
35    pub fn variant(&self) -> RECEIVE0_A {
36        match self.bits {
37            false => RECEIVE0_A::NOT_PENDING,
38            true => RECEIVE0_A::PENDING,
39        }
40    }
41    #[doc = "Checks if the value of the field is `NOT_PENDING`"]
42    #[inline(always)]
43    pub fn is_not_pending(&self) -> bool {
44        *self == RECEIVE0_A::NOT_PENDING
45    }
46    #[doc = "Checks if the value of the field is `PENDING`"]
47    #[inline(always)]
48    pub fn is_pending(&self) -> bool {
49        *self == RECEIVE0_A::PENDING
50    }
51}
52#[doc = "Field `RECEIVE1` reader - Read pending status of interrupt for event RECEIVE\\[1\\]"]
53pub type RECEIVE1_R = crate::BitReader<RECEIVE1_A>;
54#[doc = "Read pending status of interrupt for event RECEIVE\\[1\\]\n\nValue on reset: 0"]
55#[derive(Clone, Copy, Debug, PartialEq)]
56pub enum RECEIVE1_A {
57    #[doc = "0: Read: Not pending"]
58    NOT_PENDING = 0,
59    #[doc = "1: Read: Pending"]
60    PENDING = 1,
61}
62impl From<RECEIVE1_A> for bool {
63    #[inline(always)]
64    fn from(variant: RECEIVE1_A) -> Self {
65        variant as u8 != 0
66    }
67}
68impl RECEIVE1_R {
69    #[doc = "Get enumerated values variant"]
70    #[inline(always)]
71    pub fn variant(&self) -> RECEIVE1_A {
72        match self.bits {
73            false => RECEIVE1_A::NOT_PENDING,
74            true => RECEIVE1_A::PENDING,
75        }
76    }
77    #[doc = "Checks if the value of the field is `NOT_PENDING`"]
78    #[inline(always)]
79    pub fn is_not_pending(&self) -> bool {
80        *self == RECEIVE1_A::NOT_PENDING
81    }
82    #[doc = "Checks if the value of the field is `PENDING`"]
83    #[inline(always)]
84    pub fn is_pending(&self) -> bool {
85        *self == RECEIVE1_A::PENDING
86    }
87}
88#[doc = "Field `RECEIVE2` reader - Read pending status of interrupt for event RECEIVE\\[2\\]"]
89pub type RECEIVE2_R = crate::BitReader<RECEIVE2_A>;
90#[doc = "Read pending status of interrupt for event RECEIVE\\[2\\]\n\nValue on reset: 0"]
91#[derive(Clone, Copy, Debug, PartialEq)]
92pub enum RECEIVE2_A {
93    #[doc = "0: Read: Not pending"]
94    NOT_PENDING = 0,
95    #[doc = "1: Read: Pending"]
96    PENDING = 1,
97}
98impl From<RECEIVE2_A> for bool {
99    #[inline(always)]
100    fn from(variant: RECEIVE2_A) -> Self {
101        variant as u8 != 0
102    }
103}
104impl RECEIVE2_R {
105    #[doc = "Get enumerated values variant"]
106    #[inline(always)]
107    pub fn variant(&self) -> RECEIVE2_A {
108        match self.bits {
109            false => RECEIVE2_A::NOT_PENDING,
110            true => RECEIVE2_A::PENDING,
111        }
112    }
113    #[doc = "Checks if the value of the field is `NOT_PENDING`"]
114    #[inline(always)]
115    pub fn is_not_pending(&self) -> bool {
116        *self == RECEIVE2_A::NOT_PENDING
117    }
118    #[doc = "Checks if the value of the field is `PENDING`"]
119    #[inline(always)]
120    pub fn is_pending(&self) -> bool {
121        *self == RECEIVE2_A::PENDING
122    }
123}
124#[doc = "Field `RECEIVE3` reader - Read pending status of interrupt for event RECEIVE\\[3\\]"]
125pub type RECEIVE3_R = crate::BitReader<RECEIVE3_A>;
126#[doc = "Read pending status of interrupt for event RECEIVE\\[3\\]\n\nValue on reset: 0"]
127#[derive(Clone, Copy, Debug, PartialEq)]
128pub enum RECEIVE3_A {
129    #[doc = "0: Read: Not pending"]
130    NOT_PENDING = 0,
131    #[doc = "1: Read: Pending"]
132    PENDING = 1,
133}
134impl From<RECEIVE3_A> for bool {
135    #[inline(always)]
136    fn from(variant: RECEIVE3_A) -> Self {
137        variant as u8 != 0
138    }
139}
140impl RECEIVE3_R {
141    #[doc = "Get enumerated values variant"]
142    #[inline(always)]
143    pub fn variant(&self) -> RECEIVE3_A {
144        match self.bits {
145            false => RECEIVE3_A::NOT_PENDING,
146            true => RECEIVE3_A::PENDING,
147        }
148    }
149    #[doc = "Checks if the value of the field is `NOT_PENDING`"]
150    #[inline(always)]
151    pub fn is_not_pending(&self) -> bool {
152        *self == RECEIVE3_A::NOT_PENDING
153    }
154    #[doc = "Checks if the value of the field is `PENDING`"]
155    #[inline(always)]
156    pub fn is_pending(&self) -> bool {
157        *self == RECEIVE3_A::PENDING
158    }
159}
160#[doc = "Field `RECEIVE4` reader - Read pending status of interrupt for event RECEIVE\\[4\\]"]
161pub type RECEIVE4_R = crate::BitReader<RECEIVE4_A>;
162#[doc = "Read pending status of interrupt for event RECEIVE\\[4\\]\n\nValue on reset: 0"]
163#[derive(Clone, Copy, Debug, PartialEq)]
164pub enum RECEIVE4_A {
165    #[doc = "0: Read: Not pending"]
166    NOT_PENDING = 0,
167    #[doc = "1: Read: Pending"]
168    PENDING = 1,
169}
170impl From<RECEIVE4_A> for bool {
171    #[inline(always)]
172    fn from(variant: RECEIVE4_A) -> Self {
173        variant as u8 != 0
174    }
175}
176impl RECEIVE4_R {
177    #[doc = "Get enumerated values variant"]
178    #[inline(always)]
179    pub fn variant(&self) -> RECEIVE4_A {
180        match self.bits {
181            false => RECEIVE4_A::NOT_PENDING,
182            true => RECEIVE4_A::PENDING,
183        }
184    }
185    #[doc = "Checks if the value of the field is `NOT_PENDING`"]
186    #[inline(always)]
187    pub fn is_not_pending(&self) -> bool {
188        *self == RECEIVE4_A::NOT_PENDING
189    }
190    #[doc = "Checks if the value of the field is `PENDING`"]
191    #[inline(always)]
192    pub fn is_pending(&self) -> bool {
193        *self == RECEIVE4_A::PENDING
194    }
195}
196#[doc = "Field `RECEIVE5` reader - Read pending status of interrupt for event RECEIVE\\[5\\]"]
197pub type RECEIVE5_R = crate::BitReader<RECEIVE5_A>;
198#[doc = "Read pending status of interrupt for event RECEIVE\\[5\\]\n\nValue on reset: 0"]
199#[derive(Clone, Copy, Debug, PartialEq)]
200pub enum RECEIVE5_A {
201    #[doc = "0: Read: Not pending"]
202    NOT_PENDING = 0,
203    #[doc = "1: Read: Pending"]
204    PENDING = 1,
205}
206impl From<RECEIVE5_A> for bool {
207    #[inline(always)]
208    fn from(variant: RECEIVE5_A) -> Self {
209        variant as u8 != 0
210    }
211}
212impl RECEIVE5_R {
213    #[doc = "Get enumerated values variant"]
214    #[inline(always)]
215    pub fn variant(&self) -> RECEIVE5_A {
216        match self.bits {
217            false => RECEIVE5_A::NOT_PENDING,
218            true => RECEIVE5_A::PENDING,
219        }
220    }
221    #[doc = "Checks if the value of the field is `NOT_PENDING`"]
222    #[inline(always)]
223    pub fn is_not_pending(&self) -> bool {
224        *self == RECEIVE5_A::NOT_PENDING
225    }
226    #[doc = "Checks if the value of the field is `PENDING`"]
227    #[inline(always)]
228    pub fn is_pending(&self) -> bool {
229        *self == RECEIVE5_A::PENDING
230    }
231}
232#[doc = "Field `RECEIVE6` reader - Read pending status of interrupt for event RECEIVE\\[6\\]"]
233pub type RECEIVE6_R = crate::BitReader<RECEIVE6_A>;
234#[doc = "Read pending status of interrupt for event RECEIVE\\[6\\]\n\nValue on reset: 0"]
235#[derive(Clone, Copy, Debug, PartialEq)]
236pub enum RECEIVE6_A {
237    #[doc = "0: Read: Not pending"]
238    NOT_PENDING = 0,
239    #[doc = "1: Read: Pending"]
240    PENDING = 1,
241}
242impl From<RECEIVE6_A> for bool {
243    #[inline(always)]
244    fn from(variant: RECEIVE6_A) -> Self {
245        variant as u8 != 0
246    }
247}
248impl RECEIVE6_R {
249    #[doc = "Get enumerated values variant"]
250    #[inline(always)]
251    pub fn variant(&self) -> RECEIVE6_A {
252        match self.bits {
253            false => RECEIVE6_A::NOT_PENDING,
254            true => RECEIVE6_A::PENDING,
255        }
256    }
257    #[doc = "Checks if the value of the field is `NOT_PENDING`"]
258    #[inline(always)]
259    pub fn is_not_pending(&self) -> bool {
260        *self == RECEIVE6_A::NOT_PENDING
261    }
262    #[doc = "Checks if the value of the field is `PENDING`"]
263    #[inline(always)]
264    pub fn is_pending(&self) -> bool {
265        *self == RECEIVE6_A::PENDING
266    }
267}
268#[doc = "Field `RECEIVE7` reader - Read pending status of interrupt for event RECEIVE\\[7\\]"]
269pub type RECEIVE7_R = crate::BitReader<RECEIVE7_A>;
270#[doc = "Read pending status of interrupt for event RECEIVE\\[7\\]\n\nValue on reset: 0"]
271#[derive(Clone, Copy, Debug, PartialEq)]
272pub enum RECEIVE7_A {
273    #[doc = "0: Read: Not pending"]
274    NOT_PENDING = 0,
275    #[doc = "1: Read: Pending"]
276    PENDING = 1,
277}
278impl From<RECEIVE7_A> for bool {
279    #[inline(always)]
280    fn from(variant: RECEIVE7_A) -> Self {
281        variant as u8 != 0
282    }
283}
284impl RECEIVE7_R {
285    #[doc = "Get enumerated values variant"]
286    #[inline(always)]
287    pub fn variant(&self) -> RECEIVE7_A {
288        match self.bits {
289            false => RECEIVE7_A::NOT_PENDING,
290            true => RECEIVE7_A::PENDING,
291        }
292    }
293    #[doc = "Checks if the value of the field is `NOT_PENDING`"]
294    #[inline(always)]
295    pub fn is_not_pending(&self) -> bool {
296        *self == RECEIVE7_A::NOT_PENDING
297    }
298    #[doc = "Checks if the value of the field is `PENDING`"]
299    #[inline(always)]
300    pub fn is_pending(&self) -> bool {
301        *self == RECEIVE7_A::PENDING
302    }
303}
304impl R {
305    #[doc = "Bit 0 - Read pending status of interrupt for event RECEIVE\\[0\\]"]
306    #[inline(always)]
307    pub fn receive0(&self) -> RECEIVE0_R {
308        RECEIVE0_R::new((self.bits & 1) != 0)
309    }
310    #[doc = "Bit 1 - Read pending status of interrupt for event RECEIVE\\[1\\]"]
311    #[inline(always)]
312    pub fn receive1(&self) -> RECEIVE1_R {
313        RECEIVE1_R::new(((self.bits >> 1) & 1) != 0)
314    }
315    #[doc = "Bit 2 - Read pending status of interrupt for event RECEIVE\\[2\\]"]
316    #[inline(always)]
317    pub fn receive2(&self) -> RECEIVE2_R {
318        RECEIVE2_R::new(((self.bits >> 2) & 1) != 0)
319    }
320    #[doc = "Bit 3 - Read pending status of interrupt for event RECEIVE\\[3\\]"]
321    #[inline(always)]
322    pub fn receive3(&self) -> RECEIVE3_R {
323        RECEIVE3_R::new(((self.bits >> 3) & 1) != 0)
324    }
325    #[doc = "Bit 4 - Read pending status of interrupt for event RECEIVE\\[4\\]"]
326    #[inline(always)]
327    pub fn receive4(&self) -> RECEIVE4_R {
328        RECEIVE4_R::new(((self.bits >> 4) & 1) != 0)
329    }
330    #[doc = "Bit 5 - Read pending status of interrupt for event RECEIVE\\[5\\]"]
331    #[inline(always)]
332    pub fn receive5(&self) -> RECEIVE5_R {
333        RECEIVE5_R::new(((self.bits >> 5) & 1) != 0)
334    }
335    #[doc = "Bit 6 - Read pending status of interrupt for event RECEIVE\\[6\\]"]
336    #[inline(always)]
337    pub fn receive6(&self) -> RECEIVE6_R {
338        RECEIVE6_R::new(((self.bits >> 6) & 1) != 0)
339    }
340    #[doc = "Bit 7 - Read pending status of interrupt for event RECEIVE\\[7\\]"]
341    #[inline(always)]
342    pub fn receive7(&self) -> RECEIVE7_R {
343        RECEIVE7_R::new(((self.bits >> 7) & 1) != 0)
344    }
345}
346#[doc = "Pending interrupts\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 [intpend](index.html) module"]
347pub struct INTPEND_SPEC;
348impl crate::RegisterSpec for INTPEND_SPEC {
349    type Ux = u32;
350}
351#[doc = "`read()` method returns [intpend::R](R) reader structure"]
352impl crate::Readable for INTPEND_SPEC {
353    type Reader = R;
354}
355#[doc = "`reset()` method sets INTPEND to value 0"]
356impl crate::Resettable for INTPEND_SPEC {
357    #[inline(always)]
358    fn reset_value() -> Self::Ux {
359        0
360    }
361}