esp32c3/apb_ctrl/
front_end_mem_pd.rs

1#[doc = "Register `FRONT_END_MEM_PD` reader"]
2pub type R = crate::R<FRONT_END_MEM_PD_SPEC>;
3#[doc = "Register `FRONT_END_MEM_PD` writer"]
4pub type W = crate::W<FRONT_END_MEM_PD_SPEC>;
5#[doc = "Field `AGC_MEM_FORCE_PU` reader - reg_agc_mem_force_pu"]
6pub type AGC_MEM_FORCE_PU_R = crate::BitReader;
7#[doc = "Field `AGC_MEM_FORCE_PU` writer - reg_agc_mem_force_pu"]
8pub type AGC_MEM_FORCE_PU_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `AGC_MEM_FORCE_PD` reader - reg_agc_mem_force_pd"]
10pub type AGC_MEM_FORCE_PD_R = crate::BitReader;
11#[doc = "Field `AGC_MEM_FORCE_PD` writer - reg_agc_mem_force_pd"]
12pub type AGC_MEM_FORCE_PD_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `PBUS_MEM_FORCE_PU` reader - reg_pbus_mem_force_pu"]
14pub type PBUS_MEM_FORCE_PU_R = crate::BitReader;
15#[doc = "Field `PBUS_MEM_FORCE_PU` writer - reg_pbus_mem_force_pu"]
16pub type PBUS_MEM_FORCE_PU_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `PBUS_MEM_FORCE_PD` reader - reg_pbus_mem_force_pd"]
18pub type PBUS_MEM_FORCE_PD_R = crate::BitReader;
19#[doc = "Field `PBUS_MEM_FORCE_PD` writer - reg_pbus_mem_force_pd"]
20pub type PBUS_MEM_FORCE_PD_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `DC_MEM_FORCE_PU` reader - reg_dc_mem_force_pu"]
22pub type DC_MEM_FORCE_PU_R = crate::BitReader;
23#[doc = "Field `DC_MEM_FORCE_PU` writer - reg_dc_mem_force_pu"]
24pub type DC_MEM_FORCE_PU_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `DC_MEM_FORCE_PD` reader - reg_dc_mem_force_pd"]
26pub type DC_MEM_FORCE_PD_R = crate::BitReader;
27#[doc = "Field `DC_MEM_FORCE_PD` writer - reg_dc_mem_force_pd"]
28pub type DC_MEM_FORCE_PD_W<'a, REG> = crate::BitWriter<'a, REG>;
29impl R {
30    #[doc = "Bit 0 - reg_agc_mem_force_pu"]
31    #[inline(always)]
32    pub fn agc_mem_force_pu(&self) -> AGC_MEM_FORCE_PU_R {
33        AGC_MEM_FORCE_PU_R::new((self.bits & 1) != 0)
34    }
35    #[doc = "Bit 1 - reg_agc_mem_force_pd"]
36    #[inline(always)]
37    pub fn agc_mem_force_pd(&self) -> AGC_MEM_FORCE_PD_R {
38        AGC_MEM_FORCE_PD_R::new(((self.bits >> 1) & 1) != 0)
39    }
40    #[doc = "Bit 2 - reg_pbus_mem_force_pu"]
41    #[inline(always)]
42    pub fn pbus_mem_force_pu(&self) -> PBUS_MEM_FORCE_PU_R {
43        PBUS_MEM_FORCE_PU_R::new(((self.bits >> 2) & 1) != 0)
44    }
45    #[doc = "Bit 3 - reg_pbus_mem_force_pd"]
46    #[inline(always)]
47    pub fn pbus_mem_force_pd(&self) -> PBUS_MEM_FORCE_PD_R {
48        PBUS_MEM_FORCE_PD_R::new(((self.bits >> 3) & 1) != 0)
49    }
50    #[doc = "Bit 4 - reg_dc_mem_force_pu"]
51    #[inline(always)]
52    pub fn dc_mem_force_pu(&self) -> DC_MEM_FORCE_PU_R {
53        DC_MEM_FORCE_PU_R::new(((self.bits >> 4) & 1) != 0)
54    }
55    #[doc = "Bit 5 - reg_dc_mem_force_pd"]
56    #[inline(always)]
57    pub fn dc_mem_force_pd(&self) -> DC_MEM_FORCE_PD_R {
58        DC_MEM_FORCE_PD_R::new(((self.bits >> 5) & 1) != 0)
59    }
60}
61#[cfg(feature = "impl-register-debug")]
62impl core::fmt::Debug for R {
63    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
64        f.debug_struct("FRONT_END_MEM_PD")
65            .field("agc_mem_force_pu", &self.agc_mem_force_pu())
66            .field("agc_mem_force_pd", &self.agc_mem_force_pd())
67            .field("pbus_mem_force_pu", &self.pbus_mem_force_pu())
68            .field("pbus_mem_force_pd", &self.pbus_mem_force_pd())
69            .field("dc_mem_force_pu", &self.dc_mem_force_pu())
70            .field("dc_mem_force_pd", &self.dc_mem_force_pd())
71            .finish()
72    }
73}
74impl W {
75    #[doc = "Bit 0 - reg_agc_mem_force_pu"]
76    #[inline(always)]
77    pub fn agc_mem_force_pu(&mut self) -> AGC_MEM_FORCE_PU_W<FRONT_END_MEM_PD_SPEC> {
78        AGC_MEM_FORCE_PU_W::new(self, 0)
79    }
80    #[doc = "Bit 1 - reg_agc_mem_force_pd"]
81    #[inline(always)]
82    pub fn agc_mem_force_pd(&mut self) -> AGC_MEM_FORCE_PD_W<FRONT_END_MEM_PD_SPEC> {
83        AGC_MEM_FORCE_PD_W::new(self, 1)
84    }
85    #[doc = "Bit 2 - reg_pbus_mem_force_pu"]
86    #[inline(always)]
87    pub fn pbus_mem_force_pu(&mut self) -> PBUS_MEM_FORCE_PU_W<FRONT_END_MEM_PD_SPEC> {
88        PBUS_MEM_FORCE_PU_W::new(self, 2)
89    }
90    #[doc = "Bit 3 - reg_pbus_mem_force_pd"]
91    #[inline(always)]
92    pub fn pbus_mem_force_pd(&mut self) -> PBUS_MEM_FORCE_PD_W<FRONT_END_MEM_PD_SPEC> {
93        PBUS_MEM_FORCE_PD_W::new(self, 3)
94    }
95    #[doc = "Bit 4 - reg_dc_mem_force_pu"]
96    #[inline(always)]
97    pub fn dc_mem_force_pu(&mut self) -> DC_MEM_FORCE_PU_W<FRONT_END_MEM_PD_SPEC> {
98        DC_MEM_FORCE_PU_W::new(self, 4)
99    }
100    #[doc = "Bit 5 - reg_dc_mem_force_pd"]
101    #[inline(always)]
102    pub fn dc_mem_force_pd(&mut self) -> DC_MEM_FORCE_PD_W<FRONT_END_MEM_PD_SPEC> {
103        DC_MEM_FORCE_PD_W::new(self, 5)
104    }
105}
106#[doc = "APB_CTRL_FRONT_END_MEM_PD_REG\n\nYou can [`read`](crate::Reg::read) this register and get [`front_end_mem_pd::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`front_end_mem_pd::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
107pub struct FRONT_END_MEM_PD_SPEC;
108impl crate::RegisterSpec for FRONT_END_MEM_PD_SPEC {
109    type Ux = u32;
110}
111#[doc = "`read()` method returns [`front_end_mem_pd::R`](R) reader structure"]
112impl crate::Readable for FRONT_END_MEM_PD_SPEC {}
113#[doc = "`write(|w| ..)` method takes [`front_end_mem_pd::W`](W) writer structure"]
114impl crate::Writable for FRONT_END_MEM_PD_SPEC {
115    type Safety = crate::Unsafe;
116    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
117    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
118}
119#[doc = "`reset()` method sets FRONT_END_MEM_PD to value 0x15"]
120impl crate::Resettable for FRONT_END_MEM_PD_SPEC {
121    const RESET_VALUE: u32 = 0x15;
122}