esp32c6_lp/pmu/
hp_modem_dig_power.rs

1#[doc = "Register `HP_MODEM_DIG_POWER` reader"]
2pub type R = crate::R<HP_MODEM_DIG_POWER_SPEC>;
3#[doc = "Register `HP_MODEM_DIG_POWER` writer"]
4pub type W = crate::W<HP_MODEM_DIG_POWER_SPEC>;
5#[doc = "Field `HP_MODEM_VDD_SPI_PD_EN` reader - need_des"]
6pub type HP_MODEM_VDD_SPI_PD_EN_R = crate::BitReader;
7#[doc = "Field `HP_MODEM_VDD_SPI_PD_EN` writer - need_des"]
8pub type HP_MODEM_VDD_SPI_PD_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `HP_MODEM_HP_MEM_DSLP` reader - need_des"]
10pub type HP_MODEM_HP_MEM_DSLP_R = crate::BitReader;
11#[doc = "Field `HP_MODEM_HP_MEM_DSLP` writer - need_des"]
12pub type HP_MODEM_HP_MEM_DSLP_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `HP_MODEM_PD_HP_MEM_PD_EN` reader - need_des"]
14pub type HP_MODEM_PD_HP_MEM_PD_EN_R = crate::FieldReader;
15#[doc = "Field `HP_MODEM_PD_HP_MEM_PD_EN` writer - need_des"]
16pub type HP_MODEM_PD_HP_MEM_PD_EN_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
17#[doc = "Field `HP_MODEM_PD_HP_WIFI_PD_EN` reader - need_des"]
18pub type HP_MODEM_PD_HP_WIFI_PD_EN_R = crate::BitReader;
19#[doc = "Field `HP_MODEM_PD_HP_WIFI_PD_EN` writer - need_des"]
20pub type HP_MODEM_PD_HP_WIFI_PD_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `HP_MODEM_PD_HP_CPU_PD_EN` reader - need_des"]
22pub type HP_MODEM_PD_HP_CPU_PD_EN_R = crate::BitReader;
23#[doc = "Field `HP_MODEM_PD_HP_CPU_PD_EN` writer - need_des"]
24pub type HP_MODEM_PD_HP_CPU_PD_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `HP_MODEM_PD_HP_AON_PD_EN` reader - need_des"]
26pub type HP_MODEM_PD_HP_AON_PD_EN_R = crate::BitReader;
27#[doc = "Field `HP_MODEM_PD_HP_AON_PD_EN` writer - need_des"]
28pub type HP_MODEM_PD_HP_AON_PD_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `HP_MODEM_PD_TOP_PD_EN` reader - need_des"]
30pub type HP_MODEM_PD_TOP_PD_EN_R = crate::BitReader;
31#[doc = "Field `HP_MODEM_PD_TOP_PD_EN` writer - need_des"]
32pub type HP_MODEM_PD_TOP_PD_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
33impl R {
34    #[doc = "Bit 21 - need_des"]
35    #[inline(always)]
36    pub fn hp_modem_vdd_spi_pd_en(&self) -> HP_MODEM_VDD_SPI_PD_EN_R {
37        HP_MODEM_VDD_SPI_PD_EN_R::new(((self.bits >> 21) & 1) != 0)
38    }
39    #[doc = "Bit 22 - need_des"]
40    #[inline(always)]
41    pub fn hp_modem_hp_mem_dslp(&self) -> HP_MODEM_HP_MEM_DSLP_R {
42        HP_MODEM_HP_MEM_DSLP_R::new(((self.bits >> 22) & 1) != 0)
43    }
44    #[doc = "Bits 23:26 - need_des"]
45    #[inline(always)]
46    pub fn hp_modem_pd_hp_mem_pd_en(&self) -> HP_MODEM_PD_HP_MEM_PD_EN_R {
47        HP_MODEM_PD_HP_MEM_PD_EN_R::new(((self.bits >> 23) & 0x0f) as u8)
48    }
49    #[doc = "Bit 27 - need_des"]
50    #[inline(always)]
51    pub fn hp_modem_pd_hp_wifi_pd_en(&self) -> HP_MODEM_PD_HP_WIFI_PD_EN_R {
52        HP_MODEM_PD_HP_WIFI_PD_EN_R::new(((self.bits >> 27) & 1) != 0)
53    }
54    #[doc = "Bit 29 - need_des"]
55    #[inline(always)]
56    pub fn hp_modem_pd_hp_cpu_pd_en(&self) -> HP_MODEM_PD_HP_CPU_PD_EN_R {
57        HP_MODEM_PD_HP_CPU_PD_EN_R::new(((self.bits >> 29) & 1) != 0)
58    }
59    #[doc = "Bit 30 - need_des"]
60    #[inline(always)]
61    pub fn hp_modem_pd_hp_aon_pd_en(&self) -> HP_MODEM_PD_HP_AON_PD_EN_R {
62        HP_MODEM_PD_HP_AON_PD_EN_R::new(((self.bits >> 30) & 1) != 0)
63    }
64    #[doc = "Bit 31 - need_des"]
65    #[inline(always)]
66    pub fn hp_modem_pd_top_pd_en(&self) -> HP_MODEM_PD_TOP_PD_EN_R {
67        HP_MODEM_PD_TOP_PD_EN_R::new(((self.bits >> 31) & 1) != 0)
68    }
69}
70#[cfg(feature = "impl-register-debug")]
71impl core::fmt::Debug for R {
72    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
73        f.debug_struct("HP_MODEM_DIG_POWER")
74            .field("hp_modem_vdd_spi_pd_en", &self.hp_modem_vdd_spi_pd_en())
75            .field("hp_modem_hp_mem_dslp", &self.hp_modem_hp_mem_dslp())
76            .field("hp_modem_pd_hp_mem_pd_en", &self.hp_modem_pd_hp_mem_pd_en())
77            .field(
78                "hp_modem_pd_hp_wifi_pd_en",
79                &self.hp_modem_pd_hp_wifi_pd_en(),
80            )
81            .field("hp_modem_pd_hp_cpu_pd_en", &self.hp_modem_pd_hp_cpu_pd_en())
82            .field("hp_modem_pd_hp_aon_pd_en", &self.hp_modem_pd_hp_aon_pd_en())
83            .field("hp_modem_pd_top_pd_en", &self.hp_modem_pd_top_pd_en())
84            .finish()
85    }
86}
87impl W {
88    #[doc = "Bit 21 - need_des"]
89    #[inline(always)]
90    #[must_use]
91    pub fn hp_modem_vdd_spi_pd_en(&mut self) -> HP_MODEM_VDD_SPI_PD_EN_W<HP_MODEM_DIG_POWER_SPEC> {
92        HP_MODEM_VDD_SPI_PD_EN_W::new(self, 21)
93    }
94    #[doc = "Bit 22 - need_des"]
95    #[inline(always)]
96    #[must_use]
97    pub fn hp_modem_hp_mem_dslp(&mut self) -> HP_MODEM_HP_MEM_DSLP_W<HP_MODEM_DIG_POWER_SPEC> {
98        HP_MODEM_HP_MEM_DSLP_W::new(self, 22)
99    }
100    #[doc = "Bits 23:26 - need_des"]
101    #[inline(always)]
102    #[must_use]
103    pub fn hp_modem_pd_hp_mem_pd_en(
104        &mut self,
105    ) -> HP_MODEM_PD_HP_MEM_PD_EN_W<HP_MODEM_DIG_POWER_SPEC> {
106        HP_MODEM_PD_HP_MEM_PD_EN_W::new(self, 23)
107    }
108    #[doc = "Bit 27 - need_des"]
109    #[inline(always)]
110    #[must_use]
111    pub fn hp_modem_pd_hp_wifi_pd_en(
112        &mut self,
113    ) -> HP_MODEM_PD_HP_WIFI_PD_EN_W<HP_MODEM_DIG_POWER_SPEC> {
114        HP_MODEM_PD_HP_WIFI_PD_EN_W::new(self, 27)
115    }
116    #[doc = "Bit 29 - need_des"]
117    #[inline(always)]
118    #[must_use]
119    pub fn hp_modem_pd_hp_cpu_pd_en(
120        &mut self,
121    ) -> HP_MODEM_PD_HP_CPU_PD_EN_W<HP_MODEM_DIG_POWER_SPEC> {
122        HP_MODEM_PD_HP_CPU_PD_EN_W::new(self, 29)
123    }
124    #[doc = "Bit 30 - need_des"]
125    #[inline(always)]
126    #[must_use]
127    pub fn hp_modem_pd_hp_aon_pd_en(
128        &mut self,
129    ) -> HP_MODEM_PD_HP_AON_PD_EN_W<HP_MODEM_DIG_POWER_SPEC> {
130        HP_MODEM_PD_HP_AON_PD_EN_W::new(self, 30)
131    }
132    #[doc = "Bit 31 - need_des"]
133    #[inline(always)]
134    #[must_use]
135    pub fn hp_modem_pd_top_pd_en(&mut self) -> HP_MODEM_PD_TOP_PD_EN_W<HP_MODEM_DIG_POWER_SPEC> {
136        HP_MODEM_PD_TOP_PD_EN_W::new(self, 31)
137    }
138}
139#[doc = "need_des\n\nYou can [`read`](crate::Reg::read) this register and get [`hp_modem_dig_power::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`hp_modem_dig_power::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
140pub struct HP_MODEM_DIG_POWER_SPEC;
141impl crate::RegisterSpec for HP_MODEM_DIG_POWER_SPEC {
142    type Ux = u32;
143}
144#[doc = "`read()` method returns [`hp_modem_dig_power::R`](R) reader structure"]
145impl crate::Readable for HP_MODEM_DIG_POWER_SPEC {}
146#[doc = "`write(|w| ..)` method takes [`hp_modem_dig_power::W`](W) writer structure"]
147impl crate::Writable for HP_MODEM_DIG_POWER_SPEC {
148    type Safety = crate::Unsafe;
149    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
150    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
151}
152#[doc = "`reset()` method sets HP_MODEM_DIG_POWER to value 0"]
153impl crate::Resettable for HP_MODEM_DIG_POWER_SPEC {
154    const RESET_VALUE: u32 = 0;
155}