esp32/nrx/
nrxpd_ctrl.rs

1#[doc = "Register `NRXPD_CTRL` reader"]
2pub type R = crate::R<NRXPD_CTRL_SPEC>;
3#[doc = "Register `NRXPD_CTRL` writer"]
4pub type W = crate::W<NRXPD_CTRL_SPEC>;
5#[doc = "Field `DEMAP_FORCE_PD` reader - "]
6pub type DEMAP_FORCE_PD_R = crate::BitReader;
7#[doc = "Field `DEMAP_FORCE_PD` writer - "]
8pub type DEMAP_FORCE_PD_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `DEMAP_FORCE_PU` reader - "]
10pub type DEMAP_FORCE_PU_R = crate::BitReader;
11#[doc = "Field `DEMAP_FORCE_PU` writer - "]
12pub type DEMAP_FORCE_PU_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `VIT_FORCE_PD` reader - "]
14pub type VIT_FORCE_PD_R = crate::BitReader;
15#[doc = "Field `VIT_FORCE_PD` writer - "]
16pub type VIT_FORCE_PD_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `VIT_FORCE_PU` reader - "]
18pub type VIT_FORCE_PU_R = crate::BitReader;
19#[doc = "Field `VIT_FORCE_PU` writer - "]
20pub type VIT_FORCE_PU_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `RX_ROT_FORCE_PD` reader - "]
22pub type RX_ROT_FORCE_PD_R = crate::BitReader;
23#[doc = "Field `RX_ROT_FORCE_PD` writer - "]
24pub type RX_ROT_FORCE_PD_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `RX_ROT_FORCE_PU` reader - "]
26pub type RX_ROT_FORCE_PU_R = crate::BitReader;
27#[doc = "Field `RX_ROT_FORCE_PU` writer - "]
28pub type RX_ROT_FORCE_PU_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `CHAN_EST_FORCE_PD` reader - "]
30pub type CHAN_EST_FORCE_PD_R = crate::BitReader;
31#[doc = "Field `CHAN_EST_FORCE_PD` writer - "]
32pub type CHAN_EST_FORCE_PD_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `CHAN_EST_FORCE_PU` reader - "]
34pub type CHAN_EST_FORCE_PU_R = crate::BitReader;
35#[doc = "Field `CHAN_EST_FORCE_PU` writer - "]
36pub type CHAN_EST_FORCE_PU_W<'a, REG> = crate::BitWriter<'a, REG>;
37impl R {
38    #[doc = "Bit 0"]
39    #[inline(always)]
40    pub fn demap_force_pd(&self) -> DEMAP_FORCE_PD_R {
41        DEMAP_FORCE_PD_R::new((self.bits & 1) != 0)
42    }
43    #[doc = "Bit 1"]
44    #[inline(always)]
45    pub fn demap_force_pu(&self) -> DEMAP_FORCE_PU_R {
46        DEMAP_FORCE_PU_R::new(((self.bits >> 1) & 1) != 0)
47    }
48    #[doc = "Bit 2"]
49    #[inline(always)]
50    pub fn vit_force_pd(&self) -> VIT_FORCE_PD_R {
51        VIT_FORCE_PD_R::new(((self.bits >> 2) & 1) != 0)
52    }
53    #[doc = "Bit 3"]
54    #[inline(always)]
55    pub fn vit_force_pu(&self) -> VIT_FORCE_PU_R {
56        VIT_FORCE_PU_R::new(((self.bits >> 3) & 1) != 0)
57    }
58    #[doc = "Bit 4"]
59    #[inline(always)]
60    pub fn rx_rot_force_pd(&self) -> RX_ROT_FORCE_PD_R {
61        RX_ROT_FORCE_PD_R::new(((self.bits >> 4) & 1) != 0)
62    }
63    #[doc = "Bit 5"]
64    #[inline(always)]
65    pub fn rx_rot_force_pu(&self) -> RX_ROT_FORCE_PU_R {
66        RX_ROT_FORCE_PU_R::new(((self.bits >> 5) & 1) != 0)
67    }
68    #[doc = "Bit 6"]
69    #[inline(always)]
70    pub fn chan_est_force_pd(&self) -> CHAN_EST_FORCE_PD_R {
71        CHAN_EST_FORCE_PD_R::new(((self.bits >> 6) & 1) != 0)
72    }
73    #[doc = "Bit 7"]
74    #[inline(always)]
75    pub fn chan_est_force_pu(&self) -> CHAN_EST_FORCE_PU_R {
76        CHAN_EST_FORCE_PU_R::new(((self.bits >> 7) & 1) != 0)
77    }
78}
79#[cfg(feature = "impl-register-debug")]
80impl core::fmt::Debug for R {
81    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
82        f.debug_struct("NRXPD_CTRL")
83            .field("demap_force_pd", &self.demap_force_pd())
84            .field("demap_force_pu", &self.demap_force_pu())
85            .field("vit_force_pd", &self.vit_force_pd())
86            .field("vit_force_pu", &self.vit_force_pu())
87            .field("rx_rot_force_pd", &self.rx_rot_force_pd())
88            .field("rx_rot_force_pu", &self.rx_rot_force_pu())
89            .field("chan_est_force_pd", &self.chan_est_force_pd())
90            .field("chan_est_force_pu", &self.chan_est_force_pu())
91            .finish()
92    }
93}
94impl W {
95    #[doc = "Bit 0"]
96    #[inline(always)]
97    pub fn demap_force_pd(&mut self) -> DEMAP_FORCE_PD_W<NRXPD_CTRL_SPEC> {
98        DEMAP_FORCE_PD_W::new(self, 0)
99    }
100    #[doc = "Bit 1"]
101    #[inline(always)]
102    pub fn demap_force_pu(&mut self) -> DEMAP_FORCE_PU_W<NRXPD_CTRL_SPEC> {
103        DEMAP_FORCE_PU_W::new(self, 1)
104    }
105    #[doc = "Bit 2"]
106    #[inline(always)]
107    pub fn vit_force_pd(&mut self) -> VIT_FORCE_PD_W<NRXPD_CTRL_SPEC> {
108        VIT_FORCE_PD_W::new(self, 2)
109    }
110    #[doc = "Bit 3"]
111    #[inline(always)]
112    pub fn vit_force_pu(&mut self) -> VIT_FORCE_PU_W<NRXPD_CTRL_SPEC> {
113        VIT_FORCE_PU_W::new(self, 3)
114    }
115    #[doc = "Bit 4"]
116    #[inline(always)]
117    pub fn rx_rot_force_pd(&mut self) -> RX_ROT_FORCE_PD_W<NRXPD_CTRL_SPEC> {
118        RX_ROT_FORCE_PD_W::new(self, 4)
119    }
120    #[doc = "Bit 5"]
121    #[inline(always)]
122    pub fn rx_rot_force_pu(&mut self) -> RX_ROT_FORCE_PU_W<NRXPD_CTRL_SPEC> {
123        RX_ROT_FORCE_PU_W::new(self, 5)
124    }
125    #[doc = "Bit 6"]
126    #[inline(always)]
127    pub fn chan_est_force_pd(&mut self) -> CHAN_EST_FORCE_PD_W<NRXPD_CTRL_SPEC> {
128        CHAN_EST_FORCE_PD_W::new(self, 6)
129    }
130    #[doc = "Bit 7"]
131    #[inline(always)]
132    pub fn chan_est_force_pu(&mut self) -> CHAN_EST_FORCE_PU_W<NRXPD_CTRL_SPEC> {
133        CHAN_EST_FORCE_PU_W::new(self, 7)
134    }
135}
136#[doc = "WiFi RX control register\n\nYou can [`read`](crate::Reg::read) this register and get [`nrxpd_ctrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`nrxpd_ctrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
137pub struct NRXPD_CTRL_SPEC;
138impl crate::RegisterSpec for NRXPD_CTRL_SPEC {
139    type Ux = u32;
140}
141#[doc = "`read()` method returns [`nrxpd_ctrl::R`](R) reader structure"]
142impl crate::Readable for NRXPD_CTRL_SPEC {}
143#[doc = "`write(|w| ..)` method takes [`nrxpd_ctrl::W`](W) writer structure"]
144impl crate::Writable for NRXPD_CTRL_SPEC {
145    type Safety = crate::Unsafe;
146}
147#[doc = "`reset()` method sets NRXPD_CTRL to value 0"]
148impl crate::Resettable for NRXPD_CTRL_SPEC {}