Skip to main content

ra2a1_pac/
adc160.rs

1/*
2DISCLAIMER
3This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products.
4No other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
5applicable laws, including copyright laws.
6THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING THIS SOFTWARE, WHETHER EXPRESS, IMPLIED
7OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
8NON-INFRINGEMENT.  ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY
9LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE FOR ANY DIRECT,
10INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR
11ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
12Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability
13of this software. By using this software, you agree to the additional terms and conditions found by accessing the
14following link:
15http://www.renesas.com/disclaimer
16
17*/
18// Generated from SVD 1.1, with svd2pac 0.6.1 on Sun, 15 Mar 2026 07:00:31 +0000
19
20#![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"16-bit A/D Converter"]
28unsafe impl ::core::marker::Send for super::Adc160 {}
29unsafe impl ::core::marker::Sync for super::Adc160 {}
30impl super::Adc160 {
31    #[allow(unused)]
32    #[inline(always)]
33    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34        self.ptr
35    }
36
37    #[doc = "A/D Control Register"]
38    #[inline(always)]
39    pub const fn adcsr(&self) -> &'static crate::common::Reg<self::Adcsr_SPEC, crate::common::RW> {
40        unsafe {
41            crate::common::Reg::<self::Adcsr_SPEC, crate::common::RW>::from_ptr(
42                self._svd2pac_as_ptr().add(0usize),
43            )
44        }
45    }
46
47    #[doc = "A/D Channel Select Register A0"]
48    #[inline(always)]
49    pub const fn adansa0(
50        &self,
51    ) -> &'static crate::common::Reg<self::Adansa0_SPEC, crate::common::RW> {
52        unsafe {
53            crate::common::Reg::<self::Adansa0_SPEC, crate::common::RW>::from_ptr(
54                self._svd2pac_as_ptr().add(4usize),
55            )
56        }
57    }
58
59    #[doc = "A/D Channel Select Register A1"]
60    #[inline(always)]
61    pub const fn adansa1(
62        &self,
63    ) -> &'static crate::common::Reg<self::Adansa1_SPEC, crate::common::RW> {
64        unsafe {
65            crate::common::Reg::<self::Adansa1_SPEC, crate::common::RW>::from_ptr(
66                self._svd2pac_as_ptr().add(6usize),
67            )
68        }
69    }
70
71    #[doc = "A/D-Converted Value Average Channel Select Register 0"]
72    #[inline(always)]
73    pub const fn adads0(
74        &self,
75    ) -> &'static crate::common::Reg<self::Adads0_SPEC, crate::common::RW> {
76        unsafe {
77            crate::common::Reg::<self::Adads0_SPEC, crate::common::RW>::from_ptr(
78                self._svd2pac_as_ptr().add(8usize),
79            )
80        }
81    }
82
83    #[doc = "A/D-Converted Value Average Channel Select Register 1"]
84    #[inline(always)]
85    pub const fn adads1(
86        &self,
87    ) -> &'static crate::common::Reg<self::Adads1_SPEC, crate::common::RW> {
88        unsafe {
89            crate::common::Reg::<self::Adads1_SPEC, crate::common::RW>::from_ptr(
90                self._svd2pac_as_ptr().add(10usize),
91            )
92        }
93    }
94
95    #[doc = "A/D-Converted Value Average Count Select Register"]
96    #[inline(always)]
97    pub const fn adadc(&self) -> &'static crate::common::Reg<self::Adadc_SPEC, crate::common::RW> {
98        unsafe {
99            crate::common::Reg::<self::Adadc_SPEC, crate::common::RW>::from_ptr(
100                self._svd2pac_as_ptr().add(12usize),
101            )
102        }
103    }
104
105    #[doc = "A/D Control Extended Register"]
106    #[inline(always)]
107    pub const fn adcer(&self) -> &'static crate::common::Reg<self::Adcer_SPEC, crate::common::RW> {
108        unsafe {
109            crate::common::Reg::<self::Adcer_SPEC, crate::common::RW>::from_ptr(
110                self._svd2pac_as_ptr().add(14usize),
111            )
112        }
113    }
114
115    #[doc = "A/D Conversion Start Trigger Select Register"]
116    #[inline(always)]
117    pub const fn adstrgr(
118        &self,
119    ) -> &'static crate::common::Reg<self::Adstrgr_SPEC, crate::common::RW> {
120        unsafe {
121            crate::common::Reg::<self::Adstrgr_SPEC, crate::common::RW>::from_ptr(
122                self._svd2pac_as_ptr().add(16usize),
123            )
124        }
125    }
126
127    #[doc = "A/D Conversion Extended Input Control Register"]
128    #[inline(always)]
129    pub const fn adexicr(
130        &self,
131    ) -> &'static crate::common::Reg<self::Adexicr_SPEC, crate::common::RW> {
132        unsafe {
133            crate::common::Reg::<self::Adexicr_SPEC, crate::common::RW>::from_ptr(
134                self._svd2pac_as_ptr().add(18usize),
135            )
136        }
137    }
138
139    #[doc = "A/D Channel Select Register B0"]
140    #[inline(always)]
141    pub const fn adansb0(
142        &self,
143    ) -> &'static crate::common::Reg<self::Adansb0_SPEC, crate::common::RW> {
144        unsafe {
145            crate::common::Reg::<self::Adansb0_SPEC, crate::common::RW>::from_ptr(
146                self._svd2pac_as_ptr().add(20usize),
147            )
148        }
149    }
150
151    #[doc = "A/D Channel Select Register B1"]
152    #[inline(always)]
153    pub const fn adansb1(
154        &self,
155    ) -> &'static crate::common::Reg<self::Adansb1_SPEC, crate::common::RW> {
156        unsafe {
157            crate::common::Reg::<self::Adansb1_SPEC, crate::common::RW>::from_ptr(
158                self._svd2pac_as_ptr().add(22usize),
159            )
160        }
161    }
162
163    #[doc = "A/D Data Duplexing Register"]
164    #[inline(always)]
165    pub const fn addbldr(
166        &self,
167    ) -> &'static crate::common::Reg<self::Addbldr_SPEC, crate::common::R> {
168        unsafe {
169            crate::common::Reg::<self::Addbldr_SPEC, crate::common::R>::from_ptr(
170                self._svd2pac_as_ptr().add(24usize),
171            )
172        }
173    }
174
175    #[doc = "A/D Temperature Sensor Data Register"]
176    #[inline(always)]
177    pub const fn adtsdr(&self) -> &'static crate::common::Reg<self::Adtsdr_SPEC, crate::common::R> {
178        unsafe {
179            crate::common::Reg::<self::Adtsdr_SPEC, crate::common::R>::from_ptr(
180                self._svd2pac_as_ptr().add(26usize),
181            )
182        }
183    }
184
185    #[doc = "A/D Internal Reference Voltage Data Register"]
186    #[inline(always)]
187    pub const fn adocdr(&self) -> &'static crate::common::Reg<self::Adocdr_SPEC, crate::common::R> {
188        unsafe {
189            crate::common::Reg::<self::Adocdr_SPEC, crate::common::R>::from_ptr(
190                self._svd2pac_as_ptr().add(28usize),
191            )
192        }
193    }
194
195    #[doc = "A/D Data Register %s"]
196    #[inline(always)]
197    pub const fn addr(
198        &self,
199    ) -> &'static crate::common::ClusterRegisterArray<
200        crate::common::Reg<self::Addr_SPEC, crate::common::R>,
201        9,
202        0x2,
203    > {
204        unsafe {
205            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x40usize))
206        }
207    }
208    #[inline(always)]
209    pub const fn addr16(&self) -> &'static crate::common::Reg<self::Addr_SPEC, crate::common::R> {
210        unsafe {
211            crate::common::Reg::<self::Addr_SPEC, crate::common::R>::from_ptr(
212                self._svd2pac_as_ptr().add(0x40usize),
213            )
214        }
215    }
216    #[inline(always)]
217    pub const fn addr17(&self) -> &'static crate::common::Reg<self::Addr_SPEC, crate::common::R> {
218        unsafe {
219            crate::common::Reg::<self::Addr_SPEC, crate::common::R>::from_ptr(
220                self._svd2pac_as_ptr().add(0x42usize),
221            )
222        }
223    }
224    #[inline(always)]
225    pub const fn addr18(&self) -> &'static crate::common::Reg<self::Addr_SPEC, crate::common::R> {
226        unsafe {
227            crate::common::Reg::<self::Addr_SPEC, crate::common::R>::from_ptr(
228                self._svd2pac_as_ptr().add(0x44usize),
229            )
230        }
231    }
232    #[inline(always)]
233    pub const fn addr19(&self) -> &'static crate::common::Reg<self::Addr_SPEC, crate::common::R> {
234        unsafe {
235            crate::common::Reg::<self::Addr_SPEC, crate::common::R>::from_ptr(
236                self._svd2pac_as_ptr().add(0x46usize),
237            )
238        }
239    }
240    #[inline(always)]
241    pub const fn addr20(&self) -> &'static crate::common::Reg<self::Addr_SPEC, crate::common::R> {
242        unsafe {
243            crate::common::Reg::<self::Addr_SPEC, crate::common::R>::from_ptr(
244                self._svd2pac_as_ptr().add(0x48usize),
245            )
246        }
247    }
248    #[inline(always)]
249    pub const fn addr21(&self) -> &'static crate::common::Reg<self::Addr_SPEC, crate::common::R> {
250        unsafe {
251            crate::common::Reg::<self::Addr_SPEC, crate::common::R>::from_ptr(
252                self._svd2pac_as_ptr().add(0x4ausize),
253            )
254        }
255    }
256    #[inline(always)]
257    pub const fn addr22(&self) -> &'static crate::common::Reg<self::Addr_SPEC, crate::common::R> {
258        unsafe {
259            crate::common::Reg::<self::Addr_SPEC, crate::common::R>::from_ptr(
260                self._svd2pac_as_ptr().add(0x4cusize),
261            )
262        }
263    }
264    #[inline(always)]
265    pub const fn addr23(&self) -> &'static crate::common::Reg<self::Addr_SPEC, crate::common::R> {
266        unsafe {
267            crate::common::Reg::<self::Addr_SPEC, crate::common::R>::from_ptr(
268                self._svd2pac_as_ptr().add(0x4eusize),
269            )
270        }
271    }
272    #[inline(always)]
273    pub const fn addr24(&self) -> &'static crate::common::Reg<self::Addr_SPEC, crate::common::R> {
274        unsafe {
275            crate::common::Reg::<self::Addr_SPEC, crate::common::R>::from_ptr(
276                self._svd2pac_as_ptr().add(0x50usize),
277            )
278        }
279    }
280
281    #[doc = "A/D Disconnection Detection Control Register"]
282    #[inline(always)]
283    pub const fn addiscr(
284        &self,
285    ) -> &'static crate::common::Reg<self::Addiscr_SPEC, crate::common::RW> {
286        unsafe {
287            crate::common::Reg::<self::Addiscr_SPEC, crate::common::RW>::from_ptr(
288                self._svd2pac_as_ptr().add(122usize),
289            )
290        }
291    }
292
293    #[doc = "A/D Interrupt Control Register"]
294    #[inline(always)]
295    pub const fn adicr(&self) -> &'static crate::common::Reg<self::Adicr_SPEC, crate::common::RW> {
296        unsafe {
297            crate::common::Reg::<self::Adicr_SPEC, crate::common::RW>::from_ptr(
298                self._svd2pac_as_ptr().add(125usize),
299            )
300        }
301    }
302
303    #[doc = "A/D Group Scan Priority Control Register"]
304    #[inline(always)]
305    pub const fn adgspcr(
306        &self,
307    ) -> &'static crate::common::Reg<self::Adgspcr_SPEC, crate::common::RW> {
308        unsafe {
309            crate::common::Reg::<self::Adgspcr_SPEC, crate::common::RW>::from_ptr(
310                self._svd2pac_as_ptr().add(128usize),
311            )
312        }
313    }
314
315    #[doc = "A/D Data Duplexing Register A"]
316    #[inline(always)]
317    pub const fn addbldra(
318        &self,
319    ) -> &'static crate::common::Reg<self::Addbldra_SPEC, crate::common::R> {
320        unsafe {
321            crate::common::Reg::<self::Addbldra_SPEC, crate::common::R>::from_ptr(
322                self._svd2pac_as_ptr().add(132usize),
323            )
324        }
325    }
326
327    #[doc = "A/D Data Duplexing Register B"]
328    #[inline(always)]
329    pub const fn addbldrb(
330        &self,
331    ) -> &'static crate::common::Reg<self::Addbldrb_SPEC, crate::common::R> {
332        unsafe {
333            crate::common::Reg::<self::Addbldrb_SPEC, crate::common::R>::from_ptr(
334                self._svd2pac_as_ptr().add(134usize),
335            )
336        }
337    }
338
339    #[doc = "A/D Compare Function Window A/B Status Monitor Register"]
340    #[inline(always)]
341    pub const fn adwinmon(
342        &self,
343    ) -> &'static crate::common::Reg<self::Adwinmon_SPEC, crate::common::R> {
344        unsafe {
345            crate::common::Reg::<self::Adwinmon_SPEC, crate::common::R>::from_ptr(
346                self._svd2pac_as_ptr().add(140usize),
347            )
348        }
349    }
350
351    #[doc = "A/D Compare Function Control Register"]
352    #[inline(always)]
353    pub const fn adcmpcr(
354        &self,
355    ) -> &'static crate::common::Reg<self::Adcmpcr_SPEC, crate::common::RW> {
356        unsafe {
357            crate::common::Reg::<self::Adcmpcr_SPEC, crate::common::RW>::from_ptr(
358                self._svd2pac_as_ptr().add(144usize),
359            )
360        }
361    }
362
363    #[doc = "A/D Compare Function Window A Extended Input Select Register"]
364    #[inline(always)]
365    pub const fn adcmpanser(
366        &self,
367    ) -> &'static crate::common::Reg<self::Adcmpanser_SPEC, crate::common::RW> {
368        unsafe {
369            crate::common::Reg::<self::Adcmpanser_SPEC, crate::common::RW>::from_ptr(
370                self._svd2pac_as_ptr().add(146usize),
371            )
372        }
373    }
374
375    #[doc = "A/D Compare Function Window A Extended Input Comparison Condition Setting Register"]
376    #[inline(always)]
377    pub const fn adcmpler(
378        &self,
379    ) -> &'static crate::common::Reg<self::Adcmpler_SPEC, crate::common::RW> {
380        unsafe {
381            crate::common::Reg::<self::Adcmpler_SPEC, crate::common::RW>::from_ptr(
382                self._svd2pac_as_ptr().add(147usize),
383            )
384        }
385    }
386
387    #[doc = "A/D Compare Function Window A Channel Select Register 0"]
388    #[inline(always)]
389    pub const fn adcmpansr0(
390        &self,
391    ) -> &'static crate::common::Reg<self::Adcmpansr0_SPEC, crate::common::RW> {
392        unsafe {
393            crate::common::Reg::<self::Adcmpansr0_SPEC, crate::common::RW>::from_ptr(
394                self._svd2pac_as_ptr().add(148usize),
395            )
396        }
397    }
398
399    #[doc = "A/D Compare Function Window A Channel Select Register 1"]
400    #[inline(always)]
401    pub const fn adcmpansr1(
402        &self,
403    ) -> &'static crate::common::Reg<self::Adcmpansr1_SPEC, crate::common::RW> {
404        unsafe {
405            crate::common::Reg::<self::Adcmpansr1_SPEC, crate::common::RW>::from_ptr(
406                self._svd2pac_as_ptr().add(150usize),
407            )
408        }
409    }
410
411    #[doc = "A/D Compare Function Window A Comparison Condition Setting Register 0"]
412    #[inline(always)]
413    pub const fn adcmplr0(
414        &self,
415    ) -> &'static crate::common::Reg<self::Adcmplr0_SPEC, crate::common::RW> {
416        unsafe {
417            crate::common::Reg::<self::Adcmplr0_SPEC, crate::common::RW>::from_ptr(
418                self._svd2pac_as_ptr().add(152usize),
419            )
420        }
421    }
422
423    #[doc = "A/D Compare Function Window A Comparison Condition Setting Register 1"]
424    #[inline(always)]
425    pub const fn adcmplr1(
426        &self,
427    ) -> &'static crate::common::Reg<self::Adcmplr1_SPEC, crate::common::RW> {
428        unsafe {
429            crate::common::Reg::<self::Adcmplr1_SPEC, crate::common::RW>::from_ptr(
430                self._svd2pac_as_ptr().add(154usize),
431            )
432        }
433    }
434
435    #[doc = "A/D Compare Function Window A Lower-Side Level Setting Register"]
436    #[inline(always)]
437    pub const fn adcmpdr0(
438        &self,
439    ) -> &'static crate::common::Reg<self::Adcmpdr0_SPEC, crate::common::RW> {
440        unsafe {
441            crate::common::Reg::<self::Adcmpdr0_SPEC, crate::common::RW>::from_ptr(
442                self._svd2pac_as_ptr().add(156usize),
443            )
444        }
445    }
446
447    #[doc = "A/D Compare Function Window A Upper-Side Level Setting Register"]
448    #[inline(always)]
449    pub const fn adcmpdr1(
450        &self,
451    ) -> &'static crate::common::Reg<self::Adcmpdr1_SPEC, crate::common::RW> {
452        unsafe {
453            crate::common::Reg::<self::Adcmpdr1_SPEC, crate::common::RW>::from_ptr(
454                self._svd2pac_as_ptr().add(158usize),
455            )
456        }
457    }
458
459    #[doc = "A/D Compare Function Window A Channel Status Register 0"]
460    #[inline(always)]
461    pub const fn adcmpsr0(
462        &self,
463    ) -> &'static crate::common::Reg<self::Adcmpsr0_SPEC, crate::common::RW> {
464        unsafe {
465            crate::common::Reg::<self::Adcmpsr0_SPEC, crate::common::RW>::from_ptr(
466                self._svd2pac_as_ptr().add(160usize),
467            )
468        }
469    }
470
471    #[doc = "A/D Compare Function Window A Channel Status Register 1"]
472    #[inline(always)]
473    pub const fn adcmpsr1(
474        &self,
475    ) -> &'static crate::common::Reg<self::Adcmpsr1_SPEC, crate::common::RW> {
476        unsafe {
477            crate::common::Reg::<self::Adcmpsr1_SPEC, crate::common::RW>::from_ptr(
478                self._svd2pac_as_ptr().add(162usize),
479            )
480        }
481    }
482
483    #[doc = "A/D Compare Function Window A Extended Input Channel Status Register"]
484    #[inline(always)]
485    pub const fn adcmpser(
486        &self,
487    ) -> &'static crate::common::Reg<self::Adcmpser_SPEC, crate::common::RW> {
488        unsafe {
489            crate::common::Reg::<self::Adcmpser_SPEC, crate::common::RW>::from_ptr(
490                self._svd2pac_as_ptr().add(164usize),
491            )
492        }
493    }
494
495    #[doc = "A/D Compare Function Window B Channel Selection Register"]
496    #[inline(always)]
497    pub const fn adcmpbnsr(
498        &self,
499    ) -> &'static crate::common::Reg<self::Adcmpbnsr_SPEC, crate::common::RW> {
500        unsafe {
501            crate::common::Reg::<self::Adcmpbnsr_SPEC, crate::common::RW>::from_ptr(
502                self._svd2pac_as_ptr().add(166usize),
503            )
504        }
505    }
506
507    #[doc = "A/D Compare Function Window B Lower-Side Level Setting Register"]
508    #[inline(always)]
509    pub const fn adwinllb(
510        &self,
511    ) -> &'static crate::common::Reg<self::Adwinllb_SPEC, crate::common::RW> {
512        unsafe {
513            crate::common::Reg::<self::Adwinllb_SPEC, crate::common::RW>::from_ptr(
514                self._svd2pac_as_ptr().add(168usize),
515            )
516        }
517    }
518
519    #[doc = "A/D Compare Function Window B Upper-Side Level Setting Register"]
520    #[inline(always)]
521    pub const fn adwinulb(
522        &self,
523    ) -> &'static crate::common::Reg<self::Adwinulb_SPEC, crate::common::RW> {
524        unsafe {
525            crate::common::Reg::<self::Adwinulb_SPEC, crate::common::RW>::from_ptr(
526                self._svd2pac_as_ptr().add(170usize),
527            )
528        }
529    }
530
531    #[doc = "A/D Compare Function Window B Status Register"]
532    #[inline(always)]
533    pub const fn adcmpbsr(
534        &self,
535    ) -> &'static crate::common::Reg<self::Adcmpbsr_SPEC, crate::common::RW> {
536        unsafe {
537            crate::common::Reg::<self::Adcmpbsr_SPEC, crate::common::RW>::from_ptr(
538                self._svd2pac_as_ptr().add(172usize),
539            )
540        }
541    }
542
543    #[doc = "A/D Sampling State Register L"]
544    #[inline(always)]
545    pub const fn adsstrl(
546        &self,
547    ) -> &'static crate::common::Reg<self::Adsstrl_SPEC, crate::common::RW> {
548        unsafe {
549            crate::common::Reg::<self::Adsstrl_SPEC, crate::common::RW>::from_ptr(
550                self._svd2pac_as_ptr().add(221usize),
551            )
552        }
553    }
554
555    #[doc = "A/D Sampling State Register T"]
556    #[inline(always)]
557    pub const fn adsstrt(
558        &self,
559    ) -> &'static crate::common::Reg<self::Adsstrt_SPEC, crate::common::RW> {
560        unsafe {
561            crate::common::Reg::<self::Adsstrt_SPEC, crate::common::RW>::from_ptr(
562                self._svd2pac_as_ptr().add(222usize),
563            )
564        }
565    }
566
567    #[doc = "A/D Sampling State Register O"]
568    #[inline(always)]
569    pub const fn adsstro(
570        &self,
571    ) -> &'static crate::common::Reg<self::Adsstro_SPEC, crate::common::RW> {
572        unsafe {
573            crate::common::Reg::<self::Adsstro_SPEC, crate::common::RW>::from_ptr(
574                self._svd2pac_as_ptr().add(223usize),
575            )
576        }
577    }
578
579    #[doc = "A/D Sampling State Register %s"]
580    #[inline(always)]
581    pub const fn adsstr0(
582        &self,
583    ) -> &'static crate::common::ClusterRegisterArray<
584        crate::common::Reg<self::Adsstr0_SPEC, crate::common::RW>,
585        9,
586        0x1,
587    > {
588        unsafe {
589            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0xe0usize))
590        }
591    }
592    #[inline(always)]
593    pub const fn adsstr00(
594        &self,
595    ) -> &'static crate::common::Reg<self::Adsstr0_SPEC, crate::common::RW> {
596        unsafe {
597            crate::common::Reg::<self::Adsstr0_SPEC, crate::common::RW>::from_ptr(
598                self._svd2pac_as_ptr().add(0xe0usize),
599            )
600        }
601    }
602    #[inline(always)]
603    pub const fn adsstr01(
604        &self,
605    ) -> &'static crate::common::Reg<self::Adsstr0_SPEC, crate::common::RW> {
606        unsafe {
607            crate::common::Reg::<self::Adsstr0_SPEC, crate::common::RW>::from_ptr(
608                self._svd2pac_as_ptr().add(0xe1usize),
609            )
610        }
611    }
612    #[inline(always)]
613    pub const fn adsstr02(
614        &self,
615    ) -> &'static crate::common::Reg<self::Adsstr0_SPEC, crate::common::RW> {
616        unsafe {
617            crate::common::Reg::<self::Adsstr0_SPEC, crate::common::RW>::from_ptr(
618                self._svd2pac_as_ptr().add(0xe2usize),
619            )
620        }
621    }
622    #[inline(always)]
623    pub const fn adsstr03(
624        &self,
625    ) -> &'static crate::common::Reg<self::Adsstr0_SPEC, crate::common::RW> {
626        unsafe {
627            crate::common::Reg::<self::Adsstr0_SPEC, crate::common::RW>::from_ptr(
628                self._svd2pac_as_ptr().add(0xe3usize),
629            )
630        }
631    }
632    #[inline(always)]
633    pub const fn adsstr04(
634        &self,
635    ) -> &'static crate::common::Reg<self::Adsstr0_SPEC, crate::common::RW> {
636        unsafe {
637            crate::common::Reg::<self::Adsstr0_SPEC, crate::common::RW>::from_ptr(
638                self._svd2pac_as_ptr().add(0xe4usize),
639            )
640        }
641    }
642    #[inline(always)]
643    pub const fn adsstr05(
644        &self,
645    ) -> &'static crate::common::Reg<self::Adsstr0_SPEC, crate::common::RW> {
646        unsafe {
647            crate::common::Reg::<self::Adsstr0_SPEC, crate::common::RW>::from_ptr(
648                self._svd2pac_as_ptr().add(0xe5usize),
649            )
650        }
651    }
652    #[inline(always)]
653    pub const fn adsstr06(
654        &self,
655    ) -> &'static crate::common::Reg<self::Adsstr0_SPEC, crate::common::RW> {
656        unsafe {
657            crate::common::Reg::<self::Adsstr0_SPEC, crate::common::RW>::from_ptr(
658                self._svd2pac_as_ptr().add(0xe6usize),
659            )
660        }
661    }
662    #[inline(always)]
663    pub const fn adsstr07(
664        &self,
665    ) -> &'static crate::common::Reg<self::Adsstr0_SPEC, crate::common::RW> {
666        unsafe {
667            crate::common::Reg::<self::Adsstr0_SPEC, crate::common::RW>::from_ptr(
668                self._svd2pac_as_ptr().add(0xe7usize),
669            )
670        }
671    }
672    #[inline(always)]
673    pub const fn adsstr08(
674        &self,
675    ) -> &'static crate::common::Reg<self::Adsstr0_SPEC, crate::common::RW> {
676        unsafe {
677            crate::common::Reg::<self::Adsstr0_SPEC, crate::common::RW>::from_ptr(
678                self._svd2pac_as_ptr().add(0xe8usize),
679            )
680        }
681    }
682
683    #[doc = "A/D Channel Input Mode Select Register"]
684    #[inline(always)]
685    pub const fn adanim(
686        &self,
687    ) -> &'static crate::common::Reg<self::Adanim_SPEC, crate::common::RW> {
688        unsafe {
689            crate::common::Reg::<self::Adanim_SPEC, crate::common::RW>::from_ptr(
690                self._svd2pac_as_ptr().add(240usize),
691            )
692        }
693    }
694
695    #[doc = "A/D Calibration Execution Register"]
696    #[inline(always)]
697    pub const fn adcalexe(
698        &self,
699    ) -> &'static crate::common::Reg<self::Adcalexe_SPEC, crate::common::RW> {
700        unsafe {
701            crate::common::Reg::<self::Adcalexe_SPEC, crate::common::RW>::from_ptr(
702                self._svd2pac_as_ptr().add(242usize),
703            )
704        }
705    }
706
707    #[doc = "A/D Dedicated Reference Voltage Circuit Control Register"]
708    #[inline(always)]
709    pub const fn vrefampcnt(
710        &self,
711    ) -> &'static crate::common::Reg<self::Vrefampcnt_SPEC, crate::common::RW> {
712        unsafe {
713            crate::common::Reg::<self::Vrefampcnt_SPEC, crate::common::RW>::from_ptr(
714                self._svd2pac_as_ptr().add(244usize),
715            )
716        }
717    }
718
719    #[doc = "A/D Self-Diagnosis Data Register"]
720    #[inline(always)]
721    pub const fn adrd(&self) -> &'static crate::common::Reg<self::Adrd_SPEC, crate::common::R> {
722        unsafe {
723            crate::common::Reg::<self::Adrd_SPEC, crate::common::R>::from_ptr(
724                self._svd2pac_as_ptr().add(248usize),
725            )
726        }
727    }
728
729    #[doc = "A/D Self-Diagnostic Status Register"]
730    #[inline(always)]
731    pub const fn adrst(&self) -> &'static crate::common::Reg<self::Adrst_SPEC, crate::common::RW> {
732        unsafe {
733            crate::common::Reg::<self::Adrst_SPEC, crate::common::RW>::from_ptr(
734                self._svd2pac_as_ptr().add(250usize),
735            )
736        }
737    }
738}
739#[doc(hidden)]
740#[derive(Copy, Clone, Eq, PartialEq)]
741pub struct Adcsr_SPEC;
742impl crate::sealed::RegSpec for Adcsr_SPEC {
743    type DataType = u16;
744}
745
746#[doc = "A/D Control Register"]
747pub type Adcsr = crate::RegValueT<Adcsr_SPEC>;
748
749impl Adcsr {
750    #[doc = "A/D Conversion Start"]
751    #[inline(always)]
752    pub fn adst(
753        self,
754    ) -> crate::common::RegisterField<
755        15,
756        0x1,
757        1,
758        0,
759        adcsr::Adst,
760        adcsr::Adst,
761        Adcsr_SPEC,
762        crate::common::RW,
763    > {
764        crate::common::RegisterField::<
765            15,
766            0x1,
767            1,
768            0,
769            adcsr::Adst,
770            adcsr::Adst,
771            Adcsr_SPEC,
772            crate::common::RW,
773        >::from_register(self, 0)
774    }
775
776    #[doc = "Scan Mode Select"]
777    #[inline(always)]
778    pub fn adcs(
779        self,
780    ) -> crate::common::RegisterField<
781        13,
782        0x3,
783        1,
784        0,
785        adcsr::Adcs,
786        adcsr::Adcs,
787        Adcsr_SPEC,
788        crate::common::RW,
789    > {
790        crate::common::RegisterField::<
791            13,
792            0x3,
793            1,
794            0,
795            adcsr::Adcs,
796            adcsr::Adcs,
797            Adcsr_SPEC,
798            crate::common::RW,
799        >::from_register(self, 0)
800    }
801
802    #[doc = "A/D Conversion Operation Mode Select"]
803    #[inline(always)]
804    pub fn adhsc(
805        self,
806    ) -> crate::common::RegisterField<
807        10,
808        0x1,
809        1,
810        0,
811        adcsr::Adhsc,
812        adcsr::Adhsc,
813        Adcsr_SPEC,
814        crate::common::RW,
815    > {
816        crate::common::RegisterField::<
817            10,
818            0x1,
819            1,
820            0,
821            adcsr::Adhsc,
822            adcsr::Adhsc,
823            Adcsr_SPEC,
824            crate::common::RW,
825        >::from_register(self, 0)
826    }
827
828    #[doc = "Trigger Start Enable"]
829    #[inline(always)]
830    pub fn trge(
831        self,
832    ) -> crate::common::RegisterField<
833        9,
834        0x1,
835        1,
836        0,
837        adcsr::Trge,
838        adcsr::Trge,
839        Adcsr_SPEC,
840        crate::common::RW,
841    > {
842        crate::common::RegisterField::<
843            9,
844            0x1,
845            1,
846            0,
847            adcsr::Trge,
848            adcsr::Trge,
849            Adcsr_SPEC,
850            crate::common::RW,
851        >::from_register(self, 0)
852    }
853
854    #[doc = "Trigger Select"]
855    #[inline(always)]
856    pub fn extrg(
857        self,
858    ) -> crate::common::RegisterField<
859        8,
860        0x1,
861        1,
862        0,
863        adcsr::Extrg,
864        adcsr::Extrg,
865        Adcsr_SPEC,
866        crate::common::RW,
867    > {
868        crate::common::RegisterField::<
869            8,
870            0x1,
871            1,
872            0,
873            adcsr::Extrg,
874            adcsr::Extrg,
875            Adcsr_SPEC,
876            crate::common::RW,
877        >::from_register(self, 0)
878    }
879
880    #[doc = "Double Trigger Mode Select"]
881    #[inline(always)]
882    pub fn dble(
883        self,
884    ) -> crate::common::RegisterField<
885        7,
886        0x1,
887        1,
888        0,
889        adcsr::Dble,
890        adcsr::Dble,
891        Adcsr_SPEC,
892        crate::common::RW,
893    > {
894        crate::common::RegisterField::<
895            7,
896            0x1,
897            1,
898            0,
899            adcsr::Dble,
900            adcsr::Dble,
901            Adcsr_SPEC,
902            crate::common::RW,
903        >::from_register(self, 0)
904    }
905
906    #[doc = "Group B Scan End Interrupt Enable"]
907    #[inline(always)]
908    pub fn gbadie(
909        self,
910    ) -> crate::common::RegisterField<
911        6,
912        0x1,
913        1,
914        0,
915        adcsr::Gbadie,
916        adcsr::Gbadie,
917        Adcsr_SPEC,
918        crate::common::RW,
919    > {
920        crate::common::RegisterField::<
921            6,
922            0x1,
923            1,
924            0,
925            adcsr::Gbadie,
926            adcsr::Gbadie,
927            Adcsr_SPEC,
928            crate::common::RW,
929        >::from_register(self, 0)
930    }
931
932    #[doc = "This bit is read as 0. The write value should be 0."]
933    #[inline(always)]
934    pub fn reserved(
935        self,
936    ) -> crate::common::RegisterFieldBool<5, 1, 0, Adcsr_SPEC, crate::common::RW> {
937        crate::common::RegisterFieldBool::<5, 1, 0, Adcsr_SPEC, crate::common::RW>::from_register(
938            self, 0,
939        )
940    }
941
942    #[doc = "Double Trigger Channel SelectThese bits select one analog input channel for double triggered operation. The setting is only effective while double trigger mode is selected."]
943    #[inline(always)]
944    pub fn dblans(
945        self,
946    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, Adcsr_SPEC, crate::common::RW> {
947        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,Adcsr_SPEC,crate::common::RW>::from_register(self,0)
948    }
949}
950impl ::core::default::Default for Adcsr {
951    #[inline(always)]
952    fn default() -> Adcsr {
953        <crate::RegValueT<Adcsr_SPEC> as RegisterValue<_>>::new(0)
954    }
955}
956pub mod adcsr {
957
958    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
959    pub struct Adst_SPEC;
960    pub type Adst = crate::EnumBitfieldStruct<u8, Adst_SPEC>;
961    impl Adst {
962        #[doc = "Stops A/D conversion process."]
963        pub const _0: Self = Self::new(0);
964
965        #[doc = "Starts A/D conversion process."]
966        pub const _1: Self = Self::new(1);
967    }
968    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
969    pub struct Adcs_SPEC;
970    pub type Adcs = crate::EnumBitfieldStruct<u8, Adcs_SPEC>;
971    impl Adcs {
972        #[doc = "Single scan mode"]
973        pub const _00: Self = Self::new(0);
974
975        #[doc = "Group scan mode"]
976        pub const _01: Self = Self::new(1);
977
978        #[doc = "Continuous scan mode"]
979        pub const _10: Self = Self::new(2);
980
981        #[doc = "Setting prohibited"]
982        pub const _11: Self = Self::new(3);
983    }
984    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
985    pub struct Adhsc_SPEC;
986    pub type Adhsc = crate::EnumBitfieldStruct<u8, Adhsc_SPEC>;
987    impl Adhsc {
988        #[doc = "High speed A/D conversion mode"]
989        pub const _0: Self = Self::new(0);
990
991        #[doc = "Low current A/D conversion mode"]
992        pub const _1: Self = Self::new(1);
993    }
994    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
995    pub struct Trge_SPEC;
996    pub type Trge = crate::EnumBitfieldStruct<u8, Trge_SPEC>;
997    impl Trge {
998        #[doc = "Disables A/D conversion to be started by the synchronous or asynchronous trigger."]
999        pub const _0: Self = Self::new(0);
1000
1001        #[doc = "Enables A/D conversion to be started by the synchronous or asynchronous trigger."]
1002        pub const _1: Self = Self::new(1);
1003    }
1004    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1005    pub struct Extrg_SPEC;
1006    pub type Extrg = crate::EnumBitfieldStruct<u8, Extrg_SPEC>;
1007    impl Extrg {
1008        #[doc = "A/D conversion is started by the synchronous trigger (ELC)."]
1009        pub const _0: Self = Self::new(0);
1010
1011        #[doc = "A/D conversion is started by the asynchronous trigger (ADTRG0)."]
1012        pub const _1: Self = Self::new(1);
1013    }
1014    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1015    pub struct Dble_SPEC;
1016    pub type Dble = crate::EnumBitfieldStruct<u8, Dble_SPEC>;
1017    impl Dble {
1018        #[doc = "Double trigger mode non-selection"]
1019        pub const _0: Self = Self::new(0);
1020
1021        #[doc = "Double trigger mode selection"]
1022        pub const _1: Self = Self::new(1);
1023    }
1024    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1025    pub struct Gbadie_SPEC;
1026    pub type Gbadie = crate::EnumBitfieldStruct<u8, Gbadie_SPEC>;
1027    impl Gbadie {
1028        #[doc = "Disables ADC160_GBADI interrupt generation upon group B scan completion."]
1029        pub const _0: Self = Self::new(0);
1030
1031        #[doc = "Enables ADC160_GBADI interrupt generation upon group B scan completion."]
1032        pub const _1: Self = Self::new(1);
1033    }
1034}
1035#[doc(hidden)]
1036#[derive(Copy, Clone, Eq, PartialEq)]
1037pub struct Adansa0_SPEC;
1038impl crate::sealed::RegSpec for Adansa0_SPEC {
1039    type DataType = u16;
1040}
1041
1042#[doc = "A/D Channel Select Register A0"]
1043pub type Adansa0 = crate::RegValueT<Adansa0_SPEC>;
1044
1045impl Adansa0 {
1046    #[doc = "These bits are read as 0000000. The write value should be 0000000."]
1047    #[inline(always)]
1048    pub fn reserved(
1049        self,
1050    ) -> crate::common::RegisterField<9, 0x7f, 1, 0, u8, u8, Adansa0_SPEC, crate::common::RW> {
1051        crate::common::RegisterField::<9,0x7f,1,0,u8,u8,Adansa0_SPEC,crate::common::RW>::from_register(self,0)
1052    }
1053
1054    #[doc = "AN008 Select"]
1055    #[inline(always)]
1056    pub fn ansa08(
1057        self,
1058    ) -> crate::common::RegisterField<
1059        8,
1060        0x1,
1061        1,
1062        0,
1063        adansa0::Ansa08,
1064        adansa0::Ansa08,
1065        Adansa0_SPEC,
1066        crate::common::RW,
1067    > {
1068        crate::common::RegisterField::<
1069            8,
1070            0x1,
1071            1,
1072            0,
1073            adansa0::Ansa08,
1074            adansa0::Ansa08,
1075            Adansa0_SPEC,
1076            crate::common::RW,
1077        >::from_register(self, 0)
1078    }
1079
1080    #[doc = "AN007 Select"]
1081    #[inline(always)]
1082    pub fn ansa07(
1083        self,
1084    ) -> crate::common::RegisterField<
1085        7,
1086        0x1,
1087        1,
1088        0,
1089        adansa0::Ansa07,
1090        adansa0::Ansa07,
1091        Adansa0_SPEC,
1092        crate::common::RW,
1093    > {
1094        crate::common::RegisterField::<
1095            7,
1096            0x1,
1097            1,
1098            0,
1099            adansa0::Ansa07,
1100            adansa0::Ansa07,
1101            Adansa0_SPEC,
1102            crate::common::RW,
1103        >::from_register(self, 0)
1104    }
1105
1106    #[doc = "AN006 Select"]
1107    #[inline(always)]
1108    pub fn ansa06(
1109        self,
1110    ) -> crate::common::RegisterField<
1111        6,
1112        0x1,
1113        1,
1114        0,
1115        adansa0::Ansa06,
1116        adansa0::Ansa06,
1117        Adansa0_SPEC,
1118        crate::common::RW,
1119    > {
1120        crate::common::RegisterField::<
1121            6,
1122            0x1,
1123            1,
1124            0,
1125            adansa0::Ansa06,
1126            adansa0::Ansa06,
1127            Adansa0_SPEC,
1128            crate::common::RW,
1129        >::from_register(self, 0)
1130    }
1131
1132    #[doc = "AN005 Select"]
1133    #[inline(always)]
1134    pub fn ansa05(
1135        self,
1136    ) -> crate::common::RegisterField<
1137        5,
1138        0x1,
1139        1,
1140        0,
1141        adansa0::Ansa05,
1142        adansa0::Ansa05,
1143        Adansa0_SPEC,
1144        crate::common::RW,
1145    > {
1146        crate::common::RegisterField::<
1147            5,
1148            0x1,
1149            1,
1150            0,
1151            adansa0::Ansa05,
1152            adansa0::Ansa05,
1153            Adansa0_SPEC,
1154            crate::common::RW,
1155        >::from_register(self, 0)
1156    }
1157
1158    #[doc = "AN004 Select"]
1159    #[inline(always)]
1160    pub fn ansa04(
1161        self,
1162    ) -> crate::common::RegisterField<
1163        4,
1164        0x1,
1165        1,
1166        0,
1167        adansa0::Ansa04,
1168        adansa0::Ansa04,
1169        Adansa0_SPEC,
1170        crate::common::RW,
1171    > {
1172        crate::common::RegisterField::<
1173            4,
1174            0x1,
1175            1,
1176            0,
1177            adansa0::Ansa04,
1178            adansa0::Ansa04,
1179            Adansa0_SPEC,
1180            crate::common::RW,
1181        >::from_register(self, 0)
1182    }
1183
1184    #[doc = "AN003 Select"]
1185    #[inline(always)]
1186    pub fn ansa03(
1187        self,
1188    ) -> crate::common::RegisterField<
1189        3,
1190        0x1,
1191        1,
1192        0,
1193        adansa0::Ansa03,
1194        adansa0::Ansa03,
1195        Adansa0_SPEC,
1196        crate::common::RW,
1197    > {
1198        crate::common::RegisterField::<
1199            3,
1200            0x1,
1201            1,
1202            0,
1203            adansa0::Ansa03,
1204            adansa0::Ansa03,
1205            Adansa0_SPEC,
1206            crate::common::RW,
1207        >::from_register(self, 0)
1208    }
1209
1210    #[doc = "AN002 Select"]
1211    #[inline(always)]
1212    pub fn ansa02(
1213        self,
1214    ) -> crate::common::RegisterField<
1215        2,
1216        0x1,
1217        1,
1218        0,
1219        adansa0::Ansa02,
1220        adansa0::Ansa02,
1221        Adansa0_SPEC,
1222        crate::common::RW,
1223    > {
1224        crate::common::RegisterField::<
1225            2,
1226            0x1,
1227            1,
1228            0,
1229            adansa0::Ansa02,
1230            adansa0::Ansa02,
1231            Adansa0_SPEC,
1232            crate::common::RW,
1233        >::from_register(self, 0)
1234    }
1235
1236    #[doc = "AN001 Select"]
1237    #[inline(always)]
1238    pub fn ansa01(
1239        self,
1240    ) -> crate::common::RegisterField<
1241        1,
1242        0x1,
1243        1,
1244        0,
1245        adansa0::Ansa01,
1246        adansa0::Ansa01,
1247        Adansa0_SPEC,
1248        crate::common::RW,
1249    > {
1250        crate::common::RegisterField::<
1251            1,
1252            0x1,
1253            1,
1254            0,
1255            adansa0::Ansa01,
1256            adansa0::Ansa01,
1257            Adansa0_SPEC,
1258            crate::common::RW,
1259        >::from_register(self, 0)
1260    }
1261
1262    #[doc = "AN000 Select"]
1263    #[inline(always)]
1264    pub fn ansa00(
1265        self,
1266    ) -> crate::common::RegisterField<
1267        0,
1268        0x1,
1269        1,
1270        0,
1271        adansa0::Ansa00,
1272        adansa0::Ansa00,
1273        Adansa0_SPEC,
1274        crate::common::RW,
1275    > {
1276        crate::common::RegisterField::<
1277            0,
1278            0x1,
1279            1,
1280            0,
1281            adansa0::Ansa00,
1282            adansa0::Ansa00,
1283            Adansa0_SPEC,
1284            crate::common::RW,
1285        >::from_register(self, 0)
1286    }
1287}
1288impl ::core::default::Default for Adansa0 {
1289    #[inline(always)]
1290    fn default() -> Adansa0 {
1291        <crate::RegValueT<Adansa0_SPEC> as RegisterValue<_>>::new(0)
1292    }
1293}
1294pub mod adansa0 {
1295
1296    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1297    pub struct Ansa08_SPEC;
1298    pub type Ansa08 = crate::EnumBitfieldStruct<u8, Ansa08_SPEC>;
1299    impl Ansa08 {
1300        #[doc = "AN008 is not selected"]
1301        pub const _0: Self = Self::new(0);
1302
1303        #[doc = "AN008 is selected"]
1304        pub const _1: Self = Self::new(1);
1305    }
1306    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1307    pub struct Ansa07_SPEC;
1308    pub type Ansa07 = crate::EnumBitfieldStruct<u8, Ansa07_SPEC>;
1309    impl Ansa07 {
1310        #[doc = "AN007 is not selected"]
1311        pub const _0: Self = Self::new(0);
1312
1313        #[doc = "AN007 is selected"]
1314        pub const _1: Self = Self::new(1);
1315    }
1316    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1317    pub struct Ansa06_SPEC;
1318    pub type Ansa06 = crate::EnumBitfieldStruct<u8, Ansa06_SPEC>;
1319    impl Ansa06 {
1320        #[doc = "AN006 is not selected"]
1321        pub const _0: Self = Self::new(0);
1322
1323        #[doc = "AN006 is selected"]
1324        pub const _1: Self = Self::new(1);
1325    }
1326    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1327    pub struct Ansa05_SPEC;
1328    pub type Ansa05 = crate::EnumBitfieldStruct<u8, Ansa05_SPEC>;
1329    impl Ansa05 {
1330        #[doc = "AN005 is not selected"]
1331        pub const _0: Self = Self::new(0);
1332
1333        #[doc = "AN005 is selected"]
1334        pub const _1: Self = Self::new(1);
1335    }
1336    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1337    pub struct Ansa04_SPEC;
1338    pub type Ansa04 = crate::EnumBitfieldStruct<u8, Ansa04_SPEC>;
1339    impl Ansa04 {
1340        #[doc = "AN004 is not selected"]
1341        pub const _0: Self = Self::new(0);
1342
1343        #[doc = "AN004 is selected"]
1344        pub const _1: Self = Self::new(1);
1345    }
1346    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1347    pub struct Ansa03_SPEC;
1348    pub type Ansa03 = crate::EnumBitfieldStruct<u8, Ansa03_SPEC>;
1349    impl Ansa03 {
1350        #[doc = "AN003 is not selected"]
1351        pub const _0: Self = Self::new(0);
1352
1353        #[doc = "AN003 is selected"]
1354        pub const _1: Self = Self::new(1);
1355    }
1356    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1357    pub struct Ansa02_SPEC;
1358    pub type Ansa02 = crate::EnumBitfieldStruct<u8, Ansa02_SPEC>;
1359    impl Ansa02 {
1360        #[doc = "AN002 is not selected"]
1361        pub const _0: Self = Self::new(0);
1362
1363        #[doc = "AN002 is selected"]
1364        pub const _1: Self = Self::new(1);
1365    }
1366    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1367    pub struct Ansa01_SPEC;
1368    pub type Ansa01 = crate::EnumBitfieldStruct<u8, Ansa01_SPEC>;
1369    impl Ansa01 {
1370        #[doc = "AN001 is not selected"]
1371        pub const _0: Self = Self::new(0);
1372
1373        #[doc = "AN001 is selected"]
1374        pub const _1: Self = Self::new(1);
1375    }
1376    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1377    pub struct Ansa00_SPEC;
1378    pub type Ansa00 = crate::EnumBitfieldStruct<u8, Ansa00_SPEC>;
1379    impl Ansa00 {
1380        #[doc = "AN000 is not selected"]
1381        pub const _0: Self = Self::new(0);
1382
1383        #[doc = "AN000 is selected"]
1384        pub const _1: Self = Self::new(1);
1385    }
1386}
1387#[doc(hidden)]
1388#[derive(Copy, Clone, Eq, PartialEq)]
1389pub struct Adansa1_SPEC;
1390impl crate::sealed::RegSpec for Adansa1_SPEC {
1391    type DataType = u16;
1392}
1393
1394#[doc = "A/D Channel Select Register A1"]
1395pub type Adansa1 = crate::RegValueT<Adansa1_SPEC>;
1396
1397impl Adansa1 {
1398    #[doc = "These bits are read as 0000000. The write value should be 0000000."]
1399    #[inline(always)]
1400    pub fn reserved(
1401        self,
1402    ) -> crate::common::RegisterField<9, 0x7f, 1, 0, u8, u8, Adansa1_SPEC, crate::common::RW> {
1403        crate::common::RegisterField::<9,0x7f,1,0,u8,u8,Adansa1_SPEC,crate::common::RW>::from_register(self,0)
1404    }
1405
1406    #[doc = "AN024 Select"]
1407    #[inline(always)]
1408    pub fn ansa24(
1409        self,
1410    ) -> crate::common::RegisterField<
1411        8,
1412        0x1,
1413        1,
1414        0,
1415        adansa1::Ansa24,
1416        adansa1::Ansa24,
1417        Adansa1_SPEC,
1418        crate::common::RW,
1419    > {
1420        crate::common::RegisterField::<
1421            8,
1422            0x1,
1423            1,
1424            0,
1425            adansa1::Ansa24,
1426            adansa1::Ansa24,
1427            Adansa1_SPEC,
1428            crate::common::RW,
1429        >::from_register(self, 0)
1430    }
1431
1432    #[doc = "AN023 Select"]
1433    #[inline(always)]
1434    pub fn ansa23(
1435        self,
1436    ) -> crate::common::RegisterField<
1437        7,
1438        0x1,
1439        1,
1440        0,
1441        adansa1::Ansa23,
1442        adansa1::Ansa23,
1443        Adansa1_SPEC,
1444        crate::common::RW,
1445    > {
1446        crate::common::RegisterField::<
1447            7,
1448            0x1,
1449            1,
1450            0,
1451            adansa1::Ansa23,
1452            adansa1::Ansa23,
1453            Adansa1_SPEC,
1454            crate::common::RW,
1455        >::from_register(self, 0)
1456    }
1457
1458    #[doc = "AN022 Select"]
1459    #[inline(always)]
1460    pub fn ansa22(
1461        self,
1462    ) -> crate::common::RegisterField<
1463        6,
1464        0x1,
1465        1,
1466        0,
1467        adansa1::Ansa22,
1468        adansa1::Ansa22,
1469        Adansa1_SPEC,
1470        crate::common::RW,
1471    > {
1472        crate::common::RegisterField::<
1473            6,
1474            0x1,
1475            1,
1476            0,
1477            adansa1::Ansa22,
1478            adansa1::Ansa22,
1479            Adansa1_SPEC,
1480            crate::common::RW,
1481        >::from_register(self, 0)
1482    }
1483
1484    #[doc = "AN021 Select"]
1485    #[inline(always)]
1486    pub fn ansa21(
1487        self,
1488    ) -> crate::common::RegisterField<
1489        5,
1490        0x1,
1491        1,
1492        0,
1493        adansa1::Ansa21,
1494        adansa1::Ansa21,
1495        Adansa1_SPEC,
1496        crate::common::RW,
1497    > {
1498        crate::common::RegisterField::<
1499            5,
1500            0x1,
1501            1,
1502            0,
1503            adansa1::Ansa21,
1504            adansa1::Ansa21,
1505            Adansa1_SPEC,
1506            crate::common::RW,
1507        >::from_register(self, 0)
1508    }
1509
1510    #[doc = "AN020 Select"]
1511    #[inline(always)]
1512    pub fn ansa20(
1513        self,
1514    ) -> crate::common::RegisterField<
1515        4,
1516        0x1,
1517        1,
1518        0,
1519        adansa1::Ansa20,
1520        adansa1::Ansa20,
1521        Adansa1_SPEC,
1522        crate::common::RW,
1523    > {
1524        crate::common::RegisterField::<
1525            4,
1526            0x1,
1527            1,
1528            0,
1529            adansa1::Ansa20,
1530            adansa1::Ansa20,
1531            Adansa1_SPEC,
1532            crate::common::RW,
1533        >::from_register(self, 0)
1534    }
1535
1536    #[doc = "AN019 Select"]
1537    #[inline(always)]
1538    pub fn ansa19(
1539        self,
1540    ) -> crate::common::RegisterField<
1541        3,
1542        0x1,
1543        1,
1544        0,
1545        adansa1::Ansa19,
1546        adansa1::Ansa19,
1547        Adansa1_SPEC,
1548        crate::common::RW,
1549    > {
1550        crate::common::RegisterField::<
1551            3,
1552            0x1,
1553            1,
1554            0,
1555            adansa1::Ansa19,
1556            adansa1::Ansa19,
1557            Adansa1_SPEC,
1558            crate::common::RW,
1559        >::from_register(self, 0)
1560    }
1561
1562    #[doc = "AN018 Select"]
1563    #[inline(always)]
1564    pub fn ansa18(
1565        self,
1566    ) -> crate::common::RegisterField<
1567        2,
1568        0x1,
1569        1,
1570        0,
1571        adansa1::Ansa18,
1572        adansa1::Ansa18,
1573        Adansa1_SPEC,
1574        crate::common::RW,
1575    > {
1576        crate::common::RegisterField::<
1577            2,
1578            0x1,
1579            1,
1580            0,
1581            adansa1::Ansa18,
1582            adansa1::Ansa18,
1583            Adansa1_SPEC,
1584            crate::common::RW,
1585        >::from_register(self, 0)
1586    }
1587
1588    #[doc = "AN017 Select"]
1589    #[inline(always)]
1590    pub fn ansa17(
1591        self,
1592    ) -> crate::common::RegisterField<
1593        1,
1594        0x1,
1595        1,
1596        0,
1597        adansa1::Ansa17,
1598        adansa1::Ansa17,
1599        Adansa1_SPEC,
1600        crate::common::RW,
1601    > {
1602        crate::common::RegisterField::<
1603            1,
1604            0x1,
1605            1,
1606            0,
1607            adansa1::Ansa17,
1608            adansa1::Ansa17,
1609            Adansa1_SPEC,
1610            crate::common::RW,
1611        >::from_register(self, 0)
1612    }
1613
1614    #[doc = "AN016 Select"]
1615    #[inline(always)]
1616    pub fn ansa16(
1617        self,
1618    ) -> crate::common::RegisterField<
1619        0,
1620        0x1,
1621        1,
1622        0,
1623        adansa1::Ansa16,
1624        adansa1::Ansa16,
1625        Adansa1_SPEC,
1626        crate::common::RW,
1627    > {
1628        crate::common::RegisterField::<
1629            0,
1630            0x1,
1631            1,
1632            0,
1633            adansa1::Ansa16,
1634            adansa1::Ansa16,
1635            Adansa1_SPEC,
1636            crate::common::RW,
1637        >::from_register(self, 0)
1638    }
1639}
1640impl ::core::default::Default for Adansa1 {
1641    #[inline(always)]
1642    fn default() -> Adansa1 {
1643        <crate::RegValueT<Adansa1_SPEC> as RegisterValue<_>>::new(0)
1644    }
1645}
1646pub mod adansa1 {
1647
1648    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1649    pub struct Ansa24_SPEC;
1650    pub type Ansa24 = crate::EnumBitfieldStruct<u8, Ansa24_SPEC>;
1651    impl Ansa24 {
1652        #[doc = "AN024 is not selected"]
1653        pub const _0: Self = Self::new(0);
1654
1655        #[doc = "AN024 is selected"]
1656        pub const _1: Self = Self::new(1);
1657    }
1658    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1659    pub struct Ansa23_SPEC;
1660    pub type Ansa23 = crate::EnumBitfieldStruct<u8, Ansa23_SPEC>;
1661    impl Ansa23 {
1662        #[doc = "AN023 is not selected"]
1663        pub const _0: Self = Self::new(0);
1664
1665        #[doc = "AN023 is selected"]
1666        pub const _1: Self = Self::new(1);
1667    }
1668    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1669    pub struct Ansa22_SPEC;
1670    pub type Ansa22 = crate::EnumBitfieldStruct<u8, Ansa22_SPEC>;
1671    impl Ansa22 {
1672        #[doc = "AN022 is not selected"]
1673        pub const _0: Self = Self::new(0);
1674
1675        #[doc = "AN022 is selected"]
1676        pub const _1: Self = Self::new(1);
1677    }
1678    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1679    pub struct Ansa21_SPEC;
1680    pub type Ansa21 = crate::EnumBitfieldStruct<u8, Ansa21_SPEC>;
1681    impl Ansa21 {
1682        #[doc = "AN021 is not selected"]
1683        pub const _0: Self = Self::new(0);
1684
1685        #[doc = "AN021 is selected"]
1686        pub const _1: Self = Self::new(1);
1687    }
1688    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1689    pub struct Ansa20_SPEC;
1690    pub type Ansa20 = crate::EnumBitfieldStruct<u8, Ansa20_SPEC>;
1691    impl Ansa20 {
1692        #[doc = "AN020 is not selected"]
1693        pub const _0: Self = Self::new(0);
1694
1695        #[doc = "AN020 is selected"]
1696        pub const _1: Self = Self::new(1);
1697    }
1698    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1699    pub struct Ansa19_SPEC;
1700    pub type Ansa19 = crate::EnumBitfieldStruct<u8, Ansa19_SPEC>;
1701    impl Ansa19 {
1702        #[doc = "AN019 is not selected"]
1703        pub const _0: Self = Self::new(0);
1704
1705        #[doc = "AN019 is selected"]
1706        pub const _1: Self = Self::new(1);
1707    }
1708    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1709    pub struct Ansa18_SPEC;
1710    pub type Ansa18 = crate::EnumBitfieldStruct<u8, Ansa18_SPEC>;
1711    impl Ansa18 {
1712        #[doc = "AN018 is not selected"]
1713        pub const _0: Self = Self::new(0);
1714
1715        #[doc = "AN018 is selected"]
1716        pub const _1: Self = Self::new(1);
1717    }
1718    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1719    pub struct Ansa17_SPEC;
1720    pub type Ansa17 = crate::EnumBitfieldStruct<u8, Ansa17_SPEC>;
1721    impl Ansa17 {
1722        #[doc = "AN017 is not selected"]
1723        pub const _0: Self = Self::new(0);
1724
1725        #[doc = "AN017 is selected"]
1726        pub const _1: Self = Self::new(1);
1727    }
1728    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1729    pub struct Ansa16_SPEC;
1730    pub type Ansa16 = crate::EnumBitfieldStruct<u8, Ansa16_SPEC>;
1731    impl Ansa16 {
1732        #[doc = "AN016 is not selected"]
1733        pub const _0: Self = Self::new(0);
1734
1735        #[doc = "AN016 is selected"]
1736        pub const _1: Self = Self::new(1);
1737    }
1738}
1739#[doc(hidden)]
1740#[derive(Copy, Clone, Eq, PartialEq)]
1741pub struct Adads0_SPEC;
1742impl crate::sealed::RegSpec for Adads0_SPEC {
1743    type DataType = u16;
1744}
1745
1746#[doc = "A/D-Converted Value Average Channel Select Register 0"]
1747pub type Adads0 = crate::RegValueT<Adads0_SPEC>;
1748
1749impl Adads0 {
1750    #[doc = "These bits are read as 0000000. The write value should be 0000000."]
1751    #[inline(always)]
1752    pub fn reserved(
1753        self,
1754    ) -> crate::common::RegisterField<9, 0x7f, 1, 0, u8, u8, Adads0_SPEC, crate::common::RW> {
1755        crate::common::RegisterField::<9,0x7f,1,0,u8,u8,Adads0_SPEC,crate::common::RW>::from_register(self,0)
1756    }
1757
1758    #[doc = "A/D-Converted Value Average Channel AN008 Select"]
1759    #[inline(always)]
1760    pub fn ads08(
1761        self,
1762    ) -> crate::common::RegisterField<
1763        8,
1764        0x1,
1765        1,
1766        0,
1767        adads0::Ads08,
1768        adads0::Ads08,
1769        Adads0_SPEC,
1770        crate::common::RW,
1771    > {
1772        crate::common::RegisterField::<
1773            8,
1774            0x1,
1775            1,
1776            0,
1777            adads0::Ads08,
1778            adads0::Ads08,
1779            Adads0_SPEC,
1780            crate::common::RW,
1781        >::from_register(self, 0)
1782    }
1783
1784    #[doc = "A/D-Converted Value Average Channel AN007 Select"]
1785    #[inline(always)]
1786    pub fn ads07(
1787        self,
1788    ) -> crate::common::RegisterField<
1789        7,
1790        0x1,
1791        1,
1792        0,
1793        adads0::Ads07,
1794        adads0::Ads07,
1795        Adads0_SPEC,
1796        crate::common::RW,
1797    > {
1798        crate::common::RegisterField::<
1799            7,
1800            0x1,
1801            1,
1802            0,
1803            adads0::Ads07,
1804            adads0::Ads07,
1805            Adads0_SPEC,
1806            crate::common::RW,
1807        >::from_register(self, 0)
1808    }
1809
1810    #[doc = "A/D-Converted Value Average Channel AN006 Select"]
1811    #[inline(always)]
1812    pub fn ads06(
1813        self,
1814    ) -> crate::common::RegisterField<
1815        6,
1816        0x1,
1817        1,
1818        0,
1819        adads0::Ads06,
1820        adads0::Ads06,
1821        Adads0_SPEC,
1822        crate::common::RW,
1823    > {
1824        crate::common::RegisterField::<
1825            6,
1826            0x1,
1827            1,
1828            0,
1829            adads0::Ads06,
1830            adads0::Ads06,
1831            Adads0_SPEC,
1832            crate::common::RW,
1833        >::from_register(self, 0)
1834    }
1835
1836    #[doc = "A/D-Converted Value Average Channel AN005 Select"]
1837    #[inline(always)]
1838    pub fn ads05(
1839        self,
1840    ) -> crate::common::RegisterField<
1841        5,
1842        0x1,
1843        1,
1844        0,
1845        adads0::Ads05,
1846        adads0::Ads05,
1847        Adads0_SPEC,
1848        crate::common::RW,
1849    > {
1850        crate::common::RegisterField::<
1851            5,
1852            0x1,
1853            1,
1854            0,
1855            adads0::Ads05,
1856            adads0::Ads05,
1857            Adads0_SPEC,
1858            crate::common::RW,
1859        >::from_register(self, 0)
1860    }
1861
1862    #[doc = "A/D-Converted Value Average Channel AN004 Select"]
1863    #[inline(always)]
1864    pub fn ads04(
1865        self,
1866    ) -> crate::common::RegisterField<
1867        4,
1868        0x1,
1869        1,
1870        0,
1871        adads0::Ads04,
1872        adads0::Ads04,
1873        Adads0_SPEC,
1874        crate::common::RW,
1875    > {
1876        crate::common::RegisterField::<
1877            4,
1878            0x1,
1879            1,
1880            0,
1881            adads0::Ads04,
1882            adads0::Ads04,
1883            Adads0_SPEC,
1884            crate::common::RW,
1885        >::from_register(self, 0)
1886    }
1887
1888    #[doc = "A/D-Converted Value Average Channel AN003 Select"]
1889    #[inline(always)]
1890    pub fn ads03(
1891        self,
1892    ) -> crate::common::RegisterField<
1893        3,
1894        0x1,
1895        1,
1896        0,
1897        adads0::Ads03,
1898        adads0::Ads03,
1899        Adads0_SPEC,
1900        crate::common::RW,
1901    > {
1902        crate::common::RegisterField::<
1903            3,
1904            0x1,
1905            1,
1906            0,
1907            adads0::Ads03,
1908            adads0::Ads03,
1909            Adads0_SPEC,
1910            crate::common::RW,
1911        >::from_register(self, 0)
1912    }
1913
1914    #[doc = "A/D-Converted Value Average Channel AN002 Select"]
1915    #[inline(always)]
1916    pub fn ads02(
1917        self,
1918    ) -> crate::common::RegisterField<
1919        2,
1920        0x1,
1921        1,
1922        0,
1923        adads0::Ads02,
1924        adads0::Ads02,
1925        Adads0_SPEC,
1926        crate::common::RW,
1927    > {
1928        crate::common::RegisterField::<
1929            2,
1930            0x1,
1931            1,
1932            0,
1933            adads0::Ads02,
1934            adads0::Ads02,
1935            Adads0_SPEC,
1936            crate::common::RW,
1937        >::from_register(self, 0)
1938    }
1939
1940    #[doc = "A/D-Converted Value Average Channel AN001 Select"]
1941    #[inline(always)]
1942    pub fn ads01(
1943        self,
1944    ) -> crate::common::RegisterField<
1945        1,
1946        0x1,
1947        1,
1948        0,
1949        adads0::Ads01,
1950        adads0::Ads01,
1951        Adads0_SPEC,
1952        crate::common::RW,
1953    > {
1954        crate::common::RegisterField::<
1955            1,
1956            0x1,
1957            1,
1958            0,
1959            adads0::Ads01,
1960            adads0::Ads01,
1961            Adads0_SPEC,
1962            crate::common::RW,
1963        >::from_register(self, 0)
1964    }
1965
1966    #[doc = "A/D-Converted Value Average Channel AN000 Select"]
1967    #[inline(always)]
1968    pub fn ads00(
1969        self,
1970    ) -> crate::common::RegisterField<
1971        0,
1972        0x1,
1973        1,
1974        0,
1975        adads0::Ads00,
1976        adads0::Ads00,
1977        Adads0_SPEC,
1978        crate::common::RW,
1979    > {
1980        crate::common::RegisterField::<
1981            0,
1982            0x1,
1983            1,
1984            0,
1985            adads0::Ads00,
1986            adads0::Ads00,
1987            Adads0_SPEC,
1988            crate::common::RW,
1989        >::from_register(self, 0)
1990    }
1991}
1992impl ::core::default::Default for Adads0 {
1993    #[inline(always)]
1994    fn default() -> Adads0 {
1995        <crate::RegValueT<Adads0_SPEC> as RegisterValue<_>>::new(0)
1996    }
1997}
1998pub mod adads0 {
1999
2000    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2001    pub struct Ads08_SPEC;
2002    pub type Ads08 = crate::EnumBitfieldStruct<u8, Ads08_SPEC>;
2003    impl Ads08 {
2004        #[doc = "AN008 is not selected."]
2005        pub const _0: Self = Self::new(0);
2006
2007        #[doc = "AN008 is selected."]
2008        pub const _1: Self = Self::new(1);
2009    }
2010    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2011    pub struct Ads07_SPEC;
2012    pub type Ads07 = crate::EnumBitfieldStruct<u8, Ads07_SPEC>;
2013    impl Ads07 {
2014        #[doc = "AN007 is not selected."]
2015        pub const _0: Self = Self::new(0);
2016
2017        #[doc = "AN007 is selected."]
2018        pub const _1: Self = Self::new(1);
2019    }
2020    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2021    pub struct Ads06_SPEC;
2022    pub type Ads06 = crate::EnumBitfieldStruct<u8, Ads06_SPEC>;
2023    impl Ads06 {
2024        #[doc = "AN006 is not selected."]
2025        pub const _0: Self = Self::new(0);
2026
2027        #[doc = "AN006 is selected."]
2028        pub const _1: Self = Self::new(1);
2029    }
2030    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2031    pub struct Ads05_SPEC;
2032    pub type Ads05 = crate::EnumBitfieldStruct<u8, Ads05_SPEC>;
2033    impl Ads05 {
2034        #[doc = "AN005 is not selected."]
2035        pub const _0: Self = Self::new(0);
2036
2037        #[doc = "AN005 is selected."]
2038        pub const _1: Self = Self::new(1);
2039    }
2040    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2041    pub struct Ads04_SPEC;
2042    pub type Ads04 = crate::EnumBitfieldStruct<u8, Ads04_SPEC>;
2043    impl Ads04 {
2044        #[doc = "AN004 is not selected."]
2045        pub const _0: Self = Self::new(0);
2046
2047        #[doc = "AN004 is selected."]
2048        pub const _1: Self = Self::new(1);
2049    }
2050    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2051    pub struct Ads03_SPEC;
2052    pub type Ads03 = crate::EnumBitfieldStruct<u8, Ads03_SPEC>;
2053    impl Ads03 {
2054        #[doc = "AN003 is not selected."]
2055        pub const _0: Self = Self::new(0);
2056
2057        #[doc = "AN003 is selected."]
2058        pub const _1: Self = Self::new(1);
2059    }
2060    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2061    pub struct Ads02_SPEC;
2062    pub type Ads02 = crate::EnumBitfieldStruct<u8, Ads02_SPEC>;
2063    impl Ads02 {
2064        #[doc = "AN002 is not selected."]
2065        pub const _0: Self = Self::new(0);
2066
2067        #[doc = "AN002 is selected."]
2068        pub const _1: Self = Self::new(1);
2069    }
2070    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2071    pub struct Ads01_SPEC;
2072    pub type Ads01 = crate::EnumBitfieldStruct<u8, Ads01_SPEC>;
2073    impl Ads01 {
2074        #[doc = "AN001 is not selected."]
2075        pub const _0: Self = Self::new(0);
2076
2077        #[doc = "AN001 is selected."]
2078        pub const _1: Self = Self::new(1);
2079    }
2080    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2081    pub struct Ads00_SPEC;
2082    pub type Ads00 = crate::EnumBitfieldStruct<u8, Ads00_SPEC>;
2083    impl Ads00 {
2084        #[doc = "AN000 is not selected."]
2085        pub const _0: Self = Self::new(0);
2086
2087        #[doc = "AN000 is selected."]
2088        pub const _1: Self = Self::new(1);
2089    }
2090}
2091#[doc(hidden)]
2092#[derive(Copy, Clone, Eq, PartialEq)]
2093pub struct Adads1_SPEC;
2094impl crate::sealed::RegSpec for Adads1_SPEC {
2095    type DataType = u16;
2096}
2097
2098#[doc = "A/D-Converted Value Average Channel Select Register 1"]
2099pub type Adads1 = crate::RegValueT<Adads1_SPEC>;
2100
2101impl Adads1 {
2102    #[doc = "These bits are read as 0000000. The write value should be 0000000."]
2103    #[inline(always)]
2104    pub fn reserved(
2105        self,
2106    ) -> crate::common::RegisterField<9, 0x7f, 1, 0, u8, u8, Adads1_SPEC, crate::common::RW> {
2107        crate::common::RegisterField::<9,0x7f,1,0,u8,u8,Adads1_SPEC,crate::common::RW>::from_register(self,0)
2108    }
2109
2110    #[doc = "A/D-Converted Value Average Channel AN024 Select"]
2111    #[inline(always)]
2112    pub fn ads24(
2113        self,
2114    ) -> crate::common::RegisterField<
2115        8,
2116        0x1,
2117        1,
2118        0,
2119        adads1::Ads24,
2120        adads1::Ads24,
2121        Adads1_SPEC,
2122        crate::common::RW,
2123    > {
2124        crate::common::RegisterField::<
2125            8,
2126            0x1,
2127            1,
2128            0,
2129            adads1::Ads24,
2130            adads1::Ads24,
2131            Adads1_SPEC,
2132            crate::common::RW,
2133        >::from_register(self, 0)
2134    }
2135
2136    #[doc = "A/D-Converted Value Average Channel AN023 Select"]
2137    #[inline(always)]
2138    pub fn ads23(
2139        self,
2140    ) -> crate::common::RegisterField<
2141        7,
2142        0x1,
2143        1,
2144        0,
2145        adads1::Ads23,
2146        adads1::Ads23,
2147        Adads1_SPEC,
2148        crate::common::RW,
2149    > {
2150        crate::common::RegisterField::<
2151            7,
2152            0x1,
2153            1,
2154            0,
2155            adads1::Ads23,
2156            adads1::Ads23,
2157            Adads1_SPEC,
2158            crate::common::RW,
2159        >::from_register(self, 0)
2160    }
2161
2162    #[doc = "A/D-Converted Value Average Channel AN022 Select"]
2163    #[inline(always)]
2164    pub fn ads22(
2165        self,
2166    ) -> crate::common::RegisterField<
2167        6,
2168        0x1,
2169        1,
2170        0,
2171        adads1::Ads22,
2172        adads1::Ads22,
2173        Adads1_SPEC,
2174        crate::common::RW,
2175    > {
2176        crate::common::RegisterField::<
2177            6,
2178            0x1,
2179            1,
2180            0,
2181            adads1::Ads22,
2182            adads1::Ads22,
2183            Adads1_SPEC,
2184            crate::common::RW,
2185        >::from_register(self, 0)
2186    }
2187
2188    #[doc = "A/D-Converted Value Average Channel AN021 Select"]
2189    #[inline(always)]
2190    pub fn ads21(
2191        self,
2192    ) -> crate::common::RegisterField<
2193        5,
2194        0x1,
2195        1,
2196        0,
2197        adads1::Ads21,
2198        adads1::Ads21,
2199        Adads1_SPEC,
2200        crate::common::RW,
2201    > {
2202        crate::common::RegisterField::<
2203            5,
2204            0x1,
2205            1,
2206            0,
2207            adads1::Ads21,
2208            adads1::Ads21,
2209            Adads1_SPEC,
2210            crate::common::RW,
2211        >::from_register(self, 0)
2212    }
2213
2214    #[doc = "A/D-Converted Value Average Channel AN020 Select"]
2215    #[inline(always)]
2216    pub fn ads20(
2217        self,
2218    ) -> crate::common::RegisterField<
2219        4,
2220        0x1,
2221        1,
2222        0,
2223        adads1::Ads20,
2224        adads1::Ads20,
2225        Adads1_SPEC,
2226        crate::common::RW,
2227    > {
2228        crate::common::RegisterField::<
2229            4,
2230            0x1,
2231            1,
2232            0,
2233            adads1::Ads20,
2234            adads1::Ads20,
2235            Adads1_SPEC,
2236            crate::common::RW,
2237        >::from_register(self, 0)
2238    }
2239
2240    #[doc = "A/D-Converted Value Average Channel AN019 Select"]
2241    #[inline(always)]
2242    pub fn ads19(
2243        self,
2244    ) -> crate::common::RegisterField<
2245        3,
2246        0x1,
2247        1,
2248        0,
2249        adads1::Ads19,
2250        adads1::Ads19,
2251        Adads1_SPEC,
2252        crate::common::RW,
2253    > {
2254        crate::common::RegisterField::<
2255            3,
2256            0x1,
2257            1,
2258            0,
2259            adads1::Ads19,
2260            adads1::Ads19,
2261            Adads1_SPEC,
2262            crate::common::RW,
2263        >::from_register(self, 0)
2264    }
2265
2266    #[doc = "A/D-Converted Value Average Channel AN018 Select"]
2267    #[inline(always)]
2268    pub fn ads18(
2269        self,
2270    ) -> crate::common::RegisterField<
2271        2,
2272        0x1,
2273        1,
2274        0,
2275        adads1::Ads18,
2276        adads1::Ads18,
2277        Adads1_SPEC,
2278        crate::common::RW,
2279    > {
2280        crate::common::RegisterField::<
2281            2,
2282            0x1,
2283            1,
2284            0,
2285            adads1::Ads18,
2286            adads1::Ads18,
2287            Adads1_SPEC,
2288            crate::common::RW,
2289        >::from_register(self, 0)
2290    }
2291
2292    #[doc = "A/D-Converted Value Average Channel AN017 Select"]
2293    #[inline(always)]
2294    pub fn ads17(
2295        self,
2296    ) -> crate::common::RegisterField<
2297        1,
2298        0x1,
2299        1,
2300        0,
2301        adads1::Ads17,
2302        adads1::Ads17,
2303        Adads1_SPEC,
2304        crate::common::RW,
2305    > {
2306        crate::common::RegisterField::<
2307            1,
2308            0x1,
2309            1,
2310            0,
2311            adads1::Ads17,
2312            adads1::Ads17,
2313            Adads1_SPEC,
2314            crate::common::RW,
2315        >::from_register(self, 0)
2316    }
2317
2318    #[doc = "A/D-Converted Value Average Channel AN016 Select"]
2319    #[inline(always)]
2320    pub fn ads16(
2321        self,
2322    ) -> crate::common::RegisterField<
2323        0,
2324        0x1,
2325        1,
2326        0,
2327        adads1::Ads16,
2328        adads1::Ads16,
2329        Adads1_SPEC,
2330        crate::common::RW,
2331    > {
2332        crate::common::RegisterField::<
2333            0,
2334            0x1,
2335            1,
2336            0,
2337            adads1::Ads16,
2338            adads1::Ads16,
2339            Adads1_SPEC,
2340            crate::common::RW,
2341        >::from_register(self, 0)
2342    }
2343}
2344impl ::core::default::Default for Adads1 {
2345    #[inline(always)]
2346    fn default() -> Adads1 {
2347        <crate::RegValueT<Adads1_SPEC> as RegisterValue<_>>::new(0)
2348    }
2349}
2350pub mod adads1 {
2351
2352    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2353    pub struct Ads24_SPEC;
2354    pub type Ads24 = crate::EnumBitfieldStruct<u8, Ads24_SPEC>;
2355    impl Ads24 {
2356        #[doc = "AN024 is not selected."]
2357        pub const _0: Self = Self::new(0);
2358
2359        #[doc = "AN024 is selected."]
2360        pub const _1: Self = Self::new(1);
2361    }
2362    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2363    pub struct Ads23_SPEC;
2364    pub type Ads23 = crate::EnumBitfieldStruct<u8, Ads23_SPEC>;
2365    impl Ads23 {
2366        #[doc = "AN023 is not selected."]
2367        pub const _0: Self = Self::new(0);
2368
2369        #[doc = "AN023 is selected."]
2370        pub const _1: Self = Self::new(1);
2371    }
2372    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2373    pub struct Ads22_SPEC;
2374    pub type Ads22 = crate::EnumBitfieldStruct<u8, Ads22_SPEC>;
2375    impl Ads22 {
2376        #[doc = "AN022 is not selected."]
2377        pub const _0: Self = Self::new(0);
2378
2379        #[doc = "AN022 is selected."]
2380        pub const _1: Self = Self::new(1);
2381    }
2382    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2383    pub struct Ads21_SPEC;
2384    pub type Ads21 = crate::EnumBitfieldStruct<u8, Ads21_SPEC>;
2385    impl Ads21 {
2386        #[doc = "AN021 is not selected."]
2387        pub const _0: Self = Self::new(0);
2388
2389        #[doc = "AN021 is selected."]
2390        pub const _1: Self = Self::new(1);
2391    }
2392    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2393    pub struct Ads20_SPEC;
2394    pub type Ads20 = crate::EnumBitfieldStruct<u8, Ads20_SPEC>;
2395    impl Ads20 {
2396        #[doc = "AN020 is not selected."]
2397        pub const _0: Self = Self::new(0);
2398
2399        #[doc = "AN020 is selected."]
2400        pub const _1: Self = Self::new(1);
2401    }
2402    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2403    pub struct Ads19_SPEC;
2404    pub type Ads19 = crate::EnumBitfieldStruct<u8, Ads19_SPEC>;
2405    impl Ads19 {
2406        #[doc = "AN019 is not selected."]
2407        pub const _0: Self = Self::new(0);
2408
2409        #[doc = "AN019 is selected."]
2410        pub const _1: Self = Self::new(1);
2411    }
2412    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2413    pub struct Ads18_SPEC;
2414    pub type Ads18 = crate::EnumBitfieldStruct<u8, Ads18_SPEC>;
2415    impl Ads18 {
2416        #[doc = "AN018 is not selected."]
2417        pub const _0: Self = Self::new(0);
2418
2419        #[doc = "AN018 is selected."]
2420        pub const _1: Self = Self::new(1);
2421    }
2422    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2423    pub struct Ads17_SPEC;
2424    pub type Ads17 = crate::EnumBitfieldStruct<u8, Ads17_SPEC>;
2425    impl Ads17 {
2426        #[doc = "AN017 is not selected."]
2427        pub const _0: Self = Self::new(0);
2428
2429        #[doc = "AN017 is selected."]
2430        pub const _1: Self = Self::new(1);
2431    }
2432    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2433    pub struct Ads16_SPEC;
2434    pub type Ads16 = crate::EnumBitfieldStruct<u8, Ads16_SPEC>;
2435    impl Ads16 {
2436        #[doc = "AN016 is not selected."]
2437        pub const _0: Self = Self::new(0);
2438
2439        #[doc = "AN016 is selected."]
2440        pub const _1: Self = Self::new(1);
2441    }
2442}
2443#[doc(hidden)]
2444#[derive(Copy, Clone, Eq, PartialEq)]
2445pub struct Adadc_SPEC;
2446impl crate::sealed::RegSpec for Adadc_SPEC {
2447    type DataType = u8;
2448}
2449
2450#[doc = "A/D-Converted Value Average Count Select Register"]
2451pub type Adadc = crate::RegValueT<Adadc_SPEC>;
2452
2453impl Adadc {
2454    #[doc = "These bits are read as 00000. The write value should be 00000."]
2455    #[inline(always)]
2456    pub fn reserved(
2457        self,
2458    ) -> crate::common::RegisterField<3, 0x1f, 1, 0, u8, u8, Adadc_SPEC, crate::common::RW> {
2459        crate::common::RegisterField::<3,0x1f,1,0,u8,u8,Adadc_SPEC,crate::common::RW>::from_register(self,0)
2460    }
2461
2462    #[doc = "Count Select"]
2463    #[inline(always)]
2464    pub fn adc(
2465        self,
2466    ) -> crate::common::RegisterField<
2467        0,
2468        0x7,
2469        1,
2470        0,
2471        adadc::Adc,
2472        adadc::Adc,
2473        Adadc_SPEC,
2474        crate::common::RW,
2475    > {
2476        crate::common::RegisterField::<
2477            0,
2478            0x7,
2479            1,
2480            0,
2481            adadc::Adc,
2482            adadc::Adc,
2483            Adadc_SPEC,
2484            crate::common::RW,
2485        >::from_register(self, 0)
2486    }
2487}
2488impl ::core::default::Default for Adadc {
2489    #[inline(always)]
2490    fn default() -> Adadc {
2491        <crate::RegValueT<Adadc_SPEC> as RegisterValue<_>>::new(0)
2492    }
2493}
2494pub mod adadc {
2495
2496    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2497    pub struct Adc_SPEC;
2498    pub type Adc = crate::EnumBitfieldStruct<u8, Adc_SPEC>;
2499    impl Adc {
2500        #[doc = "1-time conversion (same as normal conversion)"]
2501        pub const _000: Self = Self::new(0);
2502
2503        #[doc = "2-time conversion (acquire the average of 2-time conversion)"]
2504        pub const _001: Self = Self::new(1);
2505
2506        #[doc = "4-time conversion (acquire the average of 4-time conversion)"]
2507        pub const _011: Self = Self::new(3);
2508
2509        #[doc = "8-time conversion (acquire the average of 8-time conversion)"]
2510        pub const _100: Self = Self::new(4);
2511
2512        #[doc = "16-time conversion (acquire the average of 16-time conversion)"]
2513        pub const _101: Self = Self::new(5);
2514    }
2515}
2516#[doc(hidden)]
2517#[derive(Copy, Clone, Eq, PartialEq)]
2518pub struct Adcer_SPEC;
2519impl crate::sealed::RegSpec for Adcer_SPEC {
2520    type DataType = u16;
2521}
2522
2523#[doc = "A/D Control Extended Register"]
2524pub type Adcer = crate::RegValueT<Adcer_SPEC>;
2525
2526impl Adcer {
2527    #[doc = "Single-End Input A/D Converted Data Inversion Select"]
2528    #[inline(always)]
2529    pub fn adinv(
2530        self,
2531    ) -> crate::common::RegisterField<
2532        14,
2533        0x1,
2534        1,
2535        0,
2536        adcer::Adinv,
2537        adcer::Adinv,
2538        Adcer_SPEC,
2539        crate::common::RW,
2540    > {
2541        crate::common::RegisterField::<
2542            14,
2543            0x1,
2544            1,
2545            0,
2546            adcer::Adinv,
2547            adcer::Adinv,
2548            Adcer_SPEC,
2549            crate::common::RW,
2550        >::from_register(self, 0)
2551    }
2552
2553    #[doc = "Self-Diagnosis Enable"]
2554    #[inline(always)]
2555    pub fn diagm(
2556        self,
2557    ) -> crate::common::RegisterField<
2558        11,
2559        0x1,
2560        1,
2561        0,
2562        adcer::Diagm,
2563        adcer::Diagm,
2564        Adcer_SPEC,
2565        crate::common::RW,
2566    > {
2567        crate::common::RegisterField::<
2568            11,
2569            0x1,
2570            1,
2571            0,
2572            adcer::Diagm,
2573            adcer::Diagm,
2574            Adcer_SPEC,
2575            crate::common::RW,
2576        >::from_register(self, 0)
2577    }
2578
2579    #[doc = "Self-Diagnosis Mode Select"]
2580    #[inline(always)]
2581    pub fn diagld(
2582        self,
2583    ) -> crate::common::RegisterField<
2584        10,
2585        0x1,
2586        1,
2587        0,
2588        adcer::Diagld,
2589        adcer::Diagld,
2590        Adcer_SPEC,
2591        crate::common::RW,
2592    > {
2593        crate::common::RegisterField::<
2594            10,
2595            0x1,
2596            1,
2597            0,
2598            adcer::Diagld,
2599            adcer::Diagld,
2600            Adcer_SPEC,
2601            crate::common::RW,
2602        >::from_register(self, 0)
2603    }
2604
2605    #[doc = "Self-Diagnosis Conversion Voltage Select"]
2606    #[inline(always)]
2607    pub fn diagval(
2608        self,
2609    ) -> crate::common::RegisterField<
2610        8,
2611        0x3,
2612        1,
2613        0,
2614        adcer::Diagval,
2615        adcer::Diagval,
2616        Adcer_SPEC,
2617        crate::common::RW,
2618    > {
2619        crate::common::RegisterField::<
2620            8,
2621            0x3,
2622            1,
2623            0,
2624            adcer::Diagval,
2625            adcer::Diagval,
2626            Adcer_SPEC,
2627            crate::common::RW,
2628        >::from_register(self, 0)
2629    }
2630
2631    #[doc = "A/D Data Register Automatic Clearing Enable"]
2632    #[inline(always)]
2633    pub fn ace(
2634        self,
2635    ) -> crate::common::RegisterField<
2636        5,
2637        0x1,
2638        1,
2639        0,
2640        adcer::Ace,
2641        adcer::Ace,
2642        Adcer_SPEC,
2643        crate::common::RW,
2644    > {
2645        crate::common::RegisterField::<
2646            5,
2647            0x1,
2648            1,
2649            0,
2650            adcer::Ace,
2651            adcer::Ace,
2652            Adcer_SPEC,
2653            crate::common::RW,
2654        >::from_register(self, 0)
2655    }
2656
2657    #[doc = "These bits are read as 00000. The write value should be 00000."]
2658    #[inline(always)]
2659    pub fn reserved(
2660        self,
2661    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, Adcer_SPEC, crate::common::RW> {
2662        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,Adcer_SPEC,crate::common::RW>::from_register(self,0)
2663    }
2664}
2665impl ::core::default::Default for Adcer {
2666    #[inline(always)]
2667    fn default() -> Adcer {
2668        <crate::RegValueT<Adcer_SPEC> as RegisterValue<_>>::new(0)
2669    }
2670}
2671pub mod adcer {
2672
2673    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2674    pub struct Adinv_SPEC;
2675    pub type Adinv = crate::EnumBitfieldStruct<u8, Adinv_SPEC>;
2676    impl Adinv {
2677        #[doc = "Data is stored in a range of -32768 to 0"]
2678        pub const _0: Self = Self::new(0);
2679
2680        #[doc = "Data is stored in a range of 0 to 32767"]
2681        pub const _1: Self = Self::new(1);
2682    }
2683    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2684    pub struct Diagm_SPEC;
2685    pub type Diagm = crate::EnumBitfieldStruct<u8, Diagm_SPEC>;
2686    impl Diagm {
2687        #[doc = "Self-diagnosis of ADC16 disabled"]
2688        pub const _0: Self = Self::new(0);
2689
2690        #[doc = "Self-diagnosis of ADC16 enabled."]
2691        pub const _1: Self = Self::new(1);
2692    }
2693    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2694    pub struct Diagld_SPEC;
2695    pub type Diagld = crate::EnumBitfieldStruct<u8, Diagld_SPEC>;
2696    impl Diagld {
2697        #[doc = "Rotation mode for self-diagnosis voltage"]
2698        pub const _0: Self = Self::new(0);
2699
2700        #[doc = "Fixed mode for self-diagnosis voltage"]
2701        pub const _1: Self = Self::new(1);
2702    }
2703    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2704    pub struct Diagval_SPEC;
2705    pub type Diagval = crate::EnumBitfieldStruct<u8, Diagval_SPEC>;
2706    impl Diagval {
2707        #[doc = "Setting prohibited when self-diagnosis is enabled"]
2708        pub const _00: Self = Self::new(0);
2709
2710        #[doc = "-VREFH0 (Ideal value of A/D conversion result is 8000h)"]
2711        pub const _01: Self = Self::new(1);
2712
2713        #[doc = "VREFL0 (Ideal value of A/D conversion result is 0000h)"]
2714        pub const _10: Self = Self::new(2);
2715
2716        #[doc = "VREFH0 (Ideal value of A/D conversion result is 7FFFh)."]
2717        pub const _11: Self = Self::new(3);
2718    }
2719    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2720    pub struct Ace_SPEC;
2721    pub type Ace = crate::EnumBitfieldStruct<u8, Ace_SPEC>;
2722    impl Ace {
2723        #[doc = "Automatic clearing disabled"]
2724        pub const _0: Self = Self::new(0);
2725
2726        #[doc = "Automatic clearing enabled."]
2727        pub const _1: Self = Self::new(1);
2728    }
2729}
2730#[doc(hidden)]
2731#[derive(Copy, Clone, Eq, PartialEq)]
2732pub struct Adstrgr_SPEC;
2733impl crate::sealed::RegSpec for Adstrgr_SPEC {
2734    type DataType = u16;
2735}
2736
2737#[doc = "A/D Conversion Start Trigger Select Register"]
2738pub type Adstrgr = crate::RegValueT<Adstrgr_SPEC>;
2739
2740impl Adstrgr {
2741    #[doc = "A/D Conversion Start Trigger SelectSelect the A/D conversion start trigger in single scan mode and continuous mode. In group scan mode, the A/D conversion start trigger for group A is selected."]
2742    #[inline(always)]
2743    pub fn trsa(
2744        self,
2745    ) -> crate::common::RegisterField<8, 0x3f, 1, 0, u8, u8, Adstrgr_SPEC, crate::common::RW> {
2746        crate::common::RegisterField::<8,0x3f,1,0,u8,u8,Adstrgr_SPEC,crate::common::RW>::from_register(self,0)
2747    }
2748
2749    #[doc = "These bits are read as 00. The write value should be 00."]
2750    #[inline(always)]
2751    pub fn reserved(
2752        self,
2753    ) -> crate::common::RegisterField<6, 0x3, 1, 0, u8, u8, Adstrgr_SPEC, crate::common::RW> {
2754        crate::common::RegisterField::<6,0x3,1,0,u8,u8,Adstrgr_SPEC,crate::common::RW>::from_register(self,0)
2755    }
2756
2757    #[doc = "A/D Conversion Start Trigger Select for Group BSelect the A/D conversion start trigger for group B in group scan mode."]
2758    #[inline(always)]
2759    pub fn trsb(
2760        self,
2761    ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, Adstrgr_SPEC, crate::common::RW> {
2762        crate::common::RegisterField::<0,0x3f,1,0,u8,u8,Adstrgr_SPEC,crate::common::RW>::from_register(self,0)
2763    }
2764}
2765impl ::core::default::Default for Adstrgr {
2766    #[inline(always)]
2767    fn default() -> Adstrgr {
2768        <crate::RegValueT<Adstrgr_SPEC> as RegisterValue<_>>::new(0)
2769    }
2770}
2771
2772#[doc(hidden)]
2773#[derive(Copy, Clone, Eq, PartialEq)]
2774pub struct Adexicr_SPEC;
2775impl crate::sealed::RegSpec for Adexicr_SPEC {
2776    type DataType = u16;
2777}
2778
2779#[doc = "A/D Conversion Extended Input Control Register"]
2780pub type Adexicr = crate::RegValueT<Adexicr_SPEC>;
2781
2782impl Adexicr {
2783    #[doc = "Internal Reference Voltage A/D Conversion Select"]
2784    #[inline(always)]
2785    pub fn ocsa(
2786        self,
2787    ) -> crate::common::RegisterField<
2788        9,
2789        0x1,
2790        1,
2791        0,
2792        adexicr::Ocsa,
2793        adexicr::Ocsa,
2794        Adexicr_SPEC,
2795        crate::common::RW,
2796    > {
2797        crate::common::RegisterField::<
2798            9,
2799            0x1,
2800            1,
2801            0,
2802            adexicr::Ocsa,
2803            adexicr::Ocsa,
2804            Adexicr_SPEC,
2805            crate::common::RW,
2806        >::from_register(self, 0)
2807    }
2808
2809    #[doc = "Temperature Sensor Output A/D Conversion Select"]
2810    #[inline(always)]
2811    pub fn tssa(
2812        self,
2813    ) -> crate::common::RegisterField<
2814        8,
2815        0x1,
2816        1,
2817        0,
2818        adexicr::Tssa,
2819        adexicr::Tssa,
2820        Adexicr_SPEC,
2821        crate::common::RW,
2822    > {
2823        crate::common::RegisterField::<
2824            8,
2825            0x1,
2826            1,
2827            0,
2828            adexicr::Tssa,
2829            adexicr::Tssa,
2830            Adexicr_SPEC,
2831            crate::common::RW,
2832        >::from_register(self, 0)
2833    }
2834
2835    #[doc = "These bits are read as 000000. The write value should be 000000."]
2836    #[inline(always)]
2837    pub fn reserved(
2838        self,
2839    ) -> crate::common::RegisterField<2, 0x3f, 1, 0, u8, u8, Adexicr_SPEC, crate::common::RW> {
2840        crate::common::RegisterField::<2,0x3f,1,0,u8,u8,Adexicr_SPEC,crate::common::RW>::from_register(self,0)
2841    }
2842
2843    #[doc = "Internal Reference Voltage A/D converted Value Average Mode Select"]
2844    #[inline(always)]
2845    pub fn ocsad(
2846        self,
2847    ) -> crate::common::RegisterField<
2848        1,
2849        0x1,
2850        1,
2851        0,
2852        adexicr::Ocsad,
2853        adexicr::Ocsad,
2854        Adexicr_SPEC,
2855        crate::common::RW,
2856    > {
2857        crate::common::RegisterField::<
2858            1,
2859            0x1,
2860            1,
2861            0,
2862            adexicr::Ocsad,
2863            adexicr::Ocsad,
2864            Adexicr_SPEC,
2865            crate::common::RW,
2866        >::from_register(self, 0)
2867    }
2868
2869    #[doc = "Temperature Sensor Output A/D converted Value Average Mode Select"]
2870    #[inline(always)]
2871    pub fn tssad(
2872        self,
2873    ) -> crate::common::RegisterField<
2874        0,
2875        0x1,
2876        1,
2877        0,
2878        adexicr::Tssad,
2879        adexicr::Tssad,
2880        Adexicr_SPEC,
2881        crate::common::RW,
2882    > {
2883        crate::common::RegisterField::<
2884            0,
2885            0x1,
2886            1,
2887            0,
2888            adexicr::Tssad,
2889            adexicr::Tssad,
2890            Adexicr_SPEC,
2891            crate::common::RW,
2892        >::from_register(self, 0)
2893    }
2894}
2895impl ::core::default::Default for Adexicr {
2896    #[inline(always)]
2897    fn default() -> Adexicr {
2898        <crate::RegValueT<Adexicr_SPEC> as RegisterValue<_>>::new(0)
2899    }
2900}
2901pub mod adexicr {
2902
2903    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2904    pub struct Ocsa_SPEC;
2905    pub type Ocsa = crate::EnumBitfieldStruct<u8, Ocsa_SPEC>;
2906    impl Ocsa {
2907        #[doc = "A/D conversion of internal reference voltage disabled"]
2908        pub const _0: Self = Self::new(0);
2909
2910        #[doc = "A/D conversion of internal reference voltage enabled"]
2911        pub const _1: Self = Self::new(1);
2912    }
2913    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2914    pub struct Tssa_SPEC;
2915    pub type Tssa = crate::EnumBitfieldStruct<u8, Tssa_SPEC>;
2916    impl Tssa {
2917        #[doc = "A/D conversion of temperature sensor output disabled"]
2918        pub const _0: Self = Self::new(0);
2919
2920        #[doc = "A/D conversion of temperature sensor output enabled"]
2921        pub const _1: Self = Self::new(1);
2922    }
2923    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2924    pub struct Ocsad_SPEC;
2925    pub type Ocsad = crate::EnumBitfieldStruct<u8, Ocsad_SPEC>;
2926    impl Ocsad {
2927        #[doc = "Internal reference voltage A/D-converted value average mode not selected"]
2928        pub const _0: Self = Self::new(0);
2929
2930        #[doc = "Internal reference voltage A/D-converted value average mode selected"]
2931        pub const _1: Self = Self::new(1);
2932    }
2933    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2934    pub struct Tssad_SPEC;
2935    pub type Tssad = crate::EnumBitfieldStruct<u8, Tssad_SPEC>;
2936    impl Tssad {
2937        #[doc = "Temperature sensor output A/D-converted value average mode not selected"]
2938        pub const _0: Self = Self::new(0);
2939
2940        #[doc = "Temperature sensor output A/D-converted value average mode selected"]
2941        pub const _1: Self = Self::new(1);
2942    }
2943}
2944#[doc(hidden)]
2945#[derive(Copy, Clone, Eq, PartialEq)]
2946pub struct Adansb0_SPEC;
2947impl crate::sealed::RegSpec for Adansb0_SPEC {
2948    type DataType = u16;
2949}
2950
2951#[doc = "A/D Channel Select Register B0"]
2952pub type Adansb0 = crate::RegValueT<Adansb0_SPEC>;
2953
2954impl Adansb0 {
2955    #[doc = "These bits are read as 0000000. The write value should be 0000000."]
2956    #[inline(always)]
2957    pub fn reserved(
2958        self,
2959    ) -> crate::common::RegisterField<9, 0x7f, 1, 0, u8, u8, Adansb0_SPEC, crate::common::RW> {
2960        crate::common::RegisterField::<9,0x7f,1,0,u8,u8,Adansb0_SPEC,crate::common::RW>::from_register(self,0)
2961    }
2962
2963    #[doc = "AN008 Select"]
2964    #[inline(always)]
2965    pub fn ansb08(
2966        self,
2967    ) -> crate::common::RegisterField<
2968        8,
2969        0x1,
2970        1,
2971        0,
2972        adansb0::Ansb08,
2973        adansb0::Ansb08,
2974        Adansb0_SPEC,
2975        crate::common::RW,
2976    > {
2977        crate::common::RegisterField::<
2978            8,
2979            0x1,
2980            1,
2981            0,
2982            adansb0::Ansb08,
2983            adansb0::Ansb08,
2984            Adansb0_SPEC,
2985            crate::common::RW,
2986        >::from_register(self, 0)
2987    }
2988
2989    #[doc = "AN007 Select"]
2990    #[inline(always)]
2991    pub fn ansb07(
2992        self,
2993    ) -> crate::common::RegisterField<
2994        7,
2995        0x1,
2996        1,
2997        0,
2998        adansb0::Ansb07,
2999        adansb0::Ansb07,
3000        Adansb0_SPEC,
3001        crate::common::RW,
3002    > {
3003        crate::common::RegisterField::<
3004            7,
3005            0x1,
3006            1,
3007            0,
3008            adansb0::Ansb07,
3009            adansb0::Ansb07,
3010            Adansb0_SPEC,
3011            crate::common::RW,
3012        >::from_register(self, 0)
3013    }
3014
3015    #[doc = "AN006 Select"]
3016    #[inline(always)]
3017    pub fn ansb06(
3018        self,
3019    ) -> crate::common::RegisterField<
3020        6,
3021        0x1,
3022        1,
3023        0,
3024        adansb0::Ansb06,
3025        adansb0::Ansb06,
3026        Adansb0_SPEC,
3027        crate::common::RW,
3028    > {
3029        crate::common::RegisterField::<
3030            6,
3031            0x1,
3032            1,
3033            0,
3034            adansb0::Ansb06,
3035            adansb0::Ansb06,
3036            Adansb0_SPEC,
3037            crate::common::RW,
3038        >::from_register(self, 0)
3039    }
3040
3041    #[doc = "AN005 Select"]
3042    #[inline(always)]
3043    pub fn ansb05(
3044        self,
3045    ) -> crate::common::RegisterField<
3046        5,
3047        0x1,
3048        1,
3049        0,
3050        adansb0::Ansb05,
3051        adansb0::Ansb05,
3052        Adansb0_SPEC,
3053        crate::common::RW,
3054    > {
3055        crate::common::RegisterField::<
3056            5,
3057            0x1,
3058            1,
3059            0,
3060            adansb0::Ansb05,
3061            adansb0::Ansb05,
3062            Adansb0_SPEC,
3063            crate::common::RW,
3064        >::from_register(self, 0)
3065    }
3066
3067    #[doc = "AN004 Select"]
3068    #[inline(always)]
3069    pub fn ansb04(
3070        self,
3071    ) -> crate::common::RegisterField<
3072        4,
3073        0x1,
3074        1,
3075        0,
3076        adansb0::Ansb04,
3077        adansb0::Ansb04,
3078        Adansb0_SPEC,
3079        crate::common::RW,
3080    > {
3081        crate::common::RegisterField::<
3082            4,
3083            0x1,
3084            1,
3085            0,
3086            adansb0::Ansb04,
3087            adansb0::Ansb04,
3088            Adansb0_SPEC,
3089            crate::common::RW,
3090        >::from_register(self, 0)
3091    }
3092
3093    #[doc = "AN003 Select"]
3094    #[inline(always)]
3095    pub fn ansb03(
3096        self,
3097    ) -> crate::common::RegisterField<
3098        3,
3099        0x1,
3100        1,
3101        0,
3102        adansb0::Ansb03,
3103        adansb0::Ansb03,
3104        Adansb0_SPEC,
3105        crate::common::RW,
3106    > {
3107        crate::common::RegisterField::<
3108            3,
3109            0x1,
3110            1,
3111            0,
3112            adansb0::Ansb03,
3113            adansb0::Ansb03,
3114            Adansb0_SPEC,
3115            crate::common::RW,
3116        >::from_register(self, 0)
3117    }
3118
3119    #[doc = "AN002 Select"]
3120    #[inline(always)]
3121    pub fn ansb02(
3122        self,
3123    ) -> crate::common::RegisterField<
3124        2,
3125        0x1,
3126        1,
3127        0,
3128        adansb0::Ansb02,
3129        adansb0::Ansb02,
3130        Adansb0_SPEC,
3131        crate::common::RW,
3132    > {
3133        crate::common::RegisterField::<
3134            2,
3135            0x1,
3136            1,
3137            0,
3138            adansb0::Ansb02,
3139            adansb0::Ansb02,
3140            Adansb0_SPEC,
3141            crate::common::RW,
3142        >::from_register(self, 0)
3143    }
3144
3145    #[doc = "AN001 Select"]
3146    #[inline(always)]
3147    pub fn ansb01(
3148        self,
3149    ) -> crate::common::RegisterField<
3150        1,
3151        0x1,
3152        1,
3153        0,
3154        adansb0::Ansb01,
3155        adansb0::Ansb01,
3156        Adansb0_SPEC,
3157        crate::common::RW,
3158    > {
3159        crate::common::RegisterField::<
3160            1,
3161            0x1,
3162            1,
3163            0,
3164            adansb0::Ansb01,
3165            adansb0::Ansb01,
3166            Adansb0_SPEC,
3167            crate::common::RW,
3168        >::from_register(self, 0)
3169    }
3170
3171    #[doc = "AN000 Select"]
3172    #[inline(always)]
3173    pub fn ansb00(
3174        self,
3175    ) -> crate::common::RegisterField<
3176        0,
3177        0x1,
3178        1,
3179        0,
3180        adansb0::Ansb00,
3181        adansb0::Ansb00,
3182        Adansb0_SPEC,
3183        crate::common::RW,
3184    > {
3185        crate::common::RegisterField::<
3186            0,
3187            0x1,
3188            1,
3189            0,
3190            adansb0::Ansb00,
3191            adansb0::Ansb00,
3192            Adansb0_SPEC,
3193            crate::common::RW,
3194        >::from_register(self, 0)
3195    }
3196}
3197impl ::core::default::Default for Adansb0 {
3198    #[inline(always)]
3199    fn default() -> Adansb0 {
3200        <crate::RegValueT<Adansb0_SPEC> as RegisterValue<_>>::new(0)
3201    }
3202}
3203pub mod adansb0 {
3204
3205    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3206    pub struct Ansb08_SPEC;
3207    pub type Ansb08 = crate::EnumBitfieldStruct<u8, Ansb08_SPEC>;
3208    impl Ansb08 {
3209        #[doc = "AN008 is not selected"]
3210        pub const _0: Self = Self::new(0);
3211
3212        #[doc = "AN008 is selected"]
3213        pub const _1: Self = Self::new(1);
3214    }
3215    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3216    pub struct Ansb07_SPEC;
3217    pub type Ansb07 = crate::EnumBitfieldStruct<u8, Ansb07_SPEC>;
3218    impl Ansb07 {
3219        #[doc = "AN007 is not selected"]
3220        pub const _0: Self = Self::new(0);
3221
3222        #[doc = "AN007 is selected"]
3223        pub const _1: Self = Self::new(1);
3224    }
3225    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3226    pub struct Ansb06_SPEC;
3227    pub type Ansb06 = crate::EnumBitfieldStruct<u8, Ansb06_SPEC>;
3228    impl Ansb06 {
3229        #[doc = "AN006 is not selected"]
3230        pub const _0: Self = Self::new(0);
3231
3232        #[doc = "AN006 is selected"]
3233        pub const _1: Self = Self::new(1);
3234    }
3235    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3236    pub struct Ansb05_SPEC;
3237    pub type Ansb05 = crate::EnumBitfieldStruct<u8, Ansb05_SPEC>;
3238    impl Ansb05 {
3239        #[doc = "AN005 is not selected"]
3240        pub const _0: Self = Self::new(0);
3241
3242        #[doc = "AN005 is selected"]
3243        pub const _1: Self = Self::new(1);
3244    }
3245    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3246    pub struct Ansb04_SPEC;
3247    pub type Ansb04 = crate::EnumBitfieldStruct<u8, Ansb04_SPEC>;
3248    impl Ansb04 {
3249        #[doc = "AN004 is not selected"]
3250        pub const _0: Self = Self::new(0);
3251
3252        #[doc = "AN004 is selected"]
3253        pub const _1: Self = Self::new(1);
3254    }
3255    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3256    pub struct Ansb03_SPEC;
3257    pub type Ansb03 = crate::EnumBitfieldStruct<u8, Ansb03_SPEC>;
3258    impl Ansb03 {
3259        #[doc = "AN003 is not selected"]
3260        pub const _0: Self = Self::new(0);
3261
3262        #[doc = "AN003 is selected"]
3263        pub const _1: Self = Self::new(1);
3264    }
3265    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3266    pub struct Ansb02_SPEC;
3267    pub type Ansb02 = crate::EnumBitfieldStruct<u8, Ansb02_SPEC>;
3268    impl Ansb02 {
3269        #[doc = "AN002 is not selected"]
3270        pub const _0: Self = Self::new(0);
3271
3272        #[doc = "AN002 is selected"]
3273        pub const _1: Self = Self::new(1);
3274    }
3275    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3276    pub struct Ansb01_SPEC;
3277    pub type Ansb01 = crate::EnumBitfieldStruct<u8, Ansb01_SPEC>;
3278    impl Ansb01 {
3279        #[doc = "AN001 is not selected"]
3280        pub const _0: Self = Self::new(0);
3281
3282        #[doc = "AN001 is selected"]
3283        pub const _1: Self = Self::new(1);
3284    }
3285    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3286    pub struct Ansb00_SPEC;
3287    pub type Ansb00 = crate::EnumBitfieldStruct<u8, Ansb00_SPEC>;
3288    impl Ansb00 {
3289        #[doc = "AN000 is not selected"]
3290        pub const _0: Self = Self::new(0);
3291
3292        #[doc = "AN000 is selected"]
3293        pub const _1: Self = Self::new(1);
3294    }
3295}
3296#[doc(hidden)]
3297#[derive(Copy, Clone, Eq, PartialEq)]
3298pub struct Adansb1_SPEC;
3299impl crate::sealed::RegSpec for Adansb1_SPEC {
3300    type DataType = u16;
3301}
3302
3303#[doc = "A/D Channel Select Register B1"]
3304pub type Adansb1 = crate::RegValueT<Adansb1_SPEC>;
3305
3306impl Adansb1 {
3307    #[doc = "These bits are read as 0000000. The write value should be 0000000."]
3308    #[inline(always)]
3309    pub fn reserved(
3310        self,
3311    ) -> crate::common::RegisterField<9, 0x7f, 1, 0, u8, u8, Adansb1_SPEC, crate::common::RW> {
3312        crate::common::RegisterField::<9,0x7f,1,0,u8,u8,Adansb1_SPEC,crate::common::RW>::from_register(self,0)
3313    }
3314
3315    #[doc = "AN024 Select"]
3316    #[inline(always)]
3317    pub fn ansb24(
3318        self,
3319    ) -> crate::common::RegisterField<
3320        8,
3321        0x1,
3322        1,
3323        0,
3324        adansb1::Ansb24,
3325        adansb1::Ansb24,
3326        Adansb1_SPEC,
3327        crate::common::RW,
3328    > {
3329        crate::common::RegisterField::<
3330            8,
3331            0x1,
3332            1,
3333            0,
3334            adansb1::Ansb24,
3335            adansb1::Ansb24,
3336            Adansb1_SPEC,
3337            crate::common::RW,
3338        >::from_register(self, 0)
3339    }
3340
3341    #[doc = "AN023 Select"]
3342    #[inline(always)]
3343    pub fn ansb23(
3344        self,
3345    ) -> crate::common::RegisterField<
3346        7,
3347        0x1,
3348        1,
3349        0,
3350        adansb1::Ansb23,
3351        adansb1::Ansb23,
3352        Adansb1_SPEC,
3353        crate::common::RW,
3354    > {
3355        crate::common::RegisterField::<
3356            7,
3357            0x1,
3358            1,
3359            0,
3360            adansb1::Ansb23,
3361            adansb1::Ansb23,
3362            Adansb1_SPEC,
3363            crate::common::RW,
3364        >::from_register(self, 0)
3365    }
3366
3367    #[doc = "AN022 Select"]
3368    #[inline(always)]
3369    pub fn ansb22(
3370        self,
3371    ) -> crate::common::RegisterField<
3372        6,
3373        0x1,
3374        1,
3375        0,
3376        adansb1::Ansb22,
3377        adansb1::Ansb22,
3378        Adansb1_SPEC,
3379        crate::common::RW,
3380    > {
3381        crate::common::RegisterField::<
3382            6,
3383            0x1,
3384            1,
3385            0,
3386            adansb1::Ansb22,
3387            adansb1::Ansb22,
3388            Adansb1_SPEC,
3389            crate::common::RW,
3390        >::from_register(self, 0)
3391    }
3392
3393    #[doc = "AN021 Select"]
3394    #[inline(always)]
3395    pub fn ansb21(
3396        self,
3397    ) -> crate::common::RegisterField<
3398        5,
3399        0x1,
3400        1,
3401        0,
3402        adansb1::Ansb21,
3403        adansb1::Ansb21,
3404        Adansb1_SPEC,
3405        crate::common::RW,
3406    > {
3407        crate::common::RegisterField::<
3408            5,
3409            0x1,
3410            1,
3411            0,
3412            adansb1::Ansb21,
3413            adansb1::Ansb21,
3414            Adansb1_SPEC,
3415            crate::common::RW,
3416        >::from_register(self, 0)
3417    }
3418
3419    #[doc = "AN020 Select"]
3420    #[inline(always)]
3421    pub fn ansb20(
3422        self,
3423    ) -> crate::common::RegisterField<
3424        4,
3425        0x1,
3426        1,
3427        0,
3428        adansb1::Ansb20,
3429        adansb1::Ansb20,
3430        Adansb1_SPEC,
3431        crate::common::RW,
3432    > {
3433        crate::common::RegisterField::<
3434            4,
3435            0x1,
3436            1,
3437            0,
3438            adansb1::Ansb20,
3439            adansb1::Ansb20,
3440            Adansb1_SPEC,
3441            crate::common::RW,
3442        >::from_register(self, 0)
3443    }
3444
3445    #[doc = "AN019 Select"]
3446    #[inline(always)]
3447    pub fn ansb19(
3448        self,
3449    ) -> crate::common::RegisterField<
3450        3,
3451        0x1,
3452        1,
3453        0,
3454        adansb1::Ansb19,
3455        adansb1::Ansb19,
3456        Adansb1_SPEC,
3457        crate::common::RW,
3458    > {
3459        crate::common::RegisterField::<
3460            3,
3461            0x1,
3462            1,
3463            0,
3464            adansb1::Ansb19,
3465            adansb1::Ansb19,
3466            Adansb1_SPEC,
3467            crate::common::RW,
3468        >::from_register(self, 0)
3469    }
3470
3471    #[doc = "AN018 Select"]
3472    #[inline(always)]
3473    pub fn ansb18(
3474        self,
3475    ) -> crate::common::RegisterField<
3476        2,
3477        0x1,
3478        1,
3479        0,
3480        adansb1::Ansb18,
3481        adansb1::Ansb18,
3482        Adansb1_SPEC,
3483        crate::common::RW,
3484    > {
3485        crate::common::RegisterField::<
3486            2,
3487            0x1,
3488            1,
3489            0,
3490            adansb1::Ansb18,
3491            adansb1::Ansb18,
3492            Adansb1_SPEC,
3493            crate::common::RW,
3494        >::from_register(self, 0)
3495    }
3496
3497    #[doc = "AN017 Select"]
3498    #[inline(always)]
3499    pub fn ansb17(
3500        self,
3501    ) -> crate::common::RegisterField<
3502        1,
3503        0x1,
3504        1,
3505        0,
3506        adansb1::Ansb17,
3507        adansb1::Ansb17,
3508        Adansb1_SPEC,
3509        crate::common::RW,
3510    > {
3511        crate::common::RegisterField::<
3512            1,
3513            0x1,
3514            1,
3515            0,
3516            adansb1::Ansb17,
3517            adansb1::Ansb17,
3518            Adansb1_SPEC,
3519            crate::common::RW,
3520        >::from_register(self, 0)
3521    }
3522
3523    #[doc = "AN016 Select"]
3524    #[inline(always)]
3525    pub fn ansb16(
3526        self,
3527    ) -> crate::common::RegisterField<
3528        0,
3529        0x1,
3530        1,
3531        0,
3532        adansb1::Ansb16,
3533        adansb1::Ansb16,
3534        Adansb1_SPEC,
3535        crate::common::RW,
3536    > {
3537        crate::common::RegisterField::<
3538            0,
3539            0x1,
3540            1,
3541            0,
3542            adansb1::Ansb16,
3543            adansb1::Ansb16,
3544            Adansb1_SPEC,
3545            crate::common::RW,
3546        >::from_register(self, 0)
3547    }
3548}
3549impl ::core::default::Default for Adansb1 {
3550    #[inline(always)]
3551    fn default() -> Adansb1 {
3552        <crate::RegValueT<Adansb1_SPEC> as RegisterValue<_>>::new(0)
3553    }
3554}
3555pub mod adansb1 {
3556
3557    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3558    pub struct Ansb24_SPEC;
3559    pub type Ansb24 = crate::EnumBitfieldStruct<u8, Ansb24_SPEC>;
3560    impl Ansb24 {
3561        #[doc = "AN024 is not selected"]
3562        pub const _0: Self = Self::new(0);
3563
3564        #[doc = "AN024 is selected"]
3565        pub const _1: Self = Self::new(1);
3566    }
3567    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3568    pub struct Ansb23_SPEC;
3569    pub type Ansb23 = crate::EnumBitfieldStruct<u8, Ansb23_SPEC>;
3570    impl Ansb23 {
3571        #[doc = "AN023 is not selected"]
3572        pub const _0: Self = Self::new(0);
3573
3574        #[doc = "AN023 is selected"]
3575        pub const _1: Self = Self::new(1);
3576    }
3577    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3578    pub struct Ansb22_SPEC;
3579    pub type Ansb22 = crate::EnumBitfieldStruct<u8, Ansb22_SPEC>;
3580    impl Ansb22 {
3581        #[doc = "AN022 is not selected"]
3582        pub const _0: Self = Self::new(0);
3583
3584        #[doc = "AN022 is selected"]
3585        pub const _1: Self = Self::new(1);
3586    }
3587    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3588    pub struct Ansb21_SPEC;
3589    pub type Ansb21 = crate::EnumBitfieldStruct<u8, Ansb21_SPEC>;
3590    impl Ansb21 {
3591        #[doc = "AN021 is not selected"]
3592        pub const _0: Self = Self::new(0);
3593
3594        #[doc = "AN021 is selected"]
3595        pub const _1: Self = Self::new(1);
3596    }
3597    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3598    pub struct Ansb20_SPEC;
3599    pub type Ansb20 = crate::EnumBitfieldStruct<u8, Ansb20_SPEC>;
3600    impl Ansb20 {
3601        #[doc = "AN020 is not selected"]
3602        pub const _0: Self = Self::new(0);
3603
3604        #[doc = "AN020 is selected"]
3605        pub const _1: Self = Self::new(1);
3606    }
3607    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3608    pub struct Ansb19_SPEC;
3609    pub type Ansb19 = crate::EnumBitfieldStruct<u8, Ansb19_SPEC>;
3610    impl Ansb19 {
3611        #[doc = "AN019 is not selected"]
3612        pub const _0: Self = Self::new(0);
3613
3614        #[doc = "AN019 is selected"]
3615        pub const _1: Self = Self::new(1);
3616    }
3617    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3618    pub struct Ansb18_SPEC;
3619    pub type Ansb18 = crate::EnumBitfieldStruct<u8, Ansb18_SPEC>;
3620    impl Ansb18 {
3621        #[doc = "AN018 is not selected"]
3622        pub const _0: Self = Self::new(0);
3623
3624        #[doc = "AN018 is selected"]
3625        pub const _1: Self = Self::new(1);
3626    }
3627    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3628    pub struct Ansb17_SPEC;
3629    pub type Ansb17 = crate::EnumBitfieldStruct<u8, Ansb17_SPEC>;
3630    impl Ansb17 {
3631        #[doc = "AN017 is not selected"]
3632        pub const _0: Self = Self::new(0);
3633
3634        #[doc = "AN017 is selected"]
3635        pub const _1: Self = Self::new(1);
3636    }
3637    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3638    pub struct Ansb16_SPEC;
3639    pub type Ansb16 = crate::EnumBitfieldStruct<u8, Ansb16_SPEC>;
3640    impl Ansb16 {
3641        #[doc = "AN016 is not selected"]
3642        pub const _0: Self = Self::new(0);
3643
3644        #[doc = "AN016 is selected"]
3645        pub const _1: Self = Self::new(1);
3646    }
3647}
3648#[doc(hidden)]
3649#[derive(Copy, Clone, Eq, PartialEq)]
3650pub struct Addbldr_SPEC;
3651impl crate::sealed::RegSpec for Addbldr_SPEC {
3652    type DataType = u16;
3653}
3654
3655#[doc = "A/D Data Duplexing Register"]
3656pub type Addbldr = crate::RegValueT<Addbldr_SPEC>;
3657
3658impl Addbldr {
3659    #[doc = "This is a 16-bit read-only register for storing the result of A/D conversion in response to the second trigger in double trigger mode."]
3660    #[inline(always)]
3661    pub fn addbldr(
3662        self,
3663    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Addbldr_SPEC, crate::common::R>
3664    {
3665        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Addbldr_SPEC,crate::common::R>::from_register(self,0)
3666    }
3667}
3668impl ::core::default::Default for Addbldr {
3669    #[inline(always)]
3670    fn default() -> Addbldr {
3671        <crate::RegValueT<Addbldr_SPEC> as RegisterValue<_>>::new(0)
3672    }
3673}
3674
3675#[doc(hidden)]
3676#[derive(Copy, Clone, Eq, PartialEq)]
3677pub struct Adtsdr_SPEC;
3678impl crate::sealed::RegSpec for Adtsdr_SPEC {
3679    type DataType = u16;
3680}
3681
3682#[doc = "A/D Temperature Sensor Data Register"]
3683pub type Adtsdr = crate::RegValueT<Adtsdr_SPEC>;
3684
3685impl Adtsdr {
3686    #[doc = "This is a 16-bit read-only register for storing the A/D conversion result of temperature sensor output."]
3687    #[inline(always)]
3688    pub fn adtsdr(
3689        self,
3690    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Adtsdr_SPEC, crate::common::R>
3691    {
3692        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Adtsdr_SPEC,crate::common::R>::from_register(self,0)
3693    }
3694}
3695impl ::core::default::Default for Adtsdr {
3696    #[inline(always)]
3697    fn default() -> Adtsdr {
3698        <crate::RegValueT<Adtsdr_SPEC> as RegisterValue<_>>::new(0)
3699    }
3700}
3701
3702#[doc(hidden)]
3703#[derive(Copy, Clone, Eq, PartialEq)]
3704pub struct Adocdr_SPEC;
3705impl crate::sealed::RegSpec for Adocdr_SPEC {
3706    type DataType = u16;
3707}
3708
3709#[doc = "A/D Internal Reference Voltage Data Register"]
3710pub type Adocdr = crate::RegValueT<Adocdr_SPEC>;
3711
3712impl Adocdr {
3713    #[doc = "This is a 16-bit read-only register for storing the A/D result of internal reference voltage."]
3714    #[inline(always)]
3715    pub fn adocdr(
3716        self,
3717    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Adocdr_SPEC, crate::common::R>
3718    {
3719        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Adocdr_SPEC,crate::common::R>::from_register(self,0)
3720    }
3721}
3722impl ::core::default::Default for Adocdr {
3723    #[inline(always)]
3724    fn default() -> Adocdr {
3725        <crate::RegValueT<Adocdr_SPEC> as RegisterValue<_>>::new(0)
3726    }
3727}
3728
3729#[doc(hidden)]
3730#[derive(Copy, Clone, Eq, PartialEq)]
3731pub struct Addr_SPEC;
3732impl crate::sealed::RegSpec for Addr_SPEC {
3733    type DataType = u16;
3734}
3735
3736#[doc = "A/D Data Register %s"]
3737pub type Addr = crate::RegValueT<Addr_SPEC>;
3738
3739impl Addr {
3740    #[doc = "The ADDR register is a 16-bit read-only registers for storing the result of A/D conversion."]
3741    #[inline(always)]
3742    pub fn addr(
3743        self,
3744    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Addr_SPEC, crate::common::R> {
3745        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Addr_SPEC,crate::common::R>::from_register(self,0)
3746    }
3747}
3748impl ::core::default::Default for Addr {
3749    #[inline(always)]
3750    fn default() -> Addr {
3751        <crate::RegValueT<Addr_SPEC> as RegisterValue<_>>::new(0)
3752    }
3753}
3754
3755#[doc(hidden)]
3756#[derive(Copy, Clone, Eq, PartialEq)]
3757pub struct Addiscr_SPEC;
3758impl crate::sealed::RegSpec for Addiscr_SPEC {
3759    type DataType = u8;
3760}
3761
3762#[doc = "A/D Disconnection Detection Control Register"]
3763pub type Addiscr = crate::RegValueT<Addiscr_SPEC>;
3764
3765impl Addiscr {
3766    #[doc = "These bits are read as 00. The write value should be 00."]
3767    #[inline(always)]
3768    pub fn reserved(
3769        self,
3770    ) -> crate::common::RegisterField<6, 0x3, 1, 0, u8, u8, Addiscr_SPEC, crate::common::RW> {
3771        crate::common::RegisterField::<6,0x3,1,0,u8,u8,Addiscr_SPEC,crate::common::RW>::from_register(self,0)
3772    }
3773
3774    #[doc = "Precharge/discharge select for even analog input channels from AN000 to AN008 or analog input channels from AN016 to AN023"]
3775    #[inline(always)]
3776    pub fn pchg1(
3777        self,
3778    ) -> crate::common::RegisterField<
3779        5,
3780        0x1,
3781        1,
3782        0,
3783        addiscr::Pchg1,
3784        addiscr::Pchg1,
3785        Addiscr_SPEC,
3786        crate::common::RW,
3787    > {
3788        crate::common::RegisterField::<
3789            5,
3790            0x1,
3791            1,
3792            0,
3793            addiscr::Pchg1,
3794            addiscr::Pchg1,
3795            Addiscr_SPEC,
3796            crate::common::RW,
3797        >::from_register(self, 0)
3798    }
3799
3800    #[doc = "Precharge/discharge select for odd analog input channels from AN000 to AN007"]
3801    #[inline(always)]
3802    pub fn pchg2(
3803        self,
3804    ) -> crate::common::RegisterField<
3805        4,
3806        0x1,
3807        1,
3808        0,
3809        addiscr::Pchg2,
3810        addiscr::Pchg2,
3811        Addiscr_SPEC,
3812        crate::common::RW,
3813    > {
3814        crate::common::RegisterField::<
3815            4,
3816            0x1,
3817            1,
3818            0,
3819            addiscr::Pchg2,
3820            addiscr::Pchg2,
3821            Addiscr_SPEC,
3822            crate::common::RW,
3823        >::from_register(self, 0)
3824    }
3825
3826    #[doc = "Precharg/discharge period"]
3827    #[inline(always)]
3828    pub fn adndis(
3829        self,
3830    ) -> crate::common::RegisterField<
3831        0,
3832        0xf,
3833        1,
3834        0,
3835        addiscr::Adndis,
3836        addiscr::Adndis,
3837        Addiscr_SPEC,
3838        crate::common::RW,
3839    > {
3840        crate::common::RegisterField::<
3841            0,
3842            0xf,
3843            1,
3844            0,
3845            addiscr::Adndis,
3846            addiscr::Adndis,
3847            Addiscr_SPEC,
3848            crate::common::RW,
3849        >::from_register(self, 0)
3850    }
3851}
3852impl ::core::default::Default for Addiscr {
3853    #[inline(always)]
3854    fn default() -> Addiscr {
3855        <crate::RegValueT<Addiscr_SPEC> as RegisterValue<_>>::new(0)
3856    }
3857}
3858pub mod addiscr {
3859
3860    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3861    pub struct Pchg1_SPEC;
3862    pub type Pchg1 = crate::EnumBitfieldStruct<u8, Pchg1_SPEC>;
3863    impl Pchg1 {
3864        #[doc = "The analog input path 1 voltage is discharged"]
3865        pub const _0: Self = Self::new(0);
3866
3867        #[doc = "The analog input path 1 voltage is precharged."]
3868        pub const _1: Self = Self::new(1);
3869    }
3870    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3871    pub struct Pchg2_SPEC;
3872    pub type Pchg2 = crate::EnumBitfieldStruct<u8, Pchg2_SPEC>;
3873    impl Pchg2 {
3874        #[doc = "The analog input path 2 voltage is discharged"]
3875        pub const _0: Self = Self::new(0);
3876
3877        #[doc = "The analog input path 2 voltage is precharged."]
3878        pub const _1: Self = Self::new(1);
3879    }
3880    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3881    pub struct Adndis_SPEC;
3882    pub type Adndis = crate::EnumBitfieldStruct<u8, Adndis_SPEC>;
3883    impl Adndis {
3884        #[doc = "The disconnection detection assist function is disabled"]
3885        pub const _0000: Self = Self::new(0);
3886
3887        #[doc = "Setting prohibited"]
3888        pub const _0001: Self = Self::new(1);
3889    }
3890}
3891#[doc(hidden)]
3892#[derive(Copy, Clone, Eq, PartialEq)]
3893pub struct Adicr_SPEC;
3894impl crate::sealed::RegSpec for Adicr_SPEC {
3895    type DataType = u8;
3896}
3897
3898#[doc = "A/D Interrupt Control Register"]
3899pub type Adicr = crate::RegValueT<Adicr_SPEC>;
3900
3901impl Adicr {
3902    #[doc = "These bits are read as 000000. The write value should be 000000."]
3903    #[inline(always)]
3904    pub fn reserved(
3905        self,
3906    ) -> crate::common::RegisterField<2, 0x3f, 1, 0, u8, u8, Adicr_SPEC, crate::common::RW> {
3907        crate::common::RegisterField::<2,0x3f,1,0,u8,u8,Adicr_SPEC,crate::common::RW>::from_register(self,0)
3908    }
3909
3910    #[doc = "A/D Interrupt Control"]
3911    #[inline(always)]
3912    pub fn adic(
3913        self,
3914    ) -> crate::common::RegisterField<
3915        0,
3916        0x3,
3917        1,
3918        0,
3919        adicr::Adic,
3920        adicr::Adic,
3921        Adicr_SPEC,
3922        crate::common::RW,
3923    > {
3924        crate::common::RegisterField::<
3925            0,
3926            0x3,
3927            1,
3928            0,
3929            adicr::Adic,
3930            adicr::Adic,
3931            Adicr_SPEC,
3932            crate::common::RW,
3933        >::from_register(self, 0)
3934    }
3935}
3936impl ::core::default::Default for Adicr {
3937    #[inline(always)]
3938    fn default() -> Adicr {
3939        <crate::RegValueT<Adicr_SPEC> as RegisterValue<_>>::new(0)
3940    }
3941}
3942pub mod adicr {
3943
3944    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3945    pub struct Adic_SPEC;
3946    pub type Adic = crate::EnumBitfieldStruct<u8, Adic_SPEC>;
3947    impl Adic {
3948        #[doc = "ADC160_ADI is generated at the end of A/D scan"]
3949        pub const _00: Self = Self::new(0);
3950
3951        #[doc = "ADC160_ADI is generated at the end of calibration"]
3952        pub const _11: Self = Self::new(3);
3953    }
3954}
3955#[doc(hidden)]
3956#[derive(Copy, Clone, Eq, PartialEq)]
3957pub struct Adgspcr_SPEC;
3958impl crate::sealed::RegSpec for Adgspcr_SPEC {
3959    type DataType = u16;
3960}
3961
3962#[doc = "A/D Group Scan Priority Control Register"]
3963pub type Adgspcr = crate::RegValueT<Adgspcr_SPEC>;
3964
3965impl Adgspcr {
3966    #[doc = "Group B Single Scan Continuous Start(Enabled only when PGS = 1. Reserved when PGS = 0.)Note: When the GBRP bit has been set to 1, single scan is performed continuously for group B regardless of the setting of the GBRSCN bit."]
3967    #[inline(always)]
3968    pub fn gbrp(
3969        self,
3970    ) -> crate::common::RegisterField<
3971        15,
3972        0x1,
3973        1,
3974        0,
3975        adgspcr::Gbrp,
3976        adgspcr::Gbrp,
3977        Adgspcr_SPEC,
3978        crate::common::RW,
3979    > {
3980        crate::common::RegisterField::<
3981            15,
3982            0x1,
3983            1,
3984            0,
3985            adgspcr::Gbrp,
3986            adgspcr::Gbrp,
3987            Adgspcr_SPEC,
3988            crate::common::RW,
3989        >::from_register(self, 0)
3990    }
3991
3992    #[doc = "These bits are read as 0000000000000. The write value should be 0000000000000."]
3993    #[inline(always)]
3994    pub fn reserved(
3995        self,
3996    ) -> crate::common::RegisterField<2, 0x1fff, 1, 0, u16, u16, Adgspcr_SPEC, crate::common::RW>
3997    {
3998        crate::common::RegisterField::<2,0x1fff,1,0,u16,u16,Adgspcr_SPEC,crate::common::RW>::from_register(self,0)
3999    }
4000
4001    #[doc = "Group B Restart Setting(Enabled only when PGS = 1. Reserved when PGS = 0.)"]
4002    #[inline(always)]
4003    pub fn gbrscn(
4004        self,
4005    ) -> crate::common::RegisterField<
4006        1,
4007        0x1,
4008        1,
4009        0,
4010        adgspcr::Gbrscn,
4011        adgspcr::Gbrscn,
4012        Adgspcr_SPEC,
4013        crate::common::RW,
4014    > {
4015        crate::common::RegisterField::<
4016            1,
4017            0x1,
4018            1,
4019            0,
4020            adgspcr::Gbrscn,
4021            adgspcr::Gbrscn,
4022            Adgspcr_SPEC,
4023            crate::common::RW,
4024        >::from_register(self, 0)
4025    }
4026
4027    #[doc = "Group A priority control setting bit.Note: When the PGS bit is to be set to 1, the ADCSR.ADCS\\[1:0\\] bits must be set to 01b (group scan mode). If the bits are set to any other values, proper operation is not guaranteed."]
4028    #[inline(always)]
4029    pub fn pgs(
4030        self,
4031    ) -> crate::common::RegisterField<
4032        0,
4033        0x1,
4034        1,
4035        0,
4036        adgspcr::Pgs,
4037        adgspcr::Pgs,
4038        Adgspcr_SPEC,
4039        crate::common::RW,
4040    > {
4041        crate::common::RegisterField::<
4042            0,
4043            0x1,
4044            1,
4045            0,
4046            adgspcr::Pgs,
4047            adgspcr::Pgs,
4048            Adgspcr_SPEC,
4049            crate::common::RW,
4050        >::from_register(self, 0)
4051    }
4052}
4053impl ::core::default::Default for Adgspcr {
4054    #[inline(always)]
4055    fn default() -> Adgspcr {
4056        <crate::RegValueT<Adgspcr_SPEC> as RegisterValue<_>>::new(0)
4057    }
4058}
4059pub mod adgspcr {
4060
4061    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4062    pub struct Gbrp_SPEC;
4063    pub type Gbrp = crate::EnumBitfieldStruct<u8, Gbrp_SPEC>;
4064    impl Gbrp {
4065        #[doc = "Single scan for group B is not continuously activated."]
4066        pub const _0: Self = Self::new(0);
4067
4068        #[doc = "Single scan for group B is continuously activated."]
4069        pub const _1: Self = Self::new(1);
4070    }
4071    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4072    pub struct Gbrscn_SPEC;
4073    pub type Gbrscn = crate::EnumBitfieldStruct<u8, Gbrscn_SPEC>;
4074    impl Gbrscn {
4075        #[doc = "Scanning for group B is not restarted after having been discontinued due to group A priority control."]
4076        pub const _0: Self = Self::new(0);
4077
4078        #[doc = "Scanning for group B is restarted after having been discontinued due to group A priority control."]
4079        pub const _1: Self = Self::new(1);
4080    }
4081    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4082    pub struct Pgs_SPEC;
4083    pub type Pgs = crate::EnumBitfieldStruct<u8, Pgs_SPEC>;
4084    impl Pgs {
4085        #[doc = "Operation is without group A priority control"]
4086        pub const _0: Self = Self::new(0);
4087
4088        #[doc = "Operation is with group A priority control"]
4089        pub const _1: Self = Self::new(1);
4090    }
4091}
4092#[doc(hidden)]
4093#[derive(Copy, Clone, Eq, PartialEq)]
4094pub struct Addbldra_SPEC;
4095impl crate::sealed::RegSpec for Addbldra_SPEC {
4096    type DataType = u16;
4097}
4098
4099#[doc = "A/D Data Duplexing Register A"]
4100pub type Addbldra = crate::RegValueT<Addbldra_SPEC>;
4101
4102impl Addbldra {
4103    #[doc = "This register is a 16-bit read-only registers for storing the result of A/D conversion in response to the respective triggers during extended operation in double trigger mode."]
4104    #[inline(always)]
4105    pub fn addbldra(
4106        self,
4107    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Addbldra_SPEC, crate::common::R>
4108    {
4109        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Addbldra_SPEC,crate::common::R>::from_register(self,0)
4110    }
4111}
4112impl ::core::default::Default for Addbldra {
4113    #[inline(always)]
4114    fn default() -> Addbldra {
4115        <crate::RegValueT<Addbldra_SPEC> as RegisterValue<_>>::new(0)
4116    }
4117}
4118
4119#[doc(hidden)]
4120#[derive(Copy, Clone, Eq, PartialEq)]
4121pub struct Addbldrb_SPEC;
4122impl crate::sealed::RegSpec for Addbldrb_SPEC {
4123    type DataType = u16;
4124}
4125
4126#[doc = "A/D Data Duplexing Register B"]
4127pub type Addbldrb = crate::RegValueT<Addbldrb_SPEC>;
4128
4129impl Addbldrb {
4130    #[doc = "This register is a 16-bit read-only registers for storing the result of A/D conversion in response to the respective triggers during extended operation in double trigger mode."]
4131    #[inline(always)]
4132    pub fn addbldrb(
4133        self,
4134    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Addbldrb_SPEC, crate::common::R>
4135    {
4136        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Addbldrb_SPEC,crate::common::R>::from_register(self,0)
4137    }
4138}
4139impl ::core::default::Default for Addbldrb {
4140    #[inline(always)]
4141    fn default() -> Addbldrb {
4142        <crate::RegValueT<Addbldrb_SPEC> as RegisterValue<_>>::new(0)
4143    }
4144}
4145
4146#[doc(hidden)]
4147#[derive(Copy, Clone, Eq, PartialEq)]
4148pub struct Adwinmon_SPEC;
4149impl crate::sealed::RegSpec for Adwinmon_SPEC {
4150    type DataType = u8;
4151}
4152
4153#[doc = "A/D Compare Function Window A/B Status Monitor Register"]
4154pub type Adwinmon = crate::RegValueT<Adwinmon_SPEC>;
4155
4156impl Adwinmon {
4157    #[doc = "Comparison Result Monitor B"]
4158    #[inline(always)]
4159    pub fn moncmpb(
4160        self,
4161    ) -> crate::common::RegisterField<
4162        5,
4163        0x1,
4164        1,
4165        0,
4166        adwinmon::Moncmpb,
4167        adwinmon::Moncmpb,
4168        Adwinmon_SPEC,
4169        crate::common::R,
4170    > {
4171        crate::common::RegisterField::<
4172            5,
4173            0x1,
4174            1,
4175            0,
4176            adwinmon::Moncmpb,
4177            adwinmon::Moncmpb,
4178            Adwinmon_SPEC,
4179            crate::common::R,
4180        >::from_register(self, 0)
4181    }
4182
4183    #[doc = "Comparison Result Monitor A"]
4184    #[inline(always)]
4185    pub fn moncmpa(
4186        self,
4187    ) -> crate::common::RegisterField<
4188        4,
4189        0x1,
4190        1,
4191        0,
4192        adwinmon::Moncmpa,
4193        adwinmon::Moncmpa,
4194        Adwinmon_SPEC,
4195        crate::common::R,
4196    > {
4197        crate::common::RegisterField::<
4198            4,
4199            0x1,
4200            1,
4201            0,
4202            adwinmon::Moncmpa,
4203            adwinmon::Moncmpa,
4204            Adwinmon_SPEC,
4205            crate::common::R,
4206        >::from_register(self, 0)
4207    }
4208
4209    #[doc = "These bits are read as 000."]
4210    #[inline(always)]
4211    pub fn reserved(
4212        self,
4213    ) -> crate::common::RegisterField<1, 0x7, 1, 0, u8, u8, Adwinmon_SPEC, crate::common::R> {
4214        crate::common::RegisterField::<1,0x7,1,0,u8,u8,Adwinmon_SPEC,crate::common::R>::from_register(self,0)
4215    }
4216
4217    #[doc = "Combination result monitorThis bit indicates the combination result. This bit is valid when both window A operation and window B operation are enabled."]
4218    #[inline(always)]
4219    pub fn moncomb(
4220        self,
4221    ) -> crate::common::RegisterField<
4222        0,
4223        0x1,
4224        1,
4225        0,
4226        adwinmon::Moncomb,
4227        adwinmon::Moncomb,
4228        Adwinmon_SPEC,
4229        crate::common::R,
4230    > {
4231        crate::common::RegisterField::<
4232            0,
4233            0x1,
4234            1,
4235            0,
4236            adwinmon::Moncomb,
4237            adwinmon::Moncomb,
4238            Adwinmon_SPEC,
4239            crate::common::R,
4240        >::from_register(self, 0)
4241    }
4242}
4243impl ::core::default::Default for Adwinmon {
4244    #[inline(always)]
4245    fn default() -> Adwinmon {
4246        <crate::RegValueT<Adwinmon_SPEC> as RegisterValue<_>>::new(0)
4247    }
4248}
4249pub mod adwinmon {
4250
4251    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4252    pub struct Moncmpb_SPEC;
4253    pub type Moncmpb = crate::EnumBitfieldStruct<u8, Moncmpb_SPEC>;
4254    impl Moncmpb {
4255        #[doc = "Window B comparison conditions are not met."]
4256        pub const _0: Self = Self::new(0);
4257
4258        #[doc = "Window B comparison conditions are met."]
4259        pub const _1: Self = Self::new(1);
4260    }
4261    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4262    pub struct Moncmpa_SPEC;
4263    pub type Moncmpa = crate::EnumBitfieldStruct<u8, Moncmpa_SPEC>;
4264    impl Moncmpa {
4265        #[doc = "Window A comparison conditions are not met."]
4266        pub const _0: Self = Self::new(0);
4267
4268        #[doc = "Window A comparison conditions are met."]
4269        pub const _1: Self = Self::new(1);
4270    }
4271    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4272    pub struct Moncomb_SPEC;
4273    pub type Moncomb = crate::EnumBitfieldStruct<u8, Moncomb_SPEC>;
4274    impl Moncomb {
4275        #[doc = "Window A / window B composite conditions are not met."]
4276        pub const _0: Self = Self::new(0);
4277
4278        #[doc = "Window A / window B composite conditions are met."]
4279        pub const _1: Self = Self::new(1);
4280    }
4281}
4282#[doc(hidden)]
4283#[derive(Copy, Clone, Eq, PartialEq)]
4284pub struct Adcmpcr_SPEC;
4285impl crate::sealed::RegSpec for Adcmpcr_SPEC {
4286    type DataType = u16;
4287}
4288
4289#[doc = "A/D Compare Function Control Register"]
4290pub type Adcmpcr = crate::RegValueT<Adcmpcr_SPEC>;
4291
4292impl Adcmpcr {
4293    #[doc = "Compare A Interrupt Enable"]
4294    #[inline(always)]
4295    pub fn cmpaie(
4296        self,
4297    ) -> crate::common::RegisterField<
4298        15,
4299        0x1,
4300        1,
4301        0,
4302        adcmpcr::Cmpaie,
4303        adcmpcr::Cmpaie,
4304        Adcmpcr_SPEC,
4305        crate::common::RW,
4306    > {
4307        crate::common::RegisterField::<
4308            15,
4309            0x1,
4310            1,
4311            0,
4312            adcmpcr::Cmpaie,
4313            adcmpcr::Cmpaie,
4314            Adcmpcr_SPEC,
4315            crate::common::RW,
4316        >::from_register(self, 0)
4317    }
4318
4319    #[doc = "Window Function Setting"]
4320    #[inline(always)]
4321    pub fn wcmpe(
4322        self,
4323    ) -> crate::common::RegisterField<
4324        14,
4325        0x1,
4326        1,
4327        0,
4328        adcmpcr::Wcmpe,
4329        adcmpcr::Wcmpe,
4330        Adcmpcr_SPEC,
4331        crate::common::RW,
4332    > {
4333        crate::common::RegisterField::<
4334            14,
4335            0x1,
4336            1,
4337            0,
4338            adcmpcr::Wcmpe,
4339            adcmpcr::Wcmpe,
4340            Adcmpcr_SPEC,
4341            crate::common::RW,
4342        >::from_register(self, 0)
4343    }
4344
4345    #[doc = "Compare B Interrupt Enable"]
4346    #[inline(always)]
4347    pub fn cmpbie(
4348        self,
4349    ) -> crate::common::RegisterField<
4350        13,
4351        0x1,
4352        1,
4353        0,
4354        adcmpcr::Cmpbie,
4355        adcmpcr::Cmpbie,
4356        Adcmpcr_SPEC,
4357        crate::common::RW,
4358    > {
4359        crate::common::RegisterField::<
4360            13,
4361            0x1,
4362            1,
4363            0,
4364            adcmpcr::Cmpbie,
4365            adcmpcr::Cmpbie,
4366            Adcmpcr_SPEC,
4367            crate::common::RW,
4368        >::from_register(self, 0)
4369    }
4370
4371    #[doc = "Compare Window A Operation Enable"]
4372    #[inline(always)]
4373    pub fn cmpae(
4374        self,
4375    ) -> crate::common::RegisterField<
4376        11,
4377        0x1,
4378        1,
4379        0,
4380        adcmpcr::Cmpae,
4381        adcmpcr::Cmpae,
4382        Adcmpcr_SPEC,
4383        crate::common::RW,
4384    > {
4385        crate::common::RegisterField::<
4386            11,
4387            0x1,
4388            1,
4389            0,
4390            adcmpcr::Cmpae,
4391            adcmpcr::Cmpae,
4392            Adcmpcr_SPEC,
4393            crate::common::RW,
4394        >::from_register(self, 0)
4395    }
4396
4397    #[doc = "Compare Window B Operation Enable"]
4398    #[inline(always)]
4399    pub fn cmpbe(
4400        self,
4401    ) -> crate::common::RegisterField<
4402        9,
4403        0x1,
4404        1,
4405        0,
4406        adcmpcr::Cmpbe,
4407        adcmpcr::Cmpbe,
4408        Adcmpcr_SPEC,
4409        crate::common::RW,
4410    > {
4411        crate::common::RegisterField::<
4412            9,
4413            0x1,
4414            1,
4415            0,
4416            adcmpcr::Cmpbe,
4417            adcmpcr::Cmpbe,
4418            Adcmpcr_SPEC,
4419            crate::common::RW,
4420        >::from_register(self, 0)
4421    }
4422
4423    #[doc = "These bits are read as 0000000. The write value should be 0000000."]
4424    #[inline(always)]
4425    pub fn reserved(
4426        self,
4427    ) -> crate::common::RegisterField<2, 0x7f, 1, 0, u8, u8, Adcmpcr_SPEC, crate::common::RW> {
4428        crate::common::RegisterField::<2,0x7f,1,0,u8,u8,Adcmpcr_SPEC,crate::common::RW>::from_register(self,0)
4429    }
4430
4431    #[doc = "Window A/B Composite Conditions SettingNOTE: These bits are valid when both window A and window B are enabled (CMPAE = 1 and CMPBE = 1)."]
4432    #[inline(always)]
4433    pub fn cmpab(
4434        self,
4435    ) -> crate::common::RegisterField<
4436        0,
4437        0x3,
4438        1,
4439        0,
4440        adcmpcr::Cmpab,
4441        adcmpcr::Cmpab,
4442        Adcmpcr_SPEC,
4443        crate::common::RW,
4444    > {
4445        crate::common::RegisterField::<
4446            0,
4447            0x3,
4448            1,
4449            0,
4450            adcmpcr::Cmpab,
4451            adcmpcr::Cmpab,
4452            Adcmpcr_SPEC,
4453            crate::common::RW,
4454        >::from_register(self, 0)
4455    }
4456}
4457impl ::core::default::Default for Adcmpcr {
4458    #[inline(always)]
4459    fn default() -> Adcmpcr {
4460        <crate::RegValueT<Adcmpcr_SPEC> as RegisterValue<_>>::new(0)
4461    }
4462}
4463pub mod adcmpcr {
4464
4465    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4466    pub struct Cmpaie_SPEC;
4467    pub type Cmpaie = crate::EnumBitfieldStruct<u8, Cmpaie_SPEC>;
4468    impl Cmpaie {
4469        #[doc = "ADC160_CMPAI interrupt is disabled when comparison conditions (window A) are met."]
4470        pub const _0: Self = Self::new(0);
4471
4472        #[doc = "ADC160_CMPAI interrupt is enabled when comparison conditions (window A) are met."]
4473        pub const _1: Self = Self::new(1);
4474    }
4475    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4476    pub struct Wcmpe_SPEC;
4477    pub type Wcmpe = crate::EnumBitfieldStruct<u8, Wcmpe_SPEC>;
4478    impl Wcmpe {
4479        #[doc = "Window function is disabled. Window A and window B operate as a comparator to comparator the single value on the lower side with the A/D conversion result."]
4480        pub const _0: Self = Self::new(0);
4481
4482        #[doc = "Window function is enabled. Window A and window B operate as a comparator to comparator the two values on the upper and lower sides with the A/D conversion result."]
4483        pub const _1: Self = Self::new(1);
4484    }
4485    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4486    pub struct Cmpbie_SPEC;
4487    pub type Cmpbie = crate::EnumBitfieldStruct<u8, Cmpbie_SPEC>;
4488    impl Cmpbie {
4489        #[doc = "ADC160_CMPBI interrupt is disabled when comparison conditions (window B) are met."]
4490        pub const _0: Self = Self::new(0);
4491
4492        #[doc = "ADC160_CMPBI interrupt is enabled when comparison conditions (window B) are met."]
4493        pub const _1: Self = Self::new(1);
4494    }
4495    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4496    pub struct Cmpae_SPEC;
4497    pub type Cmpae = crate::EnumBitfieldStruct<u8, Cmpae_SPEC>;
4498    impl Cmpae {
4499        #[doc = "Compare window A operation is disabled. ADC160_WCMPM and ADC160_WCMPUM outputs are disabled."]
4500        pub const _0: Self = Self::new(0);
4501
4502        #[doc = "Compare window A operation is enabled."]
4503        pub const _1: Self = Self::new(1);
4504    }
4505    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4506    pub struct Cmpbe_SPEC;
4507    pub type Cmpbe = crate::EnumBitfieldStruct<u8, Cmpbe_SPEC>;
4508    impl Cmpbe {
4509        #[doc = "Compare window B operation is disabled. ADC160_WCMPM and ADC160_WCMPUM outputs are disabled."]
4510        pub const _0: Self = Self::new(0);
4511
4512        #[doc = "Compare window B operation is enabled."]
4513        pub const _1: Self = Self::new(1);
4514    }
4515    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4516    pub struct Cmpab_SPEC;
4517    pub type Cmpab = crate::EnumBitfieldStruct<u8, Cmpab_SPEC>;
4518    impl Cmpab {
4519        #[doc = "ADC160_WCMPM is output when window A comparison conditions are met OR window B comparison conditions are met. ADC160_WCMPUM is output in other cases."]
4520        pub const _00: Self = Self::new(0);
4521
4522        #[doc = "ADC160_WCMPM is output when window A comparison conditions are met EXOR window B comparison conditions are met. ADC160_WCMPUM is output in other cases."]
4523        pub const _01: Self = Self::new(1);
4524
4525        #[doc = "ADC160_WCMPM is output when window A comparison conditions are met and window B comparison conditions are met. ADC160_WCMPUM is output in other cases."]
4526        pub const _10: Self = Self::new(2);
4527
4528        #[doc = "Setting prohibited."]
4529        pub const _11: Self = Self::new(3);
4530    }
4531}
4532#[doc(hidden)]
4533#[derive(Copy, Clone, Eq, PartialEq)]
4534pub struct Adcmpanser_SPEC;
4535impl crate::sealed::RegSpec for Adcmpanser_SPEC {
4536    type DataType = u8;
4537}
4538
4539#[doc = "A/D Compare Function Window A Extended Input Select Register"]
4540pub type Adcmpanser = crate::RegValueT<Adcmpanser_SPEC>;
4541
4542impl Adcmpanser {
4543    #[doc = "These bits are read as 000000. The write value should be 000000."]
4544    #[inline(always)]
4545    pub fn reserved(
4546        self,
4547    ) -> crate::common::RegisterField<2, 0x3f, 1, 0, u8, u8, Adcmpanser_SPEC, crate::common::RW>
4548    {
4549        crate::common::RegisterField::<2,0x3f,1,0,u8,u8,Adcmpanser_SPEC,crate::common::RW>::from_register(self,0)
4550    }
4551
4552    #[doc = "Internal reference voltage Compare selection bit."]
4553    #[inline(always)]
4554    pub fn cmpoca(
4555        self,
4556    ) -> crate::common::RegisterField<
4557        1,
4558        0x1,
4559        1,
4560        0,
4561        adcmpanser::Cmpoca,
4562        adcmpanser::Cmpoca,
4563        Adcmpanser_SPEC,
4564        crate::common::RW,
4565    > {
4566        crate::common::RegisterField::<
4567            1,
4568            0x1,
4569            1,
4570            0,
4571            adcmpanser::Cmpoca,
4572            adcmpanser::Cmpoca,
4573            Adcmpanser_SPEC,
4574            crate::common::RW,
4575        >::from_register(self, 0)
4576    }
4577
4578    #[doc = "Temperature sensor output Compare selection bit."]
4579    #[inline(always)]
4580    pub fn cmptsa(
4581        self,
4582    ) -> crate::common::RegisterField<
4583        0,
4584        0x1,
4585        1,
4586        0,
4587        adcmpanser::Cmptsa,
4588        adcmpanser::Cmptsa,
4589        Adcmpanser_SPEC,
4590        crate::common::RW,
4591    > {
4592        crate::common::RegisterField::<
4593            0,
4594            0x1,
4595            1,
4596            0,
4597            adcmpanser::Cmptsa,
4598            adcmpanser::Cmptsa,
4599            Adcmpanser_SPEC,
4600            crate::common::RW,
4601        >::from_register(self, 0)
4602    }
4603}
4604impl ::core::default::Default for Adcmpanser {
4605    #[inline(always)]
4606    fn default() -> Adcmpanser {
4607        <crate::RegValueT<Adcmpanser_SPEC> as RegisterValue<_>>::new(0)
4608    }
4609}
4610pub mod adcmpanser {
4611
4612    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4613    pub struct Cmpoca_SPEC;
4614    pub type Cmpoca = crate::EnumBitfieldStruct<u8, Cmpoca_SPEC>;
4615    impl Cmpoca {
4616        #[doc = "Excludes the internal reference voltage from the compare window A target range."]
4617        pub const _0: Self = Self::new(0);
4618
4619        #[doc = "Includes the internal reference voltage in the compare window A target range."]
4620        pub const _1: Self = Self::new(1);
4621    }
4622    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4623    pub struct Cmptsa_SPEC;
4624    pub type Cmptsa = crate::EnumBitfieldStruct<u8, Cmptsa_SPEC>;
4625    impl Cmptsa {
4626        #[doc = "Excludes the temperature sensor output from the compare window A target range."]
4627        pub const _0: Self = Self::new(0);
4628
4629        #[doc = "Includes the temperature sensor output in the compare window A target range."]
4630        pub const _1: Self = Self::new(1);
4631    }
4632}
4633#[doc(hidden)]
4634#[derive(Copy, Clone, Eq, PartialEq)]
4635pub struct Adcmpler_SPEC;
4636impl crate::sealed::RegSpec for Adcmpler_SPEC {
4637    type DataType = u8;
4638}
4639
4640#[doc = "A/D Compare Function Window A Extended Input Comparison Condition Setting Register"]
4641pub type Adcmpler = crate::RegValueT<Adcmpler_SPEC>;
4642
4643impl Adcmpler {
4644    #[doc = "These bits are read as 000000. The write value should be 000000."]
4645    #[inline(always)]
4646    pub fn reserved(
4647        self,
4648    ) -> crate::common::RegisterField<2, 0x3f, 1, 0, u8, u8, Adcmpler_SPEC, crate::common::RW> {
4649        crate::common::RegisterField::<2,0x3f,1,0,u8,u8,Adcmpler_SPEC,crate::common::RW>::from_register(self,0)
4650    }
4651
4652    #[doc = "Compare Window A Internal Reference Voltage ComparisonCondition Select"]
4653    #[inline(always)]
4654    pub fn cmploca(
4655        self,
4656    ) -> crate::common::RegisterField<
4657        1,
4658        0x1,
4659        1,
4660        0,
4661        adcmpler::Cmploca,
4662        adcmpler::Cmploca,
4663        Adcmpler_SPEC,
4664        crate::common::RW,
4665    > {
4666        crate::common::RegisterField::<
4667            1,
4668            0x1,
4669            1,
4670            0,
4671            adcmpler::Cmploca,
4672            adcmpler::Cmploca,
4673            Adcmpler_SPEC,
4674            crate::common::RW,
4675        >::from_register(self, 0)
4676    }
4677
4678    #[doc = "Compare Window A Temperature Sensor Output Comparison Condition Select"]
4679    #[inline(always)]
4680    pub fn cmpltsa(
4681        self,
4682    ) -> crate::common::RegisterField<
4683        0,
4684        0x1,
4685        1,
4686        0,
4687        adcmpler::Cmpltsa,
4688        adcmpler::Cmpltsa,
4689        Adcmpler_SPEC,
4690        crate::common::RW,
4691    > {
4692        crate::common::RegisterField::<
4693            0,
4694            0x1,
4695            1,
4696            0,
4697            adcmpler::Cmpltsa,
4698            adcmpler::Cmpltsa,
4699            Adcmpler_SPEC,
4700            crate::common::RW,
4701        >::from_register(self, 0)
4702    }
4703}
4704impl ::core::default::Default for Adcmpler {
4705    #[inline(always)]
4706    fn default() -> Adcmpler {
4707        <crate::RegValueT<Adcmpler_SPEC> as RegisterValue<_>>::new(0)
4708    }
4709}
4710pub mod adcmpler {
4711
4712    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4713    pub struct Cmploca_SPEC;
4714    pub type Cmploca = crate::EnumBitfieldStruct<u8, Cmploca_SPEC>;
4715    impl Cmploca {
4716        #[doc = "ADCMPDR0 value > A/D converted value(ADCMPCR.WCMPE=0) / A/D converted value &lt; ADCMPDR0 value or A/D converted value &gt; ADCMPDR1 value (ADCMPCR.WCMPE=1)"]
4717        pub const _0: Self = Self::new(0);
4718
4719        #[doc = "ADCMPDR0 value < A/D converted value(ADCMPCR.WCMPE=0) / ADCMPDR0 value < A/D converted value < ADCMPDR1 value(ADCMPCR.WCMPE=1)"]
4720        pub const _1: Self = Self::new(1);
4721    }
4722    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4723    pub struct Cmpltsa_SPEC;
4724    pub type Cmpltsa = crate::EnumBitfieldStruct<u8, Cmpltsa_SPEC>;
4725    impl Cmpltsa {
4726        #[doc = "ADCMPDR0 register value > A/D-converted value(ADCMPCR.WCMPE=0) / AD-converted value < ADCMPDR0 register value or A/D-converted value > ADCMPDR1 register value(ADCMPCR.WCMPE=1)."]
4727        pub const _0: Self = Self::new(0);
4728
4729        #[doc = "ADCMPDR0 register value < A/D-converted value(ADCMPCR.WCMPE=0) / ADCMPDR0 register value < A/D-converted value < ADCMPDR1 register value(ADCMPCR.WCMPE=1)."]
4730        pub const _1: Self = Self::new(1);
4731    }
4732}
4733#[doc(hidden)]
4734#[derive(Copy, Clone, Eq, PartialEq)]
4735pub struct Adcmpansr0_SPEC;
4736impl crate::sealed::RegSpec for Adcmpansr0_SPEC {
4737    type DataType = u16;
4738}
4739
4740#[doc = "A/D Compare Function Window A Channel Select Register 0"]
4741pub type Adcmpansr0 = crate::RegValueT<Adcmpansr0_SPEC>;
4742
4743impl Adcmpansr0 {
4744    #[doc = "These bits are read as 0000000. The write value should be 0000000."]
4745    #[inline(always)]
4746    pub fn reserved(
4747        self,
4748    ) -> crate::common::RegisterField<9, 0x7f, 1, 0, u8, u8, Adcmpansr0_SPEC, crate::common::RW>
4749    {
4750        crate::common::RegisterField::<9,0x7f,1,0,u8,u8,Adcmpansr0_SPEC,crate::common::RW>::from_register(self,0)
4751    }
4752
4753    #[doc = "AN008 Select"]
4754    #[inline(always)]
4755    pub fn cmpcha08(
4756        self,
4757    ) -> crate::common::RegisterField<
4758        8,
4759        0x1,
4760        1,
4761        0,
4762        adcmpansr0::Cmpcha08,
4763        adcmpansr0::Cmpcha08,
4764        Adcmpansr0_SPEC,
4765        crate::common::RW,
4766    > {
4767        crate::common::RegisterField::<
4768            8,
4769            0x1,
4770            1,
4771            0,
4772            adcmpansr0::Cmpcha08,
4773            adcmpansr0::Cmpcha08,
4774            Adcmpansr0_SPEC,
4775            crate::common::RW,
4776        >::from_register(self, 0)
4777    }
4778
4779    #[doc = "AN007 Select"]
4780    #[inline(always)]
4781    pub fn cmpcha07(
4782        self,
4783    ) -> crate::common::RegisterField<
4784        7,
4785        0x1,
4786        1,
4787        0,
4788        adcmpansr0::Cmpcha07,
4789        adcmpansr0::Cmpcha07,
4790        Adcmpansr0_SPEC,
4791        crate::common::RW,
4792    > {
4793        crate::common::RegisterField::<
4794            7,
4795            0x1,
4796            1,
4797            0,
4798            adcmpansr0::Cmpcha07,
4799            adcmpansr0::Cmpcha07,
4800            Adcmpansr0_SPEC,
4801            crate::common::RW,
4802        >::from_register(self, 0)
4803    }
4804
4805    #[doc = "AN006 Select"]
4806    #[inline(always)]
4807    pub fn cmpcha06(
4808        self,
4809    ) -> crate::common::RegisterField<
4810        6,
4811        0x1,
4812        1,
4813        0,
4814        adcmpansr0::Cmpcha06,
4815        adcmpansr0::Cmpcha06,
4816        Adcmpansr0_SPEC,
4817        crate::common::RW,
4818    > {
4819        crate::common::RegisterField::<
4820            6,
4821            0x1,
4822            1,
4823            0,
4824            adcmpansr0::Cmpcha06,
4825            adcmpansr0::Cmpcha06,
4826            Adcmpansr0_SPEC,
4827            crate::common::RW,
4828        >::from_register(self, 0)
4829    }
4830
4831    #[doc = "AN005 Select"]
4832    #[inline(always)]
4833    pub fn cmpcha05(
4834        self,
4835    ) -> crate::common::RegisterField<
4836        5,
4837        0x1,
4838        1,
4839        0,
4840        adcmpansr0::Cmpcha05,
4841        adcmpansr0::Cmpcha05,
4842        Adcmpansr0_SPEC,
4843        crate::common::RW,
4844    > {
4845        crate::common::RegisterField::<
4846            5,
4847            0x1,
4848            1,
4849            0,
4850            adcmpansr0::Cmpcha05,
4851            adcmpansr0::Cmpcha05,
4852            Adcmpansr0_SPEC,
4853            crate::common::RW,
4854        >::from_register(self, 0)
4855    }
4856
4857    #[doc = "AN004 Select"]
4858    #[inline(always)]
4859    pub fn cmpcha04(
4860        self,
4861    ) -> crate::common::RegisterField<
4862        4,
4863        0x1,
4864        1,
4865        0,
4866        adcmpansr0::Cmpcha04,
4867        adcmpansr0::Cmpcha04,
4868        Adcmpansr0_SPEC,
4869        crate::common::RW,
4870    > {
4871        crate::common::RegisterField::<
4872            4,
4873            0x1,
4874            1,
4875            0,
4876            adcmpansr0::Cmpcha04,
4877            adcmpansr0::Cmpcha04,
4878            Adcmpansr0_SPEC,
4879            crate::common::RW,
4880        >::from_register(self, 0)
4881    }
4882
4883    #[doc = "AN003 Select"]
4884    #[inline(always)]
4885    pub fn cmpcha03(
4886        self,
4887    ) -> crate::common::RegisterField<
4888        3,
4889        0x1,
4890        1,
4891        0,
4892        adcmpansr0::Cmpcha03,
4893        adcmpansr0::Cmpcha03,
4894        Adcmpansr0_SPEC,
4895        crate::common::RW,
4896    > {
4897        crate::common::RegisterField::<
4898            3,
4899            0x1,
4900            1,
4901            0,
4902            adcmpansr0::Cmpcha03,
4903            adcmpansr0::Cmpcha03,
4904            Adcmpansr0_SPEC,
4905            crate::common::RW,
4906        >::from_register(self, 0)
4907    }
4908
4909    #[doc = "AN002 Select"]
4910    #[inline(always)]
4911    pub fn cmpcha02(
4912        self,
4913    ) -> crate::common::RegisterField<
4914        2,
4915        0x1,
4916        1,
4917        0,
4918        adcmpansr0::Cmpcha02,
4919        adcmpansr0::Cmpcha02,
4920        Adcmpansr0_SPEC,
4921        crate::common::RW,
4922    > {
4923        crate::common::RegisterField::<
4924            2,
4925            0x1,
4926            1,
4927            0,
4928            adcmpansr0::Cmpcha02,
4929            adcmpansr0::Cmpcha02,
4930            Adcmpansr0_SPEC,
4931            crate::common::RW,
4932        >::from_register(self, 0)
4933    }
4934
4935    #[doc = "AN001 Select"]
4936    #[inline(always)]
4937    pub fn cmpcha01(
4938        self,
4939    ) -> crate::common::RegisterField<
4940        1,
4941        0x1,
4942        1,
4943        0,
4944        adcmpansr0::Cmpcha01,
4945        adcmpansr0::Cmpcha01,
4946        Adcmpansr0_SPEC,
4947        crate::common::RW,
4948    > {
4949        crate::common::RegisterField::<
4950            1,
4951            0x1,
4952            1,
4953            0,
4954            adcmpansr0::Cmpcha01,
4955            adcmpansr0::Cmpcha01,
4956            Adcmpansr0_SPEC,
4957            crate::common::RW,
4958        >::from_register(self, 0)
4959    }
4960
4961    #[doc = "AN000 Select"]
4962    #[inline(always)]
4963    pub fn cmpcha00(
4964        self,
4965    ) -> crate::common::RegisterField<
4966        0,
4967        0x1,
4968        1,
4969        0,
4970        adcmpansr0::Cmpcha00,
4971        adcmpansr0::Cmpcha00,
4972        Adcmpansr0_SPEC,
4973        crate::common::RW,
4974    > {
4975        crate::common::RegisterField::<
4976            0,
4977            0x1,
4978            1,
4979            0,
4980            adcmpansr0::Cmpcha00,
4981            adcmpansr0::Cmpcha00,
4982            Adcmpansr0_SPEC,
4983            crate::common::RW,
4984        >::from_register(self, 0)
4985    }
4986}
4987impl ::core::default::Default for Adcmpansr0 {
4988    #[inline(always)]
4989    fn default() -> Adcmpansr0 {
4990        <crate::RegValueT<Adcmpansr0_SPEC> as RegisterValue<_>>::new(0)
4991    }
4992}
4993pub mod adcmpansr0 {
4994
4995    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4996    pub struct Cmpcha08_SPEC;
4997    pub type Cmpcha08 = crate::EnumBitfieldStruct<u8, Cmpcha08_SPEC>;
4998    impl Cmpcha08 {
4999        #[doc = "Compare function disabled for AN008"]
5000        pub const _0: Self = Self::new(0);
5001
5002        #[doc = "Compare function enabled for AN008"]
5003        pub const _1: Self = Self::new(1);
5004    }
5005    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5006    pub struct Cmpcha07_SPEC;
5007    pub type Cmpcha07 = crate::EnumBitfieldStruct<u8, Cmpcha07_SPEC>;
5008    impl Cmpcha07 {
5009        #[doc = "Compare function disabled for AN007"]
5010        pub const _0: Self = Self::new(0);
5011
5012        #[doc = "Compare function enabled for AN007"]
5013        pub const _1: Self = Self::new(1);
5014    }
5015    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5016    pub struct Cmpcha06_SPEC;
5017    pub type Cmpcha06 = crate::EnumBitfieldStruct<u8, Cmpcha06_SPEC>;
5018    impl Cmpcha06 {
5019        #[doc = "Compare function disabled for AN006"]
5020        pub const _0: Self = Self::new(0);
5021
5022        #[doc = "Compare function enabled for AN006"]
5023        pub const _1: Self = Self::new(1);
5024    }
5025    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5026    pub struct Cmpcha05_SPEC;
5027    pub type Cmpcha05 = crate::EnumBitfieldStruct<u8, Cmpcha05_SPEC>;
5028    impl Cmpcha05 {
5029        #[doc = "Compare function disabled for AN005"]
5030        pub const _0: Self = Self::new(0);
5031
5032        #[doc = "Compare function enabled for AN005"]
5033        pub const _1: Self = Self::new(1);
5034    }
5035    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5036    pub struct Cmpcha04_SPEC;
5037    pub type Cmpcha04 = crate::EnumBitfieldStruct<u8, Cmpcha04_SPEC>;
5038    impl Cmpcha04 {
5039        #[doc = "Compare function disabled for AN004"]
5040        pub const _0: Self = Self::new(0);
5041
5042        #[doc = "Compare function enabled for AN004"]
5043        pub const _1: Self = Self::new(1);
5044    }
5045    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5046    pub struct Cmpcha03_SPEC;
5047    pub type Cmpcha03 = crate::EnumBitfieldStruct<u8, Cmpcha03_SPEC>;
5048    impl Cmpcha03 {
5049        #[doc = "Compare function disabled for AN003"]
5050        pub const _0: Self = Self::new(0);
5051
5052        #[doc = "Compare function enabled for AN003"]
5053        pub const _1: Self = Self::new(1);
5054    }
5055    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5056    pub struct Cmpcha02_SPEC;
5057    pub type Cmpcha02 = crate::EnumBitfieldStruct<u8, Cmpcha02_SPEC>;
5058    impl Cmpcha02 {
5059        #[doc = "Compare function disabled for AN002"]
5060        pub const _0: Self = Self::new(0);
5061
5062        #[doc = "Compare function enabled for AN002"]
5063        pub const _1: Self = Self::new(1);
5064    }
5065    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5066    pub struct Cmpcha01_SPEC;
5067    pub type Cmpcha01 = crate::EnumBitfieldStruct<u8, Cmpcha01_SPEC>;
5068    impl Cmpcha01 {
5069        #[doc = "Compare function disabled for AN001"]
5070        pub const _0: Self = Self::new(0);
5071
5072        #[doc = "Compare function enabled for AN001"]
5073        pub const _1: Self = Self::new(1);
5074    }
5075    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5076    pub struct Cmpcha00_SPEC;
5077    pub type Cmpcha00 = crate::EnumBitfieldStruct<u8, Cmpcha00_SPEC>;
5078    impl Cmpcha00 {
5079        #[doc = "Compare function disabled for AN000"]
5080        pub const _0: Self = Self::new(0);
5081
5082        #[doc = "Compare function enabled for AN000"]
5083        pub const _1: Self = Self::new(1);
5084    }
5085}
5086#[doc(hidden)]
5087#[derive(Copy, Clone, Eq, PartialEq)]
5088pub struct Adcmpansr1_SPEC;
5089impl crate::sealed::RegSpec for Adcmpansr1_SPEC {
5090    type DataType = u16;
5091}
5092
5093#[doc = "A/D Compare Function Window A Channel Select Register 1"]
5094pub type Adcmpansr1 = crate::RegValueT<Adcmpansr1_SPEC>;
5095
5096impl Adcmpansr1 {
5097    #[doc = "These bits are read as 0000000. The write value should be 0000000."]
5098    #[inline(always)]
5099    pub fn reserved(
5100        self,
5101    ) -> crate::common::RegisterField<9, 0x7f, 1, 0, u8, u8, Adcmpansr1_SPEC, crate::common::RW>
5102    {
5103        crate::common::RegisterField::<9,0x7f,1,0,u8,u8,Adcmpansr1_SPEC,crate::common::RW>::from_register(self,0)
5104    }
5105
5106    #[doc = "AN024 Select"]
5107    #[inline(always)]
5108    pub fn cmpcha24(
5109        self,
5110    ) -> crate::common::RegisterField<
5111        8,
5112        0x1,
5113        1,
5114        0,
5115        adcmpansr1::Cmpcha24,
5116        adcmpansr1::Cmpcha24,
5117        Adcmpansr1_SPEC,
5118        crate::common::RW,
5119    > {
5120        crate::common::RegisterField::<
5121            8,
5122            0x1,
5123            1,
5124            0,
5125            adcmpansr1::Cmpcha24,
5126            adcmpansr1::Cmpcha24,
5127            Adcmpansr1_SPEC,
5128            crate::common::RW,
5129        >::from_register(self, 0)
5130    }
5131
5132    #[doc = "AN023 Select"]
5133    #[inline(always)]
5134    pub fn cmpcha23(
5135        self,
5136    ) -> crate::common::RegisterField<
5137        7,
5138        0x1,
5139        1,
5140        0,
5141        adcmpansr1::Cmpcha23,
5142        adcmpansr1::Cmpcha23,
5143        Adcmpansr1_SPEC,
5144        crate::common::RW,
5145    > {
5146        crate::common::RegisterField::<
5147            7,
5148            0x1,
5149            1,
5150            0,
5151            adcmpansr1::Cmpcha23,
5152            adcmpansr1::Cmpcha23,
5153            Adcmpansr1_SPEC,
5154            crate::common::RW,
5155        >::from_register(self, 0)
5156    }
5157
5158    #[doc = "AN022 Select"]
5159    #[inline(always)]
5160    pub fn cmpcha22(
5161        self,
5162    ) -> crate::common::RegisterField<
5163        6,
5164        0x1,
5165        1,
5166        0,
5167        adcmpansr1::Cmpcha22,
5168        adcmpansr1::Cmpcha22,
5169        Adcmpansr1_SPEC,
5170        crate::common::RW,
5171    > {
5172        crate::common::RegisterField::<
5173            6,
5174            0x1,
5175            1,
5176            0,
5177            adcmpansr1::Cmpcha22,
5178            adcmpansr1::Cmpcha22,
5179            Adcmpansr1_SPEC,
5180            crate::common::RW,
5181        >::from_register(self, 0)
5182    }
5183
5184    #[doc = "AN021 Select"]
5185    #[inline(always)]
5186    pub fn cmpcha21(
5187        self,
5188    ) -> crate::common::RegisterField<
5189        5,
5190        0x1,
5191        1,
5192        0,
5193        adcmpansr1::Cmpcha21,
5194        adcmpansr1::Cmpcha21,
5195        Adcmpansr1_SPEC,
5196        crate::common::RW,
5197    > {
5198        crate::common::RegisterField::<
5199            5,
5200            0x1,
5201            1,
5202            0,
5203            adcmpansr1::Cmpcha21,
5204            adcmpansr1::Cmpcha21,
5205            Adcmpansr1_SPEC,
5206            crate::common::RW,
5207        >::from_register(self, 0)
5208    }
5209
5210    #[doc = "AN020 Select"]
5211    #[inline(always)]
5212    pub fn cmpcha20(
5213        self,
5214    ) -> crate::common::RegisterField<
5215        4,
5216        0x1,
5217        1,
5218        0,
5219        adcmpansr1::Cmpcha20,
5220        adcmpansr1::Cmpcha20,
5221        Adcmpansr1_SPEC,
5222        crate::common::RW,
5223    > {
5224        crate::common::RegisterField::<
5225            4,
5226            0x1,
5227            1,
5228            0,
5229            adcmpansr1::Cmpcha20,
5230            adcmpansr1::Cmpcha20,
5231            Adcmpansr1_SPEC,
5232            crate::common::RW,
5233        >::from_register(self, 0)
5234    }
5235
5236    #[doc = "AN019 Select"]
5237    #[inline(always)]
5238    pub fn cmpcha19(
5239        self,
5240    ) -> crate::common::RegisterField<
5241        3,
5242        0x1,
5243        1,
5244        0,
5245        adcmpansr1::Cmpcha19,
5246        adcmpansr1::Cmpcha19,
5247        Adcmpansr1_SPEC,
5248        crate::common::RW,
5249    > {
5250        crate::common::RegisterField::<
5251            3,
5252            0x1,
5253            1,
5254            0,
5255            adcmpansr1::Cmpcha19,
5256            adcmpansr1::Cmpcha19,
5257            Adcmpansr1_SPEC,
5258            crate::common::RW,
5259        >::from_register(self, 0)
5260    }
5261
5262    #[doc = "AN018 Select"]
5263    #[inline(always)]
5264    pub fn cmpcha18(
5265        self,
5266    ) -> crate::common::RegisterField<
5267        2,
5268        0x1,
5269        1,
5270        0,
5271        adcmpansr1::Cmpcha18,
5272        adcmpansr1::Cmpcha18,
5273        Adcmpansr1_SPEC,
5274        crate::common::RW,
5275    > {
5276        crate::common::RegisterField::<
5277            2,
5278            0x1,
5279            1,
5280            0,
5281            adcmpansr1::Cmpcha18,
5282            adcmpansr1::Cmpcha18,
5283            Adcmpansr1_SPEC,
5284            crate::common::RW,
5285        >::from_register(self, 0)
5286    }
5287
5288    #[doc = "AN017 Select"]
5289    #[inline(always)]
5290    pub fn cmpcha17(
5291        self,
5292    ) -> crate::common::RegisterField<
5293        1,
5294        0x1,
5295        1,
5296        0,
5297        adcmpansr1::Cmpcha17,
5298        adcmpansr1::Cmpcha17,
5299        Adcmpansr1_SPEC,
5300        crate::common::RW,
5301    > {
5302        crate::common::RegisterField::<
5303            1,
5304            0x1,
5305            1,
5306            0,
5307            adcmpansr1::Cmpcha17,
5308            adcmpansr1::Cmpcha17,
5309            Adcmpansr1_SPEC,
5310            crate::common::RW,
5311        >::from_register(self, 0)
5312    }
5313
5314    #[doc = "AN016 Select"]
5315    #[inline(always)]
5316    pub fn cmpcha16(
5317        self,
5318    ) -> crate::common::RegisterField<
5319        0,
5320        0x1,
5321        1,
5322        0,
5323        adcmpansr1::Cmpcha16,
5324        adcmpansr1::Cmpcha16,
5325        Adcmpansr1_SPEC,
5326        crate::common::RW,
5327    > {
5328        crate::common::RegisterField::<
5329            0,
5330            0x1,
5331            1,
5332            0,
5333            adcmpansr1::Cmpcha16,
5334            adcmpansr1::Cmpcha16,
5335            Adcmpansr1_SPEC,
5336            crate::common::RW,
5337        >::from_register(self, 0)
5338    }
5339}
5340impl ::core::default::Default for Adcmpansr1 {
5341    #[inline(always)]
5342    fn default() -> Adcmpansr1 {
5343        <crate::RegValueT<Adcmpansr1_SPEC> as RegisterValue<_>>::new(0)
5344    }
5345}
5346pub mod adcmpansr1 {
5347
5348    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5349    pub struct Cmpcha24_SPEC;
5350    pub type Cmpcha24 = crate::EnumBitfieldStruct<u8, Cmpcha24_SPEC>;
5351    impl Cmpcha24 {
5352        #[doc = "Compare function disabled for AN024"]
5353        pub const _0: Self = Self::new(0);
5354
5355        #[doc = "Compare function enabled for AN024"]
5356        pub const _1: Self = Self::new(1);
5357    }
5358    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5359    pub struct Cmpcha23_SPEC;
5360    pub type Cmpcha23 = crate::EnumBitfieldStruct<u8, Cmpcha23_SPEC>;
5361    impl Cmpcha23 {
5362        #[doc = "Compare function disabled for AN023"]
5363        pub const _0: Self = Self::new(0);
5364
5365        #[doc = "Compare function enabled for AN023"]
5366        pub const _1: Self = Self::new(1);
5367    }
5368    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5369    pub struct Cmpcha22_SPEC;
5370    pub type Cmpcha22 = crate::EnumBitfieldStruct<u8, Cmpcha22_SPEC>;
5371    impl Cmpcha22 {
5372        #[doc = "Compare function disabled for AN022"]
5373        pub const _0: Self = Self::new(0);
5374
5375        #[doc = "Compare function enabled for AN022"]
5376        pub const _1: Self = Self::new(1);
5377    }
5378    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5379    pub struct Cmpcha21_SPEC;
5380    pub type Cmpcha21 = crate::EnumBitfieldStruct<u8, Cmpcha21_SPEC>;
5381    impl Cmpcha21 {
5382        #[doc = "Compare function disabled for AN021"]
5383        pub const _0: Self = Self::new(0);
5384
5385        #[doc = "Compare function enabled for AN021"]
5386        pub const _1: Self = Self::new(1);
5387    }
5388    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5389    pub struct Cmpcha20_SPEC;
5390    pub type Cmpcha20 = crate::EnumBitfieldStruct<u8, Cmpcha20_SPEC>;
5391    impl Cmpcha20 {
5392        #[doc = "Compare function disabled for AN020"]
5393        pub const _0: Self = Self::new(0);
5394
5395        #[doc = "Compare function enabled for AN020"]
5396        pub const _1: Self = Self::new(1);
5397    }
5398    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5399    pub struct Cmpcha19_SPEC;
5400    pub type Cmpcha19 = crate::EnumBitfieldStruct<u8, Cmpcha19_SPEC>;
5401    impl Cmpcha19 {
5402        #[doc = "Compare function disabled for AN019"]
5403        pub const _0: Self = Self::new(0);
5404
5405        #[doc = "Compare function enabled for AN019"]
5406        pub const _1: Self = Self::new(1);
5407    }
5408    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5409    pub struct Cmpcha18_SPEC;
5410    pub type Cmpcha18 = crate::EnumBitfieldStruct<u8, Cmpcha18_SPEC>;
5411    impl Cmpcha18 {
5412        #[doc = "Compare function disabled for AN018"]
5413        pub const _0: Self = Self::new(0);
5414
5415        #[doc = "Compare function enabled for AN018"]
5416        pub const _1: Self = Self::new(1);
5417    }
5418    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5419    pub struct Cmpcha17_SPEC;
5420    pub type Cmpcha17 = crate::EnumBitfieldStruct<u8, Cmpcha17_SPEC>;
5421    impl Cmpcha17 {
5422        #[doc = "Compare function disabled for AN017"]
5423        pub const _0: Self = Self::new(0);
5424
5425        #[doc = "Compare function enabled for AN017"]
5426        pub const _1: Self = Self::new(1);
5427    }
5428    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5429    pub struct Cmpcha16_SPEC;
5430    pub type Cmpcha16 = crate::EnumBitfieldStruct<u8, Cmpcha16_SPEC>;
5431    impl Cmpcha16 {
5432        #[doc = "Compare function disabled for AN016"]
5433        pub const _0: Self = Self::new(0);
5434
5435        #[doc = "Compare function enabled for AN016"]
5436        pub const _1: Self = Self::new(1);
5437    }
5438}
5439#[doc(hidden)]
5440#[derive(Copy, Clone, Eq, PartialEq)]
5441pub struct Adcmplr0_SPEC;
5442impl crate::sealed::RegSpec for Adcmplr0_SPEC {
5443    type DataType = u16;
5444}
5445
5446#[doc = "A/D Compare Function Window A Comparison Condition Setting Register 0"]
5447pub type Adcmplr0 = crate::RegValueT<Adcmplr0_SPEC>;
5448
5449impl Adcmplr0 {
5450    #[doc = "These bits are read as 0000000. The write value should be 0000000."]
5451    #[inline(always)]
5452    pub fn reserved(
5453        self,
5454    ) -> crate::common::RegisterField<9, 0x7f, 1, 0, u8, u8, Adcmplr0_SPEC, crate::common::RW> {
5455        crate::common::RegisterField::<9,0x7f,1,0,u8,u8,Adcmplr0_SPEC,crate::common::RW>::from_register(self,0)
5456    }
5457
5458    #[doc = "Comparison condition of AN008"]
5459    #[inline(always)]
5460    pub fn cmplcha08(
5461        self,
5462    ) -> crate::common::RegisterField<
5463        8,
5464        0x1,
5465        1,
5466        0,
5467        adcmplr0::Cmplcha08,
5468        adcmplr0::Cmplcha08,
5469        Adcmplr0_SPEC,
5470        crate::common::RW,
5471    > {
5472        crate::common::RegisterField::<
5473            8,
5474            0x1,
5475            1,
5476            0,
5477            adcmplr0::Cmplcha08,
5478            adcmplr0::Cmplcha08,
5479            Adcmplr0_SPEC,
5480            crate::common::RW,
5481        >::from_register(self, 0)
5482    }
5483
5484    #[doc = "Comparison condition of AN007"]
5485    #[inline(always)]
5486    pub fn cmplcha07(
5487        self,
5488    ) -> crate::common::RegisterField<
5489        7,
5490        0x1,
5491        1,
5492        0,
5493        adcmplr0::Cmplcha07,
5494        adcmplr0::Cmplcha07,
5495        Adcmplr0_SPEC,
5496        crate::common::RW,
5497    > {
5498        crate::common::RegisterField::<
5499            7,
5500            0x1,
5501            1,
5502            0,
5503            adcmplr0::Cmplcha07,
5504            adcmplr0::Cmplcha07,
5505            Adcmplr0_SPEC,
5506            crate::common::RW,
5507        >::from_register(self, 0)
5508    }
5509
5510    #[doc = "Comparison condition of AN006"]
5511    #[inline(always)]
5512    pub fn cmplcha06(
5513        self,
5514    ) -> crate::common::RegisterField<
5515        6,
5516        0x1,
5517        1,
5518        0,
5519        adcmplr0::Cmplcha06,
5520        adcmplr0::Cmplcha06,
5521        Adcmplr0_SPEC,
5522        crate::common::RW,
5523    > {
5524        crate::common::RegisterField::<
5525            6,
5526            0x1,
5527            1,
5528            0,
5529            adcmplr0::Cmplcha06,
5530            adcmplr0::Cmplcha06,
5531            Adcmplr0_SPEC,
5532            crate::common::RW,
5533        >::from_register(self, 0)
5534    }
5535
5536    #[doc = "Comparison condition of AN005"]
5537    #[inline(always)]
5538    pub fn cmplcha05(
5539        self,
5540    ) -> crate::common::RegisterField<
5541        5,
5542        0x1,
5543        1,
5544        0,
5545        adcmplr0::Cmplcha05,
5546        adcmplr0::Cmplcha05,
5547        Adcmplr0_SPEC,
5548        crate::common::RW,
5549    > {
5550        crate::common::RegisterField::<
5551            5,
5552            0x1,
5553            1,
5554            0,
5555            adcmplr0::Cmplcha05,
5556            adcmplr0::Cmplcha05,
5557            Adcmplr0_SPEC,
5558            crate::common::RW,
5559        >::from_register(self, 0)
5560    }
5561
5562    #[doc = "Comparison condition of AN004"]
5563    #[inline(always)]
5564    pub fn cmplcha04(
5565        self,
5566    ) -> crate::common::RegisterField<
5567        4,
5568        0x1,
5569        1,
5570        0,
5571        adcmplr0::Cmplcha04,
5572        adcmplr0::Cmplcha04,
5573        Adcmplr0_SPEC,
5574        crate::common::RW,
5575    > {
5576        crate::common::RegisterField::<
5577            4,
5578            0x1,
5579            1,
5580            0,
5581            adcmplr0::Cmplcha04,
5582            adcmplr0::Cmplcha04,
5583            Adcmplr0_SPEC,
5584            crate::common::RW,
5585        >::from_register(self, 0)
5586    }
5587
5588    #[doc = "Comparison condition of AN003"]
5589    #[inline(always)]
5590    pub fn cmplcha03(
5591        self,
5592    ) -> crate::common::RegisterField<
5593        3,
5594        0x1,
5595        1,
5596        0,
5597        adcmplr0::Cmplcha03,
5598        adcmplr0::Cmplcha03,
5599        Adcmplr0_SPEC,
5600        crate::common::RW,
5601    > {
5602        crate::common::RegisterField::<
5603            3,
5604            0x1,
5605            1,
5606            0,
5607            adcmplr0::Cmplcha03,
5608            adcmplr0::Cmplcha03,
5609            Adcmplr0_SPEC,
5610            crate::common::RW,
5611        >::from_register(self, 0)
5612    }
5613
5614    #[doc = "Comparison condition of AN002"]
5615    #[inline(always)]
5616    pub fn cmplcha02(
5617        self,
5618    ) -> crate::common::RegisterField<
5619        2,
5620        0x1,
5621        1,
5622        0,
5623        adcmplr0::Cmplcha02,
5624        adcmplr0::Cmplcha02,
5625        Adcmplr0_SPEC,
5626        crate::common::RW,
5627    > {
5628        crate::common::RegisterField::<
5629            2,
5630            0x1,
5631            1,
5632            0,
5633            adcmplr0::Cmplcha02,
5634            adcmplr0::Cmplcha02,
5635            Adcmplr0_SPEC,
5636            crate::common::RW,
5637        >::from_register(self, 0)
5638    }
5639
5640    #[doc = "Comparison condition of AN001"]
5641    #[inline(always)]
5642    pub fn cmplcha01(
5643        self,
5644    ) -> crate::common::RegisterField<
5645        1,
5646        0x1,
5647        1,
5648        0,
5649        adcmplr0::Cmplcha01,
5650        adcmplr0::Cmplcha01,
5651        Adcmplr0_SPEC,
5652        crate::common::RW,
5653    > {
5654        crate::common::RegisterField::<
5655            1,
5656            0x1,
5657            1,
5658            0,
5659            adcmplr0::Cmplcha01,
5660            adcmplr0::Cmplcha01,
5661            Adcmplr0_SPEC,
5662            crate::common::RW,
5663        >::from_register(self, 0)
5664    }
5665
5666    #[doc = "Comparison condition of AN000"]
5667    #[inline(always)]
5668    pub fn cmplcha00(
5669        self,
5670    ) -> crate::common::RegisterField<
5671        0,
5672        0x1,
5673        1,
5674        0,
5675        adcmplr0::Cmplcha00,
5676        adcmplr0::Cmplcha00,
5677        Adcmplr0_SPEC,
5678        crate::common::RW,
5679    > {
5680        crate::common::RegisterField::<
5681            0,
5682            0x1,
5683            1,
5684            0,
5685            adcmplr0::Cmplcha00,
5686            adcmplr0::Cmplcha00,
5687            Adcmplr0_SPEC,
5688            crate::common::RW,
5689        >::from_register(self, 0)
5690    }
5691}
5692impl ::core::default::Default for Adcmplr0 {
5693    #[inline(always)]
5694    fn default() -> Adcmplr0 {
5695        <crate::RegValueT<Adcmplr0_SPEC> as RegisterValue<_>>::new(0)
5696    }
5697}
5698pub mod adcmplr0 {
5699
5700    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5701    pub struct Cmplcha08_SPEC;
5702    pub type Cmplcha08 = crate::EnumBitfieldStruct<u8, Cmplcha08_SPEC>;
5703    impl Cmplcha08 {
5704        #[doc = "ADCMPDR0 value > A/D converted value (ADCMPCR.WCMPE=0) / A/D converted value < ADCMPDR0 value or, ADCMPDR1 value < A/D converted value (ADCMPCR.WCMPE=1)"]
5705        pub const _0: Self = Self::new(0);
5706
5707        #[doc = "ADCMPDR0 value < A/D converted value (ADCMPCR.WCMPE=0) / A/DCMPDR0 value < A/D converted value < ADCMPDR1 value (ADCMPCR.WCMPE=1)."]
5708        pub const _1: Self = Self::new(1);
5709    }
5710    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5711    pub struct Cmplcha07_SPEC;
5712    pub type Cmplcha07 = crate::EnumBitfieldStruct<u8, Cmplcha07_SPEC>;
5713    impl Cmplcha07 {
5714        #[doc = "ADCMPDR0 value > A/D converted value (ADCMPCR.WCMPE=0) / A/D converted value < ADCMPDR0 value or, ADCMPDR1 value < A/D converted value (ADCMPCR.WCMPE=1)"]
5715        pub const _0: Self = Self::new(0);
5716
5717        #[doc = "ADCMPDR0 value < A/D converted value (ADCMPCR.WCMPE=0) / A/DCMPDR0 value < A/D converted value < ADCMPDR1 value (ADCMPCR.WCMPE=1)."]
5718        pub const _1: Self = Self::new(1);
5719    }
5720    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5721    pub struct Cmplcha06_SPEC;
5722    pub type Cmplcha06 = crate::EnumBitfieldStruct<u8, Cmplcha06_SPEC>;
5723    impl Cmplcha06 {
5724        #[doc = "ADCMPDR0 value > A/D converted value (ADCMPCR.WCMPE=0) / A/D converted value < ADCMPDR0 value or, ADCMPDR1 value < A/D converted value (ADCMPCR.WCMPE=1)"]
5725        pub const _0: Self = Self::new(0);
5726
5727        #[doc = "ADCMPDR0 value < A/D converted value (ADCMPCR.WCMPE=0) / A/DCMPDR0 value < A/D converted value < ADCMPDR1 value (ADCMPCR.WCMPE=1)."]
5728        pub const _1: Self = Self::new(1);
5729    }
5730    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5731    pub struct Cmplcha05_SPEC;
5732    pub type Cmplcha05 = crate::EnumBitfieldStruct<u8, Cmplcha05_SPEC>;
5733    impl Cmplcha05 {
5734        #[doc = "ADCMPDR0 value > A/D converted value (ADCMPCR.WCMPE=0) / A/D converted value < ADCMPDR0 value or, ADCMPDR1 value < A/D converted value (ADCMPCR.WCMPE=1)"]
5735        pub const _0: Self = Self::new(0);
5736
5737        #[doc = "ADCMPDR0 value < A/D converted value (ADCMPCR.WCMPE=0) / A/DCMPDR0 value < A/D converted value < ADCMPDR1 value (ADCMPCR.WCMPE=1)."]
5738        pub const _1: Self = Self::new(1);
5739    }
5740    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5741    pub struct Cmplcha04_SPEC;
5742    pub type Cmplcha04 = crate::EnumBitfieldStruct<u8, Cmplcha04_SPEC>;
5743    impl Cmplcha04 {
5744        #[doc = "ADCMPDR0 value > A/D converted value (ADCMPCR.WCMPE=0) / A/D converted value < ADCMPDR0 value or, ADCMPDR1 value < A/D converted value (ADCMPCR.WCMPE=1)"]
5745        pub const _0: Self = Self::new(0);
5746
5747        #[doc = "ADCMPDR0 value < A/D converted value (ADCMPCR.WCMPE=0) / A/DCMPDR0 value < A/D converted value < ADCMPDR1 value (ADCMPCR.WCMPE=1)."]
5748        pub const _1: Self = Self::new(1);
5749    }
5750    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5751    pub struct Cmplcha03_SPEC;
5752    pub type Cmplcha03 = crate::EnumBitfieldStruct<u8, Cmplcha03_SPEC>;
5753    impl Cmplcha03 {
5754        #[doc = "ADCMPDR0 value > A/D converted value (ADCMPCR.WCMPE=0) / A/D converted value < ADCMPDR0 value or, ADCMPDR1 value < A/D converted value (ADCMPCR.WCMPE=1)"]
5755        pub const _0: Self = Self::new(0);
5756
5757        #[doc = "ADCMPDR0 value < A/D converted value (ADCMPCR.WCMPE=0) / A/DCMPDR0 value < A/D converted value < ADCMPDR1 value (ADCMPCR.WCMPE=1)."]
5758        pub const _1: Self = Self::new(1);
5759    }
5760    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5761    pub struct Cmplcha02_SPEC;
5762    pub type Cmplcha02 = crate::EnumBitfieldStruct<u8, Cmplcha02_SPEC>;
5763    impl Cmplcha02 {
5764        #[doc = "ADCMPDR0 value > A/D converted value (ADCMPCR.WCMPE=0) / A/D converted value < ADCMPDR0 value or, ADCMPDR1 value < A/D converted value (ADCMPCR.WCMPE=1)"]
5765        pub const _0: Self = Self::new(0);
5766
5767        #[doc = "ADCMPDR0 value < A/D converted value (ADCMPCR.WCMPE=0) / A/DCMPDR0 value < A/D converted value < ADCMPDR1 value (ADCMPCR.WCMPE=1)."]
5768        pub const _1: Self = Self::new(1);
5769    }
5770    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5771    pub struct Cmplcha01_SPEC;
5772    pub type Cmplcha01 = crate::EnumBitfieldStruct<u8, Cmplcha01_SPEC>;
5773    impl Cmplcha01 {
5774        #[doc = "ADCMPDR0 value > A/D converted value (ADCMPCR.WCMPE=0) / A/D converted value < ADCMPDR0 value or, ADCMPDR1 value < A/D converted value (ADCMPCR.WCMPE=1)"]
5775        pub const _0: Self = Self::new(0);
5776
5777        #[doc = "ADCMPDR0 value < A/D converted value (ADCMPCR.WCMPE=0) / A/DCMPDR0 value < A/D converted value < ADCMPDR1 value (ADCMPCR.WCMPE=1)."]
5778        pub const _1: Self = Self::new(1);
5779    }
5780    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5781    pub struct Cmplcha00_SPEC;
5782    pub type Cmplcha00 = crate::EnumBitfieldStruct<u8, Cmplcha00_SPEC>;
5783    impl Cmplcha00 {
5784        #[doc = "ADCMPDR0 value > A/D converted value (ADCMPCR.WCMPE=0) / A/D converted value < ADCMPDR0 value or, ADCMPDR1 value < A/D converted value (ADCMPCR.WCMPE=1)"]
5785        pub const _0: Self = Self::new(0);
5786
5787        #[doc = "ADCMPDR0 value < A/D converted value (ADCMPCR.WCMPE=0) / A/DCMPDR0 value < A/D converted value < ADCMPDR1 value (ADCMPCR.WCMPE=1)."]
5788        pub const _1: Self = Self::new(1);
5789    }
5790}
5791#[doc(hidden)]
5792#[derive(Copy, Clone, Eq, PartialEq)]
5793pub struct Adcmplr1_SPEC;
5794impl crate::sealed::RegSpec for Adcmplr1_SPEC {
5795    type DataType = u16;
5796}
5797
5798#[doc = "A/D Compare Function Window A Comparison Condition Setting Register 1"]
5799pub type Adcmplr1 = crate::RegValueT<Adcmplr1_SPEC>;
5800
5801impl Adcmplr1 {
5802    #[doc = "These bits are read as 0000000. The write value should be 0000000."]
5803    #[inline(always)]
5804    pub fn reserved(
5805        self,
5806    ) -> crate::common::RegisterField<9, 0x7f, 1, 0, u8, u8, Adcmplr1_SPEC, crate::common::RW> {
5807        crate::common::RegisterField::<9,0x7f,1,0,u8,u8,Adcmplr1_SPEC,crate::common::RW>::from_register(self,0)
5808    }
5809
5810    #[doc = "Comparison condition for AN024"]
5811    #[inline(always)]
5812    pub fn cmplcha24(
5813        self,
5814    ) -> crate::common::RegisterField<
5815        8,
5816        0x1,
5817        1,
5818        0,
5819        adcmplr1::Cmplcha24,
5820        adcmplr1::Cmplcha24,
5821        Adcmplr1_SPEC,
5822        crate::common::RW,
5823    > {
5824        crate::common::RegisterField::<
5825            8,
5826            0x1,
5827            1,
5828            0,
5829            adcmplr1::Cmplcha24,
5830            adcmplr1::Cmplcha24,
5831            Adcmplr1_SPEC,
5832            crate::common::RW,
5833        >::from_register(self, 0)
5834    }
5835
5836    #[doc = "Comparison condition for AN023"]
5837    #[inline(always)]
5838    pub fn cmplcha23(
5839        self,
5840    ) -> crate::common::RegisterField<
5841        7,
5842        0x1,
5843        1,
5844        0,
5845        adcmplr1::Cmplcha23,
5846        adcmplr1::Cmplcha23,
5847        Adcmplr1_SPEC,
5848        crate::common::RW,
5849    > {
5850        crate::common::RegisterField::<
5851            7,
5852            0x1,
5853            1,
5854            0,
5855            adcmplr1::Cmplcha23,
5856            adcmplr1::Cmplcha23,
5857            Adcmplr1_SPEC,
5858            crate::common::RW,
5859        >::from_register(self, 0)
5860    }
5861
5862    #[doc = "Comparison condition for AN022"]
5863    #[inline(always)]
5864    pub fn cmplcha22(
5865        self,
5866    ) -> crate::common::RegisterField<
5867        6,
5868        0x1,
5869        1,
5870        0,
5871        adcmplr1::Cmplcha22,
5872        adcmplr1::Cmplcha22,
5873        Adcmplr1_SPEC,
5874        crate::common::RW,
5875    > {
5876        crate::common::RegisterField::<
5877            6,
5878            0x1,
5879            1,
5880            0,
5881            adcmplr1::Cmplcha22,
5882            adcmplr1::Cmplcha22,
5883            Adcmplr1_SPEC,
5884            crate::common::RW,
5885        >::from_register(self, 0)
5886    }
5887
5888    #[doc = "Comparison condition for AN021"]
5889    #[inline(always)]
5890    pub fn cmplcha21(
5891        self,
5892    ) -> crate::common::RegisterField<
5893        5,
5894        0x1,
5895        1,
5896        0,
5897        adcmplr1::Cmplcha21,
5898        adcmplr1::Cmplcha21,
5899        Adcmplr1_SPEC,
5900        crate::common::RW,
5901    > {
5902        crate::common::RegisterField::<
5903            5,
5904            0x1,
5905            1,
5906            0,
5907            adcmplr1::Cmplcha21,
5908            adcmplr1::Cmplcha21,
5909            Adcmplr1_SPEC,
5910            crate::common::RW,
5911        >::from_register(self, 0)
5912    }
5913
5914    #[doc = "Comparison condition for AN020"]
5915    #[inline(always)]
5916    pub fn cmplcha20(
5917        self,
5918    ) -> crate::common::RegisterField<
5919        4,
5920        0x1,
5921        1,
5922        0,
5923        adcmplr1::Cmplcha20,
5924        adcmplr1::Cmplcha20,
5925        Adcmplr1_SPEC,
5926        crate::common::RW,
5927    > {
5928        crate::common::RegisterField::<
5929            4,
5930            0x1,
5931            1,
5932            0,
5933            adcmplr1::Cmplcha20,
5934            adcmplr1::Cmplcha20,
5935            Adcmplr1_SPEC,
5936            crate::common::RW,
5937        >::from_register(self, 0)
5938    }
5939
5940    #[doc = "Comparison condition for AN019"]
5941    #[inline(always)]
5942    pub fn cmplcha19(
5943        self,
5944    ) -> crate::common::RegisterField<
5945        3,
5946        0x1,
5947        1,
5948        0,
5949        adcmplr1::Cmplcha19,
5950        adcmplr1::Cmplcha19,
5951        Adcmplr1_SPEC,
5952        crate::common::RW,
5953    > {
5954        crate::common::RegisterField::<
5955            3,
5956            0x1,
5957            1,
5958            0,
5959            adcmplr1::Cmplcha19,
5960            adcmplr1::Cmplcha19,
5961            Adcmplr1_SPEC,
5962            crate::common::RW,
5963        >::from_register(self, 0)
5964    }
5965
5966    #[doc = "Comparison condition for AN018"]
5967    #[inline(always)]
5968    pub fn cmplcha18(
5969        self,
5970    ) -> crate::common::RegisterField<
5971        2,
5972        0x1,
5973        1,
5974        0,
5975        adcmplr1::Cmplcha18,
5976        adcmplr1::Cmplcha18,
5977        Adcmplr1_SPEC,
5978        crate::common::RW,
5979    > {
5980        crate::common::RegisterField::<
5981            2,
5982            0x1,
5983            1,
5984            0,
5985            adcmplr1::Cmplcha18,
5986            adcmplr1::Cmplcha18,
5987            Adcmplr1_SPEC,
5988            crate::common::RW,
5989        >::from_register(self, 0)
5990    }
5991
5992    #[doc = "Comparison condition for AN017"]
5993    #[inline(always)]
5994    pub fn cmplcha17(
5995        self,
5996    ) -> crate::common::RegisterField<
5997        1,
5998        0x1,
5999        1,
6000        0,
6001        adcmplr1::Cmplcha17,
6002        adcmplr1::Cmplcha17,
6003        Adcmplr1_SPEC,
6004        crate::common::RW,
6005    > {
6006        crate::common::RegisterField::<
6007            1,
6008            0x1,
6009            1,
6010            0,
6011            adcmplr1::Cmplcha17,
6012            adcmplr1::Cmplcha17,
6013            Adcmplr1_SPEC,
6014            crate::common::RW,
6015        >::from_register(self, 0)
6016    }
6017
6018    #[doc = "Comparison condition for AN016"]
6019    #[inline(always)]
6020    pub fn cmplcha16(
6021        self,
6022    ) -> crate::common::RegisterField<
6023        0,
6024        0x1,
6025        1,
6026        0,
6027        adcmplr1::Cmplcha16,
6028        adcmplr1::Cmplcha16,
6029        Adcmplr1_SPEC,
6030        crate::common::RW,
6031    > {
6032        crate::common::RegisterField::<
6033            0,
6034            0x1,
6035            1,
6036            0,
6037            adcmplr1::Cmplcha16,
6038            adcmplr1::Cmplcha16,
6039            Adcmplr1_SPEC,
6040            crate::common::RW,
6041        >::from_register(self, 0)
6042    }
6043}
6044impl ::core::default::Default for Adcmplr1 {
6045    #[inline(always)]
6046    fn default() -> Adcmplr1 {
6047        <crate::RegValueT<Adcmplr1_SPEC> as RegisterValue<_>>::new(0)
6048    }
6049}
6050pub mod adcmplr1 {
6051
6052    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6053    pub struct Cmplcha24_SPEC;
6054    pub type Cmplcha24 = crate::EnumBitfieldStruct<u8, Cmplcha24_SPEC>;
6055    impl Cmplcha24 {
6056        #[doc = "ADCMPDR0 value > A/D converted value (ADCMPCR.WCMPE=0) / A/D converted value < ADCMPDR0 value or, ADCMPDR1 value < A/D converted value (ADCMPCR.WCMPE=1)"]
6057        pub const _0: Self = Self::new(0);
6058
6059        #[doc = "ADCMPDR0 value < A/D converted value (ADCMPCR.WCMPE=0) / A/DCMPDR0 value < A/D converted value < ADCMPDR1 value (ADCMPCR.WCMPE=1)."]
6060        pub const _1: Self = Self::new(1);
6061    }
6062    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6063    pub struct Cmplcha23_SPEC;
6064    pub type Cmplcha23 = crate::EnumBitfieldStruct<u8, Cmplcha23_SPEC>;
6065    impl Cmplcha23 {
6066        #[doc = "ADCMPDR0 value > A/D converted value (ADCMPCR.WCMPE=0) / A/D converted value < ADCMPDR0 value or, ADCMPDR1 value < A/D converted value (ADCMPCR.WCMPE=1)"]
6067        pub const _0: Self = Self::new(0);
6068
6069        #[doc = "ADCMPDR0 value < A/D converted value (ADCMPCR.WCMPE=0) / A/DCMPDR0 value < A/D converted value < ADCMPDR1 value (ADCMPCR.WCMPE=1)."]
6070        pub const _1: Self = Self::new(1);
6071    }
6072    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6073    pub struct Cmplcha22_SPEC;
6074    pub type Cmplcha22 = crate::EnumBitfieldStruct<u8, Cmplcha22_SPEC>;
6075    impl Cmplcha22 {
6076        #[doc = "ADCMPDR0 value > A/D converted value (ADCMPCR.WCMPE=0) / A/D converted value < ADCMPDR0 value or, ADCMPDR1 value < A/D converted value (ADCMPCR.WCMPE=1)"]
6077        pub const _0: Self = Self::new(0);
6078
6079        #[doc = "ADCMPDR0 value < A/D converted value (ADCMPCR.WCMPE=0) / A/DCMPDR0 value < A/D converted value < ADCMPDR1 value (ADCMPCR.WCMPE=1)."]
6080        pub const _1: Self = Self::new(1);
6081    }
6082    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6083    pub struct Cmplcha21_SPEC;
6084    pub type Cmplcha21 = crate::EnumBitfieldStruct<u8, Cmplcha21_SPEC>;
6085    impl Cmplcha21 {
6086        #[doc = "ADCMPDR0 value > A/D converted value (ADCMPCR.WCMPE=0) / A/D converted value < ADCMPDR0 value or, ADCMPDR1 value < A/D converted value (ADCMPCR.WCMPE=1)"]
6087        pub const _0: Self = Self::new(0);
6088
6089        #[doc = "ADCMPDR0 value < A/D converted value (ADCMPCR.WCMPE=0) / A/DCMPDR0 value < A/D converted value < ADCMPDR1 value (ADCMPCR.WCMPE=1)."]
6090        pub const _1: Self = Self::new(1);
6091    }
6092    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6093    pub struct Cmplcha20_SPEC;
6094    pub type Cmplcha20 = crate::EnumBitfieldStruct<u8, Cmplcha20_SPEC>;
6095    impl Cmplcha20 {
6096        #[doc = "ADCMPDR0 value > A/D converted value (ADCMPCR.WCMPE=0) / A/D converted value < ADCMPDR0 value or, ADCMPDR1 value < A/D converted value (ADCMPCR.WCMPE=1)"]
6097        pub const _0: Self = Self::new(0);
6098
6099        #[doc = "ADCMPDR0 value < A/D converted value (ADCMPCR.WCMPE=0) / A/DCMPDR0 value < A/D converted value < ADCMPDR1 value (ADCMPCR.WCMPE=1)."]
6100        pub const _1: Self = Self::new(1);
6101    }
6102    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6103    pub struct Cmplcha19_SPEC;
6104    pub type Cmplcha19 = crate::EnumBitfieldStruct<u8, Cmplcha19_SPEC>;
6105    impl Cmplcha19 {
6106        #[doc = "ADCMPDR0 value > A/D converted value (ADCMPCR.WCMPE=0) / A/D converted value < ADCMPDR0 value or, ADCMPDR1 value < A/D converted value (ADCMPCR.WCMPE=1)"]
6107        pub const _0: Self = Self::new(0);
6108
6109        #[doc = "ADCMPDR0 value < A/D converted value (ADCMPCR.WCMPE=0) / A/DCMPDR0 value < A/D converted value < ADCMPDR1 value (ADCMPCR.WCMPE=1)."]
6110        pub const _1: Self = Self::new(1);
6111    }
6112    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6113    pub struct Cmplcha18_SPEC;
6114    pub type Cmplcha18 = crate::EnumBitfieldStruct<u8, Cmplcha18_SPEC>;
6115    impl Cmplcha18 {
6116        #[doc = "ADCMPDR0 value > A/D converted value (ADCMPCR.WCMPE=0) / A/D converted value < ADCMPDR0 value or, ADCMPDR1 value < A/D converted value (ADCMPCR.WCMPE=1)"]
6117        pub const _0: Self = Self::new(0);
6118
6119        #[doc = "ADCMPDR0 value < A/D converted value (ADCMPCR.WCMPE=0) / A/DCMPDR0 value < A/D converted value < ADCMPDR1 value (ADCMPCR.WCMPE=1)."]
6120        pub const _1: Self = Self::new(1);
6121    }
6122    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6123    pub struct Cmplcha17_SPEC;
6124    pub type Cmplcha17 = crate::EnumBitfieldStruct<u8, Cmplcha17_SPEC>;
6125    impl Cmplcha17 {
6126        #[doc = "ADCMPDR0 value > A/D converted value (ADCMPCR.WCMPE=0) / A/D converted value < ADCMPDR0 value or, ADCMPDR1 value < A/D converted value (ADCMPCR.WCMPE=1)"]
6127        pub const _0: Self = Self::new(0);
6128
6129        #[doc = "ADCMPDR0 value < A/D converted value (ADCMPCR.WCMPE=0) / A/DCMPDR0 value < A/D converted value < ADCMPDR1 value (ADCMPCR.WCMPE=1)."]
6130        pub const _1: Self = Self::new(1);
6131    }
6132    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6133    pub struct Cmplcha16_SPEC;
6134    pub type Cmplcha16 = crate::EnumBitfieldStruct<u8, Cmplcha16_SPEC>;
6135    impl Cmplcha16 {
6136        #[doc = "ADCMPDR0 value > A/D converted value (ADCMPCR.WCMPE=0) / A/D converted value < ADCMPDR0 value or, ADCMPDR1 value < A/D converted value (ADCMPCR.WCMPE=1)"]
6137        pub const _0: Self = Self::new(0);
6138
6139        #[doc = "ADCMPDR0 value < A/D converted value (ADCMPCR.WCMPE=0) / A/DCMPDR0 value < A/D converted value < ADCMPDR1 value (ADCMPCR.WCMPE=1)."]
6140        pub const _1: Self = Self::new(1);
6141    }
6142}
6143#[doc(hidden)]
6144#[derive(Copy, Clone, Eq, PartialEq)]
6145pub struct Adcmpdr0_SPEC;
6146impl crate::sealed::RegSpec for Adcmpdr0_SPEC {
6147    type DataType = u16;
6148}
6149
6150#[doc = "A/D Compare Function Window A Lower-Side Level Setting Register"]
6151pub type Adcmpdr0 = crate::RegValueT<Adcmpdr0_SPEC>;
6152
6153impl Adcmpdr0 {
6154    #[doc = "The ADCMPDR0 register sets the reference data when the compare window A function is used. ADCMPDR0 sets the lower-side level of window A."]
6155    #[inline(always)]
6156    pub fn adcmpdr0(
6157        self,
6158    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Adcmpdr0_SPEC, crate::common::RW>
6159    {
6160        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Adcmpdr0_SPEC,crate::common::RW>::from_register(self,0)
6161    }
6162}
6163impl ::core::default::Default for Adcmpdr0 {
6164    #[inline(always)]
6165    fn default() -> Adcmpdr0 {
6166        <crate::RegValueT<Adcmpdr0_SPEC> as RegisterValue<_>>::new(0)
6167    }
6168}
6169
6170#[doc(hidden)]
6171#[derive(Copy, Clone, Eq, PartialEq)]
6172pub struct Adcmpdr1_SPEC;
6173impl crate::sealed::RegSpec for Adcmpdr1_SPEC {
6174    type DataType = u16;
6175}
6176
6177#[doc = "A/D Compare Function Window A Upper-Side Level Setting Register"]
6178pub type Adcmpdr1 = crate::RegValueT<Adcmpdr1_SPEC>;
6179
6180impl Adcmpdr1 {
6181    #[doc = "The ADCMPDR1 register sets the reference data when the compare window A function is used. ADCMPDR1 sets the upper-side level of window A."]
6182    #[inline(always)]
6183    pub fn adcmpdr1(
6184        self,
6185    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Adcmpdr1_SPEC, crate::common::RW>
6186    {
6187        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Adcmpdr1_SPEC,crate::common::RW>::from_register(self,0)
6188    }
6189}
6190impl ::core::default::Default for Adcmpdr1 {
6191    #[inline(always)]
6192    fn default() -> Adcmpdr1 {
6193        <crate::RegValueT<Adcmpdr1_SPEC> as RegisterValue<_>>::new(0)
6194    }
6195}
6196
6197#[doc(hidden)]
6198#[derive(Copy, Clone, Eq, PartialEq)]
6199pub struct Adcmpsr0_SPEC;
6200impl crate::sealed::RegSpec for Adcmpsr0_SPEC {
6201    type DataType = u16;
6202}
6203
6204#[doc = "A/D Compare Function Window A Channel Status Register 0"]
6205pub type Adcmpsr0 = crate::RegValueT<Adcmpsr0_SPEC>;
6206
6207impl Adcmpsr0 {
6208    #[doc = "These bits are read as 0000000. The write value should be 0000000."]
6209    #[inline(always)]
6210    pub fn reserved(
6211        self,
6212    ) -> crate::common::RegisterField<9, 0x7f, 1, 0, u8, u8, Adcmpsr0_SPEC, crate::common::RW> {
6213        crate::common::RegisterField::<9,0x7f,1,0,u8,u8,Adcmpsr0_SPEC,crate::common::RW>::from_register(self,0)
6214    }
6215
6216    #[doc = "Compare window A flag for AN008"]
6217    #[inline(always)]
6218    pub fn cmpstcha08(
6219        self,
6220    ) -> crate::common::RegisterField<
6221        8,
6222        0x1,
6223        1,
6224        0,
6225        adcmpsr0::Cmpstcha08,
6226        adcmpsr0::Cmpstcha08,
6227        Adcmpsr0_SPEC,
6228        crate::common::RW,
6229    > {
6230        crate::common::RegisterField::<
6231            8,
6232            0x1,
6233            1,
6234            0,
6235            adcmpsr0::Cmpstcha08,
6236            adcmpsr0::Cmpstcha08,
6237            Adcmpsr0_SPEC,
6238            crate::common::RW,
6239        >::from_register(self, 0)
6240    }
6241
6242    #[doc = "Compare window A flag for AN007"]
6243    #[inline(always)]
6244    pub fn cmpstcha07(
6245        self,
6246    ) -> crate::common::RegisterField<
6247        7,
6248        0x1,
6249        1,
6250        0,
6251        adcmpsr0::Cmpstcha07,
6252        adcmpsr0::Cmpstcha07,
6253        Adcmpsr0_SPEC,
6254        crate::common::RW,
6255    > {
6256        crate::common::RegisterField::<
6257            7,
6258            0x1,
6259            1,
6260            0,
6261            adcmpsr0::Cmpstcha07,
6262            adcmpsr0::Cmpstcha07,
6263            Adcmpsr0_SPEC,
6264            crate::common::RW,
6265        >::from_register(self, 0)
6266    }
6267
6268    #[doc = "Compare window A flag for AN006"]
6269    #[inline(always)]
6270    pub fn cmpstcha06(
6271        self,
6272    ) -> crate::common::RegisterField<
6273        6,
6274        0x1,
6275        1,
6276        0,
6277        adcmpsr0::Cmpstcha06,
6278        adcmpsr0::Cmpstcha06,
6279        Adcmpsr0_SPEC,
6280        crate::common::RW,
6281    > {
6282        crate::common::RegisterField::<
6283            6,
6284            0x1,
6285            1,
6286            0,
6287            adcmpsr0::Cmpstcha06,
6288            adcmpsr0::Cmpstcha06,
6289            Adcmpsr0_SPEC,
6290            crate::common::RW,
6291        >::from_register(self, 0)
6292    }
6293
6294    #[doc = "Compare window A flag for AN005"]
6295    #[inline(always)]
6296    pub fn cmpstcha05(
6297        self,
6298    ) -> crate::common::RegisterField<
6299        5,
6300        0x1,
6301        1,
6302        0,
6303        adcmpsr0::Cmpstcha05,
6304        adcmpsr0::Cmpstcha05,
6305        Adcmpsr0_SPEC,
6306        crate::common::RW,
6307    > {
6308        crate::common::RegisterField::<
6309            5,
6310            0x1,
6311            1,
6312            0,
6313            adcmpsr0::Cmpstcha05,
6314            adcmpsr0::Cmpstcha05,
6315            Adcmpsr0_SPEC,
6316            crate::common::RW,
6317        >::from_register(self, 0)
6318    }
6319
6320    #[doc = "Compare window A flag for AN004"]
6321    #[inline(always)]
6322    pub fn cmpstcha04(
6323        self,
6324    ) -> crate::common::RegisterField<
6325        4,
6326        0x1,
6327        1,
6328        0,
6329        adcmpsr0::Cmpstcha04,
6330        adcmpsr0::Cmpstcha04,
6331        Adcmpsr0_SPEC,
6332        crate::common::RW,
6333    > {
6334        crate::common::RegisterField::<
6335            4,
6336            0x1,
6337            1,
6338            0,
6339            adcmpsr0::Cmpstcha04,
6340            adcmpsr0::Cmpstcha04,
6341            Adcmpsr0_SPEC,
6342            crate::common::RW,
6343        >::from_register(self, 0)
6344    }
6345
6346    #[doc = "Compare window A flag for AN003"]
6347    #[inline(always)]
6348    pub fn cmpstcha03(
6349        self,
6350    ) -> crate::common::RegisterField<
6351        3,
6352        0x1,
6353        1,
6354        0,
6355        adcmpsr0::Cmpstcha03,
6356        adcmpsr0::Cmpstcha03,
6357        Adcmpsr0_SPEC,
6358        crate::common::RW,
6359    > {
6360        crate::common::RegisterField::<
6361            3,
6362            0x1,
6363            1,
6364            0,
6365            adcmpsr0::Cmpstcha03,
6366            adcmpsr0::Cmpstcha03,
6367            Adcmpsr0_SPEC,
6368            crate::common::RW,
6369        >::from_register(self, 0)
6370    }
6371
6372    #[doc = "Compare window A flag for AN002"]
6373    #[inline(always)]
6374    pub fn cmpstcha02(
6375        self,
6376    ) -> crate::common::RegisterField<
6377        2,
6378        0x1,
6379        1,
6380        0,
6381        adcmpsr0::Cmpstcha02,
6382        adcmpsr0::Cmpstcha02,
6383        Adcmpsr0_SPEC,
6384        crate::common::RW,
6385    > {
6386        crate::common::RegisterField::<
6387            2,
6388            0x1,
6389            1,
6390            0,
6391            adcmpsr0::Cmpstcha02,
6392            adcmpsr0::Cmpstcha02,
6393            Adcmpsr0_SPEC,
6394            crate::common::RW,
6395        >::from_register(self, 0)
6396    }
6397
6398    #[doc = "Compare window A flag for AN001"]
6399    #[inline(always)]
6400    pub fn cmpstcha01(
6401        self,
6402    ) -> crate::common::RegisterField<
6403        1,
6404        0x1,
6405        1,
6406        0,
6407        adcmpsr0::Cmpstcha01,
6408        adcmpsr0::Cmpstcha01,
6409        Adcmpsr0_SPEC,
6410        crate::common::RW,
6411    > {
6412        crate::common::RegisterField::<
6413            1,
6414            0x1,
6415            1,
6416            0,
6417            adcmpsr0::Cmpstcha01,
6418            adcmpsr0::Cmpstcha01,
6419            Adcmpsr0_SPEC,
6420            crate::common::RW,
6421        >::from_register(self, 0)
6422    }
6423
6424    #[doc = "Compare window A flag for AN000"]
6425    #[inline(always)]
6426    pub fn cmpstcha00(
6427        self,
6428    ) -> crate::common::RegisterField<
6429        0,
6430        0x1,
6431        1,
6432        0,
6433        adcmpsr0::Cmpstcha00,
6434        adcmpsr0::Cmpstcha00,
6435        Adcmpsr0_SPEC,
6436        crate::common::RW,
6437    > {
6438        crate::common::RegisterField::<
6439            0,
6440            0x1,
6441            1,
6442            0,
6443            adcmpsr0::Cmpstcha00,
6444            adcmpsr0::Cmpstcha00,
6445            Adcmpsr0_SPEC,
6446            crate::common::RW,
6447        >::from_register(self, 0)
6448    }
6449}
6450impl ::core::default::Default for Adcmpsr0 {
6451    #[inline(always)]
6452    fn default() -> Adcmpsr0 {
6453        <crate::RegValueT<Adcmpsr0_SPEC> as RegisterValue<_>>::new(0)
6454    }
6455}
6456pub mod adcmpsr0 {
6457
6458    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6459    pub struct Cmpstcha08_SPEC;
6460    pub type Cmpstcha08 = crate::EnumBitfieldStruct<u8, Cmpstcha08_SPEC>;
6461    impl Cmpstcha08 {
6462        #[doc = "Comparison conditions are not met."]
6463        pub const _0: Self = Self::new(0);
6464
6465        #[doc = "Comparison conditions are met."]
6466        pub const _1: Self = Self::new(1);
6467    }
6468    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6469    pub struct Cmpstcha07_SPEC;
6470    pub type Cmpstcha07 = crate::EnumBitfieldStruct<u8, Cmpstcha07_SPEC>;
6471    impl Cmpstcha07 {
6472        #[doc = "Comparison conditions are not met."]
6473        pub const _0: Self = Self::new(0);
6474
6475        #[doc = "Comparison conditions are met."]
6476        pub const _1: Self = Self::new(1);
6477    }
6478    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6479    pub struct Cmpstcha06_SPEC;
6480    pub type Cmpstcha06 = crate::EnumBitfieldStruct<u8, Cmpstcha06_SPEC>;
6481    impl Cmpstcha06 {
6482        #[doc = "Comparison conditions are not met."]
6483        pub const _0: Self = Self::new(0);
6484
6485        #[doc = "Comparison conditions are met."]
6486        pub const _1: Self = Self::new(1);
6487    }
6488    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6489    pub struct Cmpstcha05_SPEC;
6490    pub type Cmpstcha05 = crate::EnumBitfieldStruct<u8, Cmpstcha05_SPEC>;
6491    impl Cmpstcha05 {
6492        #[doc = "Comparison conditions are not met."]
6493        pub const _0: Self = Self::new(0);
6494
6495        #[doc = "Comparison conditions are met."]
6496        pub const _1: Self = Self::new(1);
6497    }
6498    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6499    pub struct Cmpstcha04_SPEC;
6500    pub type Cmpstcha04 = crate::EnumBitfieldStruct<u8, Cmpstcha04_SPEC>;
6501    impl Cmpstcha04 {
6502        #[doc = "Comparison conditions are not met."]
6503        pub const _0: Self = Self::new(0);
6504
6505        #[doc = "Comparison conditions are met."]
6506        pub const _1: Self = Self::new(1);
6507    }
6508    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6509    pub struct Cmpstcha03_SPEC;
6510    pub type Cmpstcha03 = crate::EnumBitfieldStruct<u8, Cmpstcha03_SPEC>;
6511    impl Cmpstcha03 {
6512        #[doc = "Comparison conditions are not met."]
6513        pub const _0: Self = Self::new(0);
6514
6515        #[doc = "Comparison conditions are met."]
6516        pub const _1: Self = Self::new(1);
6517    }
6518    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6519    pub struct Cmpstcha02_SPEC;
6520    pub type Cmpstcha02 = crate::EnumBitfieldStruct<u8, Cmpstcha02_SPEC>;
6521    impl Cmpstcha02 {
6522        #[doc = "Comparison conditions are not met."]
6523        pub const _0: Self = Self::new(0);
6524
6525        #[doc = "Comparison conditions are met."]
6526        pub const _1: Self = Self::new(1);
6527    }
6528    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6529    pub struct Cmpstcha01_SPEC;
6530    pub type Cmpstcha01 = crate::EnumBitfieldStruct<u8, Cmpstcha01_SPEC>;
6531    impl Cmpstcha01 {
6532        #[doc = "Comparison conditions are not met."]
6533        pub const _0: Self = Self::new(0);
6534
6535        #[doc = "Comparison conditions are met."]
6536        pub const _1: Self = Self::new(1);
6537    }
6538    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6539    pub struct Cmpstcha00_SPEC;
6540    pub type Cmpstcha00 = crate::EnumBitfieldStruct<u8, Cmpstcha00_SPEC>;
6541    impl Cmpstcha00 {
6542        #[doc = "Comparison conditions are not met."]
6543        pub const _0: Self = Self::new(0);
6544
6545        #[doc = "Comparison conditions are met."]
6546        pub const _1: Self = Self::new(1);
6547    }
6548}
6549#[doc(hidden)]
6550#[derive(Copy, Clone, Eq, PartialEq)]
6551pub struct Adcmpsr1_SPEC;
6552impl crate::sealed::RegSpec for Adcmpsr1_SPEC {
6553    type DataType = u16;
6554}
6555
6556#[doc = "A/D Compare Function Window A Channel Status Register 1"]
6557pub type Adcmpsr1 = crate::RegValueT<Adcmpsr1_SPEC>;
6558
6559impl Adcmpsr1 {
6560    #[doc = "These bits are read as 0000000. The write value should be 0000000."]
6561    #[inline(always)]
6562    pub fn reserved(
6563        self,
6564    ) -> crate::common::RegisterField<9, 0x7f, 1, 0, u8, u8, Adcmpsr1_SPEC, crate::common::RW> {
6565        crate::common::RegisterField::<9,0x7f,1,0,u8,u8,Adcmpsr1_SPEC,crate::common::RW>::from_register(self,0)
6566    }
6567
6568    #[doc = "Compare window A flag for AN024"]
6569    #[inline(always)]
6570    pub fn cmpstcha24(
6571        self,
6572    ) -> crate::common::RegisterField<
6573        8,
6574        0x1,
6575        1,
6576        0,
6577        adcmpsr1::Cmpstcha24,
6578        adcmpsr1::Cmpstcha24,
6579        Adcmpsr1_SPEC,
6580        crate::common::RW,
6581    > {
6582        crate::common::RegisterField::<
6583            8,
6584            0x1,
6585            1,
6586            0,
6587            adcmpsr1::Cmpstcha24,
6588            adcmpsr1::Cmpstcha24,
6589            Adcmpsr1_SPEC,
6590            crate::common::RW,
6591        >::from_register(self, 0)
6592    }
6593
6594    #[doc = "Compare window A flag for AN023"]
6595    #[inline(always)]
6596    pub fn cmpstcha23(
6597        self,
6598    ) -> crate::common::RegisterField<
6599        7,
6600        0x1,
6601        1,
6602        0,
6603        adcmpsr1::Cmpstcha23,
6604        adcmpsr1::Cmpstcha23,
6605        Adcmpsr1_SPEC,
6606        crate::common::RW,
6607    > {
6608        crate::common::RegisterField::<
6609            7,
6610            0x1,
6611            1,
6612            0,
6613            adcmpsr1::Cmpstcha23,
6614            adcmpsr1::Cmpstcha23,
6615            Adcmpsr1_SPEC,
6616            crate::common::RW,
6617        >::from_register(self, 0)
6618    }
6619
6620    #[doc = "Compare window A flag for AN022"]
6621    #[inline(always)]
6622    pub fn cmpstcha22(
6623        self,
6624    ) -> crate::common::RegisterField<
6625        6,
6626        0x1,
6627        1,
6628        0,
6629        adcmpsr1::Cmpstcha22,
6630        adcmpsr1::Cmpstcha22,
6631        Adcmpsr1_SPEC,
6632        crate::common::RW,
6633    > {
6634        crate::common::RegisterField::<
6635            6,
6636            0x1,
6637            1,
6638            0,
6639            adcmpsr1::Cmpstcha22,
6640            adcmpsr1::Cmpstcha22,
6641            Adcmpsr1_SPEC,
6642            crate::common::RW,
6643        >::from_register(self, 0)
6644    }
6645
6646    #[doc = "Compare window A flag for AN021"]
6647    #[inline(always)]
6648    pub fn cmpstcha21(
6649        self,
6650    ) -> crate::common::RegisterField<
6651        5,
6652        0x1,
6653        1,
6654        0,
6655        adcmpsr1::Cmpstcha21,
6656        adcmpsr1::Cmpstcha21,
6657        Adcmpsr1_SPEC,
6658        crate::common::RW,
6659    > {
6660        crate::common::RegisterField::<
6661            5,
6662            0x1,
6663            1,
6664            0,
6665            adcmpsr1::Cmpstcha21,
6666            adcmpsr1::Cmpstcha21,
6667            Adcmpsr1_SPEC,
6668            crate::common::RW,
6669        >::from_register(self, 0)
6670    }
6671
6672    #[doc = "Compare window A flag for AN020"]
6673    #[inline(always)]
6674    pub fn cmpstcha20(
6675        self,
6676    ) -> crate::common::RegisterField<
6677        4,
6678        0x1,
6679        1,
6680        0,
6681        adcmpsr1::Cmpstcha20,
6682        adcmpsr1::Cmpstcha20,
6683        Adcmpsr1_SPEC,
6684        crate::common::RW,
6685    > {
6686        crate::common::RegisterField::<
6687            4,
6688            0x1,
6689            1,
6690            0,
6691            adcmpsr1::Cmpstcha20,
6692            adcmpsr1::Cmpstcha20,
6693            Adcmpsr1_SPEC,
6694            crate::common::RW,
6695        >::from_register(self, 0)
6696    }
6697
6698    #[doc = "Compare window A flag for AN019"]
6699    #[inline(always)]
6700    pub fn cmpstcha19(
6701        self,
6702    ) -> crate::common::RegisterField<
6703        3,
6704        0x1,
6705        1,
6706        0,
6707        adcmpsr1::Cmpstcha19,
6708        adcmpsr1::Cmpstcha19,
6709        Adcmpsr1_SPEC,
6710        crate::common::RW,
6711    > {
6712        crate::common::RegisterField::<
6713            3,
6714            0x1,
6715            1,
6716            0,
6717            adcmpsr1::Cmpstcha19,
6718            adcmpsr1::Cmpstcha19,
6719            Adcmpsr1_SPEC,
6720            crate::common::RW,
6721        >::from_register(self, 0)
6722    }
6723
6724    #[doc = "Compare window A flag for AN018"]
6725    #[inline(always)]
6726    pub fn cmpstcha18(
6727        self,
6728    ) -> crate::common::RegisterField<
6729        2,
6730        0x1,
6731        1,
6732        0,
6733        adcmpsr1::Cmpstcha18,
6734        adcmpsr1::Cmpstcha18,
6735        Adcmpsr1_SPEC,
6736        crate::common::RW,
6737    > {
6738        crate::common::RegisterField::<
6739            2,
6740            0x1,
6741            1,
6742            0,
6743            adcmpsr1::Cmpstcha18,
6744            adcmpsr1::Cmpstcha18,
6745            Adcmpsr1_SPEC,
6746            crate::common::RW,
6747        >::from_register(self, 0)
6748    }
6749
6750    #[doc = "Compare window A flag for AN017"]
6751    #[inline(always)]
6752    pub fn cmpstcha17(
6753        self,
6754    ) -> crate::common::RegisterField<
6755        1,
6756        0x1,
6757        1,
6758        0,
6759        adcmpsr1::Cmpstcha17,
6760        adcmpsr1::Cmpstcha17,
6761        Adcmpsr1_SPEC,
6762        crate::common::RW,
6763    > {
6764        crate::common::RegisterField::<
6765            1,
6766            0x1,
6767            1,
6768            0,
6769            adcmpsr1::Cmpstcha17,
6770            adcmpsr1::Cmpstcha17,
6771            Adcmpsr1_SPEC,
6772            crate::common::RW,
6773        >::from_register(self, 0)
6774    }
6775
6776    #[doc = "Compare window A flag for AN016"]
6777    #[inline(always)]
6778    pub fn cmpstcha16(
6779        self,
6780    ) -> crate::common::RegisterField<
6781        0,
6782        0x1,
6783        1,
6784        0,
6785        adcmpsr1::Cmpstcha16,
6786        adcmpsr1::Cmpstcha16,
6787        Adcmpsr1_SPEC,
6788        crate::common::RW,
6789    > {
6790        crate::common::RegisterField::<
6791            0,
6792            0x1,
6793            1,
6794            0,
6795            adcmpsr1::Cmpstcha16,
6796            adcmpsr1::Cmpstcha16,
6797            Adcmpsr1_SPEC,
6798            crate::common::RW,
6799        >::from_register(self, 0)
6800    }
6801}
6802impl ::core::default::Default for Adcmpsr1 {
6803    #[inline(always)]
6804    fn default() -> Adcmpsr1 {
6805        <crate::RegValueT<Adcmpsr1_SPEC> as RegisterValue<_>>::new(0)
6806    }
6807}
6808pub mod adcmpsr1 {
6809
6810    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6811    pub struct Cmpstcha24_SPEC;
6812    pub type Cmpstcha24 = crate::EnumBitfieldStruct<u8, Cmpstcha24_SPEC>;
6813    impl Cmpstcha24 {
6814        #[doc = "Comparison conditions are not met."]
6815        pub const _0: Self = Self::new(0);
6816
6817        #[doc = "Comparison conditions are met."]
6818        pub const _1: Self = Self::new(1);
6819    }
6820    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6821    pub struct Cmpstcha23_SPEC;
6822    pub type Cmpstcha23 = crate::EnumBitfieldStruct<u8, Cmpstcha23_SPEC>;
6823    impl Cmpstcha23 {
6824        #[doc = "Comparison conditions are not met."]
6825        pub const _0: Self = Self::new(0);
6826
6827        #[doc = "Comparison conditions are met."]
6828        pub const _1: Self = Self::new(1);
6829    }
6830    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6831    pub struct Cmpstcha22_SPEC;
6832    pub type Cmpstcha22 = crate::EnumBitfieldStruct<u8, Cmpstcha22_SPEC>;
6833    impl Cmpstcha22 {
6834        #[doc = "Comparison conditions are not met."]
6835        pub const _0: Self = Self::new(0);
6836
6837        #[doc = "Comparison conditions are met."]
6838        pub const _1: Self = Self::new(1);
6839    }
6840    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6841    pub struct Cmpstcha21_SPEC;
6842    pub type Cmpstcha21 = crate::EnumBitfieldStruct<u8, Cmpstcha21_SPEC>;
6843    impl Cmpstcha21 {
6844        #[doc = "Comparison conditions are not met."]
6845        pub const _0: Self = Self::new(0);
6846
6847        #[doc = "Comparison conditions are met."]
6848        pub const _1: Self = Self::new(1);
6849    }
6850    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6851    pub struct Cmpstcha20_SPEC;
6852    pub type Cmpstcha20 = crate::EnumBitfieldStruct<u8, Cmpstcha20_SPEC>;
6853    impl Cmpstcha20 {
6854        #[doc = "Comparison conditions are not met."]
6855        pub const _0: Self = Self::new(0);
6856
6857        #[doc = "Comparison conditions are met."]
6858        pub const _1: Self = Self::new(1);
6859    }
6860    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6861    pub struct Cmpstcha19_SPEC;
6862    pub type Cmpstcha19 = crate::EnumBitfieldStruct<u8, Cmpstcha19_SPEC>;
6863    impl Cmpstcha19 {
6864        #[doc = "Comparison conditions are not met."]
6865        pub const _0: Self = Self::new(0);
6866
6867        #[doc = "Comparison conditions are met."]
6868        pub const _1: Self = Self::new(1);
6869    }
6870    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6871    pub struct Cmpstcha18_SPEC;
6872    pub type Cmpstcha18 = crate::EnumBitfieldStruct<u8, Cmpstcha18_SPEC>;
6873    impl Cmpstcha18 {
6874        #[doc = "Comparison conditions are not met."]
6875        pub const _0: Self = Self::new(0);
6876
6877        #[doc = "Comparison conditions are met."]
6878        pub const _1: Self = Self::new(1);
6879    }
6880    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6881    pub struct Cmpstcha17_SPEC;
6882    pub type Cmpstcha17 = crate::EnumBitfieldStruct<u8, Cmpstcha17_SPEC>;
6883    impl Cmpstcha17 {
6884        #[doc = "Comparison conditions are not met."]
6885        pub const _0: Self = Self::new(0);
6886
6887        #[doc = "Comparison conditions are met."]
6888        pub const _1: Self = Self::new(1);
6889    }
6890    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6891    pub struct Cmpstcha16_SPEC;
6892    pub type Cmpstcha16 = crate::EnumBitfieldStruct<u8, Cmpstcha16_SPEC>;
6893    impl Cmpstcha16 {
6894        #[doc = "Comparison conditions are not met."]
6895        pub const _0: Self = Self::new(0);
6896
6897        #[doc = "Comparison conditions are met."]
6898        pub const _1: Self = Self::new(1);
6899    }
6900}
6901#[doc(hidden)]
6902#[derive(Copy, Clone, Eq, PartialEq)]
6903pub struct Adcmpser_SPEC;
6904impl crate::sealed::RegSpec for Adcmpser_SPEC {
6905    type DataType = u8;
6906}
6907
6908#[doc = "A/D Compare Function Window A Extended Input Channel Status Register"]
6909pub type Adcmpser = crate::RegValueT<Adcmpser_SPEC>;
6910
6911impl Adcmpser {
6912    #[doc = "These bits are read as 000000. The write value should be 000000."]
6913    #[inline(always)]
6914    pub fn reserved(
6915        self,
6916    ) -> crate::common::RegisterField<2, 0x3f, 1, 0, u8, u8, Adcmpser_SPEC, crate::common::RW> {
6917        crate::common::RegisterField::<2,0x3f,1,0,u8,u8,Adcmpser_SPEC,crate::common::RW>::from_register(self,0)
6918    }
6919
6920    #[doc = "Compare Window A Internal Reference Voltage Compare Flag When window A operation is enabled (ADCMPCR.CMPAE = 1b), this bit indicates the temperature sensor output comparison result. When window A operation is disabled (ADCMPCR.CMPAE = 0b), comparison conditions for CMPSTTSA are not met any time."]
6921    #[inline(always)]
6922    pub fn cmpstoca(
6923        self,
6924    ) -> crate::common::RegisterField<
6925        1,
6926        0x1,
6927        1,
6928        0,
6929        adcmpser::Cmpstoca,
6930        adcmpser::Cmpstoca,
6931        Adcmpser_SPEC,
6932        crate::common::RW,
6933    > {
6934        crate::common::RegisterField::<
6935            1,
6936            0x1,
6937            1,
6938            0,
6939            adcmpser::Cmpstoca,
6940            adcmpser::Cmpstoca,
6941            Adcmpser_SPEC,
6942            crate::common::RW,
6943        >::from_register(self, 0)
6944    }
6945
6946    #[doc = "Compare Window A Temperature Sensor Output Compare Flag When window A operation is enabled (ADCMPCR.CMPAE = 1b), this bit indicates the temperature sensor output comparison result. When window A operation is disabled (ADCMPCR.CMPAE = 0b), comparison conditions for CMPSTTSA are not met any time."]
6947    #[inline(always)]
6948    pub fn cmpsttsa(
6949        self,
6950    ) -> crate::common::RegisterField<
6951        0,
6952        0x1,
6953        1,
6954        0,
6955        adcmpser::Cmpsttsa,
6956        adcmpser::Cmpsttsa,
6957        Adcmpser_SPEC,
6958        crate::common::RW,
6959    > {
6960        crate::common::RegisterField::<
6961            0,
6962            0x1,
6963            1,
6964            0,
6965            adcmpser::Cmpsttsa,
6966            adcmpser::Cmpsttsa,
6967            Adcmpser_SPEC,
6968            crate::common::RW,
6969        >::from_register(self, 0)
6970    }
6971}
6972impl ::core::default::Default for Adcmpser {
6973    #[inline(always)]
6974    fn default() -> Adcmpser {
6975        <crate::RegValueT<Adcmpser_SPEC> as RegisterValue<_>>::new(0)
6976    }
6977}
6978pub mod adcmpser {
6979
6980    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6981    pub struct Cmpstoca_SPEC;
6982    pub type Cmpstoca = crate::EnumBitfieldStruct<u8, Cmpstoca_SPEC>;
6983    impl Cmpstoca {
6984        #[doc = "Comparison conditions are not met."]
6985        pub const _0: Self = Self::new(0);
6986
6987        #[doc = "Comparison conditions are met."]
6988        pub const _1: Self = Self::new(1);
6989    }
6990    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
6991    pub struct Cmpsttsa_SPEC;
6992    pub type Cmpsttsa = crate::EnumBitfieldStruct<u8, Cmpsttsa_SPEC>;
6993    impl Cmpsttsa {
6994        #[doc = "Comparison conditions are not met."]
6995        pub const _0: Self = Self::new(0);
6996
6997        #[doc = "Comparison conditions are met."]
6998        pub const _1: Self = Self::new(1);
6999    }
7000}
7001#[doc(hidden)]
7002#[derive(Copy, Clone, Eq, PartialEq)]
7003pub struct Adcmpbnsr_SPEC;
7004impl crate::sealed::RegSpec for Adcmpbnsr_SPEC {
7005    type DataType = u8;
7006}
7007
7008#[doc = "A/D Compare Function Window B Channel Selection Register"]
7009pub type Adcmpbnsr = crate::RegValueT<Adcmpbnsr_SPEC>;
7010
7011impl Adcmpbnsr {
7012    #[doc = "Compare window B Compare condition setting bit."]
7013    #[inline(always)]
7014    pub fn cmplb(
7015        self,
7016    ) -> crate::common::RegisterField<
7017        7,
7018        0x1,
7019        1,
7020        0,
7021        adcmpbnsr::Cmplb,
7022        adcmpbnsr::Cmplb,
7023        Adcmpbnsr_SPEC,
7024        crate::common::RW,
7025    > {
7026        crate::common::RegisterField::<
7027            7,
7028            0x1,
7029            1,
7030            0,
7031            adcmpbnsr::Cmplb,
7032            adcmpbnsr::Cmplb,
7033            Adcmpbnsr_SPEC,
7034            crate::common::RW,
7035        >::from_register(self, 0)
7036    }
7037
7038    #[doc = "This bit is read as 0. The write value should be 0."]
7039    #[inline(always)]
7040    pub fn reserved(
7041        self,
7042    ) -> crate::common::RegisterFieldBool<6, 1, 0, Adcmpbnsr_SPEC, crate::common::RW> {
7043        crate::common::RegisterFieldBool::<6,1,0,Adcmpbnsr_SPEC,crate::common::RW>::from_register(self,0)
7044    }
7045
7046    #[doc = "Compare window B channel selection bit.The channel that compares it on the condition of compare window B is selected."]
7047    #[inline(always)]
7048    pub fn cmpchb(
7049        self,
7050    ) -> crate::common::RegisterField<
7051        0,
7052        0x3f,
7053        1,
7054        0,
7055        adcmpbnsr::Cmpchb,
7056        adcmpbnsr::Cmpchb,
7057        Adcmpbnsr_SPEC,
7058        crate::common::RW,
7059    > {
7060        crate::common::RegisterField::<
7061            0,
7062            0x3f,
7063            1,
7064            0,
7065            adcmpbnsr::Cmpchb,
7066            adcmpbnsr::Cmpchb,
7067            Adcmpbnsr_SPEC,
7068            crate::common::RW,
7069        >::from_register(self, 0)
7070    }
7071}
7072impl ::core::default::Default for Adcmpbnsr {
7073    #[inline(always)]
7074    fn default() -> Adcmpbnsr {
7075        <crate::RegValueT<Adcmpbnsr_SPEC> as RegisterValue<_>>::new(0)
7076    }
7077}
7078pub mod adcmpbnsr {
7079
7080    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7081    pub struct Cmplb_SPEC;
7082    pub type Cmplb = crate::EnumBitfieldStruct<u8, Cmplb_SPEC>;
7083    impl Cmplb {
7084        #[doc = "CMPLLB value > A/D converted value (ADCMPCR.WCMPE=0) / A/D converted value < CMPLLB value or CMPULB value < A/D converted value  (ADCMPCR.WCMPE=1)"]
7085        pub const _0: Self = Self::new(0);
7086
7087        #[doc = "CMPLLB value < A/D converted value(ADCMPCR.WCMPE=0) / CMPLLB value < A/D converted value < CMPULB value (ADCMPCR.WCMPE=1)"]
7088        pub const _1: Self = Self::new(1);
7089    }
7090    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7091    pub struct Cmpchb_SPEC;
7092    pub type Cmpchb = crate::EnumBitfieldStruct<u8, Cmpchb_SPEC>;
7093    impl Cmpchb {
7094        #[doc = "AN000"]
7095        pub const _0_X_00: Self = Self::new(0);
7096
7097        #[doc = "AN001"]
7098        pub const _0_X_01: Self = Self::new(1);
7099
7100        #[doc = "AN002"]
7101        pub const _0_X_02: Self = Self::new(2);
7102
7103        #[doc = "AN003"]
7104        pub const _0_X_03: Self = Self::new(3);
7105
7106        #[doc = "AN004"]
7107        pub const _0_X_04: Self = Self::new(4);
7108
7109        #[doc = "AN005"]
7110        pub const _0_X_05: Self = Self::new(5);
7111
7112        #[doc = "AN006"]
7113        pub const _0_X_06: Self = Self::new(6);
7114
7115        #[doc = "AN007"]
7116        pub const _0_X_07: Self = Self::new(7);
7117
7118        #[doc = "AN008"]
7119        pub const _0_X_08: Self = Self::new(8);
7120
7121        #[doc = "AN016"]
7122        pub const _0_X_10: Self = Self::new(16);
7123
7124        #[doc = "AN017"]
7125        pub const _0_X_11: Self = Self::new(17);
7126
7127        #[doc = "AN018"]
7128        pub const _0_X_12: Self = Self::new(18);
7129
7130        #[doc = "AN019"]
7131        pub const _0_X_13: Self = Self::new(19);
7132
7133        #[doc = "AN020"]
7134        pub const _0_X_14: Self = Self::new(20);
7135
7136        #[doc = "AN021"]
7137        pub const _0_X_15: Self = Self::new(21);
7138
7139        #[doc = "AN022"]
7140        pub const _0_X_16: Self = Self::new(22);
7141
7142        #[doc = "AN023"]
7143        pub const _0_X_17: Self = Self::new(23);
7144
7145        #[doc = "Temperature sensor"]
7146        pub const _0_X_20: Self = Self::new(32);
7147
7148        #[doc = "Internal reference voltage"]
7149        pub const _0_X_21: Self = Self::new(33);
7150
7151        #[doc = "No channel is selected"]
7152        pub const _0_X_3_F: Self = Self::new(63);
7153    }
7154}
7155#[doc(hidden)]
7156#[derive(Copy, Clone, Eq, PartialEq)]
7157pub struct Adwinllb_SPEC;
7158impl crate::sealed::RegSpec for Adwinllb_SPEC {
7159    type DataType = u16;
7160}
7161
7162#[doc = "A/D Compare Function Window B Lower-Side Level Setting Register"]
7163pub type Adwinllb = crate::RegValueT<Adwinllb_SPEC>;
7164
7165impl Adwinllb {
7166    #[doc = "This register is used to compare A window function is used to set the lower level of the window B."]
7167    #[inline(always)]
7168    pub fn adwinllb(
7169        self,
7170    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Adwinllb_SPEC, crate::common::RW>
7171    {
7172        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Adwinllb_SPEC,crate::common::RW>::from_register(self,0)
7173    }
7174}
7175impl ::core::default::Default for Adwinllb {
7176    #[inline(always)]
7177    fn default() -> Adwinllb {
7178        <crate::RegValueT<Adwinllb_SPEC> as RegisterValue<_>>::new(0)
7179    }
7180}
7181
7182#[doc(hidden)]
7183#[derive(Copy, Clone, Eq, PartialEq)]
7184pub struct Adwinulb_SPEC;
7185impl crate::sealed::RegSpec for Adwinulb_SPEC {
7186    type DataType = u16;
7187}
7188
7189#[doc = "A/D Compare Function Window B Upper-Side Level Setting Register"]
7190pub type Adwinulb = crate::RegValueT<Adwinulb_SPEC>;
7191
7192impl Adwinulb {
7193    #[doc = "This register is used to compare A window function is used to set the higher level of the window B."]
7194    #[inline(always)]
7195    pub fn adwinulb(
7196        self,
7197    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Adwinulb_SPEC, crate::common::RW>
7198    {
7199        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Adwinulb_SPEC,crate::common::RW>::from_register(self,0)
7200    }
7201}
7202impl ::core::default::Default for Adwinulb {
7203    #[inline(always)]
7204    fn default() -> Adwinulb {
7205        <crate::RegValueT<Adwinulb_SPEC> as RegisterValue<_>>::new(0)
7206    }
7207}
7208
7209#[doc(hidden)]
7210#[derive(Copy, Clone, Eq, PartialEq)]
7211pub struct Adcmpbsr_SPEC;
7212impl crate::sealed::RegSpec for Adcmpbsr_SPEC {
7213    type DataType = u8;
7214}
7215
7216#[doc = "A/D Compare Function Window B Status Register"]
7217pub type Adcmpbsr = crate::RegValueT<Adcmpbsr_SPEC>;
7218
7219impl Adcmpbsr {
7220    #[doc = "These bits are read as 0000000. The write value should be 0000000."]
7221    #[inline(always)]
7222    pub fn reserved(
7223        self,
7224    ) -> crate::common::RegisterField<1, 0x7f, 1, 0, u8, u8, Adcmpbsr_SPEC, crate::common::RW> {
7225        crate::common::RegisterField::<1,0x7f,1,0,u8,u8,Adcmpbsr_SPEC,crate::common::RW>::from_register(self,0)
7226    }
7227
7228    #[doc = "Compare window B flagWhen window B operation is enabled (ADCMPCR.CMPBE = 1), this bit indicates the comparison result of channels AN000 to AN008, AN016 to AN023, reference voltage of SDADC24 (SBIAS/VREFI), temperature sensor output, and internal reference voltage to which window B comparison conditions are applied."]
7229    #[inline(always)]
7230    pub fn cmpstb(
7231        self,
7232    ) -> crate::common::RegisterField<
7233        0,
7234        0x1,
7235        1,
7236        0,
7237        adcmpbsr::Cmpstb,
7238        adcmpbsr::Cmpstb,
7239        Adcmpbsr_SPEC,
7240        crate::common::RW,
7241    > {
7242        crate::common::RegisterField::<
7243            0,
7244            0x1,
7245            1,
7246            0,
7247            adcmpbsr::Cmpstb,
7248            adcmpbsr::Cmpstb,
7249            Adcmpbsr_SPEC,
7250            crate::common::RW,
7251        >::from_register(self, 0)
7252    }
7253}
7254impl ::core::default::Default for Adcmpbsr {
7255    #[inline(always)]
7256    fn default() -> Adcmpbsr {
7257        <crate::RegValueT<Adcmpbsr_SPEC> as RegisterValue<_>>::new(0)
7258    }
7259}
7260pub mod adcmpbsr {
7261
7262    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7263    pub struct Cmpstb_SPEC;
7264    pub type Cmpstb = crate::EnumBitfieldStruct<u8, Cmpstb_SPEC>;
7265    impl Cmpstb {
7266        #[doc = "Comparison conditions are not met."]
7267        pub const _0: Self = Self::new(0);
7268
7269        #[doc = "Comparison conditions are met."]
7270        pub const _1: Self = Self::new(1);
7271    }
7272}
7273#[doc(hidden)]
7274#[derive(Copy, Clone, Eq, PartialEq)]
7275pub struct Adsstrl_SPEC;
7276impl crate::sealed::RegSpec for Adsstrl_SPEC {
7277    type DataType = u8;
7278}
7279
7280#[doc = "A/D Sampling State Register L"]
7281pub type Adsstrl = crate::RegValueT<Adsstrl_SPEC>;
7282
7283impl Adsstrl {
7284    #[doc = "Sampling Time Setting (AN016-AN023, SBIAS/VREFI)"]
7285    #[inline(always)]
7286    pub fn sst(
7287        self,
7288    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Adsstrl_SPEC, crate::common::RW> {
7289        crate::common::RegisterField::<0,0xff,1,0,u8,u8,Adsstrl_SPEC,crate::common::RW>::from_register(self,0)
7290    }
7291}
7292impl ::core::default::Default for Adsstrl {
7293    #[inline(always)]
7294    fn default() -> Adsstrl {
7295        <crate::RegValueT<Adsstrl_SPEC> as RegisterValue<_>>::new(13)
7296    }
7297}
7298
7299#[doc(hidden)]
7300#[derive(Copy, Clone, Eq, PartialEq)]
7301pub struct Adsstrt_SPEC;
7302impl crate::sealed::RegSpec for Adsstrt_SPEC {
7303    type DataType = u8;
7304}
7305
7306#[doc = "A/D Sampling State Register T"]
7307pub type Adsstrt = crate::RegValueT<Adsstrt_SPEC>;
7308
7309impl Adsstrt {
7310    #[doc = "Sampling Time Setting (Temperature sensor output)"]
7311    #[inline(always)]
7312    pub fn sst(
7313        self,
7314    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Adsstrt_SPEC, crate::common::RW> {
7315        crate::common::RegisterField::<0,0xff,1,0,u8,u8,Adsstrt_SPEC,crate::common::RW>::from_register(self,0)
7316    }
7317}
7318impl ::core::default::Default for Adsstrt {
7319    #[inline(always)]
7320    fn default() -> Adsstrt {
7321        <crate::RegValueT<Adsstrt_SPEC> as RegisterValue<_>>::new(13)
7322    }
7323}
7324
7325#[doc(hidden)]
7326#[derive(Copy, Clone, Eq, PartialEq)]
7327pub struct Adsstro_SPEC;
7328impl crate::sealed::RegSpec for Adsstro_SPEC {
7329    type DataType = u8;
7330}
7331
7332#[doc = "A/D Sampling State Register O"]
7333pub type Adsstro = crate::RegValueT<Adsstro_SPEC>;
7334
7335impl Adsstro {
7336    #[doc = "Sampling Time Setting (Internal reference voltage)"]
7337    #[inline(always)]
7338    pub fn sst(
7339        self,
7340    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Adsstro_SPEC, crate::common::RW> {
7341        crate::common::RegisterField::<0,0xff,1,0,u8,u8,Adsstro_SPEC,crate::common::RW>::from_register(self,0)
7342    }
7343}
7344impl ::core::default::Default for Adsstro {
7345    #[inline(always)]
7346    fn default() -> Adsstro {
7347        <crate::RegValueT<Adsstro_SPEC> as RegisterValue<_>>::new(13)
7348    }
7349}
7350
7351#[doc(hidden)]
7352#[derive(Copy, Clone, Eq, PartialEq)]
7353pub struct Adsstr0_SPEC;
7354impl crate::sealed::RegSpec for Adsstr0_SPEC {
7355    type DataType = u8;
7356}
7357
7358#[doc = "A/D Sampling State Register %s"]
7359pub type Adsstr0 = crate::RegValueT<Adsstr0_SPEC>;
7360
7361impl Adsstr0 {
7362    #[doc = "Sampling time setting"]
7363    #[inline(always)]
7364    pub fn sst(
7365        self,
7366    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Adsstr0_SPEC, crate::common::RW> {
7367        crate::common::RegisterField::<0,0xff,1,0,u8,u8,Adsstr0_SPEC,crate::common::RW>::from_register(self,0)
7368    }
7369}
7370impl ::core::default::Default for Adsstr0 {
7371    #[inline(always)]
7372    fn default() -> Adsstr0 {
7373        <crate::RegValueT<Adsstr0_SPEC> as RegisterValue<_>>::new(13)
7374    }
7375}
7376
7377#[doc(hidden)]
7378#[derive(Copy, Clone, Eq, PartialEq)]
7379pub struct Adanim_SPEC;
7380impl crate::sealed::RegSpec for Adanim_SPEC {
7381    type DataType = u16;
7382}
7383
7384#[doc = "A/D Channel Input Mode Select Register"]
7385pub type Adanim = crate::RegValueT<Adanim_SPEC>;
7386
7387impl Adanim {
7388    #[doc = "These bits are read as 000000000000. The write value should be 000000000000."]
7389    #[inline(always)]
7390    pub fn reserved(
7391        self,
7392    ) -> crate::common::RegisterField<4, 0xfff, 1, 0, u16, u16, Adanim_SPEC, crate::common::RW>
7393    {
7394        crate::common::RegisterField::<4,0xfff,1,0,u16,u16,Adanim_SPEC,crate::common::RW>::from_register(self,0)
7395    }
7396
7397    #[doc = "Analog Channel Input Mode Select"]
7398    #[inline(always)]
7399    pub fn anim(
7400        self,
7401    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Adanim_SPEC, crate::common::RW> {
7402        crate::common::RegisterField::<0,0xf,1,0,u8,u8,Adanim_SPEC,crate::common::RW>::from_register(self,0)
7403    }
7404}
7405impl ::core::default::Default for Adanim {
7406    #[inline(always)]
7407    fn default() -> Adanim {
7408        <crate::RegValueT<Adanim_SPEC> as RegisterValue<_>>::new(0)
7409    }
7410}
7411
7412#[doc(hidden)]
7413#[derive(Copy, Clone, Eq, PartialEq)]
7414pub struct Adcalexe_SPEC;
7415impl crate::sealed::RegSpec for Adcalexe_SPEC {
7416    type DataType = u8;
7417}
7418
7419#[doc = "A/D Calibration Execution Register"]
7420pub type Adcalexe = crate::RegValueT<Adcalexe_SPEC>;
7421
7422impl Adcalexe {
7423    #[doc = "Calibration Start"]
7424    #[inline(always)]
7425    pub fn calexe(
7426        self,
7427    ) -> crate::common::RegisterField<
7428        7,
7429        0x1,
7430        1,
7431        0,
7432        adcalexe::Calexe,
7433        adcalexe::Calexe,
7434        Adcalexe_SPEC,
7435        crate::common::RW,
7436    > {
7437        crate::common::RegisterField::<
7438            7,
7439            0x1,
7440            1,
7441            0,
7442            adcalexe::Calexe,
7443            adcalexe::Calexe,
7444            Adcalexe_SPEC,
7445            crate::common::RW,
7446        >::from_register(self, 0)
7447    }
7448
7449    #[doc = "Calibration Status Flag"]
7450    #[inline(always)]
7451    pub fn calmon(
7452        self,
7453    ) -> crate::common::RegisterField<
7454        6,
7455        0x1,
7456        1,
7457        0,
7458        adcalexe::Calmon,
7459        adcalexe::Calmon,
7460        Adcalexe_SPEC,
7461        crate::common::R,
7462    > {
7463        crate::common::RegisterField::<
7464            6,
7465            0x1,
7466            1,
7467            0,
7468            adcalexe::Calmon,
7469            adcalexe::Calmon,
7470            Adcalexe_SPEC,
7471            crate::common::R,
7472        >::from_register(self, 0)
7473    }
7474
7475    #[doc = "These bits are read as 000000. The write value should be 000000."]
7476    #[inline(always)]
7477    pub fn reserved(
7478        self,
7479    ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, Adcalexe_SPEC, crate::common::RW> {
7480        crate::common::RegisterField::<0,0x3f,1,0,u8,u8,Adcalexe_SPEC,crate::common::RW>::from_register(self,0)
7481    }
7482}
7483impl ::core::default::Default for Adcalexe {
7484    #[inline(always)]
7485    fn default() -> Adcalexe {
7486        <crate::RegValueT<Adcalexe_SPEC> as RegisterValue<_>>::new(0)
7487    }
7488}
7489pub mod adcalexe {
7490
7491    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7492    pub struct Calexe_SPEC;
7493    pub type Calexe = crate::EnumBitfieldStruct<u8, Calexe_SPEC>;
7494    impl Calexe {
7495        #[doc = "Calibration does not start"]
7496        pub const _0: Self = Self::new(0);
7497
7498        #[doc = "Calibration starts"]
7499        pub const _1: Self = Self::new(1);
7500    }
7501    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7502    pub struct Calmon_SPEC;
7503    pub type Calmon = crate::EnumBitfieldStruct<u8, Calmon_SPEC>;
7504    impl Calmon {
7505        #[doc = "Calibration is not in progress"]
7506        pub const _0: Self = Self::new(0);
7507
7508        #[doc = "Calibration is in progress"]
7509        pub const _1: Self = Self::new(1);
7510    }
7511}
7512#[doc(hidden)]
7513#[derive(Copy, Clone, Eq, PartialEq)]
7514pub struct Vrefampcnt_SPEC;
7515impl crate::sealed::RegSpec for Vrefampcnt_SPEC {
7516    type DataType = u8;
7517}
7518
7519#[doc = "A/D Dedicated Reference Voltage Circuit Control Register"]
7520pub type Vrefampcnt = crate::RegValueT<Vrefampcnt_SPEC>;
7521
7522impl Vrefampcnt {
7523    #[doc = "Sleep"]
7524    #[inline(always)]
7525    pub fn adslp(
7526        self,
7527    ) -> crate::common::RegisterField<
7528        7,
7529        0x1,
7530        1,
7531        0,
7532        vrefampcnt::Adslp,
7533        vrefampcnt::Adslp,
7534        Vrefampcnt_SPEC,
7535        crate::common::RW,
7536    > {
7537        crate::common::RegisterField::<
7538            7,
7539            0x1,
7540            1,
7541            0,
7542            vrefampcnt::Adslp,
7543            vrefampcnt::Adslp,
7544            Vrefampcnt_SPEC,
7545            crate::common::RW,
7546        >::from_register(self, 0)
7547    }
7548
7549    #[doc = "These bits are read as 00. The write value should be 00."]
7550    #[inline(always)]
7551    pub fn reserved(
7552        self,
7553    ) -> crate::common::RegisterField<5, 0x3, 1, 0, u8, u8, Vrefampcnt_SPEC, crate::common::RW>
7554    {
7555        crate::common::RegisterField::<5,0x3,1,0,u8,u8,Vrefampcnt_SPEC,crate::common::RW>::from_register(self,0)
7556    }
7557
7558    #[doc = "Low-Potential Reference Voltage Select"]
7559    #[inline(always)]
7560    pub fn bgren(
7561        self,
7562    ) -> crate::common::RegisterField<
7563        4,
7564        0x1,
7565        1,
7566        0,
7567        vrefampcnt::Bgren,
7568        vrefampcnt::Bgren,
7569        Vrefampcnt_SPEC,
7570        crate::common::RW,
7571    > {
7572        crate::common::RegisterField::<
7573            4,
7574            0x1,
7575            1,
7576            0,
7577            vrefampcnt::Bgren,
7578            vrefampcnt::Bgren,
7579            Vrefampcnt_SPEC,
7580            crate::common::RW,
7581        >::from_register(self, 0)
7582    }
7583
7584    #[doc = "VREFADCG Enable"]
7585    #[inline(always)]
7586    pub fn vrefadcen(
7587        self,
7588    ) -> crate::common::RegisterField<
7589        3,
7590        0x1,
7591        1,
7592        0,
7593        vrefampcnt::Vrefadcen,
7594        vrefampcnt::Vrefadcen,
7595        Vrefampcnt_SPEC,
7596        crate::common::RW,
7597    > {
7598        crate::common::RegisterField::<
7599            3,
7600            0x1,
7601            1,
7602            0,
7603            vrefampcnt::Vrefadcen,
7604            vrefampcnt::Vrefadcen,
7605            Vrefampcnt_SPEC,
7606            crate::common::RW,
7607        >::from_register(self, 0)
7608    }
7609
7610    #[doc = "VREFADC Output Voltage Control"]
7611    #[inline(always)]
7612    pub fn vrefadcg(
7613        self,
7614    ) -> crate::common::RegisterField<
7615        1,
7616        0x3,
7617        1,
7618        0,
7619        vrefampcnt::Vrefadcg,
7620        vrefampcnt::Vrefadcg,
7621        Vrefampcnt_SPEC,
7622        crate::common::RW,
7623    > {
7624        crate::common::RegisterField::<
7625            1,
7626            0x3,
7627            1,
7628            0,
7629            vrefampcnt::Vrefadcg,
7630            vrefampcnt::Vrefadcg,
7631            Vrefampcnt_SPEC,
7632            crate::common::RW,
7633        >::from_register(self, 0)
7634    }
7635
7636    #[doc = "OLDET Enable"]
7637    #[inline(always)]
7638    pub fn oldeten(
7639        self,
7640    ) -> crate::common::RegisterField<
7641        0,
7642        0x1,
7643        1,
7644        0,
7645        vrefampcnt::Oldeten,
7646        vrefampcnt::Oldeten,
7647        Vrefampcnt_SPEC,
7648        crate::common::RW,
7649    > {
7650        crate::common::RegisterField::<
7651            0,
7652            0x1,
7653            1,
7654            0,
7655            vrefampcnt::Oldeten,
7656            vrefampcnt::Oldeten,
7657            Vrefampcnt_SPEC,
7658            crate::common::RW,
7659        >::from_register(self, 0)
7660    }
7661}
7662impl ::core::default::Default for Vrefampcnt {
7663    #[inline(always)]
7664    fn default() -> Vrefampcnt {
7665        <crate::RegValueT<Vrefampcnt_SPEC> as RegisterValue<_>>::new(0)
7666    }
7667}
7668pub mod vrefampcnt {
7669
7670    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7671    pub struct Adslp_SPEC;
7672    pub type Adslp = crate::EnumBitfieldStruct<u8, Adslp_SPEC>;
7673    impl Adslp {
7674        #[doc = "Normal operation"]
7675        pub const _0: Self = Self::new(0);
7676
7677        #[doc = "Standby state"]
7678        pub const _1: Self = Self::new(1);
7679    }
7680    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7681    pub struct Bgren_SPEC;
7682    pub type Bgren = crate::EnumBitfieldStruct<u8, Bgren_SPEC>;
7683    impl Bgren {
7684        #[doc = "Select AVSS0 as the low-potential reference voltage"]
7685        pub const _0: Self = Self::new(0);
7686
7687        #[doc = "Select VREFL0 as the low-potential reference voltage."]
7688        pub const _1: Self = Self::new(1);
7689    }
7690    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7691    pub struct Vrefadcen_SPEC;
7692    pub type Vrefadcen = crate::EnumBitfieldStruct<u8, Vrefadcen_SPEC>;
7693    impl Vrefadcen {
7694        #[doc = "Disable the VREFADC output"]
7695        pub const _0: Self = Self::new(0);
7696
7697        #[doc = "Enable the VREFADC output"]
7698        pub const _1: Self = Self::new(1);
7699    }
7700    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7701    pub struct Vrefadcg_SPEC;
7702    pub type Vrefadcg = crate::EnumBitfieldStruct<u8, Vrefadcg_SPEC>;
7703    impl Vrefadcg {
7704        #[doc = "1.5 V"]
7705        pub const _00: Self = Self::new(0);
7706
7707        #[doc = "1.5 V"]
7708        pub const _01: Self = Self::new(1);
7709
7710        #[doc = "2.0 V"]
7711        pub const _10: Self = Self::new(2);
7712
7713        #[doc = "2.5 V"]
7714        pub const _11: Self = Self::new(3);
7715    }
7716    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7717    pub struct Oldeten_SPEC;
7718    pub type Oldeten = crate::EnumBitfieldStruct<u8, Oldeten_SPEC>;
7719    impl Oldeten {
7720        #[doc = "Disable the over current detection"]
7721        pub const _0: Self = Self::new(0);
7722
7723        #[doc = "Enable the over current detection"]
7724        pub const _1: Self = Self::new(1);
7725    }
7726}
7727#[doc(hidden)]
7728#[derive(Copy, Clone, Eq, PartialEq)]
7729pub struct Adrd_SPEC;
7730impl crate::sealed::RegSpec for Adrd_SPEC {
7731    type DataType = u16;
7732}
7733
7734#[doc = "A/D Self-Diagnosis Data Register"]
7735pub type Adrd = crate::RegValueT<Adrd_SPEC>;
7736
7737impl Adrd {
7738    #[doc = "The ADRD register is a 16-bit read-only register that holds the A/D conversion results based on the self-diagnosis of the ADC16."]
7739    #[inline(always)]
7740    pub fn adrd(
7741        self,
7742    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Adrd_SPEC, crate::common::R> {
7743        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Adrd_SPEC,crate::common::R>::from_register(self,0)
7744    }
7745}
7746impl ::core::default::Default for Adrd {
7747    #[inline(always)]
7748    fn default() -> Adrd {
7749        <crate::RegValueT<Adrd_SPEC> as RegisterValue<_>>::new(0)
7750    }
7751}
7752
7753#[doc(hidden)]
7754#[derive(Copy, Clone, Eq, PartialEq)]
7755pub struct Adrst_SPEC;
7756impl crate::sealed::RegSpec for Adrst_SPEC {
7757    type DataType = u8;
7758}
7759
7760#[doc = "A/D Self-Diagnostic Status Register"]
7761pub type Adrst = crate::RegValueT<Adrst_SPEC>;
7762
7763impl Adrst {
7764    #[doc = "These bits are read as 000000. The write value should be 000000."]
7765    #[inline(always)]
7766    pub fn reserved(
7767        self,
7768    ) -> crate::common::RegisterField<2, 0x3f, 1, 0, u8, u8, Adrst_SPEC, crate::common::RW> {
7769        crate::common::RegisterField::<2,0x3f,1,0,u8,u8,Adrst_SPEC,crate::common::RW>::from_register(self,0)
7770    }
7771
7772    #[doc = "Self-Diagnosis Status"]
7773    #[inline(always)]
7774    pub fn diagst(
7775        self,
7776    ) -> crate::common::RegisterField<
7777        0,
7778        0x3,
7779        1,
7780        0,
7781        adrst::Diagst,
7782        adrst::Diagst,
7783        Adrst_SPEC,
7784        crate::common::RW,
7785    > {
7786        crate::common::RegisterField::<
7787            0,
7788            0x3,
7789            1,
7790            0,
7791            adrst::Diagst,
7792            adrst::Diagst,
7793            Adrst_SPEC,
7794            crate::common::RW,
7795        >::from_register(self, 0)
7796    }
7797}
7798impl ::core::default::Default for Adrst {
7799    #[inline(always)]
7800    fn default() -> Adrst {
7801        <crate::RegValueT<Adrst_SPEC> as RegisterValue<_>>::new(0)
7802    }
7803}
7804pub mod adrst {
7805
7806    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
7807    pub struct Diagst_SPEC;
7808    pub type Diagst = crate::EnumBitfieldStruct<u8, Diagst_SPEC>;
7809    impl Diagst {
7810        #[doc = "Self-diagnosis has not been executed since power-on"]
7811        pub const _00: Self = Self::new(0);
7812
7813        #[doc = "Self-diagnosis was executed under a condition that an ideal value of the A/D conversion result is 8000h"]
7814        pub const _01: Self = Self::new(1);
7815
7816        #[doc = "Self-diagnosis was executed under a condition that an ideal value of the A/D conversion result is 0000h"]
7817        pub const _10: Self = Self::new(2);
7818
7819        #[doc = "Self-diagnosis was executed under a condition that an ideal value of the A/D conversion result is 7FFFh."]
7820        pub const _11: Self = Self::new(3);
7821    }
7822}