1#[doc = "Register `INT_ENA` reader"]
2pub type R = crate::R<INT_ENA_SPEC>;
3#[doc = "Register `INT_ENA` writer"]
4pub type W = crate::W<INT_ENA_SPEC>;
5#[doc = "Field `SLP_WAKEUP` reader - enable sleep wakeup interrupt"]
6pub type SLP_WAKEUP_R = crate::BitReader;
7#[doc = "Field `SLP_WAKEUP` writer - enable sleep wakeup interrupt"]
8pub type SLP_WAKEUP_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `SLP_REJECT` reader - enable sleep reject interrupt"]
10pub type SLP_REJECT_R = crate::BitReader;
11#[doc = "Field `SLP_REJECT` writer - enable sleep reject interrupt"]
12pub type SLP_REJECT_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `SDIO_IDLE` reader - enable SDIO idle interrupt"]
14pub type SDIO_IDLE_R = crate::BitReader;
15#[doc = "Field `SDIO_IDLE` writer - enable SDIO idle interrupt"]
16pub type SDIO_IDLE_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `WDT` reader - enable RTC WDT interrupt"]
18pub type WDT_R = crate::BitReader;
19#[doc = "Field `WDT` writer - enable RTC WDT interrupt"]
20pub type WDT_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `TOUCH_SCAN_DONE` reader - enable touch scan done interrupt"]
22pub type TOUCH_SCAN_DONE_R = crate::BitReader;
23#[doc = "Field `TOUCH_SCAN_DONE` writer - enable touch scan done interrupt"]
24pub type TOUCH_SCAN_DONE_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `ULP_CP` reader - enable ULP-coprocessor interrupt"]
26pub type ULP_CP_R = crate::BitReader;
27#[doc = "Field `ULP_CP` writer - enable ULP-coprocessor interrupt"]
28pub type ULP_CP_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `TOUCH_DONE` reader - enable touch done interrupt"]
30pub type TOUCH_DONE_R = crate::BitReader;
31#[doc = "Field `TOUCH_DONE` writer - enable touch done interrupt"]
32pub type TOUCH_DONE_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `TOUCH_ACTIVE` reader - enable touch active interrupt"]
34pub type TOUCH_ACTIVE_R = crate::BitReader;
35#[doc = "Field `TOUCH_ACTIVE` writer - enable touch active interrupt"]
36pub type TOUCH_ACTIVE_W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `TOUCH_INACTIVE` reader - enable touch inactive interrupt"]
38pub type TOUCH_INACTIVE_R = crate::BitReader;
39#[doc = "Field `TOUCH_INACTIVE` writer - enable touch inactive interrupt"]
40pub type TOUCH_INACTIVE_W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `BROWN_OUT` reader - enable brown out interrupt"]
42pub type BROWN_OUT_R = crate::BitReader;
43#[doc = "Field `BROWN_OUT` writer - enable brown out interrupt"]
44pub type BROWN_OUT_W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `MAIN_TIMER` reader - enable RTC main timer interrupt"]
46pub type MAIN_TIMER_R = crate::BitReader;
47#[doc = "Field `MAIN_TIMER` writer - enable RTC main timer interrupt"]
48pub type MAIN_TIMER_W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `SARADC1` reader - enable saradc1 interrupt"]
50pub type SARADC1_R = crate::BitReader;
51#[doc = "Field `SARADC1` writer - enable saradc1 interrupt"]
52pub type SARADC1_W<'a, REG> = crate::BitWriter<'a, REG>;
53#[doc = "Field `TSENS` reader - enable tsens interrupt"]
54pub type TSENS_R = crate::BitReader;
55#[doc = "Field `TSENS` writer - enable tsens interrupt"]
56pub type TSENS_W<'a, REG> = crate::BitWriter<'a, REG>;
57#[doc = "Field `COCPU` reader - enable riscV cocpu interrupt"]
58pub type COCPU_R = crate::BitReader;
59#[doc = "Field `COCPU` writer - enable riscV cocpu interrupt"]
60pub type COCPU_W<'a, REG> = crate::BitWriter<'a, REG>;
61#[doc = "Field `SARADC2` reader - enable saradc2 interrupt"]
62pub type SARADC2_R = crate::BitReader;
63#[doc = "Field `SARADC2` writer - enable saradc2 interrupt"]
64pub type SARADC2_W<'a, REG> = crate::BitWriter<'a, REG>;
65#[doc = "Field `SWD` reader - enable super watch dog interrupt"]
66pub type SWD_R = crate::BitReader;
67#[doc = "Field `SWD` writer - enable super watch dog interrupt"]
68pub type SWD_W<'a, REG> = crate::BitWriter<'a, REG>;
69#[doc = "Field `XTAL32K_DEAD` reader - enable xtal32k_dead interrupt"]
70pub type XTAL32K_DEAD_R = crate::BitReader;
71#[doc = "Field `XTAL32K_DEAD` writer - enable xtal32k_dead interrupt"]
72pub type XTAL32K_DEAD_W<'a, REG> = crate::BitWriter<'a, REG>;
73#[doc = "Field `COCPU_TRAP` reader - enable cocpu trap interrupt"]
74pub type COCPU_TRAP_R = crate::BitReader;
75#[doc = "Field `COCPU_TRAP` writer - enable cocpu trap interrupt"]
76pub type COCPU_TRAP_W<'a, REG> = crate::BitWriter<'a, REG>;
77#[doc = "Field `TOUCH_TIMEOUT` reader - enable touch timeout interrupt"]
78pub type TOUCH_TIMEOUT_R = crate::BitReader;
79#[doc = "Field `TOUCH_TIMEOUT` writer - enable touch timeout interrupt"]
80pub type TOUCH_TIMEOUT_W<'a, REG> = crate::BitWriter<'a, REG>;
81#[doc = "Field `GLITCH_DET` reader - enbale gitch det interrupt"]
82pub type GLITCH_DET_R = crate::BitReader;
83#[doc = "Field `GLITCH_DET` writer - enbale gitch det interrupt"]
84pub type GLITCH_DET_W<'a, REG> = crate::BitWriter<'a, REG>;
85#[doc = "Field `TOUCH_APPROACH_LOOP_DONE` reader - touch approach mode loop interrupt"]
86pub type TOUCH_APPROACH_LOOP_DONE_R = crate::BitReader;
87#[doc = "Field `TOUCH_APPROACH_LOOP_DONE` writer - touch approach mode loop interrupt"]
88pub type TOUCH_APPROACH_LOOP_DONE_W<'a, REG> = crate::BitWriter<'a, REG>;
89impl R {
90 #[doc = "Bit 0 - enable sleep wakeup interrupt"]
91 #[inline(always)]
92 pub fn slp_wakeup(&self) -> SLP_WAKEUP_R {
93 SLP_WAKEUP_R::new((self.bits & 1) != 0)
94 }
95 #[doc = "Bit 1 - enable sleep reject interrupt"]
96 #[inline(always)]
97 pub fn slp_reject(&self) -> SLP_REJECT_R {
98 SLP_REJECT_R::new(((self.bits >> 1) & 1) != 0)
99 }
100 #[doc = "Bit 2 - enable SDIO idle interrupt"]
101 #[inline(always)]
102 pub fn sdio_idle(&self) -> SDIO_IDLE_R {
103 SDIO_IDLE_R::new(((self.bits >> 2) & 1) != 0)
104 }
105 #[doc = "Bit 3 - enable RTC WDT interrupt"]
106 #[inline(always)]
107 pub fn wdt(&self) -> WDT_R {
108 WDT_R::new(((self.bits >> 3) & 1) != 0)
109 }
110 #[doc = "Bit 4 - enable touch scan done interrupt"]
111 #[inline(always)]
112 pub fn touch_scan_done(&self) -> TOUCH_SCAN_DONE_R {
113 TOUCH_SCAN_DONE_R::new(((self.bits >> 4) & 1) != 0)
114 }
115 #[doc = "Bit 5 - enable ULP-coprocessor interrupt"]
116 #[inline(always)]
117 pub fn ulp_cp(&self) -> ULP_CP_R {
118 ULP_CP_R::new(((self.bits >> 5) & 1) != 0)
119 }
120 #[doc = "Bit 6 - enable touch done interrupt"]
121 #[inline(always)]
122 pub fn touch_done(&self) -> TOUCH_DONE_R {
123 TOUCH_DONE_R::new(((self.bits >> 6) & 1) != 0)
124 }
125 #[doc = "Bit 7 - enable touch active interrupt"]
126 #[inline(always)]
127 pub fn touch_active(&self) -> TOUCH_ACTIVE_R {
128 TOUCH_ACTIVE_R::new(((self.bits >> 7) & 1) != 0)
129 }
130 #[doc = "Bit 8 - enable touch inactive interrupt"]
131 #[inline(always)]
132 pub fn touch_inactive(&self) -> TOUCH_INACTIVE_R {
133 TOUCH_INACTIVE_R::new(((self.bits >> 8) & 1) != 0)
134 }
135 #[doc = "Bit 9 - enable brown out interrupt"]
136 #[inline(always)]
137 pub fn brown_out(&self) -> BROWN_OUT_R {
138 BROWN_OUT_R::new(((self.bits >> 9) & 1) != 0)
139 }
140 #[doc = "Bit 10 - enable RTC main timer interrupt"]
141 #[inline(always)]
142 pub fn main_timer(&self) -> MAIN_TIMER_R {
143 MAIN_TIMER_R::new(((self.bits >> 10) & 1) != 0)
144 }
145 #[doc = "Bit 11 - enable saradc1 interrupt"]
146 #[inline(always)]
147 pub fn saradc1(&self) -> SARADC1_R {
148 SARADC1_R::new(((self.bits >> 11) & 1) != 0)
149 }
150 #[doc = "Bit 12 - enable tsens interrupt"]
151 #[inline(always)]
152 pub fn tsens(&self) -> TSENS_R {
153 TSENS_R::new(((self.bits >> 12) & 1) != 0)
154 }
155 #[doc = "Bit 13 - enable riscV cocpu interrupt"]
156 #[inline(always)]
157 pub fn cocpu(&self) -> COCPU_R {
158 COCPU_R::new(((self.bits >> 13) & 1) != 0)
159 }
160 #[doc = "Bit 14 - enable saradc2 interrupt"]
161 #[inline(always)]
162 pub fn saradc2(&self) -> SARADC2_R {
163 SARADC2_R::new(((self.bits >> 14) & 1) != 0)
164 }
165 #[doc = "Bit 15 - enable super watch dog interrupt"]
166 #[inline(always)]
167 pub fn swd(&self) -> SWD_R {
168 SWD_R::new(((self.bits >> 15) & 1) != 0)
169 }
170 #[doc = "Bit 16 - enable xtal32k_dead interrupt"]
171 #[inline(always)]
172 pub fn xtal32k_dead(&self) -> XTAL32K_DEAD_R {
173 XTAL32K_DEAD_R::new(((self.bits >> 16) & 1) != 0)
174 }
175 #[doc = "Bit 17 - enable cocpu trap interrupt"]
176 #[inline(always)]
177 pub fn cocpu_trap(&self) -> COCPU_TRAP_R {
178 COCPU_TRAP_R::new(((self.bits >> 17) & 1) != 0)
179 }
180 #[doc = "Bit 18 - enable touch timeout interrupt"]
181 #[inline(always)]
182 pub fn touch_timeout(&self) -> TOUCH_TIMEOUT_R {
183 TOUCH_TIMEOUT_R::new(((self.bits >> 18) & 1) != 0)
184 }
185 #[doc = "Bit 19 - enbale gitch det interrupt"]
186 #[inline(always)]
187 pub fn glitch_det(&self) -> GLITCH_DET_R {
188 GLITCH_DET_R::new(((self.bits >> 19) & 1) != 0)
189 }
190 #[doc = "Bit 20 - touch approach mode loop interrupt"]
191 #[inline(always)]
192 pub fn touch_approach_loop_done(&self) -> TOUCH_APPROACH_LOOP_DONE_R {
193 TOUCH_APPROACH_LOOP_DONE_R::new(((self.bits >> 20) & 1) != 0)
194 }
195}
196#[cfg(feature = "impl-register-debug")]
197impl core::fmt::Debug for R {
198 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
199 f.debug_struct("INT_ENA")
200 .field("slp_wakeup", &self.slp_wakeup())
201 .field("slp_reject", &self.slp_reject())
202 .field("sdio_idle", &self.sdio_idle())
203 .field("wdt", &self.wdt())
204 .field("touch_scan_done", &self.touch_scan_done())
205 .field("ulp_cp", &self.ulp_cp())
206 .field("touch_done", &self.touch_done())
207 .field("touch_active", &self.touch_active())
208 .field("touch_inactive", &self.touch_inactive())
209 .field("brown_out", &self.brown_out())
210 .field("main_timer", &self.main_timer())
211 .field("saradc1", &self.saradc1())
212 .field("tsens", &self.tsens())
213 .field("cocpu", &self.cocpu())
214 .field("saradc2", &self.saradc2())
215 .field("swd", &self.swd())
216 .field("xtal32k_dead", &self.xtal32k_dead())
217 .field("cocpu_trap", &self.cocpu_trap())
218 .field("touch_timeout", &self.touch_timeout())
219 .field("glitch_det", &self.glitch_det())
220 .field("touch_approach_loop_done", &self.touch_approach_loop_done())
221 .finish()
222 }
223}
224impl W {
225 #[doc = "Bit 0 - enable sleep wakeup interrupt"]
226 #[inline(always)]
227 pub fn slp_wakeup(&mut self) -> SLP_WAKEUP_W<INT_ENA_SPEC> {
228 SLP_WAKEUP_W::new(self, 0)
229 }
230 #[doc = "Bit 1 - enable sleep reject interrupt"]
231 #[inline(always)]
232 pub fn slp_reject(&mut self) -> SLP_REJECT_W<INT_ENA_SPEC> {
233 SLP_REJECT_W::new(self, 1)
234 }
235 #[doc = "Bit 2 - enable SDIO idle interrupt"]
236 #[inline(always)]
237 pub fn sdio_idle(&mut self) -> SDIO_IDLE_W<INT_ENA_SPEC> {
238 SDIO_IDLE_W::new(self, 2)
239 }
240 #[doc = "Bit 3 - enable RTC WDT interrupt"]
241 #[inline(always)]
242 pub fn wdt(&mut self) -> WDT_W<INT_ENA_SPEC> {
243 WDT_W::new(self, 3)
244 }
245 #[doc = "Bit 4 - enable touch scan done interrupt"]
246 #[inline(always)]
247 pub fn touch_scan_done(&mut self) -> TOUCH_SCAN_DONE_W<INT_ENA_SPEC> {
248 TOUCH_SCAN_DONE_W::new(self, 4)
249 }
250 #[doc = "Bit 5 - enable ULP-coprocessor interrupt"]
251 #[inline(always)]
252 pub fn ulp_cp(&mut self) -> ULP_CP_W<INT_ENA_SPEC> {
253 ULP_CP_W::new(self, 5)
254 }
255 #[doc = "Bit 6 - enable touch done interrupt"]
256 #[inline(always)]
257 pub fn touch_done(&mut self) -> TOUCH_DONE_W<INT_ENA_SPEC> {
258 TOUCH_DONE_W::new(self, 6)
259 }
260 #[doc = "Bit 7 - enable touch active interrupt"]
261 #[inline(always)]
262 pub fn touch_active(&mut self) -> TOUCH_ACTIVE_W<INT_ENA_SPEC> {
263 TOUCH_ACTIVE_W::new(self, 7)
264 }
265 #[doc = "Bit 8 - enable touch inactive interrupt"]
266 #[inline(always)]
267 pub fn touch_inactive(&mut self) -> TOUCH_INACTIVE_W<INT_ENA_SPEC> {
268 TOUCH_INACTIVE_W::new(self, 8)
269 }
270 #[doc = "Bit 9 - enable brown out interrupt"]
271 #[inline(always)]
272 pub fn brown_out(&mut self) -> BROWN_OUT_W<INT_ENA_SPEC> {
273 BROWN_OUT_W::new(self, 9)
274 }
275 #[doc = "Bit 10 - enable RTC main timer interrupt"]
276 #[inline(always)]
277 pub fn main_timer(&mut self) -> MAIN_TIMER_W<INT_ENA_SPEC> {
278 MAIN_TIMER_W::new(self, 10)
279 }
280 #[doc = "Bit 11 - enable saradc1 interrupt"]
281 #[inline(always)]
282 pub fn saradc1(&mut self) -> SARADC1_W<INT_ENA_SPEC> {
283 SARADC1_W::new(self, 11)
284 }
285 #[doc = "Bit 12 - enable tsens interrupt"]
286 #[inline(always)]
287 pub fn tsens(&mut self) -> TSENS_W<INT_ENA_SPEC> {
288 TSENS_W::new(self, 12)
289 }
290 #[doc = "Bit 13 - enable riscV cocpu interrupt"]
291 #[inline(always)]
292 pub fn cocpu(&mut self) -> COCPU_W<INT_ENA_SPEC> {
293 COCPU_W::new(self, 13)
294 }
295 #[doc = "Bit 14 - enable saradc2 interrupt"]
296 #[inline(always)]
297 pub fn saradc2(&mut self) -> SARADC2_W<INT_ENA_SPEC> {
298 SARADC2_W::new(self, 14)
299 }
300 #[doc = "Bit 15 - enable super watch dog interrupt"]
301 #[inline(always)]
302 pub fn swd(&mut self) -> SWD_W<INT_ENA_SPEC> {
303 SWD_W::new(self, 15)
304 }
305 #[doc = "Bit 16 - enable xtal32k_dead interrupt"]
306 #[inline(always)]
307 pub fn xtal32k_dead(&mut self) -> XTAL32K_DEAD_W<INT_ENA_SPEC> {
308 XTAL32K_DEAD_W::new(self, 16)
309 }
310 #[doc = "Bit 17 - enable cocpu trap interrupt"]
311 #[inline(always)]
312 pub fn cocpu_trap(&mut self) -> COCPU_TRAP_W<INT_ENA_SPEC> {
313 COCPU_TRAP_W::new(self, 17)
314 }
315 #[doc = "Bit 18 - enable touch timeout interrupt"]
316 #[inline(always)]
317 pub fn touch_timeout(&mut self) -> TOUCH_TIMEOUT_W<INT_ENA_SPEC> {
318 TOUCH_TIMEOUT_W::new(self, 18)
319 }
320 #[doc = "Bit 19 - enbale gitch det interrupt"]
321 #[inline(always)]
322 pub fn glitch_det(&mut self) -> GLITCH_DET_W<INT_ENA_SPEC> {
323 GLITCH_DET_W::new(self, 19)
324 }
325 #[doc = "Bit 20 - touch approach mode loop interrupt"]
326 #[inline(always)]
327 pub fn touch_approach_loop_done(&mut self) -> TOUCH_APPROACH_LOOP_DONE_W<INT_ENA_SPEC> {
328 TOUCH_APPROACH_LOOP_DONE_W::new(self, 20)
329 }
330}
331#[doc = "configure rtc interrupt register\n\nYou can [`read`](crate::Reg::read) this register and get [`int_ena::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`int_ena::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
332pub struct INT_ENA_SPEC;
333impl crate::RegisterSpec for INT_ENA_SPEC {
334 type Ux = u32;
335}
336#[doc = "`read()` method returns [`int_ena::R`](R) reader structure"]
337impl crate::Readable for INT_ENA_SPEC {}
338#[doc = "`write(|w| ..)` method takes [`int_ena::W`](W) writer structure"]
339impl crate::Writable for INT_ENA_SPEC {
340 type Safety = crate::Unsafe;
341}
342#[doc = "`reset()` method sets INT_ENA to value 0"]
343impl crate::Resettable for INT_ENA_SPEC {}