1#![allow(clippy::identity_op)]
21#![allow(clippy::module_inception)]
22#![allow(clippy::derivable_impls)]
23#[allow(unused_imports)]
24use crate::common::sealed;
25#[allow(unused_imports)]
26use crate::common::*;
27#[doc = r"12-bit A/D Converter"]
28unsafe impl ::core::marker::Send for super::Adc120 {}
29unsafe impl ::core::marker::Sync for super::Adc120 {}
30impl super::Adc120 {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36
37 #[doc = "A/D Control Register"]
38 #[inline(always)]
39 pub const fn adcsr(&self) -> &'static crate::common::Reg<self::Adcsr_SPEC, crate::common::RW> {
40 unsafe {
41 crate::common::Reg::<self::Adcsr_SPEC, crate::common::RW>::from_ptr(
42 self._svd2pac_as_ptr().add(0usize),
43 )
44 }
45 }
46
47 #[doc = "A/D Channel Select Register A0"]
48 #[inline(always)]
49 pub const fn adansa0(
50 &self,
51 ) -> &'static crate::common::Reg<self::Adansa0_SPEC, crate::common::RW> {
52 unsafe {
53 crate::common::Reg::<self::Adansa0_SPEC, crate::common::RW>::from_ptr(
54 self._svd2pac_as_ptr().add(4usize),
55 )
56 }
57 }
58
59 #[doc = "A/D Channel Select Register A1"]
60 #[inline(always)]
61 pub const fn adansa1(
62 &self,
63 ) -> &'static crate::common::Reg<self::Adansa1_SPEC, crate::common::RW> {
64 unsafe {
65 crate::common::Reg::<self::Adansa1_SPEC, crate::common::RW>::from_ptr(
66 self._svd2pac_as_ptr().add(6usize),
67 )
68 }
69 }
70
71 #[doc = "A/D-Converted Value Addition/Average Channel Select Register 0"]
72 #[inline(always)]
73 pub const fn adads0(
74 &self,
75 ) -> &'static crate::common::Reg<self::Adads0_SPEC, crate::common::RW> {
76 unsafe {
77 crate::common::Reg::<self::Adads0_SPEC, crate::common::RW>::from_ptr(
78 self._svd2pac_as_ptr().add(8usize),
79 )
80 }
81 }
82
83 #[doc = "A/D-Converted Value Addition/Average Channel Select Register 1"]
84 #[inline(always)]
85 pub const fn adads1(
86 &self,
87 ) -> &'static crate::common::Reg<self::Adads1_SPEC, crate::common::RW> {
88 unsafe {
89 crate::common::Reg::<self::Adads1_SPEC, crate::common::RW>::from_ptr(
90 self._svd2pac_as_ptr().add(10usize),
91 )
92 }
93 }
94
95 #[doc = "A/D-Converted Value Addition/Average Count Select Register"]
96 #[inline(always)]
97 pub const fn adadc(&self) -> &'static crate::common::Reg<self::Adadc_SPEC, crate::common::RW> {
98 unsafe {
99 crate::common::Reg::<self::Adadc_SPEC, crate::common::RW>::from_ptr(
100 self._svd2pac_as_ptr().add(12usize),
101 )
102 }
103 }
104
105 #[doc = "A/D Control Extended Register"]
106 #[inline(always)]
107 pub const fn adcer(&self) -> &'static crate::common::Reg<self::Adcer_SPEC, crate::common::RW> {
108 unsafe {
109 crate::common::Reg::<self::Adcer_SPEC, crate::common::RW>::from_ptr(
110 self._svd2pac_as_ptr().add(14usize),
111 )
112 }
113 }
114
115 #[doc = "A/D Conversion Start Trigger Select Register"]
116 #[inline(always)]
117 pub const fn adstrgr(
118 &self,
119 ) -> &'static crate::common::Reg<self::Adstrgr_SPEC, crate::common::RW> {
120 unsafe {
121 crate::common::Reg::<self::Adstrgr_SPEC, crate::common::RW>::from_ptr(
122 self._svd2pac_as_ptr().add(16usize),
123 )
124 }
125 }
126
127 #[doc = "A/D Conversion Extended Input Control Registers"]
128 #[inline(always)]
129 pub const fn adexicr(
130 &self,
131 ) -> &'static crate::common::Reg<self::Adexicr_SPEC, crate::common::RW> {
132 unsafe {
133 crate::common::Reg::<self::Adexicr_SPEC, crate::common::RW>::from_ptr(
134 self._svd2pac_as_ptr().add(18usize),
135 )
136 }
137 }
138
139 #[doc = "A/D Channel Select Register B0"]
140 #[inline(always)]
141 pub const fn adansb0(
142 &self,
143 ) -> &'static crate::common::Reg<self::Adansb0_SPEC, crate::common::RW> {
144 unsafe {
145 crate::common::Reg::<self::Adansb0_SPEC, crate::common::RW>::from_ptr(
146 self._svd2pac_as_ptr().add(20usize),
147 )
148 }
149 }
150
151 #[doc = "A/D Channel Select Register B1"]
152 #[inline(always)]
153 pub const fn adansb1(
154 &self,
155 ) -> &'static crate::common::Reg<self::Adansb1_SPEC, crate::common::RW> {
156 unsafe {
157 crate::common::Reg::<self::Adansb1_SPEC, crate::common::RW>::from_ptr(
158 self._svd2pac_as_ptr().add(22usize),
159 )
160 }
161 }
162
163 #[doc = "A/D Data Duplexing Register"]
164 #[inline(always)]
165 pub const fn addbldr(
166 &self,
167 ) -> &'static crate::common::Reg<self::Addbldr_SPEC, crate::common::R> {
168 unsafe {
169 crate::common::Reg::<self::Addbldr_SPEC, crate::common::R>::from_ptr(
170 self._svd2pac_as_ptr().add(24usize),
171 )
172 }
173 }
174
175 #[doc = "A/D Temperature Sensor Data Register"]
176 #[inline(always)]
177 pub const fn adtsdr(&self) -> &'static crate::common::Reg<self::Adtsdr_SPEC, crate::common::R> {
178 unsafe {
179 crate::common::Reg::<self::Adtsdr_SPEC, crate::common::R>::from_ptr(
180 self._svd2pac_as_ptr().add(26usize),
181 )
182 }
183 }
184
185 #[doc = "A/D Internal Reference Voltage Data Register"]
186 #[inline(always)]
187 pub const fn adocdr(&self) -> &'static crate::common::Reg<self::Adocdr_SPEC, crate::common::R> {
188 unsafe {
189 crate::common::Reg::<self::Adocdr_SPEC, crate::common::R>::from_ptr(
190 self._svd2pac_as_ptr().add(28usize),
191 )
192 }
193 }
194
195 #[doc = "A/D Self-Diagnosis Data Register"]
196 #[inline(always)]
197 pub const fn adrd(&self) -> &'static crate::common::Reg<self::Adrd_SPEC, crate::common::R> {
198 unsafe {
199 crate::common::Reg::<self::Adrd_SPEC, crate::common::R>::from_ptr(
200 self._svd2pac_as_ptr().add(30usize),
201 )
202 }
203 }
204
205 #[doc = "A/D Data Registers %s"]
206 #[inline(always)]
207 pub const fn addr(
208 &self,
209 ) -> &'static crate::common::ClusterRegisterArray<
210 crate::common::Reg<self::Addr_SPEC, crate::common::R>,
211 4,
212 0x2,
213 > {
214 unsafe {
215 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x46usize))
216 }
217 }
218 #[inline(always)]
219 pub const fn addr19(&self) -> &'static crate::common::Reg<self::Addr_SPEC, crate::common::R> {
220 unsafe {
221 crate::common::Reg::<self::Addr_SPEC, crate::common::R>::from_ptr(
222 self._svd2pac_as_ptr().add(0x46usize),
223 )
224 }
225 }
226 #[inline(always)]
227 pub const fn addr20(&self) -> &'static crate::common::Reg<self::Addr_SPEC, crate::common::R> {
228 unsafe {
229 crate::common::Reg::<self::Addr_SPEC, crate::common::R>::from_ptr(
230 self._svd2pac_as_ptr().add(0x48usize),
231 )
232 }
233 }
234 #[inline(always)]
235 pub const fn addr21(&self) -> &'static crate::common::Reg<self::Addr_SPEC, crate::common::R> {
236 unsafe {
237 crate::common::Reg::<self::Addr_SPEC, crate::common::R>::from_ptr(
238 self._svd2pac_as_ptr().add(0x4ausize),
239 )
240 }
241 }
242 #[inline(always)]
243 pub const fn addr22(&self) -> &'static crate::common::Reg<self::Addr_SPEC, crate::common::R> {
244 unsafe {
245 crate::common::Reg::<self::Addr_SPEC, crate::common::R>::from_ptr(
246 self._svd2pac_as_ptr().add(0x4cusize),
247 )
248 }
249 }
250
251 #[doc = "A/D Disconnection Detection Control Register"]
252 #[inline(always)]
253 pub const fn addiscr(
254 &self,
255 ) -> &'static crate::common::Reg<self::Addiscr_SPEC, crate::common::RW> {
256 unsafe {
257 crate::common::Reg::<self::Addiscr_SPEC, crate::common::RW>::from_ptr(
258 self._svd2pac_as_ptr().add(122usize),
259 )
260 }
261 }
262
263 #[doc = "A/D Conversion Operation Mode Select Register"]
264 #[inline(always)]
265 pub const fn adacsr(
266 &self,
267 ) -> &'static crate::common::Reg<self::Adacsr_SPEC, crate::common::RW> {
268 unsafe {
269 crate::common::Reg::<self::Adacsr_SPEC, crate::common::RW>::from_ptr(
270 self._svd2pac_as_ptr().add(126usize),
271 )
272 }
273 }
274
275 #[doc = "A/D Group Scan Priority Control Register"]
276 #[inline(always)]
277 pub const fn adgspcr(
278 &self,
279 ) -> &'static crate::common::Reg<self::Adgspcr_SPEC, crate::common::RW> {
280 unsafe {
281 crate::common::Reg::<self::Adgspcr_SPEC, crate::common::RW>::from_ptr(
282 self._svd2pac_as_ptr().add(128usize),
283 )
284 }
285 }
286
287 #[doc = "A/D Data Duplexing Register A"]
288 #[inline(always)]
289 pub const fn addbldra(
290 &self,
291 ) -> &'static crate::common::Reg<self::Addbldra_SPEC, crate::common::R> {
292 unsafe {
293 crate::common::Reg::<self::Addbldra_SPEC, crate::common::R>::from_ptr(
294 self._svd2pac_as_ptr().add(132usize),
295 )
296 }
297 }
298
299 #[doc = "A/D Data Duplexing Register B"]
300 #[inline(always)]
301 pub const fn addbldrb(
302 &self,
303 ) -> &'static crate::common::Reg<self::Addbldrb_SPEC, crate::common::R> {
304 unsafe {
305 crate::common::Reg::<self::Addbldrb_SPEC, crate::common::R>::from_ptr(
306 self._svd2pac_as_ptr().add(134usize),
307 )
308 }
309 }
310
311 #[doc = "A/D High-Potential/Low-Potential Reference Voltage Control Register"]
312 #[inline(always)]
313 pub const fn adhvrefcnt(
314 &self,
315 ) -> &'static crate::common::Reg<self::Adhvrefcnt_SPEC, crate::common::RW> {
316 unsafe {
317 crate::common::Reg::<self::Adhvrefcnt_SPEC, crate::common::RW>::from_ptr(
318 self._svd2pac_as_ptr().add(138usize),
319 )
320 }
321 }
322
323 #[doc = "A/D Compare Function Window A/B Status Monitor Register"]
324 #[inline(always)]
325 pub const fn adwinmon(
326 &self,
327 ) -> &'static crate::common::Reg<self::Adwinmon_SPEC, crate::common::R> {
328 unsafe {
329 crate::common::Reg::<self::Adwinmon_SPEC, crate::common::R>::from_ptr(
330 self._svd2pac_as_ptr().add(140usize),
331 )
332 }
333 }
334
335 #[doc = "A/D Compare Function Control Register"]
336 #[inline(always)]
337 pub const fn adcmpcr(
338 &self,
339 ) -> &'static crate::common::Reg<self::Adcmpcr_SPEC, crate::common::RW> {
340 unsafe {
341 crate::common::Reg::<self::Adcmpcr_SPEC, crate::common::RW>::from_ptr(
342 self._svd2pac_as_ptr().add(144usize),
343 )
344 }
345 }
346
347 #[doc = "A/D Compare Function Window A Extended Input Select Register"]
348 #[inline(always)]
349 pub const fn adcmpanser(
350 &self,
351 ) -> &'static crate::common::Reg<self::Adcmpanser_SPEC, crate::common::RW> {
352 unsafe {
353 crate::common::Reg::<self::Adcmpanser_SPEC, crate::common::RW>::from_ptr(
354 self._svd2pac_as_ptr().add(146usize),
355 )
356 }
357 }
358
359 #[doc = "A/D Compare Function Window A Extended Input Comparison Condition Setting Register"]
360 #[inline(always)]
361 pub const fn adcmpler(
362 &self,
363 ) -> &'static crate::common::Reg<self::Adcmpler_SPEC, crate::common::RW> {
364 unsafe {
365 crate::common::Reg::<self::Adcmpler_SPEC, crate::common::RW>::from_ptr(
366 self._svd2pac_as_ptr().add(147usize),
367 )
368 }
369 }
370
371 #[doc = "A/D Compare Function Window A Channel Select Register 0"]
372 #[inline(always)]
373 pub const fn adcmpansr0(
374 &self,
375 ) -> &'static crate::common::Reg<self::Adcmpansr0_SPEC, crate::common::RW> {
376 unsafe {
377 crate::common::Reg::<self::Adcmpansr0_SPEC, crate::common::RW>::from_ptr(
378 self._svd2pac_as_ptr().add(148usize),
379 )
380 }
381 }
382
383 #[doc = "A/D Compare Function Window A Channel Select Register 1"]
384 #[inline(always)]
385 pub const fn adcmpansr1(
386 &self,
387 ) -> &'static crate::common::Reg<self::Adcmpansr1_SPEC, crate::common::RW> {
388 unsafe {
389 crate::common::Reg::<self::Adcmpansr1_SPEC, crate::common::RW>::from_ptr(
390 self._svd2pac_as_ptr().add(150usize),
391 )
392 }
393 }
394
395 #[doc = "A/D Compare Function Window A Comparison Condition Setting Register 0"]
396 #[inline(always)]
397 pub const fn adcmplr0(
398 &self,
399 ) -> &'static crate::common::Reg<self::Adcmplr0_SPEC, crate::common::RW> {
400 unsafe {
401 crate::common::Reg::<self::Adcmplr0_SPEC, crate::common::RW>::from_ptr(
402 self._svd2pac_as_ptr().add(152usize),
403 )
404 }
405 }
406
407 #[doc = "A/D Compare Function Window A Comparison Condition Setting Register 1"]
408 #[inline(always)]
409 pub const fn adcmplr1(
410 &self,
411 ) -> &'static crate::common::Reg<self::Adcmplr1_SPEC, crate::common::RW> {
412 unsafe {
413 crate::common::Reg::<self::Adcmplr1_SPEC, crate::common::RW>::from_ptr(
414 self._svd2pac_as_ptr().add(154usize),
415 )
416 }
417 }
418
419 #[doc = "A/D Compare Function Window A Lower-Side/Upper-Side Level Setting Register"]
420 #[inline(always)]
421 pub const fn adcmpdr(
422 &self,
423 ) -> &'static crate::common::ClusterRegisterArray<
424 crate::common::Reg<self::Adcmpdr_SPEC, crate::common::RW>,
425 2,
426 0x2,
427 > {
428 unsafe {
429 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x9cusize))
430 }
431 }
432 #[inline(always)]
433 pub const fn adcmpdr0(
434 &self,
435 ) -> &'static crate::common::Reg<self::Adcmpdr_SPEC, crate::common::RW> {
436 unsafe {
437 crate::common::Reg::<self::Adcmpdr_SPEC, crate::common::RW>::from_ptr(
438 self._svd2pac_as_ptr().add(0x9cusize),
439 )
440 }
441 }
442 #[inline(always)]
443 pub const fn adcmpdr1(
444 &self,
445 ) -> &'static crate::common::Reg<self::Adcmpdr_SPEC, crate::common::RW> {
446 unsafe {
447 crate::common::Reg::<self::Adcmpdr_SPEC, crate::common::RW>::from_ptr(
448 self._svd2pac_as_ptr().add(0x9eusize),
449 )
450 }
451 }
452
453 #[doc = "A/D Compare Function Window A Channel Status Register 0"]
454 #[inline(always)]
455 pub const fn adcmpsr0(
456 &self,
457 ) -> &'static crate::common::Reg<self::Adcmpsr0_SPEC, crate::common::RW> {
458 unsafe {
459 crate::common::Reg::<self::Adcmpsr0_SPEC, crate::common::RW>::from_ptr(
460 self._svd2pac_as_ptr().add(160usize),
461 )
462 }
463 }
464
465 #[doc = "A/D Compare Function Window A Channel Status Register1"]
466 #[inline(always)]
467 pub const fn adcmpsr1(
468 &self,
469 ) -> &'static crate::common::Reg<self::Adcmpsr1_SPEC, crate::common::RW> {
470 unsafe {
471 crate::common::Reg::<self::Adcmpsr1_SPEC, crate::common::RW>::from_ptr(
472 self._svd2pac_as_ptr().add(162usize),
473 )
474 }
475 }
476
477 #[doc = "A/D Compare Function Window A Extended Input Channel Status Register"]
478 #[inline(always)]
479 pub const fn adcmpser(
480 &self,
481 ) -> &'static crate::common::Reg<self::Adcmpser_SPEC, crate::common::RW> {
482 unsafe {
483 crate::common::Reg::<self::Adcmpser_SPEC, crate::common::RW>::from_ptr(
484 self._svd2pac_as_ptr().add(164usize),
485 )
486 }
487 }
488
489 #[doc = "A/D Compare Function Window B Channel Select Register"]
490 #[inline(always)]
491 pub const fn adcmpbnsr(
492 &self,
493 ) -> &'static crate::common::Reg<self::Adcmpbnsr_SPEC, crate::common::RW> {
494 unsafe {
495 crate::common::Reg::<self::Adcmpbnsr_SPEC, crate::common::RW>::from_ptr(
496 self._svd2pac_as_ptr().add(166usize),
497 )
498 }
499 }
500
501 #[doc = "A/D Compare Function Window B Lower-Side/Upper-Side Level Setting Register"]
502 #[inline(always)]
503 pub const fn adwinllb(
504 &self,
505 ) -> &'static crate::common::Reg<self::Adwinllb_SPEC, crate::common::RW> {
506 unsafe {
507 crate::common::Reg::<self::Adwinllb_SPEC, crate::common::RW>::from_ptr(
508 self._svd2pac_as_ptr().add(168usize),
509 )
510 }
511 }
512
513 #[doc = "A/D Compare Function Window B Lower-Side/Upper-Side Level Setting Register"]
514 #[inline(always)]
515 pub const fn adwinulb(
516 &self,
517 ) -> &'static crate::common::Reg<self::Adwinulb_SPEC, crate::common::RW> {
518 unsafe {
519 crate::common::Reg::<self::Adwinulb_SPEC, crate::common::RW>::from_ptr(
520 self._svd2pac_as_ptr().add(170usize),
521 )
522 }
523 }
524
525 #[doc = "A/D Compare Function Window B Status Register"]
526 #[inline(always)]
527 pub const fn adcmpbsr(
528 &self,
529 ) -> &'static crate::common::Reg<self::Adcmpbsr_SPEC, crate::common::RW> {
530 unsafe {
531 crate::common::Reg::<self::Adcmpbsr_SPEC, crate::common::RW>::from_ptr(
532 self._svd2pac_as_ptr().add(172usize),
533 )
534 }
535 }
536
537 #[doc = "A/D Sampling State Register"]
538 #[inline(always)]
539 pub const fn adsstrl(
540 &self,
541 ) -> &'static crate::common::Reg<self::Adsstrl_SPEC, crate::common::RW> {
542 unsafe {
543 crate::common::Reg::<self::Adsstrl_SPEC, crate::common::RW>::from_ptr(
544 self._svd2pac_as_ptr().add(221usize),
545 )
546 }
547 }
548
549 #[doc = "A/D Sampling State Register"]
550 #[inline(always)]
551 pub const fn adsstrt(
552 &self,
553 ) -> &'static crate::common::Reg<self::Adsstrt_SPEC, crate::common::RW> {
554 unsafe {
555 crate::common::Reg::<self::Adsstrt_SPEC, crate::common::RW>::from_ptr(
556 self._svd2pac_as_ptr().add(222usize),
557 )
558 }
559 }
560
561 #[doc = "A/D Sampling State Register"]
562 #[inline(always)]
563 pub const fn adsstro(
564 &self,
565 ) -> &'static crate::common::Reg<self::Adsstro_SPEC, crate::common::RW> {
566 unsafe {
567 crate::common::Reg::<self::Adsstro_SPEC, crate::common::RW>::from_ptr(
568 self._svd2pac_as_ptr().add(223usize),
569 )
570 }
571 }
572
573 #[doc = "A/D Sampling State Register"]
574 #[inline(always)]
575 pub const fn adsstr(
576 &self,
577 ) -> &'static crate::common::ClusterRegisterArray<
578 crate::common::Reg<self::Adsstr_SPEC, crate::common::RW>,
579 6,
580 0x1,
581 > {
582 unsafe {
583 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0xe5usize))
584 }
585 }
586 #[inline(always)]
587 pub const fn adsstr5(
588 &self,
589 ) -> &'static crate::common::Reg<self::Adsstr_SPEC, crate::common::RW> {
590 unsafe {
591 crate::common::Reg::<self::Adsstr_SPEC, crate::common::RW>::from_ptr(
592 self._svd2pac_as_ptr().add(0xe5usize),
593 )
594 }
595 }
596 #[inline(always)]
597 pub const fn adsstr6(
598 &self,
599 ) -> &'static crate::common::Reg<self::Adsstr_SPEC, crate::common::RW> {
600 unsafe {
601 crate::common::Reg::<self::Adsstr_SPEC, crate::common::RW>::from_ptr(
602 self._svd2pac_as_ptr().add(0xe6usize),
603 )
604 }
605 }
606 #[inline(always)]
607 pub const fn adsstr7(
608 &self,
609 ) -> &'static crate::common::Reg<self::Adsstr_SPEC, crate::common::RW> {
610 unsafe {
611 crate::common::Reg::<self::Adsstr_SPEC, crate::common::RW>::from_ptr(
612 self._svd2pac_as_ptr().add(0xe7usize),
613 )
614 }
615 }
616 #[inline(always)]
617 pub const fn adsstr8(
618 &self,
619 ) -> &'static crate::common::Reg<self::Adsstr_SPEC, crate::common::RW> {
620 unsafe {
621 crate::common::Reg::<self::Adsstr_SPEC, crate::common::RW>::from_ptr(
622 self._svd2pac_as_ptr().add(0xe8usize),
623 )
624 }
625 }
626 #[inline(always)]
627 pub const fn adsstr9(
628 &self,
629 ) -> &'static crate::common::Reg<self::Adsstr_SPEC, crate::common::RW> {
630 unsafe {
631 crate::common::Reg::<self::Adsstr_SPEC, crate::common::RW>::from_ptr(
632 self._svd2pac_as_ptr().add(0xe9usize),
633 )
634 }
635 }
636 #[inline(always)]
637 pub const fn adsstr10(
638 &self,
639 ) -> &'static crate::common::Reg<self::Adsstr_SPEC, crate::common::RW> {
640 unsafe {
641 crate::common::Reg::<self::Adsstr_SPEC, crate::common::RW>::from_ptr(
642 self._svd2pac_as_ptr().add(0xeausize),
643 )
644 }
645 }
646}
647#[doc(hidden)]
648#[derive(Copy, Clone, Eq, PartialEq)]
649pub struct Adcsr_SPEC;
650impl crate::sealed::RegSpec for Adcsr_SPEC {
651 type DataType = u16;
652}
653
654#[doc = "A/D Control Register"]
655pub type Adcsr = crate::RegValueT<Adcsr_SPEC>;
656
657impl Adcsr {
658 #[doc = "Double Trigger Channel Select"]
659 #[inline(always)]
660 pub fn dblans(
661 self,
662 ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, Adcsr_SPEC, crate::common::RW> {
663 crate::common::RegisterField::<0,0x1f,1,0,u8,u8,Adcsr_SPEC,crate::common::RW>::from_register(self,0)
664 }
665
666 #[doc = "Group B Scan End Interrupt and ELC Event Enable"]
667 #[inline(always)]
668 pub fn gbadie(
669 self,
670 ) -> crate::common::RegisterField<
671 6,
672 0x1,
673 1,
674 0,
675 adcsr::Gbadie,
676 adcsr::Gbadie,
677 Adcsr_SPEC,
678 crate::common::RW,
679 > {
680 crate::common::RegisterField::<
681 6,
682 0x1,
683 1,
684 0,
685 adcsr::Gbadie,
686 adcsr::Gbadie,
687 Adcsr_SPEC,
688 crate::common::RW,
689 >::from_register(self, 0)
690 }
691
692 #[doc = "Double Trigger Mode Select"]
693 #[inline(always)]
694 pub fn dble(
695 self,
696 ) -> crate::common::RegisterField<
697 7,
698 0x1,
699 1,
700 0,
701 adcsr::Dble,
702 adcsr::Dble,
703 Adcsr_SPEC,
704 crate::common::RW,
705 > {
706 crate::common::RegisterField::<
707 7,
708 0x1,
709 1,
710 0,
711 adcsr::Dble,
712 adcsr::Dble,
713 Adcsr_SPEC,
714 crate::common::RW,
715 >::from_register(self, 0)
716 }
717
718 #[doc = "Trigger Select"]
719 #[inline(always)]
720 pub fn extrg(
721 self,
722 ) -> crate::common::RegisterField<
723 8,
724 0x1,
725 1,
726 0,
727 adcsr::Extrg,
728 adcsr::Extrg,
729 Adcsr_SPEC,
730 crate::common::RW,
731 > {
732 crate::common::RegisterField::<
733 8,
734 0x1,
735 1,
736 0,
737 adcsr::Extrg,
738 adcsr::Extrg,
739 Adcsr_SPEC,
740 crate::common::RW,
741 >::from_register(self, 0)
742 }
743
744 #[doc = "Trigger Start Enable"]
745 #[inline(always)]
746 pub fn trge(
747 self,
748 ) -> crate::common::RegisterField<
749 9,
750 0x1,
751 1,
752 0,
753 adcsr::Trge,
754 adcsr::Trge,
755 Adcsr_SPEC,
756 crate::common::RW,
757 > {
758 crate::common::RegisterField::<
759 9,
760 0x1,
761 1,
762 0,
763 adcsr::Trge,
764 adcsr::Trge,
765 Adcsr_SPEC,
766 crate::common::RW,
767 >::from_register(self, 0)
768 }
769
770 #[doc = "A/D Conversion Mode Select"]
771 #[inline(always)]
772 pub fn adhsc(
773 self,
774 ) -> crate::common::RegisterField<
775 10,
776 0x1,
777 1,
778 0,
779 adcsr::Adhsc,
780 adcsr::Adhsc,
781 Adcsr_SPEC,
782 crate::common::RW,
783 > {
784 crate::common::RegisterField::<
785 10,
786 0x1,
787 1,
788 0,
789 adcsr::Adhsc,
790 adcsr::Adhsc,
791 Adcsr_SPEC,
792 crate::common::RW,
793 >::from_register(self, 0)
794 }
795
796 #[doc = "Scan Mode Select"]
797 #[inline(always)]
798 pub fn adcs(
799 self,
800 ) -> crate::common::RegisterField<
801 13,
802 0x3,
803 1,
804 0,
805 adcsr::Adcs,
806 adcsr::Adcs,
807 Adcsr_SPEC,
808 crate::common::RW,
809 > {
810 crate::common::RegisterField::<
811 13,
812 0x3,
813 1,
814 0,
815 adcsr::Adcs,
816 adcsr::Adcs,
817 Adcsr_SPEC,
818 crate::common::RW,
819 >::from_register(self, 0)
820 }
821
822 #[doc = "A/D Conversion Start"]
823 #[inline(always)]
824 pub fn adst(
825 self,
826 ) -> crate::common::RegisterField<
827 15,
828 0x1,
829 1,
830 0,
831 adcsr::Adst,
832 adcsr::Adst,
833 Adcsr_SPEC,
834 crate::common::RW,
835 > {
836 crate::common::RegisterField::<
837 15,
838 0x1,
839 1,
840 0,
841 adcsr::Adst,
842 adcsr::Adst,
843 Adcsr_SPEC,
844 crate::common::RW,
845 >::from_register(self, 0)
846 }
847}
848impl ::core::default::Default for Adcsr {
849 #[inline(always)]
850 fn default() -> Adcsr {
851 <crate::RegValueT<Adcsr_SPEC> as RegisterValue<_>>::new(0)
852 }
853}
854pub mod adcsr {
855
856 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
857 pub struct Gbadie_SPEC;
858 pub type Gbadie = crate::EnumBitfieldStruct<u8, Gbadie_SPEC>;
859 impl Gbadie {
860 #[doc = "Disable ADC120_GBADI interrupt generation on group B scan completion."]
861 pub const _0: Self = Self::new(0);
862
863 #[doc = "Enable ADC120_GBADI interrupt generation on group B scan completion."]
864 pub const _1: Self = Self::new(1);
865 }
866 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
867 pub struct Dble_SPEC;
868 pub type Dble = crate::EnumBitfieldStruct<u8, Dble_SPEC>;
869 impl Dble {
870 #[doc = "Deselect double-trigger mode."]
871 pub const _0: Self = Self::new(0);
872
873 #[doc = "Select double-trigger mode."]
874 pub const _1: Self = Self::new(1);
875 }
876 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
877 pub struct Extrg_SPEC;
878 pub type Extrg = crate::EnumBitfieldStruct<u8, Extrg_SPEC>;
879 impl Extrg {
880 #[doc = "Start A/D conversion by the synchronous trigger (ELC)."]
881 pub const _0: Self = Self::new(0);
882
883 #[doc = "Start A/D conversion by the asynchronous trigger (ADTRG0)."]
884 pub const _1: Self = Self::new(1);
885 }
886 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
887 pub struct Trge_SPEC;
888 pub type Trge = crate::EnumBitfieldStruct<u8, Trge_SPEC>;
889 impl Trge {
890 #[doc = "Disable A/D conversion to be started by the synchronous or asynchronous trigger"]
891 pub const _0: Self = Self::new(0);
892
893 #[doc = "Enable A/D conversion to be started by the synchronous or asynchronous trigger"]
894 pub const _1: Self = Self::new(1);
895 }
896 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
897 pub struct Adhsc_SPEC;
898 pub type Adhsc = crate::EnumBitfieldStruct<u8, Adhsc_SPEC>;
899 impl Adhsc {
900 #[doc = "High-speed A/D conversion mode"]
901 pub const _0: Self = Self::new(0);
902
903 #[doc = "Low-power A/D conversion mode"]
904 pub const _1: Self = Self::new(1);
905 }
906 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
907 pub struct Adcs_SPEC;
908 pub type Adcs = crate::EnumBitfieldStruct<u8, Adcs_SPEC>;
909 impl Adcs {
910 #[doc = "Single scan mode"]
911 pub const _00: Self = Self::new(0);
912
913 #[doc = "Group scan mode"]
914 pub const _01: Self = Self::new(1);
915
916 #[doc = "Continuous scan mode"]
917 pub const _10: Self = Self::new(2);
918
919 #[doc = "Setting prohibited"]
920 pub const _11: Self = Self::new(3);
921 }
922 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
923 pub struct Adst_SPEC;
924 pub type Adst = crate::EnumBitfieldStruct<u8, Adst_SPEC>;
925 impl Adst {
926 #[doc = "Stop A/D conversion process."]
927 pub const _0: Self = Self::new(0);
928
929 #[doc = "Start A/D conversion process."]
930 pub const _1: Self = Self::new(1);
931 }
932}
933#[doc(hidden)]
934#[derive(Copy, Clone, Eq, PartialEq)]
935pub struct Adansa0_SPEC;
936impl crate::sealed::RegSpec for Adansa0_SPEC {
937 type DataType = u16;
938}
939
940#[doc = "A/D Channel Select Register A0"]
941pub type Adansa0 = crate::RegValueT<Adansa0_SPEC>;
942
943impl Adansa0 {
944 #[doc = "A/D Conversion Channels Select"]
945 #[inline(always)]
946 pub fn ansa0(
947 self,
948 ) -> crate::common::RegisterField<
949 0,
950 0x1,
951 1,
952 0,
953 adansa0::Ansa0,
954 adansa0::Ansa0,
955 Adansa0_SPEC,
956 crate::common::RW,
957 > {
958 crate::common::RegisterField::<
959 0,
960 0x1,
961 1,
962 0,
963 adansa0::Ansa0,
964 adansa0::Ansa0,
965 Adansa0_SPEC,
966 crate::common::RW,
967 >::from_register(self, 0)
968 }
969
970 #[doc = "A/D Conversion Channels Select"]
971 #[inline(always)]
972 pub fn ansa1(
973 self,
974 ) -> crate::common::RegisterField<
975 1,
976 0x1,
977 1,
978 0,
979 adansa0::Ansa1,
980 adansa0::Ansa1,
981 Adansa0_SPEC,
982 crate::common::RW,
983 > {
984 crate::common::RegisterField::<
985 1,
986 0x1,
987 1,
988 0,
989 adansa0::Ansa1,
990 adansa0::Ansa1,
991 Adansa0_SPEC,
992 crate::common::RW,
993 >::from_register(self, 0)
994 }
995
996 #[doc = "A/D Conversion Channels Select"]
997 #[inline(always)]
998 pub fn ansa2(
999 self,
1000 ) -> crate::common::RegisterField<
1001 2,
1002 0x1,
1003 1,
1004 0,
1005 adansa0::Ansa2,
1006 adansa0::Ansa2,
1007 Adansa0_SPEC,
1008 crate::common::RW,
1009 > {
1010 crate::common::RegisterField::<
1011 2,
1012 0x1,
1013 1,
1014 0,
1015 adansa0::Ansa2,
1016 adansa0::Ansa2,
1017 Adansa0_SPEC,
1018 crate::common::RW,
1019 >::from_register(self, 0)
1020 }
1021
1022 #[doc = "A/D Conversion Channels Select"]
1023 #[inline(always)]
1024 pub fn ansa05(
1025 self,
1026 ) -> crate::common::RegisterField<
1027 5,
1028 0x1,
1029 1,
1030 0,
1031 adansa0::Ansa05,
1032 adansa0::Ansa05,
1033 Adansa0_SPEC,
1034 crate::common::RW,
1035 > {
1036 crate::common::RegisterField::<
1037 5,
1038 0x1,
1039 1,
1040 0,
1041 adansa0::Ansa05,
1042 adansa0::Ansa05,
1043 Adansa0_SPEC,
1044 crate::common::RW,
1045 >::from_register(self, 0)
1046 }
1047
1048 #[doc = "A/D Conversion Channels Select"]
1049 #[inline(always)]
1050 pub fn ansa06(
1051 self,
1052 ) -> crate::common::RegisterField<
1053 6,
1054 0x1,
1055 1,
1056 0,
1057 adansa0::Ansa06,
1058 adansa0::Ansa06,
1059 Adansa0_SPEC,
1060 crate::common::RW,
1061 > {
1062 crate::common::RegisterField::<
1063 6,
1064 0x1,
1065 1,
1066 0,
1067 adansa0::Ansa06,
1068 adansa0::Ansa06,
1069 Adansa0_SPEC,
1070 crate::common::RW,
1071 >::from_register(self, 0)
1072 }
1073
1074 #[doc = "A/D Conversion Channels Select"]
1075 #[inline(always)]
1076 pub fn ansa07(
1077 self,
1078 ) -> crate::common::RegisterField<
1079 7,
1080 0x1,
1081 1,
1082 0,
1083 adansa0::Ansa07,
1084 adansa0::Ansa07,
1085 Adansa0_SPEC,
1086 crate::common::RW,
1087 > {
1088 crate::common::RegisterField::<
1089 7,
1090 0x1,
1091 1,
1092 0,
1093 adansa0::Ansa07,
1094 adansa0::Ansa07,
1095 Adansa0_SPEC,
1096 crate::common::RW,
1097 >::from_register(self, 0)
1098 }
1099
1100 #[doc = "A/D Conversion Channels Select"]
1101 #[inline(always)]
1102 pub fn ansa08(
1103 self,
1104 ) -> crate::common::RegisterField<
1105 8,
1106 0x1,
1107 1,
1108 0,
1109 adansa0::Ansa08,
1110 adansa0::Ansa08,
1111 Adansa0_SPEC,
1112 crate::common::RW,
1113 > {
1114 crate::common::RegisterField::<
1115 8,
1116 0x1,
1117 1,
1118 0,
1119 adansa0::Ansa08,
1120 adansa0::Ansa08,
1121 Adansa0_SPEC,
1122 crate::common::RW,
1123 >::from_register(self, 0)
1124 }
1125
1126 #[doc = "A/D Conversion Channels Select"]
1127 #[inline(always)]
1128 pub fn ansa09(
1129 self,
1130 ) -> crate::common::RegisterField<
1131 9,
1132 0x1,
1133 1,
1134 0,
1135 adansa0::Ansa09,
1136 adansa0::Ansa09,
1137 Adansa0_SPEC,
1138 crate::common::RW,
1139 > {
1140 crate::common::RegisterField::<
1141 9,
1142 0x1,
1143 1,
1144 0,
1145 adansa0::Ansa09,
1146 adansa0::Ansa09,
1147 Adansa0_SPEC,
1148 crate::common::RW,
1149 >::from_register(self, 0)
1150 }
1151
1152 #[doc = "A/D Conversion Channels Select"]
1153 #[inline(always)]
1154 pub fn ansa10(
1155 self,
1156 ) -> crate::common::RegisterField<
1157 10,
1158 0x1,
1159 1,
1160 0,
1161 adansa0::Ansa10,
1162 adansa0::Ansa10,
1163 Adansa0_SPEC,
1164 crate::common::RW,
1165 > {
1166 crate::common::RegisterField::<
1167 10,
1168 0x1,
1169 1,
1170 0,
1171 adansa0::Ansa10,
1172 adansa0::Ansa10,
1173 Adansa0_SPEC,
1174 crate::common::RW,
1175 >::from_register(self, 0)
1176 }
1177}
1178impl ::core::default::Default for Adansa0 {
1179 #[inline(always)]
1180 fn default() -> Adansa0 {
1181 <crate::RegValueT<Adansa0_SPEC> as RegisterValue<_>>::new(0)
1182 }
1183}
1184pub mod adansa0 {
1185
1186 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1187 pub struct Ansa0_SPEC;
1188 pub type Ansa0 = crate::EnumBitfieldStruct<u8, Ansa0_SPEC>;
1189 impl Ansa0 {
1190 #[doc = "Do not select associated input channel."]
1191 pub const _0: Self = Self::new(0);
1192
1193 #[doc = "Select associated input channel."]
1194 pub const _1: Self = Self::new(1);
1195 }
1196 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1197 pub struct Ansa1_SPEC;
1198 pub type Ansa1 = crate::EnumBitfieldStruct<u8, Ansa1_SPEC>;
1199 impl Ansa1 {
1200 #[doc = "Do not select associated input channel."]
1201 pub const _0: Self = Self::new(0);
1202
1203 #[doc = "Select associated input channel."]
1204 pub const _1: Self = Self::new(1);
1205 }
1206 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1207 pub struct Ansa2_SPEC;
1208 pub type Ansa2 = crate::EnumBitfieldStruct<u8, Ansa2_SPEC>;
1209 impl Ansa2 {
1210 #[doc = "Do not select associated input channel."]
1211 pub const _0: Self = Self::new(0);
1212
1213 #[doc = "Select associated input channel."]
1214 pub const _1: Self = Self::new(1);
1215 }
1216 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1217 pub struct Ansa05_SPEC;
1218 pub type Ansa05 = crate::EnumBitfieldStruct<u8, Ansa05_SPEC>;
1219 impl Ansa05 {
1220 #[doc = "Do not select associated input channel."]
1221 pub const _0: Self = Self::new(0);
1222
1223 #[doc = "Select associated input channel."]
1224 pub const _1: Self = Self::new(1);
1225 }
1226 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1227 pub struct Ansa06_SPEC;
1228 pub type Ansa06 = crate::EnumBitfieldStruct<u8, Ansa06_SPEC>;
1229 impl Ansa06 {
1230 #[doc = "Do not select associated input channel."]
1231 pub const _0: Self = Self::new(0);
1232
1233 #[doc = "Select associated input channel."]
1234 pub const _1: Self = Self::new(1);
1235 }
1236 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1237 pub struct Ansa07_SPEC;
1238 pub type Ansa07 = crate::EnumBitfieldStruct<u8, Ansa07_SPEC>;
1239 impl Ansa07 {
1240 #[doc = "Do not select associated input channel."]
1241 pub const _0: Self = Self::new(0);
1242
1243 #[doc = "Select associated input channel."]
1244 pub const _1: Self = Self::new(1);
1245 }
1246 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1247 pub struct Ansa08_SPEC;
1248 pub type Ansa08 = crate::EnumBitfieldStruct<u8, Ansa08_SPEC>;
1249 impl Ansa08 {
1250 #[doc = "Do not select associated input channel."]
1251 pub const _0: Self = Self::new(0);
1252
1253 #[doc = "Select associated input channel."]
1254 pub const _1: Self = Self::new(1);
1255 }
1256 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1257 pub struct Ansa09_SPEC;
1258 pub type Ansa09 = crate::EnumBitfieldStruct<u8, Ansa09_SPEC>;
1259 impl Ansa09 {
1260 #[doc = "Do not select associated input channel."]
1261 pub const _0: Self = Self::new(0);
1262
1263 #[doc = "Select associated input channel."]
1264 pub const _1: Self = Self::new(1);
1265 }
1266 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1267 pub struct Ansa10_SPEC;
1268 pub type Ansa10 = crate::EnumBitfieldStruct<u8, Ansa10_SPEC>;
1269 impl Ansa10 {
1270 #[doc = "Do not select associated input channel."]
1271 pub const _0: Self = Self::new(0);
1272
1273 #[doc = "Select associated input channel."]
1274 pub const _1: Self = Self::new(1);
1275 }
1276}
1277#[doc(hidden)]
1278#[derive(Copy, Clone, Eq, PartialEq)]
1279pub struct Adansa1_SPEC;
1280impl crate::sealed::RegSpec for Adansa1_SPEC {
1281 type DataType = u16;
1282}
1283
1284#[doc = "A/D Channel Select Register A1"]
1285pub type Adansa1 = crate::RegValueT<Adansa1_SPEC>;
1286
1287impl Adansa1 {
1288 #[doc = "A/D Conversion Channels Select"]
1289 #[inline(always)]
1290 pub fn ansa19(
1291 self,
1292 ) -> crate::common::RegisterField<
1293 3,
1294 0x1,
1295 1,
1296 0,
1297 adansa1::Ansa19,
1298 adansa1::Ansa19,
1299 Adansa1_SPEC,
1300 crate::common::RW,
1301 > {
1302 crate::common::RegisterField::<
1303 3,
1304 0x1,
1305 1,
1306 0,
1307 adansa1::Ansa19,
1308 adansa1::Ansa19,
1309 Adansa1_SPEC,
1310 crate::common::RW,
1311 >::from_register(self, 0)
1312 }
1313
1314 #[doc = "A/D Conversion Channels Select"]
1315 #[inline(always)]
1316 pub fn ansa20(
1317 self,
1318 ) -> crate::common::RegisterField<
1319 4,
1320 0x1,
1321 1,
1322 0,
1323 adansa1::Ansa20,
1324 adansa1::Ansa20,
1325 Adansa1_SPEC,
1326 crate::common::RW,
1327 > {
1328 crate::common::RegisterField::<
1329 4,
1330 0x1,
1331 1,
1332 0,
1333 adansa1::Ansa20,
1334 adansa1::Ansa20,
1335 Adansa1_SPEC,
1336 crate::common::RW,
1337 >::from_register(self, 0)
1338 }
1339
1340 #[doc = "A/D Conversion Channels Select"]
1341 #[inline(always)]
1342 pub fn ansa21(
1343 self,
1344 ) -> crate::common::RegisterField<
1345 5,
1346 0x1,
1347 1,
1348 0,
1349 adansa1::Ansa21,
1350 adansa1::Ansa21,
1351 Adansa1_SPEC,
1352 crate::common::RW,
1353 > {
1354 crate::common::RegisterField::<
1355 5,
1356 0x1,
1357 1,
1358 0,
1359 adansa1::Ansa21,
1360 adansa1::Ansa21,
1361 Adansa1_SPEC,
1362 crate::common::RW,
1363 >::from_register(self, 0)
1364 }
1365
1366 #[doc = "A/D Conversion Channels Select"]
1367 #[inline(always)]
1368 pub fn ansa22(
1369 self,
1370 ) -> crate::common::RegisterField<
1371 6,
1372 0x1,
1373 1,
1374 0,
1375 adansa1::Ansa22,
1376 adansa1::Ansa22,
1377 Adansa1_SPEC,
1378 crate::common::RW,
1379 > {
1380 crate::common::RegisterField::<
1381 6,
1382 0x1,
1383 1,
1384 0,
1385 adansa1::Ansa22,
1386 adansa1::Ansa22,
1387 Adansa1_SPEC,
1388 crate::common::RW,
1389 >::from_register(self, 0)
1390 }
1391}
1392impl ::core::default::Default for Adansa1 {
1393 #[inline(always)]
1394 fn default() -> Adansa1 {
1395 <crate::RegValueT<Adansa1_SPEC> as RegisterValue<_>>::new(0)
1396 }
1397}
1398pub mod adansa1 {
1399
1400 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1401 pub struct Ansa19_SPEC;
1402 pub type Ansa19 = crate::EnumBitfieldStruct<u8, Ansa19_SPEC>;
1403 impl Ansa19 {
1404 #[doc = "Do not select associated input channel."]
1405 pub const _0: Self = Self::new(0);
1406
1407 #[doc = "Select associated input channel."]
1408 pub const _1: Self = Self::new(1);
1409 }
1410 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1411 pub struct Ansa20_SPEC;
1412 pub type Ansa20 = crate::EnumBitfieldStruct<u8, Ansa20_SPEC>;
1413 impl Ansa20 {
1414 #[doc = "Do not select associated input channel."]
1415 pub const _0: Self = Self::new(0);
1416
1417 #[doc = "Select associated input channel."]
1418 pub const _1: Self = Self::new(1);
1419 }
1420 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1421 pub struct Ansa21_SPEC;
1422 pub type Ansa21 = crate::EnumBitfieldStruct<u8, Ansa21_SPEC>;
1423 impl Ansa21 {
1424 #[doc = "Do not select associated input channel."]
1425 pub const _0: Self = Self::new(0);
1426
1427 #[doc = "Select associated input channel."]
1428 pub const _1: Self = Self::new(1);
1429 }
1430 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1431 pub struct Ansa22_SPEC;
1432 pub type Ansa22 = crate::EnumBitfieldStruct<u8, Ansa22_SPEC>;
1433 impl Ansa22 {
1434 #[doc = "Do not select associated input channel."]
1435 pub const _0: Self = Self::new(0);
1436
1437 #[doc = "Select associated input channel."]
1438 pub const _1: Self = Self::new(1);
1439 }
1440}
1441#[doc(hidden)]
1442#[derive(Copy, Clone, Eq, PartialEq)]
1443pub struct Adads0_SPEC;
1444impl crate::sealed::RegSpec for Adads0_SPEC {
1445 type DataType = u16;
1446}
1447
1448#[doc = "A/D-Converted Value Addition/Average Channel Select Register 0"]
1449pub type Adads0 = crate::RegValueT<Adads0_SPEC>;
1450
1451impl Adads0 {
1452 #[doc = "A/D-Converted Value Addition/Average Channel Select"]
1453 #[inline(always)]
1454 pub fn ads0(
1455 self,
1456 ) -> crate::common::RegisterField<
1457 0,
1458 0x1,
1459 1,
1460 0,
1461 adads0::Ads0,
1462 adads0::Ads0,
1463 Adads0_SPEC,
1464 crate::common::RW,
1465 > {
1466 crate::common::RegisterField::<
1467 0,
1468 0x1,
1469 1,
1470 0,
1471 adads0::Ads0,
1472 adads0::Ads0,
1473 Adads0_SPEC,
1474 crate::common::RW,
1475 >::from_register(self, 0)
1476 }
1477
1478 #[doc = "A/D-Converted Value Addition/Average Channel Select"]
1479 #[inline(always)]
1480 pub fn ads1(
1481 self,
1482 ) -> crate::common::RegisterField<
1483 1,
1484 0x1,
1485 1,
1486 0,
1487 adads0::Ads1,
1488 adads0::Ads1,
1489 Adads0_SPEC,
1490 crate::common::RW,
1491 > {
1492 crate::common::RegisterField::<
1493 1,
1494 0x1,
1495 1,
1496 0,
1497 adads0::Ads1,
1498 adads0::Ads1,
1499 Adads0_SPEC,
1500 crate::common::RW,
1501 >::from_register(self, 0)
1502 }
1503
1504 #[doc = "A/D-Converted Value Addition/Average Channel Select"]
1505 #[inline(always)]
1506 pub fn ads2(
1507 self,
1508 ) -> crate::common::RegisterField<
1509 2,
1510 0x1,
1511 1,
1512 0,
1513 adads0::Ads2,
1514 adads0::Ads2,
1515 Adads0_SPEC,
1516 crate::common::RW,
1517 > {
1518 crate::common::RegisterField::<
1519 2,
1520 0x1,
1521 1,
1522 0,
1523 adads0::Ads2,
1524 adads0::Ads2,
1525 Adads0_SPEC,
1526 crate::common::RW,
1527 >::from_register(self, 0)
1528 }
1529
1530 #[doc = "A/D-Converted Value Addition/Average Channel Select"]
1531 #[inline(always)]
1532 pub fn ads05(
1533 self,
1534 ) -> crate::common::RegisterField<
1535 5,
1536 0x1,
1537 1,
1538 0,
1539 adads0::Ads05,
1540 adads0::Ads05,
1541 Adads0_SPEC,
1542 crate::common::RW,
1543 > {
1544 crate::common::RegisterField::<
1545 5,
1546 0x1,
1547 1,
1548 0,
1549 adads0::Ads05,
1550 adads0::Ads05,
1551 Adads0_SPEC,
1552 crate::common::RW,
1553 >::from_register(self, 0)
1554 }
1555
1556 #[doc = "A/D-Converted Value Addition/Average Channel Select"]
1557 #[inline(always)]
1558 pub fn ads06(
1559 self,
1560 ) -> crate::common::RegisterField<
1561 6,
1562 0x1,
1563 1,
1564 0,
1565 adads0::Ads06,
1566 adads0::Ads06,
1567 Adads0_SPEC,
1568 crate::common::RW,
1569 > {
1570 crate::common::RegisterField::<
1571 6,
1572 0x1,
1573 1,
1574 0,
1575 adads0::Ads06,
1576 adads0::Ads06,
1577 Adads0_SPEC,
1578 crate::common::RW,
1579 >::from_register(self, 0)
1580 }
1581
1582 #[doc = "A/D-Converted Value Addition/Average Channel Select"]
1583 #[inline(always)]
1584 pub fn ads07(
1585 self,
1586 ) -> crate::common::RegisterField<
1587 7,
1588 0x1,
1589 1,
1590 0,
1591 adads0::Ads07,
1592 adads0::Ads07,
1593 Adads0_SPEC,
1594 crate::common::RW,
1595 > {
1596 crate::common::RegisterField::<
1597 7,
1598 0x1,
1599 1,
1600 0,
1601 adads0::Ads07,
1602 adads0::Ads07,
1603 Adads0_SPEC,
1604 crate::common::RW,
1605 >::from_register(self, 0)
1606 }
1607
1608 #[doc = "A/D-Converted Value Addition/Average Channel Select"]
1609 #[inline(always)]
1610 pub fn ads08(
1611 self,
1612 ) -> crate::common::RegisterField<
1613 8,
1614 0x1,
1615 1,
1616 0,
1617 adads0::Ads08,
1618 adads0::Ads08,
1619 Adads0_SPEC,
1620 crate::common::RW,
1621 > {
1622 crate::common::RegisterField::<
1623 8,
1624 0x1,
1625 1,
1626 0,
1627 adads0::Ads08,
1628 adads0::Ads08,
1629 Adads0_SPEC,
1630 crate::common::RW,
1631 >::from_register(self, 0)
1632 }
1633
1634 #[doc = "A/D-Converted Value Addition/Average Channel Select"]
1635 #[inline(always)]
1636 pub fn ads09(
1637 self,
1638 ) -> crate::common::RegisterField<
1639 9,
1640 0x1,
1641 1,
1642 0,
1643 adads0::Ads09,
1644 adads0::Ads09,
1645 Adads0_SPEC,
1646 crate::common::RW,
1647 > {
1648 crate::common::RegisterField::<
1649 9,
1650 0x1,
1651 1,
1652 0,
1653 adads0::Ads09,
1654 adads0::Ads09,
1655 Adads0_SPEC,
1656 crate::common::RW,
1657 >::from_register(self, 0)
1658 }
1659
1660 #[doc = "A/D-Converted Value Addition/Average Channel Select"]
1661 #[inline(always)]
1662 pub fn ads10(
1663 self,
1664 ) -> crate::common::RegisterField<
1665 10,
1666 0x1,
1667 1,
1668 0,
1669 adads0::Ads10,
1670 adads0::Ads10,
1671 Adads0_SPEC,
1672 crate::common::RW,
1673 > {
1674 crate::common::RegisterField::<
1675 10,
1676 0x1,
1677 1,
1678 0,
1679 adads0::Ads10,
1680 adads0::Ads10,
1681 Adads0_SPEC,
1682 crate::common::RW,
1683 >::from_register(self, 0)
1684 }
1685}
1686impl ::core::default::Default for Adads0 {
1687 #[inline(always)]
1688 fn default() -> Adads0 {
1689 <crate::RegValueT<Adads0_SPEC> as RegisterValue<_>>::new(0)
1690 }
1691}
1692pub mod adads0 {
1693
1694 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1695 pub struct Ads0_SPEC;
1696 pub type Ads0 = crate::EnumBitfieldStruct<u8, Ads0_SPEC>;
1697 impl Ads0 {
1698 #[doc = "Do not select associated input channel."]
1699 pub const _0: Self = Self::new(0);
1700
1701 #[doc = "Select associated input channel."]
1702 pub const _1: Self = Self::new(1);
1703 }
1704 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1705 pub struct Ads1_SPEC;
1706 pub type Ads1 = crate::EnumBitfieldStruct<u8, Ads1_SPEC>;
1707 impl Ads1 {
1708 #[doc = "Do not select associated input channel."]
1709 pub const _0: Self = Self::new(0);
1710
1711 #[doc = "Select associated input channel."]
1712 pub const _1: Self = Self::new(1);
1713 }
1714 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1715 pub struct Ads2_SPEC;
1716 pub type Ads2 = crate::EnumBitfieldStruct<u8, Ads2_SPEC>;
1717 impl Ads2 {
1718 #[doc = "Do not select associated input channel."]
1719 pub const _0: Self = Self::new(0);
1720
1721 #[doc = "Select associated input channel."]
1722 pub const _1: Self = Self::new(1);
1723 }
1724 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1725 pub struct Ads05_SPEC;
1726 pub type Ads05 = crate::EnumBitfieldStruct<u8, Ads05_SPEC>;
1727 impl Ads05 {
1728 #[doc = "Do not select associated input channel."]
1729 pub const _0: Self = Self::new(0);
1730
1731 #[doc = "Select associated input channel."]
1732 pub const _1: Self = Self::new(1);
1733 }
1734 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1735 pub struct Ads06_SPEC;
1736 pub type Ads06 = crate::EnumBitfieldStruct<u8, Ads06_SPEC>;
1737 impl Ads06 {
1738 #[doc = "Do not select associated input channel."]
1739 pub const _0: Self = Self::new(0);
1740
1741 #[doc = "Select associated input channel."]
1742 pub const _1: Self = Self::new(1);
1743 }
1744 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1745 pub struct Ads07_SPEC;
1746 pub type Ads07 = crate::EnumBitfieldStruct<u8, Ads07_SPEC>;
1747 impl Ads07 {
1748 #[doc = "Do not select associated input channel."]
1749 pub const _0: Self = Self::new(0);
1750
1751 #[doc = "Select associated input channel."]
1752 pub const _1: Self = Self::new(1);
1753 }
1754 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1755 pub struct Ads08_SPEC;
1756 pub type Ads08 = crate::EnumBitfieldStruct<u8, Ads08_SPEC>;
1757 impl Ads08 {
1758 #[doc = "Do not select associated input channel."]
1759 pub const _0: Self = Self::new(0);
1760
1761 #[doc = "Select associated input channel."]
1762 pub const _1: Self = Self::new(1);
1763 }
1764 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1765 pub struct Ads09_SPEC;
1766 pub type Ads09 = crate::EnumBitfieldStruct<u8, Ads09_SPEC>;
1767 impl Ads09 {
1768 #[doc = "Do not select associated input channel."]
1769 pub const _0: Self = Self::new(0);
1770
1771 #[doc = "Select associated input channel."]
1772 pub const _1: Self = Self::new(1);
1773 }
1774 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1775 pub struct Ads10_SPEC;
1776 pub type Ads10 = crate::EnumBitfieldStruct<u8, Ads10_SPEC>;
1777 impl Ads10 {
1778 #[doc = "Do not select associated input channel."]
1779 pub const _0: Self = Self::new(0);
1780
1781 #[doc = "Select associated input channel."]
1782 pub const _1: Self = Self::new(1);
1783 }
1784}
1785#[doc(hidden)]
1786#[derive(Copy, Clone, Eq, PartialEq)]
1787pub struct Adads1_SPEC;
1788impl crate::sealed::RegSpec for Adads1_SPEC {
1789 type DataType = u16;
1790}
1791
1792#[doc = "A/D-Converted Value Addition/Average Channel Select Register 1"]
1793pub type Adads1 = crate::RegValueT<Adads1_SPEC>;
1794
1795impl Adads1 {
1796 #[doc = "A/D-Converted Value Addition/Average Channel Select"]
1797 #[inline(always)]
1798 pub fn ads19(
1799 self,
1800 ) -> crate::common::RegisterField<
1801 3,
1802 0x1,
1803 1,
1804 0,
1805 adads1::Ads19,
1806 adads1::Ads19,
1807 Adads1_SPEC,
1808 crate::common::RW,
1809 > {
1810 crate::common::RegisterField::<
1811 3,
1812 0x1,
1813 1,
1814 0,
1815 adads1::Ads19,
1816 adads1::Ads19,
1817 Adads1_SPEC,
1818 crate::common::RW,
1819 >::from_register(self, 0)
1820 }
1821
1822 #[doc = "A/D-Converted Value Addition/Average Channel Select"]
1823 #[inline(always)]
1824 pub fn ads20(
1825 self,
1826 ) -> crate::common::RegisterField<
1827 4,
1828 0x1,
1829 1,
1830 0,
1831 adads1::Ads20,
1832 adads1::Ads20,
1833 Adads1_SPEC,
1834 crate::common::RW,
1835 > {
1836 crate::common::RegisterField::<
1837 4,
1838 0x1,
1839 1,
1840 0,
1841 adads1::Ads20,
1842 adads1::Ads20,
1843 Adads1_SPEC,
1844 crate::common::RW,
1845 >::from_register(self, 0)
1846 }
1847
1848 #[doc = "A/D-Converted Value Addition/Average Channel Select"]
1849 #[inline(always)]
1850 pub fn ads21(
1851 self,
1852 ) -> crate::common::RegisterField<
1853 5,
1854 0x1,
1855 1,
1856 0,
1857 adads1::Ads21,
1858 adads1::Ads21,
1859 Adads1_SPEC,
1860 crate::common::RW,
1861 > {
1862 crate::common::RegisterField::<
1863 5,
1864 0x1,
1865 1,
1866 0,
1867 adads1::Ads21,
1868 adads1::Ads21,
1869 Adads1_SPEC,
1870 crate::common::RW,
1871 >::from_register(self, 0)
1872 }
1873
1874 #[doc = "A/D-Converted Value Addition/Average Channel Select"]
1875 #[inline(always)]
1876 pub fn ads22(
1877 self,
1878 ) -> crate::common::RegisterField<
1879 6,
1880 0x1,
1881 1,
1882 0,
1883 adads1::Ads22,
1884 adads1::Ads22,
1885 Adads1_SPEC,
1886 crate::common::RW,
1887 > {
1888 crate::common::RegisterField::<
1889 6,
1890 0x1,
1891 1,
1892 0,
1893 adads1::Ads22,
1894 adads1::Ads22,
1895 Adads1_SPEC,
1896 crate::common::RW,
1897 >::from_register(self, 0)
1898 }
1899}
1900impl ::core::default::Default for Adads1 {
1901 #[inline(always)]
1902 fn default() -> Adads1 {
1903 <crate::RegValueT<Adads1_SPEC> as RegisterValue<_>>::new(0)
1904 }
1905}
1906pub mod adads1 {
1907
1908 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1909 pub struct Ads19_SPEC;
1910 pub type Ads19 = crate::EnumBitfieldStruct<u8, Ads19_SPEC>;
1911 impl Ads19 {
1912 #[doc = "Do not select associated input channel."]
1913 pub const _0: Self = Self::new(0);
1914
1915 #[doc = "Select associated input channel."]
1916 pub const _1: Self = Self::new(1);
1917 }
1918 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1919 pub struct Ads20_SPEC;
1920 pub type Ads20 = crate::EnumBitfieldStruct<u8, Ads20_SPEC>;
1921 impl Ads20 {
1922 #[doc = "Do not select associated input channel."]
1923 pub const _0: Self = Self::new(0);
1924
1925 #[doc = "Select associated input channel."]
1926 pub const _1: Self = Self::new(1);
1927 }
1928 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1929 pub struct Ads21_SPEC;
1930 pub type Ads21 = crate::EnumBitfieldStruct<u8, Ads21_SPEC>;
1931 impl Ads21 {
1932 #[doc = "Do not select associated input channel."]
1933 pub const _0: Self = Self::new(0);
1934
1935 #[doc = "Select associated input channel."]
1936 pub const _1: Self = Self::new(1);
1937 }
1938 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1939 pub struct Ads22_SPEC;
1940 pub type Ads22 = crate::EnumBitfieldStruct<u8, Ads22_SPEC>;
1941 impl Ads22 {
1942 #[doc = "Do not select associated input channel."]
1943 pub const _0: Self = Self::new(0);
1944
1945 #[doc = "Select associated input channel."]
1946 pub const _1: Self = Self::new(1);
1947 }
1948}
1949#[doc(hidden)]
1950#[derive(Copy, Clone, Eq, PartialEq)]
1951pub struct Adadc_SPEC;
1952impl crate::sealed::RegSpec for Adadc_SPEC {
1953 type DataType = u8;
1954}
1955
1956#[doc = "A/D-Converted Value Addition/Average Count Select Register"]
1957pub type Adadc = crate::RegValueT<Adadc_SPEC>;
1958
1959impl Adadc {
1960 #[doc = "Addition/Average Count Select"]
1961 #[inline(always)]
1962 pub fn adc(
1963 self,
1964 ) -> crate::common::RegisterField<
1965 0,
1966 0x7,
1967 1,
1968 0,
1969 adadc::Adc,
1970 adadc::Adc,
1971 Adadc_SPEC,
1972 crate::common::RW,
1973 > {
1974 crate::common::RegisterField::<
1975 0,
1976 0x7,
1977 1,
1978 0,
1979 adadc::Adc,
1980 adadc::Adc,
1981 Adadc_SPEC,
1982 crate::common::RW,
1983 >::from_register(self, 0)
1984 }
1985
1986 #[doc = "Average Mode Select"]
1987 #[inline(always)]
1988 pub fn avee(
1989 self,
1990 ) -> crate::common::RegisterField<
1991 7,
1992 0x1,
1993 1,
1994 0,
1995 adadc::Avee,
1996 adadc::Avee,
1997 Adadc_SPEC,
1998 crate::common::RW,
1999 > {
2000 crate::common::RegisterField::<
2001 7,
2002 0x1,
2003 1,
2004 0,
2005 adadc::Avee,
2006 adadc::Avee,
2007 Adadc_SPEC,
2008 crate::common::RW,
2009 >::from_register(self, 0)
2010 }
2011}
2012impl ::core::default::Default for Adadc {
2013 #[inline(always)]
2014 fn default() -> Adadc {
2015 <crate::RegValueT<Adadc_SPEC> as RegisterValue<_>>::new(0)
2016 }
2017}
2018pub mod adadc {
2019
2020 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2021 pub struct Adc_SPEC;
2022 pub type Adc = crate::EnumBitfieldStruct<u8, Adc_SPEC>;
2023 impl Adc {
2024 #[doc = "1-time conversion (no addition, same as normal conversion)"]
2025 pub const _000: Self = Self::new(0);
2026
2027 #[doc = "2-time conversion (1 addition)"]
2028 pub const _001: Self = Self::new(1);
2029
2030 #[doc = "3-time conversion (2 additions)"]
2031 pub const _010: Self = Self::new(2);
2032
2033 #[doc = "4-time conversion (3 additions)"]
2034 pub const _011: Self = Self::new(3);
2035
2036 #[doc = "16-time conversion (15 additions)"]
2037 pub const _101: Self = Self::new(5);
2038 }
2039 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2040 pub struct Avee_SPEC;
2041 pub type Avee = crate::EnumBitfieldStruct<u8, Avee_SPEC>;
2042 impl Avee {
2043 #[doc = "Enable addition mode"]
2044 pub const _0: Self = Self::new(0);
2045
2046 #[doc = "Enable average mode"]
2047 pub const _1: Self = Self::new(1);
2048 }
2049}
2050#[doc(hidden)]
2051#[derive(Copy, Clone, Eq, PartialEq)]
2052pub struct Adcer_SPEC;
2053impl crate::sealed::RegSpec for Adcer_SPEC {
2054 type DataType = u16;
2055}
2056
2057#[doc = "A/D Control Extended Register"]
2058pub type Adcer = crate::RegValueT<Adcer_SPEC>;
2059
2060impl Adcer {
2061 #[doc = "A/D Data Register Automatic Clearing Enable"]
2062 #[inline(always)]
2063 pub fn ace(
2064 self,
2065 ) -> crate::common::RegisterField<
2066 5,
2067 0x1,
2068 1,
2069 0,
2070 adcer::Ace,
2071 adcer::Ace,
2072 Adcer_SPEC,
2073 crate::common::RW,
2074 > {
2075 crate::common::RegisterField::<
2076 5,
2077 0x1,
2078 1,
2079 0,
2080 adcer::Ace,
2081 adcer::Ace,
2082 Adcer_SPEC,
2083 crate::common::RW,
2084 >::from_register(self, 0)
2085 }
2086
2087 #[doc = "Self-Diagnosis Conversion Voltage Select"]
2088 #[inline(always)]
2089 pub fn diagval(
2090 self,
2091 ) -> crate::common::RegisterField<
2092 8,
2093 0x3,
2094 1,
2095 0,
2096 adcer::Diagval,
2097 adcer::Diagval,
2098 Adcer_SPEC,
2099 crate::common::RW,
2100 > {
2101 crate::common::RegisterField::<
2102 8,
2103 0x3,
2104 1,
2105 0,
2106 adcer::Diagval,
2107 adcer::Diagval,
2108 Adcer_SPEC,
2109 crate::common::RW,
2110 >::from_register(self, 0)
2111 }
2112
2113 #[doc = "Self-Diagnosis Mode Select"]
2114 #[inline(always)]
2115 pub fn diagld(
2116 self,
2117 ) -> crate::common::RegisterField<
2118 10,
2119 0x1,
2120 1,
2121 0,
2122 adcer::Diagld,
2123 adcer::Diagld,
2124 Adcer_SPEC,
2125 crate::common::RW,
2126 > {
2127 crate::common::RegisterField::<
2128 10,
2129 0x1,
2130 1,
2131 0,
2132 adcer::Diagld,
2133 adcer::Diagld,
2134 Adcer_SPEC,
2135 crate::common::RW,
2136 >::from_register(self, 0)
2137 }
2138
2139 #[doc = "Self-Diagnosis Enable"]
2140 #[inline(always)]
2141 pub fn diagm(
2142 self,
2143 ) -> crate::common::RegisterField<
2144 11,
2145 0x1,
2146 1,
2147 0,
2148 adcer::Diagm,
2149 adcer::Diagm,
2150 Adcer_SPEC,
2151 crate::common::RW,
2152 > {
2153 crate::common::RegisterField::<
2154 11,
2155 0x1,
2156 1,
2157 0,
2158 adcer::Diagm,
2159 adcer::Diagm,
2160 Adcer_SPEC,
2161 crate::common::RW,
2162 >::from_register(self, 0)
2163 }
2164
2165 #[doc = "A/D Data Register Format Select"]
2166 #[inline(always)]
2167 pub fn adrfmt(
2168 self,
2169 ) -> crate::common::RegisterField<
2170 15,
2171 0x1,
2172 1,
2173 0,
2174 adcer::Adrfmt,
2175 adcer::Adrfmt,
2176 Adcer_SPEC,
2177 crate::common::RW,
2178 > {
2179 crate::common::RegisterField::<
2180 15,
2181 0x1,
2182 1,
2183 0,
2184 adcer::Adrfmt,
2185 adcer::Adrfmt,
2186 Adcer_SPEC,
2187 crate::common::RW,
2188 >::from_register(self, 0)
2189 }
2190}
2191impl ::core::default::Default for Adcer {
2192 #[inline(always)]
2193 fn default() -> Adcer {
2194 <crate::RegValueT<Adcer_SPEC> as RegisterValue<_>>::new(0)
2195 }
2196}
2197pub mod adcer {
2198
2199 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2200 pub struct Ace_SPEC;
2201 pub type Ace = crate::EnumBitfieldStruct<u8, Ace_SPEC>;
2202 impl Ace {
2203 #[doc = "Disable automatic clearing"]
2204 pub const _0: Self = Self::new(0);
2205
2206 #[doc = "Enable automatic clearing"]
2207 pub const _1: Self = Self::new(1);
2208 }
2209 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2210 pub struct Diagval_SPEC;
2211 pub type Diagval = crate::EnumBitfieldStruct<u8, Diagval_SPEC>;
2212 impl Diagval {
2213 #[doc = "Setting prohibited when self-diagnosis is enabled"]
2214 pub const _00: Self = Self::new(0);
2215
2216 #[doc = "0 volts"]
2217 pub const _01: Self = Self::new(1);
2218
2219 #[doc = "Reference voltage × 1/2"]
2220 pub const _10: Self = Self::new(2);
2221
2222 #[doc = "Reference voltage"]
2223 pub const _11: Self = Self::new(3);
2224 }
2225 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2226 pub struct Diagld_SPEC;
2227 pub type Diagld = crate::EnumBitfieldStruct<u8, Diagld_SPEC>;
2228 impl Diagld {
2229 #[doc = "Select rotation mode for self-diagnosis voltage"]
2230 pub const _0: Self = Self::new(0);
2231
2232 #[doc = "Select mixed mode for self-diagnosis voltage"]
2233 pub const _1: Self = Self::new(1);
2234 }
2235 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2236 pub struct Diagm_SPEC;
2237 pub type Diagm = crate::EnumBitfieldStruct<u8, Diagm_SPEC>;
2238 impl Diagm {
2239 #[doc = "Disable ADC12 self-diagnosis"]
2240 pub const _0: Self = Self::new(0);
2241
2242 #[doc = "Enable ADC12 self-diagnosis"]
2243 pub const _1: Self = Self::new(1);
2244 }
2245 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2246 pub struct Adrfmt_SPEC;
2247 pub type Adrfmt = crate::EnumBitfieldStruct<u8, Adrfmt_SPEC>;
2248 impl Adrfmt {
2249 #[doc = "Select right-justified for the A/D data register format"]
2250 pub const _0: Self = Self::new(0);
2251
2252 #[doc = "Select left-justified for the A/D data register format"]
2253 pub const _1: Self = Self::new(1);
2254 }
2255}
2256#[doc(hidden)]
2257#[derive(Copy, Clone, Eq, PartialEq)]
2258pub struct Adstrgr_SPEC;
2259impl crate::sealed::RegSpec for Adstrgr_SPEC {
2260 type DataType = u16;
2261}
2262
2263#[doc = "A/D Conversion Start Trigger Select Register"]
2264pub type Adstrgr = crate::RegValueT<Adstrgr_SPEC>;
2265
2266impl Adstrgr {
2267 #[doc = "A/D Conversion Start Trigger Select for Group B"]
2268 #[inline(always)]
2269 pub fn trsb(
2270 self,
2271 ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, Adstrgr_SPEC, crate::common::RW> {
2272 crate::common::RegisterField::<0,0x3f,1,0,u8,u8,Adstrgr_SPEC,crate::common::RW>::from_register(self,0)
2273 }
2274
2275 #[doc = "A/D Conversion Start Trigger Select"]
2276 #[inline(always)]
2277 pub fn trsa(
2278 self,
2279 ) -> crate::common::RegisterField<8, 0x3f, 1, 0, u8, u8, Adstrgr_SPEC, crate::common::RW> {
2280 crate::common::RegisterField::<8,0x3f,1,0,u8,u8,Adstrgr_SPEC,crate::common::RW>::from_register(self,0)
2281 }
2282}
2283impl ::core::default::Default for Adstrgr {
2284 #[inline(always)]
2285 fn default() -> Adstrgr {
2286 <crate::RegValueT<Adstrgr_SPEC> as RegisterValue<_>>::new(0)
2287 }
2288}
2289
2290#[doc(hidden)]
2291#[derive(Copy, Clone, Eq, PartialEq)]
2292pub struct Adexicr_SPEC;
2293impl crate::sealed::RegSpec for Adexicr_SPEC {
2294 type DataType = u16;
2295}
2296
2297#[doc = "A/D Conversion Extended Input Control Registers"]
2298pub type Adexicr = crate::RegValueT<Adexicr_SPEC>;
2299
2300impl Adexicr {
2301 #[doc = "Temperature Sensor Output A/D-Converted Value Addition/Average Mode Select"]
2302 #[inline(always)]
2303 pub fn tssad(
2304 self,
2305 ) -> crate::common::RegisterField<
2306 0,
2307 0x1,
2308 1,
2309 0,
2310 adexicr::Tssad,
2311 adexicr::Tssad,
2312 Adexicr_SPEC,
2313 crate::common::RW,
2314 > {
2315 crate::common::RegisterField::<
2316 0,
2317 0x1,
2318 1,
2319 0,
2320 adexicr::Tssad,
2321 adexicr::Tssad,
2322 Adexicr_SPEC,
2323 crate::common::RW,
2324 >::from_register(self, 0)
2325 }
2326
2327 #[doc = "Internal Reference Voltage A/D-Converted Value Addition/Average Mode Select"]
2328 #[inline(always)]
2329 pub fn ocsad(
2330 self,
2331 ) -> crate::common::RegisterField<
2332 1,
2333 0x1,
2334 1,
2335 0,
2336 adexicr::Ocsad,
2337 adexicr::Ocsad,
2338 Adexicr_SPEC,
2339 crate::common::RW,
2340 > {
2341 crate::common::RegisterField::<
2342 1,
2343 0x1,
2344 1,
2345 0,
2346 adexicr::Ocsad,
2347 adexicr::Ocsad,
2348 Adexicr_SPEC,
2349 crate::common::RW,
2350 >::from_register(self, 0)
2351 }
2352
2353 #[doc = "Temperature Sensor Output A/D Conversion Select"]
2354 #[inline(always)]
2355 pub fn tssa(
2356 self,
2357 ) -> crate::common::RegisterField<
2358 8,
2359 0x1,
2360 1,
2361 0,
2362 adexicr::Tssa,
2363 adexicr::Tssa,
2364 Adexicr_SPEC,
2365 crate::common::RW,
2366 > {
2367 crate::common::RegisterField::<
2368 8,
2369 0x1,
2370 1,
2371 0,
2372 adexicr::Tssa,
2373 adexicr::Tssa,
2374 Adexicr_SPEC,
2375 crate::common::RW,
2376 >::from_register(self, 0)
2377 }
2378
2379 #[doc = "Internal Reference Voltage A/D Conversion Select"]
2380 #[inline(always)]
2381 pub fn ocsa(
2382 self,
2383 ) -> crate::common::RegisterField<
2384 9,
2385 0x1,
2386 1,
2387 0,
2388 adexicr::Ocsa,
2389 adexicr::Ocsa,
2390 Adexicr_SPEC,
2391 crate::common::RW,
2392 > {
2393 crate::common::RegisterField::<
2394 9,
2395 0x1,
2396 1,
2397 0,
2398 adexicr::Ocsa,
2399 adexicr::Ocsa,
2400 Adexicr_SPEC,
2401 crate::common::RW,
2402 >::from_register(self, 0)
2403 }
2404}
2405impl ::core::default::Default for Adexicr {
2406 #[inline(always)]
2407 fn default() -> Adexicr {
2408 <crate::RegValueT<Adexicr_SPEC> as RegisterValue<_>>::new(0)
2409 }
2410}
2411pub mod adexicr {
2412
2413 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2414 pub struct Tssad_SPEC;
2415 pub type Tssad = crate::EnumBitfieldStruct<u8, Tssad_SPEC>;
2416 impl Tssad {
2417 #[doc = "Do not select addition/average mode for temperature sensor output."]
2418 pub const _0: Self = Self::new(0);
2419
2420 #[doc = "Select addition/average mode for temperature sensor output."]
2421 pub const _1: Self = Self::new(1);
2422 }
2423 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2424 pub struct Ocsad_SPEC;
2425 pub type Ocsad = crate::EnumBitfieldStruct<u8, Ocsad_SPEC>;
2426 impl Ocsad {
2427 #[doc = "Do not select addition/average mode for internal reference voltage."]
2428 pub const _0: Self = Self::new(0);
2429
2430 #[doc = "Select addition/average mode for internal reference voltage."]
2431 pub const _1: Self = Self::new(1);
2432 }
2433 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2434 pub struct Tssa_SPEC;
2435 pub type Tssa = crate::EnumBitfieldStruct<u8, Tssa_SPEC>;
2436 impl Tssa {
2437 #[doc = "Disable A/D conversion of temperature sensor output"]
2438 pub const _0: Self = Self::new(0);
2439
2440 #[doc = "Enable A/D conversion of temperature sensor output"]
2441 pub const _1: Self = Self::new(1);
2442 }
2443 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2444 pub struct Ocsa_SPEC;
2445 pub type Ocsa = crate::EnumBitfieldStruct<u8, Ocsa_SPEC>;
2446 impl Ocsa {
2447 #[doc = "Disable A/D conversion of internal reference voltage"]
2448 pub const _0: Self = Self::new(0);
2449
2450 #[doc = "Enable A/D conversion of internal reference voltage"]
2451 pub const _1: Self = Self::new(1);
2452 }
2453}
2454#[doc(hidden)]
2455#[derive(Copy, Clone, Eq, PartialEq)]
2456pub struct Adansb0_SPEC;
2457impl crate::sealed::RegSpec for Adansb0_SPEC {
2458 type DataType = u16;
2459}
2460
2461#[doc = "A/D Channel Select Register B0"]
2462pub type Adansb0 = crate::RegValueT<Adansb0_SPEC>;
2463
2464impl Adansb0 {
2465 #[doc = "A/D Conversion Channels Select"]
2466 #[inline(always)]
2467 pub fn ansb0(
2468 self,
2469 ) -> crate::common::RegisterField<
2470 0,
2471 0x1,
2472 1,
2473 0,
2474 adansb0::Ansb0,
2475 adansb0::Ansb0,
2476 Adansb0_SPEC,
2477 crate::common::RW,
2478 > {
2479 crate::common::RegisterField::<
2480 0,
2481 0x1,
2482 1,
2483 0,
2484 adansb0::Ansb0,
2485 adansb0::Ansb0,
2486 Adansb0_SPEC,
2487 crate::common::RW,
2488 >::from_register(self, 0)
2489 }
2490
2491 #[doc = "A/D Conversion Channels Select"]
2492 #[inline(always)]
2493 pub fn ansb1(
2494 self,
2495 ) -> crate::common::RegisterField<
2496 1,
2497 0x1,
2498 1,
2499 0,
2500 adansb0::Ansb1,
2501 adansb0::Ansb1,
2502 Adansb0_SPEC,
2503 crate::common::RW,
2504 > {
2505 crate::common::RegisterField::<
2506 1,
2507 0x1,
2508 1,
2509 0,
2510 adansb0::Ansb1,
2511 adansb0::Ansb1,
2512 Adansb0_SPEC,
2513 crate::common::RW,
2514 >::from_register(self, 0)
2515 }
2516
2517 #[doc = "A/D Conversion Channels Select"]
2518 #[inline(always)]
2519 pub fn ansb2(
2520 self,
2521 ) -> crate::common::RegisterField<
2522 2,
2523 0x1,
2524 1,
2525 0,
2526 adansb0::Ansb2,
2527 adansb0::Ansb2,
2528 Adansb0_SPEC,
2529 crate::common::RW,
2530 > {
2531 crate::common::RegisterField::<
2532 2,
2533 0x1,
2534 1,
2535 0,
2536 adansb0::Ansb2,
2537 adansb0::Ansb2,
2538 Adansb0_SPEC,
2539 crate::common::RW,
2540 >::from_register(self, 0)
2541 }
2542
2543 #[doc = "A/D Conversion Channels Select"]
2544 #[inline(always)]
2545 pub fn ansb05(
2546 self,
2547 ) -> crate::common::RegisterField<
2548 5,
2549 0x1,
2550 1,
2551 0,
2552 adansb0::Ansb05,
2553 adansb0::Ansb05,
2554 Adansb0_SPEC,
2555 crate::common::RW,
2556 > {
2557 crate::common::RegisterField::<
2558 5,
2559 0x1,
2560 1,
2561 0,
2562 adansb0::Ansb05,
2563 adansb0::Ansb05,
2564 Adansb0_SPEC,
2565 crate::common::RW,
2566 >::from_register(self, 0)
2567 }
2568
2569 #[doc = "A/D Conversion Channels Select"]
2570 #[inline(always)]
2571 pub fn ansb06(
2572 self,
2573 ) -> crate::common::RegisterField<
2574 6,
2575 0x1,
2576 1,
2577 0,
2578 adansb0::Ansb06,
2579 adansb0::Ansb06,
2580 Adansb0_SPEC,
2581 crate::common::RW,
2582 > {
2583 crate::common::RegisterField::<
2584 6,
2585 0x1,
2586 1,
2587 0,
2588 adansb0::Ansb06,
2589 adansb0::Ansb06,
2590 Adansb0_SPEC,
2591 crate::common::RW,
2592 >::from_register(self, 0)
2593 }
2594
2595 #[doc = "A/D Conversion Channels Select"]
2596 #[inline(always)]
2597 pub fn ansb07(
2598 self,
2599 ) -> crate::common::RegisterField<
2600 7,
2601 0x1,
2602 1,
2603 0,
2604 adansb0::Ansb07,
2605 adansb0::Ansb07,
2606 Adansb0_SPEC,
2607 crate::common::RW,
2608 > {
2609 crate::common::RegisterField::<
2610 7,
2611 0x1,
2612 1,
2613 0,
2614 adansb0::Ansb07,
2615 adansb0::Ansb07,
2616 Adansb0_SPEC,
2617 crate::common::RW,
2618 >::from_register(self, 0)
2619 }
2620
2621 #[doc = "A/D Conversion Channels Select"]
2622 #[inline(always)]
2623 pub fn ansb08(
2624 self,
2625 ) -> crate::common::RegisterField<
2626 8,
2627 0x1,
2628 1,
2629 0,
2630 adansb0::Ansb08,
2631 adansb0::Ansb08,
2632 Adansb0_SPEC,
2633 crate::common::RW,
2634 > {
2635 crate::common::RegisterField::<
2636 8,
2637 0x1,
2638 1,
2639 0,
2640 adansb0::Ansb08,
2641 adansb0::Ansb08,
2642 Adansb0_SPEC,
2643 crate::common::RW,
2644 >::from_register(self, 0)
2645 }
2646
2647 #[doc = "A/D Conversion Channels Select"]
2648 #[inline(always)]
2649 pub fn ansb09(
2650 self,
2651 ) -> crate::common::RegisterField<
2652 9,
2653 0x1,
2654 1,
2655 0,
2656 adansb0::Ansb09,
2657 adansb0::Ansb09,
2658 Adansb0_SPEC,
2659 crate::common::RW,
2660 > {
2661 crate::common::RegisterField::<
2662 9,
2663 0x1,
2664 1,
2665 0,
2666 adansb0::Ansb09,
2667 adansb0::Ansb09,
2668 Adansb0_SPEC,
2669 crate::common::RW,
2670 >::from_register(self, 0)
2671 }
2672
2673 #[doc = "A/D Conversion Channels Select"]
2674 #[inline(always)]
2675 pub fn ansb10(
2676 self,
2677 ) -> crate::common::RegisterField<
2678 10,
2679 0x1,
2680 1,
2681 0,
2682 adansb0::Ansb10,
2683 adansb0::Ansb10,
2684 Adansb0_SPEC,
2685 crate::common::RW,
2686 > {
2687 crate::common::RegisterField::<
2688 10,
2689 0x1,
2690 1,
2691 0,
2692 adansb0::Ansb10,
2693 adansb0::Ansb10,
2694 Adansb0_SPEC,
2695 crate::common::RW,
2696 >::from_register(self, 0)
2697 }
2698}
2699impl ::core::default::Default for Adansb0 {
2700 #[inline(always)]
2701 fn default() -> Adansb0 {
2702 <crate::RegValueT<Adansb0_SPEC> as RegisterValue<_>>::new(0)
2703 }
2704}
2705pub mod adansb0 {
2706
2707 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2708 pub struct Ansb0_SPEC;
2709 pub type Ansb0 = crate::EnumBitfieldStruct<u8, Ansb0_SPEC>;
2710 impl Ansb0 {
2711 #[doc = "Do not select associated input channel."]
2712 pub const _0: Self = Self::new(0);
2713
2714 #[doc = "Select associated input channel."]
2715 pub const _1: Self = Self::new(1);
2716 }
2717 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2718 pub struct Ansb1_SPEC;
2719 pub type Ansb1 = crate::EnumBitfieldStruct<u8, Ansb1_SPEC>;
2720 impl Ansb1 {
2721 #[doc = "Do not select associated input channel."]
2722 pub const _0: Self = Self::new(0);
2723
2724 #[doc = "Select associated input channel."]
2725 pub const _1: Self = Self::new(1);
2726 }
2727 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2728 pub struct Ansb2_SPEC;
2729 pub type Ansb2 = crate::EnumBitfieldStruct<u8, Ansb2_SPEC>;
2730 impl Ansb2 {
2731 #[doc = "Do not select associated input channel."]
2732 pub const _0: Self = Self::new(0);
2733
2734 #[doc = "Select associated input channel."]
2735 pub const _1: Self = Self::new(1);
2736 }
2737 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2738 pub struct Ansb05_SPEC;
2739 pub type Ansb05 = crate::EnumBitfieldStruct<u8, Ansb05_SPEC>;
2740 impl Ansb05 {
2741 #[doc = "Do not select associated input channel."]
2742 pub const _0: Self = Self::new(0);
2743
2744 #[doc = "Select associated input channel."]
2745 pub const _1: Self = Self::new(1);
2746 }
2747 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2748 pub struct Ansb06_SPEC;
2749 pub type Ansb06 = crate::EnumBitfieldStruct<u8, Ansb06_SPEC>;
2750 impl Ansb06 {
2751 #[doc = "Do not select associated input channel."]
2752 pub const _0: Self = Self::new(0);
2753
2754 #[doc = "Select associated input channel."]
2755 pub const _1: Self = Self::new(1);
2756 }
2757 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2758 pub struct Ansb07_SPEC;
2759 pub type Ansb07 = crate::EnumBitfieldStruct<u8, Ansb07_SPEC>;
2760 impl Ansb07 {
2761 #[doc = "Do not select associated input channel."]
2762 pub const _0: Self = Self::new(0);
2763
2764 #[doc = "Select associated input channel."]
2765 pub const _1: Self = Self::new(1);
2766 }
2767 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2768 pub struct Ansb08_SPEC;
2769 pub type Ansb08 = crate::EnumBitfieldStruct<u8, Ansb08_SPEC>;
2770 impl Ansb08 {
2771 #[doc = "Do not select associated input channel."]
2772 pub const _0: Self = Self::new(0);
2773
2774 #[doc = "Select associated input channel."]
2775 pub const _1: Self = Self::new(1);
2776 }
2777 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2778 pub struct Ansb09_SPEC;
2779 pub type Ansb09 = crate::EnumBitfieldStruct<u8, Ansb09_SPEC>;
2780 impl Ansb09 {
2781 #[doc = "Do not select associated input channel."]
2782 pub const _0: Self = Self::new(0);
2783
2784 #[doc = "Select associated input channel."]
2785 pub const _1: Self = Self::new(1);
2786 }
2787 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2788 pub struct Ansb10_SPEC;
2789 pub type Ansb10 = crate::EnumBitfieldStruct<u8, Ansb10_SPEC>;
2790 impl Ansb10 {
2791 #[doc = "Do not select associated input channel."]
2792 pub const _0: Self = Self::new(0);
2793
2794 #[doc = "Select associated input channel."]
2795 pub const _1: Self = Self::new(1);
2796 }
2797}
2798#[doc(hidden)]
2799#[derive(Copy, Clone, Eq, PartialEq)]
2800pub struct Adansb1_SPEC;
2801impl crate::sealed::RegSpec for Adansb1_SPEC {
2802 type DataType = u16;
2803}
2804
2805#[doc = "A/D Channel Select Register B1"]
2806pub type Adansb1 = crate::RegValueT<Adansb1_SPEC>;
2807
2808impl Adansb1 {
2809 #[doc = "A/D Conversion Channels Select"]
2810 #[inline(always)]
2811 pub fn ansb19(
2812 self,
2813 ) -> crate::common::RegisterField<
2814 3,
2815 0x1,
2816 1,
2817 0,
2818 adansb1::Ansb19,
2819 adansb1::Ansb19,
2820 Adansb1_SPEC,
2821 crate::common::RW,
2822 > {
2823 crate::common::RegisterField::<
2824 3,
2825 0x1,
2826 1,
2827 0,
2828 adansb1::Ansb19,
2829 adansb1::Ansb19,
2830 Adansb1_SPEC,
2831 crate::common::RW,
2832 >::from_register(self, 0)
2833 }
2834
2835 #[doc = "A/D Conversion Channels Select"]
2836 #[inline(always)]
2837 pub fn ansb20(
2838 self,
2839 ) -> crate::common::RegisterField<
2840 4,
2841 0x1,
2842 1,
2843 0,
2844 adansb1::Ansb20,
2845 adansb1::Ansb20,
2846 Adansb1_SPEC,
2847 crate::common::RW,
2848 > {
2849 crate::common::RegisterField::<
2850 4,
2851 0x1,
2852 1,
2853 0,
2854 adansb1::Ansb20,
2855 adansb1::Ansb20,
2856 Adansb1_SPEC,
2857 crate::common::RW,
2858 >::from_register(self, 0)
2859 }
2860
2861 #[doc = "A/D Conversion Channels Select"]
2862 #[inline(always)]
2863 pub fn ansb21(
2864 self,
2865 ) -> crate::common::RegisterField<
2866 5,
2867 0x1,
2868 1,
2869 0,
2870 adansb1::Ansb21,
2871 adansb1::Ansb21,
2872 Adansb1_SPEC,
2873 crate::common::RW,
2874 > {
2875 crate::common::RegisterField::<
2876 5,
2877 0x1,
2878 1,
2879 0,
2880 adansb1::Ansb21,
2881 adansb1::Ansb21,
2882 Adansb1_SPEC,
2883 crate::common::RW,
2884 >::from_register(self, 0)
2885 }
2886
2887 #[doc = "A/D Conversion Channels Select"]
2888 #[inline(always)]
2889 pub fn ansb22(
2890 self,
2891 ) -> crate::common::RegisterField<
2892 6,
2893 0x1,
2894 1,
2895 0,
2896 adansb1::Ansb22,
2897 adansb1::Ansb22,
2898 Adansb1_SPEC,
2899 crate::common::RW,
2900 > {
2901 crate::common::RegisterField::<
2902 6,
2903 0x1,
2904 1,
2905 0,
2906 adansb1::Ansb22,
2907 adansb1::Ansb22,
2908 Adansb1_SPEC,
2909 crate::common::RW,
2910 >::from_register(self, 0)
2911 }
2912}
2913impl ::core::default::Default for Adansb1 {
2914 #[inline(always)]
2915 fn default() -> Adansb1 {
2916 <crate::RegValueT<Adansb1_SPEC> as RegisterValue<_>>::new(0)
2917 }
2918}
2919pub mod adansb1 {
2920
2921 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2922 pub struct Ansb19_SPEC;
2923 pub type Ansb19 = crate::EnumBitfieldStruct<u8, Ansb19_SPEC>;
2924 impl Ansb19 {
2925 #[doc = "Do not select associated input channel."]
2926 pub const _0: Self = Self::new(0);
2927
2928 #[doc = "Select associated input channel."]
2929 pub const _1: Self = Self::new(1);
2930 }
2931 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2932 pub struct Ansb20_SPEC;
2933 pub type Ansb20 = crate::EnumBitfieldStruct<u8, Ansb20_SPEC>;
2934 impl Ansb20 {
2935 #[doc = "Do not select associated input channel."]
2936 pub const _0: Self = Self::new(0);
2937
2938 #[doc = "Select associated input channel."]
2939 pub const _1: Self = Self::new(1);
2940 }
2941 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2942 pub struct Ansb21_SPEC;
2943 pub type Ansb21 = crate::EnumBitfieldStruct<u8, Ansb21_SPEC>;
2944 impl Ansb21 {
2945 #[doc = "Do not select associated input channel."]
2946 pub const _0: Self = Self::new(0);
2947
2948 #[doc = "Select associated input channel."]
2949 pub const _1: Self = Self::new(1);
2950 }
2951 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2952 pub struct Ansb22_SPEC;
2953 pub type Ansb22 = crate::EnumBitfieldStruct<u8, Ansb22_SPEC>;
2954 impl Ansb22 {
2955 #[doc = "Do not select associated input channel."]
2956 pub const _0: Self = Self::new(0);
2957
2958 #[doc = "Select associated input channel."]
2959 pub const _1: Self = Self::new(1);
2960 }
2961}
2962#[doc(hidden)]
2963#[derive(Copy, Clone, Eq, PartialEq)]
2964pub struct Addbldr_SPEC;
2965impl crate::sealed::RegSpec for Addbldr_SPEC {
2966 type DataType = u16;
2967}
2968
2969#[doc = "A/D Data Duplexing Register"]
2970pub type Addbldr = crate::RegValueT<Addbldr_SPEC>;
2971
2972impl Addbldr {
2973 #[doc = "Converted Value 15 to 0"]
2974 #[inline(always)]
2975 pub fn addbldr(
2976 self,
2977 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Addbldr_SPEC, crate::common::R>
2978 {
2979 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Addbldr_SPEC,crate::common::R>::from_register(self,0)
2980 }
2981}
2982impl ::core::default::Default for Addbldr {
2983 #[inline(always)]
2984 fn default() -> Addbldr {
2985 <crate::RegValueT<Addbldr_SPEC> as RegisterValue<_>>::new(0)
2986 }
2987}
2988
2989#[doc(hidden)]
2990#[derive(Copy, Clone, Eq, PartialEq)]
2991pub struct Adtsdr_SPEC;
2992impl crate::sealed::RegSpec for Adtsdr_SPEC {
2993 type DataType = u16;
2994}
2995
2996#[doc = "A/D Temperature Sensor Data Register"]
2997pub type Adtsdr = crate::RegValueT<Adtsdr_SPEC>;
2998
2999impl Adtsdr {
3000 #[doc = "Converted Value 15 to 0"]
3001 #[inline(always)]
3002 pub fn adtsdr(
3003 self,
3004 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Adtsdr_SPEC, crate::common::R>
3005 {
3006 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Adtsdr_SPEC,crate::common::R>::from_register(self,0)
3007 }
3008}
3009impl ::core::default::Default for Adtsdr {
3010 #[inline(always)]
3011 fn default() -> Adtsdr {
3012 <crate::RegValueT<Adtsdr_SPEC> as RegisterValue<_>>::new(0)
3013 }
3014}
3015
3016#[doc(hidden)]
3017#[derive(Copy, Clone, Eq, PartialEq)]
3018pub struct Adocdr_SPEC;
3019impl crate::sealed::RegSpec for Adocdr_SPEC {
3020 type DataType = u16;
3021}
3022
3023#[doc = "A/D Internal Reference Voltage Data Register"]
3024pub type Adocdr = crate::RegValueT<Adocdr_SPEC>;
3025
3026impl Adocdr {
3027 #[doc = "Converted Value 15 to 0"]
3028 #[inline(always)]
3029 pub fn adocdr(
3030 self,
3031 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Adocdr_SPEC, crate::common::R>
3032 {
3033 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Adocdr_SPEC,crate::common::R>::from_register(self,0)
3034 }
3035}
3036impl ::core::default::Default for Adocdr {
3037 #[inline(always)]
3038 fn default() -> Adocdr {
3039 <crate::RegValueT<Adocdr_SPEC> as RegisterValue<_>>::new(0)
3040 }
3041}
3042
3043#[doc(hidden)]
3044#[derive(Copy, Clone, Eq, PartialEq)]
3045pub struct Adrd_SPEC;
3046impl crate::sealed::RegSpec for Adrd_SPEC {
3047 type DataType = u16;
3048}
3049
3050#[doc = "A/D Self-Diagnosis Data Register"]
3051pub type Adrd = crate::RegValueT<Adrd_SPEC>;
3052
3053impl Adrd {
3054 #[doc = "Converted Value 11 to 0"]
3055 #[inline(always)]
3056 pub fn ad(
3057 self,
3058 ) -> crate::common::RegisterField<0, 0xfff, 1, 0, u16, u16, Adrd_SPEC, crate::common::R> {
3059 crate::common::RegisterField::<0,0xfff,1,0,u16,u16,Adrd_SPEC,crate::common::R>::from_register(self,0)
3060 }
3061
3062 #[doc = "Self-Diagnosis Status"]
3063 #[inline(always)]
3064 pub fn diagst(
3065 self,
3066 ) -> crate::common::RegisterField<
3067 14,
3068 0x3,
3069 1,
3070 0,
3071 adrd::Diagst,
3072 adrd::Diagst,
3073 Adrd_SPEC,
3074 crate::common::R,
3075 > {
3076 crate::common::RegisterField::<
3077 14,
3078 0x3,
3079 1,
3080 0,
3081 adrd::Diagst,
3082 adrd::Diagst,
3083 Adrd_SPEC,
3084 crate::common::R,
3085 >::from_register(self, 0)
3086 }
3087}
3088impl ::core::default::Default for Adrd {
3089 #[inline(always)]
3090 fn default() -> Adrd {
3091 <crate::RegValueT<Adrd_SPEC> as RegisterValue<_>>::new(0)
3092 }
3093}
3094pub mod adrd {
3095
3096 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3097 pub struct Diagst_SPEC;
3098 pub type Diagst = crate::EnumBitfieldStruct<u8, Diagst_SPEC>;
3099 impl Diagst {
3100 #[doc = "Self-diagnosis not executed after power-on."]
3101 pub const _00: Self = Self::new(0);
3102
3103 #[doc = "Self-diagnosis was executed using the 0 V voltage."]
3104 pub const _01: Self = Self::new(1);
3105
3106 #[doc = "Self-diagnosis was executed using the reference voltage × 1/2."]
3107 pub const _10: Self = Self::new(2);
3108
3109 #[doc = "Self-diagnosis was executed using the reference voltage ."]
3110 pub const _11: Self = Self::new(3);
3111 }
3112}
3113#[doc(hidden)]
3114#[derive(Copy, Clone, Eq, PartialEq)]
3115pub struct Addr_SPEC;
3116impl crate::sealed::RegSpec for Addr_SPEC {
3117 type DataType = u16;
3118}
3119
3120#[doc = "A/D Data Registers %s"]
3121pub type Addr = crate::RegValueT<Addr_SPEC>;
3122
3123impl Addr {
3124 #[doc = "Converted Value 15 to 0"]
3125 #[inline(always)]
3126 pub fn addr(
3127 self,
3128 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Addr_SPEC, crate::common::R> {
3129 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Addr_SPEC,crate::common::R>::from_register(self,0)
3130 }
3131}
3132impl ::core::default::Default for Addr {
3133 #[inline(always)]
3134 fn default() -> Addr {
3135 <crate::RegValueT<Addr_SPEC> as RegisterValue<_>>::new(0)
3136 }
3137}
3138
3139#[doc(hidden)]
3140#[derive(Copy, Clone, Eq, PartialEq)]
3141pub struct Addiscr_SPEC;
3142impl crate::sealed::RegSpec for Addiscr_SPEC {
3143 type DataType = u8;
3144}
3145
3146#[doc = "A/D Disconnection Detection Control Register"]
3147pub type Addiscr = crate::RegValueT<Addiscr_SPEC>;
3148
3149impl Addiscr {
3150 #[doc = "Disconnection Detection Assist Setting"]
3151 #[inline(always)]
3152 pub fn adndis(
3153 self,
3154 ) -> crate::common::RegisterField<
3155 0,
3156 0xf,
3157 1,
3158 0,
3159 addiscr::Adndis,
3160 addiscr::Adndis,
3161 Addiscr_SPEC,
3162 crate::common::RW,
3163 > {
3164 crate::common::RegisterField::<
3165 0,
3166 0xf,
3167 1,
3168 0,
3169 addiscr::Adndis,
3170 addiscr::Adndis,
3171 Addiscr_SPEC,
3172 crate::common::RW,
3173 >::from_register(self, 0)
3174 }
3175
3176 #[doc = "Precharge/discharge select"]
3177 #[inline(always)]
3178 pub fn pchg(
3179 self,
3180 ) -> crate::common::RegisterField<
3181 4,
3182 0x1,
3183 1,
3184 0,
3185 addiscr::Pchg,
3186 addiscr::Pchg,
3187 Addiscr_SPEC,
3188 crate::common::RW,
3189 > {
3190 crate::common::RegisterField::<
3191 4,
3192 0x1,
3193 1,
3194 0,
3195 addiscr::Pchg,
3196 addiscr::Pchg,
3197 Addiscr_SPEC,
3198 crate::common::RW,
3199 >::from_register(self, 0)
3200 }
3201}
3202impl ::core::default::Default for Addiscr {
3203 #[inline(always)]
3204 fn default() -> Addiscr {
3205 <crate::RegValueT<Addiscr_SPEC> as RegisterValue<_>>::new(0)
3206 }
3207}
3208pub mod addiscr {
3209
3210 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3211 pub struct Adndis_SPEC;
3212 pub type Adndis = crate::EnumBitfieldStruct<u8, Adndis_SPEC>;
3213 impl Adndis {
3214 #[doc = "The disconnection detection assist function is disabled"]
3215 pub const _0_X_0: Self = Self::new(0);
3216
3217 #[doc = "Setting prohibited"]
3218 pub const _0_X_1: Self = Self::new(1);
3219 }
3220 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3221 pub struct Pchg_SPEC;
3222 pub type Pchg = crate::EnumBitfieldStruct<u8, Pchg_SPEC>;
3223 impl Pchg {
3224 #[doc = "Discharge"]
3225 pub const _0: Self = Self::new(0);
3226
3227 #[doc = "Precharge"]
3228 pub const _1: Self = Self::new(1);
3229 }
3230}
3231#[doc(hidden)]
3232#[derive(Copy, Clone, Eq, PartialEq)]
3233pub struct Adacsr_SPEC;
3234impl crate::sealed::RegSpec for Adacsr_SPEC {
3235 type DataType = u8;
3236}
3237
3238#[doc = "A/D Conversion Operation Mode Select Register"]
3239pub type Adacsr = crate::RegValueT<Adacsr_SPEC>;
3240
3241impl Adacsr {
3242 #[doc = "Successive Approximation Control Setting"]
3243 #[inline(always)]
3244 pub fn adsac(
3245 self,
3246 ) -> crate::common::RegisterField<
3247 1,
3248 0x1,
3249 1,
3250 0,
3251 adacsr::Adsac,
3252 adacsr::Adsac,
3253 Adacsr_SPEC,
3254 crate::common::RW,
3255 > {
3256 crate::common::RegisterField::<
3257 1,
3258 0x1,
3259 1,
3260 0,
3261 adacsr::Adsac,
3262 adacsr::Adsac,
3263 Adacsr_SPEC,
3264 crate::common::RW,
3265 >::from_register(self, 0)
3266 }
3267}
3268impl ::core::default::Default for Adacsr {
3269 #[inline(always)]
3270 fn default() -> Adacsr {
3271 <crate::RegValueT<Adacsr_SPEC> as RegisterValue<_>>::new(0)
3272 }
3273}
3274pub mod adacsr {
3275
3276 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3277 pub struct Adsac_SPEC;
3278 pub type Adsac = crate::EnumBitfieldStruct<u8, Adsac_SPEC>;
3279 impl Adsac {
3280 #[doc = "Normal conversion mode (default)"]
3281 pub const _0: Self = Self::new(0);
3282
3283 #[doc = "Fast conversion mode"]
3284 pub const _1: Self = Self::new(1);
3285 }
3286}
3287#[doc(hidden)]
3288#[derive(Copy, Clone, Eq, PartialEq)]
3289pub struct Adgspcr_SPEC;
3290impl crate::sealed::RegSpec for Adgspcr_SPEC {
3291 type DataType = u16;
3292}
3293
3294#[doc = "A/D Group Scan Priority Control Register"]
3295pub type Adgspcr = crate::RegValueT<Adgspcr_SPEC>;
3296
3297impl Adgspcr {
3298 #[doc = "Group Priority Operation Setting"]
3299 #[inline(always)]
3300 pub fn pgs(
3301 self,
3302 ) -> crate::common::RegisterField<
3303 0,
3304 0x1,
3305 1,
3306 0,
3307 adgspcr::Pgs,
3308 adgspcr::Pgs,
3309 Adgspcr_SPEC,
3310 crate::common::RW,
3311 > {
3312 crate::common::RegisterField::<
3313 0,
3314 0x1,
3315 1,
3316 0,
3317 adgspcr::Pgs,
3318 adgspcr::Pgs,
3319 Adgspcr_SPEC,
3320 crate::common::RW,
3321 >::from_register(self, 0)
3322 }
3323
3324 #[doc = "Lower-Priority Group Restart Setting"]
3325 #[inline(always)]
3326 pub fn gbrscn(
3327 self,
3328 ) -> crate::common::RegisterField<
3329 1,
3330 0x1,
3331 1,
3332 0,
3333 adgspcr::Gbrscn,
3334 adgspcr::Gbrscn,
3335 Adgspcr_SPEC,
3336 crate::common::RW,
3337 > {
3338 crate::common::RegisterField::<
3339 1,
3340 0x1,
3341 1,
3342 0,
3343 adgspcr::Gbrscn,
3344 adgspcr::Gbrscn,
3345 Adgspcr_SPEC,
3346 crate::common::RW,
3347 >::from_register(self, 0)
3348 }
3349
3350 #[doc = "Single Scan Continuous Start"]
3351 #[inline(always)]
3352 pub fn gbrp(
3353 self,
3354 ) -> crate::common::RegisterField<
3355 15,
3356 0x1,
3357 1,
3358 0,
3359 adgspcr::Gbrp,
3360 adgspcr::Gbrp,
3361 Adgspcr_SPEC,
3362 crate::common::RW,
3363 > {
3364 crate::common::RegisterField::<
3365 15,
3366 0x1,
3367 1,
3368 0,
3369 adgspcr::Gbrp,
3370 adgspcr::Gbrp,
3371 Adgspcr_SPEC,
3372 crate::common::RW,
3373 >::from_register(self, 0)
3374 }
3375}
3376impl ::core::default::Default for Adgspcr {
3377 #[inline(always)]
3378 fn default() -> Adgspcr {
3379 <crate::RegValueT<Adgspcr_SPEC> as RegisterValue<_>>::new(0)
3380 }
3381}
3382pub mod adgspcr {
3383
3384 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3385 pub struct Pgs_SPEC;
3386 pub type Pgs = crate::EnumBitfieldStruct<u8, Pgs_SPEC>;
3387 impl Pgs {
3388 #[doc = "Operate without group priority control."]
3389 pub const _0: Self = Self::new(0);
3390
3391 #[doc = "Operate with group priority control."]
3392 pub const _1: Self = Self::new(1);
3393 }
3394 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3395 pub struct Gbrscn_SPEC;
3396 pub type Gbrscn = crate::EnumBitfieldStruct<u8, Gbrscn_SPEC>;
3397 impl Gbrscn {
3398 #[doc = "Disable rescanning of the group that was stopped in group priority operation"]
3399 pub const _0: Self = Self::new(0);
3400
3401 #[doc = "Enable rescanning of the group that was stopped in group priority operation."]
3402 pub const _1: Self = Self::new(1);
3403 }
3404 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3405 pub struct Gbrp_SPEC;
3406 pub type Gbrp = crate::EnumBitfieldStruct<u8, Gbrp_SPEC>;
3407 impl Gbrp {
3408 #[doc = "Single scan is not continuously activated."]
3409 pub const _0: Self = Self::new(0);
3410
3411 #[doc = "Single scan for the group with the lower-priority is continuously activated."]
3412 pub const _1: Self = Self::new(1);
3413 }
3414}
3415#[doc(hidden)]
3416#[derive(Copy, Clone, Eq, PartialEq)]
3417pub struct Addbldra_SPEC;
3418impl crate::sealed::RegSpec for Addbldra_SPEC {
3419 type DataType = u16;
3420}
3421
3422#[doc = "A/D Data Duplexing Register A"]
3423pub type Addbldra = crate::RegValueT<Addbldra_SPEC>;
3424
3425impl Addbldra {
3426 #[doc = "Converted Value 15 to 0"]
3427 #[inline(always)]
3428 pub fn addbldr(
3429 self,
3430 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Addbldra_SPEC, crate::common::R>
3431 {
3432 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Addbldra_SPEC,crate::common::R>::from_register(self,0)
3433 }
3434}
3435impl ::core::default::Default for Addbldra {
3436 #[inline(always)]
3437 fn default() -> Addbldra {
3438 <crate::RegValueT<Addbldra_SPEC> as RegisterValue<_>>::new(0)
3439 }
3440}
3441
3442#[doc(hidden)]
3443#[derive(Copy, Clone, Eq, PartialEq)]
3444pub struct Addbldrb_SPEC;
3445impl crate::sealed::RegSpec for Addbldrb_SPEC {
3446 type DataType = u16;
3447}
3448
3449#[doc = "A/D Data Duplexing Register B"]
3450pub type Addbldrb = crate::RegValueT<Addbldrb_SPEC>;
3451
3452impl Addbldrb {
3453 #[doc = "Converted Value 15 to 0"]
3454 #[inline(always)]
3455 pub fn addbldr(
3456 self,
3457 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Addbldrb_SPEC, crate::common::R>
3458 {
3459 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Addbldrb_SPEC,crate::common::R>::from_register(self,0)
3460 }
3461}
3462impl ::core::default::Default for Addbldrb {
3463 #[inline(always)]
3464 fn default() -> Addbldrb {
3465 <crate::RegValueT<Addbldrb_SPEC> as RegisterValue<_>>::new(0)
3466 }
3467}
3468
3469#[doc(hidden)]
3470#[derive(Copy, Clone, Eq, PartialEq)]
3471pub struct Adhvrefcnt_SPEC;
3472impl crate::sealed::RegSpec for Adhvrefcnt_SPEC {
3473 type DataType = u8;
3474}
3475
3476#[doc = "A/D High-Potential/Low-Potential Reference Voltage Control Register"]
3477pub type Adhvrefcnt = crate::RegValueT<Adhvrefcnt_SPEC>;
3478
3479impl Adhvrefcnt {
3480 #[doc = "High-Potential Reference Voltage Select"]
3481 #[inline(always)]
3482 pub fn hvsel(
3483 self,
3484 ) -> crate::common::RegisterField<
3485 0,
3486 0x3,
3487 1,
3488 0,
3489 adhvrefcnt::Hvsel,
3490 adhvrefcnt::Hvsel,
3491 Adhvrefcnt_SPEC,
3492 crate::common::RW,
3493 > {
3494 crate::common::RegisterField::<
3495 0,
3496 0x3,
3497 1,
3498 0,
3499 adhvrefcnt::Hvsel,
3500 adhvrefcnt::Hvsel,
3501 Adhvrefcnt_SPEC,
3502 crate::common::RW,
3503 >::from_register(self, 0)
3504 }
3505
3506 #[doc = "Low-Potential Reference Voltage Select"]
3507 #[inline(always)]
3508 pub fn lvsel(
3509 self,
3510 ) -> crate::common::RegisterField<
3511 4,
3512 0x1,
3513 1,
3514 0,
3515 adhvrefcnt::Lvsel,
3516 adhvrefcnt::Lvsel,
3517 Adhvrefcnt_SPEC,
3518 crate::common::RW,
3519 > {
3520 crate::common::RegisterField::<
3521 4,
3522 0x1,
3523 1,
3524 0,
3525 adhvrefcnt::Lvsel,
3526 adhvrefcnt::Lvsel,
3527 Adhvrefcnt_SPEC,
3528 crate::common::RW,
3529 >::from_register(self, 0)
3530 }
3531
3532 #[doc = "Sleep"]
3533 #[inline(always)]
3534 pub fn adslp(
3535 self,
3536 ) -> crate::common::RegisterField<
3537 7,
3538 0x1,
3539 1,
3540 0,
3541 adhvrefcnt::Adslp,
3542 adhvrefcnt::Adslp,
3543 Adhvrefcnt_SPEC,
3544 crate::common::RW,
3545 > {
3546 crate::common::RegisterField::<
3547 7,
3548 0x1,
3549 1,
3550 0,
3551 adhvrefcnt::Adslp,
3552 adhvrefcnt::Adslp,
3553 Adhvrefcnt_SPEC,
3554 crate::common::RW,
3555 >::from_register(self, 0)
3556 }
3557}
3558impl ::core::default::Default for Adhvrefcnt {
3559 #[inline(always)]
3560 fn default() -> Adhvrefcnt {
3561 <crate::RegValueT<Adhvrefcnt_SPEC> as RegisterValue<_>>::new(0)
3562 }
3563}
3564pub mod adhvrefcnt {
3565
3566 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3567 pub struct Hvsel_SPEC;
3568 pub type Hvsel = crate::EnumBitfieldStruct<u8, Hvsel_SPEC>;
3569 impl Hvsel {
3570 #[doc = "AVCC0 is selected as the high-potential reference voltage"]
3571 pub const _00: Self = Self::new(0);
3572
3573 #[doc = "VREFH0 is selected as the high-potential reference voltage"]
3574 pub const _01: Self = Self::new(1);
3575
3576 #[doc = "Internal reference voltage is selected as the high-potential reference voltage"]
3577 pub const _10: Self = Self::new(2);
3578
3579 #[doc = "No reference voltage pin is selected (internal node discharge)"]
3580 pub const _11: Self = Self::new(3);
3581 }
3582 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3583 pub struct Lvsel_SPEC;
3584 pub type Lvsel = crate::EnumBitfieldStruct<u8, Lvsel_SPEC>;
3585 impl Lvsel {
3586 #[doc = "AVSS0 is selected as the low-potential reference voltage."]
3587 pub const _0: Self = Self::new(0);
3588
3589 #[doc = "VREFL0 is selected as the low-potential reference voltage."]
3590 pub const _1: Self = Self::new(1);
3591 }
3592 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3593 pub struct Adslp_SPEC;
3594 pub type Adslp = crate::EnumBitfieldStruct<u8, Adslp_SPEC>;
3595 impl Adslp {
3596 #[doc = "Normal operation"]
3597 pub const _0: Self = Self::new(0);
3598
3599 #[doc = "Standby state"]
3600 pub const _1: Self = Self::new(1);
3601 }
3602}
3603#[doc(hidden)]
3604#[derive(Copy, Clone, Eq, PartialEq)]
3605pub struct Adwinmon_SPEC;
3606impl crate::sealed::RegSpec for Adwinmon_SPEC {
3607 type DataType = u8;
3608}
3609
3610#[doc = "A/D Compare Function Window A/B Status Monitor Register"]
3611pub type Adwinmon = crate::RegValueT<Adwinmon_SPEC>;
3612
3613impl Adwinmon {
3614 #[doc = "Combination Result Monitor"]
3615 #[inline(always)]
3616 pub fn moncomb(
3617 self,
3618 ) -> crate::common::RegisterField<
3619 0,
3620 0x1,
3621 1,
3622 0,
3623 adwinmon::Moncomb,
3624 adwinmon::Moncomb,
3625 Adwinmon_SPEC,
3626 crate::common::R,
3627 > {
3628 crate::common::RegisterField::<
3629 0,
3630 0x1,
3631 1,
3632 0,
3633 adwinmon::Moncomb,
3634 adwinmon::Moncomb,
3635 Adwinmon_SPEC,
3636 crate::common::R,
3637 >::from_register(self, 0)
3638 }
3639
3640 #[doc = "Comparison Result Monitor A"]
3641 #[inline(always)]
3642 pub fn moncmpa(
3643 self,
3644 ) -> crate::common::RegisterField<
3645 4,
3646 0x1,
3647 1,
3648 0,
3649 adwinmon::Moncmpa,
3650 adwinmon::Moncmpa,
3651 Adwinmon_SPEC,
3652 crate::common::R,
3653 > {
3654 crate::common::RegisterField::<
3655 4,
3656 0x1,
3657 1,
3658 0,
3659 adwinmon::Moncmpa,
3660 adwinmon::Moncmpa,
3661 Adwinmon_SPEC,
3662 crate::common::R,
3663 >::from_register(self, 0)
3664 }
3665
3666 #[doc = "Comparison Result Monitor B"]
3667 #[inline(always)]
3668 pub fn moncmpb(
3669 self,
3670 ) -> crate::common::RegisterField<
3671 5,
3672 0x1,
3673 1,
3674 0,
3675 adwinmon::Moncmpb,
3676 adwinmon::Moncmpb,
3677 Adwinmon_SPEC,
3678 crate::common::R,
3679 > {
3680 crate::common::RegisterField::<
3681 5,
3682 0x1,
3683 1,
3684 0,
3685 adwinmon::Moncmpb,
3686 adwinmon::Moncmpb,
3687 Adwinmon_SPEC,
3688 crate::common::R,
3689 >::from_register(self, 0)
3690 }
3691}
3692impl ::core::default::Default for Adwinmon {
3693 #[inline(always)]
3694 fn default() -> Adwinmon {
3695 <crate::RegValueT<Adwinmon_SPEC> as RegisterValue<_>>::new(0)
3696 }
3697}
3698pub mod adwinmon {
3699
3700 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3701 pub struct Moncomb_SPEC;
3702 pub type Moncomb = crate::EnumBitfieldStruct<u8, Moncomb_SPEC>;
3703 impl Moncomb {
3704 #[doc = "Window A/B composite conditions are not met."]
3705 pub const _0: Self = Self::new(0);
3706
3707 #[doc = "Window A/B composite conditions are met."]
3708 pub const _1: Self = Self::new(1);
3709 }
3710 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3711 pub struct Moncmpa_SPEC;
3712 pub type Moncmpa = crate::EnumBitfieldStruct<u8, Moncmpa_SPEC>;
3713 impl Moncmpa {
3714 #[doc = "Window A comparison conditions are not met."]
3715 pub const _0: Self = Self::new(0);
3716
3717 #[doc = "Window A comparison conditions are met."]
3718 pub const _1: Self = Self::new(1);
3719 }
3720 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3721 pub struct Moncmpb_SPEC;
3722 pub type Moncmpb = crate::EnumBitfieldStruct<u8, Moncmpb_SPEC>;
3723 impl Moncmpb {
3724 #[doc = "Window B comparison conditions are not met."]
3725 pub const _0: Self = Self::new(0);
3726
3727 #[doc = "Window B comparison conditions are met."]
3728 pub const _1: Self = Self::new(1);
3729 }
3730}
3731#[doc(hidden)]
3732#[derive(Copy, Clone, Eq, PartialEq)]
3733pub struct Adcmpcr_SPEC;
3734impl crate::sealed::RegSpec for Adcmpcr_SPEC {
3735 type DataType = u16;
3736}
3737
3738#[doc = "A/D Compare Function Control Register"]
3739pub type Adcmpcr = crate::RegValueT<Adcmpcr_SPEC>;
3740
3741impl Adcmpcr {
3742 #[doc = "Window A/B Composite Conditions Setting"]
3743 #[inline(always)]
3744 pub fn cmpab(
3745 self,
3746 ) -> crate::common::RegisterField<
3747 0,
3748 0x3,
3749 1,
3750 0,
3751 adcmpcr::Cmpab,
3752 adcmpcr::Cmpab,
3753 Adcmpcr_SPEC,
3754 crate::common::RW,
3755 > {
3756 crate::common::RegisterField::<
3757 0,
3758 0x3,
3759 1,
3760 0,
3761 adcmpcr::Cmpab,
3762 adcmpcr::Cmpab,
3763 Adcmpcr_SPEC,
3764 crate::common::RW,
3765 >::from_register(self, 0)
3766 }
3767
3768 #[doc = "Compare Window B Operation Enable"]
3769 #[inline(always)]
3770 pub fn cmpbe(
3771 self,
3772 ) -> crate::common::RegisterField<
3773 9,
3774 0x1,
3775 1,
3776 0,
3777 adcmpcr::Cmpbe,
3778 adcmpcr::Cmpbe,
3779 Adcmpcr_SPEC,
3780 crate::common::RW,
3781 > {
3782 crate::common::RegisterField::<
3783 9,
3784 0x1,
3785 1,
3786 0,
3787 adcmpcr::Cmpbe,
3788 adcmpcr::Cmpbe,
3789 Adcmpcr_SPEC,
3790 crate::common::RW,
3791 >::from_register(self, 0)
3792 }
3793
3794 #[doc = "Compare Window A Operation Enable"]
3795 #[inline(always)]
3796 pub fn cmpae(
3797 self,
3798 ) -> crate::common::RegisterField<
3799 11,
3800 0x1,
3801 1,
3802 0,
3803 adcmpcr::Cmpae,
3804 adcmpcr::Cmpae,
3805 Adcmpcr_SPEC,
3806 crate::common::RW,
3807 > {
3808 crate::common::RegisterField::<
3809 11,
3810 0x1,
3811 1,
3812 0,
3813 adcmpcr::Cmpae,
3814 adcmpcr::Cmpae,
3815 Adcmpcr_SPEC,
3816 crate::common::RW,
3817 >::from_register(self, 0)
3818 }
3819
3820 #[doc = "Compare B Interrupt Enable"]
3821 #[inline(always)]
3822 pub fn cmpbie(
3823 self,
3824 ) -> crate::common::RegisterField<
3825 13,
3826 0x1,
3827 1,
3828 0,
3829 adcmpcr::Cmpbie,
3830 adcmpcr::Cmpbie,
3831 Adcmpcr_SPEC,
3832 crate::common::RW,
3833 > {
3834 crate::common::RegisterField::<
3835 13,
3836 0x1,
3837 1,
3838 0,
3839 adcmpcr::Cmpbie,
3840 adcmpcr::Cmpbie,
3841 Adcmpcr_SPEC,
3842 crate::common::RW,
3843 >::from_register(self, 0)
3844 }
3845
3846 #[doc = "Window Function Setting"]
3847 #[inline(always)]
3848 pub fn wcmpe(
3849 self,
3850 ) -> crate::common::RegisterField<
3851 14,
3852 0x1,
3853 1,
3854 0,
3855 adcmpcr::Wcmpe,
3856 adcmpcr::Wcmpe,
3857 Adcmpcr_SPEC,
3858 crate::common::RW,
3859 > {
3860 crate::common::RegisterField::<
3861 14,
3862 0x1,
3863 1,
3864 0,
3865 adcmpcr::Wcmpe,
3866 adcmpcr::Wcmpe,
3867 Adcmpcr_SPEC,
3868 crate::common::RW,
3869 >::from_register(self, 0)
3870 }
3871
3872 #[doc = "Compare A Interrupt Enable"]
3873 #[inline(always)]
3874 pub fn cmpaie(
3875 self,
3876 ) -> crate::common::RegisterField<
3877 15,
3878 0x1,
3879 1,
3880 0,
3881 adcmpcr::Cmpaie,
3882 adcmpcr::Cmpaie,
3883 Adcmpcr_SPEC,
3884 crate::common::RW,
3885 > {
3886 crate::common::RegisterField::<
3887 15,
3888 0x1,
3889 1,
3890 0,
3891 adcmpcr::Cmpaie,
3892 adcmpcr::Cmpaie,
3893 Adcmpcr_SPEC,
3894 crate::common::RW,
3895 >::from_register(self, 0)
3896 }
3897}
3898impl ::core::default::Default for Adcmpcr {
3899 #[inline(always)]
3900 fn default() -> Adcmpcr {
3901 <crate::RegValueT<Adcmpcr_SPEC> as RegisterValue<_>>::new(0)
3902 }
3903}
3904pub mod adcmpcr {
3905
3906 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3907 pub struct Cmpab_SPEC;
3908 pub type Cmpab = crate::EnumBitfieldStruct<u8, Cmpab_SPEC>;
3909 impl Cmpab {
3910 #[doc = "Output ADC120_WCMPM when window A OR window B comparison conditions are met. Otherwise, output ADC120_WCMPUM."]
3911 pub const _00: Self = Self::new(0);
3912
3913 #[doc = "Output ADC120_WCMPM when window A EXOR window B comparison conditions are met. Otherwise, output ADC120_WCMPUM."]
3914 pub const _01: Self = Self::new(1);
3915
3916 #[doc = "Output ADC120_WCMPM when window A AND window B comparison conditions are met. Otherwise, output ADC120_WCMPUM."]
3917 pub const _10: Self = Self::new(2);
3918
3919 #[doc = "Setting prohibited."]
3920 pub const _11: Self = Self::new(3);
3921 }
3922 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3923 pub struct Cmpbe_SPEC;
3924 pub type Cmpbe = crate::EnumBitfieldStruct<u8, Cmpbe_SPEC>;
3925 impl Cmpbe {
3926 #[doc = "Disable compare window B operation. Disable ADC120_WCMPM and ADC120_WCMPUM outputs."]
3927 pub const _0: Self = Self::new(0);
3928
3929 #[doc = "Enable compare window B operation."]
3930 pub const _1: Self = Self::new(1);
3931 }
3932 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3933 pub struct Cmpae_SPEC;
3934 pub type Cmpae = crate::EnumBitfieldStruct<u8, Cmpae_SPEC>;
3935 impl Cmpae {
3936 #[doc = "Disable compare window A operation. Disable ADC120_WCMPM and ADC120_WCMPUM outputs."]
3937 pub const _0: Self = Self::new(0);
3938
3939 #[doc = "Enable compare window A operation."]
3940 pub const _1: Self = Self::new(1);
3941 }
3942 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3943 pub struct Cmpbie_SPEC;
3944 pub type Cmpbie = crate::EnumBitfieldStruct<u8, Cmpbie_SPEC>;
3945 impl Cmpbie {
3946 #[doc = "Disable ADC120_CMPBI interrupt when comparison conditions (window B) are met."]
3947 pub const _0: Self = Self::new(0);
3948
3949 #[doc = "Enable ADC120_CMPBI interrupt when comparison conditions (window B) are met."]
3950 pub const _1: Self = Self::new(1);
3951 }
3952 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3953 pub struct Wcmpe_SPEC;
3954 pub type Wcmpe = crate::EnumBitfieldStruct<u8, Wcmpe_SPEC>;
3955 impl Wcmpe {
3956 #[doc = "Disable window function Window A and window B operate as a comparator to compare the single value on the lower side with the A/D conversion result."]
3957 pub const _0: Self = Self::new(0);
3958
3959 #[doc = "Enable window function Window A and window B operate as a comparator to compare the two values on the upper and lower sides with the A/D conversion result."]
3960 pub const _1: Self = Self::new(1);
3961 }
3962 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3963 pub struct Cmpaie_SPEC;
3964 pub type Cmpaie = crate::EnumBitfieldStruct<u8, Cmpaie_SPEC>;
3965 impl Cmpaie {
3966 #[doc = "Disable ADC120_CMPAI interrupt when comparison conditions (window A) are met."]
3967 pub const _0: Self = Self::new(0);
3968
3969 #[doc = "Enable ADC120_CMPAI interrupt when comparison conditions (window A) are met."]
3970 pub const _1: Self = Self::new(1);
3971 }
3972}
3973#[doc(hidden)]
3974#[derive(Copy, Clone, Eq, PartialEq)]
3975pub struct Adcmpanser_SPEC;
3976impl crate::sealed::RegSpec for Adcmpanser_SPEC {
3977 type DataType = u8;
3978}
3979
3980#[doc = "A/D Compare Function Window A Extended Input Select Register"]
3981pub type Adcmpanser = crate::RegValueT<Adcmpanser_SPEC>;
3982
3983impl Adcmpanser {
3984 #[doc = "Temperature Sensor Output Compare Select"]
3985 #[inline(always)]
3986 pub fn cmptsa(
3987 self,
3988 ) -> crate::common::RegisterField<
3989 0,
3990 0x1,
3991 1,
3992 0,
3993 adcmpanser::Cmptsa,
3994 adcmpanser::Cmptsa,
3995 Adcmpanser_SPEC,
3996 crate::common::RW,
3997 > {
3998 crate::common::RegisterField::<
3999 0,
4000 0x1,
4001 1,
4002 0,
4003 adcmpanser::Cmptsa,
4004 adcmpanser::Cmptsa,
4005 Adcmpanser_SPEC,
4006 crate::common::RW,
4007 >::from_register(self, 0)
4008 }
4009
4010 #[doc = "Internal Reference Voltage Compare Select"]
4011 #[inline(always)]
4012 pub fn cmpoca(
4013 self,
4014 ) -> crate::common::RegisterField<
4015 1,
4016 0x1,
4017 1,
4018 0,
4019 adcmpanser::Cmpoca,
4020 adcmpanser::Cmpoca,
4021 Adcmpanser_SPEC,
4022 crate::common::RW,
4023 > {
4024 crate::common::RegisterField::<
4025 1,
4026 0x1,
4027 1,
4028 0,
4029 adcmpanser::Cmpoca,
4030 adcmpanser::Cmpoca,
4031 Adcmpanser_SPEC,
4032 crate::common::RW,
4033 >::from_register(self, 0)
4034 }
4035}
4036impl ::core::default::Default for Adcmpanser {
4037 #[inline(always)]
4038 fn default() -> Adcmpanser {
4039 <crate::RegValueT<Adcmpanser_SPEC> as RegisterValue<_>>::new(0)
4040 }
4041}
4042pub mod adcmpanser {
4043
4044 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4045 pub struct Cmptsa_SPEC;
4046 pub type Cmptsa = crate::EnumBitfieldStruct<u8, Cmptsa_SPEC>;
4047 impl Cmptsa {
4048 #[doc = "Exclude the temperature sensor output from the compare Window A target range."]
4049 pub const _0: Self = Self::new(0);
4050
4051 #[doc = "Include the temperature sensor output in the compare Window A target range."]
4052 pub const _1: Self = Self::new(1);
4053 }
4054 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4055 pub struct Cmpoca_SPEC;
4056 pub type Cmpoca = crate::EnumBitfieldStruct<u8, Cmpoca_SPEC>;
4057 impl Cmpoca {
4058 #[doc = "Exclude the internal reference voltage from the compare Window A target range."]
4059 pub const _0: Self = Self::new(0);
4060
4061 #[doc = "Include the internal reference voltage in the compare Window A target range."]
4062 pub const _1: Self = Self::new(1);
4063 }
4064}
4065#[doc(hidden)]
4066#[derive(Copy, Clone, Eq, PartialEq)]
4067pub struct Adcmpler_SPEC;
4068impl crate::sealed::RegSpec for Adcmpler_SPEC {
4069 type DataType = u8;
4070}
4071
4072#[doc = "A/D Compare Function Window A Extended Input Comparison Condition Setting Register"]
4073pub type Adcmpler = crate::RegValueT<Adcmpler_SPEC>;
4074
4075impl Adcmpler {
4076 #[doc = "Compare Window A Temperature Sensor Output Comparison Condition Select"]
4077 #[inline(always)]
4078 pub fn cmpltsa(
4079 self,
4080 ) -> crate::common::RegisterField<
4081 0,
4082 0x1,
4083 1,
4084 0,
4085 adcmpler::Cmpltsa,
4086 adcmpler::Cmpltsa,
4087 Adcmpler_SPEC,
4088 crate::common::RW,
4089 > {
4090 crate::common::RegisterField::<
4091 0,
4092 0x1,
4093 1,
4094 0,
4095 adcmpler::Cmpltsa,
4096 adcmpler::Cmpltsa,
4097 Adcmpler_SPEC,
4098 crate::common::RW,
4099 >::from_register(self, 0)
4100 }
4101
4102 #[doc = "Compare Window A Internal Reference Voltage Comparison Condition Select"]
4103 #[inline(always)]
4104 pub fn cmploca(
4105 self,
4106 ) -> crate::common::RegisterField<
4107 1,
4108 0x1,
4109 1,
4110 0,
4111 adcmpler::Cmploca,
4112 adcmpler::Cmploca,
4113 Adcmpler_SPEC,
4114 crate::common::RW,
4115 > {
4116 crate::common::RegisterField::<
4117 1,
4118 0x1,
4119 1,
4120 0,
4121 adcmpler::Cmploca,
4122 adcmpler::Cmploca,
4123 Adcmpler_SPEC,
4124 crate::common::RW,
4125 >::from_register(self, 0)
4126 }
4127}
4128impl ::core::default::Default for Adcmpler {
4129 #[inline(always)]
4130 fn default() -> Adcmpler {
4131 <crate::RegValueT<Adcmpler_SPEC> as RegisterValue<_>>::new(0)
4132 }
4133}
4134pub mod adcmpler {
4135
4136 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4137 pub struct Cmpltsa_SPEC;
4138 pub type Cmpltsa = crate::EnumBitfieldStruct<u8, Cmpltsa_SPEC>;
4139 impl Cmpltsa {
4140 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0) : ADCMPDR0 value > A/D-converted valueCompare Window A Temperature Sensor Output Comparison Condition Select When window function is enabled (ADCMPCR.WCMPE = 1) : Compare Window A Temperature Sensor Output Comparison ConditionA/D-converted value < ADCMPDR0 value, or A/D-converted value > ADCMPDR1 value"]
4141 pub const _0: Self = Self::new(0);
4142
4143 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0) : ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1) : ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
4144 pub const _1: Self = Self::new(1);
4145 }
4146 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4147 pub struct Cmploca_SPEC;
4148 pub type Cmploca = crate::EnumBitfieldStruct<u8, Cmploca_SPEC>;
4149 impl Cmploca {
4150 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0) : ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or A/D-converted value > ADCMPDR1 value"]
4151 pub const _0: Self = Self::new(0);
4152
4153 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
4154 pub const _1: Self = Self::new(1);
4155 }
4156}
4157#[doc(hidden)]
4158#[derive(Copy, Clone, Eq, PartialEq)]
4159pub struct Adcmpansr0_SPEC;
4160impl crate::sealed::RegSpec for Adcmpansr0_SPEC {
4161 type DataType = u16;
4162}
4163
4164#[doc = "A/D Compare Function Window A Channel Select Register 0"]
4165pub type Adcmpansr0 = crate::RegValueT<Adcmpansr0_SPEC>;
4166
4167impl Adcmpansr0 {
4168 #[doc = "Compare Window A Channel Select"]
4169 #[inline(always)]
4170 pub fn cmpcha0(
4171 self,
4172 ) -> crate::common::RegisterField<
4173 0,
4174 0x1,
4175 1,
4176 0,
4177 adcmpansr0::Cmpcha0,
4178 adcmpansr0::Cmpcha0,
4179 Adcmpansr0_SPEC,
4180 crate::common::RW,
4181 > {
4182 crate::common::RegisterField::<
4183 0,
4184 0x1,
4185 1,
4186 0,
4187 adcmpansr0::Cmpcha0,
4188 adcmpansr0::Cmpcha0,
4189 Adcmpansr0_SPEC,
4190 crate::common::RW,
4191 >::from_register(self, 0)
4192 }
4193
4194 #[doc = "Compare Window A Channel Select"]
4195 #[inline(always)]
4196 pub fn cmpcha1(
4197 self,
4198 ) -> crate::common::RegisterField<
4199 1,
4200 0x1,
4201 1,
4202 0,
4203 adcmpansr0::Cmpcha1,
4204 adcmpansr0::Cmpcha1,
4205 Adcmpansr0_SPEC,
4206 crate::common::RW,
4207 > {
4208 crate::common::RegisterField::<
4209 1,
4210 0x1,
4211 1,
4212 0,
4213 adcmpansr0::Cmpcha1,
4214 adcmpansr0::Cmpcha1,
4215 Adcmpansr0_SPEC,
4216 crate::common::RW,
4217 >::from_register(self, 0)
4218 }
4219
4220 #[doc = "Compare Window A Channel Select"]
4221 #[inline(always)]
4222 pub fn cmpcha2(
4223 self,
4224 ) -> crate::common::RegisterField<
4225 2,
4226 0x1,
4227 1,
4228 0,
4229 adcmpansr0::Cmpcha2,
4230 adcmpansr0::Cmpcha2,
4231 Adcmpansr0_SPEC,
4232 crate::common::RW,
4233 > {
4234 crate::common::RegisterField::<
4235 2,
4236 0x1,
4237 1,
4238 0,
4239 adcmpansr0::Cmpcha2,
4240 adcmpansr0::Cmpcha2,
4241 Adcmpansr0_SPEC,
4242 crate::common::RW,
4243 >::from_register(self, 0)
4244 }
4245
4246 #[doc = "Compare Window A Channel Select"]
4247 #[inline(always)]
4248 pub fn cmpcha05(
4249 self,
4250 ) -> crate::common::RegisterField<
4251 5,
4252 0x1,
4253 1,
4254 0,
4255 adcmpansr0::Cmpcha05,
4256 adcmpansr0::Cmpcha05,
4257 Adcmpansr0_SPEC,
4258 crate::common::RW,
4259 > {
4260 crate::common::RegisterField::<
4261 5,
4262 0x1,
4263 1,
4264 0,
4265 adcmpansr0::Cmpcha05,
4266 adcmpansr0::Cmpcha05,
4267 Adcmpansr0_SPEC,
4268 crate::common::RW,
4269 >::from_register(self, 0)
4270 }
4271
4272 #[doc = "Compare Window A Channel Select"]
4273 #[inline(always)]
4274 pub fn cmpcha06(
4275 self,
4276 ) -> crate::common::RegisterField<
4277 6,
4278 0x1,
4279 1,
4280 0,
4281 adcmpansr0::Cmpcha06,
4282 adcmpansr0::Cmpcha06,
4283 Adcmpansr0_SPEC,
4284 crate::common::RW,
4285 > {
4286 crate::common::RegisterField::<
4287 6,
4288 0x1,
4289 1,
4290 0,
4291 adcmpansr0::Cmpcha06,
4292 adcmpansr0::Cmpcha06,
4293 Adcmpansr0_SPEC,
4294 crate::common::RW,
4295 >::from_register(self, 0)
4296 }
4297
4298 #[doc = "Compare Window A Channel Select"]
4299 #[inline(always)]
4300 pub fn cmpcha07(
4301 self,
4302 ) -> crate::common::RegisterField<
4303 7,
4304 0x1,
4305 1,
4306 0,
4307 adcmpansr0::Cmpcha07,
4308 adcmpansr0::Cmpcha07,
4309 Adcmpansr0_SPEC,
4310 crate::common::RW,
4311 > {
4312 crate::common::RegisterField::<
4313 7,
4314 0x1,
4315 1,
4316 0,
4317 adcmpansr0::Cmpcha07,
4318 adcmpansr0::Cmpcha07,
4319 Adcmpansr0_SPEC,
4320 crate::common::RW,
4321 >::from_register(self, 0)
4322 }
4323
4324 #[doc = "Compare Window A Channel Select"]
4325 #[inline(always)]
4326 pub fn cmpcha08(
4327 self,
4328 ) -> crate::common::RegisterField<
4329 8,
4330 0x1,
4331 1,
4332 0,
4333 adcmpansr0::Cmpcha08,
4334 adcmpansr0::Cmpcha08,
4335 Adcmpansr0_SPEC,
4336 crate::common::RW,
4337 > {
4338 crate::common::RegisterField::<
4339 8,
4340 0x1,
4341 1,
4342 0,
4343 adcmpansr0::Cmpcha08,
4344 adcmpansr0::Cmpcha08,
4345 Adcmpansr0_SPEC,
4346 crate::common::RW,
4347 >::from_register(self, 0)
4348 }
4349
4350 #[doc = "Compare Window A Channel Select"]
4351 #[inline(always)]
4352 pub fn cmpcha09(
4353 self,
4354 ) -> crate::common::RegisterField<
4355 9,
4356 0x1,
4357 1,
4358 0,
4359 adcmpansr0::Cmpcha09,
4360 adcmpansr0::Cmpcha09,
4361 Adcmpansr0_SPEC,
4362 crate::common::RW,
4363 > {
4364 crate::common::RegisterField::<
4365 9,
4366 0x1,
4367 1,
4368 0,
4369 adcmpansr0::Cmpcha09,
4370 adcmpansr0::Cmpcha09,
4371 Adcmpansr0_SPEC,
4372 crate::common::RW,
4373 >::from_register(self, 0)
4374 }
4375
4376 #[doc = "Compare Window A Channel Select"]
4377 #[inline(always)]
4378 pub fn cmpcha10(
4379 self,
4380 ) -> crate::common::RegisterField<
4381 10,
4382 0x1,
4383 1,
4384 0,
4385 adcmpansr0::Cmpcha10,
4386 adcmpansr0::Cmpcha10,
4387 Adcmpansr0_SPEC,
4388 crate::common::RW,
4389 > {
4390 crate::common::RegisterField::<
4391 10,
4392 0x1,
4393 1,
4394 0,
4395 adcmpansr0::Cmpcha10,
4396 adcmpansr0::Cmpcha10,
4397 Adcmpansr0_SPEC,
4398 crate::common::RW,
4399 >::from_register(self, 0)
4400 }
4401}
4402impl ::core::default::Default for Adcmpansr0 {
4403 #[inline(always)]
4404 fn default() -> Adcmpansr0 {
4405 <crate::RegValueT<Adcmpansr0_SPEC> as RegisterValue<_>>::new(0)
4406 }
4407}
4408pub mod adcmpansr0 {
4409
4410 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4411 pub struct Cmpcha0_SPEC;
4412 pub type Cmpcha0 = crate::EnumBitfieldStruct<u8, Cmpcha0_SPEC>;
4413 impl Cmpcha0 {
4414 #[doc = "Disable compare function for associated input channel"]
4415 pub const _0: Self = Self::new(0);
4416
4417 #[doc = "Enable compare function for associated input channel"]
4418 pub const _1: Self = Self::new(1);
4419 }
4420 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4421 pub struct Cmpcha1_SPEC;
4422 pub type Cmpcha1 = crate::EnumBitfieldStruct<u8, Cmpcha1_SPEC>;
4423 impl Cmpcha1 {
4424 #[doc = "Disable compare function for associated input channel"]
4425 pub const _0: Self = Self::new(0);
4426
4427 #[doc = "Enable compare function for associated input channel"]
4428 pub const _1: Self = Self::new(1);
4429 }
4430 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4431 pub struct Cmpcha2_SPEC;
4432 pub type Cmpcha2 = crate::EnumBitfieldStruct<u8, Cmpcha2_SPEC>;
4433 impl Cmpcha2 {
4434 #[doc = "Disable compare function for associated input channel"]
4435 pub const _0: Self = Self::new(0);
4436
4437 #[doc = "Enable compare function for associated input channel"]
4438 pub const _1: Self = Self::new(1);
4439 }
4440 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4441 pub struct Cmpcha05_SPEC;
4442 pub type Cmpcha05 = crate::EnumBitfieldStruct<u8, Cmpcha05_SPEC>;
4443 impl Cmpcha05 {
4444 #[doc = "Disable compare function for associated input channel"]
4445 pub const _0: Self = Self::new(0);
4446
4447 #[doc = "Enable compare function for associated input channel"]
4448 pub const _1: Self = Self::new(1);
4449 }
4450 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4451 pub struct Cmpcha06_SPEC;
4452 pub type Cmpcha06 = crate::EnumBitfieldStruct<u8, Cmpcha06_SPEC>;
4453 impl Cmpcha06 {
4454 #[doc = "Disable compare function for associated input channel"]
4455 pub const _0: Self = Self::new(0);
4456
4457 #[doc = "Enable compare function for associated input channel"]
4458 pub const _1: Self = Self::new(1);
4459 }
4460 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4461 pub struct Cmpcha07_SPEC;
4462 pub type Cmpcha07 = crate::EnumBitfieldStruct<u8, Cmpcha07_SPEC>;
4463 impl Cmpcha07 {
4464 #[doc = "Disable compare function for associated input channel"]
4465 pub const _0: Self = Self::new(0);
4466
4467 #[doc = "Enable compare function for associated input channel"]
4468 pub const _1: Self = Self::new(1);
4469 }
4470 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4471 pub struct Cmpcha08_SPEC;
4472 pub type Cmpcha08 = crate::EnumBitfieldStruct<u8, Cmpcha08_SPEC>;
4473 impl Cmpcha08 {
4474 #[doc = "Disable compare function for associated input channel"]
4475 pub const _0: Self = Self::new(0);
4476
4477 #[doc = "Enable compare function for associated input channel"]
4478 pub const _1: Self = Self::new(1);
4479 }
4480 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4481 pub struct Cmpcha09_SPEC;
4482 pub type Cmpcha09 = crate::EnumBitfieldStruct<u8, Cmpcha09_SPEC>;
4483 impl Cmpcha09 {
4484 #[doc = "Disable compare function for associated input channel"]
4485 pub const _0: Self = Self::new(0);
4486
4487 #[doc = "Enable compare function for associated input channel"]
4488 pub const _1: Self = Self::new(1);
4489 }
4490 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4491 pub struct Cmpcha10_SPEC;
4492 pub type Cmpcha10 = crate::EnumBitfieldStruct<u8, Cmpcha10_SPEC>;
4493 impl Cmpcha10 {
4494 #[doc = "Disable compare function for associated input channel"]
4495 pub const _0: Self = Self::new(0);
4496
4497 #[doc = "Enable compare function for associated input channel"]
4498 pub const _1: Self = Self::new(1);
4499 }
4500}
4501#[doc(hidden)]
4502#[derive(Copy, Clone, Eq, PartialEq)]
4503pub struct Adcmpansr1_SPEC;
4504impl crate::sealed::RegSpec for Adcmpansr1_SPEC {
4505 type DataType = u16;
4506}
4507
4508#[doc = "A/D Compare Function Window A Channel Select Register 1"]
4509pub type Adcmpansr1 = crate::RegValueT<Adcmpansr1_SPEC>;
4510
4511impl Adcmpansr1 {
4512 #[doc = "Compare Window A Channel Select"]
4513 #[inline(always)]
4514 pub fn cmpcha19(
4515 self,
4516 ) -> crate::common::RegisterField<
4517 3,
4518 0x1,
4519 1,
4520 0,
4521 adcmpansr1::Cmpcha19,
4522 adcmpansr1::Cmpcha19,
4523 Adcmpansr1_SPEC,
4524 crate::common::RW,
4525 > {
4526 crate::common::RegisterField::<
4527 3,
4528 0x1,
4529 1,
4530 0,
4531 adcmpansr1::Cmpcha19,
4532 adcmpansr1::Cmpcha19,
4533 Adcmpansr1_SPEC,
4534 crate::common::RW,
4535 >::from_register(self, 0)
4536 }
4537
4538 #[doc = "Compare Window A Channel Select"]
4539 #[inline(always)]
4540 pub fn cmpcha20(
4541 self,
4542 ) -> crate::common::RegisterField<
4543 4,
4544 0x1,
4545 1,
4546 0,
4547 adcmpansr1::Cmpcha20,
4548 adcmpansr1::Cmpcha20,
4549 Adcmpansr1_SPEC,
4550 crate::common::RW,
4551 > {
4552 crate::common::RegisterField::<
4553 4,
4554 0x1,
4555 1,
4556 0,
4557 adcmpansr1::Cmpcha20,
4558 adcmpansr1::Cmpcha20,
4559 Adcmpansr1_SPEC,
4560 crate::common::RW,
4561 >::from_register(self, 0)
4562 }
4563
4564 #[doc = "Compare Window A Channel Select"]
4565 #[inline(always)]
4566 pub fn cmpcha21(
4567 self,
4568 ) -> crate::common::RegisterField<
4569 5,
4570 0x1,
4571 1,
4572 0,
4573 adcmpansr1::Cmpcha21,
4574 adcmpansr1::Cmpcha21,
4575 Adcmpansr1_SPEC,
4576 crate::common::RW,
4577 > {
4578 crate::common::RegisterField::<
4579 5,
4580 0x1,
4581 1,
4582 0,
4583 adcmpansr1::Cmpcha21,
4584 adcmpansr1::Cmpcha21,
4585 Adcmpansr1_SPEC,
4586 crate::common::RW,
4587 >::from_register(self, 0)
4588 }
4589
4590 #[doc = "Compare Window A Channel Select"]
4591 #[inline(always)]
4592 pub fn cmpcha22(
4593 self,
4594 ) -> crate::common::RegisterField<
4595 6,
4596 0x1,
4597 1,
4598 0,
4599 adcmpansr1::Cmpcha22,
4600 adcmpansr1::Cmpcha22,
4601 Adcmpansr1_SPEC,
4602 crate::common::RW,
4603 > {
4604 crate::common::RegisterField::<
4605 6,
4606 0x1,
4607 1,
4608 0,
4609 adcmpansr1::Cmpcha22,
4610 adcmpansr1::Cmpcha22,
4611 Adcmpansr1_SPEC,
4612 crate::common::RW,
4613 >::from_register(self, 0)
4614 }
4615}
4616impl ::core::default::Default for Adcmpansr1 {
4617 #[inline(always)]
4618 fn default() -> Adcmpansr1 {
4619 <crate::RegValueT<Adcmpansr1_SPEC> as RegisterValue<_>>::new(0)
4620 }
4621}
4622pub mod adcmpansr1 {
4623
4624 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4625 pub struct Cmpcha19_SPEC;
4626 pub type Cmpcha19 = crate::EnumBitfieldStruct<u8, Cmpcha19_SPEC>;
4627 impl Cmpcha19 {
4628 #[doc = "Disable compare function for associated input channel"]
4629 pub const _0: Self = Self::new(0);
4630
4631 #[doc = "Enable compare function for associated input channel"]
4632 pub const _1: Self = Self::new(1);
4633 }
4634 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4635 pub struct Cmpcha20_SPEC;
4636 pub type Cmpcha20 = crate::EnumBitfieldStruct<u8, Cmpcha20_SPEC>;
4637 impl Cmpcha20 {
4638 #[doc = "Disable compare function for associated input channel"]
4639 pub const _0: Self = Self::new(0);
4640
4641 #[doc = "Enable compare function for associated input channel"]
4642 pub const _1: Self = Self::new(1);
4643 }
4644 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4645 pub struct Cmpcha21_SPEC;
4646 pub type Cmpcha21 = crate::EnumBitfieldStruct<u8, Cmpcha21_SPEC>;
4647 impl Cmpcha21 {
4648 #[doc = "Disable compare function for associated input channel"]
4649 pub const _0: Self = Self::new(0);
4650
4651 #[doc = "Enable compare function for associated input channel"]
4652 pub const _1: Self = Self::new(1);
4653 }
4654 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4655 pub struct Cmpcha22_SPEC;
4656 pub type Cmpcha22 = crate::EnumBitfieldStruct<u8, Cmpcha22_SPEC>;
4657 impl Cmpcha22 {
4658 #[doc = "Disable compare function for associated input channel"]
4659 pub const _0: Self = Self::new(0);
4660
4661 #[doc = "Enable compare function for associated input channel"]
4662 pub const _1: Self = Self::new(1);
4663 }
4664}
4665#[doc(hidden)]
4666#[derive(Copy, Clone, Eq, PartialEq)]
4667pub struct Adcmplr0_SPEC;
4668impl crate::sealed::RegSpec for Adcmplr0_SPEC {
4669 type DataType = u16;
4670}
4671
4672#[doc = "A/D Compare Function Window A Comparison Condition Setting Register 0"]
4673pub type Adcmplr0 = crate::RegValueT<Adcmplr0_SPEC>;
4674
4675impl Adcmplr0 {
4676 #[doc = "Compare Window A Comparison Condition Select"]
4677 #[inline(always)]
4678 pub fn cmplcha0(
4679 self,
4680 ) -> crate::common::RegisterField<
4681 0,
4682 0x1,
4683 1,
4684 0,
4685 adcmplr0::Cmplcha0,
4686 adcmplr0::Cmplcha0,
4687 Adcmplr0_SPEC,
4688 crate::common::RW,
4689 > {
4690 crate::common::RegisterField::<
4691 0,
4692 0x1,
4693 1,
4694 0,
4695 adcmplr0::Cmplcha0,
4696 adcmplr0::Cmplcha0,
4697 Adcmplr0_SPEC,
4698 crate::common::RW,
4699 >::from_register(self, 0)
4700 }
4701
4702 #[doc = "Compare Window A Comparison Condition Select"]
4703 #[inline(always)]
4704 pub fn cmplcha1(
4705 self,
4706 ) -> crate::common::RegisterField<
4707 1,
4708 0x1,
4709 1,
4710 0,
4711 adcmplr0::Cmplcha1,
4712 adcmplr0::Cmplcha1,
4713 Adcmplr0_SPEC,
4714 crate::common::RW,
4715 > {
4716 crate::common::RegisterField::<
4717 1,
4718 0x1,
4719 1,
4720 0,
4721 adcmplr0::Cmplcha1,
4722 adcmplr0::Cmplcha1,
4723 Adcmplr0_SPEC,
4724 crate::common::RW,
4725 >::from_register(self, 0)
4726 }
4727
4728 #[doc = "Compare Window A Comparison Condition Select"]
4729 #[inline(always)]
4730 pub fn cmplcha2(
4731 self,
4732 ) -> crate::common::RegisterField<
4733 2,
4734 0x1,
4735 1,
4736 0,
4737 adcmplr0::Cmplcha2,
4738 adcmplr0::Cmplcha2,
4739 Adcmplr0_SPEC,
4740 crate::common::RW,
4741 > {
4742 crate::common::RegisterField::<
4743 2,
4744 0x1,
4745 1,
4746 0,
4747 adcmplr0::Cmplcha2,
4748 adcmplr0::Cmplcha2,
4749 Adcmplr0_SPEC,
4750 crate::common::RW,
4751 >::from_register(self, 0)
4752 }
4753
4754 #[doc = "Compare Window A Comparison Condition Select"]
4755 #[inline(always)]
4756 pub fn cmplcha05(
4757 self,
4758 ) -> crate::common::RegisterField<
4759 5,
4760 0x1,
4761 1,
4762 0,
4763 adcmplr0::Cmplcha05,
4764 adcmplr0::Cmplcha05,
4765 Adcmplr0_SPEC,
4766 crate::common::RW,
4767 > {
4768 crate::common::RegisterField::<
4769 5,
4770 0x1,
4771 1,
4772 0,
4773 adcmplr0::Cmplcha05,
4774 adcmplr0::Cmplcha05,
4775 Adcmplr0_SPEC,
4776 crate::common::RW,
4777 >::from_register(self, 0)
4778 }
4779
4780 #[doc = "Compare Window A Comparison Condition Select"]
4781 #[inline(always)]
4782 pub fn cmplcha06(
4783 self,
4784 ) -> crate::common::RegisterField<
4785 6,
4786 0x1,
4787 1,
4788 0,
4789 adcmplr0::Cmplcha06,
4790 adcmplr0::Cmplcha06,
4791 Adcmplr0_SPEC,
4792 crate::common::RW,
4793 > {
4794 crate::common::RegisterField::<
4795 6,
4796 0x1,
4797 1,
4798 0,
4799 adcmplr0::Cmplcha06,
4800 adcmplr0::Cmplcha06,
4801 Adcmplr0_SPEC,
4802 crate::common::RW,
4803 >::from_register(self, 0)
4804 }
4805
4806 #[doc = "Compare Window A Comparison Condition Select"]
4807 #[inline(always)]
4808 pub fn cmplcha07(
4809 self,
4810 ) -> crate::common::RegisterField<
4811 7,
4812 0x1,
4813 1,
4814 0,
4815 adcmplr0::Cmplcha07,
4816 adcmplr0::Cmplcha07,
4817 Adcmplr0_SPEC,
4818 crate::common::RW,
4819 > {
4820 crate::common::RegisterField::<
4821 7,
4822 0x1,
4823 1,
4824 0,
4825 adcmplr0::Cmplcha07,
4826 adcmplr0::Cmplcha07,
4827 Adcmplr0_SPEC,
4828 crate::common::RW,
4829 >::from_register(self, 0)
4830 }
4831
4832 #[doc = "Compare Window A Comparison Condition Select"]
4833 #[inline(always)]
4834 pub fn cmplcha08(
4835 self,
4836 ) -> crate::common::RegisterField<
4837 8,
4838 0x1,
4839 1,
4840 0,
4841 adcmplr0::Cmplcha08,
4842 adcmplr0::Cmplcha08,
4843 Adcmplr0_SPEC,
4844 crate::common::RW,
4845 > {
4846 crate::common::RegisterField::<
4847 8,
4848 0x1,
4849 1,
4850 0,
4851 adcmplr0::Cmplcha08,
4852 adcmplr0::Cmplcha08,
4853 Adcmplr0_SPEC,
4854 crate::common::RW,
4855 >::from_register(self, 0)
4856 }
4857
4858 #[doc = "Compare Window A Comparison Condition Select"]
4859 #[inline(always)]
4860 pub fn cmplcha09(
4861 self,
4862 ) -> crate::common::RegisterField<
4863 9,
4864 0x1,
4865 1,
4866 0,
4867 adcmplr0::Cmplcha09,
4868 adcmplr0::Cmplcha09,
4869 Adcmplr0_SPEC,
4870 crate::common::RW,
4871 > {
4872 crate::common::RegisterField::<
4873 9,
4874 0x1,
4875 1,
4876 0,
4877 adcmplr0::Cmplcha09,
4878 adcmplr0::Cmplcha09,
4879 Adcmplr0_SPEC,
4880 crate::common::RW,
4881 >::from_register(self, 0)
4882 }
4883
4884 #[doc = "Compare Window A Comparison Condition Select"]
4885 #[inline(always)]
4886 pub fn cmplcha10(
4887 self,
4888 ) -> crate::common::RegisterField<
4889 10,
4890 0x1,
4891 1,
4892 0,
4893 adcmplr0::Cmplcha10,
4894 adcmplr0::Cmplcha10,
4895 Adcmplr0_SPEC,
4896 crate::common::RW,
4897 > {
4898 crate::common::RegisterField::<
4899 10,
4900 0x1,
4901 1,
4902 0,
4903 adcmplr0::Cmplcha10,
4904 adcmplr0::Cmplcha10,
4905 Adcmplr0_SPEC,
4906 crate::common::RW,
4907 >::from_register(self, 0)
4908 }
4909}
4910impl ::core::default::Default for Adcmplr0 {
4911 #[inline(always)]
4912 fn default() -> Adcmplr0 {
4913 <crate::RegValueT<Adcmplr0_SPEC> as RegisterValue<_>>::new(0)
4914 }
4915}
4916pub mod adcmplr0 {
4917
4918 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4919 pub struct Cmplcha0_SPEC;
4920 pub type Cmplcha0 = crate::EnumBitfieldStruct<u8, Cmplcha0_SPEC>;
4921 impl Cmplcha0 {
4922 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
4923 pub const _0: Self = Self::new(0);
4924
4925 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
4926 pub const _1: Self = Self::new(1);
4927 }
4928 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4929 pub struct Cmplcha1_SPEC;
4930 pub type Cmplcha1 = crate::EnumBitfieldStruct<u8, Cmplcha1_SPEC>;
4931 impl Cmplcha1 {
4932 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
4933 pub const _0: Self = Self::new(0);
4934
4935 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
4936 pub const _1: Self = Self::new(1);
4937 }
4938 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4939 pub struct Cmplcha2_SPEC;
4940 pub type Cmplcha2 = crate::EnumBitfieldStruct<u8, Cmplcha2_SPEC>;
4941 impl Cmplcha2 {
4942 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
4943 pub const _0: Self = Self::new(0);
4944
4945 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
4946 pub const _1: Self = Self::new(1);
4947 }
4948 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4949 pub struct Cmplcha05_SPEC;
4950 pub type Cmplcha05 = crate::EnumBitfieldStruct<u8, Cmplcha05_SPEC>;
4951 impl Cmplcha05 {
4952 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
4953 pub const _0: Self = Self::new(0);
4954
4955 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
4956 pub const _1: Self = Self::new(1);
4957 }
4958 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4959 pub struct Cmplcha06_SPEC;
4960 pub type Cmplcha06 = crate::EnumBitfieldStruct<u8, Cmplcha06_SPEC>;
4961 impl Cmplcha06 {
4962 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
4963 pub const _0: Self = Self::new(0);
4964
4965 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
4966 pub const _1: Self = Self::new(1);
4967 }
4968 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4969 pub struct Cmplcha07_SPEC;
4970 pub type Cmplcha07 = crate::EnumBitfieldStruct<u8, Cmplcha07_SPEC>;
4971 impl Cmplcha07 {
4972 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
4973 pub const _0: Self = Self::new(0);
4974
4975 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
4976 pub const _1: Self = Self::new(1);
4977 }
4978 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4979 pub struct Cmplcha08_SPEC;
4980 pub type Cmplcha08 = crate::EnumBitfieldStruct<u8, Cmplcha08_SPEC>;
4981 impl Cmplcha08 {
4982 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
4983 pub const _0: Self = Self::new(0);
4984
4985 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
4986 pub const _1: Self = Self::new(1);
4987 }
4988 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4989 pub struct Cmplcha09_SPEC;
4990 pub type Cmplcha09 = crate::EnumBitfieldStruct<u8, Cmplcha09_SPEC>;
4991 impl Cmplcha09 {
4992 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
4993 pub const _0: Self = Self::new(0);
4994
4995 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
4996 pub const _1: Self = Self::new(1);
4997 }
4998 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4999 pub struct Cmplcha10_SPEC;
5000 pub type Cmplcha10 = crate::EnumBitfieldStruct<u8, Cmplcha10_SPEC>;
5001 impl Cmplcha10 {
5002 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
5003 pub const _0: Self = Self::new(0);
5004
5005 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
5006 pub const _1: Self = Self::new(1);
5007 }
5008}
5009#[doc(hidden)]
5010#[derive(Copy, Clone, Eq, PartialEq)]
5011pub struct Adcmplr1_SPEC;
5012impl crate::sealed::RegSpec for Adcmplr1_SPEC {
5013 type DataType = u16;
5014}
5015
5016#[doc = "A/D Compare Function Window A Comparison Condition Setting Register 1"]
5017pub type Adcmplr1 = crate::RegValueT<Adcmplr1_SPEC>;
5018
5019impl Adcmplr1 {
5020 #[doc = "Compare Window A Comparison Condition Select"]
5021 #[inline(always)]
5022 pub fn cmplcha19(
5023 self,
5024 ) -> crate::common::RegisterField<
5025 3,
5026 0x1,
5027 1,
5028 0,
5029 adcmplr1::Cmplcha19,
5030 adcmplr1::Cmplcha19,
5031 Adcmplr1_SPEC,
5032 crate::common::RW,
5033 > {
5034 crate::common::RegisterField::<
5035 3,
5036 0x1,
5037 1,
5038 0,
5039 adcmplr1::Cmplcha19,
5040 adcmplr1::Cmplcha19,
5041 Adcmplr1_SPEC,
5042 crate::common::RW,
5043 >::from_register(self, 0)
5044 }
5045
5046 #[doc = "Compare Window A Comparison Condition Select"]
5047 #[inline(always)]
5048 pub fn cmplcha20(
5049 self,
5050 ) -> crate::common::RegisterField<
5051 4,
5052 0x1,
5053 1,
5054 0,
5055 adcmplr1::Cmplcha20,
5056 adcmplr1::Cmplcha20,
5057 Adcmplr1_SPEC,
5058 crate::common::RW,
5059 > {
5060 crate::common::RegisterField::<
5061 4,
5062 0x1,
5063 1,
5064 0,
5065 adcmplr1::Cmplcha20,
5066 adcmplr1::Cmplcha20,
5067 Adcmplr1_SPEC,
5068 crate::common::RW,
5069 >::from_register(self, 0)
5070 }
5071
5072 #[doc = "Compare Window A Comparison Condition Select"]
5073 #[inline(always)]
5074 pub fn cmplcha21(
5075 self,
5076 ) -> crate::common::RegisterField<
5077 5,
5078 0x1,
5079 1,
5080 0,
5081 adcmplr1::Cmplcha21,
5082 adcmplr1::Cmplcha21,
5083 Adcmplr1_SPEC,
5084 crate::common::RW,
5085 > {
5086 crate::common::RegisterField::<
5087 5,
5088 0x1,
5089 1,
5090 0,
5091 adcmplr1::Cmplcha21,
5092 adcmplr1::Cmplcha21,
5093 Adcmplr1_SPEC,
5094 crate::common::RW,
5095 >::from_register(self, 0)
5096 }
5097
5098 #[doc = "Compare Window A Comparison Condition Select"]
5099 #[inline(always)]
5100 pub fn cmplcha22(
5101 self,
5102 ) -> crate::common::RegisterField<
5103 6,
5104 0x1,
5105 1,
5106 0,
5107 adcmplr1::Cmplcha22,
5108 adcmplr1::Cmplcha22,
5109 Adcmplr1_SPEC,
5110 crate::common::RW,
5111 > {
5112 crate::common::RegisterField::<
5113 6,
5114 0x1,
5115 1,
5116 0,
5117 adcmplr1::Cmplcha22,
5118 adcmplr1::Cmplcha22,
5119 Adcmplr1_SPEC,
5120 crate::common::RW,
5121 >::from_register(self, 0)
5122 }
5123}
5124impl ::core::default::Default for Adcmplr1 {
5125 #[inline(always)]
5126 fn default() -> Adcmplr1 {
5127 <crate::RegValueT<Adcmplr1_SPEC> as RegisterValue<_>>::new(0)
5128 }
5129}
5130pub mod adcmplr1 {
5131
5132 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5133 pub struct Cmplcha19_SPEC;
5134 pub type Cmplcha19 = crate::EnumBitfieldStruct<u8, Cmplcha19_SPEC>;
5135 impl Cmplcha19 {
5136 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
5137 pub const _0: Self = Self::new(0);
5138
5139 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
5140 pub const _1: Self = Self::new(1);
5141 }
5142 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5143 pub struct Cmplcha20_SPEC;
5144 pub type Cmplcha20 = crate::EnumBitfieldStruct<u8, Cmplcha20_SPEC>;
5145 impl Cmplcha20 {
5146 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
5147 pub const _0: Self = Self::new(0);
5148
5149 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
5150 pub const _1: Self = Self::new(1);
5151 }
5152 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5153 pub struct Cmplcha21_SPEC;
5154 pub type Cmplcha21 = crate::EnumBitfieldStruct<u8, Cmplcha21_SPEC>;
5155 impl Cmplcha21 {
5156 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
5157 pub const _0: Self = Self::new(0);
5158
5159 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
5160 pub const _1: Self = Self::new(1);
5161 }
5162 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5163 pub struct Cmplcha22_SPEC;
5164 pub type Cmplcha22 = crate::EnumBitfieldStruct<u8, Cmplcha22_SPEC>;
5165 impl Cmplcha22 {
5166 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
5167 pub const _0: Self = Self::new(0);
5168
5169 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
5170 pub const _1: Self = Self::new(1);
5171 }
5172}
5173#[doc(hidden)]
5174#[derive(Copy, Clone, Eq, PartialEq)]
5175pub struct Adcmpdr_SPEC;
5176impl crate::sealed::RegSpec for Adcmpdr_SPEC {
5177 type DataType = u16;
5178}
5179
5180#[doc = "A/D Compare Function Window A Lower-Side/Upper-Side Level Setting Register"]
5181pub type Adcmpdr = crate::RegValueT<Adcmpdr_SPEC>;
5182
5183impl NoBitfieldReg<Adcmpdr_SPEC> for Adcmpdr {}
5184impl ::core::default::Default for Adcmpdr {
5185 #[inline(always)]
5186 fn default() -> Adcmpdr {
5187 <crate::RegValueT<Adcmpdr_SPEC> as RegisterValue<_>>::new(0)
5188 }
5189}
5190
5191#[doc(hidden)]
5192#[derive(Copy, Clone, Eq, PartialEq)]
5193pub struct Adcmpsr0_SPEC;
5194impl crate::sealed::RegSpec for Adcmpsr0_SPEC {
5195 type DataType = u16;
5196}
5197
5198#[doc = "A/D Compare Function Window A Channel Status Register 0"]
5199pub type Adcmpsr0 = crate::RegValueT<Adcmpsr0_SPEC>;
5200
5201impl Adcmpsr0 {
5202 #[doc = "Compare Window A Flag"]
5203 #[inline(always)]
5204 pub fn cmpstcha0(
5205 self,
5206 ) -> crate::common::RegisterField<
5207 0,
5208 0x1,
5209 1,
5210 0,
5211 adcmpsr0::Cmpstcha0,
5212 adcmpsr0::Cmpstcha0,
5213 Adcmpsr0_SPEC,
5214 crate::common::RW,
5215 > {
5216 crate::common::RegisterField::<
5217 0,
5218 0x1,
5219 1,
5220 0,
5221 adcmpsr0::Cmpstcha0,
5222 adcmpsr0::Cmpstcha0,
5223 Adcmpsr0_SPEC,
5224 crate::common::RW,
5225 >::from_register(self, 0)
5226 }
5227
5228 #[doc = "Compare Window A Flag"]
5229 #[inline(always)]
5230 pub fn cmpstcha1(
5231 self,
5232 ) -> crate::common::RegisterField<
5233 1,
5234 0x1,
5235 1,
5236 0,
5237 adcmpsr0::Cmpstcha1,
5238 adcmpsr0::Cmpstcha1,
5239 Adcmpsr0_SPEC,
5240 crate::common::RW,
5241 > {
5242 crate::common::RegisterField::<
5243 1,
5244 0x1,
5245 1,
5246 0,
5247 adcmpsr0::Cmpstcha1,
5248 adcmpsr0::Cmpstcha1,
5249 Adcmpsr0_SPEC,
5250 crate::common::RW,
5251 >::from_register(self, 0)
5252 }
5253
5254 #[doc = "Compare Window A Flag"]
5255 #[inline(always)]
5256 pub fn cmpstcha2(
5257 self,
5258 ) -> crate::common::RegisterField<
5259 2,
5260 0x1,
5261 1,
5262 0,
5263 adcmpsr0::Cmpstcha2,
5264 adcmpsr0::Cmpstcha2,
5265 Adcmpsr0_SPEC,
5266 crate::common::RW,
5267 > {
5268 crate::common::RegisterField::<
5269 2,
5270 0x1,
5271 1,
5272 0,
5273 adcmpsr0::Cmpstcha2,
5274 adcmpsr0::Cmpstcha2,
5275 Adcmpsr0_SPEC,
5276 crate::common::RW,
5277 >::from_register(self, 0)
5278 }
5279
5280 #[doc = "Compare Window A Flag"]
5281 #[inline(always)]
5282 pub fn cmpstcha05(
5283 self,
5284 ) -> crate::common::RegisterField<
5285 5,
5286 0x1,
5287 1,
5288 0,
5289 adcmpsr0::Cmpstcha05,
5290 adcmpsr0::Cmpstcha05,
5291 Adcmpsr0_SPEC,
5292 crate::common::RW,
5293 > {
5294 crate::common::RegisterField::<
5295 5,
5296 0x1,
5297 1,
5298 0,
5299 adcmpsr0::Cmpstcha05,
5300 adcmpsr0::Cmpstcha05,
5301 Adcmpsr0_SPEC,
5302 crate::common::RW,
5303 >::from_register(self, 0)
5304 }
5305
5306 #[doc = "Compare Window A Flag"]
5307 #[inline(always)]
5308 pub fn cmpstcha06(
5309 self,
5310 ) -> crate::common::RegisterField<
5311 6,
5312 0x1,
5313 1,
5314 0,
5315 adcmpsr0::Cmpstcha06,
5316 adcmpsr0::Cmpstcha06,
5317 Adcmpsr0_SPEC,
5318 crate::common::RW,
5319 > {
5320 crate::common::RegisterField::<
5321 6,
5322 0x1,
5323 1,
5324 0,
5325 adcmpsr0::Cmpstcha06,
5326 adcmpsr0::Cmpstcha06,
5327 Adcmpsr0_SPEC,
5328 crate::common::RW,
5329 >::from_register(self, 0)
5330 }
5331
5332 #[doc = "Compare Window A Flag"]
5333 #[inline(always)]
5334 pub fn cmpstcha07(
5335 self,
5336 ) -> crate::common::RegisterField<
5337 7,
5338 0x1,
5339 1,
5340 0,
5341 adcmpsr0::Cmpstcha07,
5342 adcmpsr0::Cmpstcha07,
5343 Adcmpsr0_SPEC,
5344 crate::common::RW,
5345 > {
5346 crate::common::RegisterField::<
5347 7,
5348 0x1,
5349 1,
5350 0,
5351 adcmpsr0::Cmpstcha07,
5352 adcmpsr0::Cmpstcha07,
5353 Adcmpsr0_SPEC,
5354 crate::common::RW,
5355 >::from_register(self, 0)
5356 }
5357
5358 #[doc = "Compare Window A Flag"]
5359 #[inline(always)]
5360 pub fn cmpstcha08(
5361 self,
5362 ) -> crate::common::RegisterField<
5363 8,
5364 0x1,
5365 1,
5366 0,
5367 adcmpsr0::Cmpstcha08,
5368 adcmpsr0::Cmpstcha08,
5369 Adcmpsr0_SPEC,
5370 crate::common::RW,
5371 > {
5372 crate::common::RegisterField::<
5373 8,
5374 0x1,
5375 1,
5376 0,
5377 adcmpsr0::Cmpstcha08,
5378 adcmpsr0::Cmpstcha08,
5379 Adcmpsr0_SPEC,
5380 crate::common::RW,
5381 >::from_register(self, 0)
5382 }
5383
5384 #[doc = "Compare Window A Flag"]
5385 #[inline(always)]
5386 pub fn cmpstcha09(
5387 self,
5388 ) -> crate::common::RegisterField<
5389 9,
5390 0x1,
5391 1,
5392 0,
5393 adcmpsr0::Cmpstcha09,
5394 adcmpsr0::Cmpstcha09,
5395 Adcmpsr0_SPEC,
5396 crate::common::RW,
5397 > {
5398 crate::common::RegisterField::<
5399 9,
5400 0x1,
5401 1,
5402 0,
5403 adcmpsr0::Cmpstcha09,
5404 adcmpsr0::Cmpstcha09,
5405 Adcmpsr0_SPEC,
5406 crate::common::RW,
5407 >::from_register(self, 0)
5408 }
5409
5410 #[doc = "Compare Window A Flag"]
5411 #[inline(always)]
5412 pub fn cmpstcha10(
5413 self,
5414 ) -> crate::common::RegisterField<
5415 10,
5416 0x1,
5417 1,
5418 0,
5419 adcmpsr0::Cmpstcha10,
5420 adcmpsr0::Cmpstcha10,
5421 Adcmpsr0_SPEC,
5422 crate::common::RW,
5423 > {
5424 crate::common::RegisterField::<
5425 10,
5426 0x1,
5427 1,
5428 0,
5429 adcmpsr0::Cmpstcha10,
5430 adcmpsr0::Cmpstcha10,
5431 Adcmpsr0_SPEC,
5432 crate::common::RW,
5433 >::from_register(self, 0)
5434 }
5435}
5436impl ::core::default::Default for Adcmpsr0 {
5437 #[inline(always)]
5438 fn default() -> Adcmpsr0 {
5439 <crate::RegValueT<Adcmpsr0_SPEC> as RegisterValue<_>>::new(0)
5440 }
5441}
5442pub mod adcmpsr0 {
5443
5444 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5445 pub struct Cmpstcha0_SPEC;
5446 pub type Cmpstcha0 = crate::EnumBitfieldStruct<u8, Cmpstcha0_SPEC>;
5447 impl Cmpstcha0 {
5448 #[doc = "Comparison conditions are not met."]
5449 pub const _0: Self = Self::new(0);
5450
5451 #[doc = "Comparison conditions are met."]
5452 pub const _1: Self = Self::new(1);
5453 }
5454 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5455 pub struct Cmpstcha1_SPEC;
5456 pub type Cmpstcha1 = crate::EnumBitfieldStruct<u8, Cmpstcha1_SPEC>;
5457 impl Cmpstcha1 {
5458 #[doc = "Comparison conditions are not met."]
5459 pub const _0: Self = Self::new(0);
5460
5461 #[doc = "Comparison conditions are met."]
5462 pub const _1: Self = Self::new(1);
5463 }
5464 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5465 pub struct Cmpstcha2_SPEC;
5466 pub type Cmpstcha2 = crate::EnumBitfieldStruct<u8, Cmpstcha2_SPEC>;
5467 impl Cmpstcha2 {
5468 #[doc = "Comparison conditions are not met."]
5469 pub const _0: Self = Self::new(0);
5470
5471 #[doc = "Comparison conditions are met."]
5472 pub const _1: Self = Self::new(1);
5473 }
5474 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5475 pub struct Cmpstcha05_SPEC;
5476 pub type Cmpstcha05 = crate::EnumBitfieldStruct<u8, Cmpstcha05_SPEC>;
5477 impl Cmpstcha05 {
5478 #[doc = "Comparison conditions are not met."]
5479 pub const _0: Self = Self::new(0);
5480
5481 #[doc = "Comparison conditions are met."]
5482 pub const _1: Self = Self::new(1);
5483 }
5484 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5485 pub struct Cmpstcha06_SPEC;
5486 pub type Cmpstcha06 = crate::EnumBitfieldStruct<u8, Cmpstcha06_SPEC>;
5487 impl Cmpstcha06 {
5488 #[doc = "Comparison conditions are not met."]
5489 pub const _0: Self = Self::new(0);
5490
5491 #[doc = "Comparison conditions are met."]
5492 pub const _1: Self = Self::new(1);
5493 }
5494 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5495 pub struct Cmpstcha07_SPEC;
5496 pub type Cmpstcha07 = crate::EnumBitfieldStruct<u8, Cmpstcha07_SPEC>;
5497 impl Cmpstcha07 {
5498 #[doc = "Comparison conditions are not met."]
5499 pub const _0: Self = Self::new(0);
5500
5501 #[doc = "Comparison conditions are met."]
5502 pub const _1: Self = Self::new(1);
5503 }
5504 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5505 pub struct Cmpstcha08_SPEC;
5506 pub type Cmpstcha08 = crate::EnumBitfieldStruct<u8, Cmpstcha08_SPEC>;
5507 impl Cmpstcha08 {
5508 #[doc = "Comparison conditions are not met."]
5509 pub const _0: Self = Self::new(0);
5510
5511 #[doc = "Comparison conditions are met."]
5512 pub const _1: Self = Self::new(1);
5513 }
5514 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5515 pub struct Cmpstcha09_SPEC;
5516 pub type Cmpstcha09 = crate::EnumBitfieldStruct<u8, Cmpstcha09_SPEC>;
5517 impl Cmpstcha09 {
5518 #[doc = "Comparison conditions are not met."]
5519 pub const _0: Self = Self::new(0);
5520
5521 #[doc = "Comparison conditions are met."]
5522 pub const _1: Self = Self::new(1);
5523 }
5524 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5525 pub struct Cmpstcha10_SPEC;
5526 pub type Cmpstcha10 = crate::EnumBitfieldStruct<u8, Cmpstcha10_SPEC>;
5527 impl Cmpstcha10 {
5528 #[doc = "Comparison conditions are not met."]
5529 pub const _0: Self = Self::new(0);
5530
5531 #[doc = "Comparison conditions are met."]
5532 pub const _1: Self = Self::new(1);
5533 }
5534}
5535#[doc(hidden)]
5536#[derive(Copy, Clone, Eq, PartialEq)]
5537pub struct Adcmpsr1_SPEC;
5538impl crate::sealed::RegSpec for Adcmpsr1_SPEC {
5539 type DataType = u16;
5540}
5541
5542#[doc = "A/D Compare Function Window A Channel Status Register1"]
5543pub type Adcmpsr1 = crate::RegValueT<Adcmpsr1_SPEC>;
5544
5545impl Adcmpsr1 {
5546 #[doc = "Compare Window A Flag"]
5547 #[inline(always)]
5548 pub fn cmpstcha19(
5549 self,
5550 ) -> crate::common::RegisterField<
5551 3,
5552 0x1,
5553 1,
5554 0,
5555 adcmpsr1::Cmpstcha19,
5556 adcmpsr1::Cmpstcha19,
5557 Adcmpsr1_SPEC,
5558 crate::common::RW,
5559 > {
5560 crate::common::RegisterField::<
5561 3,
5562 0x1,
5563 1,
5564 0,
5565 adcmpsr1::Cmpstcha19,
5566 adcmpsr1::Cmpstcha19,
5567 Adcmpsr1_SPEC,
5568 crate::common::RW,
5569 >::from_register(self, 0)
5570 }
5571
5572 #[doc = "Compare Window A Flag"]
5573 #[inline(always)]
5574 pub fn cmpstcha20(
5575 self,
5576 ) -> crate::common::RegisterField<
5577 4,
5578 0x1,
5579 1,
5580 0,
5581 adcmpsr1::Cmpstcha20,
5582 adcmpsr1::Cmpstcha20,
5583 Adcmpsr1_SPEC,
5584 crate::common::RW,
5585 > {
5586 crate::common::RegisterField::<
5587 4,
5588 0x1,
5589 1,
5590 0,
5591 adcmpsr1::Cmpstcha20,
5592 adcmpsr1::Cmpstcha20,
5593 Adcmpsr1_SPEC,
5594 crate::common::RW,
5595 >::from_register(self, 0)
5596 }
5597
5598 #[doc = "Compare Window A Flag"]
5599 #[inline(always)]
5600 pub fn cmpstcha21(
5601 self,
5602 ) -> crate::common::RegisterField<
5603 5,
5604 0x1,
5605 1,
5606 0,
5607 adcmpsr1::Cmpstcha21,
5608 adcmpsr1::Cmpstcha21,
5609 Adcmpsr1_SPEC,
5610 crate::common::RW,
5611 > {
5612 crate::common::RegisterField::<
5613 5,
5614 0x1,
5615 1,
5616 0,
5617 adcmpsr1::Cmpstcha21,
5618 adcmpsr1::Cmpstcha21,
5619 Adcmpsr1_SPEC,
5620 crate::common::RW,
5621 >::from_register(self, 0)
5622 }
5623
5624 #[doc = "Compare Window A Flag"]
5625 #[inline(always)]
5626 pub fn cmpstcha22(
5627 self,
5628 ) -> crate::common::RegisterField<
5629 6,
5630 0x1,
5631 1,
5632 0,
5633 adcmpsr1::Cmpstcha22,
5634 adcmpsr1::Cmpstcha22,
5635 Adcmpsr1_SPEC,
5636 crate::common::RW,
5637 > {
5638 crate::common::RegisterField::<
5639 6,
5640 0x1,
5641 1,
5642 0,
5643 adcmpsr1::Cmpstcha22,
5644 adcmpsr1::Cmpstcha22,
5645 Adcmpsr1_SPEC,
5646 crate::common::RW,
5647 >::from_register(self, 0)
5648 }
5649}
5650impl ::core::default::Default for Adcmpsr1 {
5651 #[inline(always)]
5652 fn default() -> Adcmpsr1 {
5653 <crate::RegValueT<Adcmpsr1_SPEC> as RegisterValue<_>>::new(0)
5654 }
5655}
5656pub mod adcmpsr1 {
5657
5658 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5659 pub struct Cmpstcha19_SPEC;
5660 pub type Cmpstcha19 = crate::EnumBitfieldStruct<u8, Cmpstcha19_SPEC>;
5661 impl Cmpstcha19 {
5662 #[doc = "Comparison conditions are not met."]
5663 pub const _0: Self = Self::new(0);
5664
5665 #[doc = "Comparison conditions are met."]
5666 pub const _1: Self = Self::new(1);
5667 }
5668 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5669 pub struct Cmpstcha20_SPEC;
5670 pub type Cmpstcha20 = crate::EnumBitfieldStruct<u8, Cmpstcha20_SPEC>;
5671 impl Cmpstcha20 {
5672 #[doc = "Comparison conditions are not met."]
5673 pub const _0: Self = Self::new(0);
5674
5675 #[doc = "Comparison conditions are met."]
5676 pub const _1: Self = Self::new(1);
5677 }
5678 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5679 pub struct Cmpstcha21_SPEC;
5680 pub type Cmpstcha21 = crate::EnumBitfieldStruct<u8, Cmpstcha21_SPEC>;
5681 impl Cmpstcha21 {
5682 #[doc = "Comparison conditions are not met."]
5683 pub const _0: Self = Self::new(0);
5684
5685 #[doc = "Comparison conditions are met."]
5686 pub const _1: Self = Self::new(1);
5687 }
5688 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5689 pub struct Cmpstcha22_SPEC;
5690 pub type Cmpstcha22 = crate::EnumBitfieldStruct<u8, Cmpstcha22_SPEC>;
5691 impl Cmpstcha22 {
5692 #[doc = "Comparison conditions are not met."]
5693 pub const _0: Self = Self::new(0);
5694
5695 #[doc = "Comparison conditions are met."]
5696 pub const _1: Self = Self::new(1);
5697 }
5698}
5699#[doc(hidden)]
5700#[derive(Copy, Clone, Eq, PartialEq)]
5701pub struct Adcmpser_SPEC;
5702impl crate::sealed::RegSpec for Adcmpser_SPEC {
5703 type DataType = u8;
5704}
5705
5706#[doc = "A/D Compare Function Window A Extended Input Channel Status Register"]
5707pub type Adcmpser = crate::RegValueT<Adcmpser_SPEC>;
5708
5709impl Adcmpser {
5710 #[doc = "Compare Window A Temperature Sensor Output Compare Flag"]
5711 #[inline(always)]
5712 pub fn cmpsttsa(
5713 self,
5714 ) -> crate::common::RegisterField<
5715 0,
5716 0x1,
5717 1,
5718 0,
5719 adcmpser::Cmpsttsa,
5720 adcmpser::Cmpsttsa,
5721 Adcmpser_SPEC,
5722 crate::common::RW,
5723 > {
5724 crate::common::RegisterField::<
5725 0,
5726 0x1,
5727 1,
5728 0,
5729 adcmpser::Cmpsttsa,
5730 adcmpser::Cmpsttsa,
5731 Adcmpser_SPEC,
5732 crate::common::RW,
5733 >::from_register(self, 0)
5734 }
5735
5736 #[doc = "Compare Window A Internal Reference Voltage Compare Flag"]
5737 #[inline(always)]
5738 pub fn cmpstoca(
5739 self,
5740 ) -> crate::common::RegisterField<
5741 1,
5742 0x1,
5743 1,
5744 0,
5745 adcmpser::Cmpstoca,
5746 adcmpser::Cmpstoca,
5747 Adcmpser_SPEC,
5748 crate::common::RW,
5749 > {
5750 crate::common::RegisterField::<
5751 1,
5752 0x1,
5753 1,
5754 0,
5755 adcmpser::Cmpstoca,
5756 adcmpser::Cmpstoca,
5757 Adcmpser_SPEC,
5758 crate::common::RW,
5759 >::from_register(self, 0)
5760 }
5761}
5762impl ::core::default::Default for Adcmpser {
5763 #[inline(always)]
5764 fn default() -> Adcmpser {
5765 <crate::RegValueT<Adcmpser_SPEC> as RegisterValue<_>>::new(0)
5766 }
5767}
5768pub mod adcmpser {
5769
5770 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5771 pub struct Cmpsttsa_SPEC;
5772 pub type Cmpsttsa = crate::EnumBitfieldStruct<u8, Cmpsttsa_SPEC>;
5773 impl Cmpsttsa {
5774 #[doc = "Comparison conditions are not met."]
5775 pub const _0: Self = Self::new(0);
5776
5777 #[doc = "Comparison conditions are met."]
5778 pub const _1: Self = Self::new(1);
5779 }
5780 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5781 pub struct Cmpstoca_SPEC;
5782 pub type Cmpstoca = crate::EnumBitfieldStruct<u8, Cmpstoca_SPEC>;
5783 impl Cmpstoca {
5784 #[doc = "Comparison conditions are not met."]
5785 pub const _0: Self = Self::new(0);
5786
5787 #[doc = "Comparison conditions are met."]
5788 pub const _1: Self = Self::new(1);
5789 }
5790}
5791#[doc(hidden)]
5792#[derive(Copy, Clone, Eq, PartialEq)]
5793pub struct Adcmpbnsr_SPEC;
5794impl crate::sealed::RegSpec for Adcmpbnsr_SPEC {
5795 type DataType = u8;
5796}
5797
5798#[doc = "A/D Compare Function Window B Channel Select Register"]
5799pub type Adcmpbnsr = crate::RegValueT<Adcmpbnsr_SPEC>;
5800
5801impl Adcmpbnsr {
5802 #[doc = "Compare Window B Channel Select"]
5803 #[inline(always)]
5804 pub fn cmpchb(
5805 self,
5806 ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, Adcmpbnsr_SPEC, crate::common::RW>
5807 {
5808 crate::common::RegisterField::<0,0x3f,1,0,u8,u8,Adcmpbnsr_SPEC,crate::common::RW>::from_register(self,0)
5809 }
5810
5811 #[doc = "Compare Window B Comparison Condition Setting"]
5812 #[inline(always)]
5813 pub fn cmplb(
5814 self,
5815 ) -> crate::common::RegisterField<
5816 7,
5817 0x1,
5818 1,
5819 0,
5820 adcmpbnsr::Cmplb,
5821 adcmpbnsr::Cmplb,
5822 Adcmpbnsr_SPEC,
5823 crate::common::RW,
5824 > {
5825 crate::common::RegisterField::<
5826 7,
5827 0x1,
5828 1,
5829 0,
5830 adcmpbnsr::Cmplb,
5831 adcmpbnsr::Cmplb,
5832 Adcmpbnsr_SPEC,
5833 crate::common::RW,
5834 >::from_register(self, 0)
5835 }
5836}
5837impl ::core::default::Default for Adcmpbnsr {
5838 #[inline(always)]
5839 fn default() -> Adcmpbnsr {
5840 <crate::RegValueT<Adcmpbnsr_SPEC> as RegisterValue<_>>::new(0)
5841 }
5842}
5843pub mod adcmpbnsr {
5844
5845 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5846 pub struct Cmplb_SPEC;
5847 pub type Cmplb = crate::EnumBitfieldStruct<u8, Cmplb_SPEC>;
5848 impl Cmplb {
5849 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADWINLLB value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADWINLLB value, or ADWINULB value < A/D-converted value"]
5850 pub const _0: Self = Self::new(0);
5851
5852 #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADWINLLB value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADWINLLB value < A/D-converted value < ADWINULB value"]
5853 pub const _1: Self = Self::new(1);
5854 }
5855}
5856#[doc(hidden)]
5857#[derive(Copy, Clone, Eq, PartialEq)]
5858pub struct Adwinllb_SPEC;
5859impl crate::sealed::RegSpec for Adwinllb_SPEC {
5860 type DataType = u16;
5861}
5862
5863#[doc = "A/D Compare Function Window B Lower-Side/Upper-Side Level Setting Register"]
5864pub type Adwinllb = crate::RegValueT<Adwinllb_SPEC>;
5865
5866impl NoBitfieldReg<Adwinllb_SPEC> for Adwinllb {}
5867impl ::core::default::Default for Adwinllb {
5868 #[inline(always)]
5869 fn default() -> Adwinllb {
5870 <crate::RegValueT<Adwinllb_SPEC> as RegisterValue<_>>::new(0)
5871 }
5872}
5873
5874#[doc(hidden)]
5875#[derive(Copy, Clone, Eq, PartialEq)]
5876pub struct Adwinulb_SPEC;
5877impl crate::sealed::RegSpec for Adwinulb_SPEC {
5878 type DataType = u16;
5879}
5880
5881#[doc = "A/D Compare Function Window B Lower-Side/Upper-Side Level Setting Register"]
5882pub type Adwinulb = crate::RegValueT<Adwinulb_SPEC>;
5883
5884impl NoBitfieldReg<Adwinulb_SPEC> for Adwinulb {}
5885impl ::core::default::Default for Adwinulb {
5886 #[inline(always)]
5887 fn default() -> Adwinulb {
5888 <crate::RegValueT<Adwinulb_SPEC> as RegisterValue<_>>::new(0)
5889 }
5890}
5891
5892#[doc(hidden)]
5893#[derive(Copy, Clone, Eq, PartialEq)]
5894pub struct Adcmpbsr_SPEC;
5895impl crate::sealed::RegSpec for Adcmpbsr_SPEC {
5896 type DataType = u8;
5897}
5898
5899#[doc = "A/D Compare Function Window B Status Register"]
5900pub type Adcmpbsr = crate::RegValueT<Adcmpbsr_SPEC>;
5901
5902impl Adcmpbsr {
5903 #[doc = "Compare Window B Flag"]
5904 #[inline(always)]
5905 pub fn cmpstb(
5906 self,
5907 ) -> crate::common::RegisterField<
5908 0,
5909 0x1,
5910 1,
5911 0,
5912 adcmpbsr::Cmpstb,
5913 adcmpbsr::Cmpstb,
5914 Adcmpbsr_SPEC,
5915 crate::common::RW,
5916 > {
5917 crate::common::RegisterField::<
5918 0,
5919 0x1,
5920 1,
5921 0,
5922 adcmpbsr::Cmpstb,
5923 adcmpbsr::Cmpstb,
5924 Adcmpbsr_SPEC,
5925 crate::common::RW,
5926 >::from_register(self, 0)
5927 }
5928}
5929impl ::core::default::Default for Adcmpbsr {
5930 #[inline(always)]
5931 fn default() -> Adcmpbsr {
5932 <crate::RegValueT<Adcmpbsr_SPEC> as RegisterValue<_>>::new(0)
5933 }
5934}
5935pub mod adcmpbsr {
5936
5937 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5938 pub struct Cmpstb_SPEC;
5939 pub type Cmpstb = crate::EnumBitfieldStruct<u8, Cmpstb_SPEC>;
5940 impl Cmpstb {
5941 #[doc = "Comparison conditions are not met."]
5942 pub const _0: Self = Self::new(0);
5943
5944 #[doc = "Comparison conditions are met."]
5945 pub const _1: Self = Self::new(1);
5946 }
5947}
5948#[doc(hidden)]
5949#[derive(Copy, Clone, Eq, PartialEq)]
5950pub struct Adsstrl_SPEC;
5951impl crate::sealed::RegSpec for Adsstrl_SPEC {
5952 type DataType = u8;
5953}
5954
5955#[doc = "A/D Sampling State Register"]
5956pub type Adsstrl = crate::RegValueT<Adsstrl_SPEC>;
5957
5958impl Adsstrl {
5959 #[doc = "Sampling Time Setting"]
5960 #[inline(always)]
5961 pub fn sst(
5962 self,
5963 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Adsstrl_SPEC, crate::common::RW> {
5964 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Adsstrl_SPEC,crate::common::RW>::from_register(self,0)
5965 }
5966}
5967impl ::core::default::Default for Adsstrl {
5968 #[inline(always)]
5969 fn default() -> Adsstrl {
5970 <crate::RegValueT<Adsstrl_SPEC> as RegisterValue<_>>::new(13)
5971 }
5972}
5973
5974#[doc(hidden)]
5975#[derive(Copy, Clone, Eq, PartialEq)]
5976pub struct Adsstrt_SPEC;
5977impl crate::sealed::RegSpec for Adsstrt_SPEC {
5978 type DataType = u8;
5979}
5980
5981#[doc = "A/D Sampling State Register"]
5982pub type Adsstrt = crate::RegValueT<Adsstrt_SPEC>;
5983
5984impl Adsstrt {
5985 #[doc = "Sampling Time Setting"]
5986 #[inline(always)]
5987 pub fn sst(
5988 self,
5989 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Adsstrt_SPEC, crate::common::RW> {
5990 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Adsstrt_SPEC,crate::common::RW>::from_register(self,0)
5991 }
5992}
5993impl ::core::default::Default for Adsstrt {
5994 #[inline(always)]
5995 fn default() -> Adsstrt {
5996 <crate::RegValueT<Adsstrt_SPEC> as RegisterValue<_>>::new(13)
5997 }
5998}
5999
6000#[doc(hidden)]
6001#[derive(Copy, Clone, Eq, PartialEq)]
6002pub struct Adsstro_SPEC;
6003impl crate::sealed::RegSpec for Adsstro_SPEC {
6004 type DataType = u8;
6005}
6006
6007#[doc = "A/D Sampling State Register"]
6008pub type Adsstro = crate::RegValueT<Adsstro_SPEC>;
6009
6010impl Adsstro {
6011 #[doc = "Sampling Time Setting"]
6012 #[inline(always)]
6013 pub fn sst(
6014 self,
6015 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Adsstro_SPEC, crate::common::RW> {
6016 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Adsstro_SPEC,crate::common::RW>::from_register(self,0)
6017 }
6018}
6019impl ::core::default::Default for Adsstro {
6020 #[inline(always)]
6021 fn default() -> Adsstro {
6022 <crate::RegValueT<Adsstro_SPEC> as RegisterValue<_>>::new(13)
6023 }
6024}
6025
6026#[doc(hidden)]
6027#[derive(Copy, Clone, Eq, PartialEq)]
6028pub struct Adsstr_SPEC;
6029impl crate::sealed::RegSpec for Adsstr_SPEC {
6030 type DataType = u8;
6031}
6032
6033#[doc = "A/D Sampling State Register"]
6034pub type Adsstr = crate::RegValueT<Adsstr_SPEC>;
6035
6036impl Adsstr {
6037 #[doc = "Sampling Time Setting"]
6038 #[inline(always)]
6039 pub fn sst(
6040 self,
6041 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Adsstr_SPEC, crate::common::RW> {
6042 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Adsstr_SPEC,crate::common::RW>::from_register(self,0)
6043 }
6044}
6045impl ::core::default::Default for Adsstr {
6046 #[inline(always)]
6047 fn default() -> Adsstr {
6048 <crate::RegValueT<Adsstr_SPEC> as RegisterValue<_>>::new(13)
6049 }
6050}