1#[doc = "Register `PINENABLE0` reader"]
2pub struct R(crate::R<PINENABLE0_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<PINENABLE0_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<PINENABLE0_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<PINENABLE0_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `PINENABLE0` writer"]
17pub struct W(crate::W<PINENABLE0_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<PINENABLE0_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<PINENABLE0_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<PINENABLE0_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "ACMP_I1 function select.\n\nValue on reset: 1"]
38#[derive(Clone, Copy, Debug, PartialEq)]
39pub enum ACMP_I1_A {
40 #[doc = "0: ACMP_I1 enabled on pin PIO0_00."]
41 ENABLED = 0,
42 #[doc = "1: ACMP_I1 disabled."]
43 DISABLED = 1,
44}
45impl From<ACMP_I1_A> for bool {
46 #[inline(always)]
47 fn from(variant: ACMP_I1_A) -> Self {
48 variant as u8 != 0
49 }
50}
51#[doc = "Field `ACMP_I1` reader - ACMP_I1 function select."]
52pub struct ACMP_I1_R(crate::FieldReader<bool, ACMP_I1_A>);
53impl ACMP_I1_R {
54 pub(crate) fn new(bits: bool) -> Self {
55 ACMP_I1_R(crate::FieldReader::new(bits))
56 }
57 #[doc = r"Get enumerated values variant"]
58 #[inline(always)]
59 pub fn variant(&self) -> ACMP_I1_A {
60 match self.bits {
61 false => ACMP_I1_A::ENABLED,
62 true => ACMP_I1_A::DISABLED,
63 }
64 }
65 #[doc = "Checks if the value of the field is `ENABLED`"]
66 #[inline(always)]
67 pub fn is_enabled(&self) -> bool {
68 **self == ACMP_I1_A::ENABLED
69 }
70 #[doc = "Checks if the value of the field is `DISABLED`"]
71 #[inline(always)]
72 pub fn is_disabled(&self) -> bool {
73 **self == ACMP_I1_A::DISABLED
74 }
75}
76impl core::ops::Deref for ACMP_I1_R {
77 type Target = crate::FieldReader<bool, ACMP_I1_A>;
78 #[inline(always)]
79 fn deref(&self) -> &Self::Target {
80 &self.0
81 }
82}
83#[doc = "Field `ACMP_I1` writer - ACMP_I1 function select."]
84pub struct ACMP_I1_W<'a> {
85 w: &'a mut W,
86}
87impl<'a> ACMP_I1_W<'a> {
88 #[doc = r"Writes `variant` to the field"]
89 #[inline(always)]
90 pub fn variant(self, variant: ACMP_I1_A) -> &'a mut W {
91 self.bit(variant.into())
92 }
93 #[doc = "ACMP_I1 enabled on pin PIO0_00."]
94 #[inline(always)]
95 pub fn enabled(self) -> &'a mut W {
96 self.variant(ACMP_I1_A::ENABLED)
97 }
98 #[doc = "ACMP_I1 disabled."]
99 #[inline(always)]
100 pub fn disabled(self) -> &'a mut W {
101 self.variant(ACMP_I1_A::DISABLED)
102 }
103 #[doc = r"Sets the field bit"]
104 #[inline(always)]
105 pub fn set_bit(self) -> &'a mut W {
106 self.bit(true)
107 }
108 #[doc = r"Clears the field bit"]
109 #[inline(always)]
110 pub fn clear_bit(self) -> &'a mut W {
111 self.bit(false)
112 }
113 #[doc = r"Writes raw bits to the field"]
114 #[inline(always)]
115 pub fn bit(self, value: bool) -> &'a mut W {
116 self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
117 self.w
118 }
119}
120#[doc = "ACMP_I2 function select.\n\nValue on reset: 1"]
121#[derive(Clone, Copy, Debug, PartialEq)]
122pub enum ACMP_I2_A {
123 #[doc = "0: ACMP_I2 enabled on pin PIO0_1."]
124 ENABLED = 0,
125 #[doc = "1: ACMP_I2 disabled."]
126 DISABLED = 1,
127}
128impl From<ACMP_I2_A> for bool {
129 #[inline(always)]
130 fn from(variant: ACMP_I2_A) -> Self {
131 variant as u8 != 0
132 }
133}
134#[doc = "Field `ACMP_I2` reader - ACMP_I2 function select."]
135pub struct ACMP_I2_R(crate::FieldReader<bool, ACMP_I2_A>);
136impl ACMP_I2_R {
137 pub(crate) fn new(bits: bool) -> Self {
138 ACMP_I2_R(crate::FieldReader::new(bits))
139 }
140 #[doc = r"Get enumerated values variant"]
141 #[inline(always)]
142 pub fn variant(&self) -> ACMP_I2_A {
143 match self.bits {
144 false => ACMP_I2_A::ENABLED,
145 true => ACMP_I2_A::DISABLED,
146 }
147 }
148 #[doc = "Checks if the value of the field is `ENABLED`"]
149 #[inline(always)]
150 pub fn is_enabled(&self) -> bool {
151 **self == ACMP_I2_A::ENABLED
152 }
153 #[doc = "Checks if the value of the field is `DISABLED`"]
154 #[inline(always)]
155 pub fn is_disabled(&self) -> bool {
156 **self == ACMP_I2_A::DISABLED
157 }
158}
159impl core::ops::Deref for ACMP_I2_R {
160 type Target = crate::FieldReader<bool, ACMP_I2_A>;
161 #[inline(always)]
162 fn deref(&self) -> &Self::Target {
163 &self.0
164 }
165}
166#[doc = "Field `ACMP_I2` writer - ACMP_I2 function select."]
167pub struct ACMP_I2_W<'a> {
168 w: &'a mut W,
169}
170impl<'a> ACMP_I2_W<'a> {
171 #[doc = r"Writes `variant` to the field"]
172 #[inline(always)]
173 pub fn variant(self, variant: ACMP_I2_A) -> &'a mut W {
174 self.bit(variant.into())
175 }
176 #[doc = "ACMP_I2 enabled on pin PIO0_1."]
177 #[inline(always)]
178 pub fn enabled(self) -> &'a mut W {
179 self.variant(ACMP_I2_A::ENABLED)
180 }
181 #[doc = "ACMP_I2 disabled."]
182 #[inline(always)]
183 pub fn disabled(self) -> &'a mut W {
184 self.variant(ACMP_I2_A::DISABLED)
185 }
186 #[doc = r"Sets the field bit"]
187 #[inline(always)]
188 pub fn set_bit(self) -> &'a mut W {
189 self.bit(true)
190 }
191 #[doc = r"Clears the field bit"]
192 #[inline(always)]
193 pub fn clear_bit(self) -> &'a mut W {
194 self.bit(false)
195 }
196 #[doc = r"Writes raw bits to the field"]
197 #[inline(always)]
198 pub fn bit(self, value: bool) -> &'a mut W {
199 self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
200 self.w
201 }
202}
203#[doc = "ACMP_I3 function select.\n\nValue on reset: 1"]
204#[derive(Clone, Copy, Debug, PartialEq)]
205pub enum ACMP_I3_A {
206 #[doc = "0: ACMP_I3 enabled on pin PIO0_14."]
207 ENABLED = 0,
208 #[doc = "1: ACMP_I3 disabled."]
209 DISABLED = 1,
210}
211impl From<ACMP_I3_A> for bool {
212 #[inline(always)]
213 fn from(variant: ACMP_I3_A) -> Self {
214 variant as u8 != 0
215 }
216}
217#[doc = "Field `ACMP_I3` reader - ACMP_I3 function select."]
218pub struct ACMP_I3_R(crate::FieldReader<bool, ACMP_I3_A>);
219impl ACMP_I3_R {
220 pub(crate) fn new(bits: bool) -> Self {
221 ACMP_I3_R(crate::FieldReader::new(bits))
222 }
223 #[doc = r"Get enumerated values variant"]
224 #[inline(always)]
225 pub fn variant(&self) -> ACMP_I3_A {
226 match self.bits {
227 false => ACMP_I3_A::ENABLED,
228 true => ACMP_I3_A::DISABLED,
229 }
230 }
231 #[doc = "Checks if the value of the field is `ENABLED`"]
232 #[inline(always)]
233 pub fn is_enabled(&self) -> bool {
234 **self == ACMP_I3_A::ENABLED
235 }
236 #[doc = "Checks if the value of the field is `DISABLED`"]
237 #[inline(always)]
238 pub fn is_disabled(&self) -> bool {
239 **self == ACMP_I3_A::DISABLED
240 }
241}
242impl core::ops::Deref for ACMP_I3_R {
243 type Target = crate::FieldReader<bool, ACMP_I3_A>;
244 #[inline(always)]
245 fn deref(&self) -> &Self::Target {
246 &self.0
247 }
248}
249#[doc = "Field `ACMP_I3` writer - ACMP_I3 function select."]
250pub struct ACMP_I3_W<'a> {
251 w: &'a mut W,
252}
253impl<'a> ACMP_I3_W<'a> {
254 #[doc = r"Writes `variant` to the field"]
255 #[inline(always)]
256 pub fn variant(self, variant: ACMP_I3_A) -> &'a mut W {
257 self.bit(variant.into())
258 }
259 #[doc = "ACMP_I3 enabled on pin PIO0_14."]
260 #[inline(always)]
261 pub fn enabled(self) -> &'a mut W {
262 self.variant(ACMP_I3_A::ENABLED)
263 }
264 #[doc = "ACMP_I3 disabled."]
265 #[inline(always)]
266 pub fn disabled(self) -> &'a mut W {
267 self.variant(ACMP_I3_A::DISABLED)
268 }
269 #[doc = r"Sets the field bit"]
270 #[inline(always)]
271 pub fn set_bit(self) -> &'a mut W {
272 self.bit(true)
273 }
274 #[doc = r"Clears the field bit"]
275 #[inline(always)]
276 pub fn clear_bit(self) -> &'a mut W {
277 self.bit(false)
278 }
279 #[doc = r"Writes raw bits to the field"]
280 #[inline(always)]
281 pub fn bit(self, value: bool) -> &'a mut W {
282 self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
283 self.w
284 }
285}
286#[doc = "ACMP_I4 function select.\n\nValue on reset: 1"]
287#[derive(Clone, Copy, Debug, PartialEq)]
288pub enum ACMP_I4_A {
289 #[doc = "0: ACMP_I4 enabled on pin PIO0_23."]
290 ENABLED = 0,
291 #[doc = "1: ACMP_I4 disabled."]
292 DISABLED = 1,
293}
294impl From<ACMP_I4_A> for bool {
295 #[inline(always)]
296 fn from(variant: ACMP_I4_A) -> Self {
297 variant as u8 != 0
298 }
299}
300#[doc = "Field `ACMP_I4` reader - ACMP_I4 function select."]
301pub struct ACMP_I4_R(crate::FieldReader<bool, ACMP_I4_A>);
302impl ACMP_I4_R {
303 pub(crate) fn new(bits: bool) -> Self {
304 ACMP_I4_R(crate::FieldReader::new(bits))
305 }
306 #[doc = r"Get enumerated values variant"]
307 #[inline(always)]
308 pub fn variant(&self) -> ACMP_I4_A {
309 match self.bits {
310 false => ACMP_I4_A::ENABLED,
311 true => ACMP_I4_A::DISABLED,
312 }
313 }
314 #[doc = "Checks if the value of the field is `ENABLED`"]
315 #[inline(always)]
316 pub fn is_enabled(&self) -> bool {
317 **self == ACMP_I4_A::ENABLED
318 }
319 #[doc = "Checks if the value of the field is `DISABLED`"]
320 #[inline(always)]
321 pub fn is_disabled(&self) -> bool {
322 **self == ACMP_I4_A::DISABLED
323 }
324}
325impl core::ops::Deref for ACMP_I4_R {
326 type Target = crate::FieldReader<bool, ACMP_I4_A>;
327 #[inline(always)]
328 fn deref(&self) -> &Self::Target {
329 &self.0
330 }
331}
332#[doc = "Field `ACMP_I4` writer - ACMP_I4 function select."]
333pub struct ACMP_I4_W<'a> {
334 w: &'a mut W,
335}
336impl<'a> ACMP_I4_W<'a> {
337 #[doc = r"Writes `variant` to the field"]
338 #[inline(always)]
339 pub fn variant(self, variant: ACMP_I4_A) -> &'a mut W {
340 self.bit(variant.into())
341 }
342 #[doc = "ACMP_I4 enabled on pin PIO0_23."]
343 #[inline(always)]
344 pub fn enabled(self) -> &'a mut W {
345 self.variant(ACMP_I4_A::ENABLED)
346 }
347 #[doc = "ACMP_I4 disabled."]
348 #[inline(always)]
349 pub fn disabled(self) -> &'a mut W {
350 self.variant(ACMP_I4_A::DISABLED)
351 }
352 #[doc = r"Sets the field bit"]
353 #[inline(always)]
354 pub fn set_bit(self) -> &'a mut W {
355 self.bit(true)
356 }
357 #[doc = r"Clears the field bit"]
358 #[inline(always)]
359 pub fn clear_bit(self) -> &'a mut W {
360 self.bit(false)
361 }
362 #[doc = r"Writes raw bits to the field"]
363 #[inline(always)]
364 pub fn bit(self, value: bool) -> &'a mut W {
365 self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
366 self.w
367 }
368}
369#[doc = "SWCLK function select.\n\nValue on reset: 0"]
370#[derive(Clone, Copy, Debug, PartialEq)]
371pub enum SWCLK_A {
372 #[doc = "0: SWCLK enabled on pin PIO0_3."]
373 ENABLED = 0,
374 #[doc = "1: SWCLK disabled."]
375 DISABLED = 1,
376}
377impl From<SWCLK_A> for bool {
378 #[inline(always)]
379 fn from(variant: SWCLK_A) -> Self {
380 variant as u8 != 0
381 }
382}
383#[doc = "Field `SWCLK` reader - SWCLK function select."]
384pub struct SWCLK_R(crate::FieldReader<bool, SWCLK_A>);
385impl SWCLK_R {
386 pub(crate) fn new(bits: bool) -> Self {
387 SWCLK_R(crate::FieldReader::new(bits))
388 }
389 #[doc = r"Get enumerated values variant"]
390 #[inline(always)]
391 pub fn variant(&self) -> SWCLK_A {
392 match self.bits {
393 false => SWCLK_A::ENABLED,
394 true => SWCLK_A::DISABLED,
395 }
396 }
397 #[doc = "Checks if the value of the field is `ENABLED`"]
398 #[inline(always)]
399 pub fn is_enabled(&self) -> bool {
400 **self == SWCLK_A::ENABLED
401 }
402 #[doc = "Checks if the value of the field is `DISABLED`"]
403 #[inline(always)]
404 pub fn is_disabled(&self) -> bool {
405 **self == SWCLK_A::DISABLED
406 }
407}
408impl core::ops::Deref for SWCLK_R {
409 type Target = crate::FieldReader<bool, SWCLK_A>;
410 #[inline(always)]
411 fn deref(&self) -> &Self::Target {
412 &self.0
413 }
414}
415#[doc = "Field `SWCLK` writer - SWCLK function select."]
416pub struct SWCLK_W<'a> {
417 w: &'a mut W,
418}
419impl<'a> SWCLK_W<'a> {
420 #[doc = r"Writes `variant` to the field"]
421 #[inline(always)]
422 pub fn variant(self, variant: SWCLK_A) -> &'a mut W {
423 self.bit(variant.into())
424 }
425 #[doc = "SWCLK enabled on pin PIO0_3."]
426 #[inline(always)]
427 pub fn enabled(self) -> &'a mut W {
428 self.variant(SWCLK_A::ENABLED)
429 }
430 #[doc = "SWCLK disabled."]
431 #[inline(always)]
432 pub fn disabled(self) -> &'a mut W {
433 self.variant(SWCLK_A::DISABLED)
434 }
435 #[doc = r"Sets the field bit"]
436 #[inline(always)]
437 pub fn set_bit(self) -> &'a mut W {
438 self.bit(true)
439 }
440 #[doc = r"Clears the field bit"]
441 #[inline(always)]
442 pub fn clear_bit(self) -> &'a mut W {
443 self.bit(false)
444 }
445 #[doc = r"Writes raw bits to the field"]
446 #[inline(always)]
447 pub fn bit(self, value: bool) -> &'a mut W {
448 self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
449 self.w
450 }
451}
452#[doc = "SWDIO function select.\n\nValue on reset: 0"]
453#[derive(Clone, Copy, Debug, PartialEq)]
454pub enum SWDIO_A {
455 #[doc = "0: SWDIO enabled on pin PIO0_2."]
456 ENABLED = 0,
457 #[doc = "1: SWDIO disabled."]
458 DISABLED = 1,
459}
460impl From<SWDIO_A> for bool {
461 #[inline(always)]
462 fn from(variant: SWDIO_A) -> Self {
463 variant as u8 != 0
464 }
465}
466#[doc = "Field `SWDIO` reader - SWDIO function select."]
467pub struct SWDIO_R(crate::FieldReader<bool, SWDIO_A>);
468impl SWDIO_R {
469 pub(crate) fn new(bits: bool) -> Self {
470 SWDIO_R(crate::FieldReader::new(bits))
471 }
472 #[doc = r"Get enumerated values variant"]
473 #[inline(always)]
474 pub fn variant(&self) -> SWDIO_A {
475 match self.bits {
476 false => SWDIO_A::ENABLED,
477 true => SWDIO_A::DISABLED,
478 }
479 }
480 #[doc = "Checks if the value of the field is `ENABLED`"]
481 #[inline(always)]
482 pub fn is_enabled(&self) -> bool {
483 **self == SWDIO_A::ENABLED
484 }
485 #[doc = "Checks if the value of the field is `DISABLED`"]
486 #[inline(always)]
487 pub fn is_disabled(&self) -> bool {
488 **self == SWDIO_A::DISABLED
489 }
490}
491impl core::ops::Deref for SWDIO_R {
492 type Target = crate::FieldReader<bool, SWDIO_A>;
493 #[inline(always)]
494 fn deref(&self) -> &Self::Target {
495 &self.0
496 }
497}
498#[doc = "Field `SWDIO` writer - SWDIO function select."]
499pub struct SWDIO_W<'a> {
500 w: &'a mut W,
501}
502impl<'a> SWDIO_W<'a> {
503 #[doc = r"Writes `variant` to the field"]
504 #[inline(always)]
505 pub fn variant(self, variant: SWDIO_A) -> &'a mut W {
506 self.bit(variant.into())
507 }
508 #[doc = "SWDIO enabled on pin PIO0_2."]
509 #[inline(always)]
510 pub fn enabled(self) -> &'a mut W {
511 self.variant(SWDIO_A::ENABLED)
512 }
513 #[doc = "SWDIO disabled."]
514 #[inline(always)]
515 pub fn disabled(self) -> &'a mut W {
516 self.variant(SWDIO_A::DISABLED)
517 }
518 #[doc = r"Sets the field bit"]
519 #[inline(always)]
520 pub fn set_bit(self) -> &'a mut W {
521 self.bit(true)
522 }
523 #[doc = r"Clears the field bit"]
524 #[inline(always)]
525 pub fn clear_bit(self) -> &'a mut W {
526 self.bit(false)
527 }
528 #[doc = r"Writes raw bits to the field"]
529 #[inline(always)]
530 pub fn bit(self, value: bool) -> &'a mut W {
531 self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5);
532 self.w
533 }
534}
535#[doc = "XTALIN function select.\n\nValue on reset: 1"]
536#[derive(Clone, Copy, Debug, PartialEq)]
537pub enum XTALIN_A {
538 #[doc = "0: XTALIN enabled on pin PIO0_8."]
539 ENABLED = 0,
540 #[doc = "1: XTALIN disabled."]
541 DISABLED = 1,
542}
543impl From<XTALIN_A> for bool {
544 #[inline(always)]
545 fn from(variant: XTALIN_A) -> Self {
546 variant as u8 != 0
547 }
548}
549#[doc = "Field `XTALIN` reader - XTALIN function select."]
550pub struct XTALIN_R(crate::FieldReader<bool, XTALIN_A>);
551impl XTALIN_R {
552 pub(crate) fn new(bits: bool) -> Self {
553 XTALIN_R(crate::FieldReader::new(bits))
554 }
555 #[doc = r"Get enumerated values variant"]
556 #[inline(always)]
557 pub fn variant(&self) -> XTALIN_A {
558 match self.bits {
559 false => XTALIN_A::ENABLED,
560 true => XTALIN_A::DISABLED,
561 }
562 }
563 #[doc = "Checks if the value of the field is `ENABLED`"]
564 #[inline(always)]
565 pub fn is_enabled(&self) -> bool {
566 **self == XTALIN_A::ENABLED
567 }
568 #[doc = "Checks if the value of the field is `DISABLED`"]
569 #[inline(always)]
570 pub fn is_disabled(&self) -> bool {
571 **self == XTALIN_A::DISABLED
572 }
573}
574impl core::ops::Deref for XTALIN_R {
575 type Target = crate::FieldReader<bool, XTALIN_A>;
576 #[inline(always)]
577 fn deref(&self) -> &Self::Target {
578 &self.0
579 }
580}
581#[doc = "Field `XTALIN` writer - XTALIN function select."]
582pub struct XTALIN_W<'a> {
583 w: &'a mut W,
584}
585impl<'a> XTALIN_W<'a> {
586 #[doc = r"Writes `variant` to the field"]
587 #[inline(always)]
588 pub fn variant(self, variant: XTALIN_A) -> &'a mut W {
589 self.bit(variant.into())
590 }
591 #[doc = "XTALIN enabled on pin PIO0_8."]
592 #[inline(always)]
593 pub fn enabled(self) -> &'a mut W {
594 self.variant(XTALIN_A::ENABLED)
595 }
596 #[doc = "XTALIN disabled."]
597 #[inline(always)]
598 pub fn disabled(self) -> &'a mut W {
599 self.variant(XTALIN_A::DISABLED)
600 }
601 #[doc = r"Sets the field bit"]
602 #[inline(always)]
603 pub fn set_bit(self) -> &'a mut W {
604 self.bit(true)
605 }
606 #[doc = r"Clears the field bit"]
607 #[inline(always)]
608 pub fn clear_bit(self) -> &'a mut W {
609 self.bit(false)
610 }
611 #[doc = r"Writes raw bits to the field"]
612 #[inline(always)]
613 pub fn bit(self, value: bool) -> &'a mut W {
614 self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6);
615 self.w
616 }
617}
618#[doc = "XTALOUT function select.\n\nValue on reset: 1"]
619#[derive(Clone, Copy, Debug, PartialEq)]
620pub enum XTALOUT_A {
621 #[doc = "0: XTALOUT enabled on pin PIO0_9."]
622 ENABLED = 0,
623 #[doc = "1: XTALOUT disabled."]
624 DISABLED = 1,
625}
626impl From<XTALOUT_A> for bool {
627 #[inline(always)]
628 fn from(variant: XTALOUT_A) -> Self {
629 variant as u8 != 0
630 }
631}
632#[doc = "Field `XTALOUT` reader - XTALOUT function select."]
633pub struct XTALOUT_R(crate::FieldReader<bool, XTALOUT_A>);
634impl XTALOUT_R {
635 pub(crate) fn new(bits: bool) -> Self {
636 XTALOUT_R(crate::FieldReader::new(bits))
637 }
638 #[doc = r"Get enumerated values variant"]
639 #[inline(always)]
640 pub fn variant(&self) -> XTALOUT_A {
641 match self.bits {
642 false => XTALOUT_A::ENABLED,
643 true => XTALOUT_A::DISABLED,
644 }
645 }
646 #[doc = "Checks if the value of the field is `ENABLED`"]
647 #[inline(always)]
648 pub fn is_enabled(&self) -> bool {
649 **self == XTALOUT_A::ENABLED
650 }
651 #[doc = "Checks if the value of the field is `DISABLED`"]
652 #[inline(always)]
653 pub fn is_disabled(&self) -> bool {
654 **self == XTALOUT_A::DISABLED
655 }
656}
657impl core::ops::Deref for XTALOUT_R {
658 type Target = crate::FieldReader<bool, XTALOUT_A>;
659 #[inline(always)]
660 fn deref(&self) -> &Self::Target {
661 &self.0
662 }
663}
664#[doc = "Field `XTALOUT` writer - XTALOUT function select."]
665pub struct XTALOUT_W<'a> {
666 w: &'a mut W,
667}
668impl<'a> XTALOUT_W<'a> {
669 #[doc = r"Writes `variant` to the field"]
670 #[inline(always)]
671 pub fn variant(self, variant: XTALOUT_A) -> &'a mut W {
672 self.bit(variant.into())
673 }
674 #[doc = "XTALOUT enabled on pin PIO0_9."]
675 #[inline(always)]
676 pub fn enabled(self) -> &'a mut W {
677 self.variant(XTALOUT_A::ENABLED)
678 }
679 #[doc = "XTALOUT disabled."]
680 #[inline(always)]
681 pub fn disabled(self) -> &'a mut W {
682 self.variant(XTALOUT_A::DISABLED)
683 }
684 #[doc = r"Sets the field bit"]
685 #[inline(always)]
686 pub fn set_bit(self) -> &'a mut W {
687 self.bit(true)
688 }
689 #[doc = r"Clears the field bit"]
690 #[inline(always)]
691 pub fn clear_bit(self) -> &'a mut W {
692 self.bit(false)
693 }
694 #[doc = r"Writes raw bits to the field"]
695 #[inline(always)]
696 pub fn bit(self, value: bool) -> &'a mut W {
697 self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7);
698 self.w
699 }
700}
701#[doc = "RESETN function select.\n\nValue on reset: 0"]
702#[derive(Clone, Copy, Debug, PartialEq)]
703pub enum RESETN_A {
704 #[doc = "0: RESETN enabled on pin PIO0_5."]
705 ENABLED = 0,
706 #[doc = "1: RESETN disabled."]
707 DISABLED = 1,
708}
709impl From<RESETN_A> for bool {
710 #[inline(always)]
711 fn from(variant: RESETN_A) -> Self {
712 variant as u8 != 0
713 }
714}
715#[doc = "Field `RESETN` reader - RESETN function select."]
716pub struct RESETN_R(crate::FieldReader<bool, RESETN_A>);
717impl RESETN_R {
718 pub(crate) fn new(bits: bool) -> Self {
719 RESETN_R(crate::FieldReader::new(bits))
720 }
721 #[doc = r"Get enumerated values variant"]
722 #[inline(always)]
723 pub fn variant(&self) -> RESETN_A {
724 match self.bits {
725 false => RESETN_A::ENABLED,
726 true => RESETN_A::DISABLED,
727 }
728 }
729 #[doc = "Checks if the value of the field is `ENABLED`"]
730 #[inline(always)]
731 pub fn is_enabled(&self) -> bool {
732 **self == RESETN_A::ENABLED
733 }
734 #[doc = "Checks if the value of the field is `DISABLED`"]
735 #[inline(always)]
736 pub fn is_disabled(&self) -> bool {
737 **self == RESETN_A::DISABLED
738 }
739}
740impl core::ops::Deref for RESETN_R {
741 type Target = crate::FieldReader<bool, RESETN_A>;
742 #[inline(always)]
743 fn deref(&self) -> &Self::Target {
744 &self.0
745 }
746}
747#[doc = "Field `RESETN` writer - RESETN function select."]
748pub struct RESETN_W<'a> {
749 w: &'a mut W,
750}
751impl<'a> RESETN_W<'a> {
752 #[doc = r"Writes `variant` to the field"]
753 #[inline(always)]
754 pub fn variant(self, variant: RESETN_A) -> &'a mut W {
755 self.bit(variant.into())
756 }
757 #[doc = "RESETN enabled on pin PIO0_5."]
758 #[inline(always)]
759 pub fn enabled(self) -> &'a mut W {
760 self.variant(RESETN_A::ENABLED)
761 }
762 #[doc = "RESETN disabled."]
763 #[inline(always)]
764 pub fn disabled(self) -> &'a mut W {
765 self.variant(RESETN_A::DISABLED)
766 }
767 #[doc = r"Sets the field bit"]
768 #[inline(always)]
769 pub fn set_bit(self) -> &'a mut W {
770 self.bit(true)
771 }
772 #[doc = r"Clears the field bit"]
773 #[inline(always)]
774 pub fn clear_bit(self) -> &'a mut W {
775 self.bit(false)
776 }
777 #[doc = r"Writes raw bits to the field"]
778 #[inline(always)]
779 pub fn bit(self, value: bool) -> &'a mut W {
780 self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8);
781 self.w
782 }
783}
784#[doc = "CLKIN function select.\n\nValue on reset: 1"]
785#[derive(Clone, Copy, Debug, PartialEq)]
786pub enum CLKIN_A {
787 #[doc = "0: CLKIN enabled on pin PIO0_1."]
788 ENABLED = 0,
789 #[doc = "1: CLKIN disabled."]
790 DISABLED = 1,
791}
792impl From<CLKIN_A> for bool {
793 #[inline(always)]
794 fn from(variant: CLKIN_A) -> Self {
795 variant as u8 != 0
796 }
797}
798#[doc = "Field `CLKIN` reader - CLKIN function select."]
799pub struct CLKIN_R(crate::FieldReader<bool, CLKIN_A>);
800impl CLKIN_R {
801 pub(crate) fn new(bits: bool) -> Self {
802 CLKIN_R(crate::FieldReader::new(bits))
803 }
804 #[doc = r"Get enumerated values variant"]
805 #[inline(always)]
806 pub fn variant(&self) -> CLKIN_A {
807 match self.bits {
808 false => CLKIN_A::ENABLED,
809 true => CLKIN_A::DISABLED,
810 }
811 }
812 #[doc = "Checks if the value of the field is `ENABLED`"]
813 #[inline(always)]
814 pub fn is_enabled(&self) -> bool {
815 **self == CLKIN_A::ENABLED
816 }
817 #[doc = "Checks if the value of the field is `DISABLED`"]
818 #[inline(always)]
819 pub fn is_disabled(&self) -> bool {
820 **self == CLKIN_A::DISABLED
821 }
822}
823impl core::ops::Deref for CLKIN_R {
824 type Target = crate::FieldReader<bool, CLKIN_A>;
825 #[inline(always)]
826 fn deref(&self) -> &Self::Target {
827 &self.0
828 }
829}
830#[doc = "Field `CLKIN` writer - CLKIN function select."]
831pub struct CLKIN_W<'a> {
832 w: &'a mut W,
833}
834impl<'a> CLKIN_W<'a> {
835 #[doc = r"Writes `variant` to the field"]
836 #[inline(always)]
837 pub fn variant(self, variant: CLKIN_A) -> &'a mut W {
838 self.bit(variant.into())
839 }
840 #[doc = "CLKIN enabled on pin PIO0_1."]
841 #[inline(always)]
842 pub fn enabled(self) -> &'a mut W {
843 self.variant(CLKIN_A::ENABLED)
844 }
845 #[doc = "CLKIN disabled."]
846 #[inline(always)]
847 pub fn disabled(self) -> &'a mut W {
848 self.variant(CLKIN_A::DISABLED)
849 }
850 #[doc = r"Sets the field bit"]
851 #[inline(always)]
852 pub fn set_bit(self) -> &'a mut W {
853 self.bit(true)
854 }
855 #[doc = r"Clears the field bit"]
856 #[inline(always)]
857 pub fn clear_bit(self) -> &'a mut W {
858 self.bit(false)
859 }
860 #[doc = r"Writes raw bits to the field"]
861 #[inline(always)]
862 pub fn bit(self, value: bool) -> &'a mut W {
863 self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9);
864 self.w
865 }
866}
867#[doc = "VDDCMP function select.\n\nValue on reset: 1"]
868#[derive(Clone, Copy, Debug, PartialEq)]
869pub enum VDDCMP_A {
870 #[doc = "0: VDDCMP enabled on pin PIO0_6."]
871 ENABLED = 0,
872 #[doc = "1: VDDCMP disabled."]
873 DISABLED = 1,
874}
875impl From<VDDCMP_A> for bool {
876 #[inline(always)]
877 fn from(variant: VDDCMP_A) -> Self {
878 variant as u8 != 0
879 }
880}
881#[doc = "Field `VDDCMP` reader - VDDCMP function select."]
882pub struct VDDCMP_R(crate::FieldReader<bool, VDDCMP_A>);
883impl VDDCMP_R {
884 pub(crate) fn new(bits: bool) -> Self {
885 VDDCMP_R(crate::FieldReader::new(bits))
886 }
887 #[doc = r"Get enumerated values variant"]
888 #[inline(always)]
889 pub fn variant(&self) -> VDDCMP_A {
890 match self.bits {
891 false => VDDCMP_A::ENABLED,
892 true => VDDCMP_A::DISABLED,
893 }
894 }
895 #[doc = "Checks if the value of the field is `ENABLED`"]
896 #[inline(always)]
897 pub fn is_enabled(&self) -> bool {
898 **self == VDDCMP_A::ENABLED
899 }
900 #[doc = "Checks if the value of the field is `DISABLED`"]
901 #[inline(always)]
902 pub fn is_disabled(&self) -> bool {
903 **self == VDDCMP_A::DISABLED
904 }
905}
906impl core::ops::Deref for VDDCMP_R {
907 type Target = crate::FieldReader<bool, VDDCMP_A>;
908 #[inline(always)]
909 fn deref(&self) -> &Self::Target {
910 &self.0
911 }
912}
913#[doc = "Field `VDDCMP` writer - VDDCMP function select."]
914pub struct VDDCMP_W<'a> {
915 w: &'a mut W,
916}
917impl<'a> VDDCMP_W<'a> {
918 #[doc = r"Writes `variant` to the field"]
919 #[inline(always)]
920 pub fn variant(self, variant: VDDCMP_A) -> &'a mut W {
921 self.bit(variant.into())
922 }
923 #[doc = "VDDCMP enabled on pin PIO0_6."]
924 #[inline(always)]
925 pub fn enabled(self) -> &'a mut W {
926 self.variant(VDDCMP_A::ENABLED)
927 }
928 #[doc = "VDDCMP disabled."]
929 #[inline(always)]
930 pub fn disabled(self) -> &'a mut W {
931 self.variant(VDDCMP_A::DISABLED)
932 }
933 #[doc = r"Sets the field bit"]
934 #[inline(always)]
935 pub fn set_bit(self) -> &'a mut W {
936 self.bit(true)
937 }
938 #[doc = r"Clears the field bit"]
939 #[inline(always)]
940 pub fn clear_bit(self) -> &'a mut W {
941 self.bit(false)
942 }
943 #[doc = r"Writes raw bits to the field"]
944 #[inline(always)]
945 pub fn bit(self, value: bool) -> &'a mut W {
946 self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10);
947 self.w
948 }
949}
950#[doc = "I2C0_SDA function select.\n\nValue on reset: 1"]
951#[derive(Clone, Copy, Debug, PartialEq)]
952pub enum I2C0_SDA_A {
953 #[doc = "0: I2C0_SDA enabled on pin PIO0_11."]
954 ENABLED = 0,
955 #[doc = "1: I2C0_SDA disabled."]
956 DISABLED = 1,
957}
958impl From<I2C0_SDA_A> for bool {
959 #[inline(always)]
960 fn from(variant: I2C0_SDA_A) -> Self {
961 variant as u8 != 0
962 }
963}
964#[doc = "Field `I2C0_SDA` reader - I2C0_SDA function select."]
965pub struct I2C0_SDA_R(crate::FieldReader<bool, I2C0_SDA_A>);
966impl I2C0_SDA_R {
967 pub(crate) fn new(bits: bool) -> Self {
968 I2C0_SDA_R(crate::FieldReader::new(bits))
969 }
970 #[doc = r"Get enumerated values variant"]
971 #[inline(always)]
972 pub fn variant(&self) -> I2C0_SDA_A {
973 match self.bits {
974 false => I2C0_SDA_A::ENABLED,
975 true => I2C0_SDA_A::DISABLED,
976 }
977 }
978 #[doc = "Checks if the value of the field is `ENABLED`"]
979 #[inline(always)]
980 pub fn is_enabled(&self) -> bool {
981 **self == I2C0_SDA_A::ENABLED
982 }
983 #[doc = "Checks if the value of the field is `DISABLED`"]
984 #[inline(always)]
985 pub fn is_disabled(&self) -> bool {
986 **self == I2C0_SDA_A::DISABLED
987 }
988}
989impl core::ops::Deref for I2C0_SDA_R {
990 type Target = crate::FieldReader<bool, I2C0_SDA_A>;
991 #[inline(always)]
992 fn deref(&self) -> &Self::Target {
993 &self.0
994 }
995}
996#[doc = "Field `I2C0_SDA` writer - I2C0_SDA function select."]
997pub struct I2C0_SDA_W<'a> {
998 w: &'a mut W,
999}
1000impl<'a> I2C0_SDA_W<'a> {
1001 #[doc = r"Writes `variant` to the field"]
1002 #[inline(always)]
1003 pub fn variant(self, variant: I2C0_SDA_A) -> &'a mut W {
1004 self.bit(variant.into())
1005 }
1006 #[doc = "I2C0_SDA enabled on pin PIO0_11."]
1007 #[inline(always)]
1008 pub fn enabled(self) -> &'a mut W {
1009 self.variant(I2C0_SDA_A::ENABLED)
1010 }
1011 #[doc = "I2C0_SDA disabled."]
1012 #[inline(always)]
1013 pub fn disabled(self) -> &'a mut W {
1014 self.variant(I2C0_SDA_A::DISABLED)
1015 }
1016 #[doc = r"Sets the field bit"]
1017 #[inline(always)]
1018 pub fn set_bit(self) -> &'a mut W {
1019 self.bit(true)
1020 }
1021 #[doc = r"Clears the field bit"]
1022 #[inline(always)]
1023 pub fn clear_bit(self) -> &'a mut W {
1024 self.bit(false)
1025 }
1026 #[doc = r"Writes raw bits to the field"]
1027 #[inline(always)]
1028 pub fn bit(self, value: bool) -> &'a mut W {
1029 self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11);
1030 self.w
1031 }
1032}
1033#[doc = "I2C0_SCL function select.\n\nValue on reset: 1"]
1034#[derive(Clone, Copy, Debug, PartialEq)]
1035pub enum I2C0_SCL_A {
1036 #[doc = "0: I2C0_SCL enabled on pin PIO0_10."]
1037 ENABLED = 0,
1038 #[doc = "1: I2C0_SCL disabled."]
1039 DISABLED = 1,
1040}
1041impl From<I2C0_SCL_A> for bool {
1042 #[inline(always)]
1043 fn from(variant: I2C0_SCL_A) -> Self {
1044 variant as u8 != 0
1045 }
1046}
1047#[doc = "Field `I2C0_SCL` reader - I2C0_SCL function select."]
1048pub struct I2C0_SCL_R(crate::FieldReader<bool, I2C0_SCL_A>);
1049impl I2C0_SCL_R {
1050 pub(crate) fn new(bits: bool) -> Self {
1051 I2C0_SCL_R(crate::FieldReader::new(bits))
1052 }
1053 #[doc = r"Get enumerated values variant"]
1054 #[inline(always)]
1055 pub fn variant(&self) -> I2C0_SCL_A {
1056 match self.bits {
1057 false => I2C0_SCL_A::ENABLED,
1058 true => I2C0_SCL_A::DISABLED,
1059 }
1060 }
1061 #[doc = "Checks if the value of the field is `ENABLED`"]
1062 #[inline(always)]
1063 pub fn is_enabled(&self) -> bool {
1064 **self == I2C0_SCL_A::ENABLED
1065 }
1066 #[doc = "Checks if the value of the field is `DISABLED`"]
1067 #[inline(always)]
1068 pub fn is_disabled(&self) -> bool {
1069 **self == I2C0_SCL_A::DISABLED
1070 }
1071}
1072impl core::ops::Deref for I2C0_SCL_R {
1073 type Target = crate::FieldReader<bool, I2C0_SCL_A>;
1074 #[inline(always)]
1075 fn deref(&self) -> &Self::Target {
1076 &self.0
1077 }
1078}
1079#[doc = "Field `I2C0_SCL` writer - I2C0_SCL function select."]
1080pub struct I2C0_SCL_W<'a> {
1081 w: &'a mut W,
1082}
1083impl<'a> I2C0_SCL_W<'a> {
1084 #[doc = r"Writes `variant` to the field"]
1085 #[inline(always)]
1086 pub fn variant(self, variant: I2C0_SCL_A) -> &'a mut W {
1087 self.bit(variant.into())
1088 }
1089 #[doc = "I2C0_SCL enabled on pin PIO0_10."]
1090 #[inline(always)]
1091 pub fn enabled(self) -> &'a mut W {
1092 self.variant(I2C0_SCL_A::ENABLED)
1093 }
1094 #[doc = "I2C0_SCL disabled."]
1095 #[inline(always)]
1096 pub fn disabled(self) -> &'a mut W {
1097 self.variant(I2C0_SCL_A::DISABLED)
1098 }
1099 #[doc = r"Sets the field bit"]
1100 #[inline(always)]
1101 pub fn set_bit(self) -> &'a mut W {
1102 self.bit(true)
1103 }
1104 #[doc = r"Clears the field bit"]
1105 #[inline(always)]
1106 pub fn clear_bit(self) -> &'a mut W {
1107 self.bit(false)
1108 }
1109 #[doc = r"Writes raw bits to the field"]
1110 #[inline(always)]
1111 pub fn bit(self, value: bool) -> &'a mut W {
1112 self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12);
1113 self.w
1114 }
1115}
1116#[doc = "ADC_0 function select.\n\nValue on reset: 1"]
1117#[derive(Clone, Copy, Debug, PartialEq)]
1118pub enum ADC_0_A {
1119 #[doc = "0: ADC_0 enabled on pin PIO0_7."]
1120 ENABLED = 0,
1121 #[doc = "1: ADC_0 disabled."]
1122 DISABLED = 1,
1123}
1124impl From<ADC_0_A> for bool {
1125 #[inline(always)]
1126 fn from(variant: ADC_0_A) -> Self {
1127 variant as u8 != 0
1128 }
1129}
1130#[doc = "Field `ADC_0` reader - ADC_0 function select."]
1131pub struct ADC_0_R(crate::FieldReader<bool, ADC_0_A>);
1132impl ADC_0_R {
1133 pub(crate) fn new(bits: bool) -> Self {
1134 ADC_0_R(crate::FieldReader::new(bits))
1135 }
1136 #[doc = r"Get enumerated values variant"]
1137 #[inline(always)]
1138 pub fn variant(&self) -> ADC_0_A {
1139 match self.bits {
1140 false => ADC_0_A::ENABLED,
1141 true => ADC_0_A::DISABLED,
1142 }
1143 }
1144 #[doc = "Checks if the value of the field is `ENABLED`"]
1145 #[inline(always)]
1146 pub fn is_enabled(&self) -> bool {
1147 **self == ADC_0_A::ENABLED
1148 }
1149 #[doc = "Checks if the value of the field is `DISABLED`"]
1150 #[inline(always)]
1151 pub fn is_disabled(&self) -> bool {
1152 **self == ADC_0_A::DISABLED
1153 }
1154}
1155impl core::ops::Deref for ADC_0_R {
1156 type Target = crate::FieldReader<bool, ADC_0_A>;
1157 #[inline(always)]
1158 fn deref(&self) -> &Self::Target {
1159 &self.0
1160 }
1161}
1162#[doc = "Field `ADC_0` writer - ADC_0 function select."]
1163pub struct ADC_0_W<'a> {
1164 w: &'a mut W,
1165}
1166impl<'a> ADC_0_W<'a> {
1167 #[doc = r"Writes `variant` to the field"]
1168 #[inline(always)]
1169 pub fn variant(self, variant: ADC_0_A) -> &'a mut W {
1170 self.bit(variant.into())
1171 }
1172 #[doc = "ADC_0 enabled on pin PIO0_7."]
1173 #[inline(always)]
1174 pub fn enabled(self) -> &'a mut W {
1175 self.variant(ADC_0_A::ENABLED)
1176 }
1177 #[doc = "ADC_0 disabled."]
1178 #[inline(always)]
1179 pub fn disabled(self) -> &'a mut W {
1180 self.variant(ADC_0_A::DISABLED)
1181 }
1182 #[doc = r"Sets the field bit"]
1183 #[inline(always)]
1184 pub fn set_bit(self) -> &'a mut W {
1185 self.bit(true)
1186 }
1187 #[doc = r"Clears the field bit"]
1188 #[inline(always)]
1189 pub fn clear_bit(self) -> &'a mut W {
1190 self.bit(false)
1191 }
1192 #[doc = r"Writes raw bits to the field"]
1193 #[inline(always)]
1194 pub fn bit(self, value: bool) -> &'a mut W {
1195 self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13);
1196 self.w
1197 }
1198}
1199#[doc = "ADC_1 function select.\n\nValue on reset: 1"]
1200#[derive(Clone, Copy, Debug, PartialEq)]
1201pub enum ADC_1_A {
1202 #[doc = "0: ADC_1 enabled on pin PIO0_6."]
1203 ENABLED = 0,
1204 #[doc = "1: ADC_1 disabled."]
1205 DISABLED = 1,
1206}
1207impl From<ADC_1_A> for bool {
1208 #[inline(always)]
1209 fn from(variant: ADC_1_A) -> Self {
1210 variant as u8 != 0
1211 }
1212}
1213#[doc = "Field `ADC_1` reader - ADC_1 function select."]
1214pub struct ADC_1_R(crate::FieldReader<bool, ADC_1_A>);
1215impl ADC_1_R {
1216 pub(crate) fn new(bits: bool) -> Self {
1217 ADC_1_R(crate::FieldReader::new(bits))
1218 }
1219 #[doc = r"Get enumerated values variant"]
1220 #[inline(always)]
1221 pub fn variant(&self) -> ADC_1_A {
1222 match self.bits {
1223 false => ADC_1_A::ENABLED,
1224 true => ADC_1_A::DISABLED,
1225 }
1226 }
1227 #[doc = "Checks if the value of the field is `ENABLED`"]
1228 #[inline(always)]
1229 pub fn is_enabled(&self) -> bool {
1230 **self == ADC_1_A::ENABLED
1231 }
1232 #[doc = "Checks if the value of the field is `DISABLED`"]
1233 #[inline(always)]
1234 pub fn is_disabled(&self) -> bool {
1235 **self == ADC_1_A::DISABLED
1236 }
1237}
1238impl core::ops::Deref for ADC_1_R {
1239 type Target = crate::FieldReader<bool, ADC_1_A>;
1240 #[inline(always)]
1241 fn deref(&self) -> &Self::Target {
1242 &self.0
1243 }
1244}
1245#[doc = "Field `ADC_1` writer - ADC_1 function select."]
1246pub struct ADC_1_W<'a> {
1247 w: &'a mut W,
1248}
1249impl<'a> ADC_1_W<'a> {
1250 #[doc = r"Writes `variant` to the field"]
1251 #[inline(always)]
1252 pub fn variant(self, variant: ADC_1_A) -> &'a mut W {
1253 self.bit(variant.into())
1254 }
1255 #[doc = "ADC_1 enabled on pin PIO0_6."]
1256 #[inline(always)]
1257 pub fn enabled(self) -> &'a mut W {
1258 self.variant(ADC_1_A::ENABLED)
1259 }
1260 #[doc = "ADC_1 disabled."]
1261 #[inline(always)]
1262 pub fn disabled(self) -> &'a mut W {
1263 self.variant(ADC_1_A::DISABLED)
1264 }
1265 #[doc = r"Sets the field bit"]
1266 #[inline(always)]
1267 pub fn set_bit(self) -> &'a mut W {
1268 self.bit(true)
1269 }
1270 #[doc = r"Clears the field bit"]
1271 #[inline(always)]
1272 pub fn clear_bit(self) -> &'a mut W {
1273 self.bit(false)
1274 }
1275 #[doc = r"Writes raw bits to the field"]
1276 #[inline(always)]
1277 pub fn bit(self, value: bool) -> &'a mut W {
1278 self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14);
1279 self.w
1280 }
1281}
1282#[doc = "ADC_2 function select.\n\nValue on reset: 1"]
1283#[derive(Clone, Copy, Debug, PartialEq)]
1284pub enum ADC_2_A {
1285 #[doc = "0: ADC_2 enabled on pin PIO0_14."]
1286 ENABLED = 0,
1287 #[doc = "1: ADC_2 disabled."]
1288 DISABLED = 1,
1289}
1290impl From<ADC_2_A> for bool {
1291 #[inline(always)]
1292 fn from(variant: ADC_2_A) -> Self {
1293 variant as u8 != 0
1294 }
1295}
1296#[doc = "Field `ADC_2` reader - ADC_2 function select."]
1297pub struct ADC_2_R(crate::FieldReader<bool, ADC_2_A>);
1298impl ADC_2_R {
1299 pub(crate) fn new(bits: bool) -> Self {
1300 ADC_2_R(crate::FieldReader::new(bits))
1301 }
1302 #[doc = r"Get enumerated values variant"]
1303 #[inline(always)]
1304 pub fn variant(&self) -> ADC_2_A {
1305 match self.bits {
1306 false => ADC_2_A::ENABLED,
1307 true => ADC_2_A::DISABLED,
1308 }
1309 }
1310 #[doc = "Checks if the value of the field is `ENABLED`"]
1311 #[inline(always)]
1312 pub fn is_enabled(&self) -> bool {
1313 **self == ADC_2_A::ENABLED
1314 }
1315 #[doc = "Checks if the value of the field is `DISABLED`"]
1316 #[inline(always)]
1317 pub fn is_disabled(&self) -> bool {
1318 **self == ADC_2_A::DISABLED
1319 }
1320}
1321impl core::ops::Deref for ADC_2_R {
1322 type Target = crate::FieldReader<bool, ADC_2_A>;
1323 #[inline(always)]
1324 fn deref(&self) -> &Self::Target {
1325 &self.0
1326 }
1327}
1328#[doc = "Field `ADC_2` writer - ADC_2 function select."]
1329pub struct ADC_2_W<'a> {
1330 w: &'a mut W,
1331}
1332impl<'a> ADC_2_W<'a> {
1333 #[doc = r"Writes `variant` to the field"]
1334 #[inline(always)]
1335 pub fn variant(self, variant: ADC_2_A) -> &'a mut W {
1336 self.bit(variant.into())
1337 }
1338 #[doc = "ADC_2 enabled on pin PIO0_14."]
1339 #[inline(always)]
1340 pub fn enabled(self) -> &'a mut W {
1341 self.variant(ADC_2_A::ENABLED)
1342 }
1343 #[doc = "ADC_2 disabled."]
1344 #[inline(always)]
1345 pub fn disabled(self) -> &'a mut W {
1346 self.variant(ADC_2_A::DISABLED)
1347 }
1348 #[doc = r"Sets the field bit"]
1349 #[inline(always)]
1350 pub fn set_bit(self) -> &'a mut W {
1351 self.bit(true)
1352 }
1353 #[doc = r"Clears the field bit"]
1354 #[inline(always)]
1355 pub fn clear_bit(self) -> &'a mut W {
1356 self.bit(false)
1357 }
1358 #[doc = r"Writes raw bits to the field"]
1359 #[inline(always)]
1360 pub fn bit(self, value: bool) -> &'a mut W {
1361 self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15);
1362 self.w
1363 }
1364}
1365#[doc = "ADC_3 function select.\n\nValue on reset: 1"]
1366#[derive(Clone, Copy, Debug, PartialEq)]
1367pub enum ADC_3_A {
1368 #[doc = "0: ADC_3 enabled on pin PIO0_23."]
1369 ENABLED = 0,
1370 #[doc = "1: ADC_3 disabled."]
1371 DISABLED = 1,
1372}
1373impl From<ADC_3_A> for bool {
1374 #[inline(always)]
1375 fn from(variant: ADC_3_A) -> Self {
1376 variant as u8 != 0
1377 }
1378}
1379#[doc = "Field `ADC_3` reader - ADC_3 function select."]
1380pub struct ADC_3_R(crate::FieldReader<bool, ADC_3_A>);
1381impl ADC_3_R {
1382 pub(crate) fn new(bits: bool) -> Self {
1383 ADC_3_R(crate::FieldReader::new(bits))
1384 }
1385 #[doc = r"Get enumerated values variant"]
1386 #[inline(always)]
1387 pub fn variant(&self) -> ADC_3_A {
1388 match self.bits {
1389 false => ADC_3_A::ENABLED,
1390 true => ADC_3_A::DISABLED,
1391 }
1392 }
1393 #[doc = "Checks if the value of the field is `ENABLED`"]
1394 #[inline(always)]
1395 pub fn is_enabled(&self) -> bool {
1396 **self == ADC_3_A::ENABLED
1397 }
1398 #[doc = "Checks if the value of the field is `DISABLED`"]
1399 #[inline(always)]
1400 pub fn is_disabled(&self) -> bool {
1401 **self == ADC_3_A::DISABLED
1402 }
1403}
1404impl core::ops::Deref for ADC_3_R {
1405 type Target = crate::FieldReader<bool, ADC_3_A>;
1406 #[inline(always)]
1407 fn deref(&self) -> &Self::Target {
1408 &self.0
1409 }
1410}
1411#[doc = "Field `ADC_3` writer - ADC_3 function select."]
1412pub struct ADC_3_W<'a> {
1413 w: &'a mut W,
1414}
1415impl<'a> ADC_3_W<'a> {
1416 #[doc = r"Writes `variant` to the field"]
1417 #[inline(always)]
1418 pub fn variant(self, variant: ADC_3_A) -> &'a mut W {
1419 self.bit(variant.into())
1420 }
1421 #[doc = "ADC_3 enabled on pin PIO0_23."]
1422 #[inline(always)]
1423 pub fn enabled(self) -> &'a mut W {
1424 self.variant(ADC_3_A::ENABLED)
1425 }
1426 #[doc = "ADC_3 disabled."]
1427 #[inline(always)]
1428 pub fn disabled(self) -> &'a mut W {
1429 self.variant(ADC_3_A::DISABLED)
1430 }
1431 #[doc = r"Sets the field bit"]
1432 #[inline(always)]
1433 pub fn set_bit(self) -> &'a mut W {
1434 self.bit(true)
1435 }
1436 #[doc = r"Clears the field bit"]
1437 #[inline(always)]
1438 pub fn clear_bit(self) -> &'a mut W {
1439 self.bit(false)
1440 }
1441 #[doc = r"Writes raw bits to the field"]
1442 #[inline(always)]
1443 pub fn bit(self, value: bool) -> &'a mut W {
1444 self.w.bits = (self.w.bits & !(0x01 << 16)) | ((value as u32 & 0x01) << 16);
1445 self.w
1446 }
1447}
1448#[doc = "ADC_4 function select.\n\nValue on reset: 1"]
1449#[derive(Clone, Copy, Debug, PartialEq)]
1450pub enum ADC_4_A {
1451 #[doc = "0: ADC_4 enabled on pin PIO0_22."]
1452 ENABLED = 0,
1453 #[doc = "1: ADC_4 disabled."]
1454 DISABLED = 1,
1455}
1456impl From<ADC_4_A> for bool {
1457 #[inline(always)]
1458 fn from(variant: ADC_4_A) -> Self {
1459 variant as u8 != 0
1460 }
1461}
1462#[doc = "Field `ADC_4` reader - ADC_4 function select."]
1463pub struct ADC_4_R(crate::FieldReader<bool, ADC_4_A>);
1464impl ADC_4_R {
1465 pub(crate) fn new(bits: bool) -> Self {
1466 ADC_4_R(crate::FieldReader::new(bits))
1467 }
1468 #[doc = r"Get enumerated values variant"]
1469 #[inline(always)]
1470 pub fn variant(&self) -> ADC_4_A {
1471 match self.bits {
1472 false => ADC_4_A::ENABLED,
1473 true => ADC_4_A::DISABLED,
1474 }
1475 }
1476 #[doc = "Checks if the value of the field is `ENABLED`"]
1477 #[inline(always)]
1478 pub fn is_enabled(&self) -> bool {
1479 **self == ADC_4_A::ENABLED
1480 }
1481 #[doc = "Checks if the value of the field is `DISABLED`"]
1482 #[inline(always)]
1483 pub fn is_disabled(&self) -> bool {
1484 **self == ADC_4_A::DISABLED
1485 }
1486}
1487impl core::ops::Deref for ADC_4_R {
1488 type Target = crate::FieldReader<bool, ADC_4_A>;
1489 #[inline(always)]
1490 fn deref(&self) -> &Self::Target {
1491 &self.0
1492 }
1493}
1494#[doc = "Field `ADC_4` writer - ADC_4 function select."]
1495pub struct ADC_4_W<'a> {
1496 w: &'a mut W,
1497}
1498impl<'a> ADC_4_W<'a> {
1499 #[doc = r"Writes `variant` to the field"]
1500 #[inline(always)]
1501 pub fn variant(self, variant: ADC_4_A) -> &'a mut W {
1502 self.bit(variant.into())
1503 }
1504 #[doc = "ADC_4 enabled on pin PIO0_22."]
1505 #[inline(always)]
1506 pub fn enabled(self) -> &'a mut W {
1507 self.variant(ADC_4_A::ENABLED)
1508 }
1509 #[doc = "ADC_4 disabled."]
1510 #[inline(always)]
1511 pub fn disabled(self) -> &'a mut W {
1512 self.variant(ADC_4_A::DISABLED)
1513 }
1514 #[doc = r"Sets the field bit"]
1515 #[inline(always)]
1516 pub fn set_bit(self) -> &'a mut W {
1517 self.bit(true)
1518 }
1519 #[doc = r"Clears the field bit"]
1520 #[inline(always)]
1521 pub fn clear_bit(self) -> &'a mut W {
1522 self.bit(false)
1523 }
1524 #[doc = r"Writes raw bits to the field"]
1525 #[inline(always)]
1526 pub fn bit(self, value: bool) -> &'a mut W {
1527 self.w.bits = (self.w.bits & !(0x01 << 17)) | ((value as u32 & 0x01) << 17);
1528 self.w
1529 }
1530}
1531#[doc = "ADC_5 function select.\n\nValue on reset: 1"]
1532#[derive(Clone, Copy, Debug, PartialEq)]
1533pub enum ADC_5_A {
1534 #[doc = "0: ADC_5 enabled on pin PIO0_21."]
1535 ENABLED = 0,
1536 #[doc = "1: ADC_5 disabled."]
1537 DISABLED = 1,
1538}
1539impl From<ADC_5_A> for bool {
1540 #[inline(always)]
1541 fn from(variant: ADC_5_A) -> Self {
1542 variant as u8 != 0
1543 }
1544}
1545#[doc = "Field `ADC_5` reader - ADC_5 function select."]
1546pub struct ADC_5_R(crate::FieldReader<bool, ADC_5_A>);
1547impl ADC_5_R {
1548 pub(crate) fn new(bits: bool) -> Self {
1549 ADC_5_R(crate::FieldReader::new(bits))
1550 }
1551 #[doc = r"Get enumerated values variant"]
1552 #[inline(always)]
1553 pub fn variant(&self) -> ADC_5_A {
1554 match self.bits {
1555 false => ADC_5_A::ENABLED,
1556 true => ADC_5_A::DISABLED,
1557 }
1558 }
1559 #[doc = "Checks if the value of the field is `ENABLED`"]
1560 #[inline(always)]
1561 pub fn is_enabled(&self) -> bool {
1562 **self == ADC_5_A::ENABLED
1563 }
1564 #[doc = "Checks if the value of the field is `DISABLED`"]
1565 #[inline(always)]
1566 pub fn is_disabled(&self) -> bool {
1567 **self == ADC_5_A::DISABLED
1568 }
1569}
1570impl core::ops::Deref for ADC_5_R {
1571 type Target = crate::FieldReader<bool, ADC_5_A>;
1572 #[inline(always)]
1573 fn deref(&self) -> &Self::Target {
1574 &self.0
1575 }
1576}
1577#[doc = "Field `ADC_5` writer - ADC_5 function select."]
1578pub struct ADC_5_W<'a> {
1579 w: &'a mut W,
1580}
1581impl<'a> ADC_5_W<'a> {
1582 #[doc = r"Writes `variant` to the field"]
1583 #[inline(always)]
1584 pub fn variant(self, variant: ADC_5_A) -> &'a mut W {
1585 self.bit(variant.into())
1586 }
1587 #[doc = "ADC_5 enabled on pin PIO0_21."]
1588 #[inline(always)]
1589 pub fn enabled(self) -> &'a mut W {
1590 self.variant(ADC_5_A::ENABLED)
1591 }
1592 #[doc = "ADC_5 disabled."]
1593 #[inline(always)]
1594 pub fn disabled(self) -> &'a mut W {
1595 self.variant(ADC_5_A::DISABLED)
1596 }
1597 #[doc = r"Sets the field bit"]
1598 #[inline(always)]
1599 pub fn set_bit(self) -> &'a mut W {
1600 self.bit(true)
1601 }
1602 #[doc = r"Clears the field bit"]
1603 #[inline(always)]
1604 pub fn clear_bit(self) -> &'a mut W {
1605 self.bit(false)
1606 }
1607 #[doc = r"Writes raw bits to the field"]
1608 #[inline(always)]
1609 pub fn bit(self, value: bool) -> &'a mut W {
1610 self.w.bits = (self.w.bits & !(0x01 << 18)) | ((value as u32 & 0x01) << 18);
1611 self.w
1612 }
1613}
1614#[doc = "ADC_6 function select.\n\nValue on reset: 1"]
1615#[derive(Clone, Copy, Debug, PartialEq)]
1616pub enum ADC_6_A {
1617 #[doc = "0: ADC_6 enabled on pin PIO0_20."]
1618 ENABLED = 0,
1619 #[doc = "1: ADC_6 disabled."]
1620 DISABLED = 1,
1621}
1622impl From<ADC_6_A> for bool {
1623 #[inline(always)]
1624 fn from(variant: ADC_6_A) -> Self {
1625 variant as u8 != 0
1626 }
1627}
1628#[doc = "Field `ADC_6` reader - ADC_6 function select."]
1629pub struct ADC_6_R(crate::FieldReader<bool, ADC_6_A>);
1630impl ADC_6_R {
1631 pub(crate) fn new(bits: bool) -> Self {
1632 ADC_6_R(crate::FieldReader::new(bits))
1633 }
1634 #[doc = r"Get enumerated values variant"]
1635 #[inline(always)]
1636 pub fn variant(&self) -> ADC_6_A {
1637 match self.bits {
1638 false => ADC_6_A::ENABLED,
1639 true => ADC_6_A::DISABLED,
1640 }
1641 }
1642 #[doc = "Checks if the value of the field is `ENABLED`"]
1643 #[inline(always)]
1644 pub fn is_enabled(&self) -> bool {
1645 **self == ADC_6_A::ENABLED
1646 }
1647 #[doc = "Checks if the value of the field is `DISABLED`"]
1648 #[inline(always)]
1649 pub fn is_disabled(&self) -> bool {
1650 **self == ADC_6_A::DISABLED
1651 }
1652}
1653impl core::ops::Deref for ADC_6_R {
1654 type Target = crate::FieldReader<bool, ADC_6_A>;
1655 #[inline(always)]
1656 fn deref(&self) -> &Self::Target {
1657 &self.0
1658 }
1659}
1660#[doc = "Field `ADC_6` writer - ADC_6 function select."]
1661pub struct ADC_6_W<'a> {
1662 w: &'a mut W,
1663}
1664impl<'a> ADC_6_W<'a> {
1665 #[doc = r"Writes `variant` to the field"]
1666 #[inline(always)]
1667 pub fn variant(self, variant: ADC_6_A) -> &'a mut W {
1668 self.bit(variant.into())
1669 }
1670 #[doc = "ADC_6 enabled on pin PIO0_20."]
1671 #[inline(always)]
1672 pub fn enabled(self) -> &'a mut W {
1673 self.variant(ADC_6_A::ENABLED)
1674 }
1675 #[doc = "ADC_6 disabled."]
1676 #[inline(always)]
1677 pub fn disabled(self) -> &'a mut W {
1678 self.variant(ADC_6_A::DISABLED)
1679 }
1680 #[doc = r"Sets the field bit"]
1681 #[inline(always)]
1682 pub fn set_bit(self) -> &'a mut W {
1683 self.bit(true)
1684 }
1685 #[doc = r"Clears the field bit"]
1686 #[inline(always)]
1687 pub fn clear_bit(self) -> &'a mut W {
1688 self.bit(false)
1689 }
1690 #[doc = r"Writes raw bits to the field"]
1691 #[inline(always)]
1692 pub fn bit(self, value: bool) -> &'a mut W {
1693 self.w.bits = (self.w.bits & !(0x01 << 19)) | ((value as u32 & 0x01) << 19);
1694 self.w
1695 }
1696}
1697#[doc = "ADC_7 function select.\n\nValue on reset: 1"]
1698#[derive(Clone, Copy, Debug, PartialEq)]
1699pub enum ADC_7_A {
1700 #[doc = "0: ADC_7 enabled on pin PIO0_19."]
1701 ENABLED = 0,
1702 #[doc = "1: ADC_7 disabled."]
1703 DISABLED = 1,
1704}
1705impl From<ADC_7_A> for bool {
1706 #[inline(always)]
1707 fn from(variant: ADC_7_A) -> Self {
1708 variant as u8 != 0
1709 }
1710}
1711#[doc = "Field `ADC_7` reader - ADC_7 function select."]
1712pub struct ADC_7_R(crate::FieldReader<bool, ADC_7_A>);
1713impl ADC_7_R {
1714 pub(crate) fn new(bits: bool) -> Self {
1715 ADC_7_R(crate::FieldReader::new(bits))
1716 }
1717 #[doc = r"Get enumerated values variant"]
1718 #[inline(always)]
1719 pub fn variant(&self) -> ADC_7_A {
1720 match self.bits {
1721 false => ADC_7_A::ENABLED,
1722 true => ADC_7_A::DISABLED,
1723 }
1724 }
1725 #[doc = "Checks if the value of the field is `ENABLED`"]
1726 #[inline(always)]
1727 pub fn is_enabled(&self) -> bool {
1728 **self == ADC_7_A::ENABLED
1729 }
1730 #[doc = "Checks if the value of the field is `DISABLED`"]
1731 #[inline(always)]
1732 pub fn is_disabled(&self) -> bool {
1733 **self == ADC_7_A::DISABLED
1734 }
1735}
1736impl core::ops::Deref for ADC_7_R {
1737 type Target = crate::FieldReader<bool, ADC_7_A>;
1738 #[inline(always)]
1739 fn deref(&self) -> &Self::Target {
1740 &self.0
1741 }
1742}
1743#[doc = "Field `ADC_7` writer - ADC_7 function select."]
1744pub struct ADC_7_W<'a> {
1745 w: &'a mut W,
1746}
1747impl<'a> ADC_7_W<'a> {
1748 #[doc = r"Writes `variant` to the field"]
1749 #[inline(always)]
1750 pub fn variant(self, variant: ADC_7_A) -> &'a mut W {
1751 self.bit(variant.into())
1752 }
1753 #[doc = "ADC_7 enabled on pin PIO0_19."]
1754 #[inline(always)]
1755 pub fn enabled(self) -> &'a mut W {
1756 self.variant(ADC_7_A::ENABLED)
1757 }
1758 #[doc = "ADC_7 disabled."]
1759 #[inline(always)]
1760 pub fn disabled(self) -> &'a mut W {
1761 self.variant(ADC_7_A::DISABLED)
1762 }
1763 #[doc = r"Sets the field bit"]
1764 #[inline(always)]
1765 pub fn set_bit(self) -> &'a mut W {
1766 self.bit(true)
1767 }
1768 #[doc = r"Clears the field bit"]
1769 #[inline(always)]
1770 pub fn clear_bit(self) -> &'a mut W {
1771 self.bit(false)
1772 }
1773 #[doc = r"Writes raw bits to the field"]
1774 #[inline(always)]
1775 pub fn bit(self, value: bool) -> &'a mut W {
1776 self.w.bits = (self.w.bits & !(0x01 << 20)) | ((value as u32 & 0x01) << 20);
1777 self.w
1778 }
1779}
1780#[doc = "ADC_8 function select.\n\nValue on reset: 1"]
1781#[derive(Clone, Copy, Debug, PartialEq)]
1782pub enum ADC_8_A {
1783 #[doc = "0: ADC_8 enabled on pin PIO0_18."]
1784 ENABLED = 0,
1785 #[doc = "1: ADC_8 disabled."]
1786 DISABLED = 1,
1787}
1788impl From<ADC_8_A> for bool {
1789 #[inline(always)]
1790 fn from(variant: ADC_8_A) -> Self {
1791 variant as u8 != 0
1792 }
1793}
1794#[doc = "Field `ADC_8` reader - ADC_8 function select."]
1795pub struct ADC_8_R(crate::FieldReader<bool, ADC_8_A>);
1796impl ADC_8_R {
1797 pub(crate) fn new(bits: bool) -> Self {
1798 ADC_8_R(crate::FieldReader::new(bits))
1799 }
1800 #[doc = r"Get enumerated values variant"]
1801 #[inline(always)]
1802 pub fn variant(&self) -> ADC_8_A {
1803 match self.bits {
1804 false => ADC_8_A::ENABLED,
1805 true => ADC_8_A::DISABLED,
1806 }
1807 }
1808 #[doc = "Checks if the value of the field is `ENABLED`"]
1809 #[inline(always)]
1810 pub fn is_enabled(&self) -> bool {
1811 **self == ADC_8_A::ENABLED
1812 }
1813 #[doc = "Checks if the value of the field is `DISABLED`"]
1814 #[inline(always)]
1815 pub fn is_disabled(&self) -> bool {
1816 **self == ADC_8_A::DISABLED
1817 }
1818}
1819impl core::ops::Deref for ADC_8_R {
1820 type Target = crate::FieldReader<bool, ADC_8_A>;
1821 #[inline(always)]
1822 fn deref(&self) -> &Self::Target {
1823 &self.0
1824 }
1825}
1826#[doc = "Field `ADC_8` writer - ADC_8 function select."]
1827pub struct ADC_8_W<'a> {
1828 w: &'a mut W,
1829}
1830impl<'a> ADC_8_W<'a> {
1831 #[doc = r"Writes `variant` to the field"]
1832 #[inline(always)]
1833 pub fn variant(self, variant: ADC_8_A) -> &'a mut W {
1834 self.bit(variant.into())
1835 }
1836 #[doc = "ADC_8 enabled on pin PIO0_18."]
1837 #[inline(always)]
1838 pub fn enabled(self) -> &'a mut W {
1839 self.variant(ADC_8_A::ENABLED)
1840 }
1841 #[doc = "ADC_8 disabled."]
1842 #[inline(always)]
1843 pub fn disabled(self) -> &'a mut W {
1844 self.variant(ADC_8_A::DISABLED)
1845 }
1846 #[doc = r"Sets the field bit"]
1847 #[inline(always)]
1848 pub fn set_bit(self) -> &'a mut W {
1849 self.bit(true)
1850 }
1851 #[doc = r"Clears the field bit"]
1852 #[inline(always)]
1853 pub fn clear_bit(self) -> &'a mut W {
1854 self.bit(false)
1855 }
1856 #[doc = r"Writes raw bits to the field"]
1857 #[inline(always)]
1858 pub fn bit(self, value: bool) -> &'a mut W {
1859 self.w.bits = (self.w.bits & !(0x01 << 21)) | ((value as u32 & 0x01) << 21);
1860 self.w
1861 }
1862}
1863#[doc = "ADC_9 function select.\n\nValue on reset: 1"]
1864#[derive(Clone, Copy, Debug, PartialEq)]
1865pub enum ADC_9_A {
1866 #[doc = "0: ADC_9 enabled on pin PIO0_17."]
1867 ENABLED = 0,
1868 #[doc = "1: ADC_9 disabled."]
1869 DISABLED = 1,
1870}
1871impl From<ADC_9_A> for bool {
1872 #[inline(always)]
1873 fn from(variant: ADC_9_A) -> Self {
1874 variant as u8 != 0
1875 }
1876}
1877#[doc = "Field `ADC_9` reader - ADC_9 function select."]
1878pub struct ADC_9_R(crate::FieldReader<bool, ADC_9_A>);
1879impl ADC_9_R {
1880 pub(crate) fn new(bits: bool) -> Self {
1881 ADC_9_R(crate::FieldReader::new(bits))
1882 }
1883 #[doc = r"Get enumerated values variant"]
1884 #[inline(always)]
1885 pub fn variant(&self) -> ADC_9_A {
1886 match self.bits {
1887 false => ADC_9_A::ENABLED,
1888 true => ADC_9_A::DISABLED,
1889 }
1890 }
1891 #[doc = "Checks if the value of the field is `ENABLED`"]
1892 #[inline(always)]
1893 pub fn is_enabled(&self) -> bool {
1894 **self == ADC_9_A::ENABLED
1895 }
1896 #[doc = "Checks if the value of the field is `DISABLED`"]
1897 #[inline(always)]
1898 pub fn is_disabled(&self) -> bool {
1899 **self == ADC_9_A::DISABLED
1900 }
1901}
1902impl core::ops::Deref for ADC_9_R {
1903 type Target = crate::FieldReader<bool, ADC_9_A>;
1904 #[inline(always)]
1905 fn deref(&self) -> &Self::Target {
1906 &self.0
1907 }
1908}
1909#[doc = "Field `ADC_9` writer - ADC_9 function select."]
1910pub struct ADC_9_W<'a> {
1911 w: &'a mut W,
1912}
1913impl<'a> ADC_9_W<'a> {
1914 #[doc = r"Writes `variant` to the field"]
1915 #[inline(always)]
1916 pub fn variant(self, variant: ADC_9_A) -> &'a mut W {
1917 self.bit(variant.into())
1918 }
1919 #[doc = "ADC_9 enabled on pin PIO0_17."]
1920 #[inline(always)]
1921 pub fn enabled(self) -> &'a mut W {
1922 self.variant(ADC_9_A::ENABLED)
1923 }
1924 #[doc = "ADC_9 disabled."]
1925 #[inline(always)]
1926 pub fn disabled(self) -> &'a mut W {
1927 self.variant(ADC_9_A::DISABLED)
1928 }
1929 #[doc = r"Sets the field bit"]
1930 #[inline(always)]
1931 pub fn set_bit(self) -> &'a mut W {
1932 self.bit(true)
1933 }
1934 #[doc = r"Clears the field bit"]
1935 #[inline(always)]
1936 pub fn clear_bit(self) -> &'a mut W {
1937 self.bit(false)
1938 }
1939 #[doc = r"Writes raw bits to the field"]
1940 #[inline(always)]
1941 pub fn bit(self, value: bool) -> &'a mut W {
1942 self.w.bits = (self.w.bits & !(0x01 << 22)) | ((value as u32 & 0x01) << 22);
1943 self.w
1944 }
1945}
1946#[doc = "ADC_10 function select.\n\nValue on reset: 1"]
1947#[derive(Clone, Copy, Debug, PartialEq)]
1948pub enum ADC_10_A {
1949 #[doc = "0: ADC_10 enabled on pin PIO0_13."]
1950 ENABLED = 0,
1951 #[doc = "1: ADC_10 disabled."]
1952 DISABLED = 1,
1953}
1954impl From<ADC_10_A> for bool {
1955 #[inline(always)]
1956 fn from(variant: ADC_10_A) -> Self {
1957 variant as u8 != 0
1958 }
1959}
1960#[doc = "Field `ADC_10` reader - ADC_10 function select."]
1961pub struct ADC_10_R(crate::FieldReader<bool, ADC_10_A>);
1962impl ADC_10_R {
1963 pub(crate) fn new(bits: bool) -> Self {
1964 ADC_10_R(crate::FieldReader::new(bits))
1965 }
1966 #[doc = r"Get enumerated values variant"]
1967 #[inline(always)]
1968 pub fn variant(&self) -> ADC_10_A {
1969 match self.bits {
1970 false => ADC_10_A::ENABLED,
1971 true => ADC_10_A::DISABLED,
1972 }
1973 }
1974 #[doc = "Checks if the value of the field is `ENABLED`"]
1975 #[inline(always)]
1976 pub fn is_enabled(&self) -> bool {
1977 **self == ADC_10_A::ENABLED
1978 }
1979 #[doc = "Checks if the value of the field is `DISABLED`"]
1980 #[inline(always)]
1981 pub fn is_disabled(&self) -> bool {
1982 **self == ADC_10_A::DISABLED
1983 }
1984}
1985impl core::ops::Deref for ADC_10_R {
1986 type Target = crate::FieldReader<bool, ADC_10_A>;
1987 #[inline(always)]
1988 fn deref(&self) -> &Self::Target {
1989 &self.0
1990 }
1991}
1992#[doc = "Field `ADC_10` writer - ADC_10 function select."]
1993pub struct ADC_10_W<'a> {
1994 w: &'a mut W,
1995}
1996impl<'a> ADC_10_W<'a> {
1997 #[doc = r"Writes `variant` to the field"]
1998 #[inline(always)]
1999 pub fn variant(self, variant: ADC_10_A) -> &'a mut W {
2000 self.bit(variant.into())
2001 }
2002 #[doc = "ADC_10 enabled on pin PIO0_13."]
2003 #[inline(always)]
2004 pub fn enabled(self) -> &'a mut W {
2005 self.variant(ADC_10_A::ENABLED)
2006 }
2007 #[doc = "ADC_10 disabled."]
2008 #[inline(always)]
2009 pub fn disabled(self) -> &'a mut W {
2010 self.variant(ADC_10_A::DISABLED)
2011 }
2012 #[doc = r"Sets the field bit"]
2013 #[inline(always)]
2014 pub fn set_bit(self) -> &'a mut W {
2015 self.bit(true)
2016 }
2017 #[doc = r"Clears the field bit"]
2018 #[inline(always)]
2019 pub fn clear_bit(self) -> &'a mut W {
2020 self.bit(false)
2021 }
2022 #[doc = r"Writes raw bits to the field"]
2023 #[inline(always)]
2024 pub fn bit(self, value: bool) -> &'a mut W {
2025 self.w.bits = (self.w.bits & !(0x01 << 23)) | ((value as u32 & 0x01) << 23);
2026 self.w
2027 }
2028}
2029#[doc = "ADC_11 function select.\n\nValue on reset: 1"]
2030#[derive(Clone, Copy, Debug, PartialEq)]
2031pub enum ADC_11_A {
2032 #[doc = "0: ADC_11 enabled on pin PIO0_4."]
2033 ENABLED = 0,
2034 #[doc = "1: ADC_11 disabled."]
2035 DISABLED = 1,
2036}
2037impl From<ADC_11_A> for bool {
2038 #[inline(always)]
2039 fn from(variant: ADC_11_A) -> Self {
2040 variant as u8 != 0
2041 }
2042}
2043#[doc = "Field `ADC_11` reader - ADC_11 function select."]
2044pub struct ADC_11_R(crate::FieldReader<bool, ADC_11_A>);
2045impl ADC_11_R {
2046 pub(crate) fn new(bits: bool) -> Self {
2047 ADC_11_R(crate::FieldReader::new(bits))
2048 }
2049 #[doc = r"Get enumerated values variant"]
2050 #[inline(always)]
2051 pub fn variant(&self) -> ADC_11_A {
2052 match self.bits {
2053 false => ADC_11_A::ENABLED,
2054 true => ADC_11_A::DISABLED,
2055 }
2056 }
2057 #[doc = "Checks if the value of the field is `ENABLED`"]
2058 #[inline(always)]
2059 pub fn is_enabled(&self) -> bool {
2060 **self == ADC_11_A::ENABLED
2061 }
2062 #[doc = "Checks if the value of the field is `DISABLED`"]
2063 #[inline(always)]
2064 pub fn is_disabled(&self) -> bool {
2065 **self == ADC_11_A::DISABLED
2066 }
2067}
2068impl core::ops::Deref for ADC_11_R {
2069 type Target = crate::FieldReader<bool, ADC_11_A>;
2070 #[inline(always)]
2071 fn deref(&self) -> &Self::Target {
2072 &self.0
2073 }
2074}
2075#[doc = "Field `ADC_11` writer - ADC_11 function select."]
2076pub struct ADC_11_W<'a> {
2077 w: &'a mut W,
2078}
2079impl<'a> ADC_11_W<'a> {
2080 #[doc = r"Writes `variant` to the field"]
2081 #[inline(always)]
2082 pub fn variant(self, variant: ADC_11_A) -> &'a mut W {
2083 self.bit(variant.into())
2084 }
2085 #[doc = "ADC_11 enabled on pin PIO0_4."]
2086 #[inline(always)]
2087 pub fn enabled(self) -> &'a mut W {
2088 self.variant(ADC_11_A::ENABLED)
2089 }
2090 #[doc = "ADC_11 disabled."]
2091 #[inline(always)]
2092 pub fn disabled(self) -> &'a mut W {
2093 self.variant(ADC_11_A::DISABLED)
2094 }
2095 #[doc = r"Sets the field bit"]
2096 #[inline(always)]
2097 pub fn set_bit(self) -> &'a mut W {
2098 self.bit(true)
2099 }
2100 #[doc = r"Clears the field bit"]
2101 #[inline(always)]
2102 pub fn clear_bit(self) -> &'a mut W {
2103 self.bit(false)
2104 }
2105 #[doc = r"Writes raw bits to the field"]
2106 #[inline(always)]
2107 pub fn bit(self, value: bool) -> &'a mut W {
2108 self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24);
2109 self.w
2110 }
2111}
2112impl R {
2113 #[doc = "Bit 0 - ACMP_I1 function select."]
2114 #[inline(always)]
2115 pub fn acmp_i1(&self) -> ACMP_I1_R {
2116 ACMP_I1_R::new((self.bits & 0x01) != 0)
2117 }
2118 #[doc = "Bit 1 - ACMP_I2 function select."]
2119 #[inline(always)]
2120 pub fn acmp_i2(&self) -> ACMP_I2_R {
2121 ACMP_I2_R::new(((self.bits >> 1) & 0x01) != 0)
2122 }
2123 #[doc = "Bit 2 - ACMP_I3 function select."]
2124 #[inline(always)]
2125 pub fn acmp_i3(&self) -> ACMP_I3_R {
2126 ACMP_I3_R::new(((self.bits >> 2) & 0x01) != 0)
2127 }
2128 #[doc = "Bit 3 - ACMP_I4 function select."]
2129 #[inline(always)]
2130 pub fn acmp_i4(&self) -> ACMP_I4_R {
2131 ACMP_I4_R::new(((self.bits >> 3) & 0x01) != 0)
2132 }
2133 #[doc = "Bit 4 - SWCLK function select."]
2134 #[inline(always)]
2135 pub fn swclk(&self) -> SWCLK_R {
2136 SWCLK_R::new(((self.bits >> 4) & 0x01) != 0)
2137 }
2138 #[doc = "Bit 5 - SWDIO function select."]
2139 #[inline(always)]
2140 pub fn swdio(&self) -> SWDIO_R {
2141 SWDIO_R::new(((self.bits >> 5) & 0x01) != 0)
2142 }
2143 #[doc = "Bit 6 - XTALIN function select."]
2144 #[inline(always)]
2145 pub fn xtalin(&self) -> XTALIN_R {
2146 XTALIN_R::new(((self.bits >> 6) & 0x01) != 0)
2147 }
2148 #[doc = "Bit 7 - XTALOUT function select."]
2149 #[inline(always)]
2150 pub fn xtalout(&self) -> XTALOUT_R {
2151 XTALOUT_R::new(((self.bits >> 7) & 0x01) != 0)
2152 }
2153 #[doc = "Bit 8 - RESETN function select."]
2154 #[inline(always)]
2155 pub fn resetn(&self) -> RESETN_R {
2156 RESETN_R::new(((self.bits >> 8) & 0x01) != 0)
2157 }
2158 #[doc = "Bit 9 - CLKIN function select."]
2159 #[inline(always)]
2160 pub fn clkin(&self) -> CLKIN_R {
2161 CLKIN_R::new(((self.bits >> 9) & 0x01) != 0)
2162 }
2163 #[doc = "Bit 10 - VDDCMP function select."]
2164 #[inline(always)]
2165 pub fn vddcmp(&self) -> VDDCMP_R {
2166 VDDCMP_R::new(((self.bits >> 10) & 0x01) != 0)
2167 }
2168 #[doc = "Bit 11 - I2C0_SDA function select."]
2169 #[inline(always)]
2170 pub fn i2c0_sda(&self) -> I2C0_SDA_R {
2171 I2C0_SDA_R::new(((self.bits >> 11) & 0x01) != 0)
2172 }
2173 #[doc = "Bit 12 - I2C0_SCL function select."]
2174 #[inline(always)]
2175 pub fn i2c0_scl(&self) -> I2C0_SCL_R {
2176 I2C0_SCL_R::new(((self.bits >> 12) & 0x01) != 0)
2177 }
2178 #[doc = "Bit 13 - ADC_0 function select."]
2179 #[inline(always)]
2180 pub fn adc_0(&self) -> ADC_0_R {
2181 ADC_0_R::new(((self.bits >> 13) & 0x01) != 0)
2182 }
2183 #[doc = "Bit 14 - ADC_1 function select."]
2184 #[inline(always)]
2185 pub fn adc_1(&self) -> ADC_1_R {
2186 ADC_1_R::new(((self.bits >> 14) & 0x01) != 0)
2187 }
2188 #[doc = "Bit 15 - ADC_2 function select."]
2189 #[inline(always)]
2190 pub fn adc_2(&self) -> ADC_2_R {
2191 ADC_2_R::new(((self.bits >> 15) & 0x01) != 0)
2192 }
2193 #[doc = "Bit 16 - ADC_3 function select."]
2194 #[inline(always)]
2195 pub fn adc_3(&self) -> ADC_3_R {
2196 ADC_3_R::new(((self.bits >> 16) & 0x01) != 0)
2197 }
2198 #[doc = "Bit 17 - ADC_4 function select."]
2199 #[inline(always)]
2200 pub fn adc_4(&self) -> ADC_4_R {
2201 ADC_4_R::new(((self.bits >> 17) & 0x01) != 0)
2202 }
2203 #[doc = "Bit 18 - ADC_5 function select."]
2204 #[inline(always)]
2205 pub fn adc_5(&self) -> ADC_5_R {
2206 ADC_5_R::new(((self.bits >> 18) & 0x01) != 0)
2207 }
2208 #[doc = "Bit 19 - ADC_6 function select."]
2209 #[inline(always)]
2210 pub fn adc_6(&self) -> ADC_6_R {
2211 ADC_6_R::new(((self.bits >> 19) & 0x01) != 0)
2212 }
2213 #[doc = "Bit 20 - ADC_7 function select."]
2214 #[inline(always)]
2215 pub fn adc_7(&self) -> ADC_7_R {
2216 ADC_7_R::new(((self.bits >> 20) & 0x01) != 0)
2217 }
2218 #[doc = "Bit 21 - ADC_8 function select."]
2219 #[inline(always)]
2220 pub fn adc_8(&self) -> ADC_8_R {
2221 ADC_8_R::new(((self.bits >> 21) & 0x01) != 0)
2222 }
2223 #[doc = "Bit 22 - ADC_9 function select."]
2224 #[inline(always)]
2225 pub fn adc_9(&self) -> ADC_9_R {
2226 ADC_9_R::new(((self.bits >> 22) & 0x01) != 0)
2227 }
2228 #[doc = "Bit 23 - ADC_10 function select."]
2229 #[inline(always)]
2230 pub fn adc_10(&self) -> ADC_10_R {
2231 ADC_10_R::new(((self.bits >> 23) & 0x01) != 0)
2232 }
2233 #[doc = "Bit 24 - ADC_11 function select."]
2234 #[inline(always)]
2235 pub fn adc_11(&self) -> ADC_11_R {
2236 ADC_11_R::new(((self.bits >> 24) & 0x01) != 0)
2237 }
2238}
2239impl W {
2240 #[doc = "Bit 0 - ACMP_I1 function select."]
2241 #[inline(always)]
2242 pub fn acmp_i1(&mut self) -> ACMP_I1_W {
2243 ACMP_I1_W { w: self }
2244 }
2245 #[doc = "Bit 1 - ACMP_I2 function select."]
2246 #[inline(always)]
2247 pub fn acmp_i2(&mut self) -> ACMP_I2_W {
2248 ACMP_I2_W { w: self }
2249 }
2250 #[doc = "Bit 2 - ACMP_I3 function select."]
2251 #[inline(always)]
2252 pub fn acmp_i3(&mut self) -> ACMP_I3_W {
2253 ACMP_I3_W { w: self }
2254 }
2255 #[doc = "Bit 3 - ACMP_I4 function select."]
2256 #[inline(always)]
2257 pub fn acmp_i4(&mut self) -> ACMP_I4_W {
2258 ACMP_I4_W { w: self }
2259 }
2260 #[doc = "Bit 4 - SWCLK function select."]
2261 #[inline(always)]
2262 pub fn swclk(&mut self) -> SWCLK_W {
2263 SWCLK_W { w: self }
2264 }
2265 #[doc = "Bit 5 - SWDIO function select."]
2266 #[inline(always)]
2267 pub fn swdio(&mut self) -> SWDIO_W {
2268 SWDIO_W { w: self }
2269 }
2270 #[doc = "Bit 6 - XTALIN function select."]
2271 #[inline(always)]
2272 pub fn xtalin(&mut self) -> XTALIN_W {
2273 XTALIN_W { w: self }
2274 }
2275 #[doc = "Bit 7 - XTALOUT function select."]
2276 #[inline(always)]
2277 pub fn xtalout(&mut self) -> XTALOUT_W {
2278 XTALOUT_W { w: self }
2279 }
2280 #[doc = "Bit 8 - RESETN function select."]
2281 #[inline(always)]
2282 pub fn resetn(&mut self) -> RESETN_W {
2283 RESETN_W { w: self }
2284 }
2285 #[doc = "Bit 9 - CLKIN function select."]
2286 #[inline(always)]
2287 pub fn clkin(&mut self) -> CLKIN_W {
2288 CLKIN_W { w: self }
2289 }
2290 #[doc = "Bit 10 - VDDCMP function select."]
2291 #[inline(always)]
2292 pub fn vddcmp(&mut self) -> VDDCMP_W {
2293 VDDCMP_W { w: self }
2294 }
2295 #[doc = "Bit 11 - I2C0_SDA function select."]
2296 #[inline(always)]
2297 pub fn i2c0_sda(&mut self) -> I2C0_SDA_W {
2298 I2C0_SDA_W { w: self }
2299 }
2300 #[doc = "Bit 12 - I2C0_SCL function select."]
2301 #[inline(always)]
2302 pub fn i2c0_scl(&mut self) -> I2C0_SCL_W {
2303 I2C0_SCL_W { w: self }
2304 }
2305 #[doc = "Bit 13 - ADC_0 function select."]
2306 #[inline(always)]
2307 pub fn adc_0(&mut self) -> ADC_0_W {
2308 ADC_0_W { w: self }
2309 }
2310 #[doc = "Bit 14 - ADC_1 function select."]
2311 #[inline(always)]
2312 pub fn adc_1(&mut self) -> ADC_1_W {
2313 ADC_1_W { w: self }
2314 }
2315 #[doc = "Bit 15 - ADC_2 function select."]
2316 #[inline(always)]
2317 pub fn adc_2(&mut self) -> ADC_2_W {
2318 ADC_2_W { w: self }
2319 }
2320 #[doc = "Bit 16 - ADC_3 function select."]
2321 #[inline(always)]
2322 pub fn adc_3(&mut self) -> ADC_3_W {
2323 ADC_3_W { w: self }
2324 }
2325 #[doc = "Bit 17 - ADC_4 function select."]
2326 #[inline(always)]
2327 pub fn adc_4(&mut self) -> ADC_4_W {
2328 ADC_4_W { w: self }
2329 }
2330 #[doc = "Bit 18 - ADC_5 function select."]
2331 #[inline(always)]
2332 pub fn adc_5(&mut self) -> ADC_5_W {
2333 ADC_5_W { w: self }
2334 }
2335 #[doc = "Bit 19 - ADC_6 function select."]
2336 #[inline(always)]
2337 pub fn adc_6(&mut self) -> ADC_6_W {
2338 ADC_6_W { w: self }
2339 }
2340 #[doc = "Bit 20 - ADC_7 function select."]
2341 #[inline(always)]
2342 pub fn adc_7(&mut self) -> ADC_7_W {
2343 ADC_7_W { w: self }
2344 }
2345 #[doc = "Bit 21 - ADC_8 function select."]
2346 #[inline(always)]
2347 pub fn adc_8(&mut self) -> ADC_8_W {
2348 ADC_8_W { w: self }
2349 }
2350 #[doc = "Bit 22 - ADC_9 function select."]
2351 #[inline(always)]
2352 pub fn adc_9(&mut self) -> ADC_9_W {
2353 ADC_9_W { w: self }
2354 }
2355 #[doc = "Bit 23 - ADC_10 function select."]
2356 #[inline(always)]
2357 pub fn adc_10(&mut self) -> ADC_10_W {
2358 ADC_10_W { w: self }
2359 }
2360 #[doc = "Bit 24 - ADC_11 function select."]
2361 #[inline(always)]
2362 pub fn adc_11(&mut self) -> ADC_11_W {
2363 ADC_11_W { w: self }
2364 }
2365 #[doc = "Writes raw bits to the register."]
2366 #[inline(always)]
2367 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
2368 self.0.bits(bits);
2369 self
2370 }
2371}
2372#[doc = "Pin enable register 0. Enables fixed-pin functions ACMP_I0, ACMP_I1, SWCLK, SWDIO, XTALIN, XTALOUT, RESET, CLKIN, VDDCMP and so on.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [pinenable0](index.html) module"]
2373pub struct PINENABLE0_SPEC;
2374impl crate::RegisterSpec for PINENABLE0_SPEC {
2375 type Ux = u32;
2376}
2377#[doc = "`read()` method returns [pinenable0::R](R) reader structure"]
2378impl crate::Readable for PINENABLE0_SPEC {
2379 type Reader = R;
2380}
2381#[doc = "`write(|w| ..)` method takes [pinenable0::W](W) writer structure"]
2382impl crate::Writable for PINENABLE0_SPEC {
2383 type Writer = W;
2384}
2385#[doc = "`reset()` method sets PINENABLE0 to value 0xffff_fecf"]
2386impl crate::Resettable for PINENABLE0_SPEC {
2387 #[inline(always)]
2388 fn reset_value() -> Self::Ux {
2389 0xffff_fecf
2390 }
2391}