esp32s3/efuse/
rd_repeat_err2.rs

1#[doc = "Register `RD_REPEAT_ERR2` reader"]
2pub type R = crate::R<RD_REPEAT_ERR2_SPEC>;
3#[doc = "Field `KEY_PURPOSE_2_ERR` reader - If any bits in this filed are 1, then it indicates a programming error."]
4pub type KEY_PURPOSE_2_ERR_R = crate::FieldReader;
5#[doc = "Field `KEY_PURPOSE_3_ERR` reader - If any bits in this filed are 1, then it indicates a programming error."]
6pub type KEY_PURPOSE_3_ERR_R = crate::FieldReader;
7#[doc = "Field `KEY_PURPOSE_4_ERR` reader - If any bits in this filed are 1, then it indicates a programming error."]
8pub type KEY_PURPOSE_4_ERR_R = crate::FieldReader;
9#[doc = "Field `KEY_PURPOSE_5_ERR` reader - If any bits in this filed are 1, then it indicates a programming error."]
10pub type KEY_PURPOSE_5_ERR_R = crate::FieldReader;
11#[doc = "Field `RPT4_RESERVED0_ERR` reader - If any bits in this filed are 1, then it indicates a programming error."]
12pub type RPT4_RESERVED0_ERR_R = crate::FieldReader;
13#[doc = "Field `SECURE_BOOT_EN_ERR` reader - If any bits in this filed are 1, then it indicates a programming error."]
14pub type SECURE_BOOT_EN_ERR_R = crate::BitReader;
15#[doc = "Field `SECURE_BOOT_AGGRESSIVE_REVOKE_ERR` reader - If any bits in this filed are 1, then it indicates a programming error."]
16pub type SECURE_BOOT_AGGRESSIVE_REVOKE_ERR_R = crate::BitReader;
17#[doc = "Field `DIS_USB_JTAG_ERR` reader - If any bits in this filed are 1, then it indicates a programming error."]
18pub type DIS_USB_JTAG_ERR_R = crate::BitReader;
19#[doc = "Field `DIS_USB_DEVICE_ERR` reader - If any bits in this filed are 1, then it indicates a programming error."]
20pub type DIS_USB_DEVICE_ERR_R = crate::BitReader;
21#[doc = "Field `STRAP_JTAG_SEL_ERR` reader - If any bits in this filed are 1, then it indicates a programming error."]
22pub type STRAP_JTAG_SEL_ERR_R = crate::BitReader;
23#[doc = "Field `USB_PHY_SEL_ERR` reader - If any bits in this filed are 1, then it indicates a programming error."]
24pub type USB_PHY_SEL_ERR_R = crate::BitReader;
25#[doc = "Field `POWER_GLITCH_DSENSE_ERR` reader - If any bits in this filed are 1, then it indicates a programming error."]
26pub type POWER_GLITCH_DSENSE_ERR_R = crate::FieldReader;
27#[doc = "Field `FLASH_TPUW_ERR` reader - If any bits in this filed are 1, then it indicates a programming error."]
28pub type FLASH_TPUW_ERR_R = crate::FieldReader;
29impl R {
30    #[doc = "Bits 0:3 - If any bits in this filed are 1, then it indicates a programming error."]
31    #[inline(always)]
32    pub fn key_purpose_2_err(&self) -> KEY_PURPOSE_2_ERR_R {
33        KEY_PURPOSE_2_ERR_R::new((self.bits & 0x0f) as u8)
34    }
35    #[doc = "Bits 4:7 - If any bits in this filed are 1, then it indicates a programming error."]
36    #[inline(always)]
37    pub fn key_purpose_3_err(&self) -> KEY_PURPOSE_3_ERR_R {
38        KEY_PURPOSE_3_ERR_R::new(((self.bits >> 4) & 0x0f) as u8)
39    }
40    #[doc = "Bits 8:11 - If any bits in this filed are 1, then it indicates a programming error."]
41    #[inline(always)]
42    pub fn key_purpose_4_err(&self) -> KEY_PURPOSE_4_ERR_R {
43        KEY_PURPOSE_4_ERR_R::new(((self.bits >> 8) & 0x0f) as u8)
44    }
45    #[doc = "Bits 12:15 - If any bits in this filed are 1, then it indicates a programming error."]
46    #[inline(always)]
47    pub fn key_purpose_5_err(&self) -> KEY_PURPOSE_5_ERR_R {
48        KEY_PURPOSE_5_ERR_R::new(((self.bits >> 12) & 0x0f) as u8)
49    }
50    #[doc = "Bits 16:19 - If any bits in this filed are 1, then it indicates a programming error."]
51    #[inline(always)]
52    pub fn rpt4_reserved0_err(&self) -> RPT4_RESERVED0_ERR_R {
53        RPT4_RESERVED0_ERR_R::new(((self.bits >> 16) & 0x0f) as u8)
54    }
55    #[doc = "Bit 20 - If any bits in this filed are 1, then it indicates a programming error."]
56    #[inline(always)]
57    pub fn secure_boot_en_err(&self) -> SECURE_BOOT_EN_ERR_R {
58        SECURE_BOOT_EN_ERR_R::new(((self.bits >> 20) & 1) != 0)
59    }
60    #[doc = "Bit 21 - If any bits in this filed are 1, then it indicates a programming error."]
61    #[inline(always)]
62    pub fn secure_boot_aggressive_revoke_err(&self) -> SECURE_BOOT_AGGRESSIVE_REVOKE_ERR_R {
63        SECURE_BOOT_AGGRESSIVE_REVOKE_ERR_R::new(((self.bits >> 21) & 1) != 0)
64    }
65    #[doc = "Bit 22 - If any bits in this filed are 1, then it indicates a programming error."]
66    #[inline(always)]
67    pub fn dis_usb_jtag_err(&self) -> DIS_USB_JTAG_ERR_R {
68        DIS_USB_JTAG_ERR_R::new(((self.bits >> 22) & 1) != 0)
69    }
70    #[doc = "Bit 23 - If any bits in this filed are 1, then it indicates a programming error."]
71    #[inline(always)]
72    pub fn dis_usb_device_err(&self) -> DIS_USB_DEVICE_ERR_R {
73        DIS_USB_DEVICE_ERR_R::new(((self.bits >> 23) & 1) != 0)
74    }
75    #[doc = "Bit 24 - If any bits in this filed are 1, then it indicates a programming error."]
76    #[inline(always)]
77    pub fn strap_jtag_sel_err(&self) -> STRAP_JTAG_SEL_ERR_R {
78        STRAP_JTAG_SEL_ERR_R::new(((self.bits >> 24) & 1) != 0)
79    }
80    #[doc = "Bit 25 - If any bits in this filed are 1, then it indicates a programming error."]
81    #[inline(always)]
82    pub fn usb_phy_sel_err(&self) -> USB_PHY_SEL_ERR_R {
83        USB_PHY_SEL_ERR_R::new(((self.bits >> 25) & 1) != 0)
84    }
85    #[doc = "Bits 26:27 - If any bits in this filed are 1, then it indicates a programming error."]
86    #[inline(always)]
87    pub fn power_glitch_dsense_err(&self) -> POWER_GLITCH_DSENSE_ERR_R {
88        POWER_GLITCH_DSENSE_ERR_R::new(((self.bits >> 26) & 3) as u8)
89    }
90    #[doc = "Bits 28:31 - If any bits in this filed are 1, then it indicates a programming error."]
91    #[inline(always)]
92    pub fn flash_tpuw_err(&self) -> FLASH_TPUW_ERR_R {
93        FLASH_TPUW_ERR_R::new(((self.bits >> 28) & 0x0f) as u8)
94    }
95}
96#[cfg(feature = "impl-register-debug")]
97impl core::fmt::Debug for R {
98    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
99        f.debug_struct("RD_REPEAT_ERR2")
100            .field("key_purpose_2_err", &self.key_purpose_2_err())
101            .field("key_purpose_3_err", &self.key_purpose_3_err())
102            .field("key_purpose_4_err", &self.key_purpose_4_err())
103            .field("key_purpose_5_err", &self.key_purpose_5_err())
104            .field("rpt4_reserved0_err", &self.rpt4_reserved0_err())
105            .field("secure_boot_en_err", &self.secure_boot_en_err())
106            .field(
107                "secure_boot_aggressive_revoke_err",
108                &self.secure_boot_aggressive_revoke_err(),
109            )
110            .field("dis_usb_jtag_err", &self.dis_usb_jtag_err())
111            .field("dis_usb_device_err", &self.dis_usb_device_err())
112            .field("strap_jtag_sel_err", &self.strap_jtag_sel_err())
113            .field("usb_phy_sel_err", &self.usb_phy_sel_err())
114            .field("power_glitch_dsense_err", &self.power_glitch_dsense_err())
115            .field("flash_tpuw_err", &self.flash_tpuw_err())
116            .finish()
117    }
118}
119#[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)."]
120pub struct RD_REPEAT_ERR2_SPEC;
121impl crate::RegisterSpec for RD_REPEAT_ERR2_SPEC {
122    type Ux = u32;
123}
124#[doc = "`read()` method returns [`rd_repeat_err2::R`](R) reader structure"]
125impl crate::Readable for RD_REPEAT_ERR2_SPEC {}
126#[doc = "`reset()` method sets RD_REPEAT_ERR2 to value 0"]
127impl crate::Resettable for RD_REPEAT_ERR2_SPEC {
128    const RESET_VALUE: u32 = 0;
129}