esp32s3_ulp/sens/
sar_cocpu_int_ena.rs1#[doc = "Register `SAR_COCPU_INT_ENA` reader"]
2pub type R = crate::R<SAR_COCPU_INT_ENA_SPEC>;
3#[doc = "Register `SAR_COCPU_INT_ENA` writer"]
4pub type W = crate::W<SAR_COCPU_INT_ENA_SPEC>;
5#[doc = "Field `SAR_COCPU_TOUCH_DONE_INT_ENA` reader - int enable of touch done"]
6pub type SAR_COCPU_TOUCH_DONE_INT_ENA_R = crate::BitReader;
7#[doc = "Field `SAR_COCPU_TOUCH_DONE_INT_ENA` writer - int enable of touch done"]
8pub type SAR_COCPU_TOUCH_DONE_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `SAR_COCPU_TOUCH_INACTIVE_INT_ENA` reader - int enable of from touch inactive"]
10pub type SAR_COCPU_TOUCH_INACTIVE_INT_ENA_R = crate::BitReader;
11#[doc = "Field `SAR_COCPU_TOUCH_INACTIVE_INT_ENA` writer - int enable of from touch inactive"]
12pub type SAR_COCPU_TOUCH_INACTIVE_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `SAR_COCPU_TOUCH_ACTIVE_INT_ENA` reader - int enable of touch active"]
14pub type SAR_COCPU_TOUCH_ACTIVE_INT_ENA_R = crate::BitReader;
15#[doc = "Field `SAR_COCPU_TOUCH_ACTIVE_INT_ENA` writer - int enable of touch active"]
16pub type SAR_COCPU_TOUCH_ACTIVE_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `SAR_COCPU_SARADC1_INT_ENA` reader - int enable of from saradc1"]
18pub type SAR_COCPU_SARADC1_INT_ENA_R = crate::BitReader;
19#[doc = "Field `SAR_COCPU_SARADC1_INT_ENA` writer - int enable of from saradc1"]
20pub type SAR_COCPU_SARADC1_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `SAR_COCPU_SARADC2_INT_ENA` reader - int enable of from saradc2"]
22pub type SAR_COCPU_SARADC2_INT_ENA_R = crate::BitReader;
23#[doc = "Field `SAR_COCPU_SARADC2_INT_ENA` writer - int enable of from saradc2"]
24pub type SAR_COCPU_SARADC2_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `SAR_COCPU_TSENS_INT_ENA` reader - int enable of tsens"]
26pub type SAR_COCPU_TSENS_INT_ENA_R = crate::BitReader;
27#[doc = "Field `SAR_COCPU_TSENS_INT_ENA` writer - int enable of tsens"]
28pub type SAR_COCPU_TSENS_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `SAR_COCPU_START_INT_ENA` reader - int enable of start"]
30pub type SAR_COCPU_START_INT_ENA_R = crate::BitReader;
31#[doc = "Field `SAR_COCPU_START_INT_ENA` writer - int enable of start"]
32pub type SAR_COCPU_START_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
33#[doc = "Field `SAR_COCPU_SW_INT_ENA` reader - int enable of software"]
34pub type SAR_COCPU_SW_INT_ENA_R = crate::BitReader;
35#[doc = "Field `SAR_COCPU_SW_INT_ENA` writer - int enable of software"]
36pub type SAR_COCPU_SW_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `SAR_COCPU_SWD_INT_ENA` reader - int enable of super watch dog"]
38pub type SAR_COCPU_SWD_INT_ENA_R = crate::BitReader;
39#[doc = "Field `SAR_COCPU_SWD_INT_ENA` writer - int enable of super watch dog"]
40pub type SAR_COCPU_SWD_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `SAR_COCPU_TOUCH_TIMEOUT_INT_ENA` reader - int enable of timeout done"]
42pub type SAR_COCPU_TOUCH_TIMEOUT_INT_ENA_R = crate::BitReader;
43#[doc = "Field `SAR_COCPU_TOUCH_TIMEOUT_INT_ENA` writer - int enable of timeout done"]
44pub type SAR_COCPU_TOUCH_TIMEOUT_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `SAR_COCPU_TOUCH_APPROACH_LOOP_DONE_INT_ENA` reader - int enable of approach loop done"]
46pub type SAR_COCPU_TOUCH_APPROACH_LOOP_DONE_INT_ENA_R = crate::BitReader;
47#[doc = "Field `SAR_COCPU_TOUCH_APPROACH_LOOP_DONE_INT_ENA` writer - int enable of approach loop done"]
48pub type SAR_COCPU_TOUCH_APPROACH_LOOP_DONE_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `SAR_COCPU_TOUCH_SCAN_DONE_INT_ENA` reader - int enable of touch scan done"]
50pub type SAR_COCPU_TOUCH_SCAN_DONE_INT_ENA_R = crate::BitReader;
51#[doc = "Field `SAR_COCPU_TOUCH_SCAN_DONE_INT_ENA` writer - int enable of touch scan done"]
52pub type SAR_COCPU_TOUCH_SCAN_DONE_INT_ENA_W<'a, REG> = crate::BitWriter<'a, REG>;
53impl R {
54 #[doc = "Bit 0 - int enable of touch done"]
55 #[inline(always)]
56 pub fn sar_cocpu_touch_done_int_ena(&self) -> SAR_COCPU_TOUCH_DONE_INT_ENA_R {
57 SAR_COCPU_TOUCH_DONE_INT_ENA_R::new((self.bits & 1) != 0)
58 }
59 #[doc = "Bit 1 - int enable of from touch inactive"]
60 #[inline(always)]
61 pub fn sar_cocpu_touch_inactive_int_ena(&self) -> SAR_COCPU_TOUCH_INACTIVE_INT_ENA_R {
62 SAR_COCPU_TOUCH_INACTIVE_INT_ENA_R::new(((self.bits >> 1) & 1) != 0)
63 }
64 #[doc = "Bit 2 - int enable of touch active"]
65 #[inline(always)]
66 pub fn sar_cocpu_touch_active_int_ena(&self) -> SAR_COCPU_TOUCH_ACTIVE_INT_ENA_R {
67 SAR_COCPU_TOUCH_ACTIVE_INT_ENA_R::new(((self.bits >> 2) & 1) != 0)
68 }
69 #[doc = "Bit 3 - int enable of from saradc1"]
70 #[inline(always)]
71 pub fn sar_cocpu_saradc1_int_ena(&self) -> SAR_COCPU_SARADC1_INT_ENA_R {
72 SAR_COCPU_SARADC1_INT_ENA_R::new(((self.bits >> 3) & 1) != 0)
73 }
74 #[doc = "Bit 4 - int enable of from saradc2"]
75 #[inline(always)]
76 pub fn sar_cocpu_saradc2_int_ena(&self) -> SAR_COCPU_SARADC2_INT_ENA_R {
77 SAR_COCPU_SARADC2_INT_ENA_R::new(((self.bits >> 4) & 1) != 0)
78 }
79 #[doc = "Bit 5 - int enable of tsens"]
80 #[inline(always)]
81 pub fn sar_cocpu_tsens_int_ena(&self) -> SAR_COCPU_TSENS_INT_ENA_R {
82 SAR_COCPU_TSENS_INT_ENA_R::new(((self.bits >> 5) & 1) != 0)
83 }
84 #[doc = "Bit 6 - int enable of start"]
85 #[inline(always)]
86 pub fn sar_cocpu_start_int_ena(&self) -> SAR_COCPU_START_INT_ENA_R {
87 SAR_COCPU_START_INT_ENA_R::new(((self.bits >> 6) & 1) != 0)
88 }
89 #[doc = "Bit 7 - int enable of software"]
90 #[inline(always)]
91 pub fn sar_cocpu_sw_int_ena(&self) -> SAR_COCPU_SW_INT_ENA_R {
92 SAR_COCPU_SW_INT_ENA_R::new(((self.bits >> 7) & 1) != 0)
93 }
94 #[doc = "Bit 8 - int enable of super watch dog"]
95 #[inline(always)]
96 pub fn sar_cocpu_swd_int_ena(&self) -> SAR_COCPU_SWD_INT_ENA_R {
97 SAR_COCPU_SWD_INT_ENA_R::new(((self.bits >> 8) & 1) != 0)
98 }
99 #[doc = "Bit 9 - int enable of timeout done"]
100 #[inline(always)]
101 pub fn sar_cocpu_touch_timeout_int_ena(&self) -> SAR_COCPU_TOUCH_TIMEOUT_INT_ENA_R {
102 SAR_COCPU_TOUCH_TIMEOUT_INT_ENA_R::new(((self.bits >> 9) & 1) != 0)
103 }
104 #[doc = "Bit 10 - int enable of approach loop done"]
105 #[inline(always)]
106 pub fn sar_cocpu_touch_approach_loop_done_int_ena(
107 &self,
108 ) -> SAR_COCPU_TOUCH_APPROACH_LOOP_DONE_INT_ENA_R {
109 SAR_COCPU_TOUCH_APPROACH_LOOP_DONE_INT_ENA_R::new(((self.bits >> 10) & 1) != 0)
110 }
111 #[doc = "Bit 11 - int enable of touch scan done"]
112 #[inline(always)]
113 pub fn sar_cocpu_touch_scan_done_int_ena(&self) -> SAR_COCPU_TOUCH_SCAN_DONE_INT_ENA_R {
114 SAR_COCPU_TOUCH_SCAN_DONE_INT_ENA_R::new(((self.bits >> 11) & 1) != 0)
115 }
116}
117#[cfg(feature = "impl-register-debug")]
118impl core::fmt::Debug for R {
119 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
120 f.debug_struct("SAR_COCPU_INT_ENA")
121 .field(
122 "sar_cocpu_touch_done_int_ena",
123 &self.sar_cocpu_touch_done_int_ena(),
124 )
125 .field(
126 "sar_cocpu_touch_inactive_int_ena",
127 &self.sar_cocpu_touch_inactive_int_ena(),
128 )
129 .field(
130 "sar_cocpu_touch_active_int_ena",
131 &self.sar_cocpu_touch_active_int_ena(),
132 )
133 .field(
134 "sar_cocpu_saradc1_int_ena",
135 &self.sar_cocpu_saradc1_int_ena(),
136 )
137 .field(
138 "sar_cocpu_saradc2_int_ena",
139 &self.sar_cocpu_saradc2_int_ena(),
140 )
141 .field("sar_cocpu_tsens_int_ena", &self.sar_cocpu_tsens_int_ena())
142 .field("sar_cocpu_start_int_ena", &self.sar_cocpu_start_int_ena())
143 .field("sar_cocpu_sw_int_ena", &self.sar_cocpu_sw_int_ena())
144 .field("sar_cocpu_swd_int_ena", &self.sar_cocpu_swd_int_ena())
145 .field(
146 "sar_cocpu_touch_timeout_int_ena",
147 &self.sar_cocpu_touch_timeout_int_ena(),
148 )
149 .field(
150 "sar_cocpu_touch_approach_loop_done_int_ena",
151 &self.sar_cocpu_touch_approach_loop_done_int_ena(),
152 )
153 .field(
154 "sar_cocpu_touch_scan_done_int_ena",
155 &self.sar_cocpu_touch_scan_done_int_ena(),
156 )
157 .finish()
158 }
159}
160impl W {
161 #[doc = "Bit 0 - int enable of touch done"]
162 #[inline(always)]
163 #[must_use]
164 pub fn sar_cocpu_touch_done_int_ena(
165 &mut self,
166 ) -> SAR_COCPU_TOUCH_DONE_INT_ENA_W<SAR_COCPU_INT_ENA_SPEC> {
167 SAR_COCPU_TOUCH_DONE_INT_ENA_W::new(self, 0)
168 }
169 #[doc = "Bit 1 - int enable of from touch inactive"]
170 #[inline(always)]
171 #[must_use]
172 pub fn sar_cocpu_touch_inactive_int_ena(
173 &mut self,
174 ) -> SAR_COCPU_TOUCH_INACTIVE_INT_ENA_W<SAR_COCPU_INT_ENA_SPEC> {
175 SAR_COCPU_TOUCH_INACTIVE_INT_ENA_W::new(self, 1)
176 }
177 #[doc = "Bit 2 - int enable of touch active"]
178 #[inline(always)]
179 #[must_use]
180 pub fn sar_cocpu_touch_active_int_ena(
181 &mut self,
182 ) -> SAR_COCPU_TOUCH_ACTIVE_INT_ENA_W<SAR_COCPU_INT_ENA_SPEC> {
183 SAR_COCPU_TOUCH_ACTIVE_INT_ENA_W::new(self, 2)
184 }
185 #[doc = "Bit 3 - int enable of from saradc1"]
186 #[inline(always)]
187 #[must_use]
188 pub fn sar_cocpu_saradc1_int_ena(
189 &mut self,
190 ) -> SAR_COCPU_SARADC1_INT_ENA_W<SAR_COCPU_INT_ENA_SPEC> {
191 SAR_COCPU_SARADC1_INT_ENA_W::new(self, 3)
192 }
193 #[doc = "Bit 4 - int enable of from saradc2"]
194 #[inline(always)]
195 #[must_use]
196 pub fn sar_cocpu_saradc2_int_ena(
197 &mut self,
198 ) -> SAR_COCPU_SARADC2_INT_ENA_W<SAR_COCPU_INT_ENA_SPEC> {
199 SAR_COCPU_SARADC2_INT_ENA_W::new(self, 4)
200 }
201 #[doc = "Bit 5 - int enable of tsens"]
202 #[inline(always)]
203 #[must_use]
204 pub fn sar_cocpu_tsens_int_ena(&mut self) -> SAR_COCPU_TSENS_INT_ENA_W<SAR_COCPU_INT_ENA_SPEC> {
205 SAR_COCPU_TSENS_INT_ENA_W::new(self, 5)
206 }
207 #[doc = "Bit 6 - int enable of start"]
208 #[inline(always)]
209 #[must_use]
210 pub fn sar_cocpu_start_int_ena(&mut self) -> SAR_COCPU_START_INT_ENA_W<SAR_COCPU_INT_ENA_SPEC> {
211 SAR_COCPU_START_INT_ENA_W::new(self, 6)
212 }
213 #[doc = "Bit 7 - int enable of software"]
214 #[inline(always)]
215 #[must_use]
216 pub fn sar_cocpu_sw_int_ena(&mut self) -> SAR_COCPU_SW_INT_ENA_W<SAR_COCPU_INT_ENA_SPEC> {
217 SAR_COCPU_SW_INT_ENA_W::new(self, 7)
218 }
219 #[doc = "Bit 8 - int enable of super watch dog"]
220 #[inline(always)]
221 #[must_use]
222 pub fn sar_cocpu_swd_int_ena(&mut self) -> SAR_COCPU_SWD_INT_ENA_W<SAR_COCPU_INT_ENA_SPEC> {
223 SAR_COCPU_SWD_INT_ENA_W::new(self, 8)
224 }
225 #[doc = "Bit 9 - int enable of timeout done"]
226 #[inline(always)]
227 #[must_use]
228 pub fn sar_cocpu_touch_timeout_int_ena(
229 &mut self,
230 ) -> SAR_COCPU_TOUCH_TIMEOUT_INT_ENA_W<SAR_COCPU_INT_ENA_SPEC> {
231 SAR_COCPU_TOUCH_TIMEOUT_INT_ENA_W::new(self, 9)
232 }
233 #[doc = "Bit 10 - int enable of approach loop done"]
234 #[inline(always)]
235 #[must_use]
236 pub fn sar_cocpu_touch_approach_loop_done_int_ena(
237 &mut self,
238 ) -> SAR_COCPU_TOUCH_APPROACH_LOOP_DONE_INT_ENA_W<SAR_COCPU_INT_ENA_SPEC> {
239 SAR_COCPU_TOUCH_APPROACH_LOOP_DONE_INT_ENA_W::new(self, 10)
240 }
241 #[doc = "Bit 11 - int enable of touch scan done"]
242 #[inline(always)]
243 #[must_use]
244 pub fn sar_cocpu_touch_scan_done_int_ena(
245 &mut self,
246 ) -> SAR_COCPU_TOUCH_SCAN_DONE_INT_ENA_W<SAR_COCPU_INT_ENA_SPEC> {
247 SAR_COCPU_TOUCH_SCAN_DONE_INT_ENA_W::new(self, 11)
248 }
249}
250#[doc = "the interrupt enable of ulp\n\nYou can [`read`](crate::Reg::read) this register and get [`sar_cocpu_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 [`sar_cocpu_int_ena::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
251pub struct SAR_COCPU_INT_ENA_SPEC;
252impl crate::RegisterSpec for SAR_COCPU_INT_ENA_SPEC {
253 type Ux = u32;
254}
255#[doc = "`read()` method returns [`sar_cocpu_int_ena::R`](R) reader structure"]
256impl crate::Readable for SAR_COCPU_INT_ENA_SPEC {}
257#[doc = "`write(|w| ..)` method takes [`sar_cocpu_int_ena::W`](W) writer structure"]
258impl crate::Writable for SAR_COCPU_INT_ENA_SPEC {
259 type Safety = crate::Unsafe;
260 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
261 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
262}
263#[doc = "`reset()` method sets SAR_COCPU_INT_ENA to value 0"]
264impl crate::Resettable for SAR_COCPU_INT_ENA_SPEC {
265 const RESET_VALUE: u32 = 0;
266}