1#[doc = "Register `DECCTRL` reader"]
2pub struct R(crate::R<DECCTRL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<DECCTRL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<DECCTRL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<DECCTRL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `DECCTRL` writer"]
17pub struct W(crate::W<DECCTRL_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<DECCTRL_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<DECCTRL_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<DECCTRL_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `DISABLE` reader - Disable the Decoder"]
38pub type DISABLE_R = crate::BitReader<bool>;
39#[doc = "Field `DISABLE` writer - Disable the Decoder"]
40pub type DISABLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, DECCTRL_SPEC, bool, O>;
41#[doc = "Field `ERRCHK` reader - Enable Check of Current State"]
42pub type ERRCHK_R = crate::BitReader<bool>;
43#[doc = "Field `ERRCHK` writer - Enable Check of Current State"]
44pub type ERRCHK_W<'a, const O: u8> = crate::BitWriter<'a, u32, DECCTRL_SPEC, bool, O>;
45#[doc = "Field `INTMAP` reader - Enable Decoder to Channel Interrupt Mapping"]
46pub type INTMAP_R = crate::BitReader<bool>;
47#[doc = "Field `INTMAP` writer - Enable Decoder to Channel Interrupt Mapping"]
48pub type INTMAP_W<'a, const O: u8> = crate::BitWriter<'a, u32, DECCTRL_SPEC, bool, O>;
49#[doc = "Field `HYSTPRS0` reader - Enable Decoder Hysteresis on PRS0 Output"]
50pub type HYSTPRS0_R = crate::BitReader<bool>;
51#[doc = "Field `HYSTPRS0` writer - Enable Decoder Hysteresis on PRS0 Output"]
52pub type HYSTPRS0_W<'a, const O: u8> = crate::BitWriter<'a, u32, DECCTRL_SPEC, bool, O>;
53#[doc = "Field `HYSTPRS1` reader - Enable Decoder Hysteresis on PRS1 Output"]
54pub type HYSTPRS1_R = crate::BitReader<bool>;
55#[doc = "Field `HYSTPRS1` writer - Enable Decoder Hysteresis on PRS1 Output"]
56pub type HYSTPRS1_W<'a, const O: u8> = crate::BitWriter<'a, u32, DECCTRL_SPEC, bool, O>;
57#[doc = "Field `HYSTPRS2` reader - Enable Decoder Hysteresis on PRS2 Output"]
58pub type HYSTPRS2_R = crate::BitReader<bool>;
59#[doc = "Field `HYSTPRS2` writer - Enable Decoder Hysteresis on PRS2 Output"]
60pub type HYSTPRS2_W<'a, const O: u8> = crate::BitWriter<'a, u32, DECCTRL_SPEC, bool, O>;
61#[doc = "Field `HYSTIRQ` reader - Enable Decoder Hysteresis on Interrupt Requests"]
62pub type HYSTIRQ_R = crate::BitReader<bool>;
63#[doc = "Field `HYSTIRQ` writer - Enable Decoder Hysteresis on Interrupt Requests"]
64pub type HYSTIRQ_W<'a, const O: u8> = crate::BitWriter<'a, u32, DECCTRL_SPEC, bool, O>;
65#[doc = "Field `PRSCNT` reader - Enable Count Mode on Decoder PRS Channels 0 and 1"]
66pub type PRSCNT_R = crate::BitReader<bool>;
67#[doc = "Field `PRSCNT` writer - Enable Count Mode on Decoder PRS Channels 0 and 1"]
68pub type PRSCNT_W<'a, const O: u8> = crate::BitWriter<'a, u32, DECCTRL_SPEC, bool, O>;
69#[doc = "Field `INPUT` reader - LESENSE Decoder Input Configuration"]
70pub type INPUT_R = crate::BitReader<bool>;
71#[doc = "Field `INPUT` writer - LESENSE Decoder Input Configuration"]
72pub type INPUT_W<'a, const O: u8> = crate::BitWriter<'a, u32, DECCTRL_SPEC, bool, O>;
73#[doc = "Field `PRSSEL0` reader - LESENSE Decoder PRS Input 0 Configuration"]
74pub type PRSSEL0_R = crate::FieldReader<u8, PRSSEL0_A>;
75#[doc = "LESENSE Decoder PRS Input 0 Configuration\n\nValue on reset: 0"]
76#[derive(Clone, Copy, Debug, PartialEq, Eq)]
77#[repr(u8)]
78pub enum PRSSEL0_A {
79 #[doc = "0: PRS Channel 0 selected as input"]
80 PRSCH0 = 0,
81 #[doc = "1: PRS Channel 1 selected as input"]
82 PRSCH1 = 1,
83 #[doc = "2: PRS Channel 2 selected as input"]
84 PRSCH2 = 2,
85 #[doc = "3: PRS Channel 3 selected as input"]
86 PRSCH3 = 3,
87 #[doc = "4: PRS Channel 4 selected as input"]
88 PRSCH4 = 4,
89 #[doc = "5: PRS Channel 5 selected as input"]
90 PRSCH5 = 5,
91 #[doc = "6: PRS Channel 6 selected as input"]
92 PRSCH6 = 6,
93 #[doc = "7: PRS Channel 7 selected as input"]
94 PRSCH7 = 7,
95}
96impl From<PRSSEL0_A> for u8 {
97 #[inline(always)]
98 fn from(variant: PRSSEL0_A) -> Self {
99 variant as _
100 }
101}
102impl PRSSEL0_R {
103 #[doc = "Get enumerated values variant"]
104 #[inline(always)]
105 pub fn variant(&self) -> PRSSEL0_A {
106 match self.bits {
107 0 => PRSSEL0_A::PRSCH0,
108 1 => PRSSEL0_A::PRSCH1,
109 2 => PRSSEL0_A::PRSCH2,
110 3 => PRSSEL0_A::PRSCH3,
111 4 => PRSSEL0_A::PRSCH4,
112 5 => PRSSEL0_A::PRSCH5,
113 6 => PRSSEL0_A::PRSCH6,
114 7 => PRSSEL0_A::PRSCH7,
115 _ => unreachable!(),
116 }
117 }
118 #[doc = "Checks if the value of the field is `PRSCH0`"]
119 #[inline(always)]
120 pub fn is_prsch0(&self) -> bool {
121 *self == PRSSEL0_A::PRSCH0
122 }
123 #[doc = "Checks if the value of the field is `PRSCH1`"]
124 #[inline(always)]
125 pub fn is_prsch1(&self) -> bool {
126 *self == PRSSEL0_A::PRSCH1
127 }
128 #[doc = "Checks if the value of the field is `PRSCH2`"]
129 #[inline(always)]
130 pub fn is_prsch2(&self) -> bool {
131 *self == PRSSEL0_A::PRSCH2
132 }
133 #[doc = "Checks if the value of the field is `PRSCH3`"]
134 #[inline(always)]
135 pub fn is_prsch3(&self) -> bool {
136 *self == PRSSEL0_A::PRSCH3
137 }
138 #[doc = "Checks if the value of the field is `PRSCH4`"]
139 #[inline(always)]
140 pub fn is_prsch4(&self) -> bool {
141 *self == PRSSEL0_A::PRSCH4
142 }
143 #[doc = "Checks if the value of the field is `PRSCH5`"]
144 #[inline(always)]
145 pub fn is_prsch5(&self) -> bool {
146 *self == PRSSEL0_A::PRSCH5
147 }
148 #[doc = "Checks if the value of the field is `PRSCH6`"]
149 #[inline(always)]
150 pub fn is_prsch6(&self) -> bool {
151 *self == PRSSEL0_A::PRSCH6
152 }
153 #[doc = "Checks if the value of the field is `PRSCH7`"]
154 #[inline(always)]
155 pub fn is_prsch7(&self) -> bool {
156 *self == PRSSEL0_A::PRSCH7
157 }
158}
159#[doc = "Field `PRSSEL0` writer - LESENSE Decoder PRS Input 0 Configuration"]
160pub type PRSSEL0_W<'a, const O: u8> =
161 crate::FieldWriterSafe<'a, u32, DECCTRL_SPEC, u8, PRSSEL0_A, 3, O>;
162impl<'a, const O: u8> PRSSEL0_W<'a, O> {
163 #[doc = "PRS Channel 0 selected as input"]
164 #[inline(always)]
165 pub fn prsch0(self) -> &'a mut W {
166 self.variant(PRSSEL0_A::PRSCH0)
167 }
168 #[doc = "PRS Channel 1 selected as input"]
169 #[inline(always)]
170 pub fn prsch1(self) -> &'a mut W {
171 self.variant(PRSSEL0_A::PRSCH1)
172 }
173 #[doc = "PRS Channel 2 selected as input"]
174 #[inline(always)]
175 pub fn prsch2(self) -> &'a mut W {
176 self.variant(PRSSEL0_A::PRSCH2)
177 }
178 #[doc = "PRS Channel 3 selected as input"]
179 #[inline(always)]
180 pub fn prsch3(self) -> &'a mut W {
181 self.variant(PRSSEL0_A::PRSCH3)
182 }
183 #[doc = "PRS Channel 4 selected as input"]
184 #[inline(always)]
185 pub fn prsch4(self) -> &'a mut W {
186 self.variant(PRSSEL0_A::PRSCH4)
187 }
188 #[doc = "PRS Channel 5 selected as input"]
189 #[inline(always)]
190 pub fn prsch5(self) -> &'a mut W {
191 self.variant(PRSSEL0_A::PRSCH5)
192 }
193 #[doc = "PRS Channel 6 selected as input"]
194 #[inline(always)]
195 pub fn prsch6(self) -> &'a mut W {
196 self.variant(PRSSEL0_A::PRSCH6)
197 }
198 #[doc = "PRS Channel 7 selected as input"]
199 #[inline(always)]
200 pub fn prsch7(self) -> &'a mut W {
201 self.variant(PRSSEL0_A::PRSCH7)
202 }
203}
204#[doc = "Field `PRSSEL1` reader - LESENSE Decoder PRS Input 1 Configuration"]
205pub type PRSSEL1_R = crate::FieldReader<u8, PRSSEL1_A>;
206#[doc = "LESENSE Decoder PRS Input 1 Configuration\n\nValue on reset: 0"]
207#[derive(Clone, Copy, Debug, PartialEq, Eq)]
208#[repr(u8)]
209pub enum PRSSEL1_A {
210 #[doc = "0: PRS Channel 0 selected as input"]
211 PRSCH0 = 0,
212 #[doc = "1: PRS Channel 1 selected as input"]
213 PRSCH1 = 1,
214 #[doc = "2: PRS Channel 2 selected as input"]
215 PRSCH2 = 2,
216 #[doc = "3: PRS Channel 3 selected as input"]
217 PRSCH3 = 3,
218 #[doc = "4: PRS Channel 4 selected as input"]
219 PRSCH4 = 4,
220 #[doc = "5: PRS Channel 5 selected as input"]
221 PRSCH5 = 5,
222 #[doc = "6: PRS Channel 6 selected as input"]
223 PRSCH6 = 6,
224 #[doc = "7: PRS Channel 7 selected as input"]
225 PRSCH7 = 7,
226}
227impl From<PRSSEL1_A> for u8 {
228 #[inline(always)]
229 fn from(variant: PRSSEL1_A) -> Self {
230 variant as _
231 }
232}
233impl PRSSEL1_R {
234 #[doc = "Get enumerated values variant"]
235 #[inline(always)]
236 pub fn variant(&self) -> PRSSEL1_A {
237 match self.bits {
238 0 => PRSSEL1_A::PRSCH0,
239 1 => PRSSEL1_A::PRSCH1,
240 2 => PRSSEL1_A::PRSCH2,
241 3 => PRSSEL1_A::PRSCH3,
242 4 => PRSSEL1_A::PRSCH4,
243 5 => PRSSEL1_A::PRSCH5,
244 6 => PRSSEL1_A::PRSCH6,
245 7 => PRSSEL1_A::PRSCH7,
246 _ => unreachable!(),
247 }
248 }
249 #[doc = "Checks if the value of the field is `PRSCH0`"]
250 #[inline(always)]
251 pub fn is_prsch0(&self) -> bool {
252 *self == PRSSEL1_A::PRSCH0
253 }
254 #[doc = "Checks if the value of the field is `PRSCH1`"]
255 #[inline(always)]
256 pub fn is_prsch1(&self) -> bool {
257 *self == PRSSEL1_A::PRSCH1
258 }
259 #[doc = "Checks if the value of the field is `PRSCH2`"]
260 #[inline(always)]
261 pub fn is_prsch2(&self) -> bool {
262 *self == PRSSEL1_A::PRSCH2
263 }
264 #[doc = "Checks if the value of the field is `PRSCH3`"]
265 #[inline(always)]
266 pub fn is_prsch3(&self) -> bool {
267 *self == PRSSEL1_A::PRSCH3
268 }
269 #[doc = "Checks if the value of the field is `PRSCH4`"]
270 #[inline(always)]
271 pub fn is_prsch4(&self) -> bool {
272 *self == PRSSEL1_A::PRSCH4
273 }
274 #[doc = "Checks if the value of the field is `PRSCH5`"]
275 #[inline(always)]
276 pub fn is_prsch5(&self) -> bool {
277 *self == PRSSEL1_A::PRSCH5
278 }
279 #[doc = "Checks if the value of the field is `PRSCH6`"]
280 #[inline(always)]
281 pub fn is_prsch6(&self) -> bool {
282 *self == PRSSEL1_A::PRSCH6
283 }
284 #[doc = "Checks if the value of the field is `PRSCH7`"]
285 #[inline(always)]
286 pub fn is_prsch7(&self) -> bool {
287 *self == PRSSEL1_A::PRSCH7
288 }
289}
290#[doc = "Field `PRSSEL1` writer - LESENSE Decoder PRS Input 1 Configuration"]
291pub type PRSSEL1_W<'a, const O: u8> =
292 crate::FieldWriterSafe<'a, u32, DECCTRL_SPEC, u8, PRSSEL1_A, 3, O>;
293impl<'a, const O: u8> PRSSEL1_W<'a, O> {
294 #[doc = "PRS Channel 0 selected as input"]
295 #[inline(always)]
296 pub fn prsch0(self) -> &'a mut W {
297 self.variant(PRSSEL1_A::PRSCH0)
298 }
299 #[doc = "PRS Channel 1 selected as input"]
300 #[inline(always)]
301 pub fn prsch1(self) -> &'a mut W {
302 self.variant(PRSSEL1_A::PRSCH1)
303 }
304 #[doc = "PRS Channel 2 selected as input"]
305 #[inline(always)]
306 pub fn prsch2(self) -> &'a mut W {
307 self.variant(PRSSEL1_A::PRSCH2)
308 }
309 #[doc = "PRS Channel 3 selected as input"]
310 #[inline(always)]
311 pub fn prsch3(self) -> &'a mut W {
312 self.variant(PRSSEL1_A::PRSCH3)
313 }
314 #[doc = "PRS Channel 4 selected as input"]
315 #[inline(always)]
316 pub fn prsch4(self) -> &'a mut W {
317 self.variant(PRSSEL1_A::PRSCH4)
318 }
319 #[doc = "PRS Channel 5 selected as input"]
320 #[inline(always)]
321 pub fn prsch5(self) -> &'a mut W {
322 self.variant(PRSSEL1_A::PRSCH5)
323 }
324 #[doc = "PRS Channel 6 selected as input"]
325 #[inline(always)]
326 pub fn prsch6(self) -> &'a mut W {
327 self.variant(PRSSEL1_A::PRSCH6)
328 }
329 #[doc = "PRS Channel 7 selected as input"]
330 #[inline(always)]
331 pub fn prsch7(self) -> &'a mut W {
332 self.variant(PRSSEL1_A::PRSCH7)
333 }
334}
335#[doc = "Field `PRSSEL2` reader - LESENSE Decoder PRS Input 2 Configuration"]
336pub type PRSSEL2_R = crate::FieldReader<u8, PRSSEL2_A>;
337#[doc = "LESENSE Decoder PRS Input 2 Configuration\n\nValue on reset: 0"]
338#[derive(Clone, Copy, Debug, PartialEq, Eq)]
339#[repr(u8)]
340pub enum PRSSEL2_A {
341 #[doc = "0: PRS Channel 0 selected as input"]
342 PRSCH0 = 0,
343 #[doc = "1: PRS Channel 1 selected as input"]
344 PRSCH1 = 1,
345 #[doc = "2: PRS Channel 2 selected as input"]
346 PRSCH2 = 2,
347 #[doc = "3: PRS Channel 3 selected as input"]
348 PRSCH3 = 3,
349 #[doc = "4: PRS Channel 4 selected as input"]
350 PRSCH4 = 4,
351 #[doc = "5: PRS Channel 5 selected as input"]
352 PRSCH5 = 5,
353 #[doc = "6: PRS Channel 6 selected as input"]
354 PRSCH6 = 6,
355 #[doc = "7: PRS Channel 7 selected as input"]
356 PRSCH7 = 7,
357}
358impl From<PRSSEL2_A> for u8 {
359 #[inline(always)]
360 fn from(variant: PRSSEL2_A) -> Self {
361 variant as _
362 }
363}
364impl PRSSEL2_R {
365 #[doc = "Get enumerated values variant"]
366 #[inline(always)]
367 pub fn variant(&self) -> PRSSEL2_A {
368 match self.bits {
369 0 => PRSSEL2_A::PRSCH0,
370 1 => PRSSEL2_A::PRSCH1,
371 2 => PRSSEL2_A::PRSCH2,
372 3 => PRSSEL2_A::PRSCH3,
373 4 => PRSSEL2_A::PRSCH4,
374 5 => PRSSEL2_A::PRSCH5,
375 6 => PRSSEL2_A::PRSCH6,
376 7 => PRSSEL2_A::PRSCH7,
377 _ => unreachable!(),
378 }
379 }
380 #[doc = "Checks if the value of the field is `PRSCH0`"]
381 #[inline(always)]
382 pub fn is_prsch0(&self) -> bool {
383 *self == PRSSEL2_A::PRSCH0
384 }
385 #[doc = "Checks if the value of the field is `PRSCH1`"]
386 #[inline(always)]
387 pub fn is_prsch1(&self) -> bool {
388 *self == PRSSEL2_A::PRSCH1
389 }
390 #[doc = "Checks if the value of the field is `PRSCH2`"]
391 #[inline(always)]
392 pub fn is_prsch2(&self) -> bool {
393 *self == PRSSEL2_A::PRSCH2
394 }
395 #[doc = "Checks if the value of the field is `PRSCH3`"]
396 #[inline(always)]
397 pub fn is_prsch3(&self) -> bool {
398 *self == PRSSEL2_A::PRSCH3
399 }
400 #[doc = "Checks if the value of the field is `PRSCH4`"]
401 #[inline(always)]
402 pub fn is_prsch4(&self) -> bool {
403 *self == PRSSEL2_A::PRSCH4
404 }
405 #[doc = "Checks if the value of the field is `PRSCH5`"]
406 #[inline(always)]
407 pub fn is_prsch5(&self) -> bool {
408 *self == PRSSEL2_A::PRSCH5
409 }
410 #[doc = "Checks if the value of the field is `PRSCH6`"]
411 #[inline(always)]
412 pub fn is_prsch6(&self) -> bool {
413 *self == PRSSEL2_A::PRSCH6
414 }
415 #[doc = "Checks if the value of the field is `PRSCH7`"]
416 #[inline(always)]
417 pub fn is_prsch7(&self) -> bool {
418 *self == PRSSEL2_A::PRSCH7
419 }
420}
421#[doc = "Field `PRSSEL2` writer - LESENSE Decoder PRS Input 2 Configuration"]
422pub type PRSSEL2_W<'a, const O: u8> =
423 crate::FieldWriterSafe<'a, u32, DECCTRL_SPEC, u8, PRSSEL2_A, 3, O>;
424impl<'a, const O: u8> PRSSEL2_W<'a, O> {
425 #[doc = "PRS Channel 0 selected as input"]
426 #[inline(always)]
427 pub fn prsch0(self) -> &'a mut W {
428 self.variant(PRSSEL2_A::PRSCH0)
429 }
430 #[doc = "PRS Channel 1 selected as input"]
431 #[inline(always)]
432 pub fn prsch1(self) -> &'a mut W {
433 self.variant(PRSSEL2_A::PRSCH1)
434 }
435 #[doc = "PRS Channel 2 selected as input"]
436 #[inline(always)]
437 pub fn prsch2(self) -> &'a mut W {
438 self.variant(PRSSEL2_A::PRSCH2)
439 }
440 #[doc = "PRS Channel 3 selected as input"]
441 #[inline(always)]
442 pub fn prsch3(self) -> &'a mut W {
443 self.variant(PRSSEL2_A::PRSCH3)
444 }
445 #[doc = "PRS Channel 4 selected as input"]
446 #[inline(always)]
447 pub fn prsch4(self) -> &'a mut W {
448 self.variant(PRSSEL2_A::PRSCH4)
449 }
450 #[doc = "PRS Channel 5 selected as input"]
451 #[inline(always)]
452 pub fn prsch5(self) -> &'a mut W {
453 self.variant(PRSSEL2_A::PRSCH5)
454 }
455 #[doc = "PRS Channel 6 selected as input"]
456 #[inline(always)]
457 pub fn prsch6(self) -> &'a mut W {
458 self.variant(PRSSEL2_A::PRSCH6)
459 }
460 #[doc = "PRS Channel 7 selected as input"]
461 #[inline(always)]
462 pub fn prsch7(self) -> &'a mut W {
463 self.variant(PRSSEL2_A::PRSCH7)
464 }
465}
466#[doc = "Field `PRSSEL3` reader - LESENSE Decoder PRS Input 3 Configuration"]
467pub type PRSSEL3_R = crate::FieldReader<u8, PRSSEL3_A>;
468#[doc = "LESENSE Decoder PRS Input 3 Configuration\n\nValue on reset: 0"]
469#[derive(Clone, Copy, Debug, PartialEq, Eq)]
470#[repr(u8)]
471pub enum PRSSEL3_A {
472 #[doc = "0: PRS Channel 0 selected as input"]
473 PRSCH0 = 0,
474 #[doc = "1: PRS Channel 1 selected as input"]
475 PRSCH1 = 1,
476 #[doc = "2: PRS Channel 2 selected as input"]
477 PRSCH2 = 2,
478 #[doc = "3: PRS Channel 3 selected as input"]
479 PRSCH3 = 3,
480 #[doc = "4: PRS Channel 4 selected as input"]
481 PRSCH4 = 4,
482 #[doc = "5: PRS Channel 5 selected as input"]
483 PRSCH5 = 5,
484 #[doc = "6: PRS Channel 6 selected as input"]
485 PRSCH6 = 6,
486 #[doc = "7: PRS Channel 7 selected as input"]
487 PRSCH7 = 7,
488}
489impl From<PRSSEL3_A> for u8 {
490 #[inline(always)]
491 fn from(variant: PRSSEL3_A) -> Self {
492 variant as _
493 }
494}
495impl PRSSEL3_R {
496 #[doc = "Get enumerated values variant"]
497 #[inline(always)]
498 pub fn variant(&self) -> PRSSEL3_A {
499 match self.bits {
500 0 => PRSSEL3_A::PRSCH0,
501 1 => PRSSEL3_A::PRSCH1,
502 2 => PRSSEL3_A::PRSCH2,
503 3 => PRSSEL3_A::PRSCH3,
504 4 => PRSSEL3_A::PRSCH4,
505 5 => PRSSEL3_A::PRSCH5,
506 6 => PRSSEL3_A::PRSCH6,
507 7 => PRSSEL3_A::PRSCH7,
508 _ => unreachable!(),
509 }
510 }
511 #[doc = "Checks if the value of the field is `PRSCH0`"]
512 #[inline(always)]
513 pub fn is_prsch0(&self) -> bool {
514 *self == PRSSEL3_A::PRSCH0
515 }
516 #[doc = "Checks if the value of the field is `PRSCH1`"]
517 #[inline(always)]
518 pub fn is_prsch1(&self) -> bool {
519 *self == PRSSEL3_A::PRSCH1
520 }
521 #[doc = "Checks if the value of the field is `PRSCH2`"]
522 #[inline(always)]
523 pub fn is_prsch2(&self) -> bool {
524 *self == PRSSEL3_A::PRSCH2
525 }
526 #[doc = "Checks if the value of the field is `PRSCH3`"]
527 #[inline(always)]
528 pub fn is_prsch3(&self) -> bool {
529 *self == PRSSEL3_A::PRSCH3
530 }
531 #[doc = "Checks if the value of the field is `PRSCH4`"]
532 #[inline(always)]
533 pub fn is_prsch4(&self) -> bool {
534 *self == PRSSEL3_A::PRSCH4
535 }
536 #[doc = "Checks if the value of the field is `PRSCH5`"]
537 #[inline(always)]
538 pub fn is_prsch5(&self) -> bool {
539 *self == PRSSEL3_A::PRSCH5
540 }
541 #[doc = "Checks if the value of the field is `PRSCH6`"]
542 #[inline(always)]
543 pub fn is_prsch6(&self) -> bool {
544 *self == PRSSEL3_A::PRSCH6
545 }
546 #[doc = "Checks if the value of the field is `PRSCH7`"]
547 #[inline(always)]
548 pub fn is_prsch7(&self) -> bool {
549 *self == PRSSEL3_A::PRSCH7
550 }
551}
552#[doc = "Field `PRSSEL3` writer - LESENSE Decoder PRS Input 3 Configuration"]
553pub type PRSSEL3_W<'a, const O: u8> =
554 crate::FieldWriterSafe<'a, u32, DECCTRL_SPEC, u8, PRSSEL3_A, 3, O>;
555impl<'a, const O: u8> PRSSEL3_W<'a, O> {
556 #[doc = "PRS Channel 0 selected as input"]
557 #[inline(always)]
558 pub fn prsch0(self) -> &'a mut W {
559 self.variant(PRSSEL3_A::PRSCH0)
560 }
561 #[doc = "PRS Channel 1 selected as input"]
562 #[inline(always)]
563 pub fn prsch1(self) -> &'a mut W {
564 self.variant(PRSSEL3_A::PRSCH1)
565 }
566 #[doc = "PRS Channel 2 selected as input"]
567 #[inline(always)]
568 pub fn prsch2(self) -> &'a mut W {
569 self.variant(PRSSEL3_A::PRSCH2)
570 }
571 #[doc = "PRS Channel 3 selected as input"]
572 #[inline(always)]
573 pub fn prsch3(self) -> &'a mut W {
574 self.variant(PRSSEL3_A::PRSCH3)
575 }
576 #[doc = "PRS Channel 4 selected as input"]
577 #[inline(always)]
578 pub fn prsch4(self) -> &'a mut W {
579 self.variant(PRSSEL3_A::PRSCH4)
580 }
581 #[doc = "PRS Channel 5 selected as input"]
582 #[inline(always)]
583 pub fn prsch5(self) -> &'a mut W {
584 self.variant(PRSSEL3_A::PRSCH5)
585 }
586 #[doc = "PRS Channel 6 selected as input"]
587 #[inline(always)]
588 pub fn prsch6(self) -> &'a mut W {
589 self.variant(PRSSEL3_A::PRSCH6)
590 }
591 #[doc = "PRS Channel 7 selected as input"]
592 #[inline(always)]
593 pub fn prsch7(self) -> &'a mut W {
594 self.variant(PRSSEL3_A::PRSCH7)
595 }
596}
597impl R {
598 #[doc = "Bit 0 - Disable the Decoder"]
599 #[inline(always)]
600 pub fn disable(&self) -> DISABLE_R {
601 DISABLE_R::new((self.bits & 1) != 0)
602 }
603 #[doc = "Bit 1 - Enable Check of Current State"]
604 #[inline(always)]
605 pub fn errchk(&self) -> ERRCHK_R {
606 ERRCHK_R::new(((self.bits >> 1) & 1) != 0)
607 }
608 #[doc = "Bit 2 - Enable Decoder to Channel Interrupt Mapping"]
609 #[inline(always)]
610 pub fn intmap(&self) -> INTMAP_R {
611 INTMAP_R::new(((self.bits >> 2) & 1) != 0)
612 }
613 #[doc = "Bit 3 - Enable Decoder Hysteresis on PRS0 Output"]
614 #[inline(always)]
615 pub fn hystprs0(&self) -> HYSTPRS0_R {
616 HYSTPRS0_R::new(((self.bits >> 3) & 1) != 0)
617 }
618 #[doc = "Bit 4 - Enable Decoder Hysteresis on PRS1 Output"]
619 #[inline(always)]
620 pub fn hystprs1(&self) -> HYSTPRS1_R {
621 HYSTPRS1_R::new(((self.bits >> 4) & 1) != 0)
622 }
623 #[doc = "Bit 5 - Enable Decoder Hysteresis on PRS2 Output"]
624 #[inline(always)]
625 pub fn hystprs2(&self) -> HYSTPRS2_R {
626 HYSTPRS2_R::new(((self.bits >> 5) & 1) != 0)
627 }
628 #[doc = "Bit 6 - Enable Decoder Hysteresis on Interrupt Requests"]
629 #[inline(always)]
630 pub fn hystirq(&self) -> HYSTIRQ_R {
631 HYSTIRQ_R::new(((self.bits >> 6) & 1) != 0)
632 }
633 #[doc = "Bit 7 - Enable Count Mode on Decoder PRS Channels 0 and 1"]
634 #[inline(always)]
635 pub fn prscnt(&self) -> PRSCNT_R {
636 PRSCNT_R::new(((self.bits >> 7) & 1) != 0)
637 }
638 #[doc = "Bit 8 - LESENSE Decoder Input Configuration"]
639 #[inline(always)]
640 pub fn input(&self) -> INPUT_R {
641 INPUT_R::new(((self.bits >> 8) & 1) != 0)
642 }
643 #[doc = "Bits 10:12 - LESENSE Decoder PRS Input 0 Configuration"]
644 #[inline(always)]
645 pub fn prssel0(&self) -> PRSSEL0_R {
646 PRSSEL0_R::new(((self.bits >> 10) & 7) as u8)
647 }
648 #[doc = "Bits 15:17 - LESENSE Decoder PRS Input 1 Configuration"]
649 #[inline(always)]
650 pub fn prssel1(&self) -> PRSSEL1_R {
651 PRSSEL1_R::new(((self.bits >> 15) & 7) as u8)
652 }
653 #[doc = "Bits 20:22 - LESENSE Decoder PRS Input 2 Configuration"]
654 #[inline(always)]
655 pub fn prssel2(&self) -> PRSSEL2_R {
656 PRSSEL2_R::new(((self.bits >> 20) & 7) as u8)
657 }
658 #[doc = "Bits 25:27 - LESENSE Decoder PRS Input 3 Configuration"]
659 #[inline(always)]
660 pub fn prssel3(&self) -> PRSSEL3_R {
661 PRSSEL3_R::new(((self.bits >> 25) & 7) as u8)
662 }
663}
664impl W {
665 #[doc = "Bit 0 - Disable the Decoder"]
666 #[inline(always)]
667 #[must_use]
668 pub fn disable(&mut self) -> DISABLE_W<0> {
669 DISABLE_W::new(self)
670 }
671 #[doc = "Bit 1 - Enable Check of Current State"]
672 #[inline(always)]
673 #[must_use]
674 pub fn errchk(&mut self) -> ERRCHK_W<1> {
675 ERRCHK_W::new(self)
676 }
677 #[doc = "Bit 2 - Enable Decoder to Channel Interrupt Mapping"]
678 #[inline(always)]
679 #[must_use]
680 pub fn intmap(&mut self) -> INTMAP_W<2> {
681 INTMAP_W::new(self)
682 }
683 #[doc = "Bit 3 - Enable Decoder Hysteresis on PRS0 Output"]
684 #[inline(always)]
685 #[must_use]
686 pub fn hystprs0(&mut self) -> HYSTPRS0_W<3> {
687 HYSTPRS0_W::new(self)
688 }
689 #[doc = "Bit 4 - Enable Decoder Hysteresis on PRS1 Output"]
690 #[inline(always)]
691 #[must_use]
692 pub fn hystprs1(&mut self) -> HYSTPRS1_W<4> {
693 HYSTPRS1_W::new(self)
694 }
695 #[doc = "Bit 5 - Enable Decoder Hysteresis on PRS2 Output"]
696 #[inline(always)]
697 #[must_use]
698 pub fn hystprs2(&mut self) -> HYSTPRS2_W<5> {
699 HYSTPRS2_W::new(self)
700 }
701 #[doc = "Bit 6 - Enable Decoder Hysteresis on Interrupt Requests"]
702 #[inline(always)]
703 #[must_use]
704 pub fn hystirq(&mut self) -> HYSTIRQ_W<6> {
705 HYSTIRQ_W::new(self)
706 }
707 #[doc = "Bit 7 - Enable Count Mode on Decoder PRS Channels 0 and 1"]
708 #[inline(always)]
709 #[must_use]
710 pub fn prscnt(&mut self) -> PRSCNT_W<7> {
711 PRSCNT_W::new(self)
712 }
713 #[doc = "Bit 8 - LESENSE Decoder Input Configuration"]
714 #[inline(always)]
715 #[must_use]
716 pub fn input(&mut self) -> INPUT_W<8> {
717 INPUT_W::new(self)
718 }
719 #[doc = "Bits 10:12 - LESENSE Decoder PRS Input 0 Configuration"]
720 #[inline(always)]
721 #[must_use]
722 pub fn prssel0(&mut self) -> PRSSEL0_W<10> {
723 PRSSEL0_W::new(self)
724 }
725 #[doc = "Bits 15:17 - LESENSE Decoder PRS Input 1 Configuration"]
726 #[inline(always)]
727 #[must_use]
728 pub fn prssel1(&mut self) -> PRSSEL1_W<15> {
729 PRSSEL1_W::new(self)
730 }
731 #[doc = "Bits 20:22 - LESENSE Decoder PRS Input 2 Configuration"]
732 #[inline(always)]
733 #[must_use]
734 pub fn prssel2(&mut self) -> PRSSEL2_W<20> {
735 PRSSEL2_W::new(self)
736 }
737 #[doc = "Bits 25:27 - LESENSE Decoder PRS Input 3 Configuration"]
738 #[inline(always)]
739 #[must_use]
740 pub fn prssel3(&mut self) -> PRSSEL3_W<25> {
741 PRSSEL3_W::new(self)
742 }
743 #[doc = "Writes raw bits to the register."]
744 #[inline(always)]
745 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
746 self.0.bits(bits);
747 self
748 }
749}
750#[doc = "Decoder Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [decctrl](index.html) module"]
751pub struct DECCTRL_SPEC;
752impl crate::RegisterSpec for DECCTRL_SPEC {
753 type Ux = u32;
754}
755#[doc = "`read()` method returns [decctrl::R](R) reader structure"]
756impl crate::Readable for DECCTRL_SPEC {
757 type Reader = R;
758}
759#[doc = "`write(|w| ..)` method takes [decctrl::W](W) writer structure"]
760impl crate::Writable for DECCTRL_SPEC {
761 type Writer = W;
762 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
763 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
764}
765#[doc = "`reset()` method sets DECCTRL to value 0"]
766impl crate::Resettable for DECCTRL_SPEC {
767 const RESET_VALUE: Self::Ux = 0;
768}