esp32s2/efuse/
rd_repeat_data0.rs

1#[doc = "Register `RD_REPEAT_DATA0` reader"]
2pub type R = crate::R<RD_REPEAT_DATA0_SPEC>;
3#[doc = "Field `RD_DIS` reader - Disables software reading from individual eFuse blocks (BLOCK4-10)."]
4pub type RD_DIS_R = crate::FieldReader;
5#[doc = "Field `DIS_RTC_RAM_BOOT` reader - Reserved."]
6pub type DIS_RTC_RAM_BOOT_R = crate::BitReader;
7#[doc = "Field `DIS_ICACHE` reader - Set this bit to disable Icache."]
8pub type DIS_ICACHE_R = crate::BitReader;
9#[doc = "Field `DIS_DCACHE` reader - Set this bit to disable Dcache."]
10pub type DIS_DCACHE_R = crate::BitReader;
11#[doc = "Field `DIS_DOWNLOAD_ICACHE` reader - Disables Icache when SoC is in Download mode."]
12pub type DIS_DOWNLOAD_ICACHE_R = crate::BitReader;
13#[doc = "Field `DIS_DOWNLOAD_DCACHE` reader - Disables Dcache when SoC is in Download mode."]
14pub type DIS_DOWNLOAD_DCACHE_R = crate::BitReader;
15#[doc = "Field `DIS_FORCE_DOWNLOAD` reader - Set this bit to disable the function that forces chip into download mode."]
16pub type DIS_FORCE_DOWNLOAD_R = crate::BitReader;
17#[doc = "Field `DIS_USB` reader - Set this bit to disable USB OTG function."]
18pub type DIS_USB_R = crate::BitReader;
19#[doc = "Field `DIS_CAN` reader - Set this bit to disable the TWAI Controller function."]
20pub type DIS_CAN_R = crate::BitReader;
21#[doc = "Field `DIS_BOOT_REMAP` reader - Disables capability to Remap RAM to ROM address space."]
22pub type DIS_BOOT_REMAP_R = crate::BitReader;
23#[doc = "Field `RPT4_RESERVED5` reader - Reserved (used for four backups method)."]
24pub type RPT4_RESERVED5_R = crate::BitReader;
25#[doc = "Field `SOFT_DIS_JTAG` reader - Software disables JTAG. When software disabled, JTAG can be activated temporarily by HMAC peripheral."]
26pub type SOFT_DIS_JTAG_R = crate::BitReader;
27#[doc = "Field `HARD_DIS_JTAG` reader - Hardware disables JTAG permanently."]
28pub type HARD_DIS_JTAG_R = crate::BitReader;
29#[doc = "Field `DIS_DOWNLOAD_MANUAL_ENCRYPT` reader - Disables flash encryption when in download boot modes."]
30pub type DIS_DOWNLOAD_MANUAL_ENCRYPT_R = crate::BitReader;
31#[doc = "Field `USB_DREFH` reader - Controls single-end input threshold vrefh, 1.76 V to 2 V with step of 80 mV, stored in eFuse."]
32pub type USB_DREFH_R = crate::FieldReader;
33#[doc = "Field `USB_DREFL` reader - Controls single-end input threshold vrefl, 0.8 V to 1.04 V with step of 80 mV, stored in eFuse."]
34pub type USB_DREFL_R = crate::FieldReader;
35#[doc = "Field `USB_EXCHG_PINS` reader - Set this bit to exchange USB D+ and D- pins."]
36pub type USB_EXCHG_PINS_R = crate::BitReader;
37#[doc = "Field `EXT_PHY_ENABLE` reader - Set this bit to enable external USB PHY."]
38pub type EXT_PHY_ENABLE_R = crate::BitReader;
39#[doc = "Field `USB_FORCE_NOPERSIST` reader - If set, forces USB BVALID to 1."]
40pub type USB_FORCE_NOPERSIST_R = crate::BitReader;
41#[doc = "Field `RPT4_RESERVED0` reader - Reserved (used for four backups method)."]
42pub type RPT4_RESERVED0_R = crate::FieldReader;
43#[doc = "Field `VDD_SPI_MODECURLIM` reader - SPI regulator switches current limit mode."]
44pub type VDD_SPI_MODECURLIM_R = crate::BitReader;
45#[doc = "Field `VDD_SPI_DREFH` reader - SPI regulator high voltage reference."]
46pub type VDD_SPI_DREFH_R = crate::FieldReader;
47impl R {
48    #[doc = "Bits 0:6 - Disables software reading from individual eFuse blocks (BLOCK4-10)."]
49    #[inline(always)]
50    pub fn rd_dis(&self) -> RD_DIS_R {
51        RD_DIS_R::new((self.bits & 0x7f) as u8)
52    }
53    #[doc = "Bit 7 - Reserved."]
54    #[inline(always)]
55    pub fn dis_rtc_ram_boot(&self) -> DIS_RTC_RAM_BOOT_R {
56        DIS_RTC_RAM_BOOT_R::new(((self.bits >> 7) & 1) != 0)
57    }
58    #[doc = "Bit 8 - Set this bit to disable Icache."]
59    #[inline(always)]
60    pub fn dis_icache(&self) -> DIS_ICACHE_R {
61        DIS_ICACHE_R::new(((self.bits >> 8) & 1) != 0)
62    }
63    #[doc = "Bit 9 - Set this bit to disable Dcache."]
64    #[inline(always)]
65    pub fn dis_dcache(&self) -> DIS_DCACHE_R {
66        DIS_DCACHE_R::new(((self.bits >> 9) & 1) != 0)
67    }
68    #[doc = "Bit 10 - Disables Icache when SoC is in Download mode."]
69    #[inline(always)]
70    pub fn dis_download_icache(&self) -> DIS_DOWNLOAD_ICACHE_R {
71        DIS_DOWNLOAD_ICACHE_R::new(((self.bits >> 10) & 1) != 0)
72    }
73    #[doc = "Bit 11 - Disables Dcache when SoC is in Download mode."]
74    #[inline(always)]
75    pub fn dis_download_dcache(&self) -> DIS_DOWNLOAD_DCACHE_R {
76        DIS_DOWNLOAD_DCACHE_R::new(((self.bits >> 11) & 1) != 0)
77    }
78    #[doc = "Bit 12 - Set this bit to disable the function that forces chip into download mode."]
79    #[inline(always)]
80    pub fn dis_force_download(&self) -> DIS_FORCE_DOWNLOAD_R {
81        DIS_FORCE_DOWNLOAD_R::new(((self.bits >> 12) & 1) != 0)
82    }
83    #[doc = "Bit 13 - Set this bit to disable USB OTG function."]
84    #[inline(always)]
85    pub fn dis_usb(&self) -> DIS_USB_R {
86        DIS_USB_R::new(((self.bits >> 13) & 1) != 0)
87    }
88    #[doc = "Bit 14 - Set this bit to disable the TWAI Controller function."]
89    #[inline(always)]
90    pub fn dis_can(&self) -> DIS_CAN_R {
91        DIS_CAN_R::new(((self.bits >> 14) & 1) != 0)
92    }
93    #[doc = "Bit 15 - Disables capability to Remap RAM to ROM address space."]
94    #[inline(always)]
95    pub fn dis_boot_remap(&self) -> DIS_BOOT_REMAP_R {
96        DIS_BOOT_REMAP_R::new(((self.bits >> 15) & 1) != 0)
97    }
98    #[doc = "Bit 16 - Reserved (used for four backups method)."]
99    #[inline(always)]
100    pub fn rpt4_reserved5(&self) -> RPT4_RESERVED5_R {
101        RPT4_RESERVED5_R::new(((self.bits >> 16) & 1) != 0)
102    }
103    #[doc = "Bit 17 - Software disables JTAG. When software disabled, JTAG can be activated temporarily by HMAC peripheral."]
104    #[inline(always)]
105    pub fn soft_dis_jtag(&self) -> SOFT_DIS_JTAG_R {
106        SOFT_DIS_JTAG_R::new(((self.bits >> 17) & 1) != 0)
107    }
108    #[doc = "Bit 18 - Hardware disables JTAG permanently."]
109    #[inline(always)]
110    pub fn hard_dis_jtag(&self) -> HARD_DIS_JTAG_R {
111        HARD_DIS_JTAG_R::new(((self.bits >> 18) & 1) != 0)
112    }
113    #[doc = "Bit 19 - Disables flash encryption when in download boot modes."]
114    #[inline(always)]
115    pub fn dis_download_manual_encrypt(&self) -> DIS_DOWNLOAD_MANUAL_ENCRYPT_R {
116        DIS_DOWNLOAD_MANUAL_ENCRYPT_R::new(((self.bits >> 19) & 1) != 0)
117    }
118    #[doc = "Bits 20:21 - Controls single-end input threshold vrefh, 1.76 V to 2 V with step of 80 mV, stored in eFuse."]
119    #[inline(always)]
120    pub fn usb_drefh(&self) -> USB_DREFH_R {
121        USB_DREFH_R::new(((self.bits >> 20) & 3) as u8)
122    }
123    #[doc = "Bits 22:23 - Controls single-end input threshold vrefl, 0.8 V to 1.04 V with step of 80 mV, stored in eFuse."]
124    #[inline(always)]
125    pub fn usb_drefl(&self) -> USB_DREFL_R {
126        USB_DREFL_R::new(((self.bits >> 22) & 3) as u8)
127    }
128    #[doc = "Bit 24 - Set this bit to exchange USB D+ and D- pins."]
129    #[inline(always)]
130    pub fn usb_exchg_pins(&self) -> USB_EXCHG_PINS_R {
131        USB_EXCHG_PINS_R::new(((self.bits >> 24) & 1) != 0)
132    }
133    #[doc = "Bit 25 - Set this bit to enable external USB PHY."]
134    #[inline(always)]
135    pub fn ext_phy_enable(&self) -> EXT_PHY_ENABLE_R {
136        EXT_PHY_ENABLE_R::new(((self.bits >> 25) & 1) != 0)
137    }
138    #[doc = "Bit 26 - If set, forces USB BVALID to 1."]
139    #[inline(always)]
140    pub fn usb_force_nopersist(&self) -> USB_FORCE_NOPERSIST_R {
141        USB_FORCE_NOPERSIST_R::new(((self.bits >> 26) & 1) != 0)
142    }
143    #[doc = "Bits 27:28 - Reserved (used for four backups method)."]
144    #[inline(always)]
145    pub fn rpt4_reserved0(&self) -> RPT4_RESERVED0_R {
146        RPT4_RESERVED0_R::new(((self.bits >> 27) & 3) as u8)
147    }
148    #[doc = "Bit 29 - SPI regulator switches current limit mode."]
149    #[inline(always)]
150    pub fn vdd_spi_modecurlim(&self) -> VDD_SPI_MODECURLIM_R {
151        VDD_SPI_MODECURLIM_R::new(((self.bits >> 29) & 1) != 0)
152    }
153    #[doc = "Bits 30:31 - SPI regulator high voltage reference."]
154    #[inline(always)]
155    pub fn vdd_spi_drefh(&self) -> VDD_SPI_DREFH_R {
156        VDD_SPI_DREFH_R::new(((self.bits >> 30) & 3) as u8)
157    }
158}
159#[cfg(feature = "impl-register-debug")]
160impl core::fmt::Debug for R {
161    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
162        f.debug_struct("RD_REPEAT_DATA0")
163            .field("rd_dis", &self.rd_dis())
164            .field("dis_rtc_ram_boot", &self.dis_rtc_ram_boot())
165            .field("dis_icache", &self.dis_icache())
166            .field("dis_dcache", &self.dis_dcache())
167            .field("dis_download_icache", &self.dis_download_icache())
168            .field("dis_download_dcache", &self.dis_download_dcache())
169            .field("dis_force_download", &self.dis_force_download())
170            .field("dis_usb", &self.dis_usb())
171            .field("dis_can", &self.dis_can())
172            .field("dis_boot_remap", &self.dis_boot_remap())
173            .field("rpt4_reserved5", &self.rpt4_reserved5())
174            .field("soft_dis_jtag", &self.soft_dis_jtag())
175            .field("hard_dis_jtag", &self.hard_dis_jtag())
176            .field(
177                "dis_download_manual_encrypt",
178                &self.dis_download_manual_encrypt(),
179            )
180            .field("usb_drefh", &self.usb_drefh())
181            .field("usb_drefl", &self.usb_drefl())
182            .field("usb_exchg_pins", &self.usb_exchg_pins())
183            .field("ext_phy_enable", &self.ext_phy_enable())
184            .field("usb_force_nopersist", &self.usb_force_nopersist())
185            .field("rpt4_reserved0", &self.rpt4_reserved0())
186            .field("vdd_spi_modecurlim", &self.vdd_spi_modecurlim())
187            .field("vdd_spi_drefh", &self.vdd_spi_drefh())
188            .finish()
189    }
190}
191#[doc = "Register 1 of BLOCK0.\n\nYou can [`read`](crate::Reg::read) this register and get [`rd_repeat_data0::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
192pub struct RD_REPEAT_DATA0_SPEC;
193impl crate::RegisterSpec for RD_REPEAT_DATA0_SPEC {
194    type Ux = u32;
195}
196#[doc = "`read()` method returns [`rd_repeat_data0::R`](R) reader structure"]
197impl crate::Readable for RD_REPEAT_DATA0_SPEC {}
198#[doc = "`reset()` method sets RD_REPEAT_DATA0 to value 0"]
199impl crate::Resettable for RD_REPEAT_DATA0_SPEC {}