Skip to main content

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