esp32c2/efuse/
rd_rs_err.rs1#[doc = "Register `RD_RS_ERR` reader"]
2pub type R = crate::R<RD_RS_ERR_SPEC>;
3#[doc = "Field `BLK1_ERR_NUM` reader - The value of this signal means the number of error bytes in block1."]
4pub type BLK1_ERR_NUM_R = crate::FieldReader;
5#[doc = "Field `BLK1_FAIL` reader - 0: Means no failure and that the data of block1 is reliable 1: Means that programming user data failed and the number of error bytes is over 6."]
6pub type BLK1_FAIL_R = crate::BitReader;
7#[doc = "Field `BLK2_ERR_NUM` reader - The value of this signal means the number of error bytes in block2."]
8pub type BLK2_ERR_NUM_R = crate::FieldReader;
9#[doc = "Field `BLK2_FAIL` reader - 0: Means no failure and that the data of block2 is reliable 1: Means that programming user data failed and the number of error bytes is over 6."]
10pub type BLK2_FAIL_R = crate::BitReader;
11#[doc = "Field `BLK3_ERR_NUM` reader - The value of this signal means the number of error bytes in block3."]
12pub type BLK3_ERR_NUM_R = crate::FieldReader;
13#[doc = "Field `BLK3_FAIL` reader - 0: Means no failure and that the block3 data is reliable 1: Means that programming user data failed and the number of error bytes is over 6."]
14pub type BLK3_FAIL_R = crate::BitReader;
15impl R {
16 #[doc = "Bits 0:2 - The value of this signal means the number of error bytes in block1."]
17 #[inline(always)]
18 pub fn blk1_err_num(&self) -> BLK1_ERR_NUM_R {
19 BLK1_ERR_NUM_R::new((self.bits & 7) as u8)
20 }
21 #[doc = "Bit 3 - 0: Means no failure and that the data of block1 is reliable 1: Means that programming user data failed and the number of error bytes is over 6."]
22 #[inline(always)]
23 pub fn blk1_fail(&self) -> BLK1_FAIL_R {
24 BLK1_FAIL_R::new(((self.bits >> 3) & 1) != 0)
25 }
26 #[doc = "Bits 4:6 - The value of this signal means the number of error bytes in block2."]
27 #[inline(always)]
28 pub fn blk2_err_num(&self) -> BLK2_ERR_NUM_R {
29 BLK2_ERR_NUM_R::new(((self.bits >> 4) & 7) as u8)
30 }
31 #[doc = "Bit 7 - 0: Means no failure and that the data of block2 is reliable 1: Means that programming user data failed and the number of error bytes is over 6."]
32 #[inline(always)]
33 pub fn blk2_fail(&self) -> BLK2_FAIL_R {
34 BLK2_FAIL_R::new(((self.bits >> 7) & 1) != 0)
35 }
36 #[doc = "Bits 8:10 - The value of this signal means the number of error bytes in block3."]
37 #[inline(always)]
38 pub fn blk3_err_num(&self) -> BLK3_ERR_NUM_R {
39 BLK3_ERR_NUM_R::new(((self.bits >> 8) & 7) as u8)
40 }
41 #[doc = "Bit 11 - 0: Means no failure and that the block3 data is reliable 1: Means that programming user data failed and the number of error bytes is over 6."]
42 #[inline(always)]
43 pub fn blk3_fail(&self) -> BLK3_FAIL_R {
44 BLK3_FAIL_R::new(((self.bits >> 11) & 1) != 0)
45 }
46}
47#[cfg(feature = "impl-register-debug")]
48impl core::fmt::Debug for R {
49 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
50 f.debug_struct("RD_RS_ERR")
51 .field("blk1_err_num", &self.blk1_err_num())
52 .field("blk1_fail", &self.blk1_fail())
53 .field("blk2_err_num", &self.blk2_err_num())
54 .field("blk2_fail", &self.blk2_fail())
55 .field("blk3_err_num", &self.blk3_err_num())
56 .field("blk3_fail", &self.blk3_fail())
57 .finish()
58 }
59}
60#[doc = "Programming error record register 0 of BLOCK1-10.\n\nYou can [`read`](crate::Reg::read) this register and get [`rd_rs_err::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
61pub struct RD_RS_ERR_SPEC;
62impl crate::RegisterSpec for RD_RS_ERR_SPEC {
63 type Ux = u32;
64}
65#[doc = "`read()` method returns [`rd_rs_err::R`](R) reader structure"]
66impl crate::Readable for RD_RS_ERR_SPEC {}
67#[doc = "`reset()` method sets RD_RS_ERR to value 0"]
68impl crate::Resettable for RD_RS_ERR_SPEC {
69 const RESET_VALUE: u32 = 0;
70}