1#[doc = "Register `DBGSTOPCR` reader"]
2pub struct R(crate::R<DBGSTOPCR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<DBGSTOPCR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<DBGSTOPCR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<DBGSTOPCR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `DBGSTOPCR` writer"]
17pub struct W(crate::W<DBGSTOPCR_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<DBGSTOPCR_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<DBGSTOPCR_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<DBGSTOPCR_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `DBGSTOP_IWDT` reader - Mask bit for IWDT reset/interrupt in the OCD run mode"]
38pub type DBGSTOP_IWDT_R = crate::BitReader<DBGSTOP_IWDT_A>;
39#[doc = "Mask bit for IWDT reset/interrupt in the OCD run mode\n\nValue on reset: 1"]
40#[derive(Clone, Copy, Debug, PartialEq, Eq)]
41pub enum DBGSTOP_IWDT_A {
42 #[doc = "0: Enable IWDT reset/interrupt"]
43 _0 = 0,
44 #[doc = "1: Mask IWDT reset/interrupt and stop IWDT counter"]
45 _1 = 1,
46}
47impl From<DBGSTOP_IWDT_A> for bool {
48 #[inline(always)]
49 fn from(variant: DBGSTOP_IWDT_A) -> Self {
50 variant as u8 != 0
51 }
52}
53impl DBGSTOP_IWDT_R {
54 #[doc = "Get enumerated values variant"]
55 #[inline(always)]
56 pub fn variant(&self) -> DBGSTOP_IWDT_A {
57 match self.bits {
58 false => DBGSTOP_IWDT_A::_0,
59 true => DBGSTOP_IWDT_A::_1,
60 }
61 }
62 #[doc = "Checks if the value of the field is `_0`"]
63 #[inline(always)]
64 pub fn is_0(&self) -> bool {
65 *self == DBGSTOP_IWDT_A::_0
66 }
67 #[doc = "Checks if the value of the field is `_1`"]
68 #[inline(always)]
69 pub fn is_1(&self) -> bool {
70 *self == DBGSTOP_IWDT_A::_1
71 }
72}
73#[doc = "Field `DBGSTOP_IWDT` writer - Mask bit for IWDT reset/interrupt in the OCD run mode"]
74pub type DBGSTOP_IWDT_W<'a, const O: u8> =
75 crate::BitWriter<'a, u32, DBGSTOPCR_SPEC, DBGSTOP_IWDT_A, O>;
76impl<'a, const O: u8> DBGSTOP_IWDT_W<'a, O> {
77 #[doc = "Enable IWDT reset/interrupt"]
78 #[inline(always)]
79 pub fn _0(self) -> &'a mut W {
80 self.variant(DBGSTOP_IWDT_A::_0)
81 }
82 #[doc = "Mask IWDT reset/interrupt and stop IWDT counter"]
83 #[inline(always)]
84 pub fn _1(self) -> &'a mut W {
85 self.variant(DBGSTOP_IWDT_A::_1)
86 }
87}
88#[doc = "Field `DBGSTOP_WDT` reader - Mask bit for WDT reset/interrupt in the OCD run mode"]
89pub type DBGSTOP_WDT_R = crate::BitReader<DBGSTOP_WDT_A>;
90#[doc = "Mask bit for WDT reset/interrupt in the OCD run mode\n\nValue on reset: 1"]
91#[derive(Clone, Copy, Debug, PartialEq, Eq)]
92pub enum DBGSTOP_WDT_A {
93 #[doc = "0: Enable WDT reset/interrupt"]
94 _0 = 0,
95 #[doc = "1: Mask WDT reset/interrupt and stop WDT counter"]
96 _1 = 1,
97}
98impl From<DBGSTOP_WDT_A> for bool {
99 #[inline(always)]
100 fn from(variant: DBGSTOP_WDT_A) -> Self {
101 variant as u8 != 0
102 }
103}
104impl DBGSTOP_WDT_R {
105 #[doc = "Get enumerated values variant"]
106 #[inline(always)]
107 pub fn variant(&self) -> DBGSTOP_WDT_A {
108 match self.bits {
109 false => DBGSTOP_WDT_A::_0,
110 true => DBGSTOP_WDT_A::_1,
111 }
112 }
113 #[doc = "Checks if the value of the field is `_0`"]
114 #[inline(always)]
115 pub fn is_0(&self) -> bool {
116 *self == DBGSTOP_WDT_A::_0
117 }
118 #[doc = "Checks if the value of the field is `_1`"]
119 #[inline(always)]
120 pub fn is_1(&self) -> bool {
121 *self == DBGSTOP_WDT_A::_1
122 }
123}
124#[doc = "Field `DBGSTOP_WDT` writer - Mask bit for WDT reset/interrupt in the OCD run mode"]
125pub type DBGSTOP_WDT_W<'a, const O: u8> =
126 crate::BitWriter<'a, u32, DBGSTOPCR_SPEC, DBGSTOP_WDT_A, O>;
127impl<'a, const O: u8> DBGSTOP_WDT_W<'a, O> {
128 #[doc = "Enable WDT reset/interrupt"]
129 #[inline(always)]
130 pub fn _0(self) -> &'a mut W {
131 self.variant(DBGSTOP_WDT_A::_0)
132 }
133 #[doc = "Mask WDT reset/interrupt and stop WDT counter"]
134 #[inline(always)]
135 pub fn _1(self) -> &'a mut W {
136 self.variant(DBGSTOP_WDT_A::_1)
137 }
138}
139#[doc = "Field `DBGSTOP_LVD0` reader - Mask bit for LVD0 reset"]
140pub type DBGSTOP_LVD0_R = crate::BitReader<DBGSTOP_LVD0_A>;
141#[doc = "Mask bit for LVD0 reset\n\nValue on reset: 0"]
142#[derive(Clone, Copy, Debug, PartialEq, Eq)]
143pub enum DBGSTOP_LVD0_A {
144 #[doc = "0: Enable LVD0 reset"]
145 _0 = 0,
146 #[doc = "1: Mask LVD0 reset"]
147 _1 = 1,
148}
149impl From<DBGSTOP_LVD0_A> for bool {
150 #[inline(always)]
151 fn from(variant: DBGSTOP_LVD0_A) -> Self {
152 variant as u8 != 0
153 }
154}
155impl DBGSTOP_LVD0_R {
156 #[doc = "Get enumerated values variant"]
157 #[inline(always)]
158 pub fn variant(&self) -> DBGSTOP_LVD0_A {
159 match self.bits {
160 false => DBGSTOP_LVD0_A::_0,
161 true => DBGSTOP_LVD0_A::_1,
162 }
163 }
164 #[doc = "Checks if the value of the field is `_0`"]
165 #[inline(always)]
166 pub fn is_0(&self) -> bool {
167 *self == DBGSTOP_LVD0_A::_0
168 }
169 #[doc = "Checks if the value of the field is `_1`"]
170 #[inline(always)]
171 pub fn is_1(&self) -> bool {
172 *self == DBGSTOP_LVD0_A::_1
173 }
174}
175#[doc = "Field `DBGSTOP_LVD0` writer - Mask bit for LVD0 reset"]
176pub type DBGSTOP_LVD0_W<'a, const O: u8> =
177 crate::BitWriter<'a, u32, DBGSTOPCR_SPEC, DBGSTOP_LVD0_A, O>;
178impl<'a, const O: u8> DBGSTOP_LVD0_W<'a, O> {
179 #[doc = "Enable LVD0 reset"]
180 #[inline(always)]
181 pub fn _0(self) -> &'a mut W {
182 self.variant(DBGSTOP_LVD0_A::_0)
183 }
184 #[doc = "Mask LVD0 reset"]
185 #[inline(always)]
186 pub fn _1(self) -> &'a mut W {
187 self.variant(DBGSTOP_LVD0_A::_1)
188 }
189}
190#[doc = "Field `DBGSTOP_LVD1` reader - Mask bit for LVD1 reset/interrupt"]
191pub type DBGSTOP_LVD1_R = crate::BitReader<DBGSTOP_LVD1_A>;
192#[doc = "Mask bit for LVD1 reset/interrupt\n\nValue on reset: 0"]
193#[derive(Clone, Copy, Debug, PartialEq, Eq)]
194pub enum DBGSTOP_LVD1_A {
195 #[doc = "0: Enable LVD1 reset/interrupt"]
196 _0 = 0,
197 #[doc = "1: Mask LVD1 reset/interrupt"]
198 _1 = 1,
199}
200impl From<DBGSTOP_LVD1_A> for bool {
201 #[inline(always)]
202 fn from(variant: DBGSTOP_LVD1_A) -> Self {
203 variant as u8 != 0
204 }
205}
206impl DBGSTOP_LVD1_R {
207 #[doc = "Get enumerated values variant"]
208 #[inline(always)]
209 pub fn variant(&self) -> DBGSTOP_LVD1_A {
210 match self.bits {
211 false => DBGSTOP_LVD1_A::_0,
212 true => DBGSTOP_LVD1_A::_1,
213 }
214 }
215 #[doc = "Checks if the value of the field is `_0`"]
216 #[inline(always)]
217 pub fn is_0(&self) -> bool {
218 *self == DBGSTOP_LVD1_A::_0
219 }
220 #[doc = "Checks if the value of the field is `_1`"]
221 #[inline(always)]
222 pub fn is_1(&self) -> bool {
223 *self == DBGSTOP_LVD1_A::_1
224 }
225}
226#[doc = "Field `DBGSTOP_LVD1` writer - Mask bit for LVD1 reset/interrupt"]
227pub type DBGSTOP_LVD1_W<'a, const O: u8> =
228 crate::BitWriter<'a, u32, DBGSTOPCR_SPEC, DBGSTOP_LVD1_A, O>;
229impl<'a, const O: u8> DBGSTOP_LVD1_W<'a, O> {
230 #[doc = "Enable LVD1 reset/interrupt"]
231 #[inline(always)]
232 pub fn _0(self) -> &'a mut W {
233 self.variant(DBGSTOP_LVD1_A::_0)
234 }
235 #[doc = "Mask LVD1 reset/interrupt"]
236 #[inline(always)]
237 pub fn _1(self) -> &'a mut W {
238 self.variant(DBGSTOP_LVD1_A::_1)
239 }
240}
241#[doc = "Field `DBGSTOP_LVD2` reader - Mask bit for LVD2 reset/interrupt"]
242pub type DBGSTOP_LVD2_R = crate::BitReader<DBGSTOP_LVD2_A>;
243#[doc = "Mask bit for LVD2 reset/interrupt\n\nValue on reset: 0"]
244#[derive(Clone, Copy, Debug, PartialEq, Eq)]
245pub enum DBGSTOP_LVD2_A {
246 #[doc = "0: Enable LVD2 reset/interrupt"]
247 _0 = 0,
248 #[doc = "1: Mask LVD2 reset/interrupt"]
249 _1 = 1,
250}
251impl From<DBGSTOP_LVD2_A> for bool {
252 #[inline(always)]
253 fn from(variant: DBGSTOP_LVD2_A) -> Self {
254 variant as u8 != 0
255 }
256}
257impl DBGSTOP_LVD2_R {
258 #[doc = "Get enumerated values variant"]
259 #[inline(always)]
260 pub fn variant(&self) -> DBGSTOP_LVD2_A {
261 match self.bits {
262 false => DBGSTOP_LVD2_A::_0,
263 true => DBGSTOP_LVD2_A::_1,
264 }
265 }
266 #[doc = "Checks if the value of the field is `_0`"]
267 #[inline(always)]
268 pub fn is_0(&self) -> bool {
269 *self == DBGSTOP_LVD2_A::_0
270 }
271 #[doc = "Checks if the value of the field is `_1`"]
272 #[inline(always)]
273 pub fn is_1(&self) -> bool {
274 *self == DBGSTOP_LVD2_A::_1
275 }
276}
277#[doc = "Field `DBGSTOP_LVD2` writer - Mask bit for LVD2 reset/interrupt"]
278pub type DBGSTOP_LVD2_W<'a, const O: u8> =
279 crate::BitWriter<'a, u32, DBGSTOPCR_SPEC, DBGSTOP_LVD2_A, O>;
280impl<'a, const O: u8> DBGSTOP_LVD2_W<'a, O> {
281 #[doc = "Enable LVD2 reset/interrupt"]
282 #[inline(always)]
283 pub fn _0(self) -> &'a mut W {
284 self.variant(DBGSTOP_LVD2_A::_0)
285 }
286 #[doc = "Mask LVD2 reset/interrupt"]
287 #[inline(always)]
288 pub fn _1(self) -> &'a mut W {
289 self.variant(DBGSTOP_LVD2_A::_1)
290 }
291}
292#[doc = "Field `DBGSTOP_RPER` reader - Mask bit for SRAM parity error reset/interrupt"]
293pub type DBGSTOP_RPER_R = crate::BitReader<DBGSTOP_RPER_A>;
294#[doc = "Mask bit for SRAM parity error reset/interrupt\n\nValue on reset: 0"]
295#[derive(Clone, Copy, Debug, PartialEq, Eq)]
296pub enum DBGSTOP_RPER_A {
297 #[doc = "0: Enable SRAM parity error reset/interrupt"]
298 _0 = 0,
299 #[doc = "1: Mask SRAM parity error reset/interrupt"]
300 _1 = 1,
301}
302impl From<DBGSTOP_RPER_A> for bool {
303 #[inline(always)]
304 fn from(variant: DBGSTOP_RPER_A) -> Self {
305 variant as u8 != 0
306 }
307}
308impl DBGSTOP_RPER_R {
309 #[doc = "Get enumerated values variant"]
310 #[inline(always)]
311 pub fn variant(&self) -> DBGSTOP_RPER_A {
312 match self.bits {
313 false => DBGSTOP_RPER_A::_0,
314 true => DBGSTOP_RPER_A::_1,
315 }
316 }
317 #[doc = "Checks if the value of the field is `_0`"]
318 #[inline(always)]
319 pub fn is_0(&self) -> bool {
320 *self == DBGSTOP_RPER_A::_0
321 }
322 #[doc = "Checks if the value of the field is `_1`"]
323 #[inline(always)]
324 pub fn is_1(&self) -> bool {
325 *self == DBGSTOP_RPER_A::_1
326 }
327}
328#[doc = "Field `DBGSTOP_RPER` writer - Mask bit for SRAM parity error reset/interrupt"]
329pub type DBGSTOP_RPER_W<'a, const O: u8> =
330 crate::BitWriter<'a, u32, DBGSTOPCR_SPEC, DBGSTOP_RPER_A, O>;
331impl<'a, const O: u8> DBGSTOP_RPER_W<'a, O> {
332 #[doc = "Enable SRAM parity error reset/interrupt"]
333 #[inline(always)]
334 pub fn _0(self) -> &'a mut W {
335 self.variant(DBGSTOP_RPER_A::_0)
336 }
337 #[doc = "Mask SRAM parity error reset/interrupt"]
338 #[inline(always)]
339 pub fn _1(self) -> &'a mut W {
340 self.variant(DBGSTOP_RPER_A::_1)
341 }
342}
343#[doc = "Field `DBGSTOP_RECCR` reader - Mask bit for SRAM ECC error reset/interrupt"]
344pub type DBGSTOP_RECCR_R = crate::BitReader<DBGSTOP_RECCR_A>;
345#[doc = "Mask bit for SRAM ECC error reset/interrupt\n\nValue on reset: 0"]
346#[derive(Clone, Copy, Debug, PartialEq, Eq)]
347pub enum DBGSTOP_RECCR_A {
348 #[doc = "0: Enable SRAM ECC error reset/interrupt"]
349 _0 = 0,
350 #[doc = "1: Mask SRAM ECC error reset/interrupt"]
351 _1 = 1,
352}
353impl From<DBGSTOP_RECCR_A> for bool {
354 #[inline(always)]
355 fn from(variant: DBGSTOP_RECCR_A) -> Self {
356 variant as u8 != 0
357 }
358}
359impl DBGSTOP_RECCR_R {
360 #[doc = "Get enumerated values variant"]
361 #[inline(always)]
362 pub fn variant(&self) -> DBGSTOP_RECCR_A {
363 match self.bits {
364 false => DBGSTOP_RECCR_A::_0,
365 true => DBGSTOP_RECCR_A::_1,
366 }
367 }
368 #[doc = "Checks if the value of the field is `_0`"]
369 #[inline(always)]
370 pub fn is_0(&self) -> bool {
371 *self == DBGSTOP_RECCR_A::_0
372 }
373 #[doc = "Checks if the value of the field is `_1`"]
374 #[inline(always)]
375 pub fn is_1(&self) -> bool {
376 *self == DBGSTOP_RECCR_A::_1
377 }
378}
379#[doc = "Field `DBGSTOP_RECCR` writer - Mask bit for SRAM ECC error reset/interrupt"]
380pub type DBGSTOP_RECCR_W<'a, const O: u8> =
381 crate::BitWriter<'a, u32, DBGSTOPCR_SPEC, DBGSTOP_RECCR_A, O>;
382impl<'a, const O: u8> DBGSTOP_RECCR_W<'a, O> {
383 #[doc = "Enable SRAM ECC error reset/interrupt"]
384 #[inline(always)]
385 pub fn _0(self) -> &'a mut W {
386 self.variant(DBGSTOP_RECCR_A::_0)
387 }
388 #[doc = "Mask SRAM ECC error reset/interrupt"]
389 #[inline(always)]
390 pub fn _1(self) -> &'a mut W {
391 self.variant(DBGSTOP_RECCR_A::_1)
392 }
393}
394impl R {
395 #[doc = "Bit 0 - Mask bit for IWDT reset/interrupt in the OCD run mode"]
396 #[inline(always)]
397 pub fn dbgstop_iwdt(&self) -> DBGSTOP_IWDT_R {
398 DBGSTOP_IWDT_R::new((self.bits & 1) != 0)
399 }
400 #[doc = "Bit 1 - Mask bit for WDT reset/interrupt in the OCD run mode"]
401 #[inline(always)]
402 pub fn dbgstop_wdt(&self) -> DBGSTOP_WDT_R {
403 DBGSTOP_WDT_R::new(((self.bits >> 1) & 1) != 0)
404 }
405 #[doc = "Bit 16 - Mask bit for LVD0 reset"]
406 #[inline(always)]
407 pub fn dbgstop_lvd0(&self) -> DBGSTOP_LVD0_R {
408 DBGSTOP_LVD0_R::new(((self.bits >> 16) & 1) != 0)
409 }
410 #[doc = "Bit 17 - Mask bit for LVD1 reset/interrupt"]
411 #[inline(always)]
412 pub fn dbgstop_lvd1(&self) -> DBGSTOP_LVD1_R {
413 DBGSTOP_LVD1_R::new(((self.bits >> 17) & 1) != 0)
414 }
415 #[doc = "Bit 18 - Mask bit for LVD2 reset/interrupt"]
416 #[inline(always)]
417 pub fn dbgstop_lvd2(&self) -> DBGSTOP_LVD2_R {
418 DBGSTOP_LVD2_R::new(((self.bits >> 18) & 1) != 0)
419 }
420 #[doc = "Bit 24 - Mask bit for SRAM parity error reset/interrupt"]
421 #[inline(always)]
422 pub fn dbgstop_rper(&self) -> DBGSTOP_RPER_R {
423 DBGSTOP_RPER_R::new(((self.bits >> 24) & 1) != 0)
424 }
425 #[doc = "Bit 25 - Mask bit for SRAM ECC error reset/interrupt"]
426 #[inline(always)]
427 pub fn dbgstop_reccr(&self) -> DBGSTOP_RECCR_R {
428 DBGSTOP_RECCR_R::new(((self.bits >> 25) & 1) != 0)
429 }
430}
431impl W {
432 #[doc = "Bit 0 - Mask bit for IWDT reset/interrupt in the OCD run mode"]
433 #[inline(always)]
434 #[must_use]
435 pub fn dbgstop_iwdt(&mut self) -> DBGSTOP_IWDT_W<0> {
436 DBGSTOP_IWDT_W::new(self)
437 }
438 #[doc = "Bit 1 - Mask bit for WDT reset/interrupt in the OCD run mode"]
439 #[inline(always)]
440 #[must_use]
441 pub fn dbgstop_wdt(&mut self) -> DBGSTOP_WDT_W<1> {
442 DBGSTOP_WDT_W::new(self)
443 }
444 #[doc = "Bit 16 - Mask bit for LVD0 reset"]
445 #[inline(always)]
446 #[must_use]
447 pub fn dbgstop_lvd0(&mut self) -> DBGSTOP_LVD0_W<16> {
448 DBGSTOP_LVD0_W::new(self)
449 }
450 #[doc = "Bit 17 - Mask bit for LVD1 reset/interrupt"]
451 #[inline(always)]
452 #[must_use]
453 pub fn dbgstop_lvd1(&mut self) -> DBGSTOP_LVD1_W<17> {
454 DBGSTOP_LVD1_W::new(self)
455 }
456 #[doc = "Bit 18 - Mask bit for LVD2 reset/interrupt"]
457 #[inline(always)]
458 #[must_use]
459 pub fn dbgstop_lvd2(&mut self) -> DBGSTOP_LVD2_W<18> {
460 DBGSTOP_LVD2_W::new(self)
461 }
462 #[doc = "Bit 24 - Mask bit for SRAM parity error reset/interrupt"]
463 #[inline(always)]
464 #[must_use]
465 pub fn dbgstop_rper(&mut self) -> DBGSTOP_RPER_W<24> {
466 DBGSTOP_RPER_W::new(self)
467 }
468 #[doc = "Bit 25 - Mask bit for SRAM ECC error reset/interrupt"]
469 #[inline(always)]
470 #[must_use]
471 pub fn dbgstop_reccr(&mut self) -> DBGSTOP_RECCR_W<25> {
472 DBGSTOP_RECCR_W::new(self)
473 }
474 #[doc = "Writes raw bits to the register."]
475 #[inline(always)]
476 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
477 self.0.bits(bits);
478 self
479 }
480}
481#[doc = "Debug Stop Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dbgstopcr](index.html) module"]
482pub struct DBGSTOPCR_SPEC;
483impl crate::RegisterSpec for DBGSTOPCR_SPEC {
484 type Ux = u32;
485}
486#[doc = "`read()` method returns [dbgstopcr::R](R) reader structure"]
487impl crate::Readable for DBGSTOPCR_SPEC {
488 type Reader = R;
489}
490#[doc = "`write(|w| ..)` method takes [dbgstopcr::W](W) writer structure"]
491impl crate::Writable for DBGSTOPCR_SPEC {
492 type Writer = W;
493 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
494 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
495}
496#[doc = "`reset()` method sets DBGSTOPCR to value 0x03"]
497impl crate::Resettable for DBGSTOPCR_SPEC {
498 const RESET_VALUE: Self::Ux = 0x03;
499}