nrf5340_app_pac/kmu_ns/
intpend.rs1#[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 `KEYSLOT_PUSHED` reader - Read pending status of interrupt for event KEYSLOT_PUSHED"]
17pub type KEYSLOT_PUSHED_R = crate::BitReader<KEYSLOT_PUSHED_A>;
18#[doc = "Read pending status of interrupt for event KEYSLOT_PUSHED\n\nValue on reset: 0"]
19#[derive(Clone, Copy, Debug, PartialEq)]
20pub enum KEYSLOT_PUSHED_A {
21 #[doc = "0: Read: Not pending"]
22 NOT_PENDING = 0,
23 #[doc = "1: Read: Pending"]
24 PENDING = 1,
25}
26impl From<KEYSLOT_PUSHED_A> for bool {
27 #[inline(always)]
28 fn from(variant: KEYSLOT_PUSHED_A) -> Self {
29 variant as u8 != 0
30 }
31}
32impl KEYSLOT_PUSHED_R {
33 #[doc = "Get enumerated values variant"]
34 #[inline(always)]
35 pub fn variant(&self) -> KEYSLOT_PUSHED_A {
36 match self.bits {
37 false => KEYSLOT_PUSHED_A::NOT_PENDING,
38 true => KEYSLOT_PUSHED_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 == KEYSLOT_PUSHED_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 == KEYSLOT_PUSHED_A::PENDING
50 }
51}
52#[doc = "Field `KEYSLOT_REVOKED` reader - Read pending status of interrupt for event KEYSLOT_REVOKED"]
53pub type KEYSLOT_REVOKED_R = crate::BitReader<KEYSLOT_REVOKED_A>;
54#[doc = "Read pending status of interrupt for event KEYSLOT_REVOKED\n\nValue on reset: 0"]
55#[derive(Clone, Copy, Debug, PartialEq)]
56pub enum KEYSLOT_REVOKED_A {
57 #[doc = "0: Read: Not pending"]
58 NOT_PENDING = 0,
59 #[doc = "1: Read: Pending"]
60 PENDING = 1,
61}
62impl From<KEYSLOT_REVOKED_A> for bool {
63 #[inline(always)]
64 fn from(variant: KEYSLOT_REVOKED_A) -> Self {
65 variant as u8 != 0
66 }
67}
68impl KEYSLOT_REVOKED_R {
69 #[doc = "Get enumerated values variant"]
70 #[inline(always)]
71 pub fn variant(&self) -> KEYSLOT_REVOKED_A {
72 match self.bits {
73 false => KEYSLOT_REVOKED_A::NOT_PENDING,
74 true => KEYSLOT_REVOKED_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 == KEYSLOT_REVOKED_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 == KEYSLOT_REVOKED_A::PENDING
86 }
87}
88#[doc = "Field `KEYSLOT_ERROR` reader - Read pending status of interrupt for event KEYSLOT_ERROR"]
89pub type KEYSLOT_ERROR_R = crate::BitReader<KEYSLOT_ERROR_A>;
90#[doc = "Read pending status of interrupt for event KEYSLOT_ERROR\n\nValue on reset: 0"]
91#[derive(Clone, Copy, Debug, PartialEq)]
92pub enum KEYSLOT_ERROR_A {
93 #[doc = "0: Read: Not pending"]
94 NOT_PENDING = 0,
95 #[doc = "1: Read: Pending"]
96 PENDING = 1,
97}
98impl From<KEYSLOT_ERROR_A> for bool {
99 #[inline(always)]
100 fn from(variant: KEYSLOT_ERROR_A) -> Self {
101 variant as u8 != 0
102 }
103}
104impl KEYSLOT_ERROR_R {
105 #[doc = "Get enumerated values variant"]
106 #[inline(always)]
107 pub fn variant(&self) -> KEYSLOT_ERROR_A {
108 match self.bits {
109 false => KEYSLOT_ERROR_A::NOT_PENDING,
110 true => KEYSLOT_ERROR_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 == KEYSLOT_ERROR_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 == KEYSLOT_ERROR_A::PENDING
122 }
123}
124impl R {
125 #[doc = "Bit 0 - Read pending status of interrupt for event KEYSLOT_PUSHED"]
126 #[inline(always)]
127 pub fn keyslot_pushed(&self) -> KEYSLOT_PUSHED_R {
128 KEYSLOT_PUSHED_R::new((self.bits & 1) != 0)
129 }
130 #[doc = "Bit 1 - Read pending status of interrupt for event KEYSLOT_REVOKED"]
131 #[inline(always)]
132 pub fn keyslot_revoked(&self) -> KEYSLOT_REVOKED_R {
133 KEYSLOT_REVOKED_R::new(((self.bits >> 1) & 1) != 0)
134 }
135 #[doc = "Bit 2 - Read pending status of interrupt for event KEYSLOT_ERROR"]
136 #[inline(always)]
137 pub fn keyslot_error(&self) -> KEYSLOT_ERROR_R {
138 KEYSLOT_ERROR_R::new(((self.bits >> 2) & 1) != 0)
139 }
140}
141#[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"]
142pub struct INTPEND_SPEC;
143impl crate::RegisterSpec for INTPEND_SPEC {
144 type Ux = u32;
145}
146#[doc = "`read()` method returns [intpend::R](R) reader structure"]
147impl crate::Readable for INTPEND_SPEC {
148 type Reader = R;
149}
150#[doc = "`reset()` method sets INTPEND to value 0"]
151impl crate::Resettable for INTPEND_SPEC {
152 #[inline(always)]
153 fn reset_value() -> Self::Ux {
154 0
155 }
156}