esp32c6_lp/pmu/
lp_sleep_lp_regulator0.rs1#[doc = "Register `LP_SLEEP_LP_REGULATOR0` reader"]
2pub type R = crate::R<LP_SLEEP_LP_REGULATOR0_SPEC>;
3#[doc = "Register `LP_SLEEP_LP_REGULATOR0` writer"]
4pub type W = crate::W<LP_SLEEP_LP_REGULATOR0_SPEC>;
5#[doc = "Field `LP_SLEEP_LP_REGULATOR_SLP_XPD` reader - need_des"]
6pub type LP_SLEEP_LP_REGULATOR_SLP_XPD_R = crate::BitReader;
7#[doc = "Field `LP_SLEEP_LP_REGULATOR_SLP_XPD` writer - need_des"]
8pub type LP_SLEEP_LP_REGULATOR_SLP_XPD_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `LP_SLEEP_LP_REGULATOR_XPD` reader - need_des"]
10pub type LP_SLEEP_LP_REGULATOR_XPD_R = crate::BitReader;
11#[doc = "Field `LP_SLEEP_LP_REGULATOR_XPD` writer - need_des"]
12pub type LP_SLEEP_LP_REGULATOR_XPD_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `LP_SLEEP_LP_REGULATOR_SLP_DBIAS` reader - need_des"]
14pub type LP_SLEEP_LP_REGULATOR_SLP_DBIAS_R = crate::FieldReader;
15#[doc = "Field `LP_SLEEP_LP_REGULATOR_SLP_DBIAS` writer - need_des"]
16pub type LP_SLEEP_LP_REGULATOR_SLP_DBIAS_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
17#[doc = "Field `LP_SLEEP_LP_REGULATOR_DBIAS` reader - need_des"]
18pub type LP_SLEEP_LP_REGULATOR_DBIAS_R = crate::FieldReader;
19#[doc = "Field `LP_SLEEP_LP_REGULATOR_DBIAS` writer - need_des"]
20pub type LP_SLEEP_LP_REGULATOR_DBIAS_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
21impl R {
22 #[doc = "Bit 21 - need_des"]
23 #[inline(always)]
24 pub fn lp_sleep_lp_regulator_slp_xpd(&self) -> LP_SLEEP_LP_REGULATOR_SLP_XPD_R {
25 LP_SLEEP_LP_REGULATOR_SLP_XPD_R::new(((self.bits >> 21) & 1) != 0)
26 }
27 #[doc = "Bit 22 - need_des"]
28 #[inline(always)]
29 pub fn lp_sleep_lp_regulator_xpd(&self) -> LP_SLEEP_LP_REGULATOR_XPD_R {
30 LP_SLEEP_LP_REGULATOR_XPD_R::new(((self.bits >> 22) & 1) != 0)
31 }
32 #[doc = "Bits 23:26 - need_des"]
33 #[inline(always)]
34 pub fn lp_sleep_lp_regulator_slp_dbias(&self) -> LP_SLEEP_LP_REGULATOR_SLP_DBIAS_R {
35 LP_SLEEP_LP_REGULATOR_SLP_DBIAS_R::new(((self.bits >> 23) & 0x0f) as u8)
36 }
37 #[doc = "Bits 27:31 - need_des"]
38 #[inline(always)]
39 pub fn lp_sleep_lp_regulator_dbias(&self) -> LP_SLEEP_LP_REGULATOR_DBIAS_R {
40 LP_SLEEP_LP_REGULATOR_DBIAS_R::new(((self.bits >> 27) & 0x1f) as u8)
41 }
42}
43#[cfg(feature = "impl-register-debug")]
44impl core::fmt::Debug for R {
45 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
46 f.debug_struct("LP_SLEEP_LP_REGULATOR0")
47 .field(
48 "lp_sleep_lp_regulator_slp_xpd",
49 &self.lp_sleep_lp_regulator_slp_xpd(),
50 )
51 .field(
52 "lp_sleep_lp_regulator_xpd",
53 &self.lp_sleep_lp_regulator_xpd(),
54 )
55 .field(
56 "lp_sleep_lp_regulator_slp_dbias",
57 &self.lp_sleep_lp_regulator_slp_dbias(),
58 )
59 .field(
60 "lp_sleep_lp_regulator_dbias",
61 &self.lp_sleep_lp_regulator_dbias(),
62 )
63 .finish()
64 }
65}
66impl W {
67 #[doc = "Bit 21 - need_des"]
68 #[inline(always)]
69 #[must_use]
70 pub fn lp_sleep_lp_regulator_slp_xpd(
71 &mut self,
72 ) -> LP_SLEEP_LP_REGULATOR_SLP_XPD_W<LP_SLEEP_LP_REGULATOR0_SPEC> {
73 LP_SLEEP_LP_REGULATOR_SLP_XPD_W::new(self, 21)
74 }
75 #[doc = "Bit 22 - need_des"]
76 #[inline(always)]
77 #[must_use]
78 pub fn lp_sleep_lp_regulator_xpd(
79 &mut self,
80 ) -> LP_SLEEP_LP_REGULATOR_XPD_W<LP_SLEEP_LP_REGULATOR0_SPEC> {
81 LP_SLEEP_LP_REGULATOR_XPD_W::new(self, 22)
82 }
83 #[doc = "Bits 23:26 - need_des"]
84 #[inline(always)]
85 #[must_use]
86 pub fn lp_sleep_lp_regulator_slp_dbias(
87 &mut self,
88 ) -> LP_SLEEP_LP_REGULATOR_SLP_DBIAS_W<LP_SLEEP_LP_REGULATOR0_SPEC> {
89 LP_SLEEP_LP_REGULATOR_SLP_DBIAS_W::new(self, 23)
90 }
91 #[doc = "Bits 27:31 - need_des"]
92 #[inline(always)]
93 #[must_use]
94 pub fn lp_sleep_lp_regulator_dbias(
95 &mut self,
96 ) -> LP_SLEEP_LP_REGULATOR_DBIAS_W<LP_SLEEP_LP_REGULATOR0_SPEC> {
97 LP_SLEEP_LP_REGULATOR_DBIAS_W::new(self, 27)
98 }
99}
100#[doc = "need_des\n\nYou can [`read`](crate::Reg::read) this register and get [`lp_sleep_lp_regulator0::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`lp_sleep_lp_regulator0::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
101pub struct LP_SLEEP_LP_REGULATOR0_SPEC;
102impl crate::RegisterSpec for LP_SLEEP_LP_REGULATOR0_SPEC {
103 type Ux = u32;
104}
105#[doc = "`read()` method returns [`lp_sleep_lp_regulator0::R`](R) reader structure"]
106impl crate::Readable for LP_SLEEP_LP_REGULATOR0_SPEC {}
107#[doc = "`write(|w| ..)` method takes [`lp_sleep_lp_regulator0::W`](W) writer structure"]
108impl crate::Writable for LP_SLEEP_LP_REGULATOR0_SPEC {
109 type Safety = crate::Unsafe;
110 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
111 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
112}
113#[doc = "`reset()` method sets LP_SLEEP_LP_REGULATOR0 to value 0xc660_0000"]
114impl crate::Resettable for LP_SLEEP_LP_REGULATOR0_SPEC {
115 const RESET_VALUE: u32 = 0xc660_0000;
116}