esp32s3_ulp/rtc_io/
touch_pad10.rs1#[doc = "Register `TOUCH_PAD10` reader"]
2pub type R = crate::R<TOUCH_PAD10_SPEC>;
3#[doc = "Register `TOUCH_PAD10` writer"]
4pub type W = crate::W<TOUCH_PAD10_SPEC>;
5#[doc = "Field `FUN_IE` reader - input enable in work mode"]
6pub type FUN_IE_R = crate::BitReader;
7#[doc = "Field `FUN_IE` writer - input enable in work mode"]
8pub type FUN_IE_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `SLP_OE` reader - output enable in sleep mode"]
10pub type SLP_OE_R = crate::BitReader;
11#[doc = "Field `SLP_OE` writer - output enable in sleep mode"]
12pub type SLP_OE_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `SLP_IE` reader - input enable in sleep mode"]
14pub type SLP_IE_R = crate::BitReader;
15#[doc = "Field `SLP_IE` writer - input enable in sleep mode"]
16pub type SLP_IE_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `SLP_SEL` reader - 1: enable sleep mode during sleep,0: no sleep mode"]
18pub type SLP_SEL_R = crate::BitReader;
19#[doc = "Field `SLP_SEL` writer - 1: enable sleep mode during sleep,0: no sleep mode"]
20pub type SLP_SEL_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `FUN_SEL` reader - function sel"]
22pub type FUN_SEL_R = crate::FieldReader;
23#[doc = "Field `FUN_SEL` writer - function sel"]
24pub type FUN_SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
25#[doc = "Field `MUX_SEL` reader - 1: use RTC GPIO,0: use digital GPIO"]
26pub type MUX_SEL_R = crate::BitReader;
27#[doc = "Field `MUX_SEL` writer - 1: use RTC GPIO,0: use digital GPIO"]
28pub type MUX_SEL_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `XPD` reader - TOUCH_XPD"]
30pub type XPD_R = crate::BitReader;
31#[doc = "Field `XPD` writer - TOUCH_XPD"]
32pub type XPD_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `TIE_OPT` reader - TOUCH_TIE_OPT"]
34pub type TIE_OPT_R = crate::BitReader;
35#[doc = "Field `TIE_OPT` writer - TOUCH_TIE_OPT"]
36pub type TIE_OPT_W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `START` reader - TOUCH_START"]
38pub type START_R = crate::BitReader;
39#[doc = "Field `START` writer - TOUCH_START"]
40pub type START_W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `RUE` reader - RUE"]
42pub type RUE_R = crate::BitReader;
43#[doc = "Field `RUE` writer - RUE"]
44pub type RUE_W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `RDE` reader - RDE"]
46pub type RDE_R = crate::BitReader;
47#[doc = "Field `RDE` writer - RDE"]
48pub type RDE_W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `DRV` reader - DRV"]
50pub type DRV_R = crate::FieldReader;
51#[doc = "Field `DRV` writer - DRV"]
52pub type DRV_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
53impl R {
54 #[doc = "Bit 13 - input enable in work mode"]
55 #[inline(always)]
56 pub fn fun_ie(&self) -> FUN_IE_R {
57 FUN_IE_R::new(((self.bits >> 13) & 1) != 0)
58 }
59 #[doc = "Bit 14 - output enable in sleep mode"]
60 #[inline(always)]
61 pub fn slp_oe(&self) -> SLP_OE_R {
62 SLP_OE_R::new(((self.bits >> 14) & 1) != 0)
63 }
64 #[doc = "Bit 15 - input enable in sleep mode"]
65 #[inline(always)]
66 pub fn slp_ie(&self) -> SLP_IE_R {
67 SLP_IE_R::new(((self.bits >> 15) & 1) != 0)
68 }
69 #[doc = "Bit 16 - 1: enable sleep mode during sleep,0: no sleep mode"]
70 #[inline(always)]
71 pub fn slp_sel(&self) -> SLP_SEL_R {
72 SLP_SEL_R::new(((self.bits >> 16) & 1) != 0)
73 }
74 #[doc = "Bits 17:18 - function sel"]
75 #[inline(always)]
76 pub fn fun_sel(&self) -> FUN_SEL_R {
77 FUN_SEL_R::new(((self.bits >> 17) & 3) as u8)
78 }
79 #[doc = "Bit 19 - 1: use RTC GPIO,0: use digital GPIO"]
80 #[inline(always)]
81 pub fn mux_sel(&self) -> MUX_SEL_R {
82 MUX_SEL_R::new(((self.bits >> 19) & 1) != 0)
83 }
84 #[doc = "Bit 20 - TOUCH_XPD"]
85 #[inline(always)]
86 pub fn xpd(&self) -> XPD_R {
87 XPD_R::new(((self.bits >> 20) & 1) != 0)
88 }
89 #[doc = "Bit 21 - TOUCH_TIE_OPT"]
90 #[inline(always)]
91 pub fn tie_opt(&self) -> TIE_OPT_R {
92 TIE_OPT_R::new(((self.bits >> 21) & 1) != 0)
93 }
94 #[doc = "Bit 22 - TOUCH_START"]
95 #[inline(always)]
96 pub fn start(&self) -> START_R {
97 START_R::new(((self.bits >> 22) & 1) != 0)
98 }
99 #[doc = "Bit 27 - RUE"]
100 #[inline(always)]
101 pub fn rue(&self) -> RUE_R {
102 RUE_R::new(((self.bits >> 27) & 1) != 0)
103 }
104 #[doc = "Bit 28 - RDE"]
105 #[inline(always)]
106 pub fn rde(&self) -> RDE_R {
107 RDE_R::new(((self.bits >> 28) & 1) != 0)
108 }
109 #[doc = "Bits 29:30 - DRV"]
110 #[inline(always)]
111 pub fn drv(&self) -> DRV_R {
112 DRV_R::new(((self.bits >> 29) & 3) as u8)
113 }
114}
115#[cfg(feature = "impl-register-debug")]
116impl core::fmt::Debug for R {
117 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
118 f.debug_struct("TOUCH_PAD10")
119 .field("fun_ie", &self.fun_ie())
120 .field("slp_oe", &self.slp_oe())
121 .field("slp_ie", &self.slp_ie())
122 .field("slp_sel", &self.slp_sel())
123 .field("fun_sel", &self.fun_sel())
124 .field("mux_sel", &self.mux_sel())
125 .field("xpd", &self.xpd())
126 .field("tie_opt", &self.tie_opt())
127 .field("start", &self.start())
128 .field("rue", &self.rue())
129 .field("rde", &self.rde())
130 .field("drv", &self.drv())
131 .finish()
132 }
133}
134impl W {
135 #[doc = "Bit 13 - input enable in work mode"]
136 #[inline(always)]
137 #[must_use]
138 pub fn fun_ie(&mut self) -> FUN_IE_W<TOUCH_PAD10_SPEC> {
139 FUN_IE_W::new(self, 13)
140 }
141 #[doc = "Bit 14 - output enable in sleep mode"]
142 #[inline(always)]
143 #[must_use]
144 pub fn slp_oe(&mut self) -> SLP_OE_W<TOUCH_PAD10_SPEC> {
145 SLP_OE_W::new(self, 14)
146 }
147 #[doc = "Bit 15 - input enable in sleep mode"]
148 #[inline(always)]
149 #[must_use]
150 pub fn slp_ie(&mut self) -> SLP_IE_W<TOUCH_PAD10_SPEC> {
151 SLP_IE_W::new(self, 15)
152 }
153 #[doc = "Bit 16 - 1: enable sleep mode during sleep,0: no sleep mode"]
154 #[inline(always)]
155 #[must_use]
156 pub fn slp_sel(&mut self) -> SLP_SEL_W<TOUCH_PAD10_SPEC> {
157 SLP_SEL_W::new(self, 16)
158 }
159 #[doc = "Bits 17:18 - function sel"]
160 #[inline(always)]
161 #[must_use]
162 pub fn fun_sel(&mut self) -> FUN_SEL_W<TOUCH_PAD10_SPEC> {
163 FUN_SEL_W::new(self, 17)
164 }
165 #[doc = "Bit 19 - 1: use RTC GPIO,0: use digital GPIO"]
166 #[inline(always)]
167 #[must_use]
168 pub fn mux_sel(&mut self) -> MUX_SEL_W<TOUCH_PAD10_SPEC> {
169 MUX_SEL_W::new(self, 19)
170 }
171 #[doc = "Bit 20 - TOUCH_XPD"]
172 #[inline(always)]
173 #[must_use]
174 pub fn xpd(&mut self) -> XPD_W<TOUCH_PAD10_SPEC> {
175 XPD_W::new(self, 20)
176 }
177 #[doc = "Bit 21 - TOUCH_TIE_OPT"]
178 #[inline(always)]
179 #[must_use]
180 pub fn tie_opt(&mut self) -> TIE_OPT_W<TOUCH_PAD10_SPEC> {
181 TIE_OPT_W::new(self, 21)
182 }
183 #[doc = "Bit 22 - TOUCH_START"]
184 #[inline(always)]
185 #[must_use]
186 pub fn start(&mut self) -> START_W<TOUCH_PAD10_SPEC> {
187 START_W::new(self, 22)
188 }
189 #[doc = "Bit 27 - RUE"]
190 #[inline(always)]
191 #[must_use]
192 pub fn rue(&mut self) -> RUE_W<TOUCH_PAD10_SPEC> {
193 RUE_W::new(self, 27)
194 }
195 #[doc = "Bit 28 - RDE"]
196 #[inline(always)]
197 #[must_use]
198 pub fn rde(&mut self) -> RDE_W<TOUCH_PAD10_SPEC> {
199 RDE_W::new(self, 28)
200 }
201 #[doc = "Bits 29:30 - DRV"]
202 #[inline(always)]
203 #[must_use]
204 pub fn drv(&mut self) -> DRV_W<TOUCH_PAD10_SPEC> {
205 DRV_W::new(self, 29)
206 }
207}
208#[doc = "configure RTC PAD10\n\nYou can [`read`](crate::Reg::read) this register and get [`touch_pad10::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`touch_pad10::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
209pub struct TOUCH_PAD10_SPEC;
210impl crate::RegisterSpec for TOUCH_PAD10_SPEC {
211 type Ux = u32;
212}
213#[doc = "`read()` method returns [`touch_pad10::R`](R) reader structure"]
214impl crate::Readable for TOUCH_PAD10_SPEC {}
215#[doc = "`write(|w| ..)` method takes [`touch_pad10::W`](W) writer structure"]
216impl crate::Writable for TOUCH_PAD10_SPEC {
217 type Safety = crate::Unsafe;
218 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
219 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
220}
221#[doc = "`reset()` method sets TOUCH_PAD10 to value 0x4000_0000"]
222impl crate::Resettable for TOUCH_PAD10_SPEC {
223 const RESET_VALUE: u32 = 0x4000_0000;
224}