esp32h2/pmu/
rf_pwc.rs

1#[doc = "Register `RF_PWC` reader"]
2pub type R = crate::R<RF_PWC_SPEC>;
3#[doc = "Register `RF_PWC` writer"]
4pub type W = crate::W<RF_PWC_SPEC>;
5#[doc = "Field `XPD_PERIF_I2C` reader - need_des"]
6pub type XPD_PERIF_I2C_R = crate::BitReader;
7#[doc = "Field `XPD_PERIF_I2C` writer - need_des"]
8pub type XPD_PERIF_I2C_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `XPD_RFTX_I2C` reader - need_des"]
10pub type XPD_RFTX_I2C_R = crate::BitReader;
11#[doc = "Field `XPD_RFTX_I2C` writer - need_des"]
12pub type XPD_RFTX_I2C_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `XPD_RFRX_I2C` reader - need_des"]
14pub type XPD_RFRX_I2C_R = crate::BitReader;
15#[doc = "Field `XPD_RFRX_I2C` writer - need_des"]
16pub type XPD_RFRX_I2C_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `XPD_RFPLL` reader - need_des"]
18pub type XPD_RFPLL_R = crate::BitReader;
19#[doc = "Field `XPD_RFPLL` writer - need_des"]
20pub type XPD_RFPLL_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `XPD_FORCE_RFPLL` reader - need_des"]
22pub type XPD_FORCE_RFPLL_R = crate::BitReader;
23#[doc = "Field `XPD_FORCE_RFPLL` writer - need_des"]
24pub type XPD_FORCE_RFPLL_W<'a, REG> = crate::BitWriter<'a, REG>;
25impl R {
26    #[doc = "Bit 27 - need_des"]
27    #[inline(always)]
28    pub fn xpd_perif_i2c(&self) -> XPD_PERIF_I2C_R {
29        XPD_PERIF_I2C_R::new(((self.bits >> 27) & 1) != 0)
30    }
31    #[doc = "Bit 28 - need_des"]
32    #[inline(always)]
33    pub fn xpd_rftx_i2c(&self) -> XPD_RFTX_I2C_R {
34        XPD_RFTX_I2C_R::new(((self.bits >> 28) & 1) != 0)
35    }
36    #[doc = "Bit 29 - need_des"]
37    #[inline(always)]
38    pub fn xpd_rfrx_i2c(&self) -> XPD_RFRX_I2C_R {
39        XPD_RFRX_I2C_R::new(((self.bits >> 29) & 1) != 0)
40    }
41    #[doc = "Bit 30 - need_des"]
42    #[inline(always)]
43    pub fn xpd_rfpll(&self) -> XPD_RFPLL_R {
44        XPD_RFPLL_R::new(((self.bits >> 30) & 1) != 0)
45    }
46    #[doc = "Bit 31 - need_des"]
47    #[inline(always)]
48    pub fn xpd_force_rfpll(&self) -> XPD_FORCE_RFPLL_R {
49        XPD_FORCE_RFPLL_R::new(((self.bits >> 31) & 1) != 0)
50    }
51}
52#[cfg(feature = "impl-register-debug")]
53impl core::fmt::Debug for R {
54    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
55        f.debug_struct("RF_PWC")
56            .field("xpd_perif_i2c", &self.xpd_perif_i2c())
57            .field("xpd_rftx_i2c", &self.xpd_rftx_i2c())
58            .field("xpd_rfrx_i2c", &self.xpd_rfrx_i2c())
59            .field("xpd_rfpll", &self.xpd_rfpll())
60            .field("xpd_force_rfpll", &self.xpd_force_rfpll())
61            .finish()
62    }
63}
64impl W {
65    #[doc = "Bit 27 - need_des"]
66    #[inline(always)]
67    pub fn xpd_perif_i2c(&mut self) -> XPD_PERIF_I2C_W<RF_PWC_SPEC> {
68        XPD_PERIF_I2C_W::new(self, 27)
69    }
70    #[doc = "Bit 28 - need_des"]
71    #[inline(always)]
72    pub fn xpd_rftx_i2c(&mut self) -> XPD_RFTX_I2C_W<RF_PWC_SPEC> {
73        XPD_RFTX_I2C_W::new(self, 28)
74    }
75    #[doc = "Bit 29 - need_des"]
76    #[inline(always)]
77    pub fn xpd_rfrx_i2c(&mut self) -> XPD_RFRX_I2C_W<RF_PWC_SPEC> {
78        XPD_RFRX_I2C_W::new(self, 29)
79    }
80    #[doc = "Bit 30 - need_des"]
81    #[inline(always)]
82    pub fn xpd_rfpll(&mut self) -> XPD_RFPLL_W<RF_PWC_SPEC> {
83        XPD_RFPLL_W::new(self, 30)
84    }
85    #[doc = "Bit 31 - need_des"]
86    #[inline(always)]
87    pub fn xpd_force_rfpll(&mut self) -> XPD_FORCE_RFPLL_W<RF_PWC_SPEC> {
88        XPD_FORCE_RFPLL_W::new(self, 31)
89    }
90}
91#[doc = "need_des\n\nYou can [`read`](crate::Reg::read) this register and get [`rf_pwc::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`rf_pwc::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
92pub struct RF_PWC_SPEC;
93impl crate::RegisterSpec for RF_PWC_SPEC {
94    type Ux = u32;
95}
96#[doc = "`read()` method returns [`rf_pwc::R`](R) reader structure"]
97impl crate::Readable for RF_PWC_SPEC {}
98#[doc = "`write(|w| ..)` method takes [`rf_pwc::W`](W) writer structure"]
99impl crate::Writable for RF_PWC_SPEC {
100    type Safety = crate::Unsafe;
101    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
102    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
103}
104#[doc = "`reset()` method sets RF_PWC to value 0x0800_0000"]
105impl crate::Resettable for RF_PWC_SPEC {
106    const RESET_VALUE: u32 = 0x0800_0000;
107}