esp32c6/efuse/
rd_repeat_err2.rs1#[doc = "Register `RD_REPEAT_ERR2` reader"]
2pub type R = crate::R<RD_REPEAT_ERR2_SPEC>;
3#[doc = "Field `KEY_PURPOSE_2_ERR` reader - Indicates a programming error of KEY_PURPOSE_2."]
4pub type KEY_PURPOSE_2_ERR_R = crate::FieldReader;
5#[doc = "Field `KEY_PURPOSE_3_ERR` reader - Indicates a programming error of KEY_PURPOSE_3."]
6pub type KEY_PURPOSE_3_ERR_R = crate::FieldReader;
7#[doc = "Field `KEY_PURPOSE_4_ERR` reader - Indicates a programming error of KEY_PURPOSE_4."]
8pub type KEY_PURPOSE_4_ERR_R = crate::FieldReader;
9#[doc = "Field `KEY_PURPOSE_5_ERR` reader - Indicates a programming error of KEY_PURPOSE_5."]
10pub type KEY_PURPOSE_5_ERR_R = crate::FieldReader;
11#[doc = "Field `SEC_DPA_LEVEL_ERR` reader - Indicates a programming error of SEC_DPA_LEVEL."]
12pub type SEC_DPA_LEVEL_ERR_R = crate::FieldReader;
13#[doc = "Field `RPT4_RESERVED2_ERR_1` reader - Reserved."]
14pub type RPT4_RESERVED2_ERR_1_R = crate::BitReader;
15#[doc = "Field `CRYPT_DPA_ENABLE_ERR` reader - Indicates a programming error of CRYPT_DPA_ENABLE."]
16pub type CRYPT_DPA_ENABLE_ERR_R = crate::BitReader;
17#[doc = "Field `SECURE_BOOT_EN_ERR` reader - Indicates a programming error of SECURE_BOOT_EN."]
18pub type SECURE_BOOT_EN_ERR_R = crate::BitReader;
19#[doc = "Field `SECURE_BOOT_AGGRESSIVE_REVOKE_ERR` reader - Indicates a programming error of SECURE_BOOT_AGGRESSIVE_REVOKE."]
20pub type SECURE_BOOT_AGGRESSIVE_REVOKE_ERR_R = crate::BitReader;
21#[doc = "Field `RPT4_RESERVED2_ERR_0` reader - Reserved."]
22pub type RPT4_RESERVED2_ERR_0_R = crate::FieldReader;
23#[doc = "Field `FLASH_TPUW_ERR` reader - Indicates a programming error of FLASH_TPUW."]
24pub type FLASH_TPUW_ERR_R = crate::FieldReader;
25impl R {
26 #[doc = "Bits 0:3 - Indicates a programming error of KEY_PURPOSE_2."]
27 #[inline(always)]
28 pub fn key_purpose_2_err(&self) -> KEY_PURPOSE_2_ERR_R {
29 KEY_PURPOSE_2_ERR_R::new((self.bits & 0x0f) as u8)
30 }
31 #[doc = "Bits 4:7 - Indicates a programming error of KEY_PURPOSE_3."]
32 #[inline(always)]
33 pub fn key_purpose_3_err(&self) -> KEY_PURPOSE_3_ERR_R {
34 KEY_PURPOSE_3_ERR_R::new(((self.bits >> 4) & 0x0f) as u8)
35 }
36 #[doc = "Bits 8:11 - Indicates a programming error of KEY_PURPOSE_4."]
37 #[inline(always)]
38 pub fn key_purpose_4_err(&self) -> KEY_PURPOSE_4_ERR_R {
39 KEY_PURPOSE_4_ERR_R::new(((self.bits >> 8) & 0x0f) as u8)
40 }
41 #[doc = "Bits 12:15 - Indicates a programming error of KEY_PURPOSE_5."]
42 #[inline(always)]
43 pub fn key_purpose_5_err(&self) -> KEY_PURPOSE_5_ERR_R {
44 KEY_PURPOSE_5_ERR_R::new(((self.bits >> 12) & 0x0f) as u8)
45 }
46 #[doc = "Bits 16:17 - Indicates a programming error of SEC_DPA_LEVEL."]
47 #[inline(always)]
48 pub fn sec_dpa_level_err(&self) -> SEC_DPA_LEVEL_ERR_R {
49 SEC_DPA_LEVEL_ERR_R::new(((self.bits >> 16) & 3) as u8)
50 }
51 #[doc = "Bit 18 - Reserved."]
52 #[inline(always)]
53 pub fn rpt4_reserved2_err_1(&self) -> RPT4_RESERVED2_ERR_1_R {
54 RPT4_RESERVED2_ERR_1_R::new(((self.bits >> 18) & 1) != 0)
55 }
56 #[doc = "Bit 19 - Indicates a programming error of CRYPT_DPA_ENABLE."]
57 #[inline(always)]
58 pub fn crypt_dpa_enable_err(&self) -> CRYPT_DPA_ENABLE_ERR_R {
59 CRYPT_DPA_ENABLE_ERR_R::new(((self.bits >> 19) & 1) != 0)
60 }
61 #[doc = "Bit 20 - Indicates a programming error of SECURE_BOOT_EN."]
62 #[inline(always)]
63 pub fn secure_boot_en_err(&self) -> SECURE_BOOT_EN_ERR_R {
64 SECURE_BOOT_EN_ERR_R::new(((self.bits >> 20) & 1) != 0)
65 }
66 #[doc = "Bit 21 - Indicates a programming error of SECURE_BOOT_AGGRESSIVE_REVOKE."]
67 #[inline(always)]
68 pub fn secure_boot_aggressive_revoke_err(&self) -> SECURE_BOOT_AGGRESSIVE_REVOKE_ERR_R {
69 SECURE_BOOT_AGGRESSIVE_REVOKE_ERR_R::new(((self.bits >> 21) & 1) != 0)
70 }
71 #[doc = "Bits 22:27 - Reserved."]
72 #[inline(always)]
73 pub fn rpt4_reserved2_err_0(&self) -> RPT4_RESERVED2_ERR_0_R {
74 RPT4_RESERVED2_ERR_0_R::new(((self.bits >> 22) & 0x3f) as u8)
75 }
76 #[doc = "Bits 28:31 - Indicates a programming error of FLASH_TPUW."]
77 #[inline(always)]
78 pub fn flash_tpuw_err(&self) -> FLASH_TPUW_ERR_R {
79 FLASH_TPUW_ERR_R::new(((self.bits >> 28) & 0x0f) as u8)
80 }
81}
82#[cfg(feature = "impl-register-debug")]
83impl core::fmt::Debug for R {
84 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
85 f.debug_struct("RD_REPEAT_ERR2")
86 .field("key_purpose_2_err", &self.key_purpose_2_err())
87 .field("key_purpose_3_err", &self.key_purpose_3_err())
88 .field("key_purpose_4_err", &self.key_purpose_4_err())
89 .field("key_purpose_5_err", &self.key_purpose_5_err())
90 .field("sec_dpa_level_err", &self.sec_dpa_level_err())
91 .field("rpt4_reserved2_err_1", &self.rpt4_reserved2_err_1())
92 .field("crypt_dpa_enable_err", &self.crypt_dpa_enable_err())
93 .field("secure_boot_en_err", &self.secure_boot_en_err())
94 .field(
95 "secure_boot_aggressive_revoke_err",
96 &self.secure_boot_aggressive_revoke_err(),
97 )
98 .field("rpt4_reserved2_err_0", &self.rpt4_reserved2_err_0())
99 .field("flash_tpuw_err", &self.flash_tpuw_err())
100 .finish()
101 }
102}
103#[doc = "Programming error record register 2 of BLOCK0.\n\nYou can [`read`](crate::Reg::read) this register and get [`rd_repeat_err2::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
104pub struct RD_REPEAT_ERR2_SPEC;
105impl crate::RegisterSpec for RD_REPEAT_ERR2_SPEC {
106 type Ux = u32;
107}
108#[doc = "`read()` method returns [`rd_repeat_err2::R`](R) reader structure"]
109impl crate::Readable for RD_REPEAT_ERR2_SPEC {}
110#[doc = "`reset()` method sets RD_REPEAT_ERR2 to value 0"]
111impl crate::Resettable for RD_REPEAT_ERR2_SPEC {
112 const RESET_VALUE: u32 = 0;
113}