esp32c6_lp/lp_peri/
clk_en.rs

1#[doc = "Register `CLK_EN` reader"]
2pub type R = crate::R<CLK_EN_SPEC>;
3#[doc = "Register `CLK_EN` writer"]
4pub type W = crate::W<CLK_EN_SPEC>;
5#[doc = "Field `LP_TOUCH_CK_EN` reader - need_des"]
6pub type LP_TOUCH_CK_EN_R = crate::BitReader;
7#[doc = "Field `LP_TOUCH_CK_EN` writer - need_des"]
8pub type LP_TOUCH_CK_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `RNG_CK_EN` reader - need_des"]
10pub type RNG_CK_EN_R = crate::BitReader;
11#[doc = "Field `RNG_CK_EN` writer - need_des"]
12pub type RNG_CK_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `OTP_DBG_CK_EN` reader - need_des"]
14pub type OTP_DBG_CK_EN_R = crate::BitReader;
15#[doc = "Field `OTP_DBG_CK_EN` writer - need_des"]
16pub type OTP_DBG_CK_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `LP_UART_CK_EN` reader - need_des"]
18pub type LP_UART_CK_EN_R = crate::BitReader;
19#[doc = "Field `LP_UART_CK_EN` writer - need_des"]
20pub type LP_UART_CK_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `LP_IO_CK_EN` reader - need_des"]
22pub type LP_IO_CK_EN_R = crate::BitReader;
23#[doc = "Field `LP_IO_CK_EN` writer - need_des"]
24pub type LP_IO_CK_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `LP_EXT_I2C_CK_EN` reader - need_des"]
26pub type LP_EXT_I2C_CK_EN_R = crate::BitReader;
27#[doc = "Field `LP_EXT_I2C_CK_EN` writer - need_des"]
28pub type LP_EXT_I2C_CK_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `LP_ANA_I2C_CK_EN` reader - need_des"]
30pub type LP_ANA_I2C_CK_EN_R = crate::BitReader;
31#[doc = "Field `LP_ANA_I2C_CK_EN` writer - need_des"]
32pub type LP_ANA_I2C_CK_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `EFUSE_CK_EN` reader - need_des"]
34pub type EFUSE_CK_EN_R = crate::BitReader;
35#[doc = "Field `EFUSE_CK_EN` writer - need_des"]
36pub type EFUSE_CK_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `LP_CPU_CK_EN` reader - need_des"]
38pub type LP_CPU_CK_EN_R = crate::BitReader;
39#[doc = "Field `LP_CPU_CK_EN` writer - need_des"]
40pub type LP_CPU_CK_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
41impl R {
42    #[doc = "Bit 23 - need_des"]
43    #[inline(always)]
44    pub fn lp_touch_ck_en(&self) -> LP_TOUCH_CK_EN_R {
45        LP_TOUCH_CK_EN_R::new(((self.bits >> 23) & 1) != 0)
46    }
47    #[doc = "Bit 24 - need_des"]
48    #[inline(always)]
49    pub fn rng_ck_en(&self) -> RNG_CK_EN_R {
50        RNG_CK_EN_R::new(((self.bits >> 24) & 1) != 0)
51    }
52    #[doc = "Bit 25 - need_des"]
53    #[inline(always)]
54    pub fn otp_dbg_ck_en(&self) -> OTP_DBG_CK_EN_R {
55        OTP_DBG_CK_EN_R::new(((self.bits >> 25) & 1) != 0)
56    }
57    #[doc = "Bit 26 - need_des"]
58    #[inline(always)]
59    pub fn lp_uart_ck_en(&self) -> LP_UART_CK_EN_R {
60        LP_UART_CK_EN_R::new(((self.bits >> 26) & 1) != 0)
61    }
62    #[doc = "Bit 27 - need_des"]
63    #[inline(always)]
64    pub fn lp_io_ck_en(&self) -> LP_IO_CK_EN_R {
65        LP_IO_CK_EN_R::new(((self.bits >> 27) & 1) != 0)
66    }
67    #[doc = "Bit 28 - need_des"]
68    #[inline(always)]
69    pub fn lp_ext_i2c_ck_en(&self) -> LP_EXT_I2C_CK_EN_R {
70        LP_EXT_I2C_CK_EN_R::new(((self.bits >> 28) & 1) != 0)
71    }
72    #[doc = "Bit 29 - need_des"]
73    #[inline(always)]
74    pub fn lp_ana_i2c_ck_en(&self) -> LP_ANA_I2C_CK_EN_R {
75        LP_ANA_I2C_CK_EN_R::new(((self.bits >> 29) & 1) != 0)
76    }
77    #[doc = "Bit 30 - need_des"]
78    #[inline(always)]
79    pub fn efuse_ck_en(&self) -> EFUSE_CK_EN_R {
80        EFUSE_CK_EN_R::new(((self.bits >> 30) & 1) != 0)
81    }
82    #[doc = "Bit 31 - need_des"]
83    #[inline(always)]
84    pub fn lp_cpu_ck_en(&self) -> LP_CPU_CK_EN_R {
85        LP_CPU_CK_EN_R::new(((self.bits >> 31) & 1) != 0)
86    }
87}
88#[cfg(feature = "impl-register-debug")]
89impl core::fmt::Debug for R {
90    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
91        f.debug_struct("CLK_EN")
92            .field("lp_touch_ck_en", &self.lp_touch_ck_en())
93            .field("rng_ck_en", &self.rng_ck_en())
94            .field("otp_dbg_ck_en", &self.otp_dbg_ck_en())
95            .field("lp_uart_ck_en", &self.lp_uart_ck_en())
96            .field("lp_io_ck_en", &self.lp_io_ck_en())
97            .field("lp_ext_i2c_ck_en", &self.lp_ext_i2c_ck_en())
98            .field("lp_ana_i2c_ck_en", &self.lp_ana_i2c_ck_en())
99            .field("efuse_ck_en", &self.efuse_ck_en())
100            .field("lp_cpu_ck_en", &self.lp_cpu_ck_en())
101            .finish()
102    }
103}
104impl W {
105    #[doc = "Bit 23 - need_des"]
106    #[inline(always)]
107    #[must_use]
108    pub fn lp_touch_ck_en(&mut self) -> LP_TOUCH_CK_EN_W<CLK_EN_SPEC> {
109        LP_TOUCH_CK_EN_W::new(self, 23)
110    }
111    #[doc = "Bit 24 - need_des"]
112    #[inline(always)]
113    #[must_use]
114    pub fn rng_ck_en(&mut self) -> RNG_CK_EN_W<CLK_EN_SPEC> {
115        RNG_CK_EN_W::new(self, 24)
116    }
117    #[doc = "Bit 25 - need_des"]
118    #[inline(always)]
119    #[must_use]
120    pub fn otp_dbg_ck_en(&mut self) -> OTP_DBG_CK_EN_W<CLK_EN_SPEC> {
121        OTP_DBG_CK_EN_W::new(self, 25)
122    }
123    #[doc = "Bit 26 - need_des"]
124    #[inline(always)]
125    #[must_use]
126    pub fn lp_uart_ck_en(&mut self) -> LP_UART_CK_EN_W<CLK_EN_SPEC> {
127        LP_UART_CK_EN_W::new(self, 26)
128    }
129    #[doc = "Bit 27 - need_des"]
130    #[inline(always)]
131    #[must_use]
132    pub fn lp_io_ck_en(&mut self) -> LP_IO_CK_EN_W<CLK_EN_SPEC> {
133        LP_IO_CK_EN_W::new(self, 27)
134    }
135    #[doc = "Bit 28 - need_des"]
136    #[inline(always)]
137    #[must_use]
138    pub fn lp_ext_i2c_ck_en(&mut self) -> LP_EXT_I2C_CK_EN_W<CLK_EN_SPEC> {
139        LP_EXT_I2C_CK_EN_W::new(self, 28)
140    }
141    #[doc = "Bit 29 - need_des"]
142    #[inline(always)]
143    #[must_use]
144    pub fn lp_ana_i2c_ck_en(&mut self) -> LP_ANA_I2C_CK_EN_W<CLK_EN_SPEC> {
145        LP_ANA_I2C_CK_EN_W::new(self, 29)
146    }
147    #[doc = "Bit 30 - need_des"]
148    #[inline(always)]
149    #[must_use]
150    pub fn efuse_ck_en(&mut self) -> EFUSE_CK_EN_W<CLK_EN_SPEC> {
151        EFUSE_CK_EN_W::new(self, 30)
152    }
153    #[doc = "Bit 31 - need_des"]
154    #[inline(always)]
155    #[must_use]
156    pub fn lp_cpu_ck_en(&mut self) -> LP_CPU_CK_EN_W<CLK_EN_SPEC> {
157        LP_CPU_CK_EN_W::new(self, 31)
158    }
159}
160#[doc = "need_des\n\nYou can [`read`](crate::Reg::read) this register and get [`clk_en::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`clk_en::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
161pub struct CLK_EN_SPEC;
162impl crate::RegisterSpec for CLK_EN_SPEC {
163    type Ux = u32;
164}
165#[doc = "`read()` method returns [`clk_en::R`](R) reader structure"]
166impl crate::Readable for CLK_EN_SPEC {}
167#[doc = "`write(|w| ..)` method takes [`clk_en::W`](W) writer structure"]
168impl crate::Writable for CLK_EN_SPEC {
169    type Safety = crate::Unsafe;
170    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
171    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
172}
173#[doc = "`reset()` method sets CLK_EN to value 0x7f80_0000"]
174impl crate::Resettable for CLK_EN_SPEC {
175    const RESET_VALUE: u32 = 0x7f80_0000;
176}