esp32c2/bb/
bbpd_ctrl.rs

1#[doc = "Register `BBPD_CTRL` reader"]
2pub type R = crate::R<BBPD_CTRL_SPEC>;
3#[doc = "Register `BBPD_CTRL` writer"]
4pub type W = crate::W<BBPD_CTRL_SPEC>;
5#[doc = "Field `DC_EST_FORCE_PD` reader - "]
6pub type DC_EST_FORCE_PD_R = crate::BitReader;
7#[doc = "Field `DC_EST_FORCE_PD` writer - "]
8pub type DC_EST_FORCE_PD_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `DC_EST_FORCE_PU` reader - "]
10pub type DC_EST_FORCE_PU_R = crate::BitReader;
11#[doc = "Field `DC_EST_FORCE_PU` writer - "]
12pub type DC_EST_FORCE_PU_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `FFT_FORCE_PD` reader - "]
14pub type FFT_FORCE_PD_R = crate::BitReader;
15#[doc = "Field `FFT_FORCE_PD` writer - "]
16pub type FFT_FORCE_PD_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `FFT_FORCE_PU` reader - "]
18pub type FFT_FORCE_PU_R = crate::BitReader;
19#[doc = "Field `FFT_FORCE_PU` writer - "]
20pub type FFT_FORCE_PU_W<'a, REG> = crate::BitWriter<'a, REG>;
21impl R {
22    #[doc = "Bit 0"]
23    #[inline(always)]
24    pub fn dc_est_force_pd(&self) -> DC_EST_FORCE_PD_R {
25        DC_EST_FORCE_PD_R::new((self.bits & 1) != 0)
26    }
27    #[doc = "Bit 1"]
28    #[inline(always)]
29    pub fn dc_est_force_pu(&self) -> DC_EST_FORCE_PU_R {
30        DC_EST_FORCE_PU_R::new(((self.bits >> 1) & 1) != 0)
31    }
32    #[doc = "Bit 2"]
33    #[inline(always)]
34    pub fn fft_force_pd(&self) -> FFT_FORCE_PD_R {
35        FFT_FORCE_PD_R::new(((self.bits >> 2) & 1) != 0)
36    }
37    #[doc = "Bit 3"]
38    #[inline(always)]
39    pub fn fft_force_pu(&self) -> FFT_FORCE_PU_R {
40        FFT_FORCE_PU_R::new(((self.bits >> 3) & 1) != 0)
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("BBPD_CTRL")
47            .field("dc_est_force_pd", &self.dc_est_force_pd())
48            .field("dc_est_force_pu", &self.dc_est_force_pu())
49            .field("fft_force_pd", &self.fft_force_pd())
50            .field("fft_force_pu", &self.fft_force_pu())
51            .finish()
52    }
53}
54impl W {
55    #[doc = "Bit 0"]
56    #[inline(always)]
57    pub fn dc_est_force_pd(&mut self) -> DC_EST_FORCE_PD_W<BBPD_CTRL_SPEC> {
58        DC_EST_FORCE_PD_W::new(self, 0)
59    }
60    #[doc = "Bit 1"]
61    #[inline(always)]
62    pub fn dc_est_force_pu(&mut self) -> DC_EST_FORCE_PU_W<BBPD_CTRL_SPEC> {
63        DC_EST_FORCE_PU_W::new(self, 1)
64    }
65    #[doc = "Bit 2"]
66    #[inline(always)]
67    pub fn fft_force_pd(&mut self) -> FFT_FORCE_PD_W<BBPD_CTRL_SPEC> {
68        FFT_FORCE_PD_W::new(self, 2)
69    }
70    #[doc = "Bit 3"]
71    #[inline(always)]
72    pub fn fft_force_pu(&mut self) -> FFT_FORCE_PU_W<BBPD_CTRL_SPEC> {
73        FFT_FORCE_PU_W::new(self, 3)
74    }
75}
76#[doc = "Baseband control register\n\nYou can [`read`](crate::Reg::read) this register and get [`bbpd_ctrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`bbpd_ctrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
77pub struct BBPD_CTRL_SPEC;
78impl crate::RegisterSpec for BBPD_CTRL_SPEC {
79    type Ux = u32;
80}
81#[doc = "`read()` method returns [`bbpd_ctrl::R`](R) reader structure"]
82impl crate::Readable for BBPD_CTRL_SPEC {}
83#[doc = "`write(|w| ..)` method takes [`bbpd_ctrl::W`](W) writer structure"]
84impl crate::Writable for BBPD_CTRL_SPEC {
85    type Safety = crate::Unsafe;
86    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
87    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
88}
89#[doc = "`reset()` method sets BBPD_CTRL to value 0"]
90impl crate::Resettable for BBPD_CTRL_SPEC {
91    const RESET_VALUE: u32 = 0;
92}