esp32/rtc_io/
touch_pad5.rs1#[doc = "Register `TOUCH_PAD5` reader"]
2pub type R = crate::R<TOUCH_PAD5_SPEC>;
3#[doc = "Register `TOUCH_PAD5` writer"]
4pub type W = crate::W<TOUCH_PAD5_SPEC>;
5#[doc = "Field `TO_GPIO` reader - connect the rtc pad input to digital pad input Ó0Ó is availbale.MTDI"]
6pub type TO_GPIO_R = crate::BitReader;
7#[doc = "Field `TO_GPIO` writer - connect the rtc pad input to digital pad input Ó0Ó is availbale.MTDI"]
8pub type TO_GPIO_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `FUN_IE` reader - the input enable of the pad"]
10pub type FUN_IE_R = crate::BitReader;
11#[doc = "Field `FUN_IE` writer - the input enable of the pad"]
12pub type FUN_IE_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `SLP_OE` reader - the output enable of the pad in sleep status"]
14pub type SLP_OE_R = crate::BitReader;
15#[doc = "Field `SLP_OE` writer - the output enable of the pad in sleep status"]
16pub type SLP_OE_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `SLP_IE` reader - the input enable of the pad in sleep status"]
18pub type SLP_IE_R = crate::BitReader;
19#[doc = "Field `SLP_IE` writer - the input enable of the pad in sleep status"]
20pub type SLP_IE_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `SLP_SEL` reader - the sleep status selection signal of the pad"]
22pub type SLP_SEL_R = crate::BitReader;
23#[doc = "Field `SLP_SEL` writer - the sleep status selection signal of the pad"]
24pub type SLP_SEL_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `FUN_SEL` reader - the functional selection signal of the pad"]
26pub type FUN_SEL_R = crate::FieldReader;
27#[doc = "Field `FUN_SEL` writer - the functional selection signal of the pad"]
28pub type FUN_SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
29#[doc = "Field `MUX_SEL` reader - Ò1Ó select the digital function Ó0Óslection the rtc function"]
30pub type MUX_SEL_R = crate::BitReader;
31#[doc = "Field `MUX_SEL` writer - Ò1Ó select the digital function Ó0Óslection the rtc function"]
32pub type MUX_SEL_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `XPD` reader - touch sensor power on."]
34pub type XPD_R = crate::BitReader;
35#[doc = "Field `XPD` writer - touch sensor power on."]
36pub type XPD_W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `TIE_OPT` reader - default touch sensor tie option. 0: tie low 1: tie high."]
38pub type TIE_OPT_R = crate::BitReader;
39#[doc = "Field `TIE_OPT` writer - default touch sensor tie option. 0: tie low 1: tie high."]
40pub type TIE_OPT_W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `START` reader - start touch sensor."]
42pub type START_R = crate::BitReader;
43#[doc = "Field `START` writer - start touch sensor."]
44pub type START_W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `DAC` reader - touch sensor slope control. 3-bit for each touch panel default 100."]
46pub type DAC_R = crate::FieldReader;
47#[doc = "Field `DAC` writer - touch sensor slope control. 3-bit for each touch panel default 100."]
48pub type DAC_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
49#[doc = "Field `RUE` reader - the pull up enable of the pad"]
50pub type RUE_R = crate::BitReader;
51#[doc = "Field `RUE` writer - the pull up enable of the pad"]
52pub type RUE_W<'a, REG> = crate::BitWriter<'a, REG>;
53#[doc = "Field `RDE` reader - the pull down enable of the pad"]
54pub type RDE_R = crate::BitReader;
55#[doc = "Field `RDE` writer - the pull down enable of the pad"]
56pub type RDE_W<'a, REG> = crate::BitWriter<'a, REG>;
57#[doc = "Field `DRV` reader - the driver strength of the pad"]
58pub type DRV_R = crate::FieldReader;
59#[doc = "Field `DRV` writer - the driver strength of the pad"]
60pub type DRV_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
61#[doc = "Field `HOLD` reader - hold the current value of the output when setting the hold to Ò1Ó"]
62pub type HOLD_R = crate::BitReader;
63#[doc = "Field `HOLD` writer - hold the current value of the output when setting the hold to Ò1Ó"]
64pub type HOLD_W<'a, REG> = crate::BitWriter<'a, REG>;
65impl R {
66 #[doc = "Bit 12 - connect the rtc pad input to digital pad input Ó0Ó is availbale.MTDI"]
67 #[inline(always)]
68 pub fn to_gpio(&self) -> TO_GPIO_R {
69 TO_GPIO_R::new(((self.bits >> 12) & 1) != 0)
70 }
71 #[doc = "Bit 13 - the input enable of the pad"]
72 #[inline(always)]
73 pub fn fun_ie(&self) -> FUN_IE_R {
74 FUN_IE_R::new(((self.bits >> 13) & 1) != 0)
75 }
76 #[doc = "Bit 14 - the output enable of the pad in sleep status"]
77 #[inline(always)]
78 pub fn slp_oe(&self) -> SLP_OE_R {
79 SLP_OE_R::new(((self.bits >> 14) & 1) != 0)
80 }
81 #[doc = "Bit 15 - the input enable of the pad in sleep status"]
82 #[inline(always)]
83 pub fn slp_ie(&self) -> SLP_IE_R {
84 SLP_IE_R::new(((self.bits >> 15) & 1) != 0)
85 }
86 #[doc = "Bit 16 - the sleep status selection signal of the pad"]
87 #[inline(always)]
88 pub fn slp_sel(&self) -> SLP_SEL_R {
89 SLP_SEL_R::new(((self.bits >> 16) & 1) != 0)
90 }
91 #[doc = "Bits 17:18 - the functional selection signal of the pad"]
92 #[inline(always)]
93 pub fn fun_sel(&self) -> FUN_SEL_R {
94 FUN_SEL_R::new(((self.bits >> 17) & 3) as u8)
95 }
96 #[doc = "Bit 19 - Ò1Ó select the digital function Ó0Óslection the rtc function"]
97 #[inline(always)]
98 pub fn mux_sel(&self) -> MUX_SEL_R {
99 MUX_SEL_R::new(((self.bits >> 19) & 1) != 0)
100 }
101 #[doc = "Bit 20 - touch sensor power on."]
102 #[inline(always)]
103 pub fn xpd(&self) -> XPD_R {
104 XPD_R::new(((self.bits >> 20) & 1) != 0)
105 }
106 #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."]
107 #[inline(always)]
108 pub fn tie_opt(&self) -> TIE_OPT_R {
109 TIE_OPT_R::new(((self.bits >> 21) & 1) != 0)
110 }
111 #[doc = "Bit 22 - start touch sensor."]
112 #[inline(always)]
113 pub fn start(&self) -> START_R {
114 START_R::new(((self.bits >> 22) & 1) != 0)
115 }
116 #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."]
117 #[inline(always)]
118 pub fn dac(&self) -> DAC_R {
119 DAC_R::new(((self.bits >> 23) & 7) as u8)
120 }
121 #[doc = "Bit 27 - the pull up enable of the pad"]
122 #[inline(always)]
123 pub fn rue(&self) -> RUE_R {
124 RUE_R::new(((self.bits >> 27) & 1) != 0)
125 }
126 #[doc = "Bit 28 - the pull down enable of the pad"]
127 #[inline(always)]
128 pub fn rde(&self) -> RDE_R {
129 RDE_R::new(((self.bits >> 28) & 1) != 0)
130 }
131 #[doc = "Bits 29:30 - the driver strength of the pad"]
132 #[inline(always)]
133 pub fn drv(&self) -> DRV_R {
134 DRV_R::new(((self.bits >> 29) & 3) as u8)
135 }
136 #[doc = "Bit 31 - hold the current value of the output when setting the hold to Ò1Ó"]
137 #[inline(always)]
138 pub fn hold(&self) -> HOLD_R {
139 HOLD_R::new(((self.bits >> 31) & 1) != 0)
140 }
141}
142#[cfg(feature = "impl-register-debug")]
143impl core::fmt::Debug for R {
144 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
145 f.debug_struct("TOUCH_PAD5")
146 .field("to_gpio", &self.to_gpio())
147 .field("fun_ie", &self.fun_ie())
148 .field("slp_oe", &self.slp_oe())
149 .field("slp_ie", &self.slp_ie())
150 .field("slp_sel", &self.slp_sel())
151 .field("fun_sel", &self.fun_sel())
152 .field("mux_sel", &self.mux_sel())
153 .field("xpd", &self.xpd())
154 .field("tie_opt", &self.tie_opt())
155 .field("start", &self.start())
156 .field("dac", &self.dac())
157 .field("rue", &self.rue())
158 .field("rde", &self.rde())
159 .field("drv", &self.drv())
160 .field("hold", &self.hold())
161 .finish()
162 }
163}
164impl W {
165 #[doc = "Bit 12 - connect the rtc pad input to digital pad input Ó0Ó is availbale.MTDI"]
166 #[inline(always)]
167 pub fn to_gpio(&mut self) -> TO_GPIO_W<TOUCH_PAD5_SPEC> {
168 TO_GPIO_W::new(self, 12)
169 }
170 #[doc = "Bit 13 - the input enable of the pad"]
171 #[inline(always)]
172 pub fn fun_ie(&mut self) -> FUN_IE_W<TOUCH_PAD5_SPEC> {
173 FUN_IE_W::new(self, 13)
174 }
175 #[doc = "Bit 14 - the output enable of the pad in sleep status"]
176 #[inline(always)]
177 pub fn slp_oe(&mut self) -> SLP_OE_W<TOUCH_PAD5_SPEC> {
178 SLP_OE_W::new(self, 14)
179 }
180 #[doc = "Bit 15 - the input enable of the pad in sleep status"]
181 #[inline(always)]
182 pub fn slp_ie(&mut self) -> SLP_IE_W<TOUCH_PAD5_SPEC> {
183 SLP_IE_W::new(self, 15)
184 }
185 #[doc = "Bit 16 - the sleep status selection signal of the pad"]
186 #[inline(always)]
187 pub fn slp_sel(&mut self) -> SLP_SEL_W<TOUCH_PAD5_SPEC> {
188 SLP_SEL_W::new(self, 16)
189 }
190 #[doc = "Bits 17:18 - the functional selection signal of the pad"]
191 #[inline(always)]
192 pub fn fun_sel(&mut self) -> FUN_SEL_W<TOUCH_PAD5_SPEC> {
193 FUN_SEL_W::new(self, 17)
194 }
195 #[doc = "Bit 19 - Ò1Ó select the digital function Ó0Óslection the rtc function"]
196 #[inline(always)]
197 pub fn mux_sel(&mut self) -> MUX_SEL_W<TOUCH_PAD5_SPEC> {
198 MUX_SEL_W::new(self, 19)
199 }
200 #[doc = "Bit 20 - touch sensor power on."]
201 #[inline(always)]
202 pub fn xpd(&mut self) -> XPD_W<TOUCH_PAD5_SPEC> {
203 XPD_W::new(self, 20)
204 }
205 #[doc = "Bit 21 - default touch sensor tie option. 0: tie low 1: tie high."]
206 #[inline(always)]
207 pub fn tie_opt(&mut self) -> TIE_OPT_W<TOUCH_PAD5_SPEC> {
208 TIE_OPT_W::new(self, 21)
209 }
210 #[doc = "Bit 22 - start touch sensor."]
211 #[inline(always)]
212 pub fn start(&mut self) -> START_W<TOUCH_PAD5_SPEC> {
213 START_W::new(self, 22)
214 }
215 #[doc = "Bits 23:25 - touch sensor slope control. 3-bit for each touch panel default 100."]
216 #[inline(always)]
217 pub fn dac(&mut self) -> DAC_W<TOUCH_PAD5_SPEC> {
218 DAC_W::new(self, 23)
219 }
220 #[doc = "Bit 27 - the pull up enable of the pad"]
221 #[inline(always)]
222 pub fn rue(&mut self) -> RUE_W<TOUCH_PAD5_SPEC> {
223 RUE_W::new(self, 27)
224 }
225 #[doc = "Bit 28 - the pull down enable of the pad"]
226 #[inline(always)]
227 pub fn rde(&mut self) -> RDE_W<TOUCH_PAD5_SPEC> {
228 RDE_W::new(self, 28)
229 }
230 #[doc = "Bits 29:30 - the driver strength of the pad"]
231 #[inline(always)]
232 pub fn drv(&mut self) -> DRV_W<TOUCH_PAD5_SPEC> {
233 DRV_W::new(self, 29)
234 }
235 #[doc = "Bit 31 - hold the current value of the output when setting the hold to Ò1Ó"]
236 #[inline(always)]
237 pub fn hold(&mut self) -> HOLD_W<TOUCH_PAD5_SPEC> {
238 HOLD_W::new(self, 31)
239 }
240}
241#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad5::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad5::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
242pub struct TOUCH_PAD5_SPEC;
243impl crate::RegisterSpec for TOUCH_PAD5_SPEC {
244 type Ux = u32;
245}
246#[doc = "`read()` method returns [`touch_pad5::R`](R) reader structure"]
247impl crate::Readable for TOUCH_PAD5_SPEC {}
248#[doc = "`write(|w| ..)` method takes [`touch_pad5::W`](W) writer structure"]
249impl crate::Writable for TOUCH_PAD5_SPEC {
250 type Safety = crate::Unsafe;
251 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
252 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
253}
254#[doc = "`reset()` method sets TOUCH_PAD5 to value 0x5200_0000"]
255impl crate::Resettable for TOUCH_PAD5_SPEC {
256 const RESET_VALUE: u32 = 0x5200_0000;
257}