esp32p4/pmu/
ext_ldo_p0_0p1a_ana.rs1#[doc = "Register `EXT_LDO_P0_0P1A_ANA` reader"]
2pub type R = crate::R<EXT_LDO_P0_0P1A_ANA_SPEC>;
3#[doc = "Register `EXT_LDO_P0_0P1A_ANA` writer"]
4pub type W = crate::W<EXT_LDO_P0_0P1A_ANA_SPEC>;
5#[doc = "Field `ANA_0P1A_MUL_0` reader - need_des"]
6pub type ANA_0P1A_MUL_0_R = crate::FieldReader;
7#[doc = "Field `ANA_0P1A_MUL_0` writer - need_des"]
8pub type ANA_0P1A_MUL_0_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
9#[doc = "Field `ANA_0P1A_EN_VDET_0` reader - need_des"]
10pub type ANA_0P1A_EN_VDET_0_R = crate::BitReader;
11#[doc = "Field `ANA_0P1A_EN_VDET_0` writer - need_des"]
12pub type ANA_0P1A_EN_VDET_0_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `ANA_0P1A_EN_CUR_LIM_0` reader - need_des"]
14pub type ANA_0P1A_EN_CUR_LIM_0_R = crate::BitReader;
15#[doc = "Field `ANA_0P1A_EN_CUR_LIM_0` writer - need_des"]
16pub type ANA_0P1A_EN_CUR_LIM_0_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `ANA_0P1A_DREF_0` reader - need_des"]
18pub type ANA_0P1A_DREF_0_R = crate::FieldReader;
19#[doc = "Field `ANA_0P1A_DREF_0` writer - need_des"]
20pub type ANA_0P1A_DREF_0_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
21impl R {
22 #[doc = "Bits 23:25 - need_des"]
23 #[inline(always)]
24 pub fn ana_0p1a_mul_0(&self) -> ANA_0P1A_MUL_0_R {
25 ANA_0P1A_MUL_0_R::new(((self.bits >> 23) & 7) as u8)
26 }
27 #[doc = "Bit 26 - need_des"]
28 #[inline(always)]
29 pub fn ana_0p1a_en_vdet_0(&self) -> ANA_0P1A_EN_VDET_0_R {
30 ANA_0P1A_EN_VDET_0_R::new(((self.bits >> 26) & 1) != 0)
31 }
32 #[doc = "Bit 27 - need_des"]
33 #[inline(always)]
34 pub fn ana_0p1a_en_cur_lim_0(&self) -> ANA_0P1A_EN_CUR_LIM_0_R {
35 ANA_0P1A_EN_CUR_LIM_0_R::new(((self.bits >> 27) & 1) != 0)
36 }
37 #[doc = "Bits 28:31 - need_des"]
38 #[inline(always)]
39 pub fn ana_0p1a_dref_0(&self) -> ANA_0P1A_DREF_0_R {
40 ANA_0P1A_DREF_0_R::new(((self.bits >> 28) & 0x0f) 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("EXT_LDO_P0_0P1A_ANA")
47 .field(
48 "ana_0p1a_mul_0",
49 &format_args!("{}", self.ana_0p1a_mul_0().bits()),
50 )
51 .field(
52 "ana_0p1a_en_vdet_0",
53 &format_args!("{}", self.ana_0p1a_en_vdet_0().bit()),
54 )
55 .field(
56 "ana_0p1a_en_cur_lim_0",
57 &format_args!("{}", self.ana_0p1a_en_cur_lim_0().bit()),
58 )
59 .field(
60 "ana_0p1a_dref_0",
61 &format_args!("{}", self.ana_0p1a_dref_0().bits()),
62 )
63 .finish()
64 }
65}
66#[cfg(feature = "impl-register-debug")]
67impl core::fmt::Debug for crate::generic::Reg<EXT_LDO_P0_0P1A_ANA_SPEC> {
68 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
69 core::fmt::Debug::fmt(&self.read(), f)
70 }
71}
72impl W {
73 #[doc = "Bits 23:25 - need_des"]
74 #[inline(always)]
75 #[must_use]
76 pub fn ana_0p1a_mul_0(&mut self) -> ANA_0P1A_MUL_0_W<EXT_LDO_P0_0P1A_ANA_SPEC> {
77 ANA_0P1A_MUL_0_W::new(self, 23)
78 }
79 #[doc = "Bit 26 - need_des"]
80 #[inline(always)]
81 #[must_use]
82 pub fn ana_0p1a_en_vdet_0(&mut self) -> ANA_0P1A_EN_VDET_0_W<EXT_LDO_P0_0P1A_ANA_SPEC> {
83 ANA_0P1A_EN_VDET_0_W::new(self, 26)
84 }
85 #[doc = "Bit 27 - need_des"]
86 #[inline(always)]
87 #[must_use]
88 pub fn ana_0p1a_en_cur_lim_0(&mut self) -> ANA_0P1A_EN_CUR_LIM_0_W<EXT_LDO_P0_0P1A_ANA_SPEC> {
89 ANA_0P1A_EN_CUR_LIM_0_W::new(self, 27)
90 }
91 #[doc = "Bits 28:31 - need_des"]
92 #[inline(always)]
93 #[must_use]
94 pub fn ana_0p1a_dref_0(&mut self) -> ANA_0P1A_DREF_0_W<EXT_LDO_P0_0P1A_ANA_SPEC> {
95 ANA_0P1A_DREF_0_W::new(self, 28)
96 }
97}
98#[doc = "need_des\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`ext_ldo_p0_0p1a_ana::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`ext_ldo_p0_0p1a_ana::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
99pub struct EXT_LDO_P0_0P1A_ANA_SPEC;
100impl crate::RegisterSpec for EXT_LDO_P0_0P1A_ANA_SPEC {
101 type Ux = u32;
102}
103#[doc = "`read()` method returns [`ext_ldo_p0_0p1a_ana::R`](R) reader structure"]
104impl crate::Readable for EXT_LDO_P0_0P1A_ANA_SPEC {}
105#[doc = "`write(|w| ..)` method takes [`ext_ldo_p0_0p1a_ana::W`](W) writer structure"]
106impl crate::Writable for EXT_LDO_P0_0P1A_ANA_SPEC {
107 type Safety = crate::Unsafe;
108 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
109 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
110}
111#[doc = "`reset()` method sets EXT_LDO_P0_0P1A_ANA to value 0xb100_0000"]
112impl crate::Resettable for EXT_LDO_P0_0P1A_ANA_SPEC {
113 const RESET_VALUE: u32 = 0xb100_0000;
114}