esp32c3/efuse/
rd_rs_err1.rs

1#[doc = "Register `RD_RS_ERR1` reader"]
2pub type R = crate::R<RD_RS_ERR1_SPEC>;
3#[doc = "Field `KEY5_ERR_NUM` reader - The value of this signal means the number of error bytes."]
4pub type KEY5_ERR_NUM_R = crate::FieldReader;
5#[doc = "Field `KEY5_FAIL` reader - 0: Means no failure and that the data of KEY5 is reliable 1: Means that programming user data failed and the number of error bytes is over 6."]
6pub type KEY5_FAIL_R = crate::BitReader;
7#[doc = "Field `SYS_PART2_ERR_NUM` reader - The value of this signal means the number of error bytes."]
8pub type SYS_PART2_ERR_NUM_R = crate::FieldReader;
9#[doc = "Field `SYS_PART2_FAIL` reader - 0: Means no failure and that the data of system part2 is reliable 1: Means that programming user data failed and the number of error bytes is over 6."]
10pub type SYS_PART2_FAIL_R = crate::BitReader;
11impl R {
12    #[doc = "Bits 0:2 - The value of this signal means the number of error bytes."]
13    #[inline(always)]
14    pub fn key5_err_num(&self) -> KEY5_ERR_NUM_R {
15        KEY5_ERR_NUM_R::new((self.bits & 7) as u8)
16    }
17    #[doc = "Bit 3 - 0: Means no failure and that the data of KEY5 is reliable 1: Means that programming user data failed and the number of error bytes is over 6."]
18    #[inline(always)]
19    pub fn key5_fail(&self) -> KEY5_FAIL_R {
20        KEY5_FAIL_R::new(((self.bits >> 3) & 1) != 0)
21    }
22    #[doc = "Bits 4:6 - The value of this signal means the number of error bytes."]
23    #[inline(always)]
24    pub fn sys_part2_err_num(&self) -> SYS_PART2_ERR_NUM_R {
25        SYS_PART2_ERR_NUM_R::new(((self.bits >> 4) & 7) as u8)
26    }
27    #[doc = "Bit 7 - 0: Means no failure and that the data of system part2 is reliable 1: Means that programming user data failed and the number of error bytes is over 6."]
28    #[inline(always)]
29    pub fn sys_part2_fail(&self) -> SYS_PART2_FAIL_R {
30        SYS_PART2_FAIL_R::new(((self.bits >> 7) & 1) != 0)
31    }
32}
33#[cfg(feature = "impl-register-debug")]
34impl core::fmt::Debug for R {
35    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
36        f.debug_struct("RD_RS_ERR1")
37            .field("key5_err_num", &self.key5_err_num())
38            .field("key5_fail", &self.key5_fail())
39            .field("sys_part2_err_num", &self.sys_part2_err_num())
40            .field("sys_part2_fail", &self.sys_part2_fail())
41            .finish()
42    }
43}
44#[doc = "Programming error record register 1 of BLOCK1-10.\n\nYou can [`read`](crate::Reg::read) this register and get [`rd_rs_err1::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
45pub struct RD_RS_ERR1_SPEC;
46impl crate::RegisterSpec for RD_RS_ERR1_SPEC {
47    type Ux = u32;
48}
49#[doc = "`read()` method returns [`rd_rs_err1::R`](R) reader structure"]
50impl crate::Readable for RD_RS_ERR1_SPEC {}
51#[doc = "`reset()` method sets RD_RS_ERR1 to value 0"]
52impl crate::Resettable for RD_RS_ERR1_SPEC {}