esp32p4/lp_adc/
amp_ctrl2.rs1#[doc = "Register `AMP_CTRL2` reader"]
2pub type R = crate::R<AMP_CTRL2_SPEC>;
3#[doc = "Register `AMP_CTRL2` writer"]
4pub type W = crate::W<AMP_CTRL2_SPEC>;
5#[doc = "Field `SAR1_DAC_XPD_FSM_IDLE` reader - N/A"]
6pub type SAR1_DAC_XPD_FSM_IDLE_R = crate::BitReader;
7#[doc = "Field `SAR1_DAC_XPD_FSM_IDLE` writer - N/A"]
8pub type SAR1_DAC_XPD_FSM_IDLE_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `XPD_SAR_AMP_FSM_IDLE` reader - N/A"]
10pub type XPD_SAR_AMP_FSM_IDLE_R = crate::BitReader;
11#[doc = "Field `XPD_SAR_AMP_FSM_IDLE` writer - N/A"]
12pub type XPD_SAR_AMP_FSM_IDLE_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `AMP_RST_FB_FSM_IDLE` reader - N/A"]
14pub type AMP_RST_FB_FSM_IDLE_R = crate::BitReader;
15#[doc = "Field `AMP_RST_FB_FSM_IDLE` writer - N/A"]
16pub type AMP_RST_FB_FSM_IDLE_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `AMP_SHORT_REF_FSM_IDLE` reader - N/A"]
18pub type AMP_SHORT_REF_FSM_IDLE_R = crate::BitReader;
19#[doc = "Field `AMP_SHORT_REF_FSM_IDLE` writer - N/A"]
20pub type AMP_SHORT_REF_FSM_IDLE_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `AMP_SHORT_REF_GND_FSM_IDLE` reader - N/A"]
22pub type AMP_SHORT_REF_GND_FSM_IDLE_R = crate::BitReader;
23#[doc = "Field `AMP_SHORT_REF_GND_FSM_IDLE` writer - N/A"]
24pub type AMP_SHORT_REF_GND_FSM_IDLE_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `XPD_SAR_FSM_IDLE` reader - N/A"]
26pub type XPD_SAR_FSM_IDLE_R = crate::BitReader;
27#[doc = "Field `XPD_SAR_FSM_IDLE` writer - N/A"]
28pub type XPD_SAR_FSM_IDLE_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `SAR_RSTB_FSM_IDLE` reader - N/A"]
30pub type SAR_RSTB_FSM_IDLE_R = crate::BitReader;
31#[doc = "Field `SAR_RSTB_FSM_IDLE` writer - N/A"]
32pub type SAR_RSTB_FSM_IDLE_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `SAR_AMP_WAIT3` reader - N/A"]
34pub type SAR_AMP_WAIT3_R = crate::FieldReader<u16>;
35#[doc = "Field `SAR_AMP_WAIT3` writer - N/A"]
36pub type SAR_AMP_WAIT3_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
37impl R {
38 #[doc = "Bit 0 - N/A"]
39 #[inline(always)]
40 pub fn sar1_dac_xpd_fsm_idle(&self) -> SAR1_DAC_XPD_FSM_IDLE_R {
41 SAR1_DAC_XPD_FSM_IDLE_R::new((self.bits & 1) != 0)
42 }
43 #[doc = "Bit 1 - N/A"]
44 #[inline(always)]
45 pub fn xpd_sar_amp_fsm_idle(&self) -> XPD_SAR_AMP_FSM_IDLE_R {
46 XPD_SAR_AMP_FSM_IDLE_R::new(((self.bits >> 1) & 1) != 0)
47 }
48 #[doc = "Bit 2 - N/A"]
49 #[inline(always)]
50 pub fn amp_rst_fb_fsm_idle(&self) -> AMP_RST_FB_FSM_IDLE_R {
51 AMP_RST_FB_FSM_IDLE_R::new(((self.bits >> 2) & 1) != 0)
52 }
53 #[doc = "Bit 3 - N/A"]
54 #[inline(always)]
55 pub fn amp_short_ref_fsm_idle(&self) -> AMP_SHORT_REF_FSM_IDLE_R {
56 AMP_SHORT_REF_FSM_IDLE_R::new(((self.bits >> 3) & 1) != 0)
57 }
58 #[doc = "Bit 4 - N/A"]
59 #[inline(always)]
60 pub fn amp_short_ref_gnd_fsm_idle(&self) -> AMP_SHORT_REF_GND_FSM_IDLE_R {
61 AMP_SHORT_REF_GND_FSM_IDLE_R::new(((self.bits >> 4) & 1) != 0)
62 }
63 #[doc = "Bit 5 - N/A"]
64 #[inline(always)]
65 pub fn xpd_sar_fsm_idle(&self) -> XPD_SAR_FSM_IDLE_R {
66 XPD_SAR_FSM_IDLE_R::new(((self.bits >> 5) & 1) != 0)
67 }
68 #[doc = "Bit 6 - N/A"]
69 #[inline(always)]
70 pub fn sar_rstb_fsm_idle(&self) -> SAR_RSTB_FSM_IDLE_R {
71 SAR_RSTB_FSM_IDLE_R::new(((self.bits >> 6) & 1) != 0)
72 }
73 #[doc = "Bits 16:31 - N/A"]
74 #[inline(always)]
75 pub fn sar_amp_wait3(&self) -> SAR_AMP_WAIT3_R {
76 SAR_AMP_WAIT3_R::new(((self.bits >> 16) & 0xffff) as u16)
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("AMP_CTRL2")
83 .field(
84 "sar1_dac_xpd_fsm_idle",
85 &format_args!("{}", self.sar1_dac_xpd_fsm_idle().bit()),
86 )
87 .field(
88 "xpd_sar_amp_fsm_idle",
89 &format_args!("{}", self.xpd_sar_amp_fsm_idle().bit()),
90 )
91 .field(
92 "amp_rst_fb_fsm_idle",
93 &format_args!("{}", self.amp_rst_fb_fsm_idle().bit()),
94 )
95 .field(
96 "amp_short_ref_fsm_idle",
97 &format_args!("{}", self.amp_short_ref_fsm_idle().bit()),
98 )
99 .field(
100 "amp_short_ref_gnd_fsm_idle",
101 &format_args!("{}", self.amp_short_ref_gnd_fsm_idle().bit()),
102 )
103 .field(
104 "xpd_sar_fsm_idle",
105 &format_args!("{}", self.xpd_sar_fsm_idle().bit()),
106 )
107 .field(
108 "sar_rstb_fsm_idle",
109 &format_args!("{}", self.sar_rstb_fsm_idle().bit()),
110 )
111 .field(
112 "sar_amp_wait3",
113 &format_args!("{}", self.sar_amp_wait3().bits()),
114 )
115 .finish()
116 }
117}
118#[cfg(feature = "impl-register-debug")]
119impl core::fmt::Debug for crate::generic::Reg<AMP_CTRL2_SPEC> {
120 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
121 core::fmt::Debug::fmt(&self.read(), f)
122 }
123}
124impl W {
125 #[doc = "Bit 0 - N/A"]
126 #[inline(always)]
127 #[must_use]
128 pub fn sar1_dac_xpd_fsm_idle(&mut self) -> SAR1_DAC_XPD_FSM_IDLE_W<AMP_CTRL2_SPEC> {
129 SAR1_DAC_XPD_FSM_IDLE_W::new(self, 0)
130 }
131 #[doc = "Bit 1 - N/A"]
132 #[inline(always)]
133 #[must_use]
134 pub fn xpd_sar_amp_fsm_idle(&mut self) -> XPD_SAR_AMP_FSM_IDLE_W<AMP_CTRL2_SPEC> {
135 XPD_SAR_AMP_FSM_IDLE_W::new(self, 1)
136 }
137 #[doc = "Bit 2 - N/A"]
138 #[inline(always)]
139 #[must_use]
140 pub fn amp_rst_fb_fsm_idle(&mut self) -> AMP_RST_FB_FSM_IDLE_W<AMP_CTRL2_SPEC> {
141 AMP_RST_FB_FSM_IDLE_W::new(self, 2)
142 }
143 #[doc = "Bit 3 - N/A"]
144 #[inline(always)]
145 #[must_use]
146 pub fn amp_short_ref_fsm_idle(&mut self) -> AMP_SHORT_REF_FSM_IDLE_W<AMP_CTRL2_SPEC> {
147 AMP_SHORT_REF_FSM_IDLE_W::new(self, 3)
148 }
149 #[doc = "Bit 4 - N/A"]
150 #[inline(always)]
151 #[must_use]
152 pub fn amp_short_ref_gnd_fsm_idle(&mut self) -> AMP_SHORT_REF_GND_FSM_IDLE_W<AMP_CTRL2_SPEC> {
153 AMP_SHORT_REF_GND_FSM_IDLE_W::new(self, 4)
154 }
155 #[doc = "Bit 5 - N/A"]
156 #[inline(always)]
157 #[must_use]
158 pub fn xpd_sar_fsm_idle(&mut self) -> XPD_SAR_FSM_IDLE_W<AMP_CTRL2_SPEC> {
159 XPD_SAR_FSM_IDLE_W::new(self, 5)
160 }
161 #[doc = "Bit 6 - N/A"]
162 #[inline(always)]
163 #[must_use]
164 pub fn sar_rstb_fsm_idle(&mut self) -> SAR_RSTB_FSM_IDLE_W<AMP_CTRL2_SPEC> {
165 SAR_RSTB_FSM_IDLE_W::new(self, 6)
166 }
167 #[doc = "Bits 16:31 - N/A"]
168 #[inline(always)]
169 #[must_use]
170 pub fn sar_amp_wait3(&mut self) -> SAR_AMP_WAIT3_W<AMP_CTRL2_SPEC> {
171 SAR_AMP_WAIT3_W::new(self, 16)
172 }
173}
174#[doc = "N/A\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`amp_ctrl2::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`amp_ctrl2::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
175pub struct AMP_CTRL2_SPEC;
176impl crate::RegisterSpec for AMP_CTRL2_SPEC {
177 type Ux = u32;
178}
179#[doc = "`read()` method returns [`amp_ctrl2::R`](R) reader structure"]
180impl crate::Readable for AMP_CTRL2_SPEC {}
181#[doc = "`write(|w| ..)` method takes [`amp_ctrl2::W`](W) writer structure"]
182impl crate::Writable for AMP_CTRL2_SPEC {
183 type Safety = crate::Unsafe;
184 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
185 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
186}
187#[doc = "`reset()` method sets AMP_CTRL2 to value 0x000a_0000"]
188impl crate::Resettable for AMP_CTRL2_SPEC {
189 const RESET_VALUE: u32 = 0x000a_0000;
190}