esp32c6/efuse/
rd_rs_err0.rs1#[doc = "Register `RD_RS_ERR0` reader"]
2pub type R = crate::R<RD_RS_ERR0_SPEC>;
3#[doc = "Field `MAC_SPI_8M_ERR_NUM` reader - The value of this signal means the number of error bytes."]
4pub type MAC_SPI_8M_ERR_NUM_R = crate::FieldReader;
5#[doc = "Field `MAC_SPI_8M_FAIL` reader - 0: Means no failure and that the data of MAC_SPI_8M is reliable 1: Means that programming user data failed and the number of error bytes is over 6."]
6pub type MAC_SPI_8M_FAIL_R = crate::BitReader;
7#[doc = "Field `SYS_PART1_NUM` reader - The value of this signal means the number of error bytes."]
8pub type SYS_PART1_NUM_R = crate::FieldReader;
9#[doc = "Field `SYS_PART1_FAIL` reader - 0: Means no failure and that the data of system part1 is reliable 1: Means that programming user data failed and the number of error bytes is over 6."]
10pub type SYS_PART1_FAIL_R = crate::BitReader;
11#[doc = "Field `USR_DATA_ERR_NUM` reader - The value of this signal means the number of error bytes."]
12pub type USR_DATA_ERR_NUM_R = crate::FieldReader;
13#[doc = "Field `USR_DATA_FAIL` reader - 0: Means no failure and that the user data is reliable 1: Means that programming user data failed and the number of error bytes is over 6."]
14pub type USR_DATA_FAIL_R = crate::BitReader;
15#[doc = "Field `KEY0_ERR_NUM` reader - The value of this signal means the number of error bytes."]
16pub type KEY0_ERR_NUM_R = crate::FieldReader;
17#[doc = "Field `KEY0_FAIL` reader - 0: Means no failure and that the data of key0 is reliable 1: Means that programming key0 failed and the number of error bytes is over 6."]
18pub type KEY0_FAIL_R = crate::BitReader;
19#[doc = "Field `KEY1_ERR_NUM` reader - The value of this signal means the number of error bytes."]
20pub type KEY1_ERR_NUM_R = crate::FieldReader;
21#[doc = "Field `KEY1_FAIL` reader - 0: Means no failure and that the data of key1 is reliable 1: Means that programming key1 failed and the number of error bytes is over 6."]
22pub type KEY1_FAIL_R = crate::BitReader;
23#[doc = "Field `KEY2_ERR_NUM` reader - The value of this signal means the number of error bytes."]
24pub type KEY2_ERR_NUM_R = crate::FieldReader;
25#[doc = "Field `KEY2_FAIL` reader - 0: Means no failure and that the data of key2 is reliable 1: Means that programming key2 failed and the number of error bytes is over 6."]
26pub type KEY2_FAIL_R = crate::BitReader;
27#[doc = "Field `KEY3_ERR_NUM` reader - The value of this signal means the number of error bytes."]
28pub type KEY3_ERR_NUM_R = crate::FieldReader;
29#[doc = "Field `KEY3_FAIL` reader - 0: Means no failure and that the data of key3 is reliable 1: Means that programming key3 failed and the number of error bytes is over 6."]
30pub type KEY3_FAIL_R = crate::BitReader;
31#[doc = "Field `KEY4_ERR_NUM` reader - The value of this signal means the number of error bytes."]
32pub type KEY4_ERR_NUM_R = crate::FieldReader;
33#[doc = "Field `KEY4_FAIL` reader - 0: Means no failure and that the data of key4 is reliable 1: Means that programming key4 failed and the number of error bytes is over 6."]
34pub type KEY4_FAIL_R = crate::BitReader;
35impl R {
36 #[doc = "Bits 0:2 - The value of this signal means the number of error bytes."]
37 #[inline(always)]
38 pub fn mac_spi_8m_err_num(&self) -> MAC_SPI_8M_ERR_NUM_R {
39 MAC_SPI_8M_ERR_NUM_R::new((self.bits & 7) as u8)
40 }
41 #[doc = "Bit 3 - 0: Means no failure and that the data of MAC_SPI_8M is reliable 1: Means that programming user data failed and the number of error bytes is over 6."]
42 #[inline(always)]
43 pub fn mac_spi_8m_fail(&self) -> MAC_SPI_8M_FAIL_R {
44 MAC_SPI_8M_FAIL_R::new(((self.bits >> 3) & 1) != 0)
45 }
46 #[doc = "Bits 4:6 - The value of this signal means the number of error bytes."]
47 #[inline(always)]
48 pub fn sys_part1_num(&self) -> SYS_PART1_NUM_R {
49 SYS_PART1_NUM_R::new(((self.bits >> 4) & 7) as u8)
50 }
51 #[doc = "Bit 7 - 0: Means no failure and that the data of system part1 is reliable 1: Means that programming user data failed and the number of error bytes is over 6."]
52 #[inline(always)]
53 pub fn sys_part1_fail(&self) -> SYS_PART1_FAIL_R {
54 SYS_PART1_FAIL_R::new(((self.bits >> 7) & 1) != 0)
55 }
56 #[doc = "Bits 8:10 - The value of this signal means the number of error bytes."]
57 #[inline(always)]
58 pub fn usr_data_err_num(&self) -> USR_DATA_ERR_NUM_R {
59 USR_DATA_ERR_NUM_R::new(((self.bits >> 8) & 7) as u8)
60 }
61 #[doc = "Bit 11 - 0: Means no failure and that the user data is reliable 1: Means that programming user data failed and the number of error bytes is over 6."]
62 #[inline(always)]
63 pub fn usr_data_fail(&self) -> USR_DATA_FAIL_R {
64 USR_DATA_FAIL_R::new(((self.bits >> 11) & 1) != 0)
65 }
66 #[doc = "Bits 12:14 - The value of this signal means the number of error bytes."]
67 #[inline(always)]
68 pub fn key0_err_num(&self) -> KEY0_ERR_NUM_R {
69 KEY0_ERR_NUM_R::new(((self.bits >> 12) & 7) as u8)
70 }
71 #[doc = "Bit 15 - 0: Means no failure and that the data of key0 is reliable 1: Means that programming key0 failed and the number of error bytes is over 6."]
72 #[inline(always)]
73 pub fn key0_fail(&self) -> KEY0_FAIL_R {
74 KEY0_FAIL_R::new(((self.bits >> 15) & 1) != 0)
75 }
76 #[doc = "Bits 16:18 - The value of this signal means the number of error bytes."]
77 #[inline(always)]
78 pub fn key1_err_num(&self) -> KEY1_ERR_NUM_R {
79 KEY1_ERR_NUM_R::new(((self.bits >> 16) & 7) as u8)
80 }
81 #[doc = "Bit 19 - 0: Means no failure and that the data of key1 is reliable 1: Means that programming key1 failed and the number of error bytes is over 6."]
82 #[inline(always)]
83 pub fn key1_fail(&self) -> KEY1_FAIL_R {
84 KEY1_FAIL_R::new(((self.bits >> 19) & 1) != 0)
85 }
86 #[doc = "Bits 20:22 - The value of this signal means the number of error bytes."]
87 #[inline(always)]
88 pub fn key2_err_num(&self) -> KEY2_ERR_NUM_R {
89 KEY2_ERR_NUM_R::new(((self.bits >> 20) & 7) as u8)
90 }
91 #[doc = "Bit 23 - 0: Means no failure and that the data of key2 is reliable 1: Means that programming key2 failed and the number of error bytes is over 6."]
92 #[inline(always)]
93 pub fn key2_fail(&self) -> KEY2_FAIL_R {
94 KEY2_FAIL_R::new(((self.bits >> 23) & 1) != 0)
95 }
96 #[doc = "Bits 24:26 - The value of this signal means the number of error bytes."]
97 #[inline(always)]
98 pub fn key3_err_num(&self) -> KEY3_ERR_NUM_R {
99 KEY3_ERR_NUM_R::new(((self.bits >> 24) & 7) as u8)
100 }
101 #[doc = "Bit 27 - 0: Means no failure and that the data of key3 is reliable 1: Means that programming key3 failed and the number of error bytes is over 6."]
102 #[inline(always)]
103 pub fn key3_fail(&self) -> KEY3_FAIL_R {
104 KEY3_FAIL_R::new(((self.bits >> 27) & 1) != 0)
105 }
106 #[doc = "Bits 28:30 - The value of this signal means the number of error bytes."]
107 #[inline(always)]
108 pub fn key4_err_num(&self) -> KEY4_ERR_NUM_R {
109 KEY4_ERR_NUM_R::new(((self.bits >> 28) & 7) as u8)
110 }
111 #[doc = "Bit 31 - 0: Means no failure and that the data of key4 is reliable 1: Means that programming key4 failed and the number of error bytes is over 6."]
112 #[inline(always)]
113 pub fn key4_fail(&self) -> KEY4_FAIL_R {
114 KEY4_FAIL_R::new(((self.bits >> 31) & 1) != 0)
115 }
116}
117#[cfg(feature = "impl-register-debug")]
118impl core::fmt::Debug for R {
119 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
120 f.debug_struct("RD_RS_ERR0")
121 .field("mac_spi_8m_err_num", &self.mac_spi_8m_err_num())
122 .field("mac_spi_8m_fail", &self.mac_spi_8m_fail())
123 .field("sys_part1_num", &self.sys_part1_num())
124 .field("sys_part1_fail", &self.sys_part1_fail())
125 .field("usr_data_err_num", &self.usr_data_err_num())
126 .field("usr_data_fail", &self.usr_data_fail())
127 .field("key0_err_num", &self.key0_err_num())
128 .field("key0_fail", &self.key0_fail())
129 .field("key1_err_num", &self.key1_err_num())
130 .field("key1_fail", &self.key1_fail())
131 .field("key2_err_num", &self.key2_err_num())
132 .field("key2_fail", &self.key2_fail())
133 .field("key3_err_num", &self.key3_err_num())
134 .field("key3_fail", &self.key3_fail())
135 .field("key4_err_num", &self.key4_err_num())
136 .field("key4_fail", &self.key4_fail())
137 .finish()
138 }
139}
140#[doc = "Programming error record register 0 of BLOCK1-10.\n\nYou can [`read`](crate::Reg::read) this register and get [`rd_rs_err0::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
141pub struct RD_RS_ERR0_SPEC;
142impl crate::RegisterSpec for RD_RS_ERR0_SPEC {
143 type Ux = u32;
144}
145#[doc = "`read()` method returns [`rd_rs_err0::R`](R) reader structure"]
146impl crate::Readable for RD_RS_ERR0_SPEC {}
147#[doc = "`reset()` method sets RD_RS_ERR0 to value 0"]
148impl crate::Resettable for RD_RS_ERR0_SPEC {
149 const RESET_VALUE: u32 = 0;
150}