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