1#[doc = "Register `CC_SOCU_PIN` reader"]
2pub struct R(crate::R<CC_SOCU_PIN_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<CC_SOCU_PIN_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<CC_SOCU_PIN_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<CC_SOCU_PIN_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `CC_SOCU_PIN` writer"]
17pub struct W(crate::W<CC_SOCU_PIN_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<CC_SOCU_PIN_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<CC_SOCU_PIN_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<CC_SOCU_PIN_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Non Secure non-invasive debug enable\n\nValue on reset: 0"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39pub enum NIDEN_A {
40 #[doc = "0: Use DAP to enable"]
41 VALUE_0 = 0,
42 #[doc = "1: Fixed state"]
43 VALUE_1 = 1,
44}
45impl From<NIDEN_A> for bool {
46 #[inline(always)]
47 fn from(variant: NIDEN_A) -> Self {
48 variant as u8 != 0
49 }
50}
51#[doc = "Field `NIDEN` reader - Non Secure non-invasive debug enable"]
52pub struct NIDEN_R(crate::FieldReader<bool, NIDEN_A>);
53impl NIDEN_R {
54 #[inline(always)]
55 pub(crate) fn new(bits: bool) -> Self {
56 NIDEN_R(crate::FieldReader::new(bits))
57 }
58 #[doc = r"Get enumerated values variant"]
59 #[inline(always)]
60 pub fn variant(&self) -> NIDEN_A {
61 match self.bits {
62 false => NIDEN_A::VALUE_0,
63 true => NIDEN_A::VALUE_1,
64 }
65 }
66 #[doc = "Checks if the value of the field is `VALUE_0`"]
67 #[inline(always)]
68 pub fn is_value_0(&self) -> bool {
69 **self == NIDEN_A::VALUE_0
70 }
71 #[doc = "Checks if the value of the field is `VALUE_1`"]
72 #[inline(always)]
73 pub fn is_value_1(&self) -> bool {
74 **self == NIDEN_A::VALUE_1
75 }
76}
77impl core::ops::Deref for NIDEN_R {
78 type Target = crate::FieldReader<bool, NIDEN_A>;
79 #[inline(always)]
80 fn deref(&self) -> &Self::Target {
81 &self.0
82 }
83}
84#[doc = "Field `NIDEN` writer - Non Secure non-invasive debug enable"]
85pub struct NIDEN_W<'a> {
86 w: &'a mut W,
87}
88impl<'a> NIDEN_W<'a> {
89 #[doc = r"Writes `variant` to the field"]
90 #[inline(always)]
91 pub fn variant(self, variant: NIDEN_A) -> &'a mut W {
92 self.bit(variant.into())
93 }
94 #[doc = "Use DAP to enable"]
95 #[inline(always)]
96 pub fn value_0(self) -> &'a mut W {
97 self.variant(NIDEN_A::VALUE_0)
98 }
99 #[doc = "Fixed state"]
100 #[inline(always)]
101 pub fn value_1(self) -> &'a mut W {
102 self.variant(NIDEN_A::VALUE_1)
103 }
104 #[doc = r"Sets the field bit"]
105 #[inline(always)]
106 pub fn set_bit(self) -> &'a mut W {
107 self.bit(true)
108 }
109 #[doc = r"Clears the field bit"]
110 #[inline(always)]
111 pub fn clear_bit(self) -> &'a mut W {
112 self.bit(false)
113 }
114 #[doc = r"Writes raw bits to the field"]
115 #[inline(always)]
116 pub fn bit(self, value: bool) -> &'a mut W {
117 self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
118 self.w
119 }
120}
121#[doc = "Non Secure debug enable\n\nValue on reset: 0"]
122#[derive(Clone, Copy, Debug, PartialEq)]
123pub enum DBGEN_A {
124 #[doc = "0: Use DAP to enable"]
125 VALUE_0 = 0,
126 #[doc = "1: Fixed state"]
127 VALUE_1 = 1,
128}
129impl From<DBGEN_A> for bool {
130 #[inline(always)]
131 fn from(variant: DBGEN_A) -> Self {
132 variant as u8 != 0
133 }
134}
135#[doc = "Field `DBGEN` reader - Non Secure debug enable"]
136pub struct DBGEN_R(crate::FieldReader<bool, DBGEN_A>);
137impl DBGEN_R {
138 #[inline(always)]
139 pub(crate) fn new(bits: bool) -> Self {
140 DBGEN_R(crate::FieldReader::new(bits))
141 }
142 #[doc = r"Get enumerated values variant"]
143 #[inline(always)]
144 pub fn variant(&self) -> DBGEN_A {
145 match self.bits {
146 false => DBGEN_A::VALUE_0,
147 true => DBGEN_A::VALUE_1,
148 }
149 }
150 #[doc = "Checks if the value of the field is `VALUE_0`"]
151 #[inline(always)]
152 pub fn is_value_0(&self) -> bool {
153 **self == DBGEN_A::VALUE_0
154 }
155 #[doc = "Checks if the value of the field is `VALUE_1`"]
156 #[inline(always)]
157 pub fn is_value_1(&self) -> bool {
158 **self == DBGEN_A::VALUE_1
159 }
160}
161impl core::ops::Deref for DBGEN_R {
162 type Target = crate::FieldReader<bool, DBGEN_A>;
163 #[inline(always)]
164 fn deref(&self) -> &Self::Target {
165 &self.0
166 }
167}
168#[doc = "Field `DBGEN` writer - Non Secure debug enable"]
169pub struct DBGEN_W<'a> {
170 w: &'a mut W,
171}
172impl<'a> DBGEN_W<'a> {
173 #[doc = r"Writes `variant` to the field"]
174 #[inline(always)]
175 pub fn variant(self, variant: DBGEN_A) -> &'a mut W {
176 self.bit(variant.into())
177 }
178 #[doc = "Use DAP to enable"]
179 #[inline(always)]
180 pub fn value_0(self) -> &'a mut W {
181 self.variant(DBGEN_A::VALUE_0)
182 }
183 #[doc = "Fixed state"]
184 #[inline(always)]
185 pub fn value_1(self) -> &'a mut W {
186 self.variant(DBGEN_A::VALUE_1)
187 }
188 #[doc = r"Sets the field bit"]
189 #[inline(always)]
190 pub fn set_bit(self) -> &'a mut W {
191 self.bit(true)
192 }
193 #[doc = r"Clears the field bit"]
194 #[inline(always)]
195 pub fn clear_bit(self) -> &'a mut W {
196 self.bit(false)
197 }
198 #[doc = r"Writes raw bits to the field"]
199 #[inline(always)]
200 pub fn bit(self, value: bool) -> &'a mut W {
201 self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
202 self.w
203 }
204}
205#[doc = "Secure non-invasive debug enable\n\nValue on reset: 0"]
206#[derive(Clone, Copy, Debug, PartialEq)]
207pub enum SPNIDEN_A {
208 #[doc = "0: Use DAP to enable"]
209 VALUE_0 = 0,
210 #[doc = "1: Fixed state"]
211 VALUE_1 = 1,
212}
213impl From<SPNIDEN_A> for bool {
214 #[inline(always)]
215 fn from(variant: SPNIDEN_A) -> Self {
216 variant as u8 != 0
217 }
218}
219#[doc = "Field `SPNIDEN` reader - Secure non-invasive debug enable"]
220pub struct SPNIDEN_R(crate::FieldReader<bool, SPNIDEN_A>);
221impl SPNIDEN_R {
222 #[inline(always)]
223 pub(crate) fn new(bits: bool) -> Self {
224 SPNIDEN_R(crate::FieldReader::new(bits))
225 }
226 #[doc = r"Get enumerated values variant"]
227 #[inline(always)]
228 pub fn variant(&self) -> SPNIDEN_A {
229 match self.bits {
230 false => SPNIDEN_A::VALUE_0,
231 true => SPNIDEN_A::VALUE_1,
232 }
233 }
234 #[doc = "Checks if the value of the field is `VALUE_0`"]
235 #[inline(always)]
236 pub fn is_value_0(&self) -> bool {
237 **self == SPNIDEN_A::VALUE_0
238 }
239 #[doc = "Checks if the value of the field is `VALUE_1`"]
240 #[inline(always)]
241 pub fn is_value_1(&self) -> bool {
242 **self == SPNIDEN_A::VALUE_1
243 }
244}
245impl core::ops::Deref for SPNIDEN_R {
246 type Target = crate::FieldReader<bool, SPNIDEN_A>;
247 #[inline(always)]
248 fn deref(&self) -> &Self::Target {
249 &self.0
250 }
251}
252#[doc = "Field `SPNIDEN` writer - Secure non-invasive debug enable"]
253pub struct SPNIDEN_W<'a> {
254 w: &'a mut W,
255}
256impl<'a> SPNIDEN_W<'a> {
257 #[doc = r"Writes `variant` to the field"]
258 #[inline(always)]
259 pub fn variant(self, variant: SPNIDEN_A) -> &'a mut W {
260 self.bit(variant.into())
261 }
262 #[doc = "Use DAP to enable"]
263 #[inline(always)]
264 pub fn value_0(self) -> &'a mut W {
265 self.variant(SPNIDEN_A::VALUE_0)
266 }
267 #[doc = "Fixed state"]
268 #[inline(always)]
269 pub fn value_1(self) -> &'a mut W {
270 self.variant(SPNIDEN_A::VALUE_1)
271 }
272 #[doc = r"Sets the field bit"]
273 #[inline(always)]
274 pub fn set_bit(self) -> &'a mut W {
275 self.bit(true)
276 }
277 #[doc = r"Clears the field bit"]
278 #[inline(always)]
279 pub fn clear_bit(self) -> &'a mut W {
280 self.bit(false)
281 }
282 #[doc = r"Writes raw bits to the field"]
283 #[inline(always)]
284 pub fn bit(self, value: bool) -> &'a mut W {
285 self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
286 self.w
287 }
288}
289#[doc = "Secure invasive debug enable\n\nValue on reset: 0"]
290#[derive(Clone, Copy, Debug, PartialEq)]
291pub enum SPIDEN_A {
292 #[doc = "0: Use DAP to enable"]
293 VALUE_0 = 0,
294 #[doc = "1: Fixed state"]
295 VALUE_1 = 1,
296}
297impl From<SPIDEN_A> for bool {
298 #[inline(always)]
299 fn from(variant: SPIDEN_A) -> Self {
300 variant as u8 != 0
301 }
302}
303#[doc = "Field `SPIDEN` reader - Secure invasive debug enable"]
304pub struct SPIDEN_R(crate::FieldReader<bool, SPIDEN_A>);
305impl SPIDEN_R {
306 #[inline(always)]
307 pub(crate) fn new(bits: bool) -> Self {
308 SPIDEN_R(crate::FieldReader::new(bits))
309 }
310 #[doc = r"Get enumerated values variant"]
311 #[inline(always)]
312 pub fn variant(&self) -> SPIDEN_A {
313 match self.bits {
314 false => SPIDEN_A::VALUE_0,
315 true => SPIDEN_A::VALUE_1,
316 }
317 }
318 #[doc = "Checks if the value of the field is `VALUE_0`"]
319 #[inline(always)]
320 pub fn is_value_0(&self) -> bool {
321 **self == SPIDEN_A::VALUE_0
322 }
323 #[doc = "Checks if the value of the field is `VALUE_1`"]
324 #[inline(always)]
325 pub fn is_value_1(&self) -> bool {
326 **self == SPIDEN_A::VALUE_1
327 }
328}
329impl core::ops::Deref for SPIDEN_R {
330 type Target = crate::FieldReader<bool, SPIDEN_A>;
331 #[inline(always)]
332 fn deref(&self) -> &Self::Target {
333 &self.0
334 }
335}
336#[doc = "Field `SPIDEN` writer - Secure invasive debug enable"]
337pub struct SPIDEN_W<'a> {
338 w: &'a mut W,
339}
340impl<'a> SPIDEN_W<'a> {
341 #[doc = r"Writes `variant` to the field"]
342 #[inline(always)]
343 pub fn variant(self, variant: SPIDEN_A) -> &'a mut W {
344 self.bit(variant.into())
345 }
346 #[doc = "Use DAP to enable"]
347 #[inline(always)]
348 pub fn value_0(self) -> &'a mut W {
349 self.variant(SPIDEN_A::VALUE_0)
350 }
351 #[doc = "Fixed state"]
352 #[inline(always)]
353 pub fn value_1(self) -> &'a mut W {
354 self.variant(SPIDEN_A::VALUE_1)
355 }
356 #[doc = r"Sets the field bit"]
357 #[inline(always)]
358 pub fn set_bit(self) -> &'a mut W {
359 self.bit(true)
360 }
361 #[doc = r"Clears the field bit"]
362 #[inline(always)]
363 pub fn clear_bit(self) -> &'a mut W {
364 self.bit(false)
365 }
366 #[doc = r"Writes raw bits to the field"]
367 #[inline(always)]
368 pub fn bit(self, value: bool) -> &'a mut W {
369 self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
370 self.w
371 }
372}
373#[doc = "JTAG TAP enable\n\nValue on reset: 0"]
374#[derive(Clone, Copy, Debug, PartialEq)]
375pub enum TAPEN_A {
376 #[doc = "0: Use DAP to enable"]
377 VALUE_0 = 0,
378 #[doc = "1: Fixed state"]
379 VALUE_1 = 1,
380}
381impl From<TAPEN_A> for bool {
382 #[inline(always)]
383 fn from(variant: TAPEN_A) -> Self {
384 variant as u8 != 0
385 }
386}
387#[doc = "Field `TAPEN` reader - JTAG TAP enable"]
388pub struct TAPEN_R(crate::FieldReader<bool, TAPEN_A>);
389impl TAPEN_R {
390 #[inline(always)]
391 pub(crate) fn new(bits: bool) -> Self {
392 TAPEN_R(crate::FieldReader::new(bits))
393 }
394 #[doc = r"Get enumerated values variant"]
395 #[inline(always)]
396 pub fn variant(&self) -> TAPEN_A {
397 match self.bits {
398 false => TAPEN_A::VALUE_0,
399 true => TAPEN_A::VALUE_1,
400 }
401 }
402 #[doc = "Checks if the value of the field is `VALUE_0`"]
403 #[inline(always)]
404 pub fn is_value_0(&self) -> bool {
405 **self == TAPEN_A::VALUE_0
406 }
407 #[doc = "Checks if the value of the field is `VALUE_1`"]
408 #[inline(always)]
409 pub fn is_value_1(&self) -> bool {
410 **self == TAPEN_A::VALUE_1
411 }
412}
413impl core::ops::Deref for TAPEN_R {
414 type Target = crate::FieldReader<bool, TAPEN_A>;
415 #[inline(always)]
416 fn deref(&self) -> &Self::Target {
417 &self.0
418 }
419}
420#[doc = "Field `TAPEN` writer - JTAG TAP enable"]
421pub struct TAPEN_W<'a> {
422 w: &'a mut W,
423}
424impl<'a> TAPEN_W<'a> {
425 #[doc = r"Writes `variant` to the field"]
426 #[inline(always)]
427 pub fn variant(self, variant: TAPEN_A) -> &'a mut W {
428 self.bit(variant.into())
429 }
430 #[doc = "Use DAP to enable"]
431 #[inline(always)]
432 pub fn value_0(self) -> &'a mut W {
433 self.variant(TAPEN_A::VALUE_0)
434 }
435 #[doc = "Fixed state"]
436 #[inline(always)]
437 pub fn value_1(self) -> &'a mut W {
438 self.variant(TAPEN_A::VALUE_1)
439 }
440 #[doc = r"Sets the field bit"]
441 #[inline(always)]
442 pub fn set_bit(self) -> &'a mut W {
443 self.bit(true)
444 }
445 #[doc = r"Clears the field bit"]
446 #[inline(always)]
447 pub fn clear_bit(self) -> &'a mut W {
448 self.bit(false)
449 }
450 #[doc = r"Writes raw bits to the field"]
451 #[inline(always)]
452 pub fn bit(self, value: bool) -> &'a mut W {
453 self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
454 self.w
455 }
456}
457#[doc = "CPU1 (Micro cortex M33) invasive debug enable\n\nValue on reset: 0"]
458#[derive(Clone, Copy, Debug, PartialEq)]
459pub enum CPU1_DBGEN_A {
460 #[doc = "0: Use DAP to enable"]
461 VALUE_0 = 0,
462 #[doc = "1: Fixed state"]
463 VALUE_1 = 1,
464}
465impl From<CPU1_DBGEN_A> for bool {
466 #[inline(always)]
467 fn from(variant: CPU1_DBGEN_A) -> Self {
468 variant as u8 != 0
469 }
470}
471#[doc = "Field `CPU1_DBGEN` reader - CPU1 (Micro cortex M33) invasive debug enable"]
472pub struct CPU1_DBGEN_R(crate::FieldReader<bool, CPU1_DBGEN_A>);
473impl CPU1_DBGEN_R {
474 #[inline(always)]
475 pub(crate) fn new(bits: bool) -> Self {
476 CPU1_DBGEN_R(crate::FieldReader::new(bits))
477 }
478 #[doc = r"Get enumerated values variant"]
479 #[inline(always)]
480 pub fn variant(&self) -> CPU1_DBGEN_A {
481 match self.bits {
482 false => CPU1_DBGEN_A::VALUE_0,
483 true => CPU1_DBGEN_A::VALUE_1,
484 }
485 }
486 #[doc = "Checks if the value of the field is `VALUE_0`"]
487 #[inline(always)]
488 pub fn is_value_0(&self) -> bool {
489 **self == CPU1_DBGEN_A::VALUE_0
490 }
491 #[doc = "Checks if the value of the field is `VALUE_1`"]
492 #[inline(always)]
493 pub fn is_value_1(&self) -> bool {
494 **self == CPU1_DBGEN_A::VALUE_1
495 }
496}
497impl core::ops::Deref for CPU1_DBGEN_R {
498 type Target = crate::FieldReader<bool, CPU1_DBGEN_A>;
499 #[inline(always)]
500 fn deref(&self) -> &Self::Target {
501 &self.0
502 }
503}
504#[doc = "Field `CPU1_DBGEN` writer - CPU1 (Micro cortex M33) invasive debug enable"]
505pub struct CPU1_DBGEN_W<'a> {
506 w: &'a mut W,
507}
508impl<'a> CPU1_DBGEN_W<'a> {
509 #[doc = r"Writes `variant` to the field"]
510 #[inline(always)]
511 pub fn variant(self, variant: CPU1_DBGEN_A) -> &'a mut W {
512 self.bit(variant.into())
513 }
514 #[doc = "Use DAP to enable"]
515 #[inline(always)]
516 pub fn value_0(self) -> &'a mut W {
517 self.variant(CPU1_DBGEN_A::VALUE_0)
518 }
519 #[doc = "Fixed state"]
520 #[inline(always)]
521 pub fn value_1(self) -> &'a mut W {
522 self.variant(CPU1_DBGEN_A::VALUE_1)
523 }
524 #[doc = r"Sets the field bit"]
525 #[inline(always)]
526 pub fn set_bit(self) -> &'a mut W {
527 self.bit(true)
528 }
529 #[doc = r"Clears the field bit"]
530 #[inline(always)]
531 pub fn clear_bit(self) -> &'a mut W {
532 self.bit(false)
533 }
534 #[doc = r"Writes raw bits to the field"]
535 #[inline(always)]
536 pub fn bit(self, value: bool) -> &'a mut W {
537 self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5);
538 self.w
539 }
540}
541#[doc = "ISP Boot Command enable\n\nValue on reset: 0"]
542#[derive(Clone, Copy, Debug, PartialEq)]
543pub enum ISP_CMD_EN_A {
544 #[doc = "0: Use DAP to enable"]
545 VALUE_0 = 0,
546 #[doc = "1: Fixed state"]
547 VALUE_1 = 1,
548}
549impl From<ISP_CMD_EN_A> for bool {
550 #[inline(always)]
551 fn from(variant: ISP_CMD_EN_A) -> Self {
552 variant as u8 != 0
553 }
554}
555#[doc = "Field `ISP_CMD_EN` reader - ISP Boot Command enable"]
556pub struct ISP_CMD_EN_R(crate::FieldReader<bool, ISP_CMD_EN_A>);
557impl ISP_CMD_EN_R {
558 #[inline(always)]
559 pub(crate) fn new(bits: bool) -> Self {
560 ISP_CMD_EN_R(crate::FieldReader::new(bits))
561 }
562 #[doc = r"Get enumerated values variant"]
563 #[inline(always)]
564 pub fn variant(&self) -> ISP_CMD_EN_A {
565 match self.bits {
566 false => ISP_CMD_EN_A::VALUE_0,
567 true => ISP_CMD_EN_A::VALUE_1,
568 }
569 }
570 #[doc = "Checks if the value of the field is `VALUE_0`"]
571 #[inline(always)]
572 pub fn is_value_0(&self) -> bool {
573 **self == ISP_CMD_EN_A::VALUE_0
574 }
575 #[doc = "Checks if the value of the field is `VALUE_1`"]
576 #[inline(always)]
577 pub fn is_value_1(&self) -> bool {
578 **self == ISP_CMD_EN_A::VALUE_1
579 }
580}
581impl core::ops::Deref for ISP_CMD_EN_R {
582 type Target = crate::FieldReader<bool, ISP_CMD_EN_A>;
583 #[inline(always)]
584 fn deref(&self) -> &Self::Target {
585 &self.0
586 }
587}
588#[doc = "Field `ISP_CMD_EN` writer - ISP Boot Command enable"]
589pub struct ISP_CMD_EN_W<'a> {
590 w: &'a mut W,
591}
592impl<'a> ISP_CMD_EN_W<'a> {
593 #[doc = r"Writes `variant` to the field"]
594 #[inline(always)]
595 pub fn variant(self, variant: ISP_CMD_EN_A) -> &'a mut W {
596 self.bit(variant.into())
597 }
598 #[doc = "Use DAP to enable"]
599 #[inline(always)]
600 pub fn value_0(self) -> &'a mut W {
601 self.variant(ISP_CMD_EN_A::VALUE_0)
602 }
603 #[doc = "Fixed state"]
604 #[inline(always)]
605 pub fn value_1(self) -> &'a mut W {
606 self.variant(ISP_CMD_EN_A::VALUE_1)
607 }
608 #[doc = r"Sets the field bit"]
609 #[inline(always)]
610 pub fn set_bit(self) -> &'a mut W {
611 self.bit(true)
612 }
613 #[doc = r"Clears the field bit"]
614 #[inline(always)]
615 pub fn clear_bit(self) -> &'a mut W {
616 self.bit(false)
617 }
618 #[doc = r"Writes raw bits to the field"]
619 #[inline(always)]
620 pub fn bit(self, value: bool) -> &'a mut W {
621 self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6);
622 self.w
623 }
624}
625#[doc = "FA Command enable\n\nValue on reset: 0"]
626#[derive(Clone, Copy, Debug, PartialEq)]
627pub enum FA_CMD_EN_A {
628 #[doc = "0: Use DAP to enable"]
629 VALUE_0 = 0,
630 #[doc = "1: Fixed state"]
631 VALUE_1 = 1,
632}
633impl From<FA_CMD_EN_A> for bool {
634 #[inline(always)]
635 fn from(variant: FA_CMD_EN_A) -> Self {
636 variant as u8 != 0
637 }
638}
639#[doc = "Field `FA_CMD_EN` reader - FA Command enable"]
640pub struct FA_CMD_EN_R(crate::FieldReader<bool, FA_CMD_EN_A>);
641impl FA_CMD_EN_R {
642 #[inline(always)]
643 pub(crate) fn new(bits: bool) -> Self {
644 FA_CMD_EN_R(crate::FieldReader::new(bits))
645 }
646 #[doc = r"Get enumerated values variant"]
647 #[inline(always)]
648 pub fn variant(&self) -> FA_CMD_EN_A {
649 match self.bits {
650 false => FA_CMD_EN_A::VALUE_0,
651 true => FA_CMD_EN_A::VALUE_1,
652 }
653 }
654 #[doc = "Checks if the value of the field is `VALUE_0`"]
655 #[inline(always)]
656 pub fn is_value_0(&self) -> bool {
657 **self == FA_CMD_EN_A::VALUE_0
658 }
659 #[doc = "Checks if the value of the field is `VALUE_1`"]
660 #[inline(always)]
661 pub fn is_value_1(&self) -> bool {
662 **self == FA_CMD_EN_A::VALUE_1
663 }
664}
665impl core::ops::Deref for FA_CMD_EN_R {
666 type Target = crate::FieldReader<bool, FA_CMD_EN_A>;
667 #[inline(always)]
668 fn deref(&self) -> &Self::Target {
669 &self.0
670 }
671}
672#[doc = "Field `FA_CMD_EN` writer - FA Command enable"]
673pub struct FA_CMD_EN_W<'a> {
674 w: &'a mut W,
675}
676impl<'a> FA_CMD_EN_W<'a> {
677 #[doc = r"Writes `variant` to the field"]
678 #[inline(always)]
679 pub fn variant(self, variant: FA_CMD_EN_A) -> &'a mut W {
680 self.bit(variant.into())
681 }
682 #[doc = "Use DAP to enable"]
683 #[inline(always)]
684 pub fn value_0(self) -> &'a mut W {
685 self.variant(FA_CMD_EN_A::VALUE_0)
686 }
687 #[doc = "Fixed state"]
688 #[inline(always)]
689 pub fn value_1(self) -> &'a mut W {
690 self.variant(FA_CMD_EN_A::VALUE_1)
691 }
692 #[doc = r"Sets the field bit"]
693 #[inline(always)]
694 pub fn set_bit(self) -> &'a mut W {
695 self.bit(true)
696 }
697 #[doc = r"Clears the field bit"]
698 #[inline(always)]
699 pub fn clear_bit(self) -> &'a mut W {
700 self.bit(false)
701 }
702 #[doc = r"Writes raw bits to the field"]
703 #[inline(always)]
704 pub fn bit(self, value: bool) -> &'a mut W {
705 self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7);
706 self.w
707 }
708}
709#[doc = "Flash Mass Erase Command enable\n\nValue on reset: 0"]
710#[derive(Clone, Copy, Debug, PartialEq)]
711pub enum ME_CMD_EN_A {
712 #[doc = "0: Use DAP to enable"]
713 VALUE_0 = 0,
714 #[doc = "1: Fixed state"]
715 VALUE_1 = 1,
716}
717impl From<ME_CMD_EN_A> for bool {
718 #[inline(always)]
719 fn from(variant: ME_CMD_EN_A) -> Self {
720 variant as u8 != 0
721 }
722}
723#[doc = "Field `ME_CMD_EN` reader - Flash Mass Erase Command enable"]
724pub struct ME_CMD_EN_R(crate::FieldReader<bool, ME_CMD_EN_A>);
725impl ME_CMD_EN_R {
726 #[inline(always)]
727 pub(crate) fn new(bits: bool) -> Self {
728 ME_CMD_EN_R(crate::FieldReader::new(bits))
729 }
730 #[doc = r"Get enumerated values variant"]
731 #[inline(always)]
732 pub fn variant(&self) -> ME_CMD_EN_A {
733 match self.bits {
734 false => ME_CMD_EN_A::VALUE_0,
735 true => ME_CMD_EN_A::VALUE_1,
736 }
737 }
738 #[doc = "Checks if the value of the field is `VALUE_0`"]
739 #[inline(always)]
740 pub fn is_value_0(&self) -> bool {
741 **self == ME_CMD_EN_A::VALUE_0
742 }
743 #[doc = "Checks if the value of the field is `VALUE_1`"]
744 #[inline(always)]
745 pub fn is_value_1(&self) -> bool {
746 **self == ME_CMD_EN_A::VALUE_1
747 }
748}
749impl core::ops::Deref for ME_CMD_EN_R {
750 type Target = crate::FieldReader<bool, ME_CMD_EN_A>;
751 #[inline(always)]
752 fn deref(&self) -> &Self::Target {
753 &self.0
754 }
755}
756#[doc = "Field `ME_CMD_EN` writer - Flash Mass Erase Command enable"]
757pub struct ME_CMD_EN_W<'a> {
758 w: &'a mut W,
759}
760impl<'a> ME_CMD_EN_W<'a> {
761 #[doc = r"Writes `variant` to the field"]
762 #[inline(always)]
763 pub fn variant(self, variant: ME_CMD_EN_A) -> &'a mut W {
764 self.bit(variant.into())
765 }
766 #[doc = "Use DAP to enable"]
767 #[inline(always)]
768 pub fn value_0(self) -> &'a mut W {
769 self.variant(ME_CMD_EN_A::VALUE_0)
770 }
771 #[doc = "Fixed state"]
772 #[inline(always)]
773 pub fn value_1(self) -> &'a mut W {
774 self.variant(ME_CMD_EN_A::VALUE_1)
775 }
776 #[doc = r"Sets the field bit"]
777 #[inline(always)]
778 pub fn set_bit(self) -> &'a mut W {
779 self.bit(true)
780 }
781 #[doc = r"Clears the field bit"]
782 #[inline(always)]
783 pub fn clear_bit(self) -> &'a mut W {
784 self.bit(false)
785 }
786 #[doc = r"Writes raw bits to the field"]
787 #[inline(always)]
788 pub fn bit(self, value: bool) -> &'a mut W {
789 self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8);
790 self.w
791 }
792}
793#[doc = "CPU1 (Micro cortex M33) non-invasive debug enable\n\nValue on reset: 0"]
794#[derive(Clone, Copy, Debug, PartialEq)]
795pub enum CPU1_NIDEN_A {
796 #[doc = "0: Use DAP to enable"]
797 VALUE_0 = 0,
798 #[doc = "1: Fixed state"]
799 VALUE_1 = 1,
800}
801impl From<CPU1_NIDEN_A> for bool {
802 #[inline(always)]
803 fn from(variant: CPU1_NIDEN_A) -> Self {
804 variant as u8 != 0
805 }
806}
807#[doc = "Field `CPU1_NIDEN` reader - CPU1 (Micro cortex M33) non-invasive debug enable"]
808pub struct CPU1_NIDEN_R(crate::FieldReader<bool, CPU1_NIDEN_A>);
809impl CPU1_NIDEN_R {
810 #[inline(always)]
811 pub(crate) fn new(bits: bool) -> Self {
812 CPU1_NIDEN_R(crate::FieldReader::new(bits))
813 }
814 #[doc = r"Get enumerated values variant"]
815 #[inline(always)]
816 pub fn variant(&self) -> CPU1_NIDEN_A {
817 match self.bits {
818 false => CPU1_NIDEN_A::VALUE_0,
819 true => CPU1_NIDEN_A::VALUE_1,
820 }
821 }
822 #[doc = "Checks if the value of the field is `VALUE_0`"]
823 #[inline(always)]
824 pub fn is_value_0(&self) -> bool {
825 **self == CPU1_NIDEN_A::VALUE_0
826 }
827 #[doc = "Checks if the value of the field is `VALUE_1`"]
828 #[inline(always)]
829 pub fn is_value_1(&self) -> bool {
830 **self == CPU1_NIDEN_A::VALUE_1
831 }
832}
833impl core::ops::Deref for CPU1_NIDEN_R {
834 type Target = crate::FieldReader<bool, CPU1_NIDEN_A>;
835 #[inline(always)]
836 fn deref(&self) -> &Self::Target {
837 &self.0
838 }
839}
840#[doc = "Field `CPU1_NIDEN` writer - CPU1 (Micro cortex M33) non-invasive debug enable"]
841pub struct CPU1_NIDEN_W<'a> {
842 w: &'a mut W,
843}
844impl<'a> CPU1_NIDEN_W<'a> {
845 #[doc = r"Writes `variant` to the field"]
846 #[inline(always)]
847 pub fn variant(self, variant: CPU1_NIDEN_A) -> &'a mut W {
848 self.bit(variant.into())
849 }
850 #[doc = "Use DAP to enable"]
851 #[inline(always)]
852 pub fn value_0(self) -> &'a mut W {
853 self.variant(CPU1_NIDEN_A::VALUE_0)
854 }
855 #[doc = "Fixed state"]
856 #[inline(always)]
857 pub fn value_1(self) -> &'a mut W {
858 self.variant(CPU1_NIDEN_A::VALUE_1)
859 }
860 #[doc = r"Sets the field bit"]
861 #[inline(always)]
862 pub fn set_bit(self) -> &'a mut W {
863 self.bit(true)
864 }
865 #[doc = r"Clears the field bit"]
866 #[inline(always)]
867 pub fn clear_bit(self) -> &'a mut W {
868 self.bit(false)
869 }
870 #[doc = r"Writes raw bits to the field"]
871 #[inline(always)]
872 pub fn bit(self, value: bool) -> &'a mut W {
873 self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9);
874 self.w
875 }
876}
877#[doc = "Field `UUID_CHECK` reader - Enforce UUID match during Debug authentication."]
878pub struct UUID_CHECK_R(crate::FieldReader<bool, bool>);
879impl UUID_CHECK_R {
880 #[inline(always)]
881 pub(crate) fn new(bits: bool) -> Self {
882 UUID_CHECK_R(crate::FieldReader::new(bits))
883 }
884}
885impl core::ops::Deref for UUID_CHECK_R {
886 type Target = crate::FieldReader<bool, bool>;
887 #[inline(always)]
888 fn deref(&self) -> &Self::Target {
889 &self.0
890 }
891}
892#[doc = "Field `UUID_CHECK` writer - Enforce UUID match during Debug authentication."]
893pub struct UUID_CHECK_W<'a> {
894 w: &'a mut W,
895}
896impl<'a> UUID_CHECK_W<'a> {
897 #[doc = r"Sets the field bit"]
898 #[inline(always)]
899 pub fn set_bit(self) -> &'a mut W {
900 self.bit(true)
901 }
902 #[doc = r"Clears the field bit"]
903 #[inline(always)]
904 pub fn clear_bit(self) -> &'a mut W {
905 self.bit(false)
906 }
907 #[doc = r"Writes raw bits to the field"]
908 #[inline(always)]
909 pub fn bit(self, value: bool) -> &'a mut W {
910 self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15);
911 self.w
912 }
913}
914#[doc = "Field `INVERSE_VALUE` reader - inverse value of bits \\[15:0\\]"]
915pub struct INVERSE_VALUE_R(crate::FieldReader<u16, u16>);
916impl INVERSE_VALUE_R {
917 #[inline(always)]
918 pub(crate) fn new(bits: u16) -> Self {
919 INVERSE_VALUE_R(crate::FieldReader::new(bits))
920 }
921}
922impl core::ops::Deref for INVERSE_VALUE_R {
923 type Target = crate::FieldReader<u16, u16>;
924 #[inline(always)]
925 fn deref(&self) -> &Self::Target {
926 &self.0
927 }
928}
929#[doc = "Field `INVERSE_VALUE` writer - inverse value of bits \\[15:0\\]"]
930pub struct INVERSE_VALUE_W<'a> {
931 w: &'a mut W,
932}
933impl<'a> INVERSE_VALUE_W<'a> {
934 #[doc = r"Writes raw bits to the field"]
935 #[inline(always)]
936 pub unsafe fn bits(self, value: u16) -> &'a mut W {
937 self.w.bits = (self.w.bits & !(0xffff << 16)) | ((value as u32 & 0xffff) << 16);
938 self.w
939 }
940}
941impl R {
942 #[doc = "Bit 0 - Non Secure non-invasive debug enable"]
943 #[inline(always)]
944 pub fn niden(&self) -> NIDEN_R {
945 NIDEN_R::new((self.bits & 0x01) != 0)
946 }
947 #[doc = "Bit 1 - Non Secure debug enable"]
948 #[inline(always)]
949 pub fn dbgen(&self) -> DBGEN_R {
950 DBGEN_R::new(((self.bits >> 1) & 0x01) != 0)
951 }
952 #[doc = "Bit 2 - Secure non-invasive debug enable"]
953 #[inline(always)]
954 pub fn spniden(&self) -> SPNIDEN_R {
955 SPNIDEN_R::new(((self.bits >> 2) & 0x01) != 0)
956 }
957 #[doc = "Bit 3 - Secure invasive debug enable"]
958 #[inline(always)]
959 pub fn spiden(&self) -> SPIDEN_R {
960 SPIDEN_R::new(((self.bits >> 3) & 0x01) != 0)
961 }
962 #[doc = "Bit 4 - JTAG TAP enable"]
963 #[inline(always)]
964 pub fn tapen(&self) -> TAPEN_R {
965 TAPEN_R::new(((self.bits >> 4) & 0x01) != 0)
966 }
967 #[doc = "Bit 5 - CPU1 (Micro cortex M33) invasive debug enable"]
968 #[inline(always)]
969 pub fn cpu1_dbgen(&self) -> CPU1_DBGEN_R {
970 CPU1_DBGEN_R::new(((self.bits >> 5) & 0x01) != 0)
971 }
972 #[doc = "Bit 6 - ISP Boot Command enable"]
973 #[inline(always)]
974 pub fn isp_cmd_en(&self) -> ISP_CMD_EN_R {
975 ISP_CMD_EN_R::new(((self.bits >> 6) & 0x01) != 0)
976 }
977 #[doc = "Bit 7 - FA Command enable"]
978 #[inline(always)]
979 pub fn fa_cmd_en(&self) -> FA_CMD_EN_R {
980 FA_CMD_EN_R::new(((self.bits >> 7) & 0x01) != 0)
981 }
982 #[doc = "Bit 8 - Flash Mass Erase Command enable"]
983 #[inline(always)]
984 pub fn me_cmd_en(&self) -> ME_CMD_EN_R {
985 ME_CMD_EN_R::new(((self.bits >> 8) & 0x01) != 0)
986 }
987 #[doc = "Bit 9 - CPU1 (Micro cortex M33) non-invasive debug enable"]
988 #[inline(always)]
989 pub fn cpu1_niden(&self) -> CPU1_NIDEN_R {
990 CPU1_NIDEN_R::new(((self.bits >> 9) & 0x01) != 0)
991 }
992 #[doc = "Bit 15 - Enforce UUID match during Debug authentication."]
993 #[inline(always)]
994 pub fn uuid_check(&self) -> UUID_CHECK_R {
995 UUID_CHECK_R::new(((self.bits >> 15) & 0x01) != 0)
996 }
997 #[doc = "Bits 16:31 - inverse value of bits \\[15:0\\]"]
998 #[inline(always)]
999 pub fn inverse_value(&self) -> INVERSE_VALUE_R {
1000 INVERSE_VALUE_R::new(((self.bits >> 16) & 0xffff) as u16)
1001 }
1002}
1003impl W {
1004 #[doc = "Bit 0 - Non Secure non-invasive debug enable"]
1005 #[inline(always)]
1006 pub fn niden(&mut self) -> NIDEN_W {
1007 NIDEN_W { w: self }
1008 }
1009 #[doc = "Bit 1 - Non Secure debug enable"]
1010 #[inline(always)]
1011 pub fn dbgen(&mut self) -> DBGEN_W {
1012 DBGEN_W { w: self }
1013 }
1014 #[doc = "Bit 2 - Secure non-invasive debug enable"]
1015 #[inline(always)]
1016 pub fn spniden(&mut self) -> SPNIDEN_W {
1017 SPNIDEN_W { w: self }
1018 }
1019 #[doc = "Bit 3 - Secure invasive debug enable"]
1020 #[inline(always)]
1021 pub fn spiden(&mut self) -> SPIDEN_W {
1022 SPIDEN_W { w: self }
1023 }
1024 #[doc = "Bit 4 - JTAG TAP enable"]
1025 #[inline(always)]
1026 pub fn tapen(&mut self) -> TAPEN_W {
1027 TAPEN_W { w: self }
1028 }
1029 #[doc = "Bit 5 - CPU1 (Micro cortex M33) invasive debug enable"]
1030 #[inline(always)]
1031 pub fn cpu1_dbgen(&mut self) -> CPU1_DBGEN_W {
1032 CPU1_DBGEN_W { w: self }
1033 }
1034 #[doc = "Bit 6 - ISP Boot Command enable"]
1035 #[inline(always)]
1036 pub fn isp_cmd_en(&mut self) -> ISP_CMD_EN_W {
1037 ISP_CMD_EN_W { w: self }
1038 }
1039 #[doc = "Bit 7 - FA Command enable"]
1040 #[inline(always)]
1041 pub fn fa_cmd_en(&mut self) -> FA_CMD_EN_W {
1042 FA_CMD_EN_W { w: self }
1043 }
1044 #[doc = "Bit 8 - Flash Mass Erase Command enable"]
1045 #[inline(always)]
1046 pub fn me_cmd_en(&mut self) -> ME_CMD_EN_W {
1047 ME_CMD_EN_W { w: self }
1048 }
1049 #[doc = "Bit 9 - CPU1 (Micro cortex M33) non-invasive debug enable"]
1050 #[inline(always)]
1051 pub fn cpu1_niden(&mut self) -> CPU1_NIDEN_W {
1052 CPU1_NIDEN_W { w: self }
1053 }
1054 #[doc = "Bit 15 - Enforce UUID match during Debug authentication."]
1055 #[inline(always)]
1056 pub fn uuid_check(&mut self) -> UUID_CHECK_W {
1057 UUID_CHECK_W { w: self }
1058 }
1059 #[doc = "Bits 16:31 - inverse value of bits \\[15:0\\]"]
1060 #[inline(always)]
1061 pub fn inverse_value(&mut self) -> INVERSE_VALUE_W {
1062 INVERSE_VALUE_W { w: self }
1063 }
1064 #[doc = "Writes raw bits to the register."]
1065 #[inline(always)]
1066 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
1067 self.0.bits(bits);
1068 self
1069 }
1070}
1071#[doc = ".\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 [cc_socu_pin](index.html) module"]
1072pub struct CC_SOCU_PIN_SPEC;
1073impl crate::RegisterSpec for CC_SOCU_PIN_SPEC {
1074 type Ux = u32;
1075}
1076#[doc = "`read()` method returns [cc_socu_pin::R](R) reader structure"]
1077impl crate::Readable for CC_SOCU_PIN_SPEC {
1078 type Reader = R;
1079}
1080#[doc = "`write(|w| ..)` method takes [cc_socu_pin::W](W) writer structure"]
1081impl crate::Writable for CC_SOCU_PIN_SPEC {
1082 type Writer = W;
1083}
1084#[doc = "`reset()` method sets CC_SOCU_PIN to value 0"]
1085impl crate::Resettable for CC_SOCU_PIN_SPEC {
1086 #[inline(always)]
1087 fn reset_value() -> Self::Ux {
1088 0
1089 }
1090}