esp32c6_lp/lp_peri/
reset_en.rs1#[doc = "Register `RESET_EN` reader"]
2pub type R = crate::R<RESET_EN_SPEC>;
3#[doc = "Register `RESET_EN` writer"]
4pub type W = crate::W<RESET_EN_SPEC>;
5#[doc = "Field `BUS_RESET_EN` writer - need_des"]
6pub type BUS_RESET_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
7#[doc = "Field `LP_TOUCH_RESET_EN` reader - need_des"]
8pub type LP_TOUCH_RESET_EN_R = crate::BitReader;
9#[doc = "Field `LP_TOUCH_RESET_EN` writer - need_des"]
10pub type LP_TOUCH_RESET_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
11#[doc = "Field `OTP_DBG_RESET_EN` reader - need_des"]
12pub type OTP_DBG_RESET_EN_R = crate::BitReader;
13#[doc = "Field `OTP_DBG_RESET_EN` writer - need_des"]
14pub type OTP_DBG_RESET_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
15#[doc = "Field `LP_UART_RESET_EN` reader - need_des"]
16pub type LP_UART_RESET_EN_R = crate::BitReader;
17#[doc = "Field `LP_UART_RESET_EN` writer - need_des"]
18pub type LP_UART_RESET_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
19#[doc = "Field `LP_IO_RESET_EN` reader - need_des"]
20pub type LP_IO_RESET_EN_R = crate::BitReader;
21#[doc = "Field `LP_IO_RESET_EN` writer - need_des"]
22pub type LP_IO_RESET_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
23#[doc = "Field `LP_EXT_I2C_RESET_EN` reader - need_des"]
24pub type LP_EXT_I2C_RESET_EN_R = crate::BitReader;
25#[doc = "Field `LP_EXT_I2C_RESET_EN` writer - need_des"]
26pub type LP_EXT_I2C_RESET_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
27#[doc = "Field `LP_ANA_I2C_RESET_EN` reader - need_des"]
28pub type LP_ANA_I2C_RESET_EN_R = crate::BitReader;
29#[doc = "Field `LP_ANA_I2C_RESET_EN` writer - need_des"]
30pub type LP_ANA_I2C_RESET_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
31#[doc = "Field `EFUSE_RESET_EN` reader - need_des"]
32pub type EFUSE_RESET_EN_R = crate::BitReader;
33#[doc = "Field `EFUSE_RESET_EN` writer - need_des"]
34pub type EFUSE_RESET_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
35#[doc = "Field `LP_CPU_RESET_EN` writer - need_des"]
36pub type LP_CPU_RESET_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
37impl R {
38 #[doc = "Bit 24 - need_des"]
39 #[inline(always)]
40 pub fn lp_touch_reset_en(&self) -> LP_TOUCH_RESET_EN_R {
41 LP_TOUCH_RESET_EN_R::new(((self.bits >> 24) & 1) != 0)
42 }
43 #[doc = "Bit 25 - need_des"]
44 #[inline(always)]
45 pub fn otp_dbg_reset_en(&self) -> OTP_DBG_RESET_EN_R {
46 OTP_DBG_RESET_EN_R::new(((self.bits >> 25) & 1) != 0)
47 }
48 #[doc = "Bit 26 - need_des"]
49 #[inline(always)]
50 pub fn lp_uart_reset_en(&self) -> LP_UART_RESET_EN_R {
51 LP_UART_RESET_EN_R::new(((self.bits >> 26) & 1) != 0)
52 }
53 #[doc = "Bit 27 - need_des"]
54 #[inline(always)]
55 pub fn lp_io_reset_en(&self) -> LP_IO_RESET_EN_R {
56 LP_IO_RESET_EN_R::new(((self.bits >> 27) & 1) != 0)
57 }
58 #[doc = "Bit 28 - need_des"]
59 #[inline(always)]
60 pub fn lp_ext_i2c_reset_en(&self) -> LP_EXT_I2C_RESET_EN_R {
61 LP_EXT_I2C_RESET_EN_R::new(((self.bits >> 28) & 1) != 0)
62 }
63 #[doc = "Bit 29 - need_des"]
64 #[inline(always)]
65 pub fn lp_ana_i2c_reset_en(&self) -> LP_ANA_I2C_RESET_EN_R {
66 LP_ANA_I2C_RESET_EN_R::new(((self.bits >> 29) & 1) != 0)
67 }
68 #[doc = "Bit 30 - need_des"]
69 #[inline(always)]
70 pub fn efuse_reset_en(&self) -> EFUSE_RESET_EN_R {
71 EFUSE_RESET_EN_R::new(((self.bits >> 30) & 1) != 0)
72 }
73}
74#[cfg(feature = "impl-register-debug")]
75impl core::fmt::Debug for R {
76 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
77 f.debug_struct("RESET_EN")
78 .field("lp_touch_reset_en", &self.lp_touch_reset_en())
79 .field("otp_dbg_reset_en", &self.otp_dbg_reset_en())
80 .field("lp_uart_reset_en", &self.lp_uart_reset_en())
81 .field("lp_io_reset_en", &self.lp_io_reset_en())
82 .field("lp_ext_i2c_reset_en", &self.lp_ext_i2c_reset_en())
83 .field("lp_ana_i2c_reset_en", &self.lp_ana_i2c_reset_en())
84 .field("efuse_reset_en", &self.efuse_reset_en())
85 .finish()
86 }
87}
88impl W {
89 #[doc = "Bit 23 - need_des"]
90 #[inline(always)]
91 #[must_use]
92 pub fn bus_reset_en(&mut self) -> BUS_RESET_EN_W<RESET_EN_SPEC> {
93 BUS_RESET_EN_W::new(self, 23)
94 }
95 #[doc = "Bit 24 - need_des"]
96 #[inline(always)]
97 #[must_use]
98 pub fn lp_touch_reset_en(&mut self) -> LP_TOUCH_RESET_EN_W<RESET_EN_SPEC> {
99 LP_TOUCH_RESET_EN_W::new(self, 24)
100 }
101 #[doc = "Bit 25 - need_des"]
102 #[inline(always)]
103 #[must_use]
104 pub fn otp_dbg_reset_en(&mut self) -> OTP_DBG_RESET_EN_W<RESET_EN_SPEC> {
105 OTP_DBG_RESET_EN_W::new(self, 25)
106 }
107 #[doc = "Bit 26 - need_des"]
108 #[inline(always)]
109 #[must_use]
110 pub fn lp_uart_reset_en(&mut self) -> LP_UART_RESET_EN_W<RESET_EN_SPEC> {
111 LP_UART_RESET_EN_W::new(self, 26)
112 }
113 #[doc = "Bit 27 - need_des"]
114 #[inline(always)]
115 #[must_use]
116 pub fn lp_io_reset_en(&mut self) -> LP_IO_RESET_EN_W<RESET_EN_SPEC> {
117 LP_IO_RESET_EN_W::new(self, 27)
118 }
119 #[doc = "Bit 28 - need_des"]
120 #[inline(always)]
121 #[must_use]
122 pub fn lp_ext_i2c_reset_en(&mut self) -> LP_EXT_I2C_RESET_EN_W<RESET_EN_SPEC> {
123 LP_EXT_I2C_RESET_EN_W::new(self, 28)
124 }
125 #[doc = "Bit 29 - need_des"]
126 #[inline(always)]
127 #[must_use]
128 pub fn lp_ana_i2c_reset_en(&mut self) -> LP_ANA_I2C_RESET_EN_W<RESET_EN_SPEC> {
129 LP_ANA_I2C_RESET_EN_W::new(self, 29)
130 }
131 #[doc = "Bit 30 - need_des"]
132 #[inline(always)]
133 #[must_use]
134 pub fn efuse_reset_en(&mut self) -> EFUSE_RESET_EN_W<RESET_EN_SPEC> {
135 EFUSE_RESET_EN_W::new(self, 30)
136 }
137 #[doc = "Bit 31 - need_des"]
138 #[inline(always)]
139 #[must_use]
140 pub fn lp_cpu_reset_en(&mut self) -> LP_CPU_RESET_EN_W<RESET_EN_SPEC> {
141 LP_CPU_RESET_EN_W::new(self, 31)
142 }
143}
144#[doc = "need_des\n\nYou can [`read`](crate::Reg::read) this register and get [`reset_en::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`reset_en::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
145pub struct RESET_EN_SPEC;
146impl crate::RegisterSpec for RESET_EN_SPEC {
147 type Ux = u32;
148}
149#[doc = "`read()` method returns [`reset_en::R`](R) reader structure"]
150impl crate::Readable for RESET_EN_SPEC {}
151#[doc = "`write(|w| ..)` method takes [`reset_en::W`](W) writer structure"]
152impl crate::Writable for RESET_EN_SPEC {
153 type Safety = crate::Unsafe;
154 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
155 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
156}
157#[doc = "`reset()` method sets RESET_EN to value 0"]
158impl crate::Resettable for RESET_EN_SPEC {
159 const RESET_VALUE: u32 = 0;
160}