esp32p4/pmu/
hp_modem_bias.rs

1#[doc = "Register `HP_MODEM_BIAS` writer"]
2pub type W = crate::W<HP_MODEM_BIAS_SPEC>;
3#[doc = "Field `HP_MODEM_DCM_VSET` writer - need_des"]
4pub type HP_MODEM_DCM_VSET_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
5#[doc = "Field `HP_MODEM_DCM_MODE` writer - need_des"]
6pub type HP_MODEM_DCM_MODE_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
7#[doc = "Field `HP_MODEM_XPD_BIAS` writer - need_des"]
8pub type HP_MODEM_XPD_BIAS_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `HP_MODEM_DBG_ATTEN` writer - need_des"]
10pub type HP_MODEM_DBG_ATTEN_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
11#[doc = "Field `HP_MODEM_PD_CUR` writer - need_des"]
12pub type HP_MODEM_PD_CUR_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `SLEEP` writer - need_des"]
14pub type SLEEP_W<'a, REG> = crate::BitWriter<'a, REG>;
15#[cfg(feature = "impl-register-debug")]
16impl core::fmt::Debug for crate::generic::Reg<HP_MODEM_BIAS_SPEC> {
17    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
18        write!(f, "(not readable)")
19    }
20}
21impl W {
22    #[doc = "Bits 18:22 - need_des"]
23    #[inline(always)]
24    #[must_use]
25    pub fn hp_modem_dcm_vset(&mut self) -> HP_MODEM_DCM_VSET_W<HP_MODEM_BIAS_SPEC> {
26        HP_MODEM_DCM_VSET_W::new(self, 18)
27    }
28    #[doc = "Bits 23:24 - need_des"]
29    #[inline(always)]
30    #[must_use]
31    pub fn hp_modem_dcm_mode(&mut self) -> HP_MODEM_DCM_MODE_W<HP_MODEM_BIAS_SPEC> {
32        HP_MODEM_DCM_MODE_W::new(self, 23)
33    }
34    #[doc = "Bit 25 - need_des"]
35    #[inline(always)]
36    #[must_use]
37    pub fn hp_modem_xpd_bias(&mut self) -> HP_MODEM_XPD_BIAS_W<HP_MODEM_BIAS_SPEC> {
38        HP_MODEM_XPD_BIAS_W::new(self, 25)
39    }
40    #[doc = "Bits 26:29 - need_des"]
41    #[inline(always)]
42    #[must_use]
43    pub fn hp_modem_dbg_atten(&mut self) -> HP_MODEM_DBG_ATTEN_W<HP_MODEM_BIAS_SPEC> {
44        HP_MODEM_DBG_ATTEN_W::new(self, 26)
45    }
46    #[doc = "Bit 30 - need_des"]
47    #[inline(always)]
48    #[must_use]
49    pub fn hp_modem_pd_cur(&mut self) -> HP_MODEM_PD_CUR_W<HP_MODEM_BIAS_SPEC> {
50        HP_MODEM_PD_CUR_W::new(self, 30)
51    }
52    #[doc = "Bit 31 - need_des"]
53    #[inline(always)]
54    #[must_use]
55    pub fn sleep(&mut self) -> SLEEP_W<HP_MODEM_BIAS_SPEC> {
56        SLEEP_W::new(self, 31)
57    }
58}
59#[doc = "need_des\n\nYou can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`hp_modem_bias::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
60pub struct HP_MODEM_BIAS_SPEC;
61impl crate::RegisterSpec for HP_MODEM_BIAS_SPEC {
62    type Ux = u32;
63}
64#[doc = "`write(|w| ..)` method takes [`hp_modem_bias::W`](W) writer structure"]
65impl crate::Writable for HP_MODEM_BIAS_SPEC {
66    type Safety = crate::Unsafe;
67    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
68    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
69}
70#[doc = "`reset()` method sets HP_MODEM_BIAS to value 0x0050_0000"]
71impl crate::Resettable for HP_MODEM_BIAS_SPEC {
72    const RESET_VALUE: u32 = 0x0050_0000;
73}