Skip to main content

ra4e1_pac/
adc120.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.20.00, with svd2pac 0.6.1 on Sun, 15 Mar 2026 07:04:18 +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"12-bit A/D Converter"]
28unsafe impl ::core::marker::Send for super::Adc120 {}
29unsafe impl ::core::marker::Sync for super::Adc120 {}
30impl super::Adc120 {
31    #[allow(unused)]
32    #[inline(always)]
33    pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34        self.ptr
35    }
36
37    #[doc = "A/D Control Register"]
38    #[inline(always)]
39    pub const fn adcsr(&self) -> &'static crate::common::Reg<self::Adcsr_SPEC, crate::common::RW> {
40        unsafe {
41            crate::common::Reg::<self::Adcsr_SPEC, crate::common::RW>::from_ptr(
42                self._svd2pac_as_ptr().add(0usize),
43            )
44        }
45    }
46
47    #[doc = "A/D Channel Select Register A0"]
48    #[inline(always)]
49    pub const fn adansa0(
50        &self,
51    ) -> &'static crate::common::Reg<self::Adansa0_SPEC, crate::common::RW> {
52        unsafe {
53            crate::common::Reg::<self::Adansa0_SPEC, crate::common::RW>::from_ptr(
54                self._svd2pac_as_ptr().add(4usize),
55            )
56        }
57    }
58
59    #[doc = "A/D Channel Select Register A1"]
60    #[inline(always)]
61    pub const fn adansa1(
62        &self,
63    ) -> &'static crate::common::Reg<self::Adansa1_SPEC, crate::common::RW> {
64        unsafe {
65            crate::common::Reg::<self::Adansa1_SPEC, crate::common::RW>::from_ptr(
66                self._svd2pac_as_ptr().add(6usize),
67            )
68        }
69    }
70
71    #[doc = "A/D-Converted Value Addition/Average Channel Select Register 0"]
72    #[inline(always)]
73    pub const fn adads0(
74        &self,
75    ) -> &'static crate::common::Reg<self::Adads0_SPEC, crate::common::RW> {
76        unsafe {
77            crate::common::Reg::<self::Adads0_SPEC, crate::common::RW>::from_ptr(
78                self._svd2pac_as_ptr().add(8usize),
79            )
80        }
81    }
82
83    #[doc = "A/D-Converted Value Addition/Average Channel Select Register 1"]
84    #[inline(always)]
85    pub const fn adads1(
86        &self,
87    ) -> &'static crate::common::Reg<self::Adads1_SPEC, crate::common::RW> {
88        unsafe {
89            crate::common::Reg::<self::Adads1_SPEC, crate::common::RW>::from_ptr(
90                self._svd2pac_as_ptr().add(10usize),
91            )
92        }
93    }
94
95    #[doc = "A/D-Converted Value Addition/Average Count Select Register"]
96    #[inline(always)]
97    pub const fn adadc(&self) -> &'static crate::common::Reg<self::Adadc_SPEC, crate::common::RW> {
98        unsafe {
99            crate::common::Reg::<self::Adadc_SPEC, crate::common::RW>::from_ptr(
100                self._svd2pac_as_ptr().add(12usize),
101            )
102        }
103    }
104
105    #[doc = "A/D Control Extended Register"]
106    #[inline(always)]
107    pub const fn adcer(&self) -> &'static crate::common::Reg<self::Adcer_SPEC, crate::common::RW> {
108        unsafe {
109            crate::common::Reg::<self::Adcer_SPEC, crate::common::RW>::from_ptr(
110                self._svd2pac_as_ptr().add(14usize),
111            )
112        }
113    }
114
115    #[doc = "A/D Conversion Start Trigger Select Register"]
116    #[inline(always)]
117    pub const fn adstrgr(
118        &self,
119    ) -> &'static crate::common::Reg<self::Adstrgr_SPEC, crate::common::RW> {
120        unsafe {
121            crate::common::Reg::<self::Adstrgr_SPEC, crate::common::RW>::from_ptr(
122                self._svd2pac_as_ptr().add(16usize),
123            )
124        }
125    }
126
127    #[doc = "A/D Conversion Extended Input Control Registers"]
128    #[inline(always)]
129    pub const fn adexicr(
130        &self,
131    ) -> &'static crate::common::Reg<self::Adexicr_SPEC, crate::common::RW> {
132        unsafe {
133            crate::common::Reg::<self::Adexicr_SPEC, crate::common::RW>::from_ptr(
134                self._svd2pac_as_ptr().add(18usize),
135            )
136        }
137    }
138
139    #[doc = "A/D Channel Select Register B0"]
140    #[inline(always)]
141    pub const fn adansb0(
142        &self,
143    ) -> &'static crate::common::Reg<self::Adansb0_SPEC, crate::common::RW> {
144        unsafe {
145            crate::common::Reg::<self::Adansb0_SPEC, crate::common::RW>::from_ptr(
146                self._svd2pac_as_ptr().add(20usize),
147            )
148        }
149    }
150
151    #[doc = "A/D Channel Select Register B1"]
152    #[inline(always)]
153    pub const fn adansb1(
154        &self,
155    ) -> &'static crate::common::Reg<self::Adansb1_SPEC, crate::common::RW> {
156        unsafe {
157            crate::common::Reg::<self::Adansb1_SPEC, crate::common::RW>::from_ptr(
158                self._svd2pac_as_ptr().add(22usize),
159            )
160        }
161    }
162
163    #[doc = "A/D Data Duplexing Register"]
164    #[inline(always)]
165    pub const fn addbldr(
166        &self,
167    ) -> &'static crate::common::Reg<self::Addbldr_SPEC, crate::common::R> {
168        unsafe {
169            crate::common::Reg::<self::Addbldr_SPEC, crate::common::R>::from_ptr(
170                self._svd2pac_as_ptr().add(24usize),
171            )
172        }
173    }
174
175    #[doc = "A/D Internal Reference Voltage Data Register"]
176    #[inline(always)]
177    pub const fn adocdr(&self) -> &'static crate::common::Reg<self::Adocdr_SPEC, crate::common::R> {
178        unsafe {
179            crate::common::Reg::<self::Adocdr_SPEC, crate::common::R>::from_ptr(
180                self._svd2pac_as_ptr().add(28usize),
181            )
182        }
183    }
184
185    #[doc = "A/D Self-Diagnosis Data Register"]
186    #[inline(always)]
187    pub const fn adrd(&self) -> &'static crate::common::Reg<self::Adrd_SPEC, crate::common::R> {
188        unsafe {
189            crate::common::Reg::<self::Adrd_SPEC, crate::common::R>::from_ptr(
190                self._svd2pac_as_ptr().add(30usize),
191            )
192        }
193    }
194
195    #[doc = "A/D Data Registers %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        3,
202        0x2,
203    > {
204        unsafe {
205            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x36usize))
206        }
207    }
208    #[inline(always)]
209    pub const fn addr11(&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(0x36usize),
213            )
214        }
215    }
216    #[inline(always)]
217    pub const fn addr12(&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(0x38usize),
221            )
222        }
223    }
224    #[inline(always)]
225    pub const fn addr13(&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(0x3ausize),
229            )
230        }
231    }
232
233    #[doc = "A/D Data Registers 16"]
234    #[inline(always)]
235    pub const fn addr16(&self) -> &'static crate::common::Reg<self::Addr16_SPEC, crate::common::R> {
236        unsafe {
237            crate::common::Reg::<self::Addr16_SPEC, crate::common::R>::from_ptr(
238                self._svd2pac_as_ptr().add(64usize),
239            )
240        }
241    }
242
243    #[doc = "A/D Disconnection Detection Control Register"]
244    #[inline(always)]
245    pub const fn addiscr(
246        &self,
247    ) -> &'static crate::common::Reg<self::Addiscr_SPEC, crate::common::RW> {
248        unsafe {
249            crate::common::Reg::<self::Addiscr_SPEC, crate::common::RW>::from_ptr(
250                self._svd2pac_as_ptr().add(122usize),
251            )
252        }
253    }
254
255    #[doc = "A/D Group Scan Priority Control Register"]
256    #[inline(always)]
257    pub const fn adgspcr(
258        &self,
259    ) -> &'static crate::common::Reg<self::Adgspcr_SPEC, crate::common::RW> {
260        unsafe {
261            crate::common::Reg::<self::Adgspcr_SPEC, crate::common::RW>::from_ptr(
262                self._svd2pac_as_ptr().add(128usize),
263            )
264        }
265    }
266
267    #[doc = "A/D Data Duplexing Register A"]
268    #[inline(always)]
269    pub const fn addbldra(
270        &self,
271    ) -> &'static crate::common::Reg<self::Addbldra_SPEC, crate::common::R> {
272        unsafe {
273            crate::common::Reg::<self::Addbldra_SPEC, crate::common::R>::from_ptr(
274                self._svd2pac_as_ptr().add(132usize),
275            )
276        }
277    }
278
279    #[doc = "A/D Data Duplexing Register B"]
280    #[inline(always)]
281    pub const fn addbldrb(
282        &self,
283    ) -> &'static crate::common::Reg<self::Addbldrb_SPEC, crate::common::R> {
284        unsafe {
285            crate::common::Reg::<self::Addbldrb_SPEC, crate::common::R>::from_ptr(
286                self._svd2pac_as_ptr().add(134usize),
287            )
288        }
289    }
290
291    #[doc = "A/D Compare Function Window A/B Status Monitor Register"]
292    #[inline(always)]
293    pub const fn adwinmon(
294        &self,
295    ) -> &'static crate::common::Reg<self::Adwinmon_SPEC, crate::common::R> {
296        unsafe {
297            crate::common::Reg::<self::Adwinmon_SPEC, crate::common::R>::from_ptr(
298                self._svd2pac_as_ptr().add(140usize),
299            )
300        }
301    }
302
303    #[doc = "A/D Compare Function Control Register"]
304    #[inline(always)]
305    pub const fn adcmpcr(
306        &self,
307    ) -> &'static crate::common::Reg<self::Adcmpcr_SPEC, crate::common::RW> {
308        unsafe {
309            crate::common::Reg::<self::Adcmpcr_SPEC, crate::common::RW>::from_ptr(
310                self._svd2pac_as_ptr().add(144usize),
311            )
312        }
313    }
314
315    #[doc = "A/D Compare Function Window A Extended Input Select Register"]
316    #[inline(always)]
317    pub const fn adcmpanser(
318        &self,
319    ) -> &'static crate::common::Reg<self::Adcmpanser_SPEC, crate::common::RW> {
320        unsafe {
321            crate::common::Reg::<self::Adcmpanser_SPEC, crate::common::RW>::from_ptr(
322                self._svd2pac_as_ptr().add(146usize),
323            )
324        }
325    }
326
327    #[doc = "A/D Compare Function Window A Extended Input Comparison Condition Setting Register"]
328    #[inline(always)]
329    pub const fn adcmpler(
330        &self,
331    ) -> &'static crate::common::Reg<self::Adcmpler_SPEC, crate::common::RW> {
332        unsafe {
333            crate::common::Reg::<self::Adcmpler_SPEC, crate::common::RW>::from_ptr(
334                self._svd2pac_as_ptr().add(147usize),
335            )
336        }
337    }
338
339    #[doc = "A/D Compare Function Window A Channel Select Register 0"]
340    #[inline(always)]
341    pub const fn adcmpansr0(
342        &self,
343    ) -> &'static crate::common::Reg<self::Adcmpansr0_SPEC, crate::common::RW> {
344        unsafe {
345            crate::common::Reg::<self::Adcmpansr0_SPEC, crate::common::RW>::from_ptr(
346                self._svd2pac_as_ptr().add(148usize),
347            )
348        }
349    }
350
351    #[doc = "A/D Compare Function Window A Channel Select Register 1"]
352    #[inline(always)]
353    pub const fn adcmpansr1(
354        &self,
355    ) -> &'static crate::common::Reg<self::Adcmpansr1_SPEC, crate::common::RW> {
356        unsafe {
357            crate::common::Reg::<self::Adcmpansr1_SPEC, crate::common::RW>::from_ptr(
358                self._svd2pac_as_ptr().add(150usize),
359            )
360        }
361    }
362
363    #[doc = "A/D Compare Function Window A Comparison Condition Setting Register 0"]
364    #[inline(always)]
365    pub const fn adcmplr0(
366        &self,
367    ) -> &'static crate::common::Reg<self::Adcmplr0_SPEC, crate::common::RW> {
368        unsafe {
369            crate::common::Reg::<self::Adcmplr0_SPEC, crate::common::RW>::from_ptr(
370                self._svd2pac_as_ptr().add(152usize),
371            )
372        }
373    }
374
375    #[doc = "A/D Compare Function Window A Comparison Condition Setting Register 1"]
376    #[inline(always)]
377    pub const fn adcmplr1(
378        &self,
379    ) -> &'static crate::common::Reg<self::Adcmplr1_SPEC, crate::common::RW> {
380        unsafe {
381            crate::common::Reg::<self::Adcmplr1_SPEC, crate::common::RW>::from_ptr(
382                self._svd2pac_as_ptr().add(154usize),
383            )
384        }
385    }
386
387    #[doc = "A/D Compare Function Window A Lower-Side/Upper-Side Level Setting Register"]
388    #[inline(always)]
389    pub const fn adcmpdr(
390        &self,
391    ) -> &'static crate::common::ClusterRegisterArray<
392        crate::common::Reg<self::Adcmpdr_SPEC, crate::common::RW>,
393        2,
394        0x2,
395    > {
396        unsafe {
397            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0x9cusize))
398        }
399    }
400    #[inline(always)]
401    pub const fn adcmpdr0(
402        &self,
403    ) -> &'static crate::common::Reg<self::Adcmpdr_SPEC, crate::common::RW> {
404        unsafe {
405            crate::common::Reg::<self::Adcmpdr_SPEC, crate::common::RW>::from_ptr(
406                self._svd2pac_as_ptr().add(0x9cusize),
407            )
408        }
409    }
410    #[inline(always)]
411    pub const fn adcmpdr1(
412        &self,
413    ) -> &'static crate::common::Reg<self::Adcmpdr_SPEC, crate::common::RW> {
414        unsafe {
415            crate::common::Reg::<self::Adcmpdr_SPEC, crate::common::RW>::from_ptr(
416                self._svd2pac_as_ptr().add(0x9eusize),
417            )
418        }
419    }
420
421    #[doc = "A/D Compare Function Window A Channel Status Register 0"]
422    #[inline(always)]
423    pub const fn adcmpsr0(
424        &self,
425    ) -> &'static crate::common::Reg<self::Adcmpsr0_SPEC, crate::common::RW> {
426        unsafe {
427            crate::common::Reg::<self::Adcmpsr0_SPEC, crate::common::RW>::from_ptr(
428                self._svd2pac_as_ptr().add(160usize),
429            )
430        }
431    }
432
433    #[doc = "A/D Compare Function Window A Channel Status Register1"]
434    #[inline(always)]
435    pub const fn adcmpsr1(
436        &self,
437    ) -> &'static crate::common::Reg<self::Adcmpsr1_SPEC, crate::common::RW> {
438        unsafe {
439            crate::common::Reg::<self::Adcmpsr1_SPEC, crate::common::RW>::from_ptr(
440                self._svd2pac_as_ptr().add(162usize),
441            )
442        }
443    }
444
445    #[doc = "A/D Compare Function Window A Extended Input Channel Status Register"]
446    #[inline(always)]
447    pub const fn adcmpser(
448        &self,
449    ) -> &'static crate::common::Reg<self::Adcmpser_SPEC, crate::common::RW> {
450        unsafe {
451            crate::common::Reg::<self::Adcmpser_SPEC, crate::common::RW>::from_ptr(
452                self._svd2pac_as_ptr().add(164usize),
453            )
454        }
455    }
456
457    #[doc = "A/D Compare Function Window B Channel Select Register"]
458    #[inline(always)]
459    pub const fn adcmpbnsr(
460        &self,
461    ) -> &'static crate::common::Reg<self::Adcmpbnsr_SPEC, crate::common::RW> {
462        unsafe {
463            crate::common::Reg::<self::Adcmpbnsr_SPEC, crate::common::RW>::from_ptr(
464                self._svd2pac_as_ptr().add(166usize),
465            )
466        }
467    }
468
469    #[doc = "A/D Compare Function Window B Lower-Side/Upper-Side Level Setting Register"]
470    #[inline(always)]
471    pub const fn adwinllb(
472        &self,
473    ) -> &'static crate::common::Reg<self::Adwinllb_SPEC, crate::common::RW> {
474        unsafe {
475            crate::common::Reg::<self::Adwinllb_SPEC, crate::common::RW>::from_ptr(
476                self._svd2pac_as_ptr().add(168usize),
477            )
478        }
479    }
480
481    #[doc = "A/D Compare Function Window B Lower-Side/Upper-Side Level Setting Register"]
482    #[inline(always)]
483    pub const fn adwinulb(
484        &self,
485    ) -> &'static crate::common::Reg<self::Adwinulb_SPEC, crate::common::RW> {
486        unsafe {
487            crate::common::Reg::<self::Adwinulb_SPEC, crate::common::RW>::from_ptr(
488                self._svd2pac_as_ptr().add(170usize),
489            )
490        }
491    }
492
493    #[doc = "A/D Compare Function Window B Status Register"]
494    #[inline(always)]
495    pub const fn adcmpbsr(
496        &self,
497    ) -> &'static crate::common::Reg<self::Adcmpbsr_SPEC, crate::common::RW> {
498        unsafe {
499            crate::common::Reg::<self::Adcmpbsr_SPEC, crate::common::RW>::from_ptr(
500                self._svd2pac_as_ptr().add(172usize),
501            )
502        }
503    }
504
505    #[doc = "A/D Data Buffer Registers %s"]
506    #[inline(always)]
507    pub const fn adbuf(
508        &self,
509    ) -> &'static crate::common::ClusterRegisterArray<
510        crate::common::Reg<self::Adbuf_SPEC, crate::common::R>,
511        16,
512        0x2,
513    > {
514        unsafe {
515            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0xb0usize))
516        }
517    }
518    #[inline(always)]
519    pub const fn adbuf0(&self) -> &'static crate::common::Reg<self::Adbuf_SPEC, crate::common::R> {
520        unsafe {
521            crate::common::Reg::<self::Adbuf_SPEC, crate::common::R>::from_ptr(
522                self._svd2pac_as_ptr().add(0xb0usize),
523            )
524        }
525    }
526    #[inline(always)]
527    pub const fn adbuf1(&self) -> &'static crate::common::Reg<self::Adbuf_SPEC, crate::common::R> {
528        unsafe {
529            crate::common::Reg::<self::Adbuf_SPEC, crate::common::R>::from_ptr(
530                self._svd2pac_as_ptr().add(0xb2usize),
531            )
532        }
533    }
534    #[inline(always)]
535    pub const fn adbuf2(&self) -> &'static crate::common::Reg<self::Adbuf_SPEC, crate::common::R> {
536        unsafe {
537            crate::common::Reg::<self::Adbuf_SPEC, crate::common::R>::from_ptr(
538                self._svd2pac_as_ptr().add(0xb4usize),
539            )
540        }
541    }
542    #[inline(always)]
543    pub const fn adbuf3(&self) -> &'static crate::common::Reg<self::Adbuf_SPEC, crate::common::R> {
544        unsafe {
545            crate::common::Reg::<self::Adbuf_SPEC, crate::common::R>::from_ptr(
546                self._svd2pac_as_ptr().add(0xb6usize),
547            )
548        }
549    }
550    #[inline(always)]
551    pub const fn adbuf4(&self) -> &'static crate::common::Reg<self::Adbuf_SPEC, crate::common::R> {
552        unsafe {
553            crate::common::Reg::<self::Adbuf_SPEC, crate::common::R>::from_ptr(
554                self._svd2pac_as_ptr().add(0xb8usize),
555            )
556        }
557    }
558    #[inline(always)]
559    pub const fn adbuf5(&self) -> &'static crate::common::Reg<self::Adbuf_SPEC, crate::common::R> {
560        unsafe {
561            crate::common::Reg::<self::Adbuf_SPEC, crate::common::R>::from_ptr(
562                self._svd2pac_as_ptr().add(0xbausize),
563            )
564        }
565    }
566    #[inline(always)]
567    pub const fn adbuf6(&self) -> &'static crate::common::Reg<self::Adbuf_SPEC, crate::common::R> {
568        unsafe {
569            crate::common::Reg::<self::Adbuf_SPEC, crate::common::R>::from_ptr(
570                self._svd2pac_as_ptr().add(0xbcusize),
571            )
572        }
573    }
574    #[inline(always)]
575    pub const fn adbuf7(&self) -> &'static crate::common::Reg<self::Adbuf_SPEC, crate::common::R> {
576        unsafe {
577            crate::common::Reg::<self::Adbuf_SPEC, crate::common::R>::from_ptr(
578                self._svd2pac_as_ptr().add(0xbeusize),
579            )
580        }
581    }
582    #[inline(always)]
583    pub const fn adbuf8(&self) -> &'static crate::common::Reg<self::Adbuf_SPEC, crate::common::R> {
584        unsafe {
585            crate::common::Reg::<self::Adbuf_SPEC, crate::common::R>::from_ptr(
586                self._svd2pac_as_ptr().add(0xc0usize),
587            )
588        }
589    }
590    #[inline(always)]
591    pub const fn adbuf9(&self) -> &'static crate::common::Reg<self::Adbuf_SPEC, crate::common::R> {
592        unsafe {
593            crate::common::Reg::<self::Adbuf_SPEC, crate::common::R>::from_ptr(
594                self._svd2pac_as_ptr().add(0xc2usize),
595            )
596        }
597    }
598    #[inline(always)]
599    pub const fn adbuf10(&self) -> &'static crate::common::Reg<self::Adbuf_SPEC, crate::common::R> {
600        unsafe {
601            crate::common::Reg::<self::Adbuf_SPEC, crate::common::R>::from_ptr(
602                self._svd2pac_as_ptr().add(0xc4usize),
603            )
604        }
605    }
606    #[inline(always)]
607    pub const fn adbuf11(&self) -> &'static crate::common::Reg<self::Adbuf_SPEC, crate::common::R> {
608        unsafe {
609            crate::common::Reg::<self::Adbuf_SPEC, crate::common::R>::from_ptr(
610                self._svd2pac_as_ptr().add(0xc6usize),
611            )
612        }
613    }
614    #[inline(always)]
615    pub const fn adbuf12(&self) -> &'static crate::common::Reg<self::Adbuf_SPEC, crate::common::R> {
616        unsafe {
617            crate::common::Reg::<self::Adbuf_SPEC, crate::common::R>::from_ptr(
618                self._svd2pac_as_ptr().add(0xc8usize),
619            )
620        }
621    }
622    #[inline(always)]
623    pub const fn adbuf13(&self) -> &'static crate::common::Reg<self::Adbuf_SPEC, crate::common::R> {
624        unsafe {
625            crate::common::Reg::<self::Adbuf_SPEC, crate::common::R>::from_ptr(
626                self._svd2pac_as_ptr().add(0xcausize),
627            )
628        }
629    }
630    #[inline(always)]
631    pub const fn adbuf14(&self) -> &'static crate::common::Reg<self::Adbuf_SPEC, crate::common::R> {
632        unsafe {
633            crate::common::Reg::<self::Adbuf_SPEC, crate::common::R>::from_ptr(
634                self._svd2pac_as_ptr().add(0xccusize),
635            )
636        }
637    }
638    #[inline(always)]
639    pub const fn adbuf15(&self) -> &'static crate::common::Reg<self::Adbuf_SPEC, crate::common::R> {
640        unsafe {
641            crate::common::Reg::<self::Adbuf_SPEC, crate::common::R>::from_ptr(
642                self._svd2pac_as_ptr().add(0xceusize),
643            )
644        }
645    }
646
647    #[doc = "A/D Data Buffer Enable Register"]
648    #[inline(always)]
649    pub const fn adbufen(
650        &self,
651    ) -> &'static crate::common::Reg<self::Adbufen_SPEC, crate::common::RW> {
652        unsafe {
653            crate::common::Reg::<self::Adbufen_SPEC, crate::common::RW>::from_ptr(
654                self._svd2pac_as_ptr().add(208usize),
655            )
656        }
657    }
658
659    #[doc = "A/D Data Buffer Pointer Register"]
660    #[inline(always)]
661    pub const fn adbufptr(
662        &self,
663    ) -> &'static crate::common::Reg<self::Adbufptr_SPEC, crate::common::RW> {
664        unsafe {
665            crate::common::Reg::<self::Adbufptr_SPEC, crate::common::RW>::from_ptr(
666                self._svd2pac_as_ptr().add(210usize),
667            )
668        }
669    }
670
671    #[doc = "A/D Sampling State Register"]
672    #[inline(always)]
673    pub const fn adsstrl(
674        &self,
675    ) -> &'static crate::common::Reg<self::Adsstrl_SPEC, crate::common::RW> {
676        unsafe {
677            crate::common::Reg::<self::Adsstrl_SPEC, crate::common::RW>::from_ptr(
678                self._svd2pac_as_ptr().add(221usize),
679            )
680        }
681    }
682
683    #[doc = "A/D Sampling State Register"]
684    #[inline(always)]
685    pub const fn adsstro(
686        &self,
687    ) -> &'static crate::common::Reg<self::Adsstro_SPEC, crate::common::RW> {
688        unsafe {
689            crate::common::Reg::<self::Adsstro_SPEC, crate::common::RW>::from_ptr(
690                self._svd2pac_as_ptr().add(223usize),
691            )
692        }
693    }
694
695    #[doc = "A/D Sampling State Register"]
696    #[inline(always)]
697    pub const fn adsstr(
698        &self,
699    ) -> &'static crate::common::ClusterRegisterArray<
700        crate::common::Reg<self::Adsstr_SPEC, crate::common::RW>,
701        3,
702        0x1,
703    > {
704        unsafe {
705            crate::common::ClusterRegisterArray::from_ptr(self._svd2pac_as_ptr().add(0xebusize))
706        }
707    }
708    #[inline(always)]
709    pub const fn adsstr11(
710        &self,
711    ) -> &'static crate::common::Reg<self::Adsstr_SPEC, crate::common::RW> {
712        unsafe {
713            crate::common::Reg::<self::Adsstr_SPEC, crate::common::RW>::from_ptr(
714                self._svd2pac_as_ptr().add(0xebusize),
715            )
716        }
717    }
718    #[inline(always)]
719    pub const fn adsstr12(
720        &self,
721    ) -> &'static crate::common::Reg<self::Adsstr_SPEC, crate::common::RW> {
722        unsafe {
723            crate::common::Reg::<self::Adsstr_SPEC, crate::common::RW>::from_ptr(
724                self._svd2pac_as_ptr().add(0xecusize),
725            )
726        }
727    }
728    #[inline(always)]
729    pub const fn adsstr13(
730        &self,
731    ) -> &'static crate::common::Reg<self::Adsstr_SPEC, crate::common::RW> {
732        unsafe {
733            crate::common::Reg::<self::Adsstr_SPEC, crate::common::RW>::from_ptr(
734                self._svd2pac_as_ptr().add(0xedusize),
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 = "Double Trigger Channel Select"]
751    #[inline(always)]
752    pub fn dblans(
753        self,
754    ) -> crate::common::RegisterField<0, 0x1f, 1, 0, u8, u8, Adcsr_SPEC, crate::common::RW> {
755        crate::common::RegisterField::<0,0x1f,1,0,u8,u8,Adcsr_SPEC,crate::common::RW>::from_register(self,0)
756    }
757
758    #[doc = "Group B Scan End Interrupt and ELC Event Enable"]
759    #[inline(always)]
760    pub fn gbadie(
761        self,
762    ) -> crate::common::RegisterField<
763        6,
764        0x1,
765        1,
766        0,
767        adcsr::Gbadie,
768        adcsr::Gbadie,
769        Adcsr_SPEC,
770        crate::common::RW,
771    > {
772        crate::common::RegisterField::<
773            6,
774            0x1,
775            1,
776            0,
777            adcsr::Gbadie,
778            adcsr::Gbadie,
779            Adcsr_SPEC,
780            crate::common::RW,
781        >::from_register(self, 0)
782    }
783
784    #[doc = "Double Trigger Mode Select"]
785    #[inline(always)]
786    pub fn dble(
787        self,
788    ) -> crate::common::RegisterField<
789        7,
790        0x1,
791        1,
792        0,
793        adcsr::Dble,
794        adcsr::Dble,
795        Adcsr_SPEC,
796        crate::common::RW,
797    > {
798        crate::common::RegisterField::<
799            7,
800            0x1,
801            1,
802            0,
803            adcsr::Dble,
804            adcsr::Dble,
805            Adcsr_SPEC,
806            crate::common::RW,
807        >::from_register(self, 0)
808    }
809
810    #[doc = "Trigger Select"]
811    #[inline(always)]
812    pub fn extrg(
813        self,
814    ) -> crate::common::RegisterField<
815        8,
816        0x1,
817        1,
818        0,
819        adcsr::Extrg,
820        adcsr::Extrg,
821        Adcsr_SPEC,
822        crate::common::RW,
823    > {
824        crate::common::RegisterField::<
825            8,
826            0x1,
827            1,
828            0,
829            adcsr::Extrg,
830            adcsr::Extrg,
831            Adcsr_SPEC,
832            crate::common::RW,
833        >::from_register(self, 0)
834    }
835
836    #[doc = "Trigger Start Enable"]
837    #[inline(always)]
838    pub fn trge(
839        self,
840    ) -> crate::common::RegisterField<
841        9,
842        0x1,
843        1,
844        0,
845        adcsr::Trge,
846        adcsr::Trge,
847        Adcsr_SPEC,
848        crate::common::RW,
849    > {
850        crate::common::RegisterField::<
851            9,
852            0x1,
853            1,
854            0,
855            adcsr::Trge,
856            adcsr::Trge,
857            Adcsr_SPEC,
858            crate::common::RW,
859        >::from_register(self, 0)
860    }
861
862    #[doc = "Scan Mode Select"]
863    #[inline(always)]
864    pub fn adcs(
865        self,
866    ) -> crate::common::RegisterField<
867        13,
868        0x3,
869        1,
870        0,
871        adcsr::Adcs,
872        adcsr::Adcs,
873        Adcsr_SPEC,
874        crate::common::RW,
875    > {
876        crate::common::RegisterField::<
877            13,
878            0x3,
879            1,
880            0,
881            adcsr::Adcs,
882            adcsr::Adcs,
883            Adcsr_SPEC,
884            crate::common::RW,
885        >::from_register(self, 0)
886    }
887
888    #[doc = "A/D Conversion Start"]
889    #[inline(always)]
890    pub fn adst(
891        self,
892    ) -> crate::common::RegisterField<
893        15,
894        0x1,
895        1,
896        0,
897        adcsr::Adst,
898        adcsr::Adst,
899        Adcsr_SPEC,
900        crate::common::RW,
901    > {
902        crate::common::RegisterField::<
903            15,
904            0x1,
905            1,
906            0,
907            adcsr::Adst,
908            adcsr::Adst,
909            Adcsr_SPEC,
910            crate::common::RW,
911        >::from_register(self, 0)
912    }
913}
914impl ::core::default::Default for Adcsr {
915    #[inline(always)]
916    fn default() -> Adcsr {
917        <crate::RegValueT<Adcsr_SPEC> as RegisterValue<_>>::new(0)
918    }
919}
920pub mod adcsr {
921
922    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
923    pub struct Gbadie_SPEC;
924    pub type Gbadie = crate::EnumBitfieldStruct<u8, Gbadie_SPEC>;
925    impl Gbadie {
926        #[doc = "Disable ADC120_GBADI interrupt generation on group B scan completion."]
927        pub const _0: Self = Self::new(0);
928
929        #[doc = "Enable ADC120_GBADI interrupt generation on group B scan completion."]
930        pub const _1: Self = Self::new(1);
931    }
932    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
933    pub struct Dble_SPEC;
934    pub type Dble = crate::EnumBitfieldStruct<u8, Dble_SPEC>;
935    impl Dble {
936        #[doc = "Deselect double-trigger mode."]
937        pub const _0: Self = Self::new(0);
938
939        #[doc = "Select double-trigger mode."]
940        pub const _1: Self = Self::new(1);
941    }
942    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
943    pub struct Extrg_SPEC;
944    pub type Extrg = crate::EnumBitfieldStruct<u8, Extrg_SPEC>;
945    impl Extrg {
946        #[doc = "Start A/D conversion by the synchronous trigger (ELC)."]
947        pub const _0: Self = Self::new(0);
948
949        #[doc = "Start A/D conversion by the asynchronous trigger (ADTRG0)."]
950        pub const _1: Self = Self::new(1);
951    }
952    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
953    pub struct Trge_SPEC;
954    pub type Trge = crate::EnumBitfieldStruct<u8, Trge_SPEC>;
955    impl Trge {
956        #[doc = "Disable A/D conversion to be started by the synchronous or asynchronous trigger"]
957        pub const _0: Self = Self::new(0);
958
959        #[doc = "Enable A/D conversion to be started by the synchronous or asynchronous trigger"]
960        pub const _1: Self = Self::new(1);
961    }
962    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
963    pub struct Adcs_SPEC;
964    pub type Adcs = crate::EnumBitfieldStruct<u8, Adcs_SPEC>;
965    impl Adcs {
966        #[doc = "Single scan mode"]
967        pub const _00: Self = Self::new(0);
968
969        #[doc = "Group scan mode"]
970        pub const _01: Self = Self::new(1);
971
972        #[doc = "Continuous scan mode"]
973        pub const _10: Self = Self::new(2);
974
975        #[doc = "Setting prohibited"]
976        pub const _11: Self = Self::new(3);
977    }
978    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
979    pub struct Adst_SPEC;
980    pub type Adst = crate::EnumBitfieldStruct<u8, Adst_SPEC>;
981    impl Adst {
982        #[doc = "Stop A/D conversion process."]
983        pub const _0: Self = Self::new(0);
984
985        #[doc = "Start A/D conversion process."]
986        pub const _1: Self = Self::new(1);
987    }
988}
989#[doc(hidden)]
990#[derive(Copy, Clone, Eq, PartialEq)]
991pub struct Adansa0_SPEC;
992impl crate::sealed::RegSpec for Adansa0_SPEC {
993    type DataType = u16;
994}
995
996#[doc = "A/D Channel Select Register A0"]
997pub type Adansa0 = crate::RegValueT<Adansa0_SPEC>;
998
999impl Adansa0 {
1000    #[doc = "A/D Conversion Channels Select n"]
1001    #[inline(always)]
1002    pub fn ansa0(
1003        self,
1004    ) -> crate::common::RegisterField<
1005        0,
1006        0x1,
1007        1,
1008        0,
1009        adansa0::Ansa0,
1010        adansa0::Ansa0,
1011        Adansa0_SPEC,
1012        crate::common::RW,
1013    > {
1014        crate::common::RegisterField::<
1015            0,
1016            0x1,
1017            1,
1018            0,
1019            adansa0::Ansa0,
1020            adansa0::Ansa0,
1021            Adansa0_SPEC,
1022            crate::common::RW,
1023        >::from_register(self, 0)
1024    }
1025
1026    #[doc = "A/D Conversion Channels Select n"]
1027    #[inline(always)]
1028    pub fn ansa1(
1029        self,
1030    ) -> crate::common::RegisterField<
1031        1,
1032        0x1,
1033        1,
1034        0,
1035        adansa0::Ansa1,
1036        adansa0::Ansa1,
1037        Adansa0_SPEC,
1038        crate::common::RW,
1039    > {
1040        crate::common::RegisterField::<
1041            1,
1042            0x1,
1043            1,
1044            0,
1045            adansa0::Ansa1,
1046            adansa0::Ansa1,
1047            Adansa0_SPEC,
1048            crate::common::RW,
1049        >::from_register(self, 0)
1050    }
1051
1052    #[doc = "A/D Conversion Channels Select n"]
1053    #[inline(always)]
1054    pub fn ansa2(
1055        self,
1056    ) -> crate::common::RegisterField<
1057        2,
1058        0x1,
1059        1,
1060        0,
1061        adansa0::Ansa2,
1062        adansa0::Ansa2,
1063        Adansa0_SPEC,
1064        crate::common::RW,
1065    > {
1066        crate::common::RegisterField::<
1067            2,
1068            0x1,
1069            1,
1070            0,
1071            adansa0::Ansa2,
1072            adansa0::Ansa2,
1073            Adansa0_SPEC,
1074            crate::common::RW,
1075        >::from_register(self, 0)
1076    }
1077
1078    #[doc = "A/D Conversion Channels Select n"]
1079    #[inline(always)]
1080    pub fn ansa3(
1081        self,
1082    ) -> crate::common::RegisterField<
1083        3,
1084        0x1,
1085        1,
1086        0,
1087        adansa0::Ansa3,
1088        adansa0::Ansa3,
1089        Adansa0_SPEC,
1090        crate::common::RW,
1091    > {
1092        crate::common::RegisterField::<
1093            3,
1094            0x1,
1095            1,
1096            0,
1097            adansa0::Ansa3,
1098            adansa0::Ansa3,
1099            Adansa0_SPEC,
1100            crate::common::RW,
1101        >::from_register(self, 0)
1102    }
1103
1104    #[doc = "A/D Conversion Channels Select n"]
1105    #[inline(always)]
1106    pub fn ansa4(
1107        self,
1108    ) -> crate::common::RegisterField<
1109        4,
1110        0x1,
1111        1,
1112        0,
1113        adansa0::Ansa4,
1114        adansa0::Ansa4,
1115        Adansa0_SPEC,
1116        crate::common::RW,
1117    > {
1118        crate::common::RegisterField::<
1119            4,
1120            0x1,
1121            1,
1122            0,
1123            adansa0::Ansa4,
1124            adansa0::Ansa4,
1125            Adansa0_SPEC,
1126            crate::common::RW,
1127        >::from_register(self, 0)
1128    }
1129
1130    #[doc = "A/D Conversion Channels Select n"]
1131    #[inline(always)]
1132    pub fn ansa11(
1133        self,
1134    ) -> crate::common::RegisterField<
1135        11,
1136        0x1,
1137        1,
1138        0,
1139        adansa0::Ansa11,
1140        adansa0::Ansa11,
1141        Adansa0_SPEC,
1142        crate::common::RW,
1143    > {
1144        crate::common::RegisterField::<
1145            11,
1146            0x1,
1147            1,
1148            0,
1149            adansa0::Ansa11,
1150            adansa0::Ansa11,
1151            Adansa0_SPEC,
1152            crate::common::RW,
1153        >::from_register(self, 0)
1154    }
1155
1156    #[doc = "A/D Conversion Channels Select n"]
1157    #[inline(always)]
1158    pub fn ansa12(
1159        self,
1160    ) -> crate::common::RegisterField<
1161        12,
1162        0x1,
1163        1,
1164        0,
1165        adansa0::Ansa12,
1166        adansa0::Ansa12,
1167        Adansa0_SPEC,
1168        crate::common::RW,
1169    > {
1170        crate::common::RegisterField::<
1171            12,
1172            0x1,
1173            1,
1174            0,
1175            adansa0::Ansa12,
1176            adansa0::Ansa12,
1177            Adansa0_SPEC,
1178            crate::common::RW,
1179        >::from_register(self, 0)
1180    }
1181
1182    #[doc = "A/D Conversion Channels Select n"]
1183    #[inline(always)]
1184    pub fn ansa13(
1185        self,
1186    ) -> crate::common::RegisterField<
1187        13,
1188        0x1,
1189        1,
1190        0,
1191        adansa0::Ansa13,
1192        adansa0::Ansa13,
1193        Adansa0_SPEC,
1194        crate::common::RW,
1195    > {
1196        crate::common::RegisterField::<
1197            13,
1198            0x1,
1199            1,
1200            0,
1201            adansa0::Ansa13,
1202            adansa0::Ansa13,
1203            Adansa0_SPEC,
1204            crate::common::RW,
1205        >::from_register(self, 0)
1206    }
1207}
1208impl ::core::default::Default for Adansa0 {
1209    #[inline(always)]
1210    fn default() -> Adansa0 {
1211        <crate::RegValueT<Adansa0_SPEC> as RegisterValue<_>>::new(0)
1212    }
1213}
1214pub mod adansa0 {
1215
1216    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1217    pub struct Ansa0_SPEC;
1218    pub type Ansa0 = crate::EnumBitfieldStruct<u8, Ansa0_SPEC>;
1219    impl Ansa0 {
1220        #[doc = "Do not select associated input channel."]
1221        pub const _0: Self = Self::new(0);
1222
1223        #[doc = "Select associated input channel."]
1224        pub const _1: Self = Self::new(1);
1225    }
1226    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1227    pub struct Ansa1_SPEC;
1228    pub type Ansa1 = crate::EnumBitfieldStruct<u8, Ansa1_SPEC>;
1229    impl Ansa1 {
1230        #[doc = "Do not select associated input channel."]
1231        pub const _0: Self = Self::new(0);
1232
1233        #[doc = "Select associated input channel."]
1234        pub const _1: Self = Self::new(1);
1235    }
1236    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1237    pub struct Ansa2_SPEC;
1238    pub type Ansa2 = crate::EnumBitfieldStruct<u8, Ansa2_SPEC>;
1239    impl Ansa2 {
1240        #[doc = "Do not select associated input channel."]
1241        pub const _0: Self = Self::new(0);
1242
1243        #[doc = "Select associated input channel."]
1244        pub const _1: Self = Self::new(1);
1245    }
1246    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1247    pub struct Ansa3_SPEC;
1248    pub type Ansa3 = crate::EnumBitfieldStruct<u8, Ansa3_SPEC>;
1249    impl Ansa3 {
1250        #[doc = "Do not select associated input channel."]
1251        pub const _0: Self = Self::new(0);
1252
1253        #[doc = "Select associated input channel."]
1254        pub const _1: Self = Self::new(1);
1255    }
1256    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1257    pub struct Ansa4_SPEC;
1258    pub type Ansa4 = crate::EnumBitfieldStruct<u8, Ansa4_SPEC>;
1259    impl Ansa4 {
1260        #[doc = "Do not select associated input channel."]
1261        pub const _0: Self = Self::new(0);
1262
1263        #[doc = "Select associated input channel."]
1264        pub const _1: Self = Self::new(1);
1265    }
1266    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1267    pub struct Ansa11_SPEC;
1268    pub type Ansa11 = crate::EnumBitfieldStruct<u8, Ansa11_SPEC>;
1269    impl Ansa11 {
1270        #[doc = "Do not select associated input channel."]
1271        pub const _0: Self = Self::new(0);
1272
1273        #[doc = "Select associated input channel."]
1274        pub const _1: Self = Self::new(1);
1275    }
1276    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1277    pub struct Ansa12_SPEC;
1278    pub type Ansa12 = crate::EnumBitfieldStruct<u8, Ansa12_SPEC>;
1279    impl Ansa12 {
1280        #[doc = "Do not select associated input channel."]
1281        pub const _0: Self = Self::new(0);
1282
1283        #[doc = "Select associated input channel."]
1284        pub const _1: Self = Self::new(1);
1285    }
1286    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1287    pub struct Ansa13_SPEC;
1288    pub type Ansa13 = crate::EnumBitfieldStruct<u8, Ansa13_SPEC>;
1289    impl Ansa13 {
1290        #[doc = "Do not select associated input channel."]
1291        pub const _0: Self = Self::new(0);
1292
1293        #[doc = "Select associated input channel."]
1294        pub const _1: Self = Self::new(1);
1295    }
1296}
1297#[doc(hidden)]
1298#[derive(Copy, Clone, Eq, PartialEq)]
1299pub struct Adansa1_SPEC;
1300impl crate::sealed::RegSpec for Adansa1_SPEC {
1301    type DataType = u16;
1302}
1303
1304#[doc = "A/D Channel Select Register A1"]
1305pub type Adansa1 = crate::RegValueT<Adansa1_SPEC>;
1306
1307impl Adansa1 {
1308    #[doc = "A/D Conversion Channels Select 16"]
1309    #[inline(always)]
1310    pub fn ansa16(
1311        self,
1312    ) -> crate::common::RegisterField<
1313        0,
1314        0x1,
1315        1,
1316        0,
1317        adansa1::Ansa16,
1318        adansa1::Ansa16,
1319        Adansa1_SPEC,
1320        crate::common::RW,
1321    > {
1322        crate::common::RegisterField::<
1323            0,
1324            0x1,
1325            1,
1326            0,
1327            adansa1::Ansa16,
1328            adansa1::Ansa16,
1329            Adansa1_SPEC,
1330            crate::common::RW,
1331        >::from_register(self, 0)
1332    }
1333}
1334impl ::core::default::Default for Adansa1 {
1335    #[inline(always)]
1336    fn default() -> Adansa1 {
1337        <crate::RegValueT<Adansa1_SPEC> as RegisterValue<_>>::new(0)
1338    }
1339}
1340pub mod adansa1 {
1341
1342    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1343    pub struct Ansa16_SPEC;
1344    pub type Ansa16 = crate::EnumBitfieldStruct<u8, Ansa16_SPEC>;
1345    impl Ansa16 {
1346        #[doc = "Do not select associated input channel."]
1347        pub const _0: Self = Self::new(0);
1348
1349        #[doc = "Select associated input channel."]
1350        pub const _1: Self = Self::new(1);
1351    }
1352}
1353#[doc(hidden)]
1354#[derive(Copy, Clone, Eq, PartialEq)]
1355pub struct Adads0_SPEC;
1356impl crate::sealed::RegSpec for Adads0_SPEC {
1357    type DataType = u16;
1358}
1359
1360#[doc = "A/D-Converted Value Addition/Average Channel Select Register 0"]
1361pub type Adads0 = crate::RegValueT<Adads0_SPEC>;
1362
1363impl Adads0 {
1364    #[doc = "A/D-Converted Value Addition/Average Channel Select n"]
1365    #[inline(always)]
1366    pub fn ads0(
1367        self,
1368    ) -> crate::common::RegisterField<
1369        0,
1370        0x1,
1371        1,
1372        0,
1373        adads0::Ads0,
1374        adads0::Ads0,
1375        Adads0_SPEC,
1376        crate::common::RW,
1377    > {
1378        crate::common::RegisterField::<
1379            0,
1380            0x1,
1381            1,
1382            0,
1383            adads0::Ads0,
1384            adads0::Ads0,
1385            Adads0_SPEC,
1386            crate::common::RW,
1387        >::from_register(self, 0)
1388    }
1389
1390    #[doc = "A/D-Converted Value Addition/Average Channel Select n"]
1391    #[inline(always)]
1392    pub fn ads1(
1393        self,
1394    ) -> crate::common::RegisterField<
1395        1,
1396        0x1,
1397        1,
1398        0,
1399        adads0::Ads1,
1400        adads0::Ads1,
1401        Adads0_SPEC,
1402        crate::common::RW,
1403    > {
1404        crate::common::RegisterField::<
1405            1,
1406            0x1,
1407            1,
1408            0,
1409            adads0::Ads1,
1410            adads0::Ads1,
1411            Adads0_SPEC,
1412            crate::common::RW,
1413        >::from_register(self, 0)
1414    }
1415
1416    #[doc = "A/D-Converted Value Addition/Average Channel Select n"]
1417    #[inline(always)]
1418    pub fn ads2(
1419        self,
1420    ) -> crate::common::RegisterField<
1421        2,
1422        0x1,
1423        1,
1424        0,
1425        adads0::Ads2,
1426        adads0::Ads2,
1427        Adads0_SPEC,
1428        crate::common::RW,
1429    > {
1430        crate::common::RegisterField::<
1431            2,
1432            0x1,
1433            1,
1434            0,
1435            adads0::Ads2,
1436            adads0::Ads2,
1437            Adads0_SPEC,
1438            crate::common::RW,
1439        >::from_register(self, 0)
1440    }
1441
1442    #[doc = "A/D-Converted Value Addition/Average Channel Select n"]
1443    #[inline(always)]
1444    pub fn ads3(
1445        self,
1446    ) -> crate::common::RegisterField<
1447        3,
1448        0x1,
1449        1,
1450        0,
1451        adads0::Ads3,
1452        adads0::Ads3,
1453        Adads0_SPEC,
1454        crate::common::RW,
1455    > {
1456        crate::common::RegisterField::<
1457            3,
1458            0x1,
1459            1,
1460            0,
1461            adads0::Ads3,
1462            adads0::Ads3,
1463            Adads0_SPEC,
1464            crate::common::RW,
1465        >::from_register(self, 0)
1466    }
1467
1468    #[doc = "A/D-Converted Value Addition/Average Channel Select n"]
1469    #[inline(always)]
1470    pub fn ads4(
1471        self,
1472    ) -> crate::common::RegisterField<
1473        4,
1474        0x1,
1475        1,
1476        0,
1477        adads0::Ads4,
1478        adads0::Ads4,
1479        Adads0_SPEC,
1480        crate::common::RW,
1481    > {
1482        crate::common::RegisterField::<
1483            4,
1484            0x1,
1485            1,
1486            0,
1487            adads0::Ads4,
1488            adads0::Ads4,
1489            Adads0_SPEC,
1490            crate::common::RW,
1491        >::from_register(self, 0)
1492    }
1493
1494    #[doc = "A/D-Converted Value Addition/Average Channel Select n"]
1495    #[inline(always)]
1496    pub fn ads11(
1497        self,
1498    ) -> crate::common::RegisterField<
1499        11,
1500        0x1,
1501        1,
1502        0,
1503        adads0::Ads11,
1504        adads0::Ads11,
1505        Adads0_SPEC,
1506        crate::common::RW,
1507    > {
1508        crate::common::RegisterField::<
1509            11,
1510            0x1,
1511            1,
1512            0,
1513            adads0::Ads11,
1514            adads0::Ads11,
1515            Adads0_SPEC,
1516            crate::common::RW,
1517        >::from_register(self, 0)
1518    }
1519
1520    #[doc = "A/D-Converted Value Addition/Average Channel Select n"]
1521    #[inline(always)]
1522    pub fn ads12(
1523        self,
1524    ) -> crate::common::RegisterField<
1525        12,
1526        0x1,
1527        1,
1528        0,
1529        adads0::Ads12,
1530        adads0::Ads12,
1531        Adads0_SPEC,
1532        crate::common::RW,
1533    > {
1534        crate::common::RegisterField::<
1535            12,
1536            0x1,
1537            1,
1538            0,
1539            adads0::Ads12,
1540            adads0::Ads12,
1541            Adads0_SPEC,
1542            crate::common::RW,
1543        >::from_register(self, 0)
1544    }
1545
1546    #[doc = "A/D-Converted Value Addition/Average Channel Select n"]
1547    #[inline(always)]
1548    pub fn ads13(
1549        self,
1550    ) -> crate::common::RegisterField<
1551        13,
1552        0x1,
1553        1,
1554        0,
1555        adads0::Ads13,
1556        adads0::Ads13,
1557        Adads0_SPEC,
1558        crate::common::RW,
1559    > {
1560        crate::common::RegisterField::<
1561            13,
1562            0x1,
1563            1,
1564            0,
1565            adads0::Ads13,
1566            adads0::Ads13,
1567            Adads0_SPEC,
1568            crate::common::RW,
1569        >::from_register(self, 0)
1570    }
1571}
1572impl ::core::default::Default for Adads0 {
1573    #[inline(always)]
1574    fn default() -> Adads0 {
1575        <crate::RegValueT<Adads0_SPEC> as RegisterValue<_>>::new(0)
1576    }
1577}
1578pub mod adads0 {
1579
1580    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1581    pub struct Ads0_SPEC;
1582    pub type Ads0 = crate::EnumBitfieldStruct<u8, Ads0_SPEC>;
1583    impl Ads0 {
1584        #[doc = "Do not select associated input channel."]
1585        pub const _0: Self = Self::new(0);
1586
1587        #[doc = "Select associated input channel."]
1588        pub const _1: Self = Self::new(1);
1589    }
1590    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1591    pub struct Ads1_SPEC;
1592    pub type Ads1 = crate::EnumBitfieldStruct<u8, Ads1_SPEC>;
1593    impl Ads1 {
1594        #[doc = "Do not select associated input channel."]
1595        pub const _0: Self = Self::new(0);
1596
1597        #[doc = "Select associated input channel."]
1598        pub const _1: Self = Self::new(1);
1599    }
1600    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1601    pub struct Ads2_SPEC;
1602    pub type Ads2 = crate::EnumBitfieldStruct<u8, Ads2_SPEC>;
1603    impl Ads2 {
1604        #[doc = "Do not select associated input channel."]
1605        pub const _0: Self = Self::new(0);
1606
1607        #[doc = "Select associated input channel."]
1608        pub const _1: Self = Self::new(1);
1609    }
1610    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1611    pub struct Ads3_SPEC;
1612    pub type Ads3 = crate::EnumBitfieldStruct<u8, Ads3_SPEC>;
1613    impl Ads3 {
1614        #[doc = "Do not select associated input channel."]
1615        pub const _0: Self = Self::new(0);
1616
1617        #[doc = "Select associated input channel."]
1618        pub const _1: Self = Self::new(1);
1619    }
1620    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1621    pub struct Ads4_SPEC;
1622    pub type Ads4 = crate::EnumBitfieldStruct<u8, Ads4_SPEC>;
1623    impl Ads4 {
1624        #[doc = "Do not select associated input channel."]
1625        pub const _0: Self = Self::new(0);
1626
1627        #[doc = "Select associated input channel."]
1628        pub const _1: Self = Self::new(1);
1629    }
1630    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1631    pub struct Ads11_SPEC;
1632    pub type Ads11 = crate::EnumBitfieldStruct<u8, Ads11_SPEC>;
1633    impl Ads11 {
1634        #[doc = "Do not select associated input channel."]
1635        pub const _0: Self = Self::new(0);
1636
1637        #[doc = "Select associated input channel."]
1638        pub const _1: Self = Self::new(1);
1639    }
1640    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1641    pub struct Ads12_SPEC;
1642    pub type Ads12 = crate::EnumBitfieldStruct<u8, Ads12_SPEC>;
1643    impl Ads12 {
1644        #[doc = "Do not select associated input channel."]
1645        pub const _0: Self = Self::new(0);
1646
1647        #[doc = "Select associated input channel."]
1648        pub const _1: Self = Self::new(1);
1649    }
1650    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1651    pub struct Ads13_SPEC;
1652    pub type Ads13 = crate::EnumBitfieldStruct<u8, Ads13_SPEC>;
1653    impl Ads13 {
1654        #[doc = "Do not select associated input channel."]
1655        pub const _0: Self = Self::new(0);
1656
1657        #[doc = "Select associated input channel."]
1658        pub const _1: Self = Self::new(1);
1659    }
1660}
1661#[doc(hidden)]
1662#[derive(Copy, Clone, Eq, PartialEq)]
1663pub struct Adads1_SPEC;
1664impl crate::sealed::RegSpec for Adads1_SPEC {
1665    type DataType = u16;
1666}
1667
1668#[doc = "A/D-Converted Value Addition/Average Channel Select Register 1"]
1669pub type Adads1 = crate::RegValueT<Adads1_SPEC>;
1670
1671impl Adads1 {
1672    #[doc = "A/D-Converted Value Addition/Average Channel Select 16"]
1673    #[inline(always)]
1674    pub fn ads16(
1675        self,
1676    ) -> crate::common::RegisterField<
1677        0,
1678        0x1,
1679        1,
1680        0,
1681        adads1::Ads16,
1682        adads1::Ads16,
1683        Adads1_SPEC,
1684        crate::common::RW,
1685    > {
1686        crate::common::RegisterField::<
1687            0,
1688            0x1,
1689            1,
1690            0,
1691            adads1::Ads16,
1692            adads1::Ads16,
1693            Adads1_SPEC,
1694            crate::common::RW,
1695        >::from_register(self, 0)
1696    }
1697}
1698impl ::core::default::Default for Adads1 {
1699    #[inline(always)]
1700    fn default() -> Adads1 {
1701        <crate::RegValueT<Adads1_SPEC> as RegisterValue<_>>::new(0)
1702    }
1703}
1704pub mod adads1 {
1705
1706    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1707    pub struct Ads16_SPEC;
1708    pub type Ads16 = crate::EnumBitfieldStruct<u8, Ads16_SPEC>;
1709    impl Ads16 {
1710        #[doc = "Do not select associated input channel."]
1711        pub const _0: Self = Self::new(0);
1712
1713        #[doc = "Select associated input channel."]
1714        pub const _1: Self = Self::new(1);
1715    }
1716}
1717#[doc(hidden)]
1718#[derive(Copy, Clone, Eq, PartialEq)]
1719pub struct Adadc_SPEC;
1720impl crate::sealed::RegSpec for Adadc_SPEC {
1721    type DataType = u8;
1722}
1723
1724#[doc = "A/D-Converted Value Addition/Average Count Select Register"]
1725pub type Adadc = crate::RegValueT<Adadc_SPEC>;
1726
1727impl Adadc {
1728    #[doc = "Addition/Average Count Select"]
1729    #[inline(always)]
1730    pub fn adc(
1731        self,
1732    ) -> crate::common::RegisterField<
1733        0,
1734        0x7,
1735        1,
1736        0,
1737        adadc::Adc,
1738        adadc::Adc,
1739        Adadc_SPEC,
1740        crate::common::RW,
1741    > {
1742        crate::common::RegisterField::<
1743            0,
1744            0x7,
1745            1,
1746            0,
1747            adadc::Adc,
1748            adadc::Adc,
1749            Adadc_SPEC,
1750            crate::common::RW,
1751        >::from_register(self, 0)
1752    }
1753
1754    #[doc = "Average Mode Select"]
1755    #[inline(always)]
1756    pub fn avee(
1757        self,
1758    ) -> crate::common::RegisterField<
1759        7,
1760        0x1,
1761        1,
1762        0,
1763        adadc::Avee,
1764        adadc::Avee,
1765        Adadc_SPEC,
1766        crate::common::RW,
1767    > {
1768        crate::common::RegisterField::<
1769            7,
1770            0x1,
1771            1,
1772            0,
1773            adadc::Avee,
1774            adadc::Avee,
1775            Adadc_SPEC,
1776            crate::common::RW,
1777        >::from_register(self, 0)
1778    }
1779}
1780impl ::core::default::Default for Adadc {
1781    #[inline(always)]
1782    fn default() -> Adadc {
1783        <crate::RegValueT<Adadc_SPEC> as RegisterValue<_>>::new(0)
1784    }
1785}
1786pub mod adadc {
1787
1788    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1789    pub struct Adc_SPEC;
1790    pub type Adc = crate::EnumBitfieldStruct<u8, Adc_SPEC>;
1791    impl Adc {
1792        #[doc = "1-time conversion (no addition, same as normal conversion)"]
1793        pub const _000: Self = Self::new(0);
1794
1795        #[doc = "2-time conversion (1 addition)"]
1796        pub const _001: Self = Self::new(1);
1797
1798        #[doc = "3-time conversion (2 additions)Setting prohibited"]
1799        pub const _010: Self = Self::new(2);
1800
1801        #[doc = "4-time conversion (3 additions)"]
1802        pub const _011: Self = Self::new(3);
1803
1804        #[doc = "16-time conversion (15 additions)"]
1805        pub const _101: Self = Self::new(5);
1806    }
1807    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1808    pub struct Avee_SPEC;
1809    pub type Avee = crate::EnumBitfieldStruct<u8, Avee_SPEC>;
1810    impl Avee {
1811        #[doc = "Enable addition mode"]
1812        pub const _0: Self = Self::new(0);
1813
1814        #[doc = "Enable average mode"]
1815        pub const _1: Self = Self::new(1);
1816    }
1817}
1818#[doc(hidden)]
1819#[derive(Copy, Clone, Eq, PartialEq)]
1820pub struct Adcer_SPEC;
1821impl crate::sealed::RegSpec for Adcer_SPEC {
1822    type DataType = u16;
1823}
1824
1825#[doc = "A/D Control Extended Register"]
1826pub type Adcer = crate::RegValueT<Adcer_SPEC>;
1827
1828impl Adcer {
1829    #[inline(always)]
1830    pub fn adprc(
1831        self,
1832    ) -> crate::common::RegisterField<
1833        1,
1834        0x3,
1835        1,
1836        0,
1837        adcer::Adprc,
1838        adcer::Adprc,
1839        Adcer_SPEC,
1840        crate::common::RW,
1841    > {
1842        crate::common::RegisterField::<
1843            1,
1844            0x3,
1845            1,
1846            0,
1847            adcer::Adprc,
1848            adcer::Adprc,
1849            Adcer_SPEC,
1850            crate::common::RW,
1851        >::from_register(self, 0)
1852    }
1853
1854    #[doc = "A/D Data Register Automatic Clearing Enable"]
1855    #[inline(always)]
1856    pub fn ace(
1857        self,
1858    ) -> crate::common::RegisterField<
1859        5,
1860        0x1,
1861        1,
1862        0,
1863        adcer::Ace,
1864        adcer::Ace,
1865        Adcer_SPEC,
1866        crate::common::RW,
1867    > {
1868        crate::common::RegisterField::<
1869            5,
1870            0x1,
1871            1,
1872            0,
1873            adcer::Ace,
1874            adcer::Ace,
1875            Adcer_SPEC,
1876            crate::common::RW,
1877        >::from_register(self, 0)
1878    }
1879
1880    #[doc = "Self-Diagnosis Conversion Voltage Select"]
1881    #[inline(always)]
1882    pub fn diagval(
1883        self,
1884    ) -> crate::common::RegisterField<
1885        8,
1886        0x3,
1887        1,
1888        0,
1889        adcer::Diagval,
1890        adcer::Diagval,
1891        Adcer_SPEC,
1892        crate::common::RW,
1893    > {
1894        crate::common::RegisterField::<
1895            8,
1896            0x3,
1897            1,
1898            0,
1899            adcer::Diagval,
1900            adcer::Diagval,
1901            Adcer_SPEC,
1902            crate::common::RW,
1903        >::from_register(self, 0)
1904    }
1905
1906    #[doc = "Self-Diagnosis Mode Select"]
1907    #[inline(always)]
1908    pub fn diagld(
1909        self,
1910    ) -> crate::common::RegisterField<
1911        10,
1912        0x1,
1913        1,
1914        0,
1915        adcer::Diagld,
1916        adcer::Diagld,
1917        Adcer_SPEC,
1918        crate::common::RW,
1919    > {
1920        crate::common::RegisterField::<
1921            10,
1922            0x1,
1923            1,
1924            0,
1925            adcer::Diagld,
1926            adcer::Diagld,
1927            Adcer_SPEC,
1928            crate::common::RW,
1929        >::from_register(self, 0)
1930    }
1931
1932    #[doc = "Self-Diagnosis Enable"]
1933    #[inline(always)]
1934    pub fn diagm(
1935        self,
1936    ) -> crate::common::RegisterField<
1937        11,
1938        0x1,
1939        1,
1940        0,
1941        adcer::Diagm,
1942        adcer::Diagm,
1943        Adcer_SPEC,
1944        crate::common::RW,
1945    > {
1946        crate::common::RegisterField::<
1947            11,
1948            0x1,
1949            1,
1950            0,
1951            adcer::Diagm,
1952            adcer::Diagm,
1953            Adcer_SPEC,
1954            crate::common::RW,
1955        >::from_register(self, 0)
1956    }
1957
1958    #[doc = "A/D Data Register Format Select"]
1959    #[inline(always)]
1960    pub fn adrfmt(
1961        self,
1962    ) -> crate::common::RegisterField<
1963        15,
1964        0x1,
1965        1,
1966        0,
1967        adcer::Adrfmt,
1968        adcer::Adrfmt,
1969        Adcer_SPEC,
1970        crate::common::RW,
1971    > {
1972        crate::common::RegisterField::<
1973            15,
1974            0x1,
1975            1,
1976            0,
1977            adcer::Adrfmt,
1978            adcer::Adrfmt,
1979            Adcer_SPEC,
1980            crate::common::RW,
1981        >::from_register(self, 0)
1982    }
1983}
1984impl ::core::default::Default for Adcer {
1985    #[inline(always)]
1986    fn default() -> Adcer {
1987        <crate::RegValueT<Adcer_SPEC> as RegisterValue<_>>::new(0)
1988    }
1989}
1990pub mod adcer {
1991
1992    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
1993    pub struct Adprc_SPEC;
1994    pub type Adprc = crate::EnumBitfieldStruct<u8, Adprc_SPEC>;
1995    impl Adprc {
1996        #[doc = "12-bit accuracy"]
1997        pub const _00: Self = Self::new(0);
1998
1999        #[doc = "10-bit accuracy"]
2000        pub const _01: Self = Self::new(1);
2001
2002        #[doc = "8-bit accuracy"]
2003        pub const _10: Self = Self::new(2);
2004
2005        #[doc = "Setting prohibited"]
2006        pub const _11: Self = Self::new(3);
2007    }
2008    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2009    pub struct Ace_SPEC;
2010    pub type Ace = crate::EnumBitfieldStruct<u8, Ace_SPEC>;
2011    impl Ace {
2012        #[doc = "Disable automatic clearing"]
2013        pub const _0: Self = Self::new(0);
2014
2015        #[doc = "Enable automatic clearing"]
2016        pub const _1: Self = Self::new(1);
2017    }
2018    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2019    pub struct Diagval_SPEC;
2020    pub type Diagval = crate::EnumBitfieldStruct<u8, Diagval_SPEC>;
2021    impl Diagval {
2022        #[doc = "Setting prohibited when self-diagnosis is enabled"]
2023        pub const _00: Self = Self::new(0);
2024
2025        #[doc = "0 volts"]
2026        pub const _01: Self = Self::new(1);
2027
2028        #[doc = "Reference voltage × 1/2"]
2029        pub const _10: Self = Self::new(2);
2030
2031        #[doc = "Reference voltage"]
2032        pub const _11: Self = Self::new(3);
2033    }
2034    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2035    pub struct Diagld_SPEC;
2036    pub type Diagld = crate::EnumBitfieldStruct<u8, Diagld_SPEC>;
2037    impl Diagld {
2038        #[doc = "Select rotation mode for self-diagnosis voltage"]
2039        pub const _0: Self = Self::new(0);
2040
2041        #[doc = "Select mixed mode for self-diagnosis voltage"]
2042        pub const _1: Self = Self::new(1);
2043    }
2044    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2045    pub struct Diagm_SPEC;
2046    pub type Diagm = crate::EnumBitfieldStruct<u8, Diagm_SPEC>;
2047    impl Diagm {
2048        #[doc = "Disable ADC12 self-diagnosis"]
2049        pub const _0: Self = Self::new(0);
2050
2051        #[doc = "Enable ADC12 self-diagnosis"]
2052        pub const _1: Self = Self::new(1);
2053    }
2054    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2055    pub struct Adrfmt_SPEC;
2056    pub type Adrfmt = crate::EnumBitfieldStruct<u8, Adrfmt_SPEC>;
2057    impl Adrfmt {
2058        #[doc = "Select right-justified for the A/D data register format"]
2059        pub const _0: Self = Self::new(0);
2060
2061        #[doc = "Select left-justified for the A/D data register format"]
2062        pub const _1: Self = Self::new(1);
2063    }
2064}
2065#[doc(hidden)]
2066#[derive(Copy, Clone, Eq, PartialEq)]
2067pub struct Adstrgr_SPEC;
2068impl crate::sealed::RegSpec for Adstrgr_SPEC {
2069    type DataType = u16;
2070}
2071
2072#[doc = "A/D Conversion Start Trigger Select Register"]
2073pub type Adstrgr = crate::RegValueT<Adstrgr_SPEC>;
2074
2075impl Adstrgr {
2076    #[doc = "A/D Conversion Start Trigger Select for Group B"]
2077    #[inline(always)]
2078    pub fn trsb(
2079        self,
2080    ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, Adstrgr_SPEC, crate::common::RW> {
2081        crate::common::RegisterField::<0,0x3f,1,0,u8,u8,Adstrgr_SPEC,crate::common::RW>::from_register(self,0)
2082    }
2083
2084    #[doc = "A/D Conversion Start Trigger Select"]
2085    #[inline(always)]
2086    pub fn trsa(
2087        self,
2088    ) -> crate::common::RegisterField<8, 0x3f, 1, 0, u8, u8, Adstrgr_SPEC, crate::common::RW> {
2089        crate::common::RegisterField::<8,0x3f,1,0,u8,u8,Adstrgr_SPEC,crate::common::RW>::from_register(self,0)
2090    }
2091}
2092impl ::core::default::Default for Adstrgr {
2093    #[inline(always)]
2094    fn default() -> Adstrgr {
2095        <crate::RegValueT<Adstrgr_SPEC> as RegisterValue<_>>::new(0)
2096    }
2097}
2098
2099#[doc(hidden)]
2100#[derive(Copy, Clone, Eq, PartialEq)]
2101pub struct Adexicr_SPEC;
2102impl crate::sealed::RegSpec for Adexicr_SPEC {
2103    type DataType = u16;
2104}
2105
2106#[doc = "A/D Conversion Extended Input Control Registers"]
2107pub type Adexicr = crate::RegValueT<Adexicr_SPEC>;
2108
2109impl Adexicr {
2110    #[doc = "Internal Reference Voltage A/D-Converted Value Addition/Average Mode Select"]
2111    #[inline(always)]
2112    pub fn ocsad(
2113        self,
2114    ) -> crate::common::RegisterField<
2115        1,
2116        0x1,
2117        1,
2118        0,
2119        adexicr::Ocsad,
2120        adexicr::Ocsad,
2121        Adexicr_SPEC,
2122        crate::common::RW,
2123    > {
2124        crate::common::RegisterField::<
2125            1,
2126            0x1,
2127            1,
2128            0,
2129            adexicr::Ocsad,
2130            adexicr::Ocsad,
2131            Adexicr_SPEC,
2132            crate::common::RW,
2133        >::from_register(self, 0)
2134    }
2135
2136    #[doc = "Internal Reference Voltage A/D Conversion Select"]
2137    #[inline(always)]
2138    pub fn ocsa(
2139        self,
2140    ) -> crate::common::RegisterField<
2141        9,
2142        0x1,
2143        1,
2144        0,
2145        adexicr::Ocsa,
2146        adexicr::Ocsa,
2147        Adexicr_SPEC,
2148        crate::common::RW,
2149    > {
2150        crate::common::RegisterField::<
2151            9,
2152            0x1,
2153            1,
2154            0,
2155            adexicr::Ocsa,
2156            adexicr::Ocsa,
2157            Adexicr_SPEC,
2158            crate::common::RW,
2159        >::from_register(self, 0)
2160    }
2161
2162    #[doc = "Internal Reference Voltage A/D Conversion Select for Group B"]
2163    #[inline(always)]
2164    pub fn ocsb(
2165        self,
2166    ) -> crate::common::RegisterField<
2167        11,
2168        0x1,
2169        1,
2170        0,
2171        adexicr::Ocsb,
2172        adexicr::Ocsb,
2173        Adexicr_SPEC,
2174        crate::common::RW,
2175    > {
2176        crate::common::RegisterField::<
2177            11,
2178            0x1,
2179            1,
2180            0,
2181            adexicr::Ocsb,
2182            adexicr::Ocsb,
2183            Adexicr_SPEC,
2184            crate::common::RW,
2185        >::from_register(self, 0)
2186    }
2187}
2188impl ::core::default::Default for Adexicr {
2189    #[inline(always)]
2190    fn default() -> Adexicr {
2191        <crate::RegValueT<Adexicr_SPEC> as RegisterValue<_>>::new(0)
2192    }
2193}
2194pub mod adexicr {
2195
2196    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2197    pub struct Ocsad_SPEC;
2198    pub type Ocsad = crate::EnumBitfieldStruct<u8, Ocsad_SPEC>;
2199    impl Ocsad {
2200        #[doc = "Do not select addition/average mode for internal reference voltage."]
2201        pub const _0: Self = Self::new(0);
2202
2203        #[doc = "Select addition/average mode for internal reference voltage."]
2204        pub const _1: Self = Self::new(1);
2205    }
2206    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2207    pub struct Ocsa_SPEC;
2208    pub type Ocsa = crate::EnumBitfieldStruct<u8, Ocsa_SPEC>;
2209    impl Ocsa {
2210        #[doc = "Disable A/D conversion of internal reference voltage"]
2211        pub const _0: Self = Self::new(0);
2212
2213        #[doc = "Enable A/D conversion of internal reference voltage"]
2214        pub const _1: Self = Self::new(1);
2215    }
2216    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2217    pub struct Ocsb_SPEC;
2218    pub type Ocsb = crate::EnumBitfieldStruct<u8, Ocsb_SPEC>;
2219    impl Ocsb {
2220        #[doc = "Disable A/D conversion of internal reference voltage"]
2221        pub const _0: Self = Self::new(0);
2222
2223        #[doc = "Enable A/D conversion of internal reference voltage"]
2224        pub const _1: Self = Self::new(1);
2225    }
2226}
2227#[doc(hidden)]
2228#[derive(Copy, Clone, Eq, PartialEq)]
2229pub struct Adansb0_SPEC;
2230impl crate::sealed::RegSpec for Adansb0_SPEC {
2231    type DataType = u16;
2232}
2233
2234#[doc = "A/D Channel Select Register B0"]
2235pub type Adansb0 = crate::RegValueT<Adansb0_SPEC>;
2236
2237impl Adansb0 {
2238    #[doc = "A/D Conversion Channels Select n"]
2239    #[inline(always)]
2240    pub fn ansb0(
2241        self,
2242    ) -> crate::common::RegisterField<
2243        0,
2244        0x1,
2245        1,
2246        0,
2247        adansb0::Ansb0,
2248        adansb0::Ansb0,
2249        Adansb0_SPEC,
2250        crate::common::RW,
2251    > {
2252        crate::common::RegisterField::<
2253            0,
2254            0x1,
2255            1,
2256            0,
2257            adansb0::Ansb0,
2258            adansb0::Ansb0,
2259            Adansb0_SPEC,
2260            crate::common::RW,
2261        >::from_register(self, 0)
2262    }
2263
2264    #[doc = "A/D Conversion Channels Select n"]
2265    #[inline(always)]
2266    pub fn ansb1(
2267        self,
2268    ) -> crate::common::RegisterField<
2269        1,
2270        0x1,
2271        1,
2272        0,
2273        adansb0::Ansb1,
2274        adansb0::Ansb1,
2275        Adansb0_SPEC,
2276        crate::common::RW,
2277    > {
2278        crate::common::RegisterField::<
2279            1,
2280            0x1,
2281            1,
2282            0,
2283            adansb0::Ansb1,
2284            adansb0::Ansb1,
2285            Adansb0_SPEC,
2286            crate::common::RW,
2287        >::from_register(self, 0)
2288    }
2289
2290    #[doc = "A/D Conversion Channels Select n"]
2291    #[inline(always)]
2292    pub fn ansb2(
2293        self,
2294    ) -> crate::common::RegisterField<
2295        2,
2296        0x1,
2297        1,
2298        0,
2299        adansb0::Ansb2,
2300        adansb0::Ansb2,
2301        Adansb0_SPEC,
2302        crate::common::RW,
2303    > {
2304        crate::common::RegisterField::<
2305            2,
2306            0x1,
2307            1,
2308            0,
2309            adansb0::Ansb2,
2310            adansb0::Ansb2,
2311            Adansb0_SPEC,
2312            crate::common::RW,
2313        >::from_register(self, 0)
2314    }
2315
2316    #[doc = "A/D Conversion Channels Select n"]
2317    #[inline(always)]
2318    pub fn ansb3(
2319        self,
2320    ) -> crate::common::RegisterField<
2321        3,
2322        0x1,
2323        1,
2324        0,
2325        adansb0::Ansb3,
2326        adansb0::Ansb3,
2327        Adansb0_SPEC,
2328        crate::common::RW,
2329    > {
2330        crate::common::RegisterField::<
2331            3,
2332            0x1,
2333            1,
2334            0,
2335            adansb0::Ansb3,
2336            adansb0::Ansb3,
2337            Adansb0_SPEC,
2338            crate::common::RW,
2339        >::from_register(self, 0)
2340    }
2341
2342    #[doc = "A/D Conversion Channels Select n"]
2343    #[inline(always)]
2344    pub fn ansb4(
2345        self,
2346    ) -> crate::common::RegisterField<
2347        4,
2348        0x1,
2349        1,
2350        0,
2351        adansb0::Ansb4,
2352        adansb0::Ansb4,
2353        Adansb0_SPEC,
2354        crate::common::RW,
2355    > {
2356        crate::common::RegisterField::<
2357            4,
2358            0x1,
2359            1,
2360            0,
2361            adansb0::Ansb4,
2362            adansb0::Ansb4,
2363            Adansb0_SPEC,
2364            crate::common::RW,
2365        >::from_register(self, 0)
2366    }
2367
2368    #[doc = "A/D Conversion Channels Select n"]
2369    #[inline(always)]
2370    pub fn ansb11(
2371        self,
2372    ) -> crate::common::RegisterField<
2373        11,
2374        0x1,
2375        1,
2376        0,
2377        adansb0::Ansb11,
2378        adansb0::Ansb11,
2379        Adansb0_SPEC,
2380        crate::common::RW,
2381    > {
2382        crate::common::RegisterField::<
2383            11,
2384            0x1,
2385            1,
2386            0,
2387            adansb0::Ansb11,
2388            adansb0::Ansb11,
2389            Adansb0_SPEC,
2390            crate::common::RW,
2391        >::from_register(self, 0)
2392    }
2393
2394    #[doc = "A/D Conversion Channels Select n"]
2395    #[inline(always)]
2396    pub fn ansb12(
2397        self,
2398    ) -> crate::common::RegisterField<
2399        12,
2400        0x1,
2401        1,
2402        0,
2403        adansb0::Ansb12,
2404        adansb0::Ansb12,
2405        Adansb0_SPEC,
2406        crate::common::RW,
2407    > {
2408        crate::common::RegisterField::<
2409            12,
2410            0x1,
2411            1,
2412            0,
2413            adansb0::Ansb12,
2414            adansb0::Ansb12,
2415            Adansb0_SPEC,
2416            crate::common::RW,
2417        >::from_register(self, 0)
2418    }
2419
2420    #[doc = "A/D Conversion Channels Select n"]
2421    #[inline(always)]
2422    pub fn ansb13(
2423        self,
2424    ) -> crate::common::RegisterField<
2425        13,
2426        0x1,
2427        1,
2428        0,
2429        adansb0::Ansb13,
2430        adansb0::Ansb13,
2431        Adansb0_SPEC,
2432        crate::common::RW,
2433    > {
2434        crate::common::RegisterField::<
2435            13,
2436            0x1,
2437            1,
2438            0,
2439            adansb0::Ansb13,
2440            adansb0::Ansb13,
2441            Adansb0_SPEC,
2442            crate::common::RW,
2443        >::from_register(self, 0)
2444    }
2445}
2446impl ::core::default::Default for Adansb0 {
2447    #[inline(always)]
2448    fn default() -> Adansb0 {
2449        <crate::RegValueT<Adansb0_SPEC> as RegisterValue<_>>::new(0)
2450    }
2451}
2452pub mod adansb0 {
2453
2454    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2455    pub struct Ansb0_SPEC;
2456    pub type Ansb0 = crate::EnumBitfieldStruct<u8, Ansb0_SPEC>;
2457    impl Ansb0 {
2458        #[doc = "Do not select associated input channel."]
2459        pub const _0: Self = Self::new(0);
2460
2461        #[doc = "Select associated input channel."]
2462        pub const _1: Self = Self::new(1);
2463    }
2464    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2465    pub struct Ansb1_SPEC;
2466    pub type Ansb1 = crate::EnumBitfieldStruct<u8, Ansb1_SPEC>;
2467    impl Ansb1 {
2468        #[doc = "Do not select associated input channel."]
2469        pub const _0: Self = Self::new(0);
2470
2471        #[doc = "Select associated input channel."]
2472        pub const _1: Self = Self::new(1);
2473    }
2474    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2475    pub struct Ansb2_SPEC;
2476    pub type Ansb2 = crate::EnumBitfieldStruct<u8, Ansb2_SPEC>;
2477    impl Ansb2 {
2478        #[doc = "Do not select associated input channel."]
2479        pub const _0: Self = Self::new(0);
2480
2481        #[doc = "Select associated input channel."]
2482        pub const _1: Self = Self::new(1);
2483    }
2484    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2485    pub struct Ansb3_SPEC;
2486    pub type Ansb3 = crate::EnumBitfieldStruct<u8, Ansb3_SPEC>;
2487    impl Ansb3 {
2488        #[doc = "Do not select associated input channel."]
2489        pub const _0: Self = Self::new(0);
2490
2491        #[doc = "Select associated input channel."]
2492        pub const _1: Self = Self::new(1);
2493    }
2494    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2495    pub struct Ansb4_SPEC;
2496    pub type Ansb4 = crate::EnumBitfieldStruct<u8, Ansb4_SPEC>;
2497    impl Ansb4 {
2498        #[doc = "Do not select associated input channel."]
2499        pub const _0: Self = Self::new(0);
2500
2501        #[doc = "Select associated input channel."]
2502        pub const _1: Self = Self::new(1);
2503    }
2504    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2505    pub struct Ansb11_SPEC;
2506    pub type Ansb11 = crate::EnumBitfieldStruct<u8, Ansb11_SPEC>;
2507    impl Ansb11 {
2508        #[doc = "Do not select associated input channel."]
2509        pub const _0: Self = Self::new(0);
2510
2511        #[doc = "Select associated input channel."]
2512        pub const _1: Self = Self::new(1);
2513    }
2514    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2515    pub struct Ansb12_SPEC;
2516    pub type Ansb12 = crate::EnumBitfieldStruct<u8, Ansb12_SPEC>;
2517    impl Ansb12 {
2518        #[doc = "Do not select associated input channel."]
2519        pub const _0: Self = Self::new(0);
2520
2521        #[doc = "Select associated input channel."]
2522        pub const _1: Self = Self::new(1);
2523    }
2524    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2525    pub struct Ansb13_SPEC;
2526    pub type Ansb13 = crate::EnumBitfieldStruct<u8, Ansb13_SPEC>;
2527    impl Ansb13 {
2528        #[doc = "Do not select associated input channel."]
2529        pub const _0: Self = Self::new(0);
2530
2531        #[doc = "Select associated input channel."]
2532        pub const _1: Self = Self::new(1);
2533    }
2534}
2535#[doc(hidden)]
2536#[derive(Copy, Clone, Eq, PartialEq)]
2537pub struct Adansb1_SPEC;
2538impl crate::sealed::RegSpec for Adansb1_SPEC {
2539    type DataType = u16;
2540}
2541
2542#[doc = "A/D Channel Select Register B1"]
2543pub type Adansb1 = crate::RegValueT<Adansb1_SPEC>;
2544
2545impl Adansb1 {
2546    #[doc = "A/D Conversion Channels Select 16"]
2547    #[inline(always)]
2548    pub fn ansb16(
2549        self,
2550    ) -> crate::common::RegisterField<
2551        0,
2552        0x1,
2553        1,
2554        0,
2555        adansb1::Ansb16,
2556        adansb1::Ansb16,
2557        Adansb1_SPEC,
2558        crate::common::RW,
2559    > {
2560        crate::common::RegisterField::<
2561            0,
2562            0x1,
2563            1,
2564            0,
2565            adansb1::Ansb16,
2566            adansb1::Ansb16,
2567            Adansb1_SPEC,
2568            crate::common::RW,
2569        >::from_register(self, 0)
2570    }
2571}
2572impl ::core::default::Default for Adansb1 {
2573    #[inline(always)]
2574    fn default() -> Adansb1 {
2575        <crate::RegValueT<Adansb1_SPEC> as RegisterValue<_>>::new(0)
2576    }
2577}
2578pub mod adansb1 {
2579
2580    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2581    pub struct Ansb16_SPEC;
2582    pub type Ansb16 = crate::EnumBitfieldStruct<u8, Ansb16_SPEC>;
2583    impl Ansb16 {
2584        #[doc = "Do not select associated input channel."]
2585        pub const _0: Self = Self::new(0);
2586
2587        #[doc = "Select associated input channel."]
2588        pub const _1: Self = Self::new(1);
2589    }
2590}
2591#[doc(hidden)]
2592#[derive(Copy, Clone, Eq, PartialEq)]
2593pub struct Addbldr_SPEC;
2594impl crate::sealed::RegSpec for Addbldr_SPEC {
2595    type DataType = u16;
2596}
2597
2598#[doc = "A/D Data Duplexing Register"]
2599pub type Addbldr = crate::RegValueT<Addbldr_SPEC>;
2600
2601impl Addbldr {
2602    #[doc = "Converted Value 15 to 0"]
2603    #[inline(always)]
2604    pub fn addbldr(
2605        self,
2606    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Addbldr_SPEC, crate::common::R>
2607    {
2608        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Addbldr_SPEC,crate::common::R>::from_register(self,0)
2609    }
2610}
2611impl ::core::default::Default for Addbldr {
2612    #[inline(always)]
2613    fn default() -> Addbldr {
2614        <crate::RegValueT<Addbldr_SPEC> as RegisterValue<_>>::new(0)
2615    }
2616}
2617
2618#[doc(hidden)]
2619#[derive(Copy, Clone, Eq, PartialEq)]
2620pub struct Adocdr_SPEC;
2621impl crate::sealed::RegSpec for Adocdr_SPEC {
2622    type DataType = u16;
2623}
2624
2625#[doc = "A/D Internal Reference Voltage Data Register"]
2626pub type Adocdr = crate::RegValueT<Adocdr_SPEC>;
2627
2628impl Adocdr {
2629    #[doc = "Converted Value 15 to 0"]
2630    #[inline(always)]
2631    pub fn adocdr(
2632        self,
2633    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Adocdr_SPEC, crate::common::R>
2634    {
2635        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Adocdr_SPEC,crate::common::R>::from_register(self,0)
2636    }
2637}
2638impl ::core::default::Default for Adocdr {
2639    #[inline(always)]
2640    fn default() -> Adocdr {
2641        <crate::RegValueT<Adocdr_SPEC> as RegisterValue<_>>::new(0)
2642    }
2643}
2644
2645#[doc(hidden)]
2646#[derive(Copy, Clone, Eq, PartialEq)]
2647pub struct Adrd_SPEC;
2648impl crate::sealed::RegSpec for Adrd_SPEC {
2649    type DataType = u16;
2650}
2651
2652#[doc = "A/D Self-Diagnosis Data Register"]
2653pub type Adrd = crate::RegValueT<Adrd_SPEC>;
2654
2655impl Adrd {
2656    #[doc = "Converted Value 11 to 0"]
2657    #[inline(always)]
2658    pub fn ad(
2659        self,
2660    ) -> crate::common::RegisterField<0, 0xfff, 1, 0, u16, u16, Adrd_SPEC, crate::common::R> {
2661        crate::common::RegisterField::<0,0xfff,1,0,u16,u16,Adrd_SPEC,crate::common::R>::from_register(self,0)
2662    }
2663
2664    #[doc = "Self-Diagnosis Status"]
2665    #[inline(always)]
2666    pub fn diagst(
2667        self,
2668    ) -> crate::common::RegisterField<
2669        14,
2670        0x3,
2671        1,
2672        0,
2673        adrd::Diagst,
2674        adrd::Diagst,
2675        Adrd_SPEC,
2676        crate::common::R,
2677    > {
2678        crate::common::RegisterField::<
2679            14,
2680            0x3,
2681            1,
2682            0,
2683            adrd::Diagst,
2684            adrd::Diagst,
2685            Adrd_SPEC,
2686            crate::common::R,
2687        >::from_register(self, 0)
2688    }
2689}
2690impl ::core::default::Default for Adrd {
2691    #[inline(always)]
2692    fn default() -> Adrd {
2693        <crate::RegValueT<Adrd_SPEC> as RegisterValue<_>>::new(0)
2694    }
2695}
2696pub mod adrd {
2697
2698    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2699    pub struct Diagst_SPEC;
2700    pub type Diagst = crate::EnumBitfieldStruct<u8, Diagst_SPEC>;
2701    impl Diagst {
2702        #[doc = "Self-diagnosis not executed after power-on."]
2703        pub const _00: Self = Self::new(0);
2704
2705        #[doc = "Self-diagnosis was executed using the 0 V voltage."]
2706        pub const _01: Self = Self::new(1);
2707
2708        #[doc = "Self-diagnosis was executed using the reference voltage × 1/2."]
2709        pub const _10: Self = Self::new(2);
2710
2711        #[doc = "Self-diagnosis was executed using the reference voltage ."]
2712        pub const _11: Self = Self::new(3);
2713    }
2714}
2715#[doc(hidden)]
2716#[derive(Copy, Clone, Eq, PartialEq)]
2717pub struct Addr_SPEC;
2718impl crate::sealed::RegSpec for Addr_SPEC {
2719    type DataType = u16;
2720}
2721
2722#[doc = "A/D Data Registers %s"]
2723pub type Addr = crate::RegValueT<Addr_SPEC>;
2724
2725impl Addr {
2726    #[doc = "Converted Value 15 to 0"]
2727    #[inline(always)]
2728    pub fn addr(
2729        self,
2730    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Addr_SPEC, crate::common::R> {
2731        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Addr_SPEC,crate::common::R>::from_register(self,0)
2732    }
2733}
2734impl ::core::default::Default for Addr {
2735    #[inline(always)]
2736    fn default() -> Addr {
2737        <crate::RegValueT<Addr_SPEC> as RegisterValue<_>>::new(0)
2738    }
2739}
2740
2741#[doc(hidden)]
2742#[derive(Copy, Clone, Eq, PartialEq)]
2743pub struct Addr16_SPEC;
2744impl crate::sealed::RegSpec for Addr16_SPEC {
2745    type DataType = u16;
2746}
2747
2748#[doc = "A/D Data Registers 16"]
2749pub type Addr16 = crate::RegValueT<Addr16_SPEC>;
2750
2751impl Addr16 {
2752    #[doc = "Converted Value 15 to 0"]
2753    #[inline(always)]
2754    pub fn addr(
2755        self,
2756    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Addr16_SPEC, crate::common::R>
2757    {
2758        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Addr16_SPEC,crate::common::R>::from_register(self,0)
2759    }
2760}
2761impl ::core::default::Default for Addr16 {
2762    #[inline(always)]
2763    fn default() -> Addr16 {
2764        <crate::RegValueT<Addr16_SPEC> as RegisterValue<_>>::new(0)
2765    }
2766}
2767
2768#[doc(hidden)]
2769#[derive(Copy, Clone, Eq, PartialEq)]
2770pub struct Addiscr_SPEC;
2771impl crate::sealed::RegSpec for Addiscr_SPEC {
2772    type DataType = u8;
2773}
2774
2775#[doc = "A/D Disconnection Detection Control Register"]
2776pub type Addiscr = crate::RegValueT<Addiscr_SPEC>;
2777
2778impl Addiscr {
2779    #[doc = "Disconnection Detection Assist Setting"]
2780    #[inline(always)]
2781    pub fn adndis(
2782        self,
2783    ) -> crate::common::RegisterField<
2784        0,
2785        0xf,
2786        1,
2787        0,
2788        addiscr::Adndis,
2789        addiscr::Adndis,
2790        Addiscr_SPEC,
2791        crate::common::RW,
2792    > {
2793        crate::common::RegisterField::<
2794            0,
2795            0xf,
2796            1,
2797            0,
2798            addiscr::Adndis,
2799            addiscr::Adndis,
2800            Addiscr_SPEC,
2801            crate::common::RW,
2802        >::from_register(self, 0)
2803    }
2804
2805    #[doc = "Precharge/discharge select"]
2806    #[inline(always)]
2807    pub fn pchg(
2808        self,
2809    ) -> crate::common::RegisterField<
2810        4,
2811        0x1,
2812        1,
2813        0,
2814        addiscr::Pchg,
2815        addiscr::Pchg,
2816        Addiscr_SPEC,
2817        crate::common::RW,
2818    > {
2819        crate::common::RegisterField::<
2820            4,
2821            0x1,
2822            1,
2823            0,
2824            addiscr::Pchg,
2825            addiscr::Pchg,
2826            Addiscr_SPEC,
2827            crate::common::RW,
2828        >::from_register(self, 0)
2829    }
2830}
2831impl ::core::default::Default for Addiscr {
2832    #[inline(always)]
2833    fn default() -> Addiscr {
2834        <crate::RegValueT<Addiscr_SPEC> as RegisterValue<_>>::new(0)
2835    }
2836}
2837pub mod addiscr {
2838
2839    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2840    pub struct Adndis_SPEC;
2841    pub type Adndis = crate::EnumBitfieldStruct<u8, Adndis_SPEC>;
2842    impl Adndis {
2843        #[doc = "The disconnection detection assist function is disabled"]
2844        pub const _0_X_0: Self = Self::new(0);
2845
2846        #[doc = "Setting prohibited"]
2847        pub const _0_X_1: Self = Self::new(1);
2848    }
2849    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2850    pub struct Pchg_SPEC;
2851    pub type Pchg = crate::EnumBitfieldStruct<u8, Pchg_SPEC>;
2852    impl Pchg {
2853        #[doc = "Discharge"]
2854        pub const _0: Self = Self::new(0);
2855
2856        #[doc = "Precharge"]
2857        pub const _1: Self = Self::new(1);
2858    }
2859}
2860#[doc(hidden)]
2861#[derive(Copy, Clone, Eq, PartialEq)]
2862pub struct Adgspcr_SPEC;
2863impl crate::sealed::RegSpec for Adgspcr_SPEC {
2864    type DataType = u16;
2865}
2866
2867#[doc = "A/D Group Scan Priority Control Register"]
2868pub type Adgspcr = crate::RegValueT<Adgspcr_SPEC>;
2869
2870impl Adgspcr {
2871    #[doc = "Group Priority Operation Setting"]
2872    #[inline(always)]
2873    pub fn pgs(
2874        self,
2875    ) -> crate::common::RegisterField<
2876        0,
2877        0x1,
2878        1,
2879        0,
2880        adgspcr::Pgs,
2881        adgspcr::Pgs,
2882        Adgspcr_SPEC,
2883        crate::common::RW,
2884    > {
2885        crate::common::RegisterField::<
2886            0,
2887            0x1,
2888            1,
2889            0,
2890            adgspcr::Pgs,
2891            adgspcr::Pgs,
2892            Adgspcr_SPEC,
2893            crate::common::RW,
2894        >::from_register(self, 0)
2895    }
2896
2897    #[doc = "Lower-Priority Group Restart Setting"]
2898    #[inline(always)]
2899    pub fn gbrscn(
2900        self,
2901    ) -> crate::common::RegisterField<
2902        1,
2903        0x1,
2904        1,
2905        0,
2906        adgspcr::Gbrscn,
2907        adgspcr::Gbrscn,
2908        Adgspcr_SPEC,
2909        crate::common::RW,
2910    > {
2911        crate::common::RegisterField::<
2912            1,
2913            0x1,
2914            1,
2915            0,
2916            adgspcr::Gbrscn,
2917            adgspcr::Gbrscn,
2918            Adgspcr_SPEC,
2919            crate::common::RW,
2920        >::from_register(self, 0)
2921    }
2922
2923    #[doc = "Enabled only when PGS = 1 and GBRSCN = 1."]
2924    #[inline(always)]
2925    pub fn lgrrs(
2926        self,
2927    ) -> crate::common::RegisterField<
2928        14,
2929        0x1,
2930        1,
2931        0,
2932        adgspcr::Lgrrs,
2933        adgspcr::Lgrrs,
2934        Adgspcr_SPEC,
2935        crate::common::RW,
2936    > {
2937        crate::common::RegisterField::<
2938            14,
2939            0x1,
2940            1,
2941            0,
2942            adgspcr::Lgrrs,
2943            adgspcr::Lgrrs,
2944            Adgspcr_SPEC,
2945            crate::common::RW,
2946        >::from_register(self, 0)
2947    }
2948
2949    #[doc = "Single Scan Continuous Start"]
2950    #[inline(always)]
2951    pub fn gbrp(
2952        self,
2953    ) -> crate::common::RegisterField<
2954        15,
2955        0x1,
2956        1,
2957        0,
2958        adgspcr::Gbrp,
2959        adgspcr::Gbrp,
2960        Adgspcr_SPEC,
2961        crate::common::RW,
2962    > {
2963        crate::common::RegisterField::<
2964            15,
2965            0x1,
2966            1,
2967            0,
2968            adgspcr::Gbrp,
2969            adgspcr::Gbrp,
2970            Adgspcr_SPEC,
2971            crate::common::RW,
2972        >::from_register(self, 0)
2973    }
2974}
2975impl ::core::default::Default for Adgspcr {
2976    #[inline(always)]
2977    fn default() -> Adgspcr {
2978        <crate::RegValueT<Adgspcr_SPEC> as RegisterValue<_>>::new(0)
2979    }
2980}
2981pub mod adgspcr {
2982
2983    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2984    pub struct Pgs_SPEC;
2985    pub type Pgs = crate::EnumBitfieldStruct<u8, Pgs_SPEC>;
2986    impl Pgs {
2987        #[doc = "Operate without group priority control."]
2988        pub const _0: Self = Self::new(0);
2989
2990        #[doc = "Operate with group priority control."]
2991        pub const _1: Self = Self::new(1);
2992    }
2993    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
2994    pub struct Gbrscn_SPEC;
2995    pub type Gbrscn = crate::EnumBitfieldStruct<u8, Gbrscn_SPEC>;
2996    impl Gbrscn {
2997        #[doc = "Disable rescanning of the group that was stopped in group priority operation"]
2998        pub const _0: Self = Self::new(0);
2999
3000        #[doc = "Enable rescanning of the group that was stopped in group priority operation."]
3001        pub const _1: Self = Self::new(1);
3002    }
3003    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3004    pub struct Lgrrs_SPEC;
3005    pub type Lgrrs = crate::EnumBitfieldStruct<u8, Lgrrs_SPEC>;
3006    impl Lgrrs {
3007        #[doc = "Start rescanning from the first channel for scanning"]
3008        pub const _0: Self = Self::new(0);
3009
3010        #[doc = "Start rescanning from the channel for which A/D conversion is not completed."]
3011        pub const _1: Self = Self::new(1);
3012    }
3013    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3014    pub struct Gbrp_SPEC;
3015    pub type Gbrp = crate::EnumBitfieldStruct<u8, Gbrp_SPEC>;
3016    impl Gbrp {
3017        #[doc = "Single scan is not continuously activated."]
3018        pub const _0: Self = Self::new(0);
3019
3020        #[doc = "Single scan for the group with the lower-priority is continuously activated."]
3021        pub const _1: Self = Self::new(1);
3022    }
3023}
3024#[doc(hidden)]
3025#[derive(Copy, Clone, Eq, PartialEq)]
3026pub struct Addbldra_SPEC;
3027impl crate::sealed::RegSpec for Addbldra_SPEC {
3028    type DataType = u16;
3029}
3030
3031#[doc = "A/D Data Duplexing Register A"]
3032pub type Addbldra = crate::RegValueT<Addbldra_SPEC>;
3033
3034impl Addbldra {
3035    #[doc = "Converted Value 15 to 0"]
3036    #[inline(always)]
3037    pub fn addbldr(
3038        self,
3039    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Addbldra_SPEC, crate::common::R>
3040    {
3041        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Addbldra_SPEC,crate::common::R>::from_register(self,0)
3042    }
3043}
3044impl ::core::default::Default for Addbldra {
3045    #[inline(always)]
3046    fn default() -> Addbldra {
3047        <crate::RegValueT<Addbldra_SPEC> as RegisterValue<_>>::new(0)
3048    }
3049}
3050
3051#[doc(hidden)]
3052#[derive(Copy, Clone, Eq, PartialEq)]
3053pub struct Addbldrb_SPEC;
3054impl crate::sealed::RegSpec for Addbldrb_SPEC {
3055    type DataType = u16;
3056}
3057
3058#[doc = "A/D Data Duplexing Register B"]
3059pub type Addbldrb = crate::RegValueT<Addbldrb_SPEC>;
3060
3061impl Addbldrb {
3062    #[doc = "Converted Value 15 to 0"]
3063    #[inline(always)]
3064    pub fn addbldr(
3065        self,
3066    ) -> crate::common::RegisterField<0, 0xffff, 1, 0, u16, u16, Addbldrb_SPEC, crate::common::R>
3067    {
3068        crate::common::RegisterField::<0,0xffff,1,0,u16,u16,Addbldrb_SPEC,crate::common::R>::from_register(self,0)
3069    }
3070}
3071impl ::core::default::Default for Addbldrb {
3072    #[inline(always)]
3073    fn default() -> Addbldrb {
3074        <crate::RegValueT<Addbldrb_SPEC> as RegisterValue<_>>::new(0)
3075    }
3076}
3077
3078#[doc(hidden)]
3079#[derive(Copy, Clone, Eq, PartialEq)]
3080pub struct Adwinmon_SPEC;
3081impl crate::sealed::RegSpec for Adwinmon_SPEC {
3082    type DataType = u8;
3083}
3084
3085#[doc = "A/D Compare Function Window A/B Status Monitor Register"]
3086pub type Adwinmon = crate::RegValueT<Adwinmon_SPEC>;
3087
3088impl Adwinmon {
3089    #[doc = "Combination Result Monitor"]
3090    #[inline(always)]
3091    pub fn moncomb(
3092        self,
3093    ) -> crate::common::RegisterField<
3094        0,
3095        0x1,
3096        1,
3097        0,
3098        adwinmon::Moncomb,
3099        adwinmon::Moncomb,
3100        Adwinmon_SPEC,
3101        crate::common::R,
3102    > {
3103        crate::common::RegisterField::<
3104            0,
3105            0x1,
3106            1,
3107            0,
3108            adwinmon::Moncomb,
3109            adwinmon::Moncomb,
3110            Adwinmon_SPEC,
3111            crate::common::R,
3112        >::from_register(self, 0)
3113    }
3114
3115    #[doc = "Comparison Result Monitor A"]
3116    #[inline(always)]
3117    pub fn moncmpa(
3118        self,
3119    ) -> crate::common::RegisterField<
3120        4,
3121        0x1,
3122        1,
3123        0,
3124        adwinmon::Moncmpa,
3125        adwinmon::Moncmpa,
3126        Adwinmon_SPEC,
3127        crate::common::R,
3128    > {
3129        crate::common::RegisterField::<
3130            4,
3131            0x1,
3132            1,
3133            0,
3134            adwinmon::Moncmpa,
3135            adwinmon::Moncmpa,
3136            Adwinmon_SPEC,
3137            crate::common::R,
3138        >::from_register(self, 0)
3139    }
3140
3141    #[doc = "Comparison Result Monitor B"]
3142    #[inline(always)]
3143    pub fn moncmpb(
3144        self,
3145    ) -> crate::common::RegisterField<
3146        5,
3147        0x1,
3148        1,
3149        0,
3150        adwinmon::Moncmpb,
3151        adwinmon::Moncmpb,
3152        Adwinmon_SPEC,
3153        crate::common::R,
3154    > {
3155        crate::common::RegisterField::<
3156            5,
3157            0x1,
3158            1,
3159            0,
3160            adwinmon::Moncmpb,
3161            adwinmon::Moncmpb,
3162            Adwinmon_SPEC,
3163            crate::common::R,
3164        >::from_register(self, 0)
3165    }
3166}
3167impl ::core::default::Default for Adwinmon {
3168    #[inline(always)]
3169    fn default() -> Adwinmon {
3170        <crate::RegValueT<Adwinmon_SPEC> as RegisterValue<_>>::new(0)
3171    }
3172}
3173pub mod adwinmon {
3174
3175    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3176    pub struct Moncomb_SPEC;
3177    pub type Moncomb = crate::EnumBitfieldStruct<u8, Moncomb_SPEC>;
3178    impl Moncomb {
3179        #[doc = "Window A/B composite conditions are not met."]
3180        pub const _0: Self = Self::new(0);
3181
3182        #[doc = "Window A/B composite conditions are met."]
3183        pub const _1: Self = Self::new(1);
3184    }
3185    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3186    pub struct Moncmpa_SPEC;
3187    pub type Moncmpa = crate::EnumBitfieldStruct<u8, Moncmpa_SPEC>;
3188    impl Moncmpa {
3189        #[doc = "Window A comparison conditions are not met."]
3190        pub const _0: Self = Self::new(0);
3191
3192        #[doc = "Window A comparison conditions are met."]
3193        pub const _1: Self = Self::new(1);
3194    }
3195    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3196    pub struct Moncmpb_SPEC;
3197    pub type Moncmpb = crate::EnumBitfieldStruct<u8, Moncmpb_SPEC>;
3198    impl Moncmpb {
3199        #[doc = "Window B comparison conditions are not met."]
3200        pub const _0: Self = Self::new(0);
3201
3202        #[doc = "Window B comparison conditions are met."]
3203        pub const _1: Self = Self::new(1);
3204    }
3205}
3206#[doc(hidden)]
3207#[derive(Copy, Clone, Eq, PartialEq)]
3208pub struct Adcmpcr_SPEC;
3209impl crate::sealed::RegSpec for Adcmpcr_SPEC {
3210    type DataType = u16;
3211}
3212
3213#[doc = "A/D Compare Function Control Register"]
3214pub type Adcmpcr = crate::RegValueT<Adcmpcr_SPEC>;
3215
3216impl Adcmpcr {
3217    #[doc = "Window A/B Composite Conditions Setting"]
3218    #[inline(always)]
3219    pub fn cmpab(
3220        self,
3221    ) -> crate::common::RegisterField<
3222        0,
3223        0x3,
3224        1,
3225        0,
3226        adcmpcr::Cmpab,
3227        adcmpcr::Cmpab,
3228        Adcmpcr_SPEC,
3229        crate::common::RW,
3230    > {
3231        crate::common::RegisterField::<
3232            0,
3233            0x3,
3234            1,
3235            0,
3236            adcmpcr::Cmpab,
3237            adcmpcr::Cmpab,
3238            Adcmpcr_SPEC,
3239            crate::common::RW,
3240        >::from_register(self, 0)
3241    }
3242
3243    #[doc = "Compare Window B Operation Enable"]
3244    #[inline(always)]
3245    pub fn cmpbe(
3246        self,
3247    ) -> crate::common::RegisterField<
3248        9,
3249        0x1,
3250        1,
3251        0,
3252        adcmpcr::Cmpbe,
3253        adcmpcr::Cmpbe,
3254        Adcmpcr_SPEC,
3255        crate::common::RW,
3256    > {
3257        crate::common::RegisterField::<
3258            9,
3259            0x1,
3260            1,
3261            0,
3262            adcmpcr::Cmpbe,
3263            adcmpcr::Cmpbe,
3264            Adcmpcr_SPEC,
3265            crate::common::RW,
3266        >::from_register(self, 0)
3267    }
3268
3269    #[doc = "Compare Window A Operation Enable"]
3270    #[inline(always)]
3271    pub fn cmpae(
3272        self,
3273    ) -> crate::common::RegisterField<
3274        11,
3275        0x1,
3276        1,
3277        0,
3278        adcmpcr::Cmpae,
3279        adcmpcr::Cmpae,
3280        Adcmpcr_SPEC,
3281        crate::common::RW,
3282    > {
3283        crate::common::RegisterField::<
3284            11,
3285            0x1,
3286            1,
3287            0,
3288            adcmpcr::Cmpae,
3289            adcmpcr::Cmpae,
3290            Adcmpcr_SPEC,
3291            crate::common::RW,
3292        >::from_register(self, 0)
3293    }
3294
3295    #[doc = "Compare B Interrupt Enable"]
3296    #[inline(always)]
3297    pub fn cmpbie(
3298        self,
3299    ) -> crate::common::RegisterField<
3300        13,
3301        0x1,
3302        1,
3303        0,
3304        adcmpcr::Cmpbie,
3305        adcmpcr::Cmpbie,
3306        Adcmpcr_SPEC,
3307        crate::common::RW,
3308    > {
3309        crate::common::RegisterField::<
3310            13,
3311            0x1,
3312            1,
3313            0,
3314            adcmpcr::Cmpbie,
3315            adcmpcr::Cmpbie,
3316            Adcmpcr_SPEC,
3317            crate::common::RW,
3318        >::from_register(self, 0)
3319    }
3320
3321    #[doc = "Window Function Setting"]
3322    #[inline(always)]
3323    pub fn wcmpe(
3324        self,
3325    ) -> crate::common::RegisterField<
3326        14,
3327        0x1,
3328        1,
3329        0,
3330        adcmpcr::Wcmpe,
3331        adcmpcr::Wcmpe,
3332        Adcmpcr_SPEC,
3333        crate::common::RW,
3334    > {
3335        crate::common::RegisterField::<
3336            14,
3337            0x1,
3338            1,
3339            0,
3340            adcmpcr::Wcmpe,
3341            adcmpcr::Wcmpe,
3342            Adcmpcr_SPEC,
3343            crate::common::RW,
3344        >::from_register(self, 0)
3345    }
3346
3347    #[doc = "Compare A Interrupt Enable"]
3348    #[inline(always)]
3349    pub fn cmpaie(
3350        self,
3351    ) -> crate::common::RegisterField<
3352        15,
3353        0x1,
3354        1,
3355        0,
3356        adcmpcr::Cmpaie,
3357        adcmpcr::Cmpaie,
3358        Adcmpcr_SPEC,
3359        crate::common::RW,
3360    > {
3361        crate::common::RegisterField::<
3362            15,
3363            0x1,
3364            1,
3365            0,
3366            adcmpcr::Cmpaie,
3367            adcmpcr::Cmpaie,
3368            Adcmpcr_SPEC,
3369            crate::common::RW,
3370        >::from_register(self, 0)
3371    }
3372}
3373impl ::core::default::Default for Adcmpcr {
3374    #[inline(always)]
3375    fn default() -> Adcmpcr {
3376        <crate::RegValueT<Adcmpcr_SPEC> as RegisterValue<_>>::new(0)
3377    }
3378}
3379pub mod adcmpcr {
3380
3381    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3382    pub struct Cmpab_SPEC;
3383    pub type Cmpab = crate::EnumBitfieldStruct<u8, Cmpab_SPEC>;
3384    impl Cmpab {
3385        #[doc = "Output ADC120_WCMPM when window A OR window B comparison conditions are met. Otherwise, output ADC120_WCMPUM."]
3386        pub const _00: Self = Self::new(0);
3387
3388        #[doc = "Output ADC120_WCMPM when window A EXOR window B comparison conditions are met. Otherwise, output ADC120_WCMPUM."]
3389        pub const _01: Self = Self::new(1);
3390
3391        #[doc = "Output ADC120_WCMPM when window A AND window B comparison conditions are met. Otherwise, output ADC120_WCMPUM."]
3392        pub const _10: Self = Self::new(2);
3393
3394        #[doc = "Setting prohibited."]
3395        pub const _11: Self = Self::new(3);
3396    }
3397    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3398    pub struct Cmpbe_SPEC;
3399    pub type Cmpbe = crate::EnumBitfieldStruct<u8, Cmpbe_SPEC>;
3400    impl Cmpbe {
3401        #[doc = "Disable compare window B operation. Disable ADC120_WCMPM and ADC120_WCMPUM outputs."]
3402        pub const _0: Self = Self::new(0);
3403
3404        #[doc = "Enable compare window B operation."]
3405        pub const _1: Self = Self::new(1);
3406    }
3407    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3408    pub struct Cmpae_SPEC;
3409    pub type Cmpae = crate::EnumBitfieldStruct<u8, Cmpae_SPEC>;
3410    impl Cmpae {
3411        #[doc = "Disable compare window A operation. Disable ADC120_WCMPM and ADC120_WCMPUM outputs."]
3412        pub const _0: Self = Self::new(0);
3413
3414        #[doc = "Enable compare window A operation."]
3415        pub const _1: Self = Self::new(1);
3416    }
3417    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3418    pub struct Cmpbie_SPEC;
3419    pub type Cmpbie = crate::EnumBitfieldStruct<u8, Cmpbie_SPEC>;
3420    impl Cmpbie {
3421        #[doc = "Disable ADC120_CMPBI interrupt when comparison conditions (window B) are met."]
3422        pub const _0: Self = Self::new(0);
3423
3424        #[doc = "Enable ADC120_CMPBI interrupt when comparison conditions (window B) are met."]
3425        pub const _1: Self = Self::new(1);
3426    }
3427    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3428    pub struct Wcmpe_SPEC;
3429    pub type Wcmpe = crate::EnumBitfieldStruct<u8, Wcmpe_SPEC>;
3430    impl Wcmpe {
3431        #[doc = "Disable window function Window A and window B operate as a comparator to compare the single value on the lower side with the A/D conversion result."]
3432        pub const _0: Self = Self::new(0);
3433
3434        #[doc = "Enable window function Window A and window B operate as a comparator to compare the two values on the upper and lower sides with the A/D conversion result."]
3435        pub const _1: Self = Self::new(1);
3436    }
3437    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3438    pub struct Cmpaie_SPEC;
3439    pub type Cmpaie = crate::EnumBitfieldStruct<u8, Cmpaie_SPEC>;
3440    impl Cmpaie {
3441        #[doc = "Disable ADC120_CMPAI interrupt when comparison conditions (window A) are met."]
3442        pub const _0: Self = Self::new(0);
3443
3444        #[doc = "Enable ADC120_CMPAI interrupt when comparison conditions (window A) are met."]
3445        pub const _1: Self = Self::new(1);
3446    }
3447}
3448#[doc(hidden)]
3449#[derive(Copy, Clone, Eq, PartialEq)]
3450pub struct Adcmpanser_SPEC;
3451impl crate::sealed::RegSpec for Adcmpanser_SPEC {
3452    type DataType = u8;
3453}
3454
3455#[doc = "A/D Compare Function Window A Extended Input Select Register"]
3456pub type Adcmpanser = crate::RegValueT<Adcmpanser_SPEC>;
3457
3458impl Adcmpanser {
3459    #[doc = "Internal Reference Voltage Compare Select"]
3460    #[inline(always)]
3461    pub fn cmpoca(
3462        self,
3463    ) -> crate::common::RegisterField<
3464        1,
3465        0x1,
3466        1,
3467        0,
3468        adcmpanser::Cmpoca,
3469        adcmpanser::Cmpoca,
3470        Adcmpanser_SPEC,
3471        crate::common::RW,
3472    > {
3473        crate::common::RegisterField::<
3474            1,
3475            0x1,
3476            1,
3477            0,
3478            adcmpanser::Cmpoca,
3479            adcmpanser::Cmpoca,
3480            Adcmpanser_SPEC,
3481            crate::common::RW,
3482        >::from_register(self, 0)
3483    }
3484}
3485impl ::core::default::Default for Adcmpanser {
3486    #[inline(always)]
3487    fn default() -> Adcmpanser {
3488        <crate::RegValueT<Adcmpanser_SPEC> as RegisterValue<_>>::new(0)
3489    }
3490}
3491pub mod adcmpanser {
3492
3493    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3494    pub struct Cmpoca_SPEC;
3495    pub type Cmpoca = crate::EnumBitfieldStruct<u8, Cmpoca_SPEC>;
3496    impl Cmpoca {
3497        #[doc = "Exclude the internal reference voltage from the compare Window A target range."]
3498        pub const _0: Self = Self::new(0);
3499
3500        #[doc = "Include the internal reference voltage in the compare Window A target range."]
3501        pub const _1: Self = Self::new(1);
3502    }
3503}
3504#[doc(hidden)]
3505#[derive(Copy, Clone, Eq, PartialEq)]
3506pub struct Adcmpler_SPEC;
3507impl crate::sealed::RegSpec for Adcmpler_SPEC {
3508    type DataType = u8;
3509}
3510
3511#[doc = "A/D Compare Function Window A Extended Input Comparison Condition Setting Register"]
3512pub type Adcmpler = crate::RegValueT<Adcmpler_SPEC>;
3513
3514impl Adcmpler {
3515    #[doc = "Compare Window A Internal Reference Voltage Comparison Condition Select"]
3516    #[inline(always)]
3517    pub fn cmploca(
3518        self,
3519    ) -> crate::common::RegisterField<
3520        1,
3521        0x1,
3522        1,
3523        0,
3524        adcmpler::Cmploca,
3525        adcmpler::Cmploca,
3526        Adcmpler_SPEC,
3527        crate::common::RW,
3528    > {
3529        crate::common::RegisterField::<
3530            1,
3531            0x1,
3532            1,
3533            0,
3534            adcmpler::Cmploca,
3535            adcmpler::Cmploca,
3536            Adcmpler_SPEC,
3537            crate::common::RW,
3538        >::from_register(self, 0)
3539    }
3540}
3541impl ::core::default::Default for Adcmpler {
3542    #[inline(always)]
3543    fn default() -> Adcmpler {
3544        <crate::RegValueT<Adcmpler_SPEC> as RegisterValue<_>>::new(0)
3545    }
3546}
3547pub mod adcmpler {
3548
3549    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3550    pub struct Cmploca_SPEC;
3551    pub type Cmploca = crate::EnumBitfieldStruct<u8, Cmploca_SPEC>;
3552    impl Cmploca {
3553        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0) : ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or A/D-converted value > ADCMPDR1 value"]
3554        pub const _0: Self = Self::new(0);
3555
3556        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
3557        pub const _1: Self = Self::new(1);
3558    }
3559}
3560#[doc(hidden)]
3561#[derive(Copy, Clone, Eq, PartialEq)]
3562pub struct Adcmpansr0_SPEC;
3563impl crate::sealed::RegSpec for Adcmpansr0_SPEC {
3564    type DataType = u16;
3565}
3566
3567#[doc = "A/D Compare Function Window A Channel Select Register 0"]
3568pub type Adcmpansr0 = crate::RegValueT<Adcmpansr0_SPEC>;
3569
3570impl Adcmpansr0 {
3571    #[doc = "Compare Window A Channel Select n"]
3572    #[inline(always)]
3573    pub fn cmpcha0(
3574        self,
3575    ) -> crate::common::RegisterField<
3576        0,
3577        0x1,
3578        1,
3579        0,
3580        adcmpansr0::Cmpcha0,
3581        adcmpansr0::Cmpcha0,
3582        Adcmpansr0_SPEC,
3583        crate::common::RW,
3584    > {
3585        crate::common::RegisterField::<
3586            0,
3587            0x1,
3588            1,
3589            0,
3590            adcmpansr0::Cmpcha0,
3591            adcmpansr0::Cmpcha0,
3592            Adcmpansr0_SPEC,
3593            crate::common::RW,
3594        >::from_register(self, 0)
3595    }
3596
3597    #[doc = "Compare Window A Channel Select n"]
3598    #[inline(always)]
3599    pub fn cmpcha1(
3600        self,
3601    ) -> crate::common::RegisterField<
3602        1,
3603        0x1,
3604        1,
3605        0,
3606        adcmpansr0::Cmpcha1,
3607        adcmpansr0::Cmpcha1,
3608        Adcmpansr0_SPEC,
3609        crate::common::RW,
3610    > {
3611        crate::common::RegisterField::<
3612            1,
3613            0x1,
3614            1,
3615            0,
3616            adcmpansr0::Cmpcha1,
3617            adcmpansr0::Cmpcha1,
3618            Adcmpansr0_SPEC,
3619            crate::common::RW,
3620        >::from_register(self, 0)
3621    }
3622
3623    #[doc = "Compare Window A Channel Select n"]
3624    #[inline(always)]
3625    pub fn cmpcha2(
3626        self,
3627    ) -> crate::common::RegisterField<
3628        2,
3629        0x1,
3630        1,
3631        0,
3632        adcmpansr0::Cmpcha2,
3633        adcmpansr0::Cmpcha2,
3634        Adcmpansr0_SPEC,
3635        crate::common::RW,
3636    > {
3637        crate::common::RegisterField::<
3638            2,
3639            0x1,
3640            1,
3641            0,
3642            adcmpansr0::Cmpcha2,
3643            adcmpansr0::Cmpcha2,
3644            Adcmpansr0_SPEC,
3645            crate::common::RW,
3646        >::from_register(self, 0)
3647    }
3648
3649    #[doc = "Compare Window A Channel Select n"]
3650    #[inline(always)]
3651    pub fn cmpcha3(
3652        self,
3653    ) -> crate::common::RegisterField<
3654        3,
3655        0x1,
3656        1,
3657        0,
3658        adcmpansr0::Cmpcha3,
3659        adcmpansr0::Cmpcha3,
3660        Adcmpansr0_SPEC,
3661        crate::common::RW,
3662    > {
3663        crate::common::RegisterField::<
3664            3,
3665            0x1,
3666            1,
3667            0,
3668            adcmpansr0::Cmpcha3,
3669            adcmpansr0::Cmpcha3,
3670            Adcmpansr0_SPEC,
3671            crate::common::RW,
3672        >::from_register(self, 0)
3673    }
3674
3675    #[doc = "Compare Window A Channel Select n"]
3676    #[inline(always)]
3677    pub fn cmpcha4(
3678        self,
3679    ) -> crate::common::RegisterField<
3680        4,
3681        0x1,
3682        1,
3683        0,
3684        adcmpansr0::Cmpcha4,
3685        adcmpansr0::Cmpcha4,
3686        Adcmpansr0_SPEC,
3687        crate::common::RW,
3688    > {
3689        crate::common::RegisterField::<
3690            4,
3691            0x1,
3692            1,
3693            0,
3694            adcmpansr0::Cmpcha4,
3695            adcmpansr0::Cmpcha4,
3696            Adcmpansr0_SPEC,
3697            crate::common::RW,
3698        >::from_register(self, 0)
3699    }
3700
3701    #[doc = "Compare Window A Channel Select n"]
3702    #[inline(always)]
3703    pub fn cmpcha11(
3704        self,
3705    ) -> crate::common::RegisterField<
3706        11,
3707        0x1,
3708        1,
3709        0,
3710        adcmpansr0::Cmpcha11,
3711        adcmpansr0::Cmpcha11,
3712        Adcmpansr0_SPEC,
3713        crate::common::RW,
3714    > {
3715        crate::common::RegisterField::<
3716            11,
3717            0x1,
3718            1,
3719            0,
3720            adcmpansr0::Cmpcha11,
3721            adcmpansr0::Cmpcha11,
3722            Adcmpansr0_SPEC,
3723            crate::common::RW,
3724        >::from_register(self, 0)
3725    }
3726
3727    #[doc = "Compare Window A Channel Select n"]
3728    #[inline(always)]
3729    pub fn cmpcha12(
3730        self,
3731    ) -> crate::common::RegisterField<
3732        12,
3733        0x1,
3734        1,
3735        0,
3736        adcmpansr0::Cmpcha12,
3737        adcmpansr0::Cmpcha12,
3738        Adcmpansr0_SPEC,
3739        crate::common::RW,
3740    > {
3741        crate::common::RegisterField::<
3742            12,
3743            0x1,
3744            1,
3745            0,
3746            adcmpansr0::Cmpcha12,
3747            adcmpansr0::Cmpcha12,
3748            Adcmpansr0_SPEC,
3749            crate::common::RW,
3750        >::from_register(self, 0)
3751    }
3752
3753    #[doc = "Compare Window A Channel Select n"]
3754    #[inline(always)]
3755    pub fn cmpcha13(
3756        self,
3757    ) -> crate::common::RegisterField<
3758        13,
3759        0x1,
3760        1,
3761        0,
3762        adcmpansr0::Cmpcha13,
3763        adcmpansr0::Cmpcha13,
3764        Adcmpansr0_SPEC,
3765        crate::common::RW,
3766    > {
3767        crate::common::RegisterField::<
3768            13,
3769            0x1,
3770            1,
3771            0,
3772            adcmpansr0::Cmpcha13,
3773            adcmpansr0::Cmpcha13,
3774            Adcmpansr0_SPEC,
3775            crate::common::RW,
3776        >::from_register(self, 0)
3777    }
3778}
3779impl ::core::default::Default for Adcmpansr0 {
3780    #[inline(always)]
3781    fn default() -> Adcmpansr0 {
3782        <crate::RegValueT<Adcmpansr0_SPEC> as RegisterValue<_>>::new(0)
3783    }
3784}
3785pub mod adcmpansr0 {
3786
3787    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3788    pub struct Cmpcha0_SPEC;
3789    pub type Cmpcha0 = crate::EnumBitfieldStruct<u8, Cmpcha0_SPEC>;
3790    impl Cmpcha0 {
3791        #[doc = "Disable compare function for associated input channel"]
3792        pub const _0: Self = Self::new(0);
3793
3794        #[doc = "Enable compare function for associated input channel"]
3795        pub const _1: Self = Self::new(1);
3796    }
3797    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3798    pub struct Cmpcha1_SPEC;
3799    pub type Cmpcha1 = crate::EnumBitfieldStruct<u8, Cmpcha1_SPEC>;
3800    impl Cmpcha1 {
3801        #[doc = "Disable compare function for associated input channel"]
3802        pub const _0: Self = Self::new(0);
3803
3804        #[doc = "Enable compare function for associated input channel"]
3805        pub const _1: Self = Self::new(1);
3806    }
3807    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3808    pub struct Cmpcha2_SPEC;
3809    pub type Cmpcha2 = crate::EnumBitfieldStruct<u8, Cmpcha2_SPEC>;
3810    impl Cmpcha2 {
3811        #[doc = "Disable compare function for associated input channel"]
3812        pub const _0: Self = Self::new(0);
3813
3814        #[doc = "Enable compare function for associated input channel"]
3815        pub const _1: Self = Self::new(1);
3816    }
3817    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3818    pub struct Cmpcha3_SPEC;
3819    pub type Cmpcha3 = crate::EnumBitfieldStruct<u8, Cmpcha3_SPEC>;
3820    impl Cmpcha3 {
3821        #[doc = "Disable compare function for associated input channel"]
3822        pub const _0: Self = Self::new(0);
3823
3824        #[doc = "Enable compare function for associated input channel"]
3825        pub const _1: Self = Self::new(1);
3826    }
3827    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3828    pub struct Cmpcha4_SPEC;
3829    pub type Cmpcha4 = crate::EnumBitfieldStruct<u8, Cmpcha4_SPEC>;
3830    impl Cmpcha4 {
3831        #[doc = "Disable compare function for associated input channel"]
3832        pub const _0: Self = Self::new(0);
3833
3834        #[doc = "Enable compare function for associated input channel"]
3835        pub const _1: Self = Self::new(1);
3836    }
3837    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3838    pub struct Cmpcha11_SPEC;
3839    pub type Cmpcha11 = crate::EnumBitfieldStruct<u8, Cmpcha11_SPEC>;
3840    impl Cmpcha11 {
3841        #[doc = "Disable compare function for associated input channel"]
3842        pub const _0: Self = Self::new(0);
3843
3844        #[doc = "Enable compare function for associated input channel"]
3845        pub const _1: Self = Self::new(1);
3846    }
3847    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3848    pub struct Cmpcha12_SPEC;
3849    pub type Cmpcha12 = crate::EnumBitfieldStruct<u8, Cmpcha12_SPEC>;
3850    impl Cmpcha12 {
3851        #[doc = "Disable compare function for associated input channel"]
3852        pub const _0: Self = Self::new(0);
3853
3854        #[doc = "Enable compare function for associated input channel"]
3855        pub const _1: Self = Self::new(1);
3856    }
3857    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3858    pub struct Cmpcha13_SPEC;
3859    pub type Cmpcha13 = crate::EnumBitfieldStruct<u8, Cmpcha13_SPEC>;
3860    impl Cmpcha13 {
3861        #[doc = "Disable compare function for associated input channel"]
3862        pub const _0: Self = Self::new(0);
3863
3864        #[doc = "Enable compare function for associated input channel"]
3865        pub const _1: Self = Self::new(1);
3866    }
3867}
3868#[doc(hidden)]
3869#[derive(Copy, Clone, Eq, PartialEq)]
3870pub struct Adcmpansr1_SPEC;
3871impl crate::sealed::RegSpec for Adcmpansr1_SPEC {
3872    type DataType = u16;
3873}
3874
3875#[doc = "A/D Compare Function Window A Channel Select Register 1"]
3876pub type Adcmpansr1 = crate::RegValueT<Adcmpansr1_SPEC>;
3877
3878impl Adcmpansr1 {
3879    #[doc = "Compare Window A Channel Select 16"]
3880    #[inline(always)]
3881    pub fn cmpcha16(
3882        self,
3883    ) -> crate::common::RegisterField<
3884        0,
3885        0x1,
3886        1,
3887        0,
3888        adcmpansr1::Cmpcha16,
3889        adcmpansr1::Cmpcha16,
3890        Adcmpansr1_SPEC,
3891        crate::common::RW,
3892    > {
3893        crate::common::RegisterField::<
3894            0,
3895            0x1,
3896            1,
3897            0,
3898            adcmpansr1::Cmpcha16,
3899            adcmpansr1::Cmpcha16,
3900            Adcmpansr1_SPEC,
3901            crate::common::RW,
3902        >::from_register(self, 0)
3903    }
3904}
3905impl ::core::default::Default for Adcmpansr1 {
3906    #[inline(always)]
3907    fn default() -> Adcmpansr1 {
3908        <crate::RegValueT<Adcmpansr1_SPEC> as RegisterValue<_>>::new(0)
3909    }
3910}
3911pub mod adcmpansr1 {
3912
3913    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
3914    pub struct Cmpcha16_SPEC;
3915    pub type Cmpcha16 = crate::EnumBitfieldStruct<u8, Cmpcha16_SPEC>;
3916    impl Cmpcha16 {
3917        #[doc = "Disable compare function for associated input channel"]
3918        pub const _0: Self = Self::new(0);
3919
3920        #[doc = "Enable compare function for associated input channel"]
3921        pub const _1: Self = Self::new(1);
3922    }
3923}
3924#[doc(hidden)]
3925#[derive(Copy, Clone, Eq, PartialEq)]
3926pub struct Adcmplr0_SPEC;
3927impl crate::sealed::RegSpec for Adcmplr0_SPEC {
3928    type DataType = u16;
3929}
3930
3931#[doc = "A/D Compare Function Window A Comparison Condition Setting Register 0"]
3932pub type Adcmplr0 = crate::RegValueT<Adcmplr0_SPEC>;
3933
3934impl Adcmplr0 {
3935    #[doc = "Compare Window A Comparison Condition Select n"]
3936    #[inline(always)]
3937    pub fn cmplcha0(
3938        self,
3939    ) -> crate::common::RegisterField<
3940        0,
3941        0x1,
3942        1,
3943        0,
3944        adcmplr0::Cmplcha0,
3945        adcmplr0::Cmplcha0,
3946        Adcmplr0_SPEC,
3947        crate::common::RW,
3948    > {
3949        crate::common::RegisterField::<
3950            0,
3951            0x1,
3952            1,
3953            0,
3954            adcmplr0::Cmplcha0,
3955            adcmplr0::Cmplcha0,
3956            Adcmplr0_SPEC,
3957            crate::common::RW,
3958        >::from_register(self, 0)
3959    }
3960
3961    #[doc = "Compare Window A Comparison Condition Select n"]
3962    #[inline(always)]
3963    pub fn cmplcha1(
3964        self,
3965    ) -> crate::common::RegisterField<
3966        1,
3967        0x1,
3968        1,
3969        0,
3970        adcmplr0::Cmplcha1,
3971        adcmplr0::Cmplcha1,
3972        Adcmplr0_SPEC,
3973        crate::common::RW,
3974    > {
3975        crate::common::RegisterField::<
3976            1,
3977            0x1,
3978            1,
3979            0,
3980            adcmplr0::Cmplcha1,
3981            adcmplr0::Cmplcha1,
3982            Adcmplr0_SPEC,
3983            crate::common::RW,
3984        >::from_register(self, 0)
3985    }
3986
3987    #[doc = "Compare Window A Comparison Condition Select n"]
3988    #[inline(always)]
3989    pub fn cmplcha2(
3990        self,
3991    ) -> crate::common::RegisterField<
3992        2,
3993        0x1,
3994        1,
3995        0,
3996        adcmplr0::Cmplcha2,
3997        adcmplr0::Cmplcha2,
3998        Adcmplr0_SPEC,
3999        crate::common::RW,
4000    > {
4001        crate::common::RegisterField::<
4002            2,
4003            0x1,
4004            1,
4005            0,
4006            adcmplr0::Cmplcha2,
4007            adcmplr0::Cmplcha2,
4008            Adcmplr0_SPEC,
4009            crate::common::RW,
4010        >::from_register(self, 0)
4011    }
4012
4013    #[doc = "Compare Window A Comparison Condition Select n"]
4014    #[inline(always)]
4015    pub fn cmplcha3(
4016        self,
4017    ) -> crate::common::RegisterField<
4018        3,
4019        0x1,
4020        1,
4021        0,
4022        adcmplr0::Cmplcha3,
4023        adcmplr0::Cmplcha3,
4024        Adcmplr0_SPEC,
4025        crate::common::RW,
4026    > {
4027        crate::common::RegisterField::<
4028            3,
4029            0x1,
4030            1,
4031            0,
4032            adcmplr0::Cmplcha3,
4033            adcmplr0::Cmplcha3,
4034            Adcmplr0_SPEC,
4035            crate::common::RW,
4036        >::from_register(self, 0)
4037    }
4038
4039    #[doc = "Compare Window A Comparison Condition Select n"]
4040    #[inline(always)]
4041    pub fn cmplcha4(
4042        self,
4043    ) -> crate::common::RegisterField<
4044        4,
4045        0x1,
4046        1,
4047        0,
4048        adcmplr0::Cmplcha4,
4049        adcmplr0::Cmplcha4,
4050        Adcmplr0_SPEC,
4051        crate::common::RW,
4052    > {
4053        crate::common::RegisterField::<
4054            4,
4055            0x1,
4056            1,
4057            0,
4058            adcmplr0::Cmplcha4,
4059            adcmplr0::Cmplcha4,
4060            Adcmplr0_SPEC,
4061            crate::common::RW,
4062        >::from_register(self, 0)
4063    }
4064
4065    #[doc = "Compare Window A Comparison Condition Select n"]
4066    #[inline(always)]
4067    pub fn cmplcha11(
4068        self,
4069    ) -> crate::common::RegisterField<
4070        11,
4071        0x1,
4072        1,
4073        0,
4074        adcmplr0::Cmplcha11,
4075        adcmplr0::Cmplcha11,
4076        Adcmplr0_SPEC,
4077        crate::common::RW,
4078    > {
4079        crate::common::RegisterField::<
4080            11,
4081            0x1,
4082            1,
4083            0,
4084            adcmplr0::Cmplcha11,
4085            adcmplr0::Cmplcha11,
4086            Adcmplr0_SPEC,
4087            crate::common::RW,
4088        >::from_register(self, 0)
4089    }
4090
4091    #[doc = "Compare Window A Comparison Condition Select n"]
4092    #[inline(always)]
4093    pub fn cmplcha12(
4094        self,
4095    ) -> crate::common::RegisterField<
4096        12,
4097        0x1,
4098        1,
4099        0,
4100        adcmplr0::Cmplcha12,
4101        adcmplr0::Cmplcha12,
4102        Adcmplr0_SPEC,
4103        crate::common::RW,
4104    > {
4105        crate::common::RegisterField::<
4106            12,
4107            0x1,
4108            1,
4109            0,
4110            adcmplr0::Cmplcha12,
4111            adcmplr0::Cmplcha12,
4112            Adcmplr0_SPEC,
4113            crate::common::RW,
4114        >::from_register(self, 0)
4115    }
4116
4117    #[doc = "Compare Window A Comparison Condition Select n"]
4118    #[inline(always)]
4119    pub fn cmplcha13(
4120        self,
4121    ) -> crate::common::RegisterField<
4122        13,
4123        0x1,
4124        1,
4125        0,
4126        adcmplr0::Cmplcha13,
4127        adcmplr0::Cmplcha13,
4128        Adcmplr0_SPEC,
4129        crate::common::RW,
4130    > {
4131        crate::common::RegisterField::<
4132            13,
4133            0x1,
4134            1,
4135            0,
4136            adcmplr0::Cmplcha13,
4137            adcmplr0::Cmplcha13,
4138            Adcmplr0_SPEC,
4139            crate::common::RW,
4140        >::from_register(self, 0)
4141    }
4142}
4143impl ::core::default::Default for Adcmplr0 {
4144    #[inline(always)]
4145    fn default() -> Adcmplr0 {
4146        <crate::RegValueT<Adcmplr0_SPEC> as RegisterValue<_>>::new(0)
4147    }
4148}
4149pub mod adcmplr0 {
4150
4151    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4152    pub struct Cmplcha0_SPEC;
4153    pub type Cmplcha0 = crate::EnumBitfieldStruct<u8, Cmplcha0_SPEC>;
4154    impl Cmplcha0 {
4155        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
4156        pub const _0: Self = Self::new(0);
4157
4158        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
4159        pub const _1: Self = Self::new(1);
4160    }
4161    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4162    pub struct Cmplcha1_SPEC;
4163    pub type Cmplcha1 = crate::EnumBitfieldStruct<u8, Cmplcha1_SPEC>;
4164    impl Cmplcha1 {
4165        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
4166        pub const _0: Self = Self::new(0);
4167
4168        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
4169        pub const _1: Self = Self::new(1);
4170    }
4171    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4172    pub struct Cmplcha2_SPEC;
4173    pub type Cmplcha2 = crate::EnumBitfieldStruct<u8, Cmplcha2_SPEC>;
4174    impl Cmplcha2 {
4175        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
4176        pub const _0: Self = Self::new(0);
4177
4178        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
4179        pub const _1: Self = Self::new(1);
4180    }
4181    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4182    pub struct Cmplcha3_SPEC;
4183    pub type Cmplcha3 = crate::EnumBitfieldStruct<u8, Cmplcha3_SPEC>;
4184    impl Cmplcha3 {
4185        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
4186        pub const _0: Self = Self::new(0);
4187
4188        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
4189        pub const _1: Self = Self::new(1);
4190    }
4191    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4192    pub struct Cmplcha4_SPEC;
4193    pub type Cmplcha4 = crate::EnumBitfieldStruct<u8, Cmplcha4_SPEC>;
4194    impl Cmplcha4 {
4195        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
4196        pub const _0: Self = Self::new(0);
4197
4198        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
4199        pub const _1: Self = Self::new(1);
4200    }
4201    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4202    pub struct Cmplcha11_SPEC;
4203    pub type Cmplcha11 = crate::EnumBitfieldStruct<u8, Cmplcha11_SPEC>;
4204    impl Cmplcha11 {
4205        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
4206        pub const _0: Self = Self::new(0);
4207
4208        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
4209        pub const _1: Self = Self::new(1);
4210    }
4211    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4212    pub struct Cmplcha12_SPEC;
4213    pub type Cmplcha12 = crate::EnumBitfieldStruct<u8, Cmplcha12_SPEC>;
4214    impl Cmplcha12 {
4215        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
4216        pub const _0: Self = Self::new(0);
4217
4218        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
4219        pub const _1: Self = Self::new(1);
4220    }
4221    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4222    pub struct Cmplcha13_SPEC;
4223    pub type Cmplcha13 = crate::EnumBitfieldStruct<u8, Cmplcha13_SPEC>;
4224    impl Cmplcha13 {
4225        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
4226        pub const _0: Self = Self::new(0);
4227
4228        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
4229        pub const _1: Self = Self::new(1);
4230    }
4231}
4232#[doc(hidden)]
4233#[derive(Copy, Clone, Eq, PartialEq)]
4234pub struct Adcmplr1_SPEC;
4235impl crate::sealed::RegSpec for Adcmplr1_SPEC {
4236    type DataType = u16;
4237}
4238
4239#[doc = "A/D Compare Function Window A Comparison Condition Setting Register 1"]
4240pub type Adcmplr1 = crate::RegValueT<Adcmplr1_SPEC>;
4241
4242impl Adcmplr1 {
4243    #[doc = "Compare Window A Comparison Condition Select 16"]
4244    #[inline(always)]
4245    pub fn cmplcha16(
4246        self,
4247    ) -> crate::common::RegisterField<
4248        0,
4249        0x1,
4250        1,
4251        0,
4252        adcmplr1::Cmplcha16,
4253        adcmplr1::Cmplcha16,
4254        Adcmplr1_SPEC,
4255        crate::common::RW,
4256    > {
4257        crate::common::RegisterField::<
4258            0,
4259            0x1,
4260            1,
4261            0,
4262            adcmplr1::Cmplcha16,
4263            adcmplr1::Cmplcha16,
4264            Adcmplr1_SPEC,
4265            crate::common::RW,
4266        >::from_register(self, 0)
4267    }
4268}
4269impl ::core::default::Default for Adcmplr1 {
4270    #[inline(always)]
4271    fn default() -> Adcmplr1 {
4272        <crate::RegValueT<Adcmplr1_SPEC> as RegisterValue<_>>::new(0)
4273    }
4274}
4275pub mod adcmplr1 {
4276
4277    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4278    pub struct Cmplcha16_SPEC;
4279    pub type Cmplcha16 = crate::EnumBitfieldStruct<u8, Cmplcha16_SPEC>;
4280    impl Cmplcha16 {
4281        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADCMPDR0 value, or ADCMPDR1 value < A/D-converted value"]
4282        pub const _0: Self = Self::new(0);
4283
4284        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADCMPDR0 value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADCMPDR0 value < A/D-converted value < ADCMPDR1 value"]
4285        pub const _1: Self = Self::new(1);
4286    }
4287}
4288#[doc(hidden)]
4289#[derive(Copy, Clone, Eq, PartialEq)]
4290pub struct Adcmpdr_SPEC;
4291impl crate::sealed::RegSpec for Adcmpdr_SPEC {
4292    type DataType = u16;
4293}
4294
4295#[doc = "A/D Compare Function Window A Lower-Side/Upper-Side Level Setting Register"]
4296pub type Adcmpdr = crate::RegValueT<Adcmpdr_SPEC>;
4297
4298impl NoBitfieldReg<Adcmpdr_SPEC> for Adcmpdr {}
4299impl ::core::default::Default for Adcmpdr {
4300    #[inline(always)]
4301    fn default() -> Adcmpdr {
4302        <crate::RegValueT<Adcmpdr_SPEC> as RegisterValue<_>>::new(0)
4303    }
4304}
4305
4306#[doc(hidden)]
4307#[derive(Copy, Clone, Eq, PartialEq)]
4308pub struct Adcmpsr0_SPEC;
4309impl crate::sealed::RegSpec for Adcmpsr0_SPEC {
4310    type DataType = u16;
4311}
4312
4313#[doc = "A/D Compare Function Window A Channel Status Register 0"]
4314pub type Adcmpsr0 = crate::RegValueT<Adcmpsr0_SPEC>;
4315
4316impl Adcmpsr0 {
4317    #[doc = "Compare Window A Flag n"]
4318    #[inline(always)]
4319    pub fn cmpstcha0(
4320        self,
4321    ) -> crate::common::RegisterField<
4322        0,
4323        0x1,
4324        1,
4325        0,
4326        adcmpsr0::Cmpstcha0,
4327        adcmpsr0::Cmpstcha0,
4328        Adcmpsr0_SPEC,
4329        crate::common::RW,
4330    > {
4331        crate::common::RegisterField::<
4332            0,
4333            0x1,
4334            1,
4335            0,
4336            adcmpsr0::Cmpstcha0,
4337            adcmpsr0::Cmpstcha0,
4338            Adcmpsr0_SPEC,
4339            crate::common::RW,
4340        >::from_register(self, 0)
4341    }
4342
4343    #[doc = "Compare Window A Flag n"]
4344    #[inline(always)]
4345    pub fn cmpstcha1(
4346        self,
4347    ) -> crate::common::RegisterField<
4348        1,
4349        0x1,
4350        1,
4351        0,
4352        adcmpsr0::Cmpstcha1,
4353        adcmpsr0::Cmpstcha1,
4354        Adcmpsr0_SPEC,
4355        crate::common::RW,
4356    > {
4357        crate::common::RegisterField::<
4358            1,
4359            0x1,
4360            1,
4361            0,
4362            adcmpsr0::Cmpstcha1,
4363            adcmpsr0::Cmpstcha1,
4364            Adcmpsr0_SPEC,
4365            crate::common::RW,
4366        >::from_register(self, 0)
4367    }
4368
4369    #[doc = "Compare Window A Flag n"]
4370    #[inline(always)]
4371    pub fn cmpstcha2(
4372        self,
4373    ) -> crate::common::RegisterField<
4374        2,
4375        0x1,
4376        1,
4377        0,
4378        adcmpsr0::Cmpstcha2,
4379        adcmpsr0::Cmpstcha2,
4380        Adcmpsr0_SPEC,
4381        crate::common::RW,
4382    > {
4383        crate::common::RegisterField::<
4384            2,
4385            0x1,
4386            1,
4387            0,
4388            adcmpsr0::Cmpstcha2,
4389            adcmpsr0::Cmpstcha2,
4390            Adcmpsr0_SPEC,
4391            crate::common::RW,
4392        >::from_register(self, 0)
4393    }
4394
4395    #[doc = "Compare Window A Flag n"]
4396    #[inline(always)]
4397    pub fn cmpstcha3(
4398        self,
4399    ) -> crate::common::RegisterField<
4400        3,
4401        0x1,
4402        1,
4403        0,
4404        adcmpsr0::Cmpstcha3,
4405        adcmpsr0::Cmpstcha3,
4406        Adcmpsr0_SPEC,
4407        crate::common::RW,
4408    > {
4409        crate::common::RegisterField::<
4410            3,
4411            0x1,
4412            1,
4413            0,
4414            adcmpsr0::Cmpstcha3,
4415            adcmpsr0::Cmpstcha3,
4416            Adcmpsr0_SPEC,
4417            crate::common::RW,
4418        >::from_register(self, 0)
4419    }
4420
4421    #[doc = "Compare Window A Flag n"]
4422    #[inline(always)]
4423    pub fn cmpstcha4(
4424        self,
4425    ) -> crate::common::RegisterField<
4426        4,
4427        0x1,
4428        1,
4429        0,
4430        adcmpsr0::Cmpstcha4,
4431        adcmpsr0::Cmpstcha4,
4432        Adcmpsr0_SPEC,
4433        crate::common::RW,
4434    > {
4435        crate::common::RegisterField::<
4436            4,
4437            0x1,
4438            1,
4439            0,
4440            adcmpsr0::Cmpstcha4,
4441            adcmpsr0::Cmpstcha4,
4442            Adcmpsr0_SPEC,
4443            crate::common::RW,
4444        >::from_register(self, 0)
4445    }
4446
4447    #[doc = "Compare Window A Flag n"]
4448    #[inline(always)]
4449    pub fn cmpstcha11(
4450        self,
4451    ) -> crate::common::RegisterField<
4452        11,
4453        0x1,
4454        1,
4455        0,
4456        adcmpsr0::Cmpstcha11,
4457        adcmpsr0::Cmpstcha11,
4458        Adcmpsr0_SPEC,
4459        crate::common::RW,
4460    > {
4461        crate::common::RegisterField::<
4462            11,
4463            0x1,
4464            1,
4465            0,
4466            adcmpsr0::Cmpstcha11,
4467            adcmpsr0::Cmpstcha11,
4468            Adcmpsr0_SPEC,
4469            crate::common::RW,
4470        >::from_register(self, 0)
4471    }
4472
4473    #[doc = "Compare Window A Flag n"]
4474    #[inline(always)]
4475    pub fn cmpstcha12(
4476        self,
4477    ) -> crate::common::RegisterField<
4478        12,
4479        0x1,
4480        1,
4481        0,
4482        adcmpsr0::Cmpstcha12,
4483        adcmpsr0::Cmpstcha12,
4484        Adcmpsr0_SPEC,
4485        crate::common::RW,
4486    > {
4487        crate::common::RegisterField::<
4488            12,
4489            0x1,
4490            1,
4491            0,
4492            adcmpsr0::Cmpstcha12,
4493            adcmpsr0::Cmpstcha12,
4494            Adcmpsr0_SPEC,
4495            crate::common::RW,
4496        >::from_register(self, 0)
4497    }
4498
4499    #[doc = "Compare Window A Flag n"]
4500    #[inline(always)]
4501    pub fn cmpstcha13(
4502        self,
4503    ) -> crate::common::RegisterField<
4504        13,
4505        0x1,
4506        1,
4507        0,
4508        adcmpsr0::Cmpstcha13,
4509        adcmpsr0::Cmpstcha13,
4510        Adcmpsr0_SPEC,
4511        crate::common::RW,
4512    > {
4513        crate::common::RegisterField::<
4514            13,
4515            0x1,
4516            1,
4517            0,
4518            adcmpsr0::Cmpstcha13,
4519            adcmpsr0::Cmpstcha13,
4520            Adcmpsr0_SPEC,
4521            crate::common::RW,
4522        >::from_register(self, 0)
4523    }
4524}
4525impl ::core::default::Default for Adcmpsr0 {
4526    #[inline(always)]
4527    fn default() -> Adcmpsr0 {
4528        <crate::RegValueT<Adcmpsr0_SPEC> as RegisterValue<_>>::new(0)
4529    }
4530}
4531pub mod adcmpsr0 {
4532
4533    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4534    pub struct Cmpstcha0_SPEC;
4535    pub type Cmpstcha0 = crate::EnumBitfieldStruct<u8, Cmpstcha0_SPEC>;
4536    impl Cmpstcha0 {
4537        #[doc = "Comparison conditions are not met."]
4538        pub const _0: Self = Self::new(0);
4539
4540        #[doc = "Comparison conditions are met."]
4541        pub const _1: Self = Self::new(1);
4542    }
4543    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4544    pub struct Cmpstcha1_SPEC;
4545    pub type Cmpstcha1 = crate::EnumBitfieldStruct<u8, Cmpstcha1_SPEC>;
4546    impl Cmpstcha1 {
4547        #[doc = "Comparison conditions are not met."]
4548        pub const _0: Self = Self::new(0);
4549
4550        #[doc = "Comparison conditions are met."]
4551        pub const _1: Self = Self::new(1);
4552    }
4553    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4554    pub struct Cmpstcha2_SPEC;
4555    pub type Cmpstcha2 = crate::EnumBitfieldStruct<u8, Cmpstcha2_SPEC>;
4556    impl Cmpstcha2 {
4557        #[doc = "Comparison conditions are not met."]
4558        pub const _0: Self = Self::new(0);
4559
4560        #[doc = "Comparison conditions are met."]
4561        pub const _1: Self = Self::new(1);
4562    }
4563    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4564    pub struct Cmpstcha3_SPEC;
4565    pub type Cmpstcha3 = crate::EnumBitfieldStruct<u8, Cmpstcha3_SPEC>;
4566    impl Cmpstcha3 {
4567        #[doc = "Comparison conditions are not met."]
4568        pub const _0: Self = Self::new(0);
4569
4570        #[doc = "Comparison conditions are met."]
4571        pub const _1: Self = Self::new(1);
4572    }
4573    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4574    pub struct Cmpstcha4_SPEC;
4575    pub type Cmpstcha4 = crate::EnumBitfieldStruct<u8, Cmpstcha4_SPEC>;
4576    impl Cmpstcha4 {
4577        #[doc = "Comparison conditions are not met."]
4578        pub const _0: Self = Self::new(0);
4579
4580        #[doc = "Comparison conditions are met."]
4581        pub const _1: Self = Self::new(1);
4582    }
4583    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4584    pub struct Cmpstcha11_SPEC;
4585    pub type Cmpstcha11 = crate::EnumBitfieldStruct<u8, Cmpstcha11_SPEC>;
4586    impl Cmpstcha11 {
4587        #[doc = "Comparison conditions are not met."]
4588        pub const _0: Self = Self::new(0);
4589
4590        #[doc = "Comparison conditions are met."]
4591        pub const _1: Self = Self::new(1);
4592    }
4593    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4594    pub struct Cmpstcha12_SPEC;
4595    pub type Cmpstcha12 = crate::EnumBitfieldStruct<u8, Cmpstcha12_SPEC>;
4596    impl Cmpstcha12 {
4597        #[doc = "Comparison conditions are not met."]
4598        pub const _0: Self = Self::new(0);
4599
4600        #[doc = "Comparison conditions are met."]
4601        pub const _1: Self = Self::new(1);
4602    }
4603    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4604    pub struct Cmpstcha13_SPEC;
4605    pub type Cmpstcha13 = crate::EnumBitfieldStruct<u8, Cmpstcha13_SPEC>;
4606    impl Cmpstcha13 {
4607        #[doc = "Comparison conditions are not met."]
4608        pub const _0: Self = Self::new(0);
4609
4610        #[doc = "Comparison conditions are met."]
4611        pub const _1: Self = Self::new(1);
4612    }
4613}
4614#[doc(hidden)]
4615#[derive(Copy, Clone, Eq, PartialEq)]
4616pub struct Adcmpsr1_SPEC;
4617impl crate::sealed::RegSpec for Adcmpsr1_SPEC {
4618    type DataType = u16;
4619}
4620
4621#[doc = "A/D Compare Function Window A Channel Status Register1"]
4622pub type Adcmpsr1 = crate::RegValueT<Adcmpsr1_SPEC>;
4623
4624impl Adcmpsr1 {
4625    #[doc = "Compare Window A Flag 16"]
4626    #[inline(always)]
4627    pub fn cmpstcha16(
4628        self,
4629    ) -> crate::common::RegisterField<
4630        0,
4631        0x1,
4632        1,
4633        0,
4634        adcmpsr1::Cmpstcha16,
4635        adcmpsr1::Cmpstcha16,
4636        Adcmpsr1_SPEC,
4637        crate::common::RW,
4638    > {
4639        crate::common::RegisterField::<
4640            0,
4641            0x1,
4642            1,
4643            0,
4644            adcmpsr1::Cmpstcha16,
4645            adcmpsr1::Cmpstcha16,
4646            Adcmpsr1_SPEC,
4647            crate::common::RW,
4648        >::from_register(self, 0)
4649    }
4650}
4651impl ::core::default::Default for Adcmpsr1 {
4652    #[inline(always)]
4653    fn default() -> Adcmpsr1 {
4654        <crate::RegValueT<Adcmpsr1_SPEC> as RegisterValue<_>>::new(0)
4655    }
4656}
4657pub mod adcmpsr1 {
4658
4659    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4660    pub struct Cmpstcha16_SPEC;
4661    pub type Cmpstcha16 = crate::EnumBitfieldStruct<u8, Cmpstcha16_SPEC>;
4662    impl Cmpstcha16 {
4663        #[doc = "A comparison condition is not met."]
4664        pub const _0: Self = Self::new(0);
4665
4666        #[doc = "A comparison condition is met."]
4667        pub const _1: Self = Self::new(1);
4668    }
4669}
4670#[doc(hidden)]
4671#[derive(Copy, Clone, Eq, PartialEq)]
4672pub struct Adcmpser_SPEC;
4673impl crate::sealed::RegSpec for Adcmpser_SPEC {
4674    type DataType = u8;
4675}
4676
4677#[doc = "A/D Compare Function Window A Extended Input Channel Status Register"]
4678pub type Adcmpser = crate::RegValueT<Adcmpser_SPEC>;
4679
4680impl Adcmpser {
4681    #[doc = "Compare Window A Internal Reference Voltage Compare Flag"]
4682    #[inline(always)]
4683    pub fn cmpstoca(
4684        self,
4685    ) -> crate::common::RegisterField<
4686        1,
4687        0x1,
4688        1,
4689        0,
4690        adcmpser::Cmpstoca,
4691        adcmpser::Cmpstoca,
4692        Adcmpser_SPEC,
4693        crate::common::RW,
4694    > {
4695        crate::common::RegisterField::<
4696            1,
4697            0x1,
4698            1,
4699            0,
4700            adcmpser::Cmpstoca,
4701            adcmpser::Cmpstoca,
4702            Adcmpser_SPEC,
4703            crate::common::RW,
4704        >::from_register(self, 0)
4705    }
4706}
4707impl ::core::default::Default for Adcmpser {
4708    #[inline(always)]
4709    fn default() -> Adcmpser {
4710        <crate::RegValueT<Adcmpser_SPEC> as RegisterValue<_>>::new(0)
4711    }
4712}
4713pub mod adcmpser {
4714
4715    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4716    pub struct Cmpstoca_SPEC;
4717    pub type Cmpstoca = crate::EnumBitfieldStruct<u8, Cmpstoca_SPEC>;
4718    impl Cmpstoca {
4719        #[doc = "Comparison conditions are not met."]
4720        pub const _0: Self = Self::new(0);
4721
4722        #[doc = "Comparison conditions are met."]
4723        pub const _1: Self = Self::new(1);
4724    }
4725}
4726#[doc(hidden)]
4727#[derive(Copy, Clone, Eq, PartialEq)]
4728pub struct Adcmpbnsr_SPEC;
4729impl crate::sealed::RegSpec for Adcmpbnsr_SPEC {
4730    type DataType = u8;
4731}
4732
4733#[doc = "A/D Compare Function Window B Channel Select Register"]
4734pub type Adcmpbnsr = crate::RegValueT<Adcmpbnsr_SPEC>;
4735
4736impl Adcmpbnsr {
4737    #[doc = "Compare Window B Channel Select"]
4738    #[inline(always)]
4739    pub fn cmpchb(
4740        self,
4741    ) -> crate::common::RegisterField<0, 0x3f, 1, 0, u8, u8, Adcmpbnsr_SPEC, crate::common::RW>
4742    {
4743        crate::common::RegisterField::<0,0x3f,1,0,u8,u8,Adcmpbnsr_SPEC,crate::common::RW>::from_register(self,0)
4744    }
4745
4746    #[doc = "Compare Window B Comparison Condition Setting"]
4747    #[inline(always)]
4748    pub fn cmplb(
4749        self,
4750    ) -> crate::common::RegisterField<
4751        7,
4752        0x1,
4753        1,
4754        0,
4755        adcmpbnsr::Cmplb,
4756        adcmpbnsr::Cmplb,
4757        Adcmpbnsr_SPEC,
4758        crate::common::RW,
4759    > {
4760        crate::common::RegisterField::<
4761            7,
4762            0x1,
4763            1,
4764            0,
4765            adcmpbnsr::Cmplb,
4766            adcmpbnsr::Cmplb,
4767            Adcmpbnsr_SPEC,
4768            crate::common::RW,
4769        >::from_register(self, 0)
4770    }
4771}
4772impl ::core::default::Default for Adcmpbnsr {
4773    #[inline(always)]
4774    fn default() -> Adcmpbnsr {
4775        <crate::RegValueT<Adcmpbnsr_SPEC> as RegisterValue<_>>::new(0)
4776    }
4777}
4778pub mod adcmpbnsr {
4779
4780    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4781    pub struct Cmplb_SPEC;
4782    pub type Cmplb = crate::EnumBitfieldStruct<u8, Cmplb_SPEC>;
4783    impl Cmplb {
4784        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADWINLLB value > A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): A/D-converted value < ADWINLLB value, or ADWINULB value < A/D-converted value"]
4785        pub const _0: Self = Self::new(0);
4786
4787        #[doc = "When window function is disabled (ADCMPCR.WCMPE = 0): ADWINLLB value < A/D-converted value When window function is enabled (ADCMPCR.WCMPE = 1): ADWINLLB value < A/D-converted value < ADWINULB value"]
4788        pub const _1: Self = Self::new(1);
4789    }
4790}
4791#[doc(hidden)]
4792#[derive(Copy, Clone, Eq, PartialEq)]
4793pub struct Adwinllb_SPEC;
4794impl crate::sealed::RegSpec for Adwinllb_SPEC {
4795    type DataType = u16;
4796}
4797
4798#[doc = "A/D Compare Function Window B Lower-Side/Upper-Side Level Setting Register"]
4799pub type Adwinllb = crate::RegValueT<Adwinllb_SPEC>;
4800
4801impl NoBitfieldReg<Adwinllb_SPEC> for Adwinllb {}
4802impl ::core::default::Default for Adwinllb {
4803    #[inline(always)]
4804    fn default() -> Adwinllb {
4805        <crate::RegValueT<Adwinllb_SPEC> as RegisterValue<_>>::new(0)
4806    }
4807}
4808
4809#[doc(hidden)]
4810#[derive(Copy, Clone, Eq, PartialEq)]
4811pub struct Adwinulb_SPEC;
4812impl crate::sealed::RegSpec for Adwinulb_SPEC {
4813    type DataType = u16;
4814}
4815
4816#[doc = "A/D Compare Function Window B Lower-Side/Upper-Side Level Setting Register"]
4817pub type Adwinulb = crate::RegValueT<Adwinulb_SPEC>;
4818
4819impl NoBitfieldReg<Adwinulb_SPEC> for Adwinulb {}
4820impl ::core::default::Default for Adwinulb {
4821    #[inline(always)]
4822    fn default() -> Adwinulb {
4823        <crate::RegValueT<Adwinulb_SPEC> as RegisterValue<_>>::new(0)
4824    }
4825}
4826
4827#[doc(hidden)]
4828#[derive(Copy, Clone, Eq, PartialEq)]
4829pub struct Adcmpbsr_SPEC;
4830impl crate::sealed::RegSpec for Adcmpbsr_SPEC {
4831    type DataType = u8;
4832}
4833
4834#[doc = "A/D Compare Function Window B Status Register"]
4835pub type Adcmpbsr = crate::RegValueT<Adcmpbsr_SPEC>;
4836
4837impl Adcmpbsr {
4838    #[doc = "Compare Window B Flag"]
4839    #[inline(always)]
4840    pub fn cmpstb(
4841        self,
4842    ) -> crate::common::RegisterField<
4843        0,
4844        0x1,
4845        1,
4846        0,
4847        adcmpbsr::Cmpstb,
4848        adcmpbsr::Cmpstb,
4849        Adcmpbsr_SPEC,
4850        crate::common::RW,
4851    > {
4852        crate::common::RegisterField::<
4853            0,
4854            0x1,
4855            1,
4856            0,
4857            adcmpbsr::Cmpstb,
4858            adcmpbsr::Cmpstb,
4859            Adcmpbsr_SPEC,
4860            crate::common::RW,
4861        >::from_register(self, 0)
4862    }
4863}
4864impl ::core::default::Default for Adcmpbsr {
4865    #[inline(always)]
4866    fn default() -> Adcmpbsr {
4867        <crate::RegValueT<Adcmpbsr_SPEC> as RegisterValue<_>>::new(0)
4868    }
4869}
4870pub mod adcmpbsr {
4871
4872    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4873    pub struct Cmpstb_SPEC;
4874    pub type Cmpstb = crate::EnumBitfieldStruct<u8, Cmpstb_SPEC>;
4875    impl Cmpstb {
4876        #[doc = "Comparison conditions are not met."]
4877        pub const _0: Self = Self::new(0);
4878
4879        #[doc = "Comparison conditions are met."]
4880        pub const _1: Self = Self::new(1);
4881    }
4882}
4883#[doc(hidden)]
4884#[derive(Copy, Clone, Eq, PartialEq)]
4885pub struct Adbuf_SPEC;
4886impl crate::sealed::RegSpec for Adbuf_SPEC {
4887    type DataType = u16;
4888}
4889
4890#[doc = "A/D Data Buffer Registers %s"]
4891pub type Adbuf = crate::RegValueT<Adbuf_SPEC>;
4892
4893impl NoBitfieldReg<Adbuf_SPEC> for Adbuf {}
4894impl ::core::default::Default for Adbuf {
4895    #[inline(always)]
4896    fn default() -> Adbuf {
4897        <crate::RegValueT<Adbuf_SPEC> as RegisterValue<_>>::new(0)
4898    }
4899}
4900
4901#[doc(hidden)]
4902#[derive(Copy, Clone, Eq, PartialEq)]
4903pub struct Adbufen_SPEC;
4904impl crate::sealed::RegSpec for Adbufen_SPEC {
4905    type DataType = u8;
4906}
4907
4908#[doc = "A/D Data Buffer Enable Register"]
4909pub type Adbufen = crate::RegValueT<Adbufen_SPEC>;
4910
4911impl Adbufen {
4912    #[doc = "Data Buffer Enable"]
4913    #[inline(always)]
4914    pub fn bufen(
4915        self,
4916    ) -> crate::common::RegisterField<
4917        0,
4918        0x1,
4919        1,
4920        0,
4921        adbufen::Bufen,
4922        adbufen::Bufen,
4923        Adbufen_SPEC,
4924        crate::common::RW,
4925    > {
4926        crate::common::RegisterField::<
4927            0,
4928            0x1,
4929            1,
4930            0,
4931            adbufen::Bufen,
4932            adbufen::Bufen,
4933            Adbufen_SPEC,
4934            crate::common::RW,
4935        >::from_register(self, 0)
4936    }
4937}
4938impl ::core::default::Default for Adbufen {
4939    #[inline(always)]
4940    fn default() -> Adbufen {
4941        <crate::RegValueT<Adbufen_SPEC> as RegisterValue<_>>::new(0)
4942    }
4943}
4944pub mod adbufen {
4945
4946    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
4947    pub struct Bufen_SPEC;
4948    pub type Bufen = crate::EnumBitfieldStruct<u8, Bufen_SPEC>;
4949    impl Bufen {
4950        #[doc = "The data buffer is not used."]
4951        pub const _0: Self = Self::new(0);
4952
4953        #[doc = "The data buffer is used."]
4954        pub const _1: Self = Self::new(1);
4955    }
4956}
4957#[doc(hidden)]
4958#[derive(Copy, Clone, Eq, PartialEq)]
4959pub struct Adbufptr_SPEC;
4960impl crate::sealed::RegSpec for Adbufptr_SPEC {
4961    type DataType = u8;
4962}
4963
4964#[doc = "A/D Data Buffer Pointer Register"]
4965pub type Adbufptr = crate::RegValueT<Adbufptr_SPEC>;
4966
4967impl Adbufptr {
4968    #[doc = "Data Buffer Pointer"]
4969    #[inline(always)]
4970    pub fn bufptr(
4971        self,
4972    ) -> crate::common::RegisterField<0, 0xf, 1, 0, u8, u8, Adbufptr_SPEC, crate::common::RW> {
4973        crate::common::RegisterField::<0,0xf,1,0,u8,u8,Adbufptr_SPEC,crate::common::RW>::from_register(self,0)
4974    }
4975
4976    #[doc = "Pointer Overflow Flag"]
4977    #[inline(always)]
4978    pub fn ptrovf(
4979        self,
4980    ) -> crate::common::RegisterField<
4981        4,
4982        0x1,
4983        1,
4984        0,
4985        adbufptr::Ptrovf,
4986        adbufptr::Ptrovf,
4987        Adbufptr_SPEC,
4988        crate::common::RW,
4989    > {
4990        crate::common::RegisterField::<
4991            4,
4992            0x1,
4993            1,
4994            0,
4995            adbufptr::Ptrovf,
4996            adbufptr::Ptrovf,
4997            Adbufptr_SPEC,
4998            crate::common::RW,
4999        >::from_register(self, 0)
5000    }
5001}
5002impl ::core::default::Default for Adbufptr {
5003    #[inline(always)]
5004    fn default() -> Adbufptr {
5005        <crate::RegValueT<Adbufptr_SPEC> as RegisterValue<_>>::new(0)
5006    }
5007}
5008pub mod adbufptr {
5009
5010    #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
5011    pub struct Ptrovf_SPEC;
5012    pub type Ptrovf = crate::EnumBitfieldStruct<u8, Ptrovf_SPEC>;
5013    impl Ptrovf {
5014        #[doc = "The data buffer pointer has not overflowed."]
5015        pub const _0: Self = Self::new(0);
5016
5017        #[doc = "The data buffer pointer has overflowed."]
5018        pub const _1: Self = Self::new(1);
5019    }
5020}
5021#[doc(hidden)]
5022#[derive(Copy, Clone, Eq, PartialEq)]
5023pub struct Adsstrl_SPEC;
5024impl crate::sealed::RegSpec for Adsstrl_SPEC {
5025    type DataType = u8;
5026}
5027
5028#[doc = "A/D Sampling State Register"]
5029pub type Adsstrl = crate::RegValueT<Adsstrl_SPEC>;
5030
5031impl Adsstrl {
5032    #[doc = "Sampling Time Setting"]
5033    #[inline(always)]
5034    pub fn sst(
5035        self,
5036    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Adsstrl_SPEC, crate::common::RW> {
5037        crate::common::RegisterField::<0,0xff,1,0,u8,u8,Adsstrl_SPEC,crate::common::RW>::from_register(self,0)
5038    }
5039}
5040impl ::core::default::Default for Adsstrl {
5041    #[inline(always)]
5042    fn default() -> Adsstrl {
5043        <crate::RegValueT<Adsstrl_SPEC> as RegisterValue<_>>::new(11)
5044    }
5045}
5046
5047#[doc(hidden)]
5048#[derive(Copy, Clone, Eq, PartialEq)]
5049pub struct Adsstro_SPEC;
5050impl crate::sealed::RegSpec for Adsstro_SPEC {
5051    type DataType = u8;
5052}
5053
5054#[doc = "A/D Sampling State Register"]
5055pub type Adsstro = crate::RegValueT<Adsstro_SPEC>;
5056
5057impl Adsstro {
5058    #[doc = "Sampling Time Setting"]
5059    #[inline(always)]
5060    pub fn sst(
5061        self,
5062    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Adsstro_SPEC, crate::common::RW> {
5063        crate::common::RegisterField::<0,0xff,1,0,u8,u8,Adsstro_SPEC,crate::common::RW>::from_register(self,0)
5064    }
5065}
5066impl ::core::default::Default for Adsstro {
5067    #[inline(always)]
5068    fn default() -> Adsstro {
5069        <crate::RegValueT<Adsstro_SPEC> as RegisterValue<_>>::new(11)
5070    }
5071}
5072
5073#[doc(hidden)]
5074#[derive(Copy, Clone, Eq, PartialEq)]
5075pub struct Adsstr_SPEC;
5076impl crate::sealed::RegSpec for Adsstr_SPEC {
5077    type DataType = u8;
5078}
5079
5080#[doc = "A/D Sampling State Register"]
5081pub type Adsstr = crate::RegValueT<Adsstr_SPEC>;
5082
5083impl Adsstr {
5084    #[doc = "Sampling Time Setting"]
5085    #[inline(always)]
5086    pub fn sst(
5087        self,
5088    ) -> crate::common::RegisterField<0, 0xff, 1, 0, u8, u8, Adsstr_SPEC, crate::common::RW> {
5089        crate::common::RegisterField::<0,0xff,1,0,u8,u8,Adsstr_SPEC,crate::common::RW>::from_register(self,0)
5090    }
5091}
5092impl ::core::default::Default for Adsstr {
5093    #[inline(always)]
5094    fn default() -> Adsstr {
5095        <crate::RegValueT<Adsstr_SPEC> as RegisterValue<_>>::new(11)
5096    }
5097}