xmc4400/port14/
hwsel.rs

1#[doc = "Register `HWSEL` reader"]
2pub type R = crate::R<HWSEL_SPEC>;
3#[doc = "Register `HWSEL` writer"]
4pub type W = crate::W<HWSEL_SPEC>;
5#[doc = "Port n Pin Hardware Select Bit 0\n\nValue on reset: 0"]
6#[derive(Clone, Copy, Debug, PartialEq, Eq)]
7#[repr(u8)]
8pub enum HW0_A {
9    #[doc = "0: Software control only."]
10    VALUE1 = 0,
11    #[doc = "1: HW0 control path can override the software configuration."]
12    VALUE2 = 1,
13    #[doc = "2: HW1 control path can override the software configuration."]
14    VALUE3 = 2,
15}
16impl From<HW0_A> for u8 {
17    #[inline(always)]
18    fn from(variant: HW0_A) -> Self {
19        variant as _
20    }
21}
22impl crate::FieldSpec for HW0_A {
23    type Ux = u8;
24}
25impl crate::IsEnum for HW0_A {}
26#[doc = "Field `HW0` reader - Port n Pin Hardware Select Bit 0"]
27pub type HW0_R = crate::FieldReader<HW0_A>;
28impl HW0_R {
29    #[doc = "Get enumerated values variant"]
30    #[inline(always)]
31    pub const fn variant(&self) -> Option<HW0_A> {
32        match self.bits {
33            0 => Some(HW0_A::VALUE1),
34            1 => Some(HW0_A::VALUE2),
35            2 => Some(HW0_A::VALUE3),
36            _ => None,
37        }
38    }
39    #[doc = "Software control only."]
40    #[inline(always)]
41    pub fn is_value1(&self) -> bool {
42        *self == HW0_A::VALUE1
43    }
44    #[doc = "HW0 control path can override the software configuration."]
45    #[inline(always)]
46    pub fn is_value2(&self) -> bool {
47        *self == HW0_A::VALUE2
48    }
49    #[doc = "HW1 control path can override the software configuration."]
50    #[inline(always)]
51    pub fn is_value3(&self) -> bool {
52        *self == HW0_A::VALUE3
53    }
54}
55#[doc = "Field `HW0` writer - Port n Pin Hardware Select Bit 0"]
56pub type HW0_W<'a, REG> = crate::FieldWriter<'a, REG, 2, HW0_A>;
57impl<'a, REG> HW0_W<'a, REG>
58where
59    REG: crate::Writable + crate::RegisterSpec,
60    REG::Ux: From<u8>,
61{
62    #[doc = "Software control only."]
63    #[inline(always)]
64    pub fn value1(self) -> &'a mut crate::W<REG> {
65        self.variant(HW0_A::VALUE1)
66    }
67    #[doc = "HW0 control path can override the software configuration."]
68    #[inline(always)]
69    pub fn value2(self) -> &'a mut crate::W<REG> {
70        self.variant(HW0_A::VALUE2)
71    }
72    #[doc = "HW1 control path can override the software configuration."]
73    #[inline(always)]
74    pub fn value3(self) -> &'a mut crate::W<REG> {
75        self.variant(HW0_A::VALUE3)
76    }
77}
78#[doc = "Port n Pin Hardware Select Bit 1\n\nValue on reset: 0"]
79#[derive(Clone, Copy, Debug, PartialEq, Eq)]
80#[repr(u8)]
81pub enum HW1_A {
82    #[doc = "0: Software control only."]
83    VALUE1 = 0,
84    #[doc = "1: HW0 control path can override the software configuration."]
85    VALUE2 = 1,
86    #[doc = "2: HW1 control path can override the software configuration."]
87    VALUE3 = 2,
88}
89impl From<HW1_A> for u8 {
90    #[inline(always)]
91    fn from(variant: HW1_A) -> Self {
92        variant as _
93    }
94}
95impl crate::FieldSpec for HW1_A {
96    type Ux = u8;
97}
98impl crate::IsEnum for HW1_A {}
99#[doc = "Field `HW1` reader - Port n Pin Hardware Select Bit 1"]
100pub type HW1_R = crate::FieldReader<HW1_A>;
101impl HW1_R {
102    #[doc = "Get enumerated values variant"]
103    #[inline(always)]
104    pub const fn variant(&self) -> Option<HW1_A> {
105        match self.bits {
106            0 => Some(HW1_A::VALUE1),
107            1 => Some(HW1_A::VALUE2),
108            2 => Some(HW1_A::VALUE3),
109            _ => None,
110        }
111    }
112    #[doc = "Software control only."]
113    #[inline(always)]
114    pub fn is_value1(&self) -> bool {
115        *self == HW1_A::VALUE1
116    }
117    #[doc = "HW0 control path can override the software configuration."]
118    #[inline(always)]
119    pub fn is_value2(&self) -> bool {
120        *self == HW1_A::VALUE2
121    }
122    #[doc = "HW1 control path can override the software configuration."]
123    #[inline(always)]
124    pub fn is_value3(&self) -> bool {
125        *self == HW1_A::VALUE3
126    }
127}
128#[doc = "Field `HW1` writer - Port n Pin Hardware Select Bit 1"]
129pub type HW1_W<'a, REG> = crate::FieldWriter<'a, REG, 2, HW1_A>;
130impl<'a, REG> HW1_W<'a, REG>
131where
132    REG: crate::Writable + crate::RegisterSpec,
133    REG::Ux: From<u8>,
134{
135    #[doc = "Software control only."]
136    #[inline(always)]
137    pub fn value1(self) -> &'a mut crate::W<REG> {
138        self.variant(HW1_A::VALUE1)
139    }
140    #[doc = "HW0 control path can override the software configuration."]
141    #[inline(always)]
142    pub fn value2(self) -> &'a mut crate::W<REG> {
143        self.variant(HW1_A::VALUE2)
144    }
145    #[doc = "HW1 control path can override the software configuration."]
146    #[inline(always)]
147    pub fn value3(self) -> &'a mut crate::W<REG> {
148        self.variant(HW1_A::VALUE3)
149    }
150}
151#[doc = "Port n Pin Hardware Select Bit 2\n\nValue on reset: 0"]
152#[derive(Clone, Copy, Debug, PartialEq, Eq)]
153#[repr(u8)]
154pub enum HW2_A {
155    #[doc = "0: Software control only."]
156    VALUE1 = 0,
157    #[doc = "1: HW0 control path can override the software configuration."]
158    VALUE2 = 1,
159    #[doc = "2: HW1 control path can override the software configuration."]
160    VALUE3 = 2,
161}
162impl From<HW2_A> for u8 {
163    #[inline(always)]
164    fn from(variant: HW2_A) -> Self {
165        variant as _
166    }
167}
168impl crate::FieldSpec for HW2_A {
169    type Ux = u8;
170}
171impl crate::IsEnum for HW2_A {}
172#[doc = "Field `HW2` reader - Port n Pin Hardware Select Bit 2"]
173pub type HW2_R = crate::FieldReader<HW2_A>;
174impl HW2_R {
175    #[doc = "Get enumerated values variant"]
176    #[inline(always)]
177    pub const fn variant(&self) -> Option<HW2_A> {
178        match self.bits {
179            0 => Some(HW2_A::VALUE1),
180            1 => Some(HW2_A::VALUE2),
181            2 => Some(HW2_A::VALUE3),
182            _ => None,
183        }
184    }
185    #[doc = "Software control only."]
186    #[inline(always)]
187    pub fn is_value1(&self) -> bool {
188        *self == HW2_A::VALUE1
189    }
190    #[doc = "HW0 control path can override the software configuration."]
191    #[inline(always)]
192    pub fn is_value2(&self) -> bool {
193        *self == HW2_A::VALUE2
194    }
195    #[doc = "HW1 control path can override the software configuration."]
196    #[inline(always)]
197    pub fn is_value3(&self) -> bool {
198        *self == HW2_A::VALUE3
199    }
200}
201#[doc = "Field `HW2` writer - Port n Pin Hardware Select Bit 2"]
202pub type HW2_W<'a, REG> = crate::FieldWriter<'a, REG, 2, HW2_A>;
203impl<'a, REG> HW2_W<'a, REG>
204where
205    REG: crate::Writable + crate::RegisterSpec,
206    REG::Ux: From<u8>,
207{
208    #[doc = "Software control only."]
209    #[inline(always)]
210    pub fn value1(self) -> &'a mut crate::W<REG> {
211        self.variant(HW2_A::VALUE1)
212    }
213    #[doc = "HW0 control path can override the software configuration."]
214    #[inline(always)]
215    pub fn value2(self) -> &'a mut crate::W<REG> {
216        self.variant(HW2_A::VALUE2)
217    }
218    #[doc = "HW1 control path can override the software configuration."]
219    #[inline(always)]
220    pub fn value3(self) -> &'a mut crate::W<REG> {
221        self.variant(HW2_A::VALUE3)
222    }
223}
224#[doc = "Port n Pin Hardware Select Bit 3\n\nValue on reset: 0"]
225#[derive(Clone, Copy, Debug, PartialEq, Eq)]
226#[repr(u8)]
227pub enum HW3_A {
228    #[doc = "0: Software control only."]
229    VALUE1 = 0,
230    #[doc = "1: HW0 control path can override the software configuration."]
231    VALUE2 = 1,
232    #[doc = "2: HW1 control path can override the software configuration."]
233    VALUE3 = 2,
234}
235impl From<HW3_A> for u8 {
236    #[inline(always)]
237    fn from(variant: HW3_A) -> Self {
238        variant as _
239    }
240}
241impl crate::FieldSpec for HW3_A {
242    type Ux = u8;
243}
244impl crate::IsEnum for HW3_A {}
245#[doc = "Field `HW3` reader - Port n Pin Hardware Select Bit 3"]
246pub type HW3_R = crate::FieldReader<HW3_A>;
247impl HW3_R {
248    #[doc = "Get enumerated values variant"]
249    #[inline(always)]
250    pub const fn variant(&self) -> Option<HW3_A> {
251        match self.bits {
252            0 => Some(HW3_A::VALUE1),
253            1 => Some(HW3_A::VALUE2),
254            2 => Some(HW3_A::VALUE3),
255            _ => None,
256        }
257    }
258    #[doc = "Software control only."]
259    #[inline(always)]
260    pub fn is_value1(&self) -> bool {
261        *self == HW3_A::VALUE1
262    }
263    #[doc = "HW0 control path can override the software configuration."]
264    #[inline(always)]
265    pub fn is_value2(&self) -> bool {
266        *self == HW3_A::VALUE2
267    }
268    #[doc = "HW1 control path can override the software configuration."]
269    #[inline(always)]
270    pub fn is_value3(&self) -> bool {
271        *self == HW3_A::VALUE3
272    }
273}
274#[doc = "Field `HW3` writer - Port n Pin Hardware Select Bit 3"]
275pub type HW3_W<'a, REG> = crate::FieldWriter<'a, REG, 2, HW3_A>;
276impl<'a, REG> HW3_W<'a, REG>
277where
278    REG: crate::Writable + crate::RegisterSpec,
279    REG::Ux: From<u8>,
280{
281    #[doc = "Software control only."]
282    #[inline(always)]
283    pub fn value1(self) -> &'a mut crate::W<REG> {
284        self.variant(HW3_A::VALUE1)
285    }
286    #[doc = "HW0 control path can override the software configuration."]
287    #[inline(always)]
288    pub fn value2(self) -> &'a mut crate::W<REG> {
289        self.variant(HW3_A::VALUE2)
290    }
291    #[doc = "HW1 control path can override the software configuration."]
292    #[inline(always)]
293    pub fn value3(self) -> &'a mut crate::W<REG> {
294        self.variant(HW3_A::VALUE3)
295    }
296}
297#[doc = "Port n Pin Hardware Select Bit 4\n\nValue on reset: 0"]
298#[derive(Clone, Copy, Debug, PartialEq, Eq)]
299#[repr(u8)]
300pub enum HW4_A {
301    #[doc = "0: Software control only."]
302    VALUE1 = 0,
303    #[doc = "1: HW0 control path can override the software configuration."]
304    VALUE2 = 1,
305    #[doc = "2: HW1 control path can override the software configuration."]
306    VALUE3 = 2,
307}
308impl From<HW4_A> for u8 {
309    #[inline(always)]
310    fn from(variant: HW4_A) -> Self {
311        variant as _
312    }
313}
314impl crate::FieldSpec for HW4_A {
315    type Ux = u8;
316}
317impl crate::IsEnum for HW4_A {}
318#[doc = "Field `HW4` reader - Port n Pin Hardware Select Bit 4"]
319pub type HW4_R = crate::FieldReader<HW4_A>;
320impl HW4_R {
321    #[doc = "Get enumerated values variant"]
322    #[inline(always)]
323    pub const fn variant(&self) -> Option<HW4_A> {
324        match self.bits {
325            0 => Some(HW4_A::VALUE1),
326            1 => Some(HW4_A::VALUE2),
327            2 => Some(HW4_A::VALUE3),
328            _ => None,
329        }
330    }
331    #[doc = "Software control only."]
332    #[inline(always)]
333    pub fn is_value1(&self) -> bool {
334        *self == HW4_A::VALUE1
335    }
336    #[doc = "HW0 control path can override the software configuration."]
337    #[inline(always)]
338    pub fn is_value2(&self) -> bool {
339        *self == HW4_A::VALUE2
340    }
341    #[doc = "HW1 control path can override the software configuration."]
342    #[inline(always)]
343    pub fn is_value3(&self) -> bool {
344        *self == HW4_A::VALUE3
345    }
346}
347#[doc = "Field `HW4` writer - Port n Pin Hardware Select Bit 4"]
348pub type HW4_W<'a, REG> = crate::FieldWriter<'a, REG, 2, HW4_A>;
349impl<'a, REG> HW4_W<'a, REG>
350where
351    REG: crate::Writable + crate::RegisterSpec,
352    REG::Ux: From<u8>,
353{
354    #[doc = "Software control only."]
355    #[inline(always)]
356    pub fn value1(self) -> &'a mut crate::W<REG> {
357        self.variant(HW4_A::VALUE1)
358    }
359    #[doc = "HW0 control path can override the software configuration."]
360    #[inline(always)]
361    pub fn value2(self) -> &'a mut crate::W<REG> {
362        self.variant(HW4_A::VALUE2)
363    }
364    #[doc = "HW1 control path can override the software configuration."]
365    #[inline(always)]
366    pub fn value3(self) -> &'a mut crate::W<REG> {
367        self.variant(HW4_A::VALUE3)
368    }
369}
370#[doc = "Port n Pin Hardware Select Bit 5\n\nValue on reset: 0"]
371#[derive(Clone, Copy, Debug, PartialEq, Eq)]
372#[repr(u8)]
373pub enum HW5_A {
374    #[doc = "0: Software control only."]
375    VALUE1 = 0,
376    #[doc = "1: HW0 control path can override the software configuration."]
377    VALUE2 = 1,
378    #[doc = "2: HW1 control path can override the software configuration."]
379    VALUE3 = 2,
380}
381impl From<HW5_A> for u8 {
382    #[inline(always)]
383    fn from(variant: HW5_A) -> Self {
384        variant as _
385    }
386}
387impl crate::FieldSpec for HW5_A {
388    type Ux = u8;
389}
390impl crate::IsEnum for HW5_A {}
391#[doc = "Field `HW5` reader - Port n Pin Hardware Select Bit 5"]
392pub type HW5_R = crate::FieldReader<HW5_A>;
393impl HW5_R {
394    #[doc = "Get enumerated values variant"]
395    #[inline(always)]
396    pub const fn variant(&self) -> Option<HW5_A> {
397        match self.bits {
398            0 => Some(HW5_A::VALUE1),
399            1 => Some(HW5_A::VALUE2),
400            2 => Some(HW5_A::VALUE3),
401            _ => None,
402        }
403    }
404    #[doc = "Software control only."]
405    #[inline(always)]
406    pub fn is_value1(&self) -> bool {
407        *self == HW5_A::VALUE1
408    }
409    #[doc = "HW0 control path can override the software configuration."]
410    #[inline(always)]
411    pub fn is_value2(&self) -> bool {
412        *self == HW5_A::VALUE2
413    }
414    #[doc = "HW1 control path can override the software configuration."]
415    #[inline(always)]
416    pub fn is_value3(&self) -> bool {
417        *self == HW5_A::VALUE3
418    }
419}
420#[doc = "Field `HW5` writer - Port n Pin Hardware Select Bit 5"]
421pub type HW5_W<'a, REG> = crate::FieldWriter<'a, REG, 2, HW5_A>;
422impl<'a, REG> HW5_W<'a, REG>
423where
424    REG: crate::Writable + crate::RegisterSpec,
425    REG::Ux: From<u8>,
426{
427    #[doc = "Software control only."]
428    #[inline(always)]
429    pub fn value1(self) -> &'a mut crate::W<REG> {
430        self.variant(HW5_A::VALUE1)
431    }
432    #[doc = "HW0 control path can override the software configuration."]
433    #[inline(always)]
434    pub fn value2(self) -> &'a mut crate::W<REG> {
435        self.variant(HW5_A::VALUE2)
436    }
437    #[doc = "HW1 control path can override the software configuration."]
438    #[inline(always)]
439    pub fn value3(self) -> &'a mut crate::W<REG> {
440        self.variant(HW5_A::VALUE3)
441    }
442}
443#[doc = "Port n Pin Hardware Select Bit 6\n\nValue on reset: 0"]
444#[derive(Clone, Copy, Debug, PartialEq, Eq)]
445#[repr(u8)]
446pub enum HW6_A {
447    #[doc = "0: Software control only."]
448    VALUE1 = 0,
449    #[doc = "1: HW0 control path can override the software configuration."]
450    VALUE2 = 1,
451    #[doc = "2: HW1 control path can override the software configuration."]
452    VALUE3 = 2,
453}
454impl From<HW6_A> for u8 {
455    #[inline(always)]
456    fn from(variant: HW6_A) -> Self {
457        variant as _
458    }
459}
460impl crate::FieldSpec for HW6_A {
461    type Ux = u8;
462}
463impl crate::IsEnum for HW6_A {}
464#[doc = "Field `HW6` reader - Port n Pin Hardware Select Bit 6"]
465pub type HW6_R = crate::FieldReader<HW6_A>;
466impl HW6_R {
467    #[doc = "Get enumerated values variant"]
468    #[inline(always)]
469    pub const fn variant(&self) -> Option<HW6_A> {
470        match self.bits {
471            0 => Some(HW6_A::VALUE1),
472            1 => Some(HW6_A::VALUE2),
473            2 => Some(HW6_A::VALUE3),
474            _ => None,
475        }
476    }
477    #[doc = "Software control only."]
478    #[inline(always)]
479    pub fn is_value1(&self) -> bool {
480        *self == HW6_A::VALUE1
481    }
482    #[doc = "HW0 control path can override the software configuration."]
483    #[inline(always)]
484    pub fn is_value2(&self) -> bool {
485        *self == HW6_A::VALUE2
486    }
487    #[doc = "HW1 control path can override the software configuration."]
488    #[inline(always)]
489    pub fn is_value3(&self) -> bool {
490        *self == HW6_A::VALUE3
491    }
492}
493#[doc = "Field `HW6` writer - Port n Pin Hardware Select Bit 6"]
494pub type HW6_W<'a, REG> = crate::FieldWriter<'a, REG, 2, HW6_A>;
495impl<'a, REG> HW6_W<'a, REG>
496where
497    REG: crate::Writable + crate::RegisterSpec,
498    REG::Ux: From<u8>,
499{
500    #[doc = "Software control only."]
501    #[inline(always)]
502    pub fn value1(self) -> &'a mut crate::W<REG> {
503        self.variant(HW6_A::VALUE1)
504    }
505    #[doc = "HW0 control path can override the software configuration."]
506    #[inline(always)]
507    pub fn value2(self) -> &'a mut crate::W<REG> {
508        self.variant(HW6_A::VALUE2)
509    }
510    #[doc = "HW1 control path can override the software configuration."]
511    #[inline(always)]
512    pub fn value3(self) -> &'a mut crate::W<REG> {
513        self.variant(HW6_A::VALUE3)
514    }
515}
516#[doc = "Port n Pin Hardware Select Bit 7\n\nValue on reset: 0"]
517#[derive(Clone, Copy, Debug, PartialEq, Eq)]
518#[repr(u8)]
519pub enum HW7_A {
520    #[doc = "0: Software control only."]
521    VALUE1 = 0,
522    #[doc = "1: HW0 control path can override the software configuration."]
523    VALUE2 = 1,
524    #[doc = "2: HW1 control path can override the software configuration."]
525    VALUE3 = 2,
526}
527impl From<HW7_A> for u8 {
528    #[inline(always)]
529    fn from(variant: HW7_A) -> Self {
530        variant as _
531    }
532}
533impl crate::FieldSpec for HW7_A {
534    type Ux = u8;
535}
536impl crate::IsEnum for HW7_A {}
537#[doc = "Field `HW7` reader - Port n Pin Hardware Select Bit 7"]
538pub type HW7_R = crate::FieldReader<HW7_A>;
539impl HW7_R {
540    #[doc = "Get enumerated values variant"]
541    #[inline(always)]
542    pub const fn variant(&self) -> Option<HW7_A> {
543        match self.bits {
544            0 => Some(HW7_A::VALUE1),
545            1 => Some(HW7_A::VALUE2),
546            2 => Some(HW7_A::VALUE3),
547            _ => None,
548        }
549    }
550    #[doc = "Software control only."]
551    #[inline(always)]
552    pub fn is_value1(&self) -> bool {
553        *self == HW7_A::VALUE1
554    }
555    #[doc = "HW0 control path can override the software configuration."]
556    #[inline(always)]
557    pub fn is_value2(&self) -> bool {
558        *self == HW7_A::VALUE2
559    }
560    #[doc = "HW1 control path can override the software configuration."]
561    #[inline(always)]
562    pub fn is_value3(&self) -> bool {
563        *self == HW7_A::VALUE3
564    }
565}
566#[doc = "Field `HW7` writer - Port n Pin Hardware Select Bit 7"]
567pub type HW7_W<'a, REG> = crate::FieldWriter<'a, REG, 2, HW7_A>;
568impl<'a, REG> HW7_W<'a, REG>
569where
570    REG: crate::Writable + crate::RegisterSpec,
571    REG::Ux: From<u8>,
572{
573    #[doc = "Software control only."]
574    #[inline(always)]
575    pub fn value1(self) -> &'a mut crate::W<REG> {
576        self.variant(HW7_A::VALUE1)
577    }
578    #[doc = "HW0 control path can override the software configuration."]
579    #[inline(always)]
580    pub fn value2(self) -> &'a mut crate::W<REG> {
581        self.variant(HW7_A::VALUE2)
582    }
583    #[doc = "HW1 control path can override the software configuration."]
584    #[inline(always)]
585    pub fn value3(self) -> &'a mut crate::W<REG> {
586        self.variant(HW7_A::VALUE3)
587    }
588}
589#[doc = "Port n Pin Hardware Select Bit 8\n\nValue on reset: 0"]
590#[derive(Clone, Copy, Debug, PartialEq, Eq)]
591#[repr(u8)]
592pub enum HW8_A {
593    #[doc = "0: Software control only."]
594    VALUE1 = 0,
595    #[doc = "1: HW0 control path can override the software configuration."]
596    VALUE2 = 1,
597    #[doc = "2: HW1 control path can override the software configuration."]
598    VALUE3 = 2,
599}
600impl From<HW8_A> for u8 {
601    #[inline(always)]
602    fn from(variant: HW8_A) -> Self {
603        variant as _
604    }
605}
606impl crate::FieldSpec for HW8_A {
607    type Ux = u8;
608}
609impl crate::IsEnum for HW8_A {}
610#[doc = "Field `HW8` reader - Port n Pin Hardware Select Bit 8"]
611pub type HW8_R = crate::FieldReader<HW8_A>;
612impl HW8_R {
613    #[doc = "Get enumerated values variant"]
614    #[inline(always)]
615    pub const fn variant(&self) -> Option<HW8_A> {
616        match self.bits {
617            0 => Some(HW8_A::VALUE1),
618            1 => Some(HW8_A::VALUE2),
619            2 => Some(HW8_A::VALUE3),
620            _ => None,
621        }
622    }
623    #[doc = "Software control only."]
624    #[inline(always)]
625    pub fn is_value1(&self) -> bool {
626        *self == HW8_A::VALUE1
627    }
628    #[doc = "HW0 control path can override the software configuration."]
629    #[inline(always)]
630    pub fn is_value2(&self) -> bool {
631        *self == HW8_A::VALUE2
632    }
633    #[doc = "HW1 control path can override the software configuration."]
634    #[inline(always)]
635    pub fn is_value3(&self) -> bool {
636        *self == HW8_A::VALUE3
637    }
638}
639#[doc = "Field `HW8` writer - Port n Pin Hardware Select Bit 8"]
640pub type HW8_W<'a, REG> = crate::FieldWriter<'a, REG, 2, HW8_A>;
641impl<'a, REG> HW8_W<'a, REG>
642where
643    REG: crate::Writable + crate::RegisterSpec,
644    REG::Ux: From<u8>,
645{
646    #[doc = "Software control only."]
647    #[inline(always)]
648    pub fn value1(self) -> &'a mut crate::W<REG> {
649        self.variant(HW8_A::VALUE1)
650    }
651    #[doc = "HW0 control path can override the software configuration."]
652    #[inline(always)]
653    pub fn value2(self) -> &'a mut crate::W<REG> {
654        self.variant(HW8_A::VALUE2)
655    }
656    #[doc = "HW1 control path can override the software configuration."]
657    #[inline(always)]
658    pub fn value3(self) -> &'a mut crate::W<REG> {
659        self.variant(HW8_A::VALUE3)
660    }
661}
662#[doc = "Port n Pin Hardware Select Bit 9\n\nValue on reset: 0"]
663#[derive(Clone, Copy, Debug, PartialEq, Eq)]
664#[repr(u8)]
665pub enum HW9_A {
666    #[doc = "0: Software control only."]
667    VALUE1 = 0,
668    #[doc = "1: HW0 control path can override the software configuration."]
669    VALUE2 = 1,
670    #[doc = "2: HW1 control path can override the software configuration."]
671    VALUE3 = 2,
672}
673impl From<HW9_A> for u8 {
674    #[inline(always)]
675    fn from(variant: HW9_A) -> Self {
676        variant as _
677    }
678}
679impl crate::FieldSpec for HW9_A {
680    type Ux = u8;
681}
682impl crate::IsEnum for HW9_A {}
683#[doc = "Field `HW9` reader - Port n Pin Hardware Select Bit 9"]
684pub type HW9_R = crate::FieldReader<HW9_A>;
685impl HW9_R {
686    #[doc = "Get enumerated values variant"]
687    #[inline(always)]
688    pub const fn variant(&self) -> Option<HW9_A> {
689        match self.bits {
690            0 => Some(HW9_A::VALUE1),
691            1 => Some(HW9_A::VALUE2),
692            2 => Some(HW9_A::VALUE3),
693            _ => None,
694        }
695    }
696    #[doc = "Software control only."]
697    #[inline(always)]
698    pub fn is_value1(&self) -> bool {
699        *self == HW9_A::VALUE1
700    }
701    #[doc = "HW0 control path can override the software configuration."]
702    #[inline(always)]
703    pub fn is_value2(&self) -> bool {
704        *self == HW9_A::VALUE2
705    }
706    #[doc = "HW1 control path can override the software configuration."]
707    #[inline(always)]
708    pub fn is_value3(&self) -> bool {
709        *self == HW9_A::VALUE3
710    }
711}
712#[doc = "Field `HW9` writer - Port n Pin Hardware Select Bit 9"]
713pub type HW9_W<'a, REG> = crate::FieldWriter<'a, REG, 2, HW9_A>;
714impl<'a, REG> HW9_W<'a, REG>
715where
716    REG: crate::Writable + crate::RegisterSpec,
717    REG::Ux: From<u8>,
718{
719    #[doc = "Software control only."]
720    #[inline(always)]
721    pub fn value1(self) -> &'a mut crate::W<REG> {
722        self.variant(HW9_A::VALUE1)
723    }
724    #[doc = "HW0 control path can override the software configuration."]
725    #[inline(always)]
726    pub fn value2(self) -> &'a mut crate::W<REG> {
727        self.variant(HW9_A::VALUE2)
728    }
729    #[doc = "HW1 control path can override the software configuration."]
730    #[inline(always)]
731    pub fn value3(self) -> &'a mut crate::W<REG> {
732        self.variant(HW9_A::VALUE3)
733    }
734}
735#[doc = "Port n Pin Hardware Select Bit 10\n\nValue on reset: 0"]
736#[derive(Clone, Copy, Debug, PartialEq, Eq)]
737#[repr(u8)]
738pub enum HW10_A {
739    #[doc = "0: Software control only."]
740    VALUE1 = 0,
741    #[doc = "1: HW0 control path can override the software configuration."]
742    VALUE2 = 1,
743    #[doc = "2: HW1 control path can override the software configuration."]
744    VALUE3 = 2,
745}
746impl From<HW10_A> for u8 {
747    #[inline(always)]
748    fn from(variant: HW10_A) -> Self {
749        variant as _
750    }
751}
752impl crate::FieldSpec for HW10_A {
753    type Ux = u8;
754}
755impl crate::IsEnum for HW10_A {}
756#[doc = "Field `HW10` reader - Port n Pin Hardware Select Bit 10"]
757pub type HW10_R = crate::FieldReader<HW10_A>;
758impl HW10_R {
759    #[doc = "Get enumerated values variant"]
760    #[inline(always)]
761    pub const fn variant(&self) -> Option<HW10_A> {
762        match self.bits {
763            0 => Some(HW10_A::VALUE1),
764            1 => Some(HW10_A::VALUE2),
765            2 => Some(HW10_A::VALUE3),
766            _ => None,
767        }
768    }
769    #[doc = "Software control only."]
770    #[inline(always)]
771    pub fn is_value1(&self) -> bool {
772        *self == HW10_A::VALUE1
773    }
774    #[doc = "HW0 control path can override the software configuration."]
775    #[inline(always)]
776    pub fn is_value2(&self) -> bool {
777        *self == HW10_A::VALUE2
778    }
779    #[doc = "HW1 control path can override the software configuration."]
780    #[inline(always)]
781    pub fn is_value3(&self) -> bool {
782        *self == HW10_A::VALUE3
783    }
784}
785#[doc = "Field `HW10` writer - Port n Pin Hardware Select Bit 10"]
786pub type HW10_W<'a, REG> = crate::FieldWriter<'a, REG, 2, HW10_A>;
787impl<'a, REG> HW10_W<'a, REG>
788where
789    REG: crate::Writable + crate::RegisterSpec,
790    REG::Ux: From<u8>,
791{
792    #[doc = "Software control only."]
793    #[inline(always)]
794    pub fn value1(self) -> &'a mut crate::W<REG> {
795        self.variant(HW10_A::VALUE1)
796    }
797    #[doc = "HW0 control path can override the software configuration."]
798    #[inline(always)]
799    pub fn value2(self) -> &'a mut crate::W<REG> {
800        self.variant(HW10_A::VALUE2)
801    }
802    #[doc = "HW1 control path can override the software configuration."]
803    #[inline(always)]
804    pub fn value3(self) -> &'a mut crate::W<REG> {
805        self.variant(HW10_A::VALUE3)
806    }
807}
808#[doc = "Port n Pin Hardware Select Bit 11\n\nValue on reset: 0"]
809#[derive(Clone, Copy, Debug, PartialEq, Eq)]
810#[repr(u8)]
811pub enum HW11_A {
812    #[doc = "0: Software control only."]
813    VALUE1 = 0,
814    #[doc = "1: HW0 control path can override the software configuration."]
815    VALUE2 = 1,
816    #[doc = "2: HW1 control path can override the software configuration."]
817    VALUE3 = 2,
818}
819impl From<HW11_A> for u8 {
820    #[inline(always)]
821    fn from(variant: HW11_A) -> Self {
822        variant as _
823    }
824}
825impl crate::FieldSpec for HW11_A {
826    type Ux = u8;
827}
828impl crate::IsEnum for HW11_A {}
829#[doc = "Field `HW11` reader - Port n Pin Hardware Select Bit 11"]
830pub type HW11_R = crate::FieldReader<HW11_A>;
831impl HW11_R {
832    #[doc = "Get enumerated values variant"]
833    #[inline(always)]
834    pub const fn variant(&self) -> Option<HW11_A> {
835        match self.bits {
836            0 => Some(HW11_A::VALUE1),
837            1 => Some(HW11_A::VALUE2),
838            2 => Some(HW11_A::VALUE3),
839            _ => None,
840        }
841    }
842    #[doc = "Software control only."]
843    #[inline(always)]
844    pub fn is_value1(&self) -> bool {
845        *self == HW11_A::VALUE1
846    }
847    #[doc = "HW0 control path can override the software configuration."]
848    #[inline(always)]
849    pub fn is_value2(&self) -> bool {
850        *self == HW11_A::VALUE2
851    }
852    #[doc = "HW1 control path can override the software configuration."]
853    #[inline(always)]
854    pub fn is_value3(&self) -> bool {
855        *self == HW11_A::VALUE3
856    }
857}
858#[doc = "Field `HW11` writer - Port n Pin Hardware Select Bit 11"]
859pub type HW11_W<'a, REG> = crate::FieldWriter<'a, REG, 2, HW11_A>;
860impl<'a, REG> HW11_W<'a, REG>
861where
862    REG: crate::Writable + crate::RegisterSpec,
863    REG::Ux: From<u8>,
864{
865    #[doc = "Software control only."]
866    #[inline(always)]
867    pub fn value1(self) -> &'a mut crate::W<REG> {
868        self.variant(HW11_A::VALUE1)
869    }
870    #[doc = "HW0 control path can override the software configuration."]
871    #[inline(always)]
872    pub fn value2(self) -> &'a mut crate::W<REG> {
873        self.variant(HW11_A::VALUE2)
874    }
875    #[doc = "HW1 control path can override the software configuration."]
876    #[inline(always)]
877    pub fn value3(self) -> &'a mut crate::W<REG> {
878        self.variant(HW11_A::VALUE3)
879    }
880}
881#[doc = "Port n Pin Hardware Select Bit 12\n\nValue on reset: 0"]
882#[derive(Clone, Copy, Debug, PartialEq, Eq)]
883#[repr(u8)]
884pub enum HW12_A {
885    #[doc = "0: Software control only."]
886    VALUE1 = 0,
887    #[doc = "1: HW0 control path can override the software configuration."]
888    VALUE2 = 1,
889    #[doc = "2: HW1 control path can override the software configuration."]
890    VALUE3 = 2,
891}
892impl From<HW12_A> for u8 {
893    #[inline(always)]
894    fn from(variant: HW12_A) -> Self {
895        variant as _
896    }
897}
898impl crate::FieldSpec for HW12_A {
899    type Ux = u8;
900}
901impl crate::IsEnum for HW12_A {}
902#[doc = "Field `HW12` reader - Port n Pin Hardware Select Bit 12"]
903pub type HW12_R = crate::FieldReader<HW12_A>;
904impl HW12_R {
905    #[doc = "Get enumerated values variant"]
906    #[inline(always)]
907    pub const fn variant(&self) -> Option<HW12_A> {
908        match self.bits {
909            0 => Some(HW12_A::VALUE1),
910            1 => Some(HW12_A::VALUE2),
911            2 => Some(HW12_A::VALUE3),
912            _ => None,
913        }
914    }
915    #[doc = "Software control only."]
916    #[inline(always)]
917    pub fn is_value1(&self) -> bool {
918        *self == HW12_A::VALUE1
919    }
920    #[doc = "HW0 control path can override the software configuration."]
921    #[inline(always)]
922    pub fn is_value2(&self) -> bool {
923        *self == HW12_A::VALUE2
924    }
925    #[doc = "HW1 control path can override the software configuration."]
926    #[inline(always)]
927    pub fn is_value3(&self) -> bool {
928        *self == HW12_A::VALUE3
929    }
930}
931#[doc = "Field `HW12` writer - Port n Pin Hardware Select Bit 12"]
932pub type HW12_W<'a, REG> = crate::FieldWriter<'a, REG, 2, HW12_A>;
933impl<'a, REG> HW12_W<'a, REG>
934where
935    REG: crate::Writable + crate::RegisterSpec,
936    REG::Ux: From<u8>,
937{
938    #[doc = "Software control only."]
939    #[inline(always)]
940    pub fn value1(self) -> &'a mut crate::W<REG> {
941        self.variant(HW12_A::VALUE1)
942    }
943    #[doc = "HW0 control path can override the software configuration."]
944    #[inline(always)]
945    pub fn value2(self) -> &'a mut crate::W<REG> {
946        self.variant(HW12_A::VALUE2)
947    }
948    #[doc = "HW1 control path can override the software configuration."]
949    #[inline(always)]
950    pub fn value3(self) -> &'a mut crate::W<REG> {
951        self.variant(HW12_A::VALUE3)
952    }
953}
954#[doc = "Port n Pin Hardware Select Bit 13\n\nValue on reset: 0"]
955#[derive(Clone, Copy, Debug, PartialEq, Eq)]
956#[repr(u8)]
957pub enum HW13_A {
958    #[doc = "0: Software control only."]
959    VALUE1 = 0,
960    #[doc = "1: HW0 control path can override the software configuration."]
961    VALUE2 = 1,
962    #[doc = "2: HW1 control path can override the software configuration."]
963    VALUE3 = 2,
964}
965impl From<HW13_A> for u8 {
966    #[inline(always)]
967    fn from(variant: HW13_A) -> Self {
968        variant as _
969    }
970}
971impl crate::FieldSpec for HW13_A {
972    type Ux = u8;
973}
974impl crate::IsEnum for HW13_A {}
975#[doc = "Field `HW13` reader - Port n Pin Hardware Select Bit 13"]
976pub type HW13_R = crate::FieldReader<HW13_A>;
977impl HW13_R {
978    #[doc = "Get enumerated values variant"]
979    #[inline(always)]
980    pub const fn variant(&self) -> Option<HW13_A> {
981        match self.bits {
982            0 => Some(HW13_A::VALUE1),
983            1 => Some(HW13_A::VALUE2),
984            2 => Some(HW13_A::VALUE3),
985            _ => None,
986        }
987    }
988    #[doc = "Software control only."]
989    #[inline(always)]
990    pub fn is_value1(&self) -> bool {
991        *self == HW13_A::VALUE1
992    }
993    #[doc = "HW0 control path can override the software configuration."]
994    #[inline(always)]
995    pub fn is_value2(&self) -> bool {
996        *self == HW13_A::VALUE2
997    }
998    #[doc = "HW1 control path can override the software configuration."]
999    #[inline(always)]
1000    pub fn is_value3(&self) -> bool {
1001        *self == HW13_A::VALUE3
1002    }
1003}
1004#[doc = "Field `HW13` writer - Port n Pin Hardware Select Bit 13"]
1005pub type HW13_W<'a, REG> = crate::FieldWriter<'a, REG, 2, HW13_A>;
1006impl<'a, REG> HW13_W<'a, REG>
1007where
1008    REG: crate::Writable + crate::RegisterSpec,
1009    REG::Ux: From<u8>,
1010{
1011    #[doc = "Software control only."]
1012    #[inline(always)]
1013    pub fn value1(self) -> &'a mut crate::W<REG> {
1014        self.variant(HW13_A::VALUE1)
1015    }
1016    #[doc = "HW0 control path can override the software configuration."]
1017    #[inline(always)]
1018    pub fn value2(self) -> &'a mut crate::W<REG> {
1019        self.variant(HW13_A::VALUE2)
1020    }
1021    #[doc = "HW1 control path can override the software configuration."]
1022    #[inline(always)]
1023    pub fn value3(self) -> &'a mut crate::W<REG> {
1024        self.variant(HW13_A::VALUE3)
1025    }
1026}
1027#[doc = "Port n Pin Hardware Select Bit 14\n\nValue on reset: 0"]
1028#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1029#[repr(u8)]
1030pub enum HW14_A {
1031    #[doc = "0: Software control only."]
1032    VALUE1 = 0,
1033    #[doc = "1: HW0 control path can override the software configuration."]
1034    VALUE2 = 1,
1035    #[doc = "2: HW1 control path can override the software configuration."]
1036    VALUE3 = 2,
1037}
1038impl From<HW14_A> for u8 {
1039    #[inline(always)]
1040    fn from(variant: HW14_A) -> Self {
1041        variant as _
1042    }
1043}
1044impl crate::FieldSpec for HW14_A {
1045    type Ux = u8;
1046}
1047impl crate::IsEnum for HW14_A {}
1048#[doc = "Field `HW14` reader - Port n Pin Hardware Select Bit 14"]
1049pub type HW14_R = crate::FieldReader<HW14_A>;
1050impl HW14_R {
1051    #[doc = "Get enumerated values variant"]
1052    #[inline(always)]
1053    pub const fn variant(&self) -> Option<HW14_A> {
1054        match self.bits {
1055            0 => Some(HW14_A::VALUE1),
1056            1 => Some(HW14_A::VALUE2),
1057            2 => Some(HW14_A::VALUE3),
1058            _ => None,
1059        }
1060    }
1061    #[doc = "Software control only."]
1062    #[inline(always)]
1063    pub fn is_value1(&self) -> bool {
1064        *self == HW14_A::VALUE1
1065    }
1066    #[doc = "HW0 control path can override the software configuration."]
1067    #[inline(always)]
1068    pub fn is_value2(&self) -> bool {
1069        *self == HW14_A::VALUE2
1070    }
1071    #[doc = "HW1 control path can override the software configuration."]
1072    #[inline(always)]
1073    pub fn is_value3(&self) -> bool {
1074        *self == HW14_A::VALUE3
1075    }
1076}
1077#[doc = "Field `HW14` writer - Port n Pin Hardware Select Bit 14"]
1078pub type HW14_W<'a, REG> = crate::FieldWriter<'a, REG, 2, HW14_A>;
1079impl<'a, REG> HW14_W<'a, REG>
1080where
1081    REG: crate::Writable + crate::RegisterSpec,
1082    REG::Ux: From<u8>,
1083{
1084    #[doc = "Software control only."]
1085    #[inline(always)]
1086    pub fn value1(self) -> &'a mut crate::W<REG> {
1087        self.variant(HW14_A::VALUE1)
1088    }
1089    #[doc = "HW0 control path can override the software configuration."]
1090    #[inline(always)]
1091    pub fn value2(self) -> &'a mut crate::W<REG> {
1092        self.variant(HW14_A::VALUE2)
1093    }
1094    #[doc = "HW1 control path can override the software configuration."]
1095    #[inline(always)]
1096    pub fn value3(self) -> &'a mut crate::W<REG> {
1097        self.variant(HW14_A::VALUE3)
1098    }
1099}
1100#[doc = "Port n Pin Hardware Select Bit 15\n\nValue on reset: 0"]
1101#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1102#[repr(u8)]
1103pub enum HW15_A {
1104    #[doc = "0: Software control only."]
1105    VALUE1 = 0,
1106    #[doc = "1: HW0 control path can override the software configuration."]
1107    VALUE2 = 1,
1108    #[doc = "2: HW1 control path can override the software configuration."]
1109    VALUE3 = 2,
1110}
1111impl From<HW15_A> for u8 {
1112    #[inline(always)]
1113    fn from(variant: HW15_A) -> Self {
1114        variant as _
1115    }
1116}
1117impl crate::FieldSpec for HW15_A {
1118    type Ux = u8;
1119}
1120impl crate::IsEnum for HW15_A {}
1121#[doc = "Field `HW15` reader - Port n Pin Hardware Select Bit 15"]
1122pub type HW15_R = crate::FieldReader<HW15_A>;
1123impl HW15_R {
1124    #[doc = "Get enumerated values variant"]
1125    #[inline(always)]
1126    pub const fn variant(&self) -> Option<HW15_A> {
1127        match self.bits {
1128            0 => Some(HW15_A::VALUE1),
1129            1 => Some(HW15_A::VALUE2),
1130            2 => Some(HW15_A::VALUE3),
1131            _ => None,
1132        }
1133    }
1134    #[doc = "Software control only."]
1135    #[inline(always)]
1136    pub fn is_value1(&self) -> bool {
1137        *self == HW15_A::VALUE1
1138    }
1139    #[doc = "HW0 control path can override the software configuration."]
1140    #[inline(always)]
1141    pub fn is_value2(&self) -> bool {
1142        *self == HW15_A::VALUE2
1143    }
1144    #[doc = "HW1 control path can override the software configuration."]
1145    #[inline(always)]
1146    pub fn is_value3(&self) -> bool {
1147        *self == HW15_A::VALUE3
1148    }
1149}
1150#[doc = "Field `HW15` writer - Port n Pin Hardware Select Bit 15"]
1151pub type HW15_W<'a, REG> = crate::FieldWriter<'a, REG, 2, HW15_A>;
1152impl<'a, REG> HW15_W<'a, REG>
1153where
1154    REG: crate::Writable + crate::RegisterSpec,
1155    REG::Ux: From<u8>,
1156{
1157    #[doc = "Software control only."]
1158    #[inline(always)]
1159    pub fn value1(self) -> &'a mut crate::W<REG> {
1160        self.variant(HW15_A::VALUE1)
1161    }
1162    #[doc = "HW0 control path can override the software configuration."]
1163    #[inline(always)]
1164    pub fn value2(self) -> &'a mut crate::W<REG> {
1165        self.variant(HW15_A::VALUE2)
1166    }
1167    #[doc = "HW1 control path can override the software configuration."]
1168    #[inline(always)]
1169    pub fn value3(self) -> &'a mut crate::W<REG> {
1170        self.variant(HW15_A::VALUE3)
1171    }
1172}
1173impl R {
1174    #[doc = "Bits 0:1 - Port n Pin Hardware Select Bit 0"]
1175    #[inline(always)]
1176    pub fn hw0(&self) -> HW0_R {
1177        HW0_R::new((self.bits & 3) as u8)
1178    }
1179    #[doc = "Bits 2:3 - Port n Pin Hardware Select Bit 1"]
1180    #[inline(always)]
1181    pub fn hw1(&self) -> HW1_R {
1182        HW1_R::new(((self.bits >> 2) & 3) as u8)
1183    }
1184    #[doc = "Bits 4:5 - Port n Pin Hardware Select Bit 2"]
1185    #[inline(always)]
1186    pub fn hw2(&self) -> HW2_R {
1187        HW2_R::new(((self.bits >> 4) & 3) as u8)
1188    }
1189    #[doc = "Bits 6:7 - Port n Pin Hardware Select Bit 3"]
1190    #[inline(always)]
1191    pub fn hw3(&self) -> HW3_R {
1192        HW3_R::new(((self.bits >> 6) & 3) as u8)
1193    }
1194    #[doc = "Bits 8:9 - Port n Pin Hardware Select Bit 4"]
1195    #[inline(always)]
1196    pub fn hw4(&self) -> HW4_R {
1197        HW4_R::new(((self.bits >> 8) & 3) as u8)
1198    }
1199    #[doc = "Bits 10:11 - Port n Pin Hardware Select Bit 5"]
1200    #[inline(always)]
1201    pub fn hw5(&self) -> HW5_R {
1202        HW5_R::new(((self.bits >> 10) & 3) as u8)
1203    }
1204    #[doc = "Bits 12:13 - Port n Pin Hardware Select Bit 6"]
1205    #[inline(always)]
1206    pub fn hw6(&self) -> HW6_R {
1207        HW6_R::new(((self.bits >> 12) & 3) as u8)
1208    }
1209    #[doc = "Bits 14:15 - Port n Pin Hardware Select Bit 7"]
1210    #[inline(always)]
1211    pub fn hw7(&self) -> HW7_R {
1212        HW7_R::new(((self.bits >> 14) & 3) as u8)
1213    }
1214    #[doc = "Bits 16:17 - Port n Pin Hardware Select Bit 8"]
1215    #[inline(always)]
1216    pub fn hw8(&self) -> HW8_R {
1217        HW8_R::new(((self.bits >> 16) & 3) as u8)
1218    }
1219    #[doc = "Bits 18:19 - Port n Pin Hardware Select Bit 9"]
1220    #[inline(always)]
1221    pub fn hw9(&self) -> HW9_R {
1222        HW9_R::new(((self.bits >> 18) & 3) as u8)
1223    }
1224    #[doc = "Bits 20:21 - Port n Pin Hardware Select Bit 10"]
1225    #[inline(always)]
1226    pub fn hw10(&self) -> HW10_R {
1227        HW10_R::new(((self.bits >> 20) & 3) as u8)
1228    }
1229    #[doc = "Bits 22:23 - Port n Pin Hardware Select Bit 11"]
1230    #[inline(always)]
1231    pub fn hw11(&self) -> HW11_R {
1232        HW11_R::new(((self.bits >> 22) & 3) as u8)
1233    }
1234    #[doc = "Bits 24:25 - Port n Pin Hardware Select Bit 12"]
1235    #[inline(always)]
1236    pub fn hw12(&self) -> HW12_R {
1237        HW12_R::new(((self.bits >> 24) & 3) as u8)
1238    }
1239    #[doc = "Bits 26:27 - Port n Pin Hardware Select Bit 13"]
1240    #[inline(always)]
1241    pub fn hw13(&self) -> HW13_R {
1242        HW13_R::new(((self.bits >> 26) & 3) as u8)
1243    }
1244    #[doc = "Bits 28:29 - Port n Pin Hardware Select Bit 14"]
1245    #[inline(always)]
1246    pub fn hw14(&self) -> HW14_R {
1247        HW14_R::new(((self.bits >> 28) & 3) as u8)
1248    }
1249    #[doc = "Bits 30:31 - Port n Pin Hardware Select Bit 15"]
1250    #[inline(always)]
1251    pub fn hw15(&self) -> HW15_R {
1252        HW15_R::new(((self.bits >> 30) & 3) as u8)
1253    }
1254}
1255impl W {
1256    #[doc = "Bits 0:1 - Port n Pin Hardware Select Bit 0"]
1257    #[inline(always)]
1258    pub fn hw0(&mut self) -> HW0_W<HWSEL_SPEC> {
1259        HW0_W::new(self, 0)
1260    }
1261    #[doc = "Bits 2:3 - Port n Pin Hardware Select Bit 1"]
1262    #[inline(always)]
1263    pub fn hw1(&mut self) -> HW1_W<HWSEL_SPEC> {
1264        HW1_W::new(self, 2)
1265    }
1266    #[doc = "Bits 4:5 - Port n Pin Hardware Select Bit 2"]
1267    #[inline(always)]
1268    pub fn hw2(&mut self) -> HW2_W<HWSEL_SPEC> {
1269        HW2_W::new(self, 4)
1270    }
1271    #[doc = "Bits 6:7 - Port n Pin Hardware Select Bit 3"]
1272    #[inline(always)]
1273    pub fn hw3(&mut self) -> HW3_W<HWSEL_SPEC> {
1274        HW3_W::new(self, 6)
1275    }
1276    #[doc = "Bits 8:9 - Port n Pin Hardware Select Bit 4"]
1277    #[inline(always)]
1278    pub fn hw4(&mut self) -> HW4_W<HWSEL_SPEC> {
1279        HW4_W::new(self, 8)
1280    }
1281    #[doc = "Bits 10:11 - Port n Pin Hardware Select Bit 5"]
1282    #[inline(always)]
1283    pub fn hw5(&mut self) -> HW5_W<HWSEL_SPEC> {
1284        HW5_W::new(self, 10)
1285    }
1286    #[doc = "Bits 12:13 - Port n Pin Hardware Select Bit 6"]
1287    #[inline(always)]
1288    pub fn hw6(&mut self) -> HW6_W<HWSEL_SPEC> {
1289        HW6_W::new(self, 12)
1290    }
1291    #[doc = "Bits 14:15 - Port n Pin Hardware Select Bit 7"]
1292    #[inline(always)]
1293    pub fn hw7(&mut self) -> HW7_W<HWSEL_SPEC> {
1294        HW7_W::new(self, 14)
1295    }
1296    #[doc = "Bits 16:17 - Port n Pin Hardware Select Bit 8"]
1297    #[inline(always)]
1298    pub fn hw8(&mut self) -> HW8_W<HWSEL_SPEC> {
1299        HW8_W::new(self, 16)
1300    }
1301    #[doc = "Bits 18:19 - Port n Pin Hardware Select Bit 9"]
1302    #[inline(always)]
1303    pub fn hw9(&mut self) -> HW9_W<HWSEL_SPEC> {
1304        HW9_W::new(self, 18)
1305    }
1306    #[doc = "Bits 20:21 - Port n Pin Hardware Select Bit 10"]
1307    #[inline(always)]
1308    pub fn hw10(&mut self) -> HW10_W<HWSEL_SPEC> {
1309        HW10_W::new(self, 20)
1310    }
1311    #[doc = "Bits 22:23 - Port n Pin Hardware Select Bit 11"]
1312    #[inline(always)]
1313    pub fn hw11(&mut self) -> HW11_W<HWSEL_SPEC> {
1314        HW11_W::new(self, 22)
1315    }
1316    #[doc = "Bits 24:25 - Port n Pin Hardware Select Bit 12"]
1317    #[inline(always)]
1318    pub fn hw12(&mut self) -> HW12_W<HWSEL_SPEC> {
1319        HW12_W::new(self, 24)
1320    }
1321    #[doc = "Bits 26:27 - Port n Pin Hardware Select Bit 13"]
1322    #[inline(always)]
1323    pub fn hw13(&mut self) -> HW13_W<HWSEL_SPEC> {
1324        HW13_W::new(self, 26)
1325    }
1326    #[doc = "Bits 28:29 - Port n Pin Hardware Select Bit 14"]
1327    #[inline(always)]
1328    pub fn hw14(&mut self) -> HW14_W<HWSEL_SPEC> {
1329        HW14_W::new(self, 28)
1330    }
1331    #[doc = "Bits 30:31 - Port n Pin Hardware Select Bit 15"]
1332    #[inline(always)]
1333    pub fn hw15(&mut self) -> HW15_W<HWSEL_SPEC> {
1334        HW15_W::new(self, 30)
1335    }
1336}
1337#[doc = "Port 14 Pin Hardware Select Register\n\nYou can [`read`](crate::Reg::read) this register and get [`hwsel::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`hwsel::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
1338pub struct HWSEL_SPEC;
1339impl crate::RegisterSpec for HWSEL_SPEC {
1340    type Ux = u32;
1341}
1342#[doc = "`read()` method returns [`hwsel::R`](R) reader structure"]
1343impl crate::Readable for HWSEL_SPEC {}
1344#[doc = "`write(|w| ..)` method takes [`hwsel::W`](W) writer structure"]
1345impl crate::Writable for HWSEL_SPEC {
1346    type Safety = crate::Unsafe;
1347    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
1348    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
1349}
1350#[doc = "`reset()` method sets HWSEL to value 0"]
1351impl crate::Resettable for HWSEL_SPEC {
1352    const RESET_VALUE: u32 = 0;
1353}