1#[doc = "Register `STATUS` reader"]
2pub type R = crate::R<STATUS_SPEC>;
3#[doc = "Field `STATE` reader - Indicates the state of the eFuse state machine."]
4pub type STATE_R = crate::FieldReader;
5#[doc = "Field `OTP_LOAD_SW` reader - The value of OTP_LOAD_SW."]
6pub type OTP_LOAD_SW_R = crate::BitReader;
7#[doc = "Field `OTP_VDDQ_C_SYNC2` reader - The value of OTP_VDDQ_C_SYNC2."]
8pub type OTP_VDDQ_C_SYNC2_R = crate::BitReader;
9#[doc = "Field `OTP_STROBE_SW` reader - The value of OTP_STROBE_SW."]
10pub type OTP_STROBE_SW_R = crate::BitReader;
11#[doc = "Field `OTP_CSB_SW` reader - The value of OTP_CSB_SW."]
12pub type OTP_CSB_SW_R = crate::BitReader;
13#[doc = "Field `OTP_PGENB_SW` reader - The value of OTP_PGENB_SW."]
14pub type OTP_PGENB_SW_R = crate::BitReader;
15#[doc = "Field `OTP_VDDQ_IS_SW` reader - The value of OTP_VDDQ_IS_SW."]
16pub type OTP_VDDQ_IS_SW_R = crate::BitReader;
17#[doc = "Field `BLK0_VALID_BIT_CNT` reader - Indicates the number of block valid bit."]
18pub type BLK0_VALID_BIT_CNT_R = crate::FieldReader<u16>;
19#[doc = "Field `CUR_ECDSA_BLK` reader - Indicates which block is used for ECDSA key output."]
20pub type CUR_ECDSA_BLK_R = crate::FieldReader;
21impl R {
22    #[doc = "Bits 0:3 - Indicates the state of the eFuse state machine."]
23    #[inline(always)]
24    pub fn state(&self) -> STATE_R {
25        STATE_R::new((self.bits & 0x0f) as u8)
26    }
27    #[doc = "Bit 4 - The value of OTP_LOAD_SW."]
28    #[inline(always)]
29    pub fn otp_load_sw(&self) -> OTP_LOAD_SW_R {
30        OTP_LOAD_SW_R::new(((self.bits >> 4) & 1) != 0)
31    }
32    #[doc = "Bit 5 - The value of OTP_VDDQ_C_SYNC2."]
33    #[inline(always)]
34    pub fn otp_vddq_c_sync2(&self) -> OTP_VDDQ_C_SYNC2_R {
35        OTP_VDDQ_C_SYNC2_R::new(((self.bits >> 5) & 1) != 0)
36    }
37    #[doc = "Bit 6 - The value of OTP_STROBE_SW."]
38    #[inline(always)]
39    pub fn otp_strobe_sw(&self) -> OTP_STROBE_SW_R {
40        OTP_STROBE_SW_R::new(((self.bits >> 6) & 1) != 0)
41    }
42    #[doc = "Bit 7 - The value of OTP_CSB_SW."]
43    #[inline(always)]
44    pub fn otp_csb_sw(&self) -> OTP_CSB_SW_R {
45        OTP_CSB_SW_R::new(((self.bits >> 7) & 1) != 0)
46    }
47    #[doc = "Bit 8 - The value of OTP_PGENB_SW."]
48    #[inline(always)]
49    pub fn otp_pgenb_sw(&self) -> OTP_PGENB_SW_R {
50        OTP_PGENB_SW_R::new(((self.bits >> 8) & 1) != 0)
51    }
52    #[doc = "Bit 9 - The value of OTP_VDDQ_IS_SW."]
53    #[inline(always)]
54    pub fn otp_vddq_is_sw(&self) -> OTP_VDDQ_IS_SW_R {
55        OTP_VDDQ_IS_SW_R::new(((self.bits >> 9) & 1) != 0)
56    }
57    #[doc = "Bits 10:19 - Indicates the number of block valid bit."]
58    #[inline(always)]
59    pub fn blk0_valid_bit_cnt(&self) -> BLK0_VALID_BIT_CNT_R {
60        BLK0_VALID_BIT_CNT_R::new(((self.bits >> 10) & 0x03ff) as u16)
61    }
62    #[doc = "Bits 20:23 - Indicates which block is used for ECDSA key output."]
63    #[inline(always)]
64    pub fn cur_ecdsa_blk(&self) -> CUR_ECDSA_BLK_R {
65        CUR_ECDSA_BLK_R::new(((self.bits >> 20) & 0x0f) as u8)
66    }
67}
68#[cfg(feature = "impl-register-debug")]
69impl core::fmt::Debug for R {
70    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
71        f.debug_struct("STATUS")
72            .field("state", &self.state())
73            .field("otp_load_sw", &self.otp_load_sw())
74            .field("otp_vddq_c_sync2", &self.otp_vddq_c_sync2())
75            .field("otp_strobe_sw", &self.otp_strobe_sw())
76            .field("otp_csb_sw", &self.otp_csb_sw())
77            .field("otp_pgenb_sw", &self.otp_pgenb_sw())
78            .field("otp_vddq_is_sw", &self.otp_vddq_is_sw())
79            .field("blk0_valid_bit_cnt", &self.blk0_valid_bit_cnt())
80            .field("cur_ecdsa_blk", &self.cur_ecdsa_blk())
81            .finish()
82    }
83}
84#[doc = "eFuse status register.\n\nYou can [`read`](crate::Reg::read) this register and get [`status::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
85pub struct STATUS_SPEC;
86impl crate::RegisterSpec for STATUS_SPEC {
87    type Ux = u32;
88}
89#[doc = "`read()` method returns [`status::R`](R) reader structure"]
90impl crate::Readable for STATUS_SPEC {}
91#[doc = "`reset()` method sets STATUS to value 0"]
92impl crate::Resettable for STATUS_SPEC {
93    const RESET_VALUE: u32 = 0;
94}