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-Converted Value Addition/Average Channel Select Register 0"]
60 #[inline(always)]
61 pub const fn adads0(
62 &self,
63 ) -> &'static crate::common::Reg<self::Adads0_SPEC, crate::common::RW> {
64 unsafe {
65 crate::common::Reg::<self::Adads0_SPEC, crate::common::RW>::from_ptr(
66 self._svd2pac_as_ptr().add(8usize),
67 )
68 }
69 }
70
71 #[doc = "A/D-Converted Value Addition/Average Count Select Register"]
72 #[inline(always)]
73 pub const fn adadc(&self) -> &'static crate::common::Reg<self::Adadc_SPEC, crate::common::RW> {
74 unsafe {
75 crate::common::Reg::<self::Adadc_SPEC, crate::common::RW>::from_ptr(
76 self._svd2pac_as_ptr().add(12usize),
77 )
78 }
79 }
80
81 #[doc = "A/D Control Extended Register"]
82 #[inline(always)]
83 pub const fn adcer(&self) -> &'static crate::common::Reg<self::Adcer_SPEC, crate::common::RW> {
84 unsafe {
85 crate::common::Reg::<self::Adcer_SPEC, crate::common::RW>::from_ptr(
86 self._svd2pac_as_ptr().add(14usize),
87 )
88 }
89 }
90
91 #[doc = "A/D Conversion Start Trigger Select Register"]
92 #[inline(always)]
93 pub const fn adstrgr(
94 &self,
95 ) -> &'static crate::common::Reg<self::Adstrgr_SPEC, crate::common::RW> {
96 unsafe {
97 crate::common::Reg::<self::Adstrgr_SPEC, crate::common::RW>::from_ptr(
98 self._svd2pac_as_ptr().add(16usize),
99 )
100 }
101 }
102
103 #[doc = "A/D Conversion Extended Input Control Registers"]
104 #[inline(always)]
105 pub const fn adexicr(
106 &self,
107 ) -> &'static crate::common::Reg<self::Adexicr_SPEC, crate::common::RW> {
108 unsafe {
109 crate::common::Reg::<self::Adexicr_SPEC, crate::common::RW>::from_ptr(
110 self._svd2pac_as_ptr().add(18usize),
111 )
112 }
113 }
114
115 #[doc = "A/D Channel Select Register B0"]
116 #[inline(always)]
117 pub const fn adansb0(
118 &self,
119 ) -> &'static crate::common::Reg<self::Adansb0_SPEC, crate::common::RW> {
120 unsafe {
121 crate::common::Reg::<self::Adansb0_SPEC, crate::common::RW>::from_ptr(
122 self._svd2pac_as_ptr().add(20usize),
123 )
124 }
125 }
126
127 #[doc = "A/D Data Duplexing Register"]
128 #[inline(always)]
129 pub const fn addbldr(
130 &self,
131 ) -> &'static crate::common::Reg<self::Addbldr_SPEC, crate::common::R> {
132 unsafe {
133 crate::common::Reg::<self::Addbldr_SPEC, crate::common::R>::from_ptr(
134 self._svd2pac_as_ptr().add(24usize),
135 )
136 }
137 }
138
139 #[doc = "A/D Temperature Sensor Data Register"]
140 #[inline(always)]
141 pub const fn adtsdr(&self) -> &'static crate::common::Reg<self::Adtsdr_SPEC, crate::common::R> {
142 unsafe {
143 crate::common::Reg::<self::Adtsdr_SPEC, crate::common::R>::from_ptr(
144 self._svd2pac_as_ptr().add(26usize),
145 )
146 }
147 }
148
149 #[doc = "A/D Internal Reference Voltage Data Register"]
150 #[inline(always)]
151 pub const fn adocdr(&self) -> &'static crate::common::Reg<self::Adocdr_SPEC, crate::common::R> {
152 unsafe {
153 crate::common::Reg::<self::Adocdr_SPEC, crate::common::R>::from_ptr(
154 self._svd2pac_as_ptr().add(28usize),
155 )
156 }
157 }
158
159 #[doc = "A/D Self-Diagnosis Data Register"]
160 #[inline(always)]
161 pub const fn adrd(&self) -> &'static crate::common::Reg<self::Adrd_SPEC, crate::common::R> {
162 unsafe {
163 crate::common::Reg::<self::Adrd_SPEC, crate::common::R>::from_ptr(
164 self._svd2pac_as_ptr().add(30usize),
165 )
166 }
167 }
168
169 #[doc = "A/D Data Registers %s"]
170 #[inline(always)]
171 pub const fn addr(
172 &self,
173 ) -> &'static crate::common::ClusterRegisterArray<
174 crate::common::Reg<self::Addr_SPEC, crate::common::R>,
175 4,
176 0x2,
177 > {
178 unsafe {
179 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x20usize))
180 }
181 }
182 #[inline(always)]
183 pub const fn addr0(&self) -> &'static crate::common::Reg<self::Addr_SPEC, crate::common::R> {
184 unsafe {
185 crate::common::Reg::<self::Addr_SPEC, crate::common::R>::from_ptr(
186 self._svd2pac_as_ptr().add(0x20usize),
187 )
188 }
189 }
190 #[inline(always)]
191 pub const fn addr1(&self) -> &'static crate::common::Reg<self::Addr_SPEC, crate::common::R> {
192 unsafe {
193 crate::common::Reg::<self::Addr_SPEC, crate::common::R>::from_ptr(
194 self._svd2pac_as_ptr().add(0x22usize),
195 )
196 }
197 }
198 #[inline(always)]
199 pub const fn addr2(&self) -> &'static crate::common::Reg<self::Addr_SPEC, crate::common::R> {
200 unsafe {
201 crate::common::Reg::<self::Addr_SPEC, crate::common::R>::from_ptr(
202 self._svd2pac_as_ptr().add(0x24usize),
203 )
204 }
205 }
206 #[inline(always)]
207 pub const fn addr3(&self) -> &'static crate::common::Reg<self::Addr_SPEC, crate::common::R> {
208 unsafe {
209 crate::common::Reg::<self::Addr_SPEC, crate::common::R>::from_ptr(
210 self._svd2pac_as_ptr().add(0x26usize),
211 )
212 }
213 }
214
215 #[doc = "A/D Disconnection Detection Control Register"]
216 #[inline(always)]
217 pub const fn addiscr(
218 &self,
219 ) -> &'static crate::common::Reg<self::Addiscr_SPEC, crate::common::RW> {
220 unsafe {
221 crate::common::Reg::<self::Addiscr_SPEC, crate::common::RW>::from_ptr(
222 self._svd2pac_as_ptr().add(122usize),
223 )
224 }
225 }
226
227 #[doc = "A/D Conversion Operation Mode Select Register"]
228 #[inline(always)]
229 pub const fn adacsr(
230 &self,
231 ) -> &'static crate::common::Reg<self::Adacsr_SPEC, crate::common::RW> {
232 unsafe {
233 crate::common::Reg::<self::Adacsr_SPEC, crate::common::RW>::from_ptr(
234 self._svd2pac_as_ptr().add(126usize),
235 )
236 }
237 }
238
239 #[doc = "A/D Group Scan Priority Control Register"]
240 #[inline(always)]
241 pub const fn adgspcr(
242 &self,
243 ) -> &'static crate::common::Reg<self::Adgspcr_SPEC, crate::common::RW> {
244 unsafe {
245 crate::common::Reg::<self::Adgspcr_SPEC, crate::common::RW>::from_ptr(
246 self._svd2pac_as_ptr().add(128usize),
247 )
248 }
249 }
250
251 #[doc = "A/D Data Duplexing Register A"]
252 #[inline(always)]
253 pub const fn addbldra(
254 &self,
255 ) -> &'static crate::common::Reg<self::Addbldra_SPEC, crate::common::R> {
256 unsafe {
257 crate::common::Reg::<self::Addbldra_SPEC, crate::common::R>::from_ptr(
258 self._svd2pac_as_ptr().add(132usize),
259 )
260 }
261 }
262
263 #[doc = "A/D Data Duplexing Register B"]
264 #[inline(always)]
265 pub const fn addbldrb(
266 &self,
267 ) -> &'static crate::common::Reg<self::Addbldrb_SPEC, crate::common::R> {
268 unsafe {
269 crate::common::Reg::<self::Addbldrb_SPEC, crate::common::R>::from_ptr(
270 self._svd2pac_as_ptr().add(134usize),
271 )
272 }
273 }
274
275 #[doc = "A/D High-Potential/Low-Potential Reference Voltage Control Register"]
276 #[inline(always)]
277 pub const fn adhvrefcnt(
278 &self,
279 ) -> &'static crate::common::Reg<self::Adhvrefcnt_SPEC, crate::common::RW> {
280 unsafe {
281 crate::common::Reg::<self::Adhvrefcnt_SPEC, crate::common::RW>::from_ptr(
282 self._svd2pac_as_ptr().add(138usize),
283 )
284 }
285 }
286
287 #[doc = "A/D Compare Function Window A/B Status Monitor Register"]
288 #[inline(always)]
289 pub const fn adwinmon(
290 &self,
291 ) -> &'static crate::common::Reg<self::Adwinmon_SPEC, crate::common::R> {
292 unsafe {
293 crate::common::Reg::<self::Adwinmon_SPEC, crate::common::R>::from_ptr(
294 self._svd2pac_as_ptr().add(140usize),
295 )
296 }
297 }
298
299 #[doc = "A/D Compare Function Control Register"]
300 #[inline(always)]
301 pub const fn adcmpcr(
302 &self,
303 ) -> &'static crate::common::Reg<self::Adcmpcr_SPEC, crate::common::RW> {
304 unsafe {
305 crate::common::Reg::<self::Adcmpcr_SPEC, crate::common::RW>::from_ptr(
306 self._svd2pac_as_ptr().add(144usize),
307 )
308 }
309 }
310
311 #[doc = "A/D Compare Function Window A Extended Input Select Register"]
312 #[inline(always)]
313 pub const fn adcmpanser(
314 &self,
315 ) -> &'static crate::common::Reg<self::Adcmpanser_SPEC, crate::common::RW> {
316 unsafe {
317 crate::common::Reg::<self::Adcmpanser_SPEC, crate::common::RW>::from_ptr(
318 self._svd2pac_as_ptr().add(146usize),
319 )
320 }
321 }
322
323 #[doc = "A/D Compare Function Window A Extended Input Comparison Condition Setting Register"]
324 #[inline(always)]
325 pub const fn adcmpler(
326 &self,
327 ) -> &'static crate::common::Reg<self::Adcmpler_SPEC, crate::common::RW> {
328 unsafe {
329 crate::common::Reg::<self::Adcmpler_SPEC, crate::common::RW>::from_ptr(
330 self._svd2pac_as_ptr().add(147usize),
331 )
332 }
333 }
334
335 #[doc = "A/D Compare Function Window A Channel Select Register 0"]
336 #[inline(always)]
337 pub const fn adcmpansr0(
338 &self,
339 ) -> &'static crate::common::Reg<self::Adcmpansr0_SPEC, crate::common::RW> {
340 unsafe {
341 crate::common::Reg::<self::Adcmpansr0_SPEC, crate::common::RW>::from_ptr(
342 self._svd2pac_as_ptr().add(148usize),
343 )
344 }
345 }
346
347 #[doc = "A/D Compare Function Window A Comparison Condition Setting Register 0"]
348 #[inline(always)]
349 pub const fn adcmplr0(
350 &self,
351 ) -> &'static crate::common::Reg<self::Adcmplr0_SPEC, crate::common::RW> {
352 unsafe {
353 crate::common::Reg::<self::Adcmplr0_SPEC, crate::common::RW>::from_ptr(
354 self._svd2pac_as_ptr().add(152usize),
355 )
356 }
357 }
358
359 #[doc = "A/D Compare Function Window A Lower-Side/Upper-Side Level Setting Register"]
360 #[inline(always)]
361 pub const fn adcmpdr(
362 &self,
363 ) -> &'static crate::common::ClusterRegisterArray<
364 crate::common::Reg<self::Adcmpdr_SPEC, crate::common::RW>,
365 2,
366 0x2,
367 > {
368 unsafe {
369 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x9cusize))
370 }
371 }
372 #[inline(always)]
373 pub const fn adcmpdr0(
374 &self,
375 ) -> &'static crate::common::Reg<self::Adcmpdr_SPEC, crate::common::RW> {
376 unsafe {
377 crate::common::Reg::<self::Adcmpdr_SPEC, crate::common::RW>::from_ptr(
378 self._svd2pac_as_ptr().add(0x9cusize),
379 )
380 }
381 }
382 #[inline(always)]
383 pub const fn adcmpdr1(
384 &self,
385 ) -> &'static crate::common::Reg<self::Adcmpdr_SPEC, crate::common::RW> {
386 unsafe {
387 crate::common::Reg::<self::Adcmpdr_SPEC, crate::common::RW>::from_ptr(
388 self._svd2pac_as_ptr().add(0x9eusize),
389 )
390 }
391 }
392
393 #[doc = "A/D Compare Function Window A Channel Status Register 0"]
394 #[inline(always)]
395 pub const fn adcmpsr0(
396 &self,
397 ) -> &'static crate::common::Reg<self::Adcmpsr0_SPEC, crate::common::RW> {
398 unsafe {
399 crate::common::Reg::<self::Adcmpsr0_SPEC, crate::common::RW>::from_ptr(
400 self._svd2pac_as_ptr().add(160usize),
401 )
402 }
403 }
404
405 #[doc = "A/D Compare Function Window A Extended Input Channel Status Register"]
406 #[inline(always)]
407 pub const fn adcmpser(
408 &self,
409 ) -> &'static crate::common::Reg<self::Adcmpser_SPEC, crate::common::RW> {
410 unsafe {
411 crate::common::Reg::<self::Adcmpser_SPEC, crate::common::RW>::from_ptr(
412 self._svd2pac_as_ptr().add(164usize),
413 )
414 }
415 }
416
417 #[doc = "A/D Compare Function Window B Channel Select Register"]
418 #[inline(always)]
419 pub const fn adcmpbnsr(
420 &self,
421 ) -> &'static crate::common::Reg<self::Adcmpbnsr_SPEC, crate::common::RW> {
422 unsafe {
423 crate::common::Reg::<self::Adcmpbnsr_SPEC, crate::common::RW>::from_ptr(
424 self._svd2pac_as_ptr().add(166usize),
425 )
426 }
427 }
428
429 #[doc = "A/D Compare Function Window B Lower-Side/Upper-Side Level Setting Register"]
430 #[inline(always)]
431 pub const fn adwinllb(
432 &self,
433 ) -> &'static crate::common::Reg<self::Adwinllb_SPEC, crate::common::RW> {
434 unsafe {
435 crate::common::Reg::<self::Adwinllb_SPEC, crate::common::RW>::from_ptr(
436 self._svd2pac_as_ptr().add(168usize),
437 )
438 }
439 }
440
441 #[doc = "A/D Compare Function Window B Lower-Side/Upper-Side Level Setting Register"]
442 #[inline(always)]
443 pub const fn adwinulb(
444 &self,
445 ) -> &'static crate::common::Reg<self::Adwinulb_SPEC, crate::common::RW> {
446 unsafe {
447 crate::common::Reg::<self::Adwinulb_SPEC, crate::common::RW>::from_ptr(
448 self._svd2pac_as_ptr().add(170usize),
449 )
450 }
451 }
452
453 #[doc = "A/D Compare Function Window B Status Register"]
454 #[inline(always)]
455 pub const fn adcmpbsr(
456 &self,
457 ) -> &'static crate::common::Reg<self::Adcmpbsr_SPEC, crate::common::RW> {
458 unsafe {
459 crate::common::Reg::<self::Adcmpbsr_SPEC, crate::common::RW>::from_ptr(
460 self._svd2pac_as_ptr().add(172usize),
461 )
462 }
463 }
464
465 #[doc = "A/D Sampling State Register"]
466 #[inline(always)]
467 pub const fn adsstrt(
468 &self,
469 ) -> &'static crate::common::Reg<self::Adsstrt_SPEC, crate::common::RW> {
470 unsafe {
471 crate::common::Reg::<self::Adsstrt_SPEC, crate::common::RW>::from_ptr(
472 self._svd2pac_as_ptr().add(222usize),
473 )
474 }
475 }
476
477 #[doc = "A/D Sampling State Register"]
478 #[inline(always)]
479 pub const fn adsstro(
480 &self,
481 ) -> &'static crate::common::Reg<self::Adsstro_SPEC, crate::common::RW> {
482 unsafe {
483 crate::common::Reg::<self::Adsstro_SPEC, crate::common::RW>::from_ptr(
484 self._svd2pac_as_ptr().add(223usize),
485 )
486 }
487 }
488
489 #[doc = "A/D Sampling State Register"]
490 #[inline(always)]
491 pub const fn adsstr(
492 &self,
493 ) -> &'static crate::common::ClusterRegisterArray<
494 crate::common::Reg<self::Adsstr_SPEC, crate::common::RW>,
495 4,
496 0x1,
497 > {
498 unsafe {
499 crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0xe0usize))
500 }
501 }
502 #[inline(always)]
503 pub const fn adsstr0(
504 &self,
505 ) -> &'static crate::common::Reg<self::Adsstr_SPEC, crate::common::RW> {
506 unsafe {
507 crate::common::Reg::<self::Adsstr_SPEC, crate::common::RW>::from_ptr(
508 self._svd2pac_as_ptr().add(0xe0usize),
509 )
510 }
511 }
512 #[inline(always)]
513 pub const fn adsstr1(
514 &self,
515 ) -> &'static crate::common::Reg<self::Adsstr_SPEC, crate::common::RW> {
516 unsafe {
517 crate::common::Reg::<self::Adsstr_SPEC, crate::common::RW>::from_ptr(
518 self._svd2pac_as_ptr().add(0xe1usize),
519 )
520 }
521 }
522 #[inline(always)]
523 pub const fn adsstr2(
524 &self,
525 ) -> &'static crate::common::Reg<self::Adsstr_SPEC, crate::common::RW> {
526 unsafe {
527 crate::common::Reg::<self::Adsstr_SPEC, crate::common::RW>::from_ptr(
528 self._svd2pac_as_ptr().add(0xe2usize),
529 )
530 }
531 }
532 #[inline(always)]
533 pub const fn adsstr3(
534 &self,
535 ) -> &'static crate::common::Reg<self::Adsstr_SPEC, crate::common::RW> {
536 unsafe {
537 crate::common::Reg::<self::Adsstr_SPEC, crate::common::RW>::from_ptr(
538 self._svd2pac_as_ptr().add(0xe3usize),
539 )
540 }
541 }
542}
543#[doc(hidden)]
544#[derive(Copy, Clone, Eq, PartialEq)]
545pub struct Adcsr_SPEC;
546impl crate::sealed::RegSpec for Adcsr_SPEC {
547 type DataType = u16;
548}
549
550#[doc = "A/D Control Register"]
551pub type Adcsr = crate::RegValueT<Adcsr_SPEC>;
552
553impl Adcsr {
554 #[doc = "Double Trigger Channel Select"]
555 #[inline(always)]
556 pub fn dblans(
557 self,
558 ) -> crate::common::RegisterField<0, 0x3, 1, 0, u8, u8, Adcsr_SPEC, crate::common::RW> {
559 crate::common::RegisterField::<0,0x3,1,0,u8,u8,Adcsr_SPEC,crate::common::RW>::from_register(self,0)
560 }
561
562 #[doc = "Group B Scan End Interrupt and ELC Event Enable"]
563 #[inline(always)]
564 pub fn gbadie(
565 self,
566 ) -> crate::common::RegisterField<
567 6,
568 0x1,
569 1,
570 0,
571 adcsr::Gbadie,
572 adcsr::Gbadie,
573 Adcsr_SPEC,
574 crate::common::RW,
575 > {
576 crate::common::RegisterField::<
577 6,
578 0x1,
579 1,
580 0,
581 adcsr::Gbadie,
582 adcsr::Gbadie,
583 Adcsr_SPEC,
584 crate::common::RW,
585 >::from_register(self, 0)
586 }
587
588 #[doc = "Double Trigger Mode Select"]
589 #[inline(always)]
590 pub fn dble(
591 self,
592 ) -> crate::common::RegisterField<
593 7,
594 0x1,
595 1,
596 0,
597 adcsr::Dble,
598 adcsr::Dble,
599 Adcsr_SPEC,
600 crate::common::RW,
601 > {
602 crate::common::RegisterField::<
603 7,
604 0x1,
605 1,
606 0,
607 adcsr::Dble,
608 adcsr::Dble,
609 Adcsr_SPEC,
610 crate::common::RW,
611 >::from_register(self, 0)
612 }
613
614 #[doc = "Trigger Select"]
615 #[inline(always)]
616 pub fn extrg(
617 self,
618 ) -> crate::common::RegisterField<
619 8,
620 0x1,
621 1,
622 0,
623 adcsr::Extrg,
624 adcsr::Extrg,
625 Adcsr_SPEC,
626 crate::common::RW,
627 > {
628 crate::common::RegisterField::<
629 8,
630 0x1,
631 1,
632 0,
633 adcsr::Extrg,
634 adcsr::Extrg,
635 Adcsr_SPEC,
636 crate::common::RW,
637 >::from_register(self, 0)
638 }
639
640 #[doc = "Trigger Start Enable"]
641 #[inline(always)]
642 pub fn trge(
643 self,
644 ) -> crate::common::RegisterField<
645 9,
646 0x1,
647 1,
648 0,
649 adcsr::Trge,
650 adcsr::Trge,
651 Adcsr_SPEC,
652 crate::common::RW,
653 > {
654 crate::common::RegisterField::<
655 9,
656 0x1,
657 1,
658 0,
659 adcsr::Trge,
660 adcsr::Trge,
661 Adcsr_SPEC,
662 crate::common::RW,
663 >::from_register(self, 0)
664 }
665
666 #[doc = "A/D Conversion Mode Select"]
667 #[inline(always)]
668 pub fn adhsc(
669 self,
670 ) -> crate::common::RegisterField<
671 10,
672 0x1,
673 1,
674 0,
675 adcsr::Adhsc,
676 adcsr::Adhsc,
677 Adcsr_SPEC,
678 crate::common::RW,
679 > {
680 crate::common::RegisterField::<
681 10,
682 0x1,
683 1,
684 0,
685 adcsr::Adhsc,
686 adcsr::Adhsc,
687 Adcsr_SPEC,
688 crate::common::RW,
689 >::from_register(self, 0)
690 }
691
692 #[doc = "Scan Mode Select"]
693 #[inline(always)]
694 pub fn adcs(
695 self,
696 ) -> crate::common::RegisterField<
697 13,
698 0x3,
699 1,
700 0,
701 adcsr::Adcs,
702 adcsr::Adcs,
703 Adcsr_SPEC,
704 crate::common::RW,
705 > {
706 crate::common::RegisterField::<
707 13,
708 0x3,
709 1,
710 0,
711 adcsr::Adcs,
712 adcsr::Adcs,
713 Adcsr_SPEC,
714 crate::common::RW,
715 >::from_register(self, 0)
716 }
717
718 #[doc = "A/D Conversion Start"]
719 #[inline(always)]
720 pub fn adst(
721 self,
722 ) -> crate::common::RegisterField<
723 15,
724 0x1,
725 1,
726 0,
727 adcsr::Adst,
728 adcsr::Adst,
729 Adcsr_SPEC,
730 crate::common::RW,
731 > {
732 crate::common::RegisterField::<
733 15,
734 0x1,
735 1,
736 0,
737 adcsr::Adst,
738 adcsr::Adst,
739 Adcsr_SPEC,
740 crate::common::RW,
741 >::from_register(self, 0)
742 }
743}
744impl ::core::default::Default for Adcsr {
745 #[inline(always)]
746 fn default() -> Adcsr {
747 <crate::RegValueT<Adcsr_SPEC> as RegisterValue<_>>::new(0)
748 }
749}
750pub mod adcsr {
751
752 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
753 pub struct Gbadie_SPEC;
754 pub type Gbadie = crate::EnumBitfieldStruct<u8, Gbadie_SPEC>;
755 impl Gbadie {
756 #[doc = "Disable ADC120_GBADI interrupt generation on group B scan completion."]
757 pub const _0: Self = Self::new(0);
758
759 #[doc = "Enable ADC120_GBADI interrupt generation on group B scan completion."]
760 pub const _1: Self = Self::new(1);
761 }
762 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
763 pub struct Dble_SPEC;
764 pub type Dble = crate::EnumBitfieldStruct<u8, Dble_SPEC>;
765 impl Dble {
766 #[doc = "Deselect double-trigger mode."]
767 pub const _0: Self = Self::new(0);
768
769 #[doc = "Select double-trigger mode."]
770 pub const _1: Self = Self::new(1);
771 }
772 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
773 pub struct Extrg_SPEC;
774 pub type Extrg = crate::EnumBitfieldStruct<u8, Extrg_SPEC>;
775 impl Extrg {
776 #[doc = "Start A/D conversion by the synchronous trigger (ELC)."]
777 pub const _0: Self = Self::new(0);
778
779 #[doc = "Start A/D conversion by the asynchronous trigger (ADTRG0)."]
780 pub const _1: Self = Self::new(1);
781 }
782 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
783 pub struct Trge_SPEC;
784 pub type Trge = crate::EnumBitfieldStruct<u8, Trge_SPEC>;
785 impl Trge {
786 #[doc = "Disable A/D conversion to be started by the synchronous or asynchronous trigger"]
787 pub const _0: Self = Self::new(0);
788
789 #[doc = "Enable A/D conversion to be started by the synchronous or asynchronous trigger"]
790 pub const _1: Self = Self::new(1);
791 }
792 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
793 pub struct Adhsc_SPEC;
794 pub type Adhsc = crate::EnumBitfieldStruct<u8, Adhsc_SPEC>;
795 impl Adhsc {
796 #[doc = "High-speed A/D conversion mode"]
797 pub const _0: Self = Self::new(0);
798
799 #[doc = "Low-power A/D conversion mode"]
800 pub const _1: Self = Self::new(1);
801 }
802 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
803 pub struct Adcs_SPEC;
804 pub type Adcs = crate::EnumBitfieldStruct<u8, Adcs_SPEC>;
805 impl Adcs {
806 #[doc = "Single scan mode"]
807 pub const _00: Self = Self::new(0);
808
809 #[doc = "Group scan mode"]
810 pub const _01: Self = Self::new(1);
811
812 #[doc = "Continuous scan mode"]
813 pub const _10: Self = Self::new(2);
814
815 #[doc = "Setting prohibited"]
816 pub const _11: Self = Self::new(3);
817 }
818 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
819 pub struct Adst_SPEC;
820 pub type Adst = crate::EnumBitfieldStruct<u8, Adst_SPEC>;
821 impl Adst {
822 #[doc = "Stop A/D conversion process."]
823 pub const _0: Self = Self::new(0);
824
825 #[doc = "Start A/D conversion process."]
826 pub const _1: Self = Self::new(1);
827 }
828}
829#[doc(hidden)]
830#[derive(Copy, Clone, Eq, PartialEq)]
831pub struct Adansa0_SPEC;
832impl crate::sealed::RegSpec for Adansa0_SPEC {
833 type DataType = u16;
834}
835
836#[doc = "A/D Channel Select Register A0"]
837pub type Adansa0 = crate::RegValueT<Adansa0_SPEC>;
838
839impl Adansa0 {
840 #[doc = "A/D Conversion Channels Select"]
841 #[inline(always)]
842 pub fn ansa0(
843 self,
844 ) -> crate::common::RegisterField<
845 0,
846 0x1,
847 1,
848 0,
849 adansa0::Ansa0,
850 adansa0::Ansa0,
851 Adansa0_SPEC,
852 crate::common::RW,
853 > {
854 crate::common::RegisterField::<
855 0,
856 0x1,
857 1,
858 0,
859 adansa0::Ansa0,
860 adansa0::Ansa0,
861 Adansa0_SPEC,
862 crate::common::RW,
863 >::from_register(self, 0)
864 }
865
866 #[doc = "A/D Conversion Channels Select"]
867 #[inline(always)]
868 pub fn ansa1(
869 self,
870 ) -> crate::common::RegisterField<
871 1,
872 0x1,
873 1,
874 0,
875 adansa0::Ansa1,
876 adansa0::Ansa1,
877 Adansa0_SPEC,
878 crate::common::RW,
879 > {
880 crate::common::RegisterField::<
881 1,
882 0x1,
883 1,
884 0,
885 adansa0::Ansa1,
886 adansa0::Ansa1,
887 Adansa0_SPEC,
888 crate::common::RW,
889 >::from_register(self, 0)
890 }
891
892 #[doc = "A/D Conversion Channels Select"]
893 #[inline(always)]
894 pub fn ansa2(
895 self,
896 ) -> crate::common::RegisterField<
897 2,
898 0x1,
899 1,
900 0,
901 adansa0::Ansa2,
902 adansa0::Ansa2,
903 Adansa0_SPEC,
904 crate::common::RW,
905 > {
906 crate::common::RegisterField::<
907 2,
908 0x1,
909 1,
910 0,
911 adansa0::Ansa2,
912 adansa0::Ansa2,
913 Adansa0_SPEC,
914 crate::common::RW,
915 >::from_register(self, 0)
916 }
917
918 #[doc = "A/D Conversion Channels Select"]
919 #[inline(always)]
920 pub fn ansa3(
921 self,
922 ) -> crate::common::RegisterField<
923 3,
924 0x1,
925 1,
926 0,
927 adansa0::Ansa3,
928 adansa0::Ansa3,
929 Adansa0_SPEC,
930 crate::common::RW,
931 > {
932 crate::common::RegisterField::<
933 3,
934 0x1,
935 1,
936 0,
937 adansa0::Ansa3,
938 adansa0::Ansa3,
939 Adansa0_SPEC,
940 crate::common::RW,
941 >::from_register(self, 0)
942 }
943}
944impl ::core::default::Default for Adansa0 {
945 #[inline(always)]
946 fn default() -> Adansa0 {
947 <crate::RegValueT<Adansa0_SPEC> as RegisterValue<_>>::new(0)
948 }
949}
950pub mod adansa0 {
951
952 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
953 pub struct Ansa0_SPEC;
954 pub type Ansa0 = crate::EnumBitfieldStruct<u8, Ansa0_SPEC>;
955 impl Ansa0 {
956 #[doc = "Do not select associated input channel"]
957 pub const _0: Self = Self::new(0);
958
959 #[doc = "Select associated input channel"]
960 pub const _1: Self = Self::new(1);
961 }
962 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
963 pub struct Ansa1_SPEC;
964 pub type Ansa1 = crate::EnumBitfieldStruct<u8, Ansa1_SPEC>;
965 impl Ansa1 {
966 #[doc = "Do not select associated input channel"]
967 pub const _0: Self = Self::new(0);
968
969 #[doc = "Select associated input channel"]
970 pub const _1: Self = Self::new(1);
971 }
972 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
973 pub struct Ansa2_SPEC;
974 pub type Ansa2 = crate::EnumBitfieldStruct<u8, Ansa2_SPEC>;
975 impl Ansa2 {
976 #[doc = "Do not select associated input channel"]
977 pub const _0: Self = Self::new(0);
978
979 #[doc = "Select associated input channel"]
980 pub const _1: Self = Self::new(1);
981 }
982 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
983 pub struct Ansa3_SPEC;
984 pub type Ansa3 = crate::EnumBitfieldStruct<u8, Ansa3_SPEC>;
985 impl Ansa3 {
986 #[doc = "Do not select associated input channel"]
987 pub const _0: Self = Self::new(0);
988
989 #[doc = "Select associated input channel"]
990 pub const _1: Self = Self::new(1);
991 }
992}
993#[doc(hidden)]
994#[derive(Copy, Clone, Eq, PartialEq)]
995pub struct Adads0_SPEC;
996impl crate::sealed::RegSpec for Adads0_SPEC {
997 type DataType = u16;
998}
999
1000#[doc = "A/D-Converted Value Addition/Average Channel Select Register 0"]
1001pub type Adads0 = crate::RegValueT<Adads0_SPEC>;
1002
1003impl Adads0 {
1004 #[doc = "A/D-Converted Value Addition/Average Channel Select"]
1005 #[inline(always)]
1006 pub fn ads0(
1007 self,
1008 ) -> crate::common::RegisterField<
1009 0,
1010 0x1,
1011 1,
1012 0,
1013 adads0::Ads0,
1014 adads0::Ads0,
1015 Adads0_SPEC,
1016 crate::common::RW,
1017 > {
1018 crate::common::RegisterField::<
1019 0,
1020 0x1,
1021 1,
1022 0,
1023 adads0::Ads0,
1024 adads0::Ads0,
1025 Adads0_SPEC,
1026 crate::common::RW,
1027 >::from_register(self, 0)
1028 }
1029
1030 #[doc = "A/D-Converted Value Addition/Average Channel Select"]
1031 #[inline(always)]
1032 pub fn ads1(
1033 self,
1034 ) -> crate::common::RegisterField<
1035 1,
1036 0x1,
1037 1,
1038 0,
1039 adads0::Ads1,
1040 adads0::Ads1,
1041 Adads0_SPEC,
1042 crate::common::RW,
1043 > {
1044 crate::common::RegisterField::<
1045 1,
1046 0x1,
1047 1,
1048 0,
1049 adads0::Ads1,
1050 adads0::Ads1,
1051 Adads0_SPEC,
1052 crate::common::RW,
1053 >::from_register(self, 0)
1054 }
1055
1056 #[doc = "A/D-Converted Value Addition/Average Channel Select"]
1057 #[inline(always)]
1058 pub fn ads2(
1059 self,
1060 ) -> crate::common::RegisterField<
1061 2,
1062 0x1,
1063 1,
1064 0,
1065 adads0::Ads2,
1066 adads0::Ads2,
1067 Adads0_SPEC,
1068 crate::common::RW,
1069 > {
1070 crate::common::RegisterField::<
1071 2,
1072 0x1,
1073 1,
1074 0,
1075 adads0::Ads2,
1076 adads0::Ads2,
1077 Adads0_SPEC,
1078 crate::common::RW,
1079 >::from_register(self, 0)
1080 }
1081
1082 #[doc = "A/D-Converted Value Addition/Average Channel Select"]
1083 #[inline(always)]
1084 pub fn ads3(
1085 self,
1086 ) -> crate::common::RegisterField<
1087 3,
1088 0x1,
1089 1,
1090 0,
1091 adads0::Ads3,
1092 adads0::Ads3,
1093 Adads0_SPEC,
1094 crate::common::RW,
1095 > {
1096 crate::common::RegisterField::<
1097 3,
1098 0x1,
1099 1,
1100 0,
1101 adads0::Ads3,
1102 adads0::Ads3,
1103 Adads0_SPEC,
1104 crate::common::RW,
1105 >::from_register(self, 0)
1106 }
1107}
1108impl ::core::default::Default for Adads0 {
1109 #[inline(always)]
1110 fn default() -> Adads0 {
1111 <crate::RegValueT<Adads0_SPEC> as RegisterValue<_>>::new(0)
1112 }
1113}
1114pub mod adads0 {
1115
1116 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1117 pub struct Ads0_SPEC;
1118 pub type Ads0 = crate::EnumBitfieldStruct<u8, Ads0_SPEC>;
1119 impl Ads0 {
1120 #[doc = "Do not select associated input channel"]
1121 pub const _0: Self = Self::new(0);
1122
1123 #[doc = "Select associated input channel"]
1124 pub const _1: Self = Self::new(1);
1125 }
1126 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1127 pub struct Ads1_SPEC;
1128 pub type Ads1 = crate::EnumBitfieldStruct<u8, Ads1_SPEC>;
1129 impl Ads1 {
1130 #[doc = "Do not select associated input channel"]
1131 pub const _0: Self = Self::new(0);
1132
1133 #[doc = "Select associated input channel"]
1134 pub const _1: Self = Self::new(1);
1135 }
1136 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1137 pub struct Ads2_SPEC;
1138 pub type Ads2 = crate::EnumBitfieldStruct<u8, Ads2_SPEC>;
1139 impl Ads2 {
1140 #[doc = "Do not select associated input channel"]
1141 pub const _0: Self = Self::new(0);
1142
1143 #[doc = "Select associated input channel"]
1144 pub const _1: Self = Self::new(1);
1145 }
1146 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1147 pub struct Ads3_SPEC;
1148 pub type Ads3 = crate::EnumBitfieldStruct<u8, Ads3_SPEC>;
1149 impl Ads3 {
1150 #[doc = "Do not select associated input channel"]
1151 pub const _0: Self = Self::new(0);
1152
1153 #[doc = "Select associated input channel"]
1154 pub const _1: Self = Self::new(1);
1155 }
1156}
1157#[doc(hidden)]
1158#[derive(Copy, Clone, Eq, PartialEq)]
1159pub struct Adadc_SPEC;
1160impl crate::sealed::RegSpec for Adadc_SPEC {
1161 type DataType = u8;
1162}
1163
1164#[doc = "A/D-Converted Value Addition/Average Count Select Register"]
1165pub type Adadc = crate::RegValueT<Adadc_SPEC>;
1166
1167impl Adadc {
1168 #[doc = "Addition/Average Count Select"]
1169 #[inline(always)]
1170 pub fn adc(
1171 self,
1172 ) -> crate::common::RegisterField<
1173 0,
1174 0x7,
1175 1,
1176 0,
1177 adadc::Adc,
1178 adadc::Adc,
1179 Adadc_SPEC,
1180 crate::common::RW,
1181 > {
1182 crate::common::RegisterField::<
1183 0,
1184 0x7,
1185 1,
1186 0,
1187 adadc::Adc,
1188 adadc::Adc,
1189 Adadc_SPEC,
1190 crate::common::RW,
1191 >::from_register(self, 0)
1192 }
1193
1194 #[doc = "Average Mode Select"]
1195 #[inline(always)]
1196 pub fn avee(
1197 self,
1198 ) -> crate::common::RegisterField<
1199 7,
1200 0x1,
1201 1,
1202 0,
1203 adadc::Avee,
1204 adadc::Avee,
1205 Adadc_SPEC,
1206 crate::common::RW,
1207 > {
1208 crate::common::RegisterField::<
1209 7,
1210 0x1,
1211 1,
1212 0,
1213 adadc::Avee,
1214 adadc::Avee,
1215 Adadc_SPEC,
1216 crate::common::RW,
1217 >::from_register(self, 0)
1218 }
1219}
1220impl ::core::default::Default for Adadc {
1221 #[inline(always)]
1222 fn default() -> Adadc {
1223 <crate::RegValueT<Adadc_SPEC> as RegisterValue<_>>::new(0)
1224 }
1225}
1226pub mod adadc {
1227
1228 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1229 pub struct Adc_SPEC;
1230 pub type Adc = crate::EnumBitfieldStruct<u8, Adc_SPEC>;
1231 impl Adc {
1232 #[doc = "1-time conversion (no addition, same as normal conversion)"]
1233 pub const _000: Self = Self::new(0);
1234
1235 #[doc = "2-time conversion (1 addition)"]
1236 pub const _001: Self = Self::new(1);
1237
1238 #[doc = "3-time conversion (2 additions)"]
1239 pub const _010: Self = Self::new(2);
1240
1241 #[doc = "4-time conversion (3 additions)"]
1242 pub const _011: Self = Self::new(3);
1243
1244 #[doc = "16-time conversion (15 additions)"]
1245 pub const _101: Self = Self::new(5);
1246 }
1247 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1248 pub struct Avee_SPEC;
1249 pub type Avee = crate::EnumBitfieldStruct<u8, Avee_SPEC>;
1250 impl Avee {
1251 #[doc = "Enable addition mode"]
1252 pub const _0: Self = Self::new(0);
1253
1254 #[doc = "Enable average mode"]
1255 pub const _1: Self = Self::new(1);
1256 }
1257}
1258#[doc(hidden)]
1259#[derive(Copy, Clone, Eq, PartialEq)]
1260pub struct Adcer_SPEC;
1261impl crate::sealed::RegSpec for Adcer_SPEC {
1262 type DataType = u16;
1263}
1264
1265#[doc = "A/D Control Extended Register"]
1266pub type Adcer = crate::RegValueT<Adcer_SPEC>;
1267
1268impl Adcer {
1269 #[doc = "A/D Data Register Automatic Clearing Enable"]
1270 #[inline(always)]
1271 pub fn ace(
1272 self,
1273 ) -> crate::common::RegisterField<
1274 5,
1275 0x1,
1276 1,
1277 0,
1278 adcer::Ace,
1279 adcer::Ace,
1280 Adcer_SPEC,
1281 crate::common::RW,
1282 > {
1283 crate::common::RegisterField::<
1284 5,
1285 0x1,
1286 1,
1287 0,
1288 adcer::Ace,
1289 adcer::Ace,
1290 Adcer_SPEC,
1291 crate::common::RW,
1292 >::from_register(self, 0)
1293 }
1294
1295 #[doc = "Self-Diagnosis Conversion Voltage Select"]
1296 #[inline(always)]
1297 pub fn diagval(
1298 self,
1299 ) -> crate::common::RegisterField<
1300 8,
1301 0x3,
1302 1,
1303 0,
1304 adcer::Diagval,
1305 adcer::Diagval,
1306 Adcer_SPEC,
1307 crate::common::RW,
1308 > {
1309 crate::common::RegisterField::<
1310 8,
1311 0x3,
1312 1,
1313 0,
1314 adcer::Diagval,
1315 adcer::Diagval,
1316 Adcer_SPEC,
1317 crate::common::RW,
1318 >::from_register(self, 0)
1319 }
1320
1321 #[doc = "Self-Diagnosis Mode Select"]
1322 #[inline(always)]
1323 pub fn diagld(
1324 self,
1325 ) -> crate::common::RegisterField<
1326 10,
1327 0x1,
1328 1,
1329 0,
1330 adcer::Diagld,
1331 adcer::Diagld,
1332 Adcer_SPEC,
1333 crate::common::RW,
1334 > {
1335 crate::common::RegisterField::<
1336 10,
1337 0x1,
1338 1,
1339 0,
1340 adcer::Diagld,
1341 adcer::Diagld,
1342 Adcer_SPEC,
1343 crate::common::RW,
1344 >::from_register(self, 0)
1345 }
1346
1347 #[doc = "Self-Diagnosis Enable"]
1348 #[inline(always)]
1349 pub fn diagm(
1350 self,
1351 ) -> crate::common::RegisterField<
1352 11,
1353 0x1,
1354 1,
1355 0,
1356 adcer::Diagm,
1357 adcer::Diagm,
1358 Adcer_SPEC,
1359 crate::common::RW,
1360 > {
1361 crate::common::RegisterField::<
1362 11,
1363 0x1,
1364 1,
1365 0,
1366 adcer::Diagm,
1367 adcer::Diagm,
1368 Adcer_SPEC,
1369 crate::common::RW,
1370 >::from_register(self, 0)
1371 }
1372
1373 #[doc = "A/D Data Register Format Select"]
1374 #[inline(always)]
1375 pub fn adrfmt(
1376 self,
1377 ) -> crate::common::RegisterField<
1378 15,
1379 0x1,
1380 1,
1381 0,
1382 adcer::Adrfmt,
1383 adcer::Adrfmt,
1384 Adcer_SPEC,
1385 crate::common::RW,
1386 > {
1387 crate::common::RegisterField::<
1388 15,
1389 0x1,
1390 1,
1391 0,
1392 adcer::Adrfmt,
1393 adcer::Adrfmt,
1394 Adcer_SPEC,
1395 crate::common::RW,
1396 >::from_register(self, 0)
1397 }
1398}
1399impl ::core::default::Default for Adcer {
1400 #[inline(always)]
1401 fn default() -> Adcer {
1402 <crate::RegValueT<Adcer_SPEC> as RegisterValue<_>>::new(0)
1403 }
1404}
1405pub mod adcer {
1406
1407 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1408 pub struct Ace_SPEC;
1409 pub type Ace = crate::EnumBitfieldStruct<u8, Ace_SPEC>;
1410 impl Ace {
1411 #[doc = "Disable automatic clearing"]
1412 pub const _0: Self = Self::new(0);
1413
1414 #[doc = "Enable automatic clearing"]
1415 pub const _1: Self = Self::new(1);
1416 }
1417 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1418 pub struct Diagval_SPEC;
1419 pub type Diagval = crate::EnumBitfieldStruct<u8, Diagval_SPEC>;
1420 impl Diagval {
1421 #[doc = "Setting prohibited when self-diagnosis is enabled"]
1422 pub const _00: Self = Self::new(0);
1423
1424 #[doc = "0 V"]
1425 pub const _01: Self = Self::new(1);
1426
1427 #[doc = "Reference voltage × 1/2"]
1428 pub const _10: Self = Self::new(2);
1429
1430 #[doc = "Reference voltage"]
1431 pub const _11: Self = Self::new(3);
1432 }
1433 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1434 pub struct Diagld_SPEC;
1435 pub type Diagld = crate::EnumBitfieldStruct<u8, Diagld_SPEC>;
1436 impl Diagld {
1437 #[doc = "Select rotation mode for self-diagnosis voltage"]
1438 pub const _0: Self = Self::new(0);
1439
1440 #[doc = "Select mixed mode for self-diagnosis voltage"]
1441 pub const _1: Self = Self::new(1);
1442 }
1443 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1444 pub struct Diagm_SPEC;
1445 pub type Diagm = crate::EnumBitfieldStruct<u8, Diagm_SPEC>;
1446 impl Diagm {
1447 #[doc = "Disable ADC12 self-diagnosis"]
1448 pub const _0: Self = Self::new(0);
1449
1450 #[doc = "Enable ADC12 self-diagnosis"]
1451 pub const _1: Self = Self::new(1);
1452 }
1453 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1454 pub struct Adrfmt_SPEC;
1455 pub type Adrfmt = crate::EnumBitfieldStruct<u8, Adrfmt_SPEC>;
1456 impl Adrfmt {
1457 #[doc = "Select right-justified for the A/D data register format"]
1458 pub const _0: Self = Self::new(0);
1459
1460 #[doc = "Select left-justified for the A/D data register format"]
1461 pub const _1: Self = Self::new(1);
1462 }
1463}
1464#[doc(hidden)]
1465#[derive(Copy, Clone, Eq, PartialEq)]
1466pub struct Adstrgr_SPEC;
1467impl crate::sealed::RegSpec for Adstrgr_SPEC {
1468 type DataType = u16;
1469}
1470
1471#[doc = "A/D Conversion Start Trigger Select Register"]
1472pub type Adstrgr = crate::RegValueT<Adstrgr_SPEC>;
1473
1474impl Adstrgr {
1475 #[doc = "A/D Conversion Start Trigger Select for Group B"]
1476 #[inline(always)]
1477 pub fn trsb(
1478 self,
1479 ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, Adstrgr_SPEC, crate::common::RW> {
1480 crate::common::RegisterField::<0,0x3f,1,0,u8,u8,Adstrgr_SPEC,crate::common::RW>::from_register(self,0)
1481 }
1482
1483 #[doc = "A/D Conversion Start Trigger Select"]
1484 #[inline(always)]
1485 pub fn trsa(
1486 self,
1487 ) -> crate::common::RegisterField<8, 0x3f, 1, 0, u8, u8, Adstrgr_SPEC, crate::common::RW> {
1488 crate::common::RegisterField::<8,0x3f,1,0,u8,u8,Adstrgr_SPEC,crate::common::RW>::from_register(self,0)
1489 }
1490}
1491impl ::core::default::Default for Adstrgr {
1492 #[inline(always)]
1493 fn default() -> Adstrgr {
1494 <crate::RegValueT<Adstrgr_SPEC> as RegisterValue<_>>::new(0)
1495 }
1496}
1497
1498#[doc(hidden)]
1499#[derive(Copy, Clone, Eq, PartialEq)]
1500pub struct Adexicr_SPEC;
1501impl crate::sealed::RegSpec for Adexicr_SPEC {
1502 type DataType = u16;
1503}
1504
1505#[doc = "A/D Conversion Extended Input Control Registers"]
1506pub type Adexicr = crate::RegValueT<Adexicr_SPEC>;
1507
1508impl Adexicr {
1509 #[doc = "Temperature Sensor Output A/D-Converted Value Addition/Average Mode Select"]
1510 #[inline(always)]
1511 pub fn tssad(
1512 self,
1513 ) -> crate::common::RegisterField<
1514 0,
1515 0x1,
1516 1,
1517 0,
1518 adexicr::Tssad,
1519 adexicr::Tssad,
1520 Adexicr_SPEC,
1521 crate::common::RW,
1522 > {
1523 crate::common::RegisterField::<
1524 0,
1525 0x1,
1526 1,
1527 0,
1528 adexicr::Tssad,
1529 adexicr::Tssad,
1530 Adexicr_SPEC,
1531 crate::common::RW,
1532 >::from_register(self, 0)
1533 }
1534
1535 #[doc = "Internal Reference Voltage A/D-Converted Value Addition/Average Mode Select"]
1536 #[inline(always)]
1537 pub fn ocsad(
1538 self,
1539 ) -> crate::common::RegisterField<
1540 1,
1541 0x1,
1542 1,
1543 0,
1544 adexicr::Ocsad,
1545 adexicr::Ocsad,
1546 Adexicr_SPEC,
1547 crate::common::RW,
1548 > {
1549 crate::common::RegisterField::<
1550 1,
1551 0x1,
1552 1,
1553 0,
1554 adexicr::Ocsad,
1555 adexicr::Ocsad,
1556 Adexicr_SPEC,
1557 crate::common::RW,
1558 >::from_register(self, 0)
1559 }
1560
1561 #[doc = "Temperature Sensor Output A/D Conversion Select"]
1562 #[inline(always)]
1563 pub fn tssa(
1564 self,
1565 ) -> crate::common::RegisterField<
1566 8,
1567 0x1,
1568 1,
1569 0,
1570 adexicr::Tssa,
1571 adexicr::Tssa,
1572 Adexicr_SPEC,
1573 crate::common::RW,
1574 > {
1575 crate::common::RegisterField::<
1576 8,
1577 0x1,
1578 1,
1579 0,
1580 adexicr::Tssa,
1581 adexicr::Tssa,
1582 Adexicr_SPEC,
1583 crate::common::RW,
1584 >::from_register(self, 0)
1585 }
1586
1587 #[doc = "Internal Reference Voltage A/D Conversion Select"]
1588 #[inline(always)]
1589 pub fn ocsa(
1590 self,
1591 ) -> crate::common::RegisterField<
1592 9,
1593 0x1,
1594 1,
1595 0,
1596 adexicr::Ocsa,
1597 adexicr::Ocsa,
1598 Adexicr_SPEC,
1599 crate::common::RW,
1600 > {
1601 crate::common::RegisterField::<
1602 9,
1603 0x1,
1604 1,
1605 0,
1606 adexicr::Ocsa,
1607 adexicr::Ocsa,
1608 Adexicr_SPEC,
1609 crate::common::RW,
1610 >::from_register(self, 0)
1611 }
1612}
1613impl ::core::default::Default for Adexicr {
1614 #[inline(always)]
1615 fn default() -> Adexicr {
1616 <crate::RegValueT<Adexicr_SPEC> as RegisterValue<_>>::new(0)
1617 }
1618}
1619pub mod adexicr {
1620
1621 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1622 pub struct Tssad_SPEC;
1623 pub type Tssad = crate::EnumBitfieldStruct<u8, Tssad_SPEC>;
1624 impl Tssad {
1625 #[doc = "Do not select addition/average mode for temperature sensor output."]
1626 pub const _0: Self = Self::new(0);
1627
1628 #[doc = "Select addition/average mode for temperature sensor output."]
1629 pub const _1: Self = Self::new(1);
1630 }
1631 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1632 pub struct Ocsad_SPEC;
1633 pub type Ocsad = crate::EnumBitfieldStruct<u8, Ocsad_SPEC>;
1634 impl Ocsad {
1635 #[doc = "Do not select addition/average mode for internal reference voltage."]
1636 pub const _0: Self = Self::new(0);
1637
1638 #[doc = "Select addition/average mode for internal reference voltage."]
1639 pub const _1: Self = Self::new(1);
1640 }
1641 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1642 pub struct Tssa_SPEC;
1643 pub type Tssa = crate::EnumBitfieldStruct<u8, Tssa_SPEC>;
1644 impl Tssa {
1645 #[doc = "Disable A/D conversion of temperature sensor output"]
1646 pub const _0: Self = Self::new(0);
1647
1648 #[doc = "Enable A/D conversion of temperature sensor output"]
1649 pub const _1: Self = Self::new(1);
1650 }
1651 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1652 pub struct Ocsa_SPEC;
1653 pub type Ocsa = crate::EnumBitfieldStruct<u8, Ocsa_SPEC>;
1654 impl Ocsa {
1655 #[doc = "Disable A/D conversion of internal reference voltage"]
1656 pub const _0: Self = Self::new(0);
1657
1658 #[doc = "Enable A/D conversion of internal reference voltage"]
1659 pub const _1: Self = Self::new(1);
1660 }
1661}
1662#[doc(hidden)]
1663#[derive(Copy, Clone, Eq, PartialEq)]
1664pub struct Adansb0_SPEC;
1665impl crate::sealed::RegSpec for Adansb0_SPEC {
1666 type DataType = u16;
1667}
1668
1669#[doc = "A/D Channel Select Register B0"]
1670pub type Adansb0 = crate::RegValueT<Adansb0_SPEC>;
1671
1672impl Adansb0 {
1673 #[doc = "A/D Conversion Channels Select"]
1674 #[inline(always)]
1675 pub fn ansb0(
1676 self,
1677 ) -> crate::common::RegisterField<
1678 0,
1679 0x1,
1680 1,
1681 0,
1682 adansb0::Ansb0,
1683 adansb0::Ansb0,
1684 Adansb0_SPEC,
1685 crate::common::RW,
1686 > {
1687 crate::common::RegisterField::<
1688 0,
1689 0x1,
1690 1,
1691 0,
1692 adansb0::Ansb0,
1693 adansb0::Ansb0,
1694 Adansb0_SPEC,
1695 crate::common::RW,
1696 >::from_register(self, 0)
1697 }
1698
1699 #[doc = "A/D Conversion Channels Select"]
1700 #[inline(always)]
1701 pub fn ansb1(
1702 self,
1703 ) -> crate::common::RegisterField<
1704 1,
1705 0x1,
1706 1,
1707 0,
1708 adansb0::Ansb1,
1709 adansb0::Ansb1,
1710 Adansb0_SPEC,
1711 crate::common::RW,
1712 > {
1713 crate::common::RegisterField::<
1714 1,
1715 0x1,
1716 1,
1717 0,
1718 adansb0::Ansb1,
1719 adansb0::Ansb1,
1720 Adansb0_SPEC,
1721 crate::common::RW,
1722 >::from_register(self, 0)
1723 }
1724
1725 #[doc = "A/D Conversion Channels Select"]
1726 #[inline(always)]
1727 pub fn ansb2(
1728 self,
1729 ) -> crate::common::RegisterField<
1730 2,
1731 0x1,
1732 1,
1733 0,
1734 adansb0::Ansb2,
1735 adansb0::Ansb2,
1736 Adansb0_SPEC,
1737 crate::common::RW,
1738 > {
1739 crate::common::RegisterField::<
1740 2,
1741 0x1,
1742 1,
1743 0,
1744 adansb0::Ansb2,
1745 adansb0::Ansb2,
1746 Adansb0_SPEC,
1747 crate::common::RW,
1748 >::from_register(self, 0)
1749 }
1750
1751 #[doc = "A/D Conversion Channels Select"]
1752 #[inline(always)]
1753 pub fn ansb3(
1754 self,
1755 ) -> crate::common::RegisterField<
1756 3,
1757 0x1,
1758 1,
1759 0,
1760 adansb0::Ansb3,
1761 adansb0::Ansb3,
1762 Adansb0_SPEC,
1763 crate::common::RW,
1764 > {
1765 crate::common::RegisterField::<
1766 3,
1767 0x1,
1768 1,
1769 0,
1770 adansb0::Ansb3,
1771 adansb0::Ansb3,
1772 Adansb0_SPEC,
1773 crate::common::RW,
1774 >::from_register(self, 0)
1775 }
1776}
1777impl ::core::default::Default for Adansb0 {
1778 #[inline(always)]
1779 fn default() -> Adansb0 {
1780 <crate::RegValueT<Adansb0_SPEC> as RegisterValue<_>>::new(0)
1781 }
1782}
1783pub mod adansb0 {
1784
1785 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1786 pub struct Ansb0_SPEC;
1787 pub type Ansb0 = crate::EnumBitfieldStruct<u8, Ansb0_SPEC>;
1788 impl Ansb0 {
1789 #[doc = "Do not select associated input channel"]
1790 pub const _0: Self = Self::new(0);
1791
1792 #[doc = "Select associated input channel"]
1793 pub const _1: Self = Self::new(1);
1794 }
1795 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1796 pub struct Ansb1_SPEC;
1797 pub type Ansb1 = crate::EnumBitfieldStruct<u8, Ansb1_SPEC>;
1798 impl Ansb1 {
1799 #[doc = "Do not select associated input channel"]
1800 pub const _0: Self = Self::new(0);
1801
1802 #[doc = "Select associated input channel"]
1803 pub const _1: Self = Self::new(1);
1804 }
1805 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1806 pub struct Ansb2_SPEC;
1807 pub type Ansb2 = crate::EnumBitfieldStruct<u8, Ansb2_SPEC>;
1808 impl Ansb2 {
1809 #[doc = "Do not select associated input channel"]
1810 pub const _0: Self = Self::new(0);
1811
1812 #[doc = "Select associated input channel"]
1813 pub const _1: Self = Self::new(1);
1814 }
1815 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1816 pub struct Ansb3_SPEC;
1817 pub type Ansb3 = crate::EnumBitfieldStruct<u8, Ansb3_SPEC>;
1818 impl Ansb3 {
1819 #[doc = "Do not select associated input channel"]
1820 pub const _0: Self = Self::new(0);
1821
1822 #[doc = "Select associated input channel"]
1823 pub const _1: Self = Self::new(1);
1824 }
1825}
1826#[doc(hidden)]
1827#[derive(Copy, Clone, Eq, PartialEq)]
1828pub struct Addbldr_SPEC;
1829impl crate::sealed::RegSpec for Addbldr_SPEC {
1830 type DataType = u16;
1831}
1832
1833#[doc = "A/D Data Duplexing Register"]
1834pub type Addbldr = crate::RegValueT<Addbldr_SPEC>;
1835
1836impl Addbldr {
1837 #[doc = "Converted Value 15 to 0"]
1838 #[inline(always)]
1839 pub fn addbldr(
1840 self,
1841 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Addbldr_SPEC, crate::common::R>
1842 {
1843 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Addbldr_SPEC,crate::common::R>::from_register(self,0)
1844 }
1845}
1846impl ::core::default::Default for Addbldr {
1847 #[inline(always)]
1848 fn default() -> Addbldr {
1849 <crate::RegValueT<Addbldr_SPEC> as RegisterValue<_>>::new(0)
1850 }
1851}
1852
1853#[doc(hidden)]
1854#[derive(Copy, Clone, Eq, PartialEq)]
1855pub struct Adtsdr_SPEC;
1856impl crate::sealed::RegSpec for Adtsdr_SPEC {
1857 type DataType = u16;
1858}
1859
1860#[doc = "A/D Temperature Sensor Data Register"]
1861pub type Adtsdr = crate::RegValueT<Adtsdr_SPEC>;
1862
1863impl Adtsdr {
1864 #[doc = "Converted Value 15 to 0"]
1865 #[inline(always)]
1866 pub fn adtsdr(
1867 self,
1868 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Adtsdr_SPEC, crate::common::R>
1869 {
1870 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Adtsdr_SPEC,crate::common::R>::from_register(self,0)
1871 }
1872}
1873impl ::core::default::Default for Adtsdr {
1874 #[inline(always)]
1875 fn default() -> Adtsdr {
1876 <crate::RegValueT<Adtsdr_SPEC> as RegisterValue<_>>::new(0)
1877 }
1878}
1879
1880#[doc(hidden)]
1881#[derive(Copy, Clone, Eq, PartialEq)]
1882pub struct Adocdr_SPEC;
1883impl crate::sealed::RegSpec for Adocdr_SPEC {
1884 type DataType = u16;
1885}
1886
1887#[doc = "A/D Internal Reference Voltage Data Register"]
1888pub type Adocdr = crate::RegValueT<Adocdr_SPEC>;
1889
1890impl Adocdr {
1891 #[doc = "Converted Value 15 to 0"]
1892 #[inline(always)]
1893 pub fn adocdr(
1894 self,
1895 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Adocdr_SPEC, crate::common::R>
1896 {
1897 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Adocdr_SPEC,crate::common::R>::from_register(self,0)
1898 }
1899}
1900impl ::core::default::Default for Adocdr {
1901 #[inline(always)]
1902 fn default() -> Adocdr {
1903 <crate::RegValueT<Adocdr_SPEC> as RegisterValue<_>>::new(0)
1904 }
1905}
1906
1907#[doc(hidden)]
1908#[derive(Copy, Clone, Eq, PartialEq)]
1909pub struct Adrd_SPEC;
1910impl crate::sealed::RegSpec for Adrd_SPEC {
1911 type DataType = u16;
1912}
1913
1914#[doc = "A/D Self-Diagnosis Data Register"]
1915pub type Adrd = crate::RegValueT<Adrd_SPEC>;
1916
1917impl Adrd {
1918 #[doc = "Converted Value 11 to 0"]
1919 #[inline(always)]
1920 pub fn ad(
1921 self,
1922 ) -> crate::common::RegisterField<0, 0xfff, 1, 0, u16, u16, Adrd_SPEC, crate::common::R> {
1923 crate::common::RegisterField::<0,0xfff,1,0,u16,u16,Adrd_SPEC,crate::common::R>::from_register(self,0)
1924 }
1925
1926 #[doc = "Self-Diagnosis Status"]
1927 #[inline(always)]
1928 pub fn diagst(
1929 self,
1930 ) -> crate::common::RegisterField<
1931 14,
1932 0x3,
1933 1,
1934 0,
1935 adrd::Diagst,
1936 adrd::Diagst,
1937 Adrd_SPEC,
1938 crate::common::R,
1939 > {
1940 crate::common::RegisterField::<
1941 14,
1942 0x3,
1943 1,
1944 0,
1945 adrd::Diagst,
1946 adrd::Diagst,
1947 Adrd_SPEC,
1948 crate::common::R,
1949 >::from_register(self, 0)
1950 }
1951}
1952impl ::core::default::Default for Adrd {
1953 #[inline(always)]
1954 fn default() -> Adrd {
1955 <crate::RegValueT<Adrd_SPEC> as RegisterValue<_>>::new(0)
1956 }
1957}
1958pub mod adrd {
1959
1960 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1961 pub struct Diagst_SPEC;
1962 pub type Diagst = crate::EnumBitfieldStruct<u8, Diagst_SPEC>;
1963 impl Diagst {
1964 #[doc = "Self-diagnosis not executed after power-on."]
1965 pub const _00: Self = Self::new(0);
1966
1967 #[doc = "Self-diagnosis was executed using the 0 V voltage."]
1968 pub const _01: Self = Self::new(1);
1969
1970 #[doc = "Self-diagnosis was executed using the reference voltage × 1/2."]
1971 pub const _10: Self = Self::new(2);
1972
1973 #[doc = "Self-diagnosis was executed using the reference voltage ."]
1974 pub const _11: Self = Self::new(3);
1975 }
1976}
1977#[doc(hidden)]
1978#[derive(Copy, Clone, Eq, PartialEq)]
1979pub struct Addr_SPEC;
1980impl crate::sealed::RegSpec for Addr_SPEC {
1981 type DataType = u16;
1982}
1983
1984#[doc = "A/D Data Registers %s"]
1985pub type Addr = crate::RegValueT<Addr_SPEC>;
1986
1987impl Addr {
1988 #[doc = "Converted Value 15 to 0"]
1989 #[inline(always)]
1990 pub fn addr(
1991 self,
1992 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Addr_SPEC, crate::common::R> {
1993 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Addr_SPEC,crate::common::R>::from_register(self,0)
1994 }
1995}
1996impl ::core::default::Default for Addr {
1997 #[inline(always)]
1998 fn default() -> Addr {
1999 <crate::RegValueT<Addr_SPEC> as RegisterValue<_>>::new(0)
2000 }
2001}
2002
2003#[doc(hidden)]
2004#[derive(Copy, Clone, Eq, PartialEq)]
2005pub struct Addiscr_SPEC;
2006impl crate::sealed::RegSpec for Addiscr_SPEC {
2007 type DataType = u8;
2008}
2009
2010#[doc = "A/D Disconnection Detection Control Register"]
2011pub type Addiscr = crate::RegValueT<Addiscr_SPEC>;
2012
2013impl Addiscr {
2014 #[doc = "Disconnection Detection Assist Setting"]
2015 #[inline(always)]
2016 pub fn adndis(
2017 self,
2018 ) -> crate::common::RegisterField<
2019 0,
2020 0xf,
2021 1,
2022 0,
2023 addiscr::Adndis,
2024 addiscr::Adndis,
2025 Addiscr_SPEC,
2026 crate::common::RW,
2027 > {
2028 crate::common::RegisterField::<
2029 0,
2030 0xf,
2031 1,
2032 0,
2033 addiscr::Adndis,
2034 addiscr::Adndis,
2035 Addiscr_SPEC,
2036 crate::common::RW,
2037 >::from_register(self, 0)
2038 }
2039
2040 #[doc = "Precharge/discharge select"]
2041 #[inline(always)]
2042 pub fn pchg(
2043 self,
2044 ) -> crate::common::RegisterField<
2045 4,
2046 0x1,
2047 1,
2048 0,
2049 addiscr::Pchg,
2050 addiscr::Pchg,
2051 Addiscr_SPEC,
2052 crate::common::RW,
2053 > {
2054 crate::common::RegisterField::<
2055 4,
2056 0x1,
2057 1,
2058 0,
2059 addiscr::Pchg,
2060 addiscr::Pchg,
2061 Addiscr_SPEC,
2062 crate::common::RW,
2063 >::from_register(self, 0)
2064 }
2065}
2066impl ::core::default::Default for Addiscr {
2067 #[inline(always)]
2068 fn default() -> Addiscr {
2069 <crate::RegValueT<Addiscr_SPEC> as RegisterValue<_>>::new(0)
2070 }
2071}
2072pub mod addiscr {
2073
2074 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2075 pub struct Adndis_SPEC;
2076 pub type Adndis = crate::EnumBitfieldStruct<u8, Adndis_SPEC>;
2077 impl Adndis {
2078 #[doc = "The disconnection detection assist function is disabled"]
2079 pub const _0_X_0: Self = Self::new(0);
2080
2081 #[doc = "Setting prohibited"]
2082 pub const _0_X_1: Self = Self::new(1);
2083 }
2084 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2085 pub struct Pchg_SPEC;
2086 pub type Pchg = crate::EnumBitfieldStruct<u8, Pchg_SPEC>;
2087 impl Pchg {
2088 #[doc = "Discharge"]
2089 pub const _0: Self = Self::new(0);
2090
2091 #[doc = "Precharge"]
2092 pub const _1: Self = Self::new(1);
2093 }
2094}
2095#[doc(hidden)]
2096#[derive(Copy, Clone, Eq, PartialEq)]
2097pub struct Adacsr_SPEC;
2098impl crate::sealed::RegSpec for Adacsr_SPEC {
2099 type DataType = u8;
2100}
2101
2102#[doc = "A/D Conversion Operation Mode Select Register"]
2103pub type Adacsr = crate::RegValueT<Adacsr_SPEC>;
2104
2105impl Adacsr {
2106 #[doc = "Successive Approximation Control Setting"]
2107 #[inline(always)]
2108 pub fn adsac(
2109 self,
2110 ) -> crate::common::RegisterField<
2111 1,
2112 0x1,
2113 1,
2114 0,
2115 adacsr::Adsac,
2116 adacsr::Adsac,
2117 Adacsr_SPEC,
2118 crate::common::RW,
2119 > {
2120 crate::common::RegisterField::<
2121 1,
2122 0x1,
2123 1,
2124 0,
2125 adacsr::Adsac,
2126 adacsr::Adsac,
2127 Adacsr_SPEC,
2128 crate::common::RW,
2129 >::from_register(self, 0)
2130 }
2131}
2132impl ::core::default::Default for Adacsr {
2133 #[inline(always)]
2134 fn default() -> Adacsr {
2135 <crate::RegValueT<Adacsr_SPEC> as RegisterValue<_>>::new(0)
2136 }
2137}
2138pub mod adacsr {
2139
2140 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2141 pub struct Adsac_SPEC;
2142 pub type Adsac = crate::EnumBitfieldStruct<u8, Adsac_SPEC>;
2143 impl Adsac {
2144 #[doc = "Normal conversion mode (default)"]
2145 pub const _0: Self = Self::new(0);
2146
2147 #[doc = "Fast conversion mode"]
2148 pub const _1: Self = Self::new(1);
2149 }
2150}
2151#[doc(hidden)]
2152#[derive(Copy, Clone, Eq, PartialEq)]
2153pub struct Adgspcr_SPEC;
2154impl crate::sealed::RegSpec for Adgspcr_SPEC {
2155 type DataType = u16;
2156}
2157
2158#[doc = "A/D Group Scan Priority Control Register"]
2159pub type Adgspcr = crate::RegValueT<Adgspcr_SPEC>;
2160
2161impl Adgspcr {
2162 #[doc = "Group Priority Operation Setting"]
2163 #[inline(always)]
2164 pub fn pgs(
2165 self,
2166 ) -> crate::common::RegisterField<
2167 0,
2168 0x1,
2169 1,
2170 0,
2171 adgspcr::Pgs,
2172 adgspcr::Pgs,
2173 Adgspcr_SPEC,
2174 crate::common::RW,
2175 > {
2176 crate::common::RegisterField::<
2177 0,
2178 0x1,
2179 1,
2180 0,
2181 adgspcr::Pgs,
2182 adgspcr::Pgs,
2183 Adgspcr_SPEC,
2184 crate::common::RW,
2185 >::from_register(self, 0)
2186 }
2187
2188 #[doc = "Lower-Priority Group Restart Setting"]
2189 #[inline(always)]
2190 pub fn gbrscn(
2191 self,
2192 ) -> crate::common::RegisterField<
2193 1,
2194 0x1,
2195 1,
2196 0,
2197 adgspcr::Gbrscn,
2198 adgspcr::Gbrscn,
2199 Adgspcr_SPEC,
2200 crate::common::RW,
2201 > {
2202 crate::common::RegisterField::<
2203 1,
2204 0x1,
2205 1,
2206 0,
2207 adgspcr::Gbrscn,
2208 adgspcr::Gbrscn,
2209 Adgspcr_SPEC,
2210 crate::common::RW,
2211 >::from_register(self, 0)
2212 }
2213
2214 #[doc = "Single Scan Continuous Start"]
2215 #[inline(always)]
2216 pub fn gbrp(
2217 self,
2218 ) -> crate::common::RegisterField<
2219 15,
2220 0x1,
2221 1,
2222 0,
2223 adgspcr::Gbrp,
2224 adgspcr::Gbrp,
2225 Adgspcr_SPEC,
2226 crate::common::RW,
2227 > {
2228 crate::common::RegisterField::<
2229 15,
2230 0x1,
2231 1,
2232 0,
2233 adgspcr::Gbrp,
2234 adgspcr::Gbrp,
2235 Adgspcr_SPEC,
2236 crate::common::RW,
2237 >::from_register(self, 0)
2238 }
2239}
2240impl ::core::default::Default for Adgspcr {
2241 #[inline(always)]
2242 fn default() -> Adgspcr {
2243 <crate::RegValueT<Adgspcr_SPEC> as RegisterValue<_>>::new(0)
2244 }
2245}
2246pub mod adgspcr {
2247
2248 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2249 pub struct Pgs_SPEC;
2250 pub type Pgs = crate::EnumBitfieldStruct<u8, Pgs_SPEC>;
2251 impl Pgs {
2252 #[doc = "Operate without group priority control."]
2253 pub const _0: Self = Self::new(0);
2254
2255 #[doc = "Operate with group priority control."]
2256 pub const _1: Self = Self::new(1);
2257 }
2258 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2259 pub struct Gbrscn_SPEC;
2260 pub type Gbrscn = crate::EnumBitfieldStruct<u8, Gbrscn_SPEC>;
2261 impl Gbrscn {
2262 #[doc = "Disable rescanning of the group that was stopped in group priority operation"]
2263 pub const _0: Self = Self::new(0);
2264
2265 #[doc = "Enable rescanning of the group that was stopped in group priority operation."]
2266 pub const _1: Self = Self::new(1);
2267 }
2268 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2269 pub struct Gbrp_SPEC;
2270 pub type Gbrp = crate::EnumBitfieldStruct<u8, Gbrp_SPEC>;
2271 impl Gbrp {
2272 #[doc = "Single scan is not continuously activated."]
2273 pub const _0: Self = Self::new(0);
2274
2275 #[doc = "Single scan for the group with the lower-priority is continuously activated."]
2276 pub const _1: Self = Self::new(1);
2277 }
2278}
2279#[doc(hidden)]
2280#[derive(Copy, Clone, Eq, PartialEq)]
2281pub struct Addbldra_SPEC;
2282impl crate::sealed::RegSpec for Addbldra_SPEC {
2283 type DataType = u16;
2284}
2285
2286#[doc = "A/D Data Duplexing Register A"]
2287pub type Addbldra = crate::RegValueT<Addbldra_SPEC>;
2288
2289impl Addbldra {
2290 #[doc = "Converted Value 15 to 0"]
2291 #[inline(always)]
2292 pub fn addbldr(
2293 self,
2294 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Addbldra_SPEC, crate::common::R>
2295 {
2296 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Addbldra_SPEC,crate::common::R>::from_register(self,0)
2297 }
2298}
2299impl ::core::default::Default for Addbldra {
2300 #[inline(always)]
2301 fn default() -> Addbldra {
2302 <crate::RegValueT<Addbldra_SPEC> as RegisterValue<_>>::new(0)
2303 }
2304}
2305
2306#[doc(hidden)]
2307#[derive(Copy, Clone, Eq, PartialEq)]
2308pub struct Addbldrb_SPEC;
2309impl crate::sealed::RegSpec for Addbldrb_SPEC {
2310 type DataType = u16;
2311}
2312
2313#[doc = "A/D Data Duplexing Register B"]
2314pub type Addbldrb = crate::RegValueT<Addbldrb_SPEC>;
2315
2316impl Addbldrb {
2317 #[doc = "Converted Value 15 to 0"]
2318 #[inline(always)]
2319 pub fn addbldr(
2320 self,
2321 ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Addbldrb_SPEC, crate::common::R>
2322 {
2323 crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Addbldrb_SPEC,crate::common::R>::from_register(self,0)
2324 }
2325}
2326impl ::core::default::Default for Addbldrb {
2327 #[inline(always)]
2328 fn default() -> Addbldrb {
2329 <crate::RegValueT<Addbldrb_SPEC> as RegisterValue<_>>::new(0)
2330 }
2331}
2332
2333#[doc(hidden)]
2334#[derive(Copy, Clone, Eq, PartialEq)]
2335pub struct Adhvrefcnt_SPEC;
2336impl crate::sealed::RegSpec for Adhvrefcnt_SPEC {
2337 type DataType = u8;
2338}
2339
2340#[doc = "A/D High-Potential/Low-Potential Reference Voltage Control Register"]
2341pub type Adhvrefcnt = crate::RegValueT<Adhvrefcnt_SPEC>;
2342
2343impl Adhvrefcnt {
2344 #[doc = "High-Potential Reference Voltage Select"]
2345 #[inline(always)]
2346 pub fn hvsel(
2347 self,
2348 ) -> crate::common::RegisterField<
2349 0,
2350 0x3,
2351 1,
2352 0,
2353 adhvrefcnt::Hvsel,
2354 adhvrefcnt::Hvsel,
2355 Adhvrefcnt_SPEC,
2356 crate::common::RW,
2357 > {
2358 crate::common::RegisterField::<
2359 0,
2360 0x3,
2361 1,
2362 0,
2363 adhvrefcnt::Hvsel,
2364 adhvrefcnt::Hvsel,
2365 Adhvrefcnt_SPEC,
2366 crate::common::RW,
2367 >::from_register(self, 0)
2368 }
2369
2370 #[doc = "Low-Potential Reference Voltage Select"]
2371 #[inline(always)]
2372 pub fn lvsel(
2373 self,
2374 ) -> crate::common::RegisterField<
2375 4,
2376 0x1,
2377 1,
2378 0,
2379 adhvrefcnt::Lvsel,
2380 adhvrefcnt::Lvsel,
2381 Adhvrefcnt_SPEC,
2382 crate::common::RW,
2383 > {
2384 crate::common::RegisterField::<
2385 4,
2386 0x1,
2387 1,
2388 0,
2389 adhvrefcnt::Lvsel,
2390 adhvrefcnt::Lvsel,
2391 Adhvrefcnt_SPEC,
2392 crate::common::RW,
2393 >::from_register(self, 0)
2394 }
2395
2396 #[doc = "Sleep"]
2397 #[inline(always)]
2398 pub fn adslp(
2399 self,
2400 ) -> crate::common::RegisterField<
2401 7,
2402 0x1,
2403 1,
2404 0,
2405 adhvrefcnt::Adslp,
2406 adhvrefcnt::Adslp,
2407 Adhvrefcnt_SPEC,
2408 crate::common::RW,
2409 > {
2410 crate::common::RegisterField::<
2411 7,
2412 0x1,
2413 1,
2414 0,
2415 adhvrefcnt::Adslp,
2416 adhvrefcnt::Adslp,
2417 Adhvrefcnt_SPEC,
2418 crate::common::RW,
2419 >::from_register(self, 0)
2420 }
2421}
2422impl ::core::default::Default for Adhvrefcnt {
2423 #[inline(always)]
2424 fn default() -> Adhvrefcnt {
2425 <crate::RegValueT<Adhvrefcnt_SPEC> as RegisterValue<_>>::new(0)
2426 }
2427}
2428pub mod adhvrefcnt {
2429
2430 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2431 pub struct Hvsel_SPEC;
2432 pub type Hvsel = crate::EnumBitfieldStruct<u8, Hvsel_SPEC>;
2433 impl Hvsel {
2434 #[doc = "AVCC is selected as the high-potential reference voltage"]
2435 pub const _00: Self = Self::new(0);
2436
2437 #[doc = "VREFH0 is selected as the high-potential reference voltage"]
2438 pub const _01: Self = Self::new(1);
2439
2440 #[doc = "Internal reference voltage is selected as the high-potential reference voltage"]
2441 pub const _10: Self = Self::new(2);
2442
2443 #[doc = "No reference voltage pin is selected (internal node discharge)"]
2444 pub const _11: Self = Self::new(3);
2445 }
2446 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2447 pub struct Lvsel_SPEC;
2448 pub type Lvsel = crate::EnumBitfieldStruct<u8, Lvsel_SPEC>;
2449 impl Lvsel {
2450 #[doc = "AVSS is selected as the low-potential reference voltage."]
2451 pub const _0: Self = Self::new(0);
2452
2453 #[doc = "VREFL0 is selected as the low-potential reference voltage."]
2454 pub const _1: Self = Self::new(1);
2455 }
2456 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2457 pub struct Adslp_SPEC;
2458 pub type Adslp = crate::EnumBitfieldStruct<u8, Adslp_SPEC>;
2459 impl Adslp {
2460 #[doc = "Normal operation"]
2461 pub const _0: Self = Self::new(0);
2462
2463 #[doc = "Standby state"]
2464 pub const _1: Self = Self::new(1);
2465 }
2466}
2467#[doc(hidden)]
2468#[derive(Copy, Clone, Eq, PartialEq)]
2469pub struct Adwinmon_SPEC;
2470impl crate::sealed::RegSpec for Adwinmon_SPEC {
2471 type DataType = u8;
2472}
2473
2474#[doc = "A/D Compare Function Window A/B Status Monitor Register"]
2475pub type Adwinmon = crate::RegValueT<Adwinmon_SPEC>;
2476
2477impl Adwinmon {
2478 #[doc = "Combination Result Monitor"]
2479 #[inline(always)]
2480 pub fn moncomb(
2481 self,
2482 ) -> crate::common::RegisterField<
2483 0,
2484 0x1,
2485 1,
2486 0,
2487 adwinmon::Moncomb,
2488 adwinmon::Moncomb,
2489 Adwinmon_SPEC,
2490 crate::common::R,
2491 > {
2492 crate::common::RegisterField::<
2493 0,
2494 0x1,
2495 1,
2496 0,
2497 adwinmon::Moncomb,
2498 adwinmon::Moncomb,
2499 Adwinmon_SPEC,
2500 crate::common::R,
2501 >::from_register(self, 0)
2502 }
2503
2504 #[doc = "Comparison Result Monitor A"]
2505 #[inline(always)]
2506 pub fn moncmpa(
2507 self,
2508 ) -> crate::common::RegisterField<
2509 4,
2510 0x1,
2511 1,
2512 0,
2513 adwinmon::Moncmpa,
2514 adwinmon::Moncmpa,
2515 Adwinmon_SPEC,
2516 crate::common::R,
2517 > {
2518 crate::common::RegisterField::<
2519 4,
2520 0x1,
2521 1,
2522 0,
2523 adwinmon::Moncmpa,
2524 adwinmon::Moncmpa,
2525 Adwinmon_SPEC,
2526 crate::common::R,
2527 >::from_register(self, 0)
2528 }
2529
2530 #[doc = "Comparison Result Monitor B"]
2531 #[inline(always)]
2532 pub fn moncmpb(
2533 self,
2534 ) -> crate::common::RegisterField<
2535 5,
2536 0x1,
2537 1,
2538 0,
2539 adwinmon::Moncmpb,
2540 adwinmon::Moncmpb,
2541 Adwinmon_SPEC,
2542 crate::common::R,
2543 > {
2544 crate::common::RegisterField::<
2545 5,
2546 0x1,
2547 1,
2548 0,
2549 adwinmon::Moncmpb,
2550 adwinmon::Moncmpb,
2551 Adwinmon_SPEC,
2552 crate::common::R,
2553 >::from_register(self, 0)
2554 }
2555}
2556impl ::core::default::Default for Adwinmon {
2557 #[inline(always)]
2558 fn default() -> Adwinmon {
2559 <crate::RegValueT<Adwinmon_SPEC> as RegisterValue<_>>::new(0)
2560 }
2561}
2562pub mod adwinmon {
2563
2564 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2565 pub struct Moncomb_SPEC;
2566 pub type Moncomb = crate::EnumBitfieldStruct<u8, Moncomb_SPEC>;
2567 impl Moncomb {
2568 #[doc = "Window A/B composite conditions are not met."]
2569 pub const _0: Self = Self::new(0);
2570
2571 #[doc = "Window A/B composite conditions are met."]
2572 pub const _1: Self = Self::new(1);
2573 }
2574 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2575 pub struct Moncmpa_SPEC;
2576 pub type Moncmpa = crate::EnumBitfieldStruct<u8, Moncmpa_SPEC>;
2577 impl Moncmpa {
2578 #[doc = "Window A comparison conditions are not met."]
2579 pub const _0: Self = Self::new(0);
2580
2581 #[doc = "Window A comparison conditions are met."]
2582 pub const _1: Self = Self::new(1);
2583 }
2584 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2585 pub struct Moncmpb_SPEC;
2586 pub type Moncmpb = crate::EnumBitfieldStruct<u8, Moncmpb_SPEC>;
2587 impl Moncmpb {
2588 #[doc = "Window B comparison conditions are not met."]
2589 pub const _0: Self = Self::new(0);
2590
2591 #[doc = "Window B comparison conditions are met."]
2592 pub const _1: Self = Self::new(1);
2593 }
2594}
2595#[doc(hidden)]
2596#[derive(Copy, Clone, Eq, PartialEq)]
2597pub struct Adcmpcr_SPEC;
2598impl crate::sealed::RegSpec for Adcmpcr_SPEC {
2599 type DataType = u16;
2600}
2601
2602#[doc = "A/D Compare Function Control Register"]
2603pub type Adcmpcr = crate::RegValueT<Adcmpcr_SPEC>;
2604
2605impl Adcmpcr {
2606 #[doc = "Window A/B Composite Conditions Setting"]
2607 #[inline(always)]
2608 pub fn cmpab(
2609 self,
2610 ) -> crate::common::RegisterField<
2611 0,
2612 0x3,
2613 1,
2614 0,
2615 adcmpcr::Cmpab,
2616 adcmpcr::Cmpab,
2617 Adcmpcr_SPEC,
2618 crate::common::RW,
2619 > {
2620 crate::common::RegisterField::<
2621 0,
2622 0x3,
2623 1,
2624 0,
2625 adcmpcr::Cmpab,
2626 adcmpcr::Cmpab,
2627 Adcmpcr_SPEC,
2628 crate::common::RW,
2629 >::from_register(self, 0)
2630 }
2631
2632 #[doc = "Compare Window B Operation Enable"]
2633 #[inline(always)]
2634 pub fn cmpbe(
2635 self,
2636 ) -> crate::common::RegisterField<
2637 9,
2638 0x1,
2639 1,
2640 0,
2641 adcmpcr::Cmpbe,
2642 adcmpcr::Cmpbe,
2643 Adcmpcr_SPEC,
2644 crate::common::RW,
2645 > {
2646 crate::common::RegisterField::<
2647 9,
2648 0x1,
2649 1,
2650 0,
2651 adcmpcr::Cmpbe,
2652 adcmpcr::Cmpbe,
2653 Adcmpcr_SPEC,
2654 crate::common::RW,
2655 >::from_register(self, 0)
2656 }
2657
2658 #[doc = "Compare Window A Operation Enable"]
2659 #[inline(always)]
2660 pub fn cmpae(
2661 self,
2662 ) -> crate::common::RegisterField<
2663 11,
2664 0x1,
2665 1,
2666 0,
2667 adcmpcr::Cmpae,
2668 adcmpcr::Cmpae,
2669 Adcmpcr_SPEC,
2670 crate::common::RW,
2671 > {
2672 crate::common::RegisterField::<
2673 11,
2674 0x1,
2675 1,
2676 0,
2677 adcmpcr::Cmpae,
2678 adcmpcr::Cmpae,
2679 Adcmpcr_SPEC,
2680 crate::common::RW,
2681 >::from_register(self, 0)
2682 }
2683
2684 #[doc = "Compare B Interrupt Enable"]
2685 #[inline(always)]
2686 pub fn cmpbie(
2687 self,
2688 ) -> crate::common::RegisterField<
2689 13,
2690 0x1,
2691 1,
2692 0,
2693 adcmpcr::Cmpbie,
2694 adcmpcr::Cmpbie,
2695 Adcmpcr_SPEC,
2696 crate::common::RW,
2697 > {
2698 crate::common::RegisterField::<
2699 13,
2700 0x1,
2701 1,
2702 0,
2703 adcmpcr::Cmpbie,
2704 adcmpcr::Cmpbie,
2705 Adcmpcr_SPEC,
2706 crate::common::RW,
2707 >::from_register(self, 0)
2708 }
2709
2710 #[doc = "Window Function Setting"]
2711 #[inline(always)]
2712 pub fn wcmpe(
2713 self,
2714 ) -> crate::common::RegisterField<
2715 14,
2716 0x1,
2717 1,
2718 0,
2719 adcmpcr::Wcmpe,
2720 adcmpcr::Wcmpe,
2721 Adcmpcr_SPEC,
2722 crate::common::RW,
2723 > {
2724 crate::common::RegisterField::<
2725 14,
2726 0x1,
2727 1,
2728 0,
2729 adcmpcr::Wcmpe,
2730 adcmpcr::Wcmpe,
2731 Adcmpcr_SPEC,
2732 crate::common::RW,
2733 >::from_register(self, 0)
2734 }
2735
2736 #[doc = "Compare A Interrupt Enable"]
2737 #[inline(always)]
2738 pub fn cmpaie(
2739 self,
2740 ) -> crate::common::RegisterField<
2741 15,
2742 0x1,
2743 1,
2744 0,
2745 adcmpcr::Cmpaie,
2746 adcmpcr::Cmpaie,
2747 Adcmpcr_SPEC,
2748 crate::common::RW,
2749 > {
2750 crate::common::RegisterField::<
2751 15,
2752 0x1,
2753 1,
2754 0,
2755 adcmpcr::Cmpaie,
2756 adcmpcr::Cmpaie,
2757 Adcmpcr_SPEC,
2758 crate::common::RW,
2759 >::from_register(self, 0)
2760 }
2761}
2762impl ::core::default::Default for Adcmpcr {
2763 #[inline(always)]
2764 fn default() -> Adcmpcr {
2765 <crate::RegValueT<Adcmpcr_SPEC> as RegisterValue<_>>::new(0)
2766 }
2767}
2768pub mod adcmpcr {
2769
2770 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2771 pub struct Cmpab_SPEC;
2772 pub type Cmpab = crate::EnumBitfieldStruct<u8, Cmpab_SPEC>;
2773 impl Cmpab {
2774 #[doc = "Output ADC120_WCMPM when window A OR window B comparison conditions are met. Otherwise, output ADC120_WCMPUM."]
2775 pub const _00: Self = Self::new(0);
2776
2777 #[doc = "Output ADC120_WCMPM when window A EXOR window B comparison conditions are met. Otherwise, output ADC120_WCMPUM."]
2778 pub const _01: Self = Self::new(1);
2779
2780 #[doc = "Output ADC120_WCMPM when window A AND window B comparison conditions are met. Otherwise, output ADC120_WCMPUM."]
2781 pub const _10: Self = Self::new(2);
2782
2783 #[doc = "Setting prohibited."]
2784 pub const _11: Self = Self::new(3);
2785 }
2786 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2787 pub struct Cmpbe_SPEC;
2788 pub type Cmpbe = crate::EnumBitfieldStruct<u8, Cmpbe_SPEC>;
2789 impl Cmpbe {
2790 #[doc = "Disable compare window B operation. Disable ADC120_WCMPM and ADC120_WCMPUM outputs."]
2791 pub const _0: Self = Self::new(0);
2792
2793 #[doc = "Enable compare window B operation."]
2794 pub const _1: Self = Self::new(1);
2795 }
2796 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2797 pub struct Cmpae_SPEC;
2798 pub type Cmpae = crate::EnumBitfieldStruct<u8, Cmpae_SPEC>;
2799 impl Cmpae {
2800 #[doc = "Disable compare window A operation. Disable ADC120_WCMPM and ADC120_WCMPUM outputs."]
2801 pub const _0: Self = Self::new(0);
2802
2803 #[doc = "Enable compare window A operation."]
2804 pub const _1: Self = Self::new(1);
2805 }
2806 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2807 pub struct Cmpbie_SPEC;
2808 pub type Cmpbie = crate::EnumBitfieldStruct<u8, Cmpbie_SPEC>;
2809 impl Cmpbie {
2810 #[doc = "Disable ADC120_CMPBI interrupt when comparison conditions (window B) are met."]
2811 pub const _0: Self = Self::new(0);
2812
2813 #[doc = "Enable ADC120_CMPBI interrupt when comparison conditions (window B) are met."]
2814 pub const _1: Self = Self::new(1);
2815 }
2816 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2817 pub struct Wcmpe_SPEC;
2818 pub type Wcmpe = crate::EnumBitfieldStruct<u8, Wcmpe_SPEC>;
2819 impl Wcmpe {
2820 #[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."]
2821 pub const _0: Self = Self::new(0);
2822
2823 #[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."]
2824 pub const _1: Self = Self::new(1);
2825 }
2826 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2827 pub struct Cmpaie_SPEC;
2828 pub type Cmpaie = crate::EnumBitfieldStruct<u8, Cmpaie_SPEC>;
2829 impl Cmpaie {
2830 #[doc = "Disable ADC120_CMPAI interrupt when comparison conditions (window A) are met."]
2831 pub const _0: Self = Self::new(0);
2832
2833 #[doc = "Enable ADC120_CMPAI interrupt when comparison conditions (window A) are met."]
2834 pub const _1: Self = Self::new(1);
2835 }
2836}
2837#[doc(hidden)]
2838#[derive(Copy, Clone, Eq, PartialEq)]
2839pub struct Adcmpanser_SPEC;
2840impl crate::sealed::RegSpec for Adcmpanser_SPEC {
2841 type DataType = u8;
2842}
2843
2844#[doc = "A/D Compare Function Window A Extended Input Select Register"]
2845pub type Adcmpanser = crate::RegValueT<Adcmpanser_SPEC>;
2846
2847impl Adcmpanser {
2848 #[doc = "Temperature Sensor Output Compare Select"]
2849 #[inline(always)]
2850 pub fn cmptsa(
2851 self,
2852 ) -> crate::common::RegisterField<
2853 0,
2854 0x1,
2855 1,
2856 0,
2857 adcmpanser::Cmptsa,
2858 adcmpanser::Cmptsa,
2859 Adcmpanser_SPEC,
2860 crate::common::RW,
2861 > {
2862 crate::common::RegisterField::<
2863 0,
2864 0x1,
2865 1,
2866 0,
2867 adcmpanser::Cmptsa,
2868 adcmpanser::Cmptsa,
2869 Adcmpanser_SPEC,
2870 crate::common::RW,
2871 >::from_register(self, 0)
2872 }
2873
2874 #[doc = "Internal Reference Voltage Compare Select"]
2875 #[inline(always)]
2876 pub fn cmpoca(
2877 self,
2878 ) -> crate::common::RegisterField<
2879 1,
2880 0x1,
2881 1,
2882 0,
2883 adcmpanser::Cmpoca,
2884 adcmpanser::Cmpoca,
2885 Adcmpanser_SPEC,
2886 crate::common::RW,
2887 > {
2888 crate::common::RegisterField::<
2889 1,
2890 0x1,
2891 1,
2892 0,
2893 adcmpanser::Cmpoca,
2894 adcmpanser::Cmpoca,
2895 Adcmpanser_SPEC,
2896 crate::common::RW,
2897 >::from_register(self, 0)
2898 }
2899}
2900impl ::core::default::Default for Adcmpanser {
2901 #[inline(always)]
2902 fn default() -> Adcmpanser {
2903 <crate::RegValueT<Adcmpanser_SPEC> as RegisterValue<_>>::new(0)
2904 }
2905}
2906pub mod adcmpanser {
2907
2908 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2909 pub struct Cmptsa_SPEC;
2910 pub type Cmptsa = crate::EnumBitfieldStruct<u8, Cmptsa_SPEC>;
2911 impl Cmptsa {
2912 #[doc = "Exclude the temperature sensor output from the compare Window A target range."]
2913 pub const _0: Self = Self::new(0);
2914
2915 #[doc = "Include the temperature sensor output in the compare Window A target range."]
2916 pub const _1: Self = Self::new(1);
2917 }
2918 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2919 pub struct Cmpoca_SPEC;
2920 pub type Cmpoca = crate::EnumBitfieldStruct<u8, Cmpoca_SPEC>;
2921 impl Cmpoca {
2922 #[doc = "Exclude the internal reference voltage from the compare Window A target range."]
2923 pub const _0: Self = Self::new(0);
2924
2925 #[doc = "Include the internal reference voltage in the compare Window A target range."]
2926 pub const _1: Self = Self::new(1);
2927 }
2928}
2929#[doc(hidden)]
2930#[derive(Copy, Clone, Eq, PartialEq)]
2931pub struct Adcmpler_SPEC;
2932impl crate::sealed::RegSpec for Adcmpler_SPEC {
2933 type DataType = u8;
2934}
2935
2936#[doc = "A/D Compare Function Window A Extended Input Comparison Condition Setting Register"]
2937pub type Adcmpler = crate::RegValueT<Adcmpler_SPEC>;
2938
2939impl Adcmpler {
2940 #[doc = "Compare Window A Temperature Sensor Output Comparison Condition Select"]
2941 #[inline(always)]
2942 pub fn cmpltsa(
2943 self,
2944 ) -> crate::common::RegisterField<
2945 0,
2946 0x1,
2947 1,
2948 0,
2949 adcmpler::Cmpltsa,
2950 adcmpler::Cmpltsa,
2951 Adcmpler_SPEC,
2952 crate::common::RW,
2953 > {
2954 crate::common::RegisterField::<
2955 0,
2956 0x1,
2957 1,
2958 0,
2959 adcmpler::Cmpltsa,
2960 adcmpler::Cmpltsa,
2961 Adcmpler_SPEC,
2962 crate::common::RW,
2963 >::from_register(self, 0)
2964 }
2965
2966 #[doc = "Compare Window A Internal Reference Voltage Comparison Condition Select"]
2967 #[inline(always)]
2968 pub fn cmploca(
2969 self,
2970 ) -> crate::common::RegisterField<
2971 1,
2972 0x1,
2973 1,
2974 0,
2975 adcmpler::Cmploca,
2976 adcmpler::Cmploca,
2977 Adcmpler_SPEC,
2978 crate::common::RW,
2979 > {
2980 crate::common::RegisterField::<
2981 1,
2982 0x1,
2983 1,
2984 0,
2985 adcmpler::Cmploca,
2986 adcmpler::Cmploca,
2987 Adcmpler_SPEC,
2988 crate::common::RW,
2989 >::from_register(self, 0)
2990 }
2991}
2992impl ::core::default::Default for Adcmpler {
2993 #[inline(always)]
2994 fn default() -> Adcmpler {
2995 <crate::RegValueT<Adcmpler_SPEC> as RegisterValue<_>>::new(0)
2996 }
2997}
2998pub mod adcmpler {
2999
3000 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3001 pub struct Cmpltsa_SPEC;
3002 pub type Cmpltsa = crate::EnumBitfieldStruct<u8, Cmpltsa_SPEC>;
3003 impl Cmpltsa {
3004 #[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"]
3005 pub const _0: Self = Self::new(0);
3006
3007 #[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"]
3008 pub const _1: Self = Self::new(1);
3009 }
3010 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3011 pub struct Cmploca_SPEC;
3012 pub type Cmploca = crate::EnumBitfieldStruct<u8, Cmploca_SPEC>;
3013 impl Cmploca {
3014 #[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"]
3015 pub const _0: Self = Self::new(0);
3016
3017 #[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"]
3018 pub const _1: Self = Self::new(1);
3019 }
3020}
3021#[doc(hidden)]
3022#[derive(Copy, Clone, Eq, PartialEq)]
3023pub struct Adcmpansr0_SPEC;
3024impl crate::sealed::RegSpec for Adcmpansr0_SPEC {
3025 type DataType = u16;
3026}
3027
3028#[doc = "A/D Compare Function Window A Channel Select Register 0"]
3029pub type Adcmpansr0 = crate::RegValueT<Adcmpansr0_SPEC>;
3030
3031impl Adcmpansr0 {
3032 #[doc = "Compare Window A Channel Select"]
3033 #[inline(always)]
3034 pub fn cmpcha0(
3035 self,
3036 ) -> crate::common::RegisterField<
3037 0,
3038 0x1,
3039 1,
3040 0,
3041 adcmpansr0::Cmpcha0,
3042 adcmpansr0::Cmpcha0,
3043 Adcmpansr0_SPEC,
3044 crate::common::RW,
3045 > {
3046 crate::common::RegisterField::<
3047 0,
3048 0x1,
3049 1,
3050 0,
3051 adcmpansr0::Cmpcha0,
3052 adcmpansr0::Cmpcha0,
3053 Adcmpansr0_SPEC,
3054 crate::common::RW,
3055 >::from_register(self, 0)
3056 }
3057
3058 #[doc = "Compare Window A Channel Select"]
3059 #[inline(always)]
3060 pub fn cmpcha1(
3061 self,
3062 ) -> crate::common::RegisterField<
3063 1,
3064 0x1,
3065 1,
3066 0,
3067 adcmpansr0::Cmpcha1,
3068 adcmpansr0::Cmpcha1,
3069 Adcmpansr0_SPEC,
3070 crate::common::RW,
3071 > {
3072 crate::common::RegisterField::<
3073 1,
3074 0x1,
3075 1,
3076 0,
3077 adcmpansr0::Cmpcha1,
3078 adcmpansr0::Cmpcha1,
3079 Adcmpansr0_SPEC,
3080 crate::common::RW,
3081 >::from_register(self, 0)
3082 }
3083
3084 #[doc = "Compare Window A Channel Select"]
3085 #[inline(always)]
3086 pub fn cmpcha2(
3087 self,
3088 ) -> crate::common::RegisterField<
3089 2,
3090 0x1,
3091 1,
3092 0,
3093 adcmpansr0::Cmpcha2,
3094 adcmpansr0::Cmpcha2,
3095 Adcmpansr0_SPEC,
3096 crate::common::RW,
3097 > {
3098 crate::common::RegisterField::<
3099 2,
3100 0x1,
3101 1,
3102 0,
3103 adcmpansr0::Cmpcha2,
3104 adcmpansr0::Cmpcha2,
3105 Adcmpansr0_SPEC,
3106 crate::common::RW,
3107 >::from_register(self, 0)
3108 }
3109
3110 #[doc = "Compare Window A Channel Select"]
3111 #[inline(always)]
3112 pub fn cmpcha3(
3113 self,
3114 ) -> crate::common::RegisterField<
3115 3,
3116 0x1,
3117 1,
3118 0,
3119 adcmpansr0::Cmpcha3,
3120 adcmpansr0::Cmpcha3,
3121 Adcmpansr0_SPEC,
3122 crate::common::RW,
3123 > {
3124 crate::common::RegisterField::<
3125 3,
3126 0x1,
3127 1,
3128 0,
3129 adcmpansr0::Cmpcha3,
3130 adcmpansr0::Cmpcha3,
3131 Adcmpansr0_SPEC,
3132 crate::common::RW,
3133 >::from_register(self, 0)
3134 }
3135}
3136impl ::core::default::Default for Adcmpansr0 {
3137 #[inline(always)]
3138 fn default() -> Adcmpansr0 {
3139 <crate::RegValueT<Adcmpansr0_SPEC> as RegisterValue<_>>::new(0)
3140 }
3141}
3142pub mod adcmpansr0 {
3143
3144 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3145 pub struct Cmpcha0_SPEC;
3146 pub type Cmpcha0 = crate::EnumBitfieldStruct<u8, Cmpcha0_SPEC>;
3147 impl Cmpcha0 {
3148 #[doc = "Disable compare function for associated input channel"]
3149 pub const _0: Self = Self::new(0);
3150
3151 #[doc = "Enable compare function for associated input channel"]
3152 pub const _1: Self = Self::new(1);
3153 }
3154 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3155 pub struct Cmpcha1_SPEC;
3156 pub type Cmpcha1 = crate::EnumBitfieldStruct<u8, Cmpcha1_SPEC>;
3157 impl Cmpcha1 {
3158 #[doc = "Disable compare function for associated input channel"]
3159 pub const _0: Self = Self::new(0);
3160
3161 #[doc = "Enable compare function for associated input channel"]
3162 pub const _1: Self = Self::new(1);
3163 }
3164 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3165 pub struct Cmpcha2_SPEC;
3166 pub type Cmpcha2 = crate::EnumBitfieldStruct<u8, Cmpcha2_SPEC>;
3167 impl Cmpcha2 {
3168 #[doc = "Disable compare function for associated input channel"]
3169 pub const _0: Self = Self::new(0);
3170
3171 #[doc = "Enable compare function for associated input channel"]
3172 pub const _1: Self = Self::new(1);
3173 }
3174 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3175 pub struct Cmpcha3_SPEC;
3176 pub type Cmpcha3 = crate::EnumBitfieldStruct<u8, Cmpcha3_SPEC>;
3177 impl Cmpcha3 {
3178 #[doc = "Disable compare function for associated input channel"]
3179 pub const _0: Self = Self::new(0);
3180
3181 #[doc = "Enable compare function for associated input channel"]
3182 pub const _1: Self = Self::new(1);
3183 }
3184}
3185#[doc(hidden)]
3186#[derive(Copy, Clone, Eq, PartialEq)]
3187pub struct Adcmplr0_SPEC;
3188impl crate::sealed::RegSpec for Adcmplr0_SPEC {
3189 type DataType = u16;
3190}
3191
3192#[doc = "A/D Compare Function Window A Comparison Condition Setting Register 0"]
3193pub type Adcmplr0 = crate::RegValueT<Adcmplr0_SPEC>;
3194
3195impl Adcmplr0 {
3196 #[doc = "Compare Window A Comparison Condition Select"]
3197 #[inline(always)]
3198 pub fn cmplcha0(
3199 self,
3200 ) -> crate::common::RegisterField<
3201 0,
3202 0x1,
3203 1,
3204 0,
3205 adcmplr0::Cmplcha0,
3206 adcmplr0::Cmplcha0,
3207 Adcmplr0_SPEC,
3208 crate::common::RW,
3209 > {
3210 crate::common::RegisterField::<
3211 0,
3212 0x1,
3213 1,
3214 0,
3215 adcmplr0::Cmplcha0,
3216 adcmplr0::Cmplcha0,
3217 Adcmplr0_SPEC,
3218 crate::common::RW,
3219 >::from_register(self, 0)
3220 }
3221
3222 #[doc = "Compare Window A Comparison Condition Select"]
3223 #[inline(always)]
3224 pub fn cmplcha1(
3225 self,
3226 ) -> crate::common::RegisterField<
3227 1,
3228 0x1,
3229 1,
3230 0,
3231 adcmplr0::Cmplcha1,
3232 adcmplr0::Cmplcha1,
3233 Adcmplr0_SPEC,
3234 crate::common::RW,
3235 > {
3236 crate::common::RegisterField::<
3237 1,
3238 0x1,
3239 1,
3240 0,
3241 adcmplr0::Cmplcha1,
3242 adcmplr0::Cmplcha1,
3243 Adcmplr0_SPEC,
3244 crate::common::RW,
3245 >::from_register(self, 0)
3246 }
3247
3248 #[doc = "Compare Window A Comparison Condition Select"]
3249 #[inline(always)]
3250 pub fn cmplcha2(
3251 self,
3252 ) -> crate::common::RegisterField<
3253 2,
3254 0x1,
3255 1,
3256 0,
3257 adcmplr0::Cmplcha2,
3258 adcmplr0::Cmplcha2,
3259 Adcmplr0_SPEC,
3260 crate::common::RW,
3261 > {
3262 crate::common::RegisterField::<
3263 2,
3264 0x1,
3265 1,
3266 0,
3267 adcmplr0::Cmplcha2,
3268 adcmplr0::Cmplcha2,
3269 Adcmplr0_SPEC,
3270 crate::common::RW,
3271 >::from_register(self, 0)
3272 }
3273
3274 #[doc = "Compare Window A Comparison Condition Select"]
3275 #[inline(always)]
3276 pub fn cmplcha3(
3277 self,
3278 ) -> crate::common::RegisterField<
3279 3,
3280 0x1,
3281 1,
3282 0,
3283 adcmplr0::Cmplcha3,
3284 adcmplr0::Cmplcha3,
3285 Adcmplr0_SPEC,
3286 crate::common::RW,
3287 > {
3288 crate::common::RegisterField::<
3289 3,
3290 0x1,
3291 1,
3292 0,
3293 adcmplr0::Cmplcha3,
3294 adcmplr0::Cmplcha3,
3295 Adcmplr0_SPEC,
3296 crate::common::RW,
3297 >::from_register(self, 0)
3298 }
3299}
3300impl ::core::default::Default for Adcmplr0 {
3301 #[inline(always)]
3302 fn default() -> Adcmplr0 {
3303 <crate::RegValueT<Adcmplr0_SPEC> as RegisterValue<_>>::new(0)
3304 }
3305}
3306pub mod adcmplr0 {
3307
3308 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3309 pub struct Cmplcha0_SPEC;
3310 pub type Cmplcha0 = crate::EnumBitfieldStruct<u8, Cmplcha0_SPEC>;
3311 impl Cmplcha0 {
3312 #[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"]
3313 pub const _0: Self = Self::new(0);
3314
3315 #[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"]
3316 pub const _1: Self = Self::new(1);
3317 }
3318 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3319 pub struct Cmplcha1_SPEC;
3320 pub type Cmplcha1 = crate::EnumBitfieldStruct<u8, Cmplcha1_SPEC>;
3321 impl Cmplcha1 {
3322 #[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"]
3323 pub const _0: Self = Self::new(0);
3324
3325 #[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"]
3326 pub const _1: Self = Self::new(1);
3327 }
3328 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3329 pub struct Cmplcha2_SPEC;
3330 pub type Cmplcha2 = crate::EnumBitfieldStruct<u8, Cmplcha2_SPEC>;
3331 impl Cmplcha2 {
3332 #[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"]
3333 pub const _0: Self = Self::new(0);
3334
3335 #[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"]
3336 pub const _1: Self = Self::new(1);
3337 }
3338 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3339 pub struct Cmplcha3_SPEC;
3340 pub type Cmplcha3 = crate::EnumBitfieldStruct<u8, Cmplcha3_SPEC>;
3341 impl Cmplcha3 {
3342 #[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"]
3343 pub const _0: Self = Self::new(0);
3344
3345 #[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"]
3346 pub const _1: Self = Self::new(1);
3347 }
3348}
3349#[doc(hidden)]
3350#[derive(Copy, Clone, Eq, PartialEq)]
3351pub struct Adcmpdr_SPEC;
3352impl crate::sealed::RegSpec for Adcmpdr_SPEC {
3353 type DataType = u16;
3354}
3355
3356#[doc = "A/D Compare Function Window A Lower-Side/Upper-Side Level Setting Register"]
3357pub type Adcmpdr = crate::RegValueT<Adcmpdr_SPEC>;
3358
3359impl NoBitfieldReg<Adcmpdr_SPEC> for Adcmpdr {}
3360impl ::core::default::Default for Adcmpdr {
3361 #[inline(always)]
3362 fn default() -> Adcmpdr {
3363 <crate::RegValueT<Adcmpdr_SPEC> as RegisterValue<_>>::new(0)
3364 }
3365}
3366
3367#[doc(hidden)]
3368#[derive(Copy, Clone, Eq, PartialEq)]
3369pub struct Adcmpsr0_SPEC;
3370impl crate::sealed::RegSpec for Adcmpsr0_SPEC {
3371 type DataType = u16;
3372}
3373
3374#[doc = "A/D Compare Function Window A Channel Status Register 0"]
3375pub type Adcmpsr0 = crate::RegValueT<Adcmpsr0_SPEC>;
3376
3377impl Adcmpsr0 {
3378 #[doc = "Compare Window A Flag"]
3379 #[inline(always)]
3380 pub fn cmpstcha0(
3381 self,
3382 ) -> crate::common::RegisterField<
3383 0,
3384 0x1,
3385 1,
3386 0,
3387 adcmpsr0::Cmpstcha0,
3388 adcmpsr0::Cmpstcha0,
3389 Adcmpsr0_SPEC,
3390 crate::common::RW,
3391 > {
3392 crate::common::RegisterField::<
3393 0,
3394 0x1,
3395 1,
3396 0,
3397 adcmpsr0::Cmpstcha0,
3398 adcmpsr0::Cmpstcha0,
3399 Adcmpsr0_SPEC,
3400 crate::common::RW,
3401 >::from_register(self, 0)
3402 }
3403
3404 #[doc = "Compare Window A Flag"]
3405 #[inline(always)]
3406 pub fn cmpstcha1(
3407 self,
3408 ) -> crate::common::RegisterField<
3409 1,
3410 0x1,
3411 1,
3412 0,
3413 adcmpsr0::Cmpstcha1,
3414 adcmpsr0::Cmpstcha1,
3415 Adcmpsr0_SPEC,
3416 crate::common::RW,
3417 > {
3418 crate::common::RegisterField::<
3419 1,
3420 0x1,
3421 1,
3422 0,
3423 adcmpsr0::Cmpstcha1,
3424 adcmpsr0::Cmpstcha1,
3425 Adcmpsr0_SPEC,
3426 crate::common::RW,
3427 >::from_register(self, 0)
3428 }
3429
3430 #[doc = "Compare Window A Flag"]
3431 #[inline(always)]
3432 pub fn cmpstcha2(
3433 self,
3434 ) -> crate::common::RegisterField<
3435 2,
3436 0x1,
3437 1,
3438 0,
3439 adcmpsr0::Cmpstcha2,
3440 adcmpsr0::Cmpstcha2,
3441 Adcmpsr0_SPEC,
3442 crate::common::RW,
3443 > {
3444 crate::common::RegisterField::<
3445 2,
3446 0x1,
3447 1,
3448 0,
3449 adcmpsr0::Cmpstcha2,
3450 adcmpsr0::Cmpstcha2,
3451 Adcmpsr0_SPEC,
3452 crate::common::RW,
3453 >::from_register(self, 0)
3454 }
3455
3456 #[doc = "Compare Window A Flag"]
3457 #[inline(always)]
3458 pub fn cmpstcha3(
3459 self,
3460 ) -> crate::common::RegisterField<
3461 3,
3462 0x1,
3463 1,
3464 0,
3465 adcmpsr0::Cmpstcha3,
3466 adcmpsr0::Cmpstcha3,
3467 Adcmpsr0_SPEC,
3468 crate::common::RW,
3469 > {
3470 crate::common::RegisterField::<
3471 3,
3472 0x1,
3473 1,
3474 0,
3475 adcmpsr0::Cmpstcha3,
3476 adcmpsr0::Cmpstcha3,
3477 Adcmpsr0_SPEC,
3478 crate::common::RW,
3479 >::from_register(self, 0)
3480 }
3481}
3482impl ::core::default::Default for Adcmpsr0 {
3483 #[inline(always)]
3484 fn default() -> Adcmpsr0 {
3485 <crate::RegValueT<Adcmpsr0_SPEC> as RegisterValue<_>>::new(0)
3486 }
3487}
3488pub mod adcmpsr0 {
3489
3490 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3491 pub struct Cmpstcha0_SPEC;
3492 pub type Cmpstcha0 = crate::EnumBitfieldStruct<u8, Cmpstcha0_SPEC>;
3493 impl Cmpstcha0 {
3494 #[doc = "Comparison conditions are not met."]
3495 pub const _0: Self = Self::new(0);
3496
3497 #[doc = "Comparison conditions are met."]
3498 pub const _1: Self = Self::new(1);
3499 }
3500 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3501 pub struct Cmpstcha1_SPEC;
3502 pub type Cmpstcha1 = crate::EnumBitfieldStruct<u8, Cmpstcha1_SPEC>;
3503 impl Cmpstcha1 {
3504 #[doc = "Comparison conditions are not met."]
3505 pub const _0: Self = Self::new(0);
3506
3507 #[doc = "Comparison conditions are met."]
3508 pub const _1: Self = Self::new(1);
3509 }
3510 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3511 pub struct Cmpstcha2_SPEC;
3512 pub type Cmpstcha2 = crate::EnumBitfieldStruct<u8, Cmpstcha2_SPEC>;
3513 impl Cmpstcha2 {
3514 #[doc = "Comparison conditions are not met."]
3515 pub const _0: Self = Self::new(0);
3516
3517 #[doc = "Comparison conditions are met."]
3518 pub const _1: Self = Self::new(1);
3519 }
3520 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3521 pub struct Cmpstcha3_SPEC;
3522 pub type Cmpstcha3 = crate::EnumBitfieldStruct<u8, Cmpstcha3_SPEC>;
3523 impl Cmpstcha3 {
3524 #[doc = "Comparison conditions are not met."]
3525 pub const _0: Self = Self::new(0);
3526
3527 #[doc = "Comparison conditions are met."]
3528 pub const _1: Self = Self::new(1);
3529 }
3530}
3531#[doc(hidden)]
3532#[derive(Copy, Clone, Eq, PartialEq)]
3533pub struct Adcmpser_SPEC;
3534impl crate::sealed::RegSpec for Adcmpser_SPEC {
3535 type DataType = u8;
3536}
3537
3538#[doc = "A/D Compare Function Window A Extended Input Channel Status Register"]
3539pub type Adcmpser = crate::RegValueT<Adcmpser_SPEC>;
3540
3541impl Adcmpser {
3542 #[doc = "Compare Window A Temperature Sensor Output Compare Flag"]
3543 #[inline(always)]
3544 pub fn cmpsttsa(
3545 self,
3546 ) -> crate::common::RegisterField<
3547 0,
3548 0x1,
3549 1,
3550 0,
3551 adcmpser::Cmpsttsa,
3552 adcmpser::Cmpsttsa,
3553 Adcmpser_SPEC,
3554 crate::common::RW,
3555 > {
3556 crate::common::RegisterField::<
3557 0,
3558 0x1,
3559 1,
3560 0,
3561 adcmpser::Cmpsttsa,
3562 adcmpser::Cmpsttsa,
3563 Adcmpser_SPEC,
3564 crate::common::RW,
3565 >::from_register(self, 0)
3566 }
3567
3568 #[doc = "Compare Window A Internal Reference Voltage Compare Flag"]
3569 #[inline(always)]
3570 pub fn cmpstoca(
3571 self,
3572 ) -> crate::common::RegisterField<
3573 1,
3574 0x1,
3575 1,
3576 0,
3577 adcmpser::Cmpstoca,
3578 adcmpser::Cmpstoca,
3579 Adcmpser_SPEC,
3580 crate::common::RW,
3581 > {
3582 crate::common::RegisterField::<
3583 1,
3584 0x1,
3585 1,
3586 0,
3587 adcmpser::Cmpstoca,
3588 adcmpser::Cmpstoca,
3589 Adcmpser_SPEC,
3590 crate::common::RW,
3591 >::from_register(self, 0)
3592 }
3593}
3594impl ::core::default::Default for Adcmpser {
3595 #[inline(always)]
3596 fn default() -> Adcmpser {
3597 <crate::RegValueT<Adcmpser_SPEC> as RegisterValue<_>>::new(0)
3598 }
3599}
3600pub mod adcmpser {
3601
3602 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3603 pub struct Cmpsttsa_SPEC;
3604 pub type Cmpsttsa = crate::EnumBitfieldStruct<u8, Cmpsttsa_SPEC>;
3605 impl Cmpsttsa {
3606 #[doc = "Comparison conditions are not met."]
3607 pub const _0: Self = Self::new(0);
3608
3609 #[doc = "Comparison conditions are met."]
3610 pub const _1: Self = Self::new(1);
3611 }
3612 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3613 pub struct Cmpstoca_SPEC;
3614 pub type Cmpstoca = crate::EnumBitfieldStruct<u8, Cmpstoca_SPEC>;
3615 impl Cmpstoca {
3616 #[doc = "Comparison conditions are not met."]
3617 pub const _0: Self = Self::new(0);
3618
3619 #[doc = "Comparison conditions are met."]
3620 pub const _1: Self = Self::new(1);
3621 }
3622}
3623#[doc(hidden)]
3624#[derive(Copy, Clone, Eq, PartialEq)]
3625pub struct Adcmpbnsr_SPEC;
3626impl crate::sealed::RegSpec for Adcmpbnsr_SPEC {
3627 type DataType = u8;
3628}
3629
3630#[doc = "A/D Compare Function Window B Channel Select Register"]
3631pub type Adcmpbnsr = crate::RegValueT<Adcmpbnsr_SPEC>;
3632
3633impl Adcmpbnsr {
3634 #[doc = "Compare Window B Channel Select"]
3635 #[inline(always)]
3636 pub fn cmpchb(
3637 self,
3638 ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, Adcmpbnsr_SPEC, crate::common::RW>
3639 {
3640 crate::common::RegisterField::<0,0x3f,1,0,u8,u8,Adcmpbnsr_SPEC,crate::common::RW>::from_register(self,0)
3641 }
3642
3643 #[doc = "Compare Window B Comparison Condition Setting"]
3644 #[inline(always)]
3645 pub fn cmplb(
3646 self,
3647 ) -> crate::common::RegisterField<
3648 7,
3649 0x1,
3650 1,
3651 0,
3652 adcmpbnsr::Cmplb,
3653 adcmpbnsr::Cmplb,
3654 Adcmpbnsr_SPEC,
3655 crate::common::RW,
3656 > {
3657 crate::common::RegisterField::<
3658 7,
3659 0x1,
3660 1,
3661 0,
3662 adcmpbnsr::Cmplb,
3663 adcmpbnsr::Cmplb,
3664 Adcmpbnsr_SPEC,
3665 crate::common::RW,
3666 >::from_register(self, 0)
3667 }
3668}
3669impl ::core::default::Default for Adcmpbnsr {
3670 #[inline(always)]
3671 fn default() -> Adcmpbnsr {
3672 <crate::RegValueT<Adcmpbnsr_SPEC> as RegisterValue<_>>::new(0)
3673 }
3674}
3675pub mod adcmpbnsr {
3676
3677 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3678 pub struct Cmplb_SPEC;
3679 pub type Cmplb = crate::EnumBitfieldStruct<u8, Cmplb_SPEC>;
3680 impl Cmplb {
3681 #[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"]
3682 pub const _0: Self = Self::new(0);
3683
3684 #[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"]
3685 pub const _1: Self = Self::new(1);
3686 }
3687}
3688#[doc(hidden)]
3689#[derive(Copy, Clone, Eq, PartialEq)]
3690pub struct Adwinllb_SPEC;
3691impl crate::sealed::RegSpec for Adwinllb_SPEC {
3692 type DataType = u16;
3693}
3694
3695#[doc = "A/D Compare Function Window B Lower-Side/Upper-Side Level Setting Register"]
3696pub type Adwinllb = crate::RegValueT<Adwinllb_SPEC>;
3697
3698impl NoBitfieldReg<Adwinllb_SPEC> for Adwinllb {}
3699impl ::core::default::Default for Adwinllb {
3700 #[inline(always)]
3701 fn default() -> Adwinllb {
3702 <crate::RegValueT<Adwinllb_SPEC> as RegisterValue<_>>::new(0)
3703 }
3704}
3705
3706#[doc(hidden)]
3707#[derive(Copy, Clone, Eq, PartialEq)]
3708pub struct Adwinulb_SPEC;
3709impl crate::sealed::RegSpec for Adwinulb_SPEC {
3710 type DataType = u16;
3711}
3712
3713#[doc = "A/D Compare Function Window B Lower-Side/Upper-Side Level Setting Register"]
3714pub type Adwinulb = crate::RegValueT<Adwinulb_SPEC>;
3715
3716impl NoBitfieldReg<Adwinulb_SPEC> for Adwinulb {}
3717impl ::core::default::Default for Adwinulb {
3718 #[inline(always)]
3719 fn default() -> Adwinulb {
3720 <crate::RegValueT<Adwinulb_SPEC> as RegisterValue<_>>::new(0)
3721 }
3722}
3723
3724#[doc(hidden)]
3725#[derive(Copy, Clone, Eq, PartialEq)]
3726pub struct Adcmpbsr_SPEC;
3727impl crate::sealed::RegSpec for Adcmpbsr_SPEC {
3728 type DataType = u8;
3729}
3730
3731#[doc = "A/D Compare Function Window B Status Register"]
3732pub type Adcmpbsr = crate::RegValueT<Adcmpbsr_SPEC>;
3733
3734impl Adcmpbsr {
3735 #[doc = "Compare Window B Flag"]
3736 #[inline(always)]
3737 pub fn cmpstb(
3738 self,
3739 ) -> crate::common::RegisterField<
3740 0,
3741 0x1,
3742 1,
3743 0,
3744 adcmpbsr::Cmpstb,
3745 adcmpbsr::Cmpstb,
3746 Adcmpbsr_SPEC,
3747 crate::common::RW,
3748 > {
3749 crate::common::RegisterField::<
3750 0,
3751 0x1,
3752 1,
3753 0,
3754 adcmpbsr::Cmpstb,
3755 adcmpbsr::Cmpstb,
3756 Adcmpbsr_SPEC,
3757 crate::common::RW,
3758 >::from_register(self, 0)
3759 }
3760}
3761impl ::core::default::Default for Adcmpbsr {
3762 #[inline(always)]
3763 fn default() -> Adcmpbsr {
3764 <crate::RegValueT<Adcmpbsr_SPEC> as RegisterValue<_>>::new(0)
3765 }
3766}
3767pub mod adcmpbsr {
3768
3769 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3770 pub struct Cmpstb_SPEC;
3771 pub type Cmpstb = crate::EnumBitfieldStruct<u8, Cmpstb_SPEC>;
3772 impl Cmpstb {
3773 #[doc = "Comparison conditions are not met."]
3774 pub const _0: Self = Self::new(0);
3775
3776 #[doc = "Comparison conditions are met."]
3777 pub const _1: Self = Self::new(1);
3778 }
3779}
3780#[doc(hidden)]
3781#[derive(Copy, Clone, Eq, PartialEq)]
3782pub struct Adsstrt_SPEC;
3783impl crate::sealed::RegSpec for Adsstrt_SPEC {
3784 type DataType = u8;
3785}
3786
3787#[doc = "A/D Sampling State Register"]
3788pub type Adsstrt = crate::RegValueT<Adsstrt_SPEC>;
3789
3790impl Adsstrt {
3791 #[doc = "Sampling Time Setting"]
3792 #[inline(always)]
3793 pub fn sst(
3794 self,
3795 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Adsstrt_SPEC, crate::common::RW> {
3796 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Adsstrt_SPEC,crate::common::RW>::from_register(self,0)
3797 }
3798}
3799impl ::core::default::Default for Adsstrt {
3800 #[inline(always)]
3801 fn default() -> Adsstrt {
3802 <crate::RegValueT<Adsstrt_SPEC> as RegisterValue<_>>::new(13)
3803 }
3804}
3805
3806#[doc(hidden)]
3807#[derive(Copy, Clone, Eq, PartialEq)]
3808pub struct Adsstro_SPEC;
3809impl crate::sealed::RegSpec for Adsstro_SPEC {
3810 type DataType = u8;
3811}
3812
3813#[doc = "A/D Sampling State Register"]
3814pub type Adsstro = crate::RegValueT<Adsstro_SPEC>;
3815
3816impl Adsstro {
3817 #[doc = "Sampling Time Setting"]
3818 #[inline(always)]
3819 pub fn sst(
3820 self,
3821 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Adsstro_SPEC, crate::common::RW> {
3822 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Adsstro_SPEC,crate::common::RW>::from_register(self,0)
3823 }
3824}
3825impl ::core::default::Default for Adsstro {
3826 #[inline(always)]
3827 fn default() -> Adsstro {
3828 <crate::RegValueT<Adsstro_SPEC> as RegisterValue<_>>::new(13)
3829 }
3830}
3831
3832#[doc(hidden)]
3833#[derive(Copy, Clone, Eq, PartialEq)]
3834pub struct Adsstr_SPEC;
3835impl crate::sealed::RegSpec for Adsstr_SPEC {
3836 type DataType = u8;
3837}
3838
3839#[doc = "A/D Sampling State Register"]
3840pub type Adsstr = crate::RegValueT<Adsstr_SPEC>;
3841
3842impl Adsstr {
3843 #[doc = "Sampling Time Setting"]
3844 #[inline(always)]
3845 pub fn sst(
3846 self,
3847 ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Adsstr_SPEC, crate::common::RW> {
3848 crate::common::RegisterField::<0,0xff,1,0,u8,u8,Adsstr_SPEC,crate::common::RW>::from_register(self,0)
3849 }
3850}
3851impl ::core::default::Default for Adsstr {
3852 #[inline(always)]
3853 fn default() -> Adsstr {
3854 <crate::RegValueT<Adsstr_SPEC> as RegisterValue<_>>::new(13)
3855 }
3856}