1#[doc = "Register `IOCR4` reader"]
2pub type R = crate::R<IOCR4_SPEC>;
3#[doc = "Register `IOCR4` writer"]
4pub type W = crate::W<IOCR4_SPEC>;
5#[doc = "Port Control for Port n Pin 4 to 7\n\nValue on reset: 0"]
6#[derive(Clone, Copy, Debug, PartialEq, Eq)]
7#[repr(u8)]
8pub enum PC4_A {
9 #[doc = "0: Input - No internal pull device active"]
10 VALUE1 = 0,
11 #[doc = "1: Input - Internal pull-down device active"]
12 VALUE2 = 1,
13 #[doc = "2: Input - Internal pull-up device active"]
14 VALUE3 = 2,
15 #[doc = "3: Input - No internal pull device, Pn_OUTx = input value"]
16 VALUE4 = 3,
17 #[doc = "4: Input inverted - No internal pull device active"]
18 VALUE5 = 4,
19 #[doc = "5: Input inverted - Internal pull-down device active"]
20 VALUE6 = 5,
21 #[doc = "6: Input inverted - Internal pull-up device active"]
22 VALUE7 = 6,
23 #[doc = "7: Input inverted - No internal pull device, Pn_OUTx = input value"]
24 VALUE8 = 7,
25 #[doc = "16: Output Push-Pull - General-purpose output"]
26 VALUE9 = 16,
27 #[doc = "17: Output Push-Pull - Alternate output function 1"]
28 VALUE10 = 17,
29 #[doc = "18: Output Push-Pull - Alternate output function 2"]
30 VALUE11 = 18,
31 #[doc = "19: Output Push-Pull - Alternate output function 3"]
32 VALUE12 = 19,
33 #[doc = "20: Output Push-Pull - Alternate output function 4"]
34 VALUE13 = 20,
35 #[doc = "24: Output Open Drain - General-purpose output"]
36 VALUE14 = 24,
37 #[doc = "25: Output Open Drain - Alternate output function 1"]
38 VALUE15 = 25,
39 #[doc = "26: Output Open Drain - Alternate output function 2"]
40 VALUE16 = 26,
41 #[doc = "27: Output Open Drain - Alternate output function 3"]
42 VALUE17 = 27,
43 #[doc = "28: Output Open Drain - Alternate output function 4"]
44 VALUE18 = 28,
45}
46impl From<PC4_A> for u8 {
47 #[inline(always)]
48 fn from(variant: PC4_A) -> Self {
49 variant as _
50 }
51}
52impl crate::FieldSpec for PC4_A {
53 type Ux = u8;
54}
55impl crate::IsEnum for PC4_A {}
56#[doc = "Field `PC4` reader - Port Control for Port n Pin 4 to 7"]
57pub type PC4_R = crate::FieldReader<PC4_A>;
58impl PC4_R {
59 #[doc = "Get enumerated values variant"]
60 #[inline(always)]
61 pub const fn variant(&self) -> Option<PC4_A> {
62 match self.bits {
63 0 => Some(PC4_A::VALUE1),
64 1 => Some(PC4_A::VALUE2),
65 2 => Some(PC4_A::VALUE3),
66 3 => Some(PC4_A::VALUE4),
67 4 => Some(PC4_A::VALUE5),
68 5 => Some(PC4_A::VALUE6),
69 6 => Some(PC4_A::VALUE7),
70 7 => Some(PC4_A::VALUE8),
71 16 => Some(PC4_A::VALUE9),
72 17 => Some(PC4_A::VALUE10),
73 18 => Some(PC4_A::VALUE11),
74 19 => Some(PC4_A::VALUE12),
75 20 => Some(PC4_A::VALUE13),
76 24 => Some(PC4_A::VALUE14),
77 25 => Some(PC4_A::VALUE15),
78 26 => Some(PC4_A::VALUE16),
79 27 => Some(PC4_A::VALUE17),
80 28 => Some(PC4_A::VALUE18),
81 _ => None,
82 }
83 }
84 #[doc = "Input - No internal pull device active"]
85 #[inline(always)]
86 pub fn is_value1(&self) -> bool {
87 *self == PC4_A::VALUE1
88 }
89 #[doc = "Input - Internal pull-down device active"]
90 #[inline(always)]
91 pub fn is_value2(&self) -> bool {
92 *self == PC4_A::VALUE2
93 }
94 #[doc = "Input - Internal pull-up device active"]
95 #[inline(always)]
96 pub fn is_value3(&self) -> bool {
97 *self == PC4_A::VALUE3
98 }
99 #[doc = "Input - No internal pull device, Pn_OUTx = input value"]
100 #[inline(always)]
101 pub fn is_value4(&self) -> bool {
102 *self == PC4_A::VALUE4
103 }
104 #[doc = "Input inverted - No internal pull device active"]
105 #[inline(always)]
106 pub fn is_value5(&self) -> bool {
107 *self == PC4_A::VALUE5
108 }
109 #[doc = "Input inverted - Internal pull-down device active"]
110 #[inline(always)]
111 pub fn is_value6(&self) -> bool {
112 *self == PC4_A::VALUE6
113 }
114 #[doc = "Input inverted - Internal pull-up device active"]
115 #[inline(always)]
116 pub fn is_value7(&self) -> bool {
117 *self == PC4_A::VALUE7
118 }
119 #[doc = "Input inverted - No internal pull device, Pn_OUTx = input value"]
120 #[inline(always)]
121 pub fn is_value8(&self) -> bool {
122 *self == PC4_A::VALUE8
123 }
124 #[doc = "Output Push-Pull - General-purpose output"]
125 #[inline(always)]
126 pub fn is_value9(&self) -> bool {
127 *self == PC4_A::VALUE9
128 }
129 #[doc = "Output Push-Pull - Alternate output function 1"]
130 #[inline(always)]
131 pub fn is_value10(&self) -> bool {
132 *self == PC4_A::VALUE10
133 }
134 #[doc = "Output Push-Pull - Alternate output function 2"]
135 #[inline(always)]
136 pub fn is_value11(&self) -> bool {
137 *self == PC4_A::VALUE11
138 }
139 #[doc = "Output Push-Pull - Alternate output function 3"]
140 #[inline(always)]
141 pub fn is_value12(&self) -> bool {
142 *self == PC4_A::VALUE12
143 }
144 #[doc = "Output Push-Pull - Alternate output function 4"]
145 #[inline(always)]
146 pub fn is_value13(&self) -> bool {
147 *self == PC4_A::VALUE13
148 }
149 #[doc = "Output Open Drain - General-purpose output"]
150 #[inline(always)]
151 pub fn is_value14(&self) -> bool {
152 *self == PC4_A::VALUE14
153 }
154 #[doc = "Output Open Drain - Alternate output function 1"]
155 #[inline(always)]
156 pub fn is_value15(&self) -> bool {
157 *self == PC4_A::VALUE15
158 }
159 #[doc = "Output Open Drain - Alternate output function 2"]
160 #[inline(always)]
161 pub fn is_value16(&self) -> bool {
162 *self == PC4_A::VALUE16
163 }
164 #[doc = "Output Open Drain - Alternate output function 3"]
165 #[inline(always)]
166 pub fn is_value17(&self) -> bool {
167 *self == PC4_A::VALUE17
168 }
169 #[doc = "Output Open Drain - Alternate output function 4"]
170 #[inline(always)]
171 pub fn is_value18(&self) -> bool {
172 *self == PC4_A::VALUE18
173 }
174}
175#[doc = "Field `PC4` writer - Port Control for Port n Pin 4 to 7"]
176pub type PC4_W<'a, REG> = crate::FieldWriter<'a, REG, 5, PC4_A>;
177impl<'a, REG> PC4_W<'a, REG>
178where
179 REG: crate::Writable + crate::RegisterSpec,
180 REG::Ux: From<u8>,
181{
182 #[doc = "Input - No internal pull device active"]
183 #[inline(always)]
184 pub fn value1(self) -> &'a mut crate::W<REG> {
185 self.variant(PC4_A::VALUE1)
186 }
187 #[doc = "Input - Internal pull-down device active"]
188 #[inline(always)]
189 pub fn value2(self) -> &'a mut crate::W<REG> {
190 self.variant(PC4_A::VALUE2)
191 }
192 #[doc = "Input - Internal pull-up device active"]
193 #[inline(always)]
194 pub fn value3(self) -> &'a mut crate::W<REG> {
195 self.variant(PC4_A::VALUE3)
196 }
197 #[doc = "Input - No internal pull device, Pn_OUTx = input value"]
198 #[inline(always)]
199 pub fn value4(self) -> &'a mut crate::W<REG> {
200 self.variant(PC4_A::VALUE4)
201 }
202 #[doc = "Input inverted - No internal pull device active"]
203 #[inline(always)]
204 pub fn value5(self) -> &'a mut crate::W<REG> {
205 self.variant(PC4_A::VALUE5)
206 }
207 #[doc = "Input inverted - Internal pull-down device active"]
208 #[inline(always)]
209 pub fn value6(self) -> &'a mut crate::W<REG> {
210 self.variant(PC4_A::VALUE6)
211 }
212 #[doc = "Input inverted - Internal pull-up device active"]
213 #[inline(always)]
214 pub fn value7(self) -> &'a mut crate::W<REG> {
215 self.variant(PC4_A::VALUE7)
216 }
217 #[doc = "Input inverted - No internal pull device, Pn_OUTx = input value"]
218 #[inline(always)]
219 pub fn value8(self) -> &'a mut crate::W<REG> {
220 self.variant(PC4_A::VALUE8)
221 }
222 #[doc = "Output Push-Pull - General-purpose output"]
223 #[inline(always)]
224 pub fn value9(self) -> &'a mut crate::W<REG> {
225 self.variant(PC4_A::VALUE9)
226 }
227 #[doc = "Output Push-Pull - Alternate output function 1"]
228 #[inline(always)]
229 pub fn value10(self) -> &'a mut crate::W<REG> {
230 self.variant(PC4_A::VALUE10)
231 }
232 #[doc = "Output Push-Pull - Alternate output function 2"]
233 #[inline(always)]
234 pub fn value11(self) -> &'a mut crate::W<REG> {
235 self.variant(PC4_A::VALUE11)
236 }
237 #[doc = "Output Push-Pull - Alternate output function 3"]
238 #[inline(always)]
239 pub fn value12(self) -> &'a mut crate::W<REG> {
240 self.variant(PC4_A::VALUE12)
241 }
242 #[doc = "Output Push-Pull - Alternate output function 4"]
243 #[inline(always)]
244 pub fn value13(self) -> &'a mut crate::W<REG> {
245 self.variant(PC4_A::VALUE13)
246 }
247 #[doc = "Output Open Drain - General-purpose output"]
248 #[inline(always)]
249 pub fn value14(self) -> &'a mut crate::W<REG> {
250 self.variant(PC4_A::VALUE14)
251 }
252 #[doc = "Output Open Drain - Alternate output function 1"]
253 #[inline(always)]
254 pub fn value15(self) -> &'a mut crate::W<REG> {
255 self.variant(PC4_A::VALUE15)
256 }
257 #[doc = "Output Open Drain - Alternate output function 2"]
258 #[inline(always)]
259 pub fn value16(self) -> &'a mut crate::W<REG> {
260 self.variant(PC4_A::VALUE16)
261 }
262 #[doc = "Output Open Drain - Alternate output function 3"]
263 #[inline(always)]
264 pub fn value17(self) -> &'a mut crate::W<REG> {
265 self.variant(PC4_A::VALUE17)
266 }
267 #[doc = "Output Open Drain - Alternate output function 4"]
268 #[inline(always)]
269 pub fn value18(self) -> &'a mut crate::W<REG> {
270 self.variant(PC4_A::VALUE18)
271 }
272}
273#[doc = "Port Control for Port n Pin 4 to 7\n\nValue on reset: 0"]
274#[derive(Clone, Copy, Debug, PartialEq, Eq)]
275#[repr(u8)]
276pub enum PC5_A {
277 #[doc = "0: Input - No internal pull device active"]
278 VALUE1 = 0,
279 #[doc = "1: Input - Internal pull-down device active"]
280 VALUE2 = 1,
281 #[doc = "2: Input - Internal pull-up device active"]
282 VALUE3 = 2,
283 #[doc = "3: Input - No internal pull device, Pn_OUTx = input value"]
284 VALUE4 = 3,
285 #[doc = "4: Input inverted - No internal pull device active"]
286 VALUE5 = 4,
287 #[doc = "5: Input inverted - Internal pull-down device active"]
288 VALUE6 = 5,
289 #[doc = "6: Input inverted - Internal pull-up device active"]
290 VALUE7 = 6,
291 #[doc = "7: Input inverted - No internal pull device, Pn_OUTx = input value"]
292 VALUE8 = 7,
293 #[doc = "16: Output Push-Pull - General-purpose output"]
294 VALUE9 = 16,
295 #[doc = "17: Output Push-Pull - Alternate output function 1"]
296 VALUE10 = 17,
297 #[doc = "18: Output Push-Pull - Alternate output function 2"]
298 VALUE11 = 18,
299 #[doc = "19: Output Push-Pull - Alternate output function 3"]
300 VALUE12 = 19,
301 #[doc = "20: Output Push-Pull - Alternate output function 4"]
302 VALUE13 = 20,
303 #[doc = "24: Output Open Drain - General-purpose output"]
304 VALUE14 = 24,
305 #[doc = "25: Output Open Drain - Alternate output function 1"]
306 VALUE15 = 25,
307 #[doc = "26: Output Open Drain - Alternate output function 2"]
308 VALUE16 = 26,
309 #[doc = "27: Output Open Drain - Alternate output function 3"]
310 VALUE17 = 27,
311 #[doc = "28: Output Open Drain - Alternate output function 4"]
312 VALUE18 = 28,
313}
314impl From<PC5_A> for u8 {
315 #[inline(always)]
316 fn from(variant: PC5_A) -> Self {
317 variant as _
318 }
319}
320impl crate::FieldSpec for PC5_A {
321 type Ux = u8;
322}
323impl crate::IsEnum for PC5_A {}
324#[doc = "Field `PC5` reader - Port Control for Port n Pin 4 to 7"]
325pub type PC5_R = crate::FieldReader<PC5_A>;
326impl PC5_R {
327 #[doc = "Get enumerated values variant"]
328 #[inline(always)]
329 pub const fn variant(&self) -> Option<PC5_A> {
330 match self.bits {
331 0 => Some(PC5_A::VALUE1),
332 1 => Some(PC5_A::VALUE2),
333 2 => Some(PC5_A::VALUE3),
334 3 => Some(PC5_A::VALUE4),
335 4 => Some(PC5_A::VALUE5),
336 5 => Some(PC5_A::VALUE6),
337 6 => Some(PC5_A::VALUE7),
338 7 => Some(PC5_A::VALUE8),
339 16 => Some(PC5_A::VALUE9),
340 17 => Some(PC5_A::VALUE10),
341 18 => Some(PC5_A::VALUE11),
342 19 => Some(PC5_A::VALUE12),
343 20 => Some(PC5_A::VALUE13),
344 24 => Some(PC5_A::VALUE14),
345 25 => Some(PC5_A::VALUE15),
346 26 => Some(PC5_A::VALUE16),
347 27 => Some(PC5_A::VALUE17),
348 28 => Some(PC5_A::VALUE18),
349 _ => None,
350 }
351 }
352 #[doc = "Input - No internal pull device active"]
353 #[inline(always)]
354 pub fn is_value1(&self) -> bool {
355 *self == PC5_A::VALUE1
356 }
357 #[doc = "Input - Internal pull-down device active"]
358 #[inline(always)]
359 pub fn is_value2(&self) -> bool {
360 *self == PC5_A::VALUE2
361 }
362 #[doc = "Input - Internal pull-up device active"]
363 #[inline(always)]
364 pub fn is_value3(&self) -> bool {
365 *self == PC5_A::VALUE3
366 }
367 #[doc = "Input - No internal pull device, Pn_OUTx = input value"]
368 #[inline(always)]
369 pub fn is_value4(&self) -> bool {
370 *self == PC5_A::VALUE4
371 }
372 #[doc = "Input inverted - No internal pull device active"]
373 #[inline(always)]
374 pub fn is_value5(&self) -> bool {
375 *self == PC5_A::VALUE5
376 }
377 #[doc = "Input inverted - Internal pull-down device active"]
378 #[inline(always)]
379 pub fn is_value6(&self) -> bool {
380 *self == PC5_A::VALUE6
381 }
382 #[doc = "Input inverted - Internal pull-up device active"]
383 #[inline(always)]
384 pub fn is_value7(&self) -> bool {
385 *self == PC5_A::VALUE7
386 }
387 #[doc = "Input inverted - No internal pull device, Pn_OUTx = input value"]
388 #[inline(always)]
389 pub fn is_value8(&self) -> bool {
390 *self == PC5_A::VALUE8
391 }
392 #[doc = "Output Push-Pull - General-purpose output"]
393 #[inline(always)]
394 pub fn is_value9(&self) -> bool {
395 *self == PC5_A::VALUE9
396 }
397 #[doc = "Output Push-Pull - Alternate output function 1"]
398 #[inline(always)]
399 pub fn is_value10(&self) -> bool {
400 *self == PC5_A::VALUE10
401 }
402 #[doc = "Output Push-Pull - Alternate output function 2"]
403 #[inline(always)]
404 pub fn is_value11(&self) -> bool {
405 *self == PC5_A::VALUE11
406 }
407 #[doc = "Output Push-Pull - Alternate output function 3"]
408 #[inline(always)]
409 pub fn is_value12(&self) -> bool {
410 *self == PC5_A::VALUE12
411 }
412 #[doc = "Output Push-Pull - Alternate output function 4"]
413 #[inline(always)]
414 pub fn is_value13(&self) -> bool {
415 *self == PC5_A::VALUE13
416 }
417 #[doc = "Output Open Drain - General-purpose output"]
418 #[inline(always)]
419 pub fn is_value14(&self) -> bool {
420 *self == PC5_A::VALUE14
421 }
422 #[doc = "Output Open Drain - Alternate output function 1"]
423 #[inline(always)]
424 pub fn is_value15(&self) -> bool {
425 *self == PC5_A::VALUE15
426 }
427 #[doc = "Output Open Drain - Alternate output function 2"]
428 #[inline(always)]
429 pub fn is_value16(&self) -> bool {
430 *self == PC5_A::VALUE16
431 }
432 #[doc = "Output Open Drain - Alternate output function 3"]
433 #[inline(always)]
434 pub fn is_value17(&self) -> bool {
435 *self == PC5_A::VALUE17
436 }
437 #[doc = "Output Open Drain - Alternate output function 4"]
438 #[inline(always)]
439 pub fn is_value18(&self) -> bool {
440 *self == PC5_A::VALUE18
441 }
442}
443#[doc = "Field `PC5` writer - Port Control for Port n Pin 4 to 7"]
444pub type PC5_W<'a, REG> = crate::FieldWriter<'a, REG, 5, PC5_A>;
445impl<'a, REG> PC5_W<'a, REG>
446where
447 REG: crate::Writable + crate::RegisterSpec,
448 REG::Ux: From<u8>,
449{
450 #[doc = "Input - No internal pull device active"]
451 #[inline(always)]
452 pub fn value1(self) -> &'a mut crate::W<REG> {
453 self.variant(PC5_A::VALUE1)
454 }
455 #[doc = "Input - Internal pull-down device active"]
456 #[inline(always)]
457 pub fn value2(self) -> &'a mut crate::W<REG> {
458 self.variant(PC5_A::VALUE2)
459 }
460 #[doc = "Input - Internal pull-up device active"]
461 #[inline(always)]
462 pub fn value3(self) -> &'a mut crate::W<REG> {
463 self.variant(PC5_A::VALUE3)
464 }
465 #[doc = "Input - No internal pull device, Pn_OUTx = input value"]
466 #[inline(always)]
467 pub fn value4(self) -> &'a mut crate::W<REG> {
468 self.variant(PC5_A::VALUE4)
469 }
470 #[doc = "Input inverted - No internal pull device active"]
471 #[inline(always)]
472 pub fn value5(self) -> &'a mut crate::W<REG> {
473 self.variant(PC5_A::VALUE5)
474 }
475 #[doc = "Input inverted - Internal pull-down device active"]
476 #[inline(always)]
477 pub fn value6(self) -> &'a mut crate::W<REG> {
478 self.variant(PC5_A::VALUE6)
479 }
480 #[doc = "Input inverted - Internal pull-up device active"]
481 #[inline(always)]
482 pub fn value7(self) -> &'a mut crate::W<REG> {
483 self.variant(PC5_A::VALUE7)
484 }
485 #[doc = "Input inverted - No internal pull device, Pn_OUTx = input value"]
486 #[inline(always)]
487 pub fn value8(self) -> &'a mut crate::W<REG> {
488 self.variant(PC5_A::VALUE8)
489 }
490 #[doc = "Output Push-Pull - General-purpose output"]
491 #[inline(always)]
492 pub fn value9(self) -> &'a mut crate::W<REG> {
493 self.variant(PC5_A::VALUE9)
494 }
495 #[doc = "Output Push-Pull - Alternate output function 1"]
496 #[inline(always)]
497 pub fn value10(self) -> &'a mut crate::W<REG> {
498 self.variant(PC5_A::VALUE10)
499 }
500 #[doc = "Output Push-Pull - Alternate output function 2"]
501 #[inline(always)]
502 pub fn value11(self) -> &'a mut crate::W<REG> {
503 self.variant(PC5_A::VALUE11)
504 }
505 #[doc = "Output Push-Pull - Alternate output function 3"]
506 #[inline(always)]
507 pub fn value12(self) -> &'a mut crate::W<REG> {
508 self.variant(PC5_A::VALUE12)
509 }
510 #[doc = "Output Push-Pull - Alternate output function 4"]
511 #[inline(always)]
512 pub fn value13(self) -> &'a mut crate::W<REG> {
513 self.variant(PC5_A::VALUE13)
514 }
515 #[doc = "Output Open Drain - General-purpose output"]
516 #[inline(always)]
517 pub fn value14(self) -> &'a mut crate::W<REG> {
518 self.variant(PC5_A::VALUE14)
519 }
520 #[doc = "Output Open Drain - Alternate output function 1"]
521 #[inline(always)]
522 pub fn value15(self) -> &'a mut crate::W<REG> {
523 self.variant(PC5_A::VALUE15)
524 }
525 #[doc = "Output Open Drain - Alternate output function 2"]
526 #[inline(always)]
527 pub fn value16(self) -> &'a mut crate::W<REG> {
528 self.variant(PC5_A::VALUE16)
529 }
530 #[doc = "Output Open Drain - Alternate output function 3"]
531 #[inline(always)]
532 pub fn value17(self) -> &'a mut crate::W<REG> {
533 self.variant(PC5_A::VALUE17)
534 }
535 #[doc = "Output Open Drain - Alternate output function 4"]
536 #[inline(always)]
537 pub fn value18(self) -> &'a mut crate::W<REG> {
538 self.variant(PC5_A::VALUE18)
539 }
540}
541#[doc = "Port Control for Port n Pin 4 to 7\n\nValue on reset: 0"]
542#[derive(Clone, Copy, Debug, PartialEq, Eq)]
543#[repr(u8)]
544pub enum PC6_A {
545 #[doc = "0: Input - No internal pull device active"]
546 VALUE1 = 0,
547 #[doc = "1: Input - Internal pull-down device active"]
548 VALUE2 = 1,
549 #[doc = "2: Input - Internal pull-up device active"]
550 VALUE3 = 2,
551 #[doc = "3: Input - No internal pull device, Pn_OUTx = input value"]
552 VALUE4 = 3,
553 #[doc = "4: Input inverted - No internal pull device active"]
554 VALUE5 = 4,
555 #[doc = "5: Input inverted - Internal pull-down device active"]
556 VALUE6 = 5,
557 #[doc = "6: Input inverted - Internal pull-up device active"]
558 VALUE7 = 6,
559 #[doc = "7: Input inverted - No internal pull device, Pn_OUTx = input value"]
560 VALUE8 = 7,
561 #[doc = "16: Output Push-Pull - General-purpose output"]
562 VALUE9 = 16,
563 #[doc = "17: Output Push-Pull - Alternate output function 1"]
564 VALUE10 = 17,
565 #[doc = "18: Output Push-Pull - Alternate output function 2"]
566 VALUE11 = 18,
567 #[doc = "19: Output Push-Pull - Alternate output function 3"]
568 VALUE12 = 19,
569 #[doc = "20: Output Push-Pull - Alternate output function 4"]
570 VALUE13 = 20,
571 #[doc = "24: Output Open Drain - General-purpose output"]
572 VALUE14 = 24,
573 #[doc = "25: Output Open Drain - Alternate output function 1"]
574 VALUE15 = 25,
575 #[doc = "26: Output Open Drain - Alternate output function 2"]
576 VALUE16 = 26,
577 #[doc = "27: Output Open Drain - Alternate output function 3"]
578 VALUE17 = 27,
579 #[doc = "28: Output Open Drain - Alternate output function 4"]
580 VALUE18 = 28,
581}
582impl From<PC6_A> for u8 {
583 #[inline(always)]
584 fn from(variant: PC6_A) -> Self {
585 variant as _
586 }
587}
588impl crate::FieldSpec for PC6_A {
589 type Ux = u8;
590}
591impl crate::IsEnum for PC6_A {}
592#[doc = "Field `PC6` reader - Port Control for Port n Pin 4 to 7"]
593pub type PC6_R = crate::FieldReader<PC6_A>;
594impl PC6_R {
595 #[doc = "Get enumerated values variant"]
596 #[inline(always)]
597 pub const fn variant(&self) -> Option<PC6_A> {
598 match self.bits {
599 0 => Some(PC6_A::VALUE1),
600 1 => Some(PC6_A::VALUE2),
601 2 => Some(PC6_A::VALUE3),
602 3 => Some(PC6_A::VALUE4),
603 4 => Some(PC6_A::VALUE5),
604 5 => Some(PC6_A::VALUE6),
605 6 => Some(PC6_A::VALUE7),
606 7 => Some(PC6_A::VALUE8),
607 16 => Some(PC6_A::VALUE9),
608 17 => Some(PC6_A::VALUE10),
609 18 => Some(PC6_A::VALUE11),
610 19 => Some(PC6_A::VALUE12),
611 20 => Some(PC6_A::VALUE13),
612 24 => Some(PC6_A::VALUE14),
613 25 => Some(PC6_A::VALUE15),
614 26 => Some(PC6_A::VALUE16),
615 27 => Some(PC6_A::VALUE17),
616 28 => Some(PC6_A::VALUE18),
617 _ => None,
618 }
619 }
620 #[doc = "Input - No internal pull device active"]
621 #[inline(always)]
622 pub fn is_value1(&self) -> bool {
623 *self == PC6_A::VALUE1
624 }
625 #[doc = "Input - Internal pull-down device active"]
626 #[inline(always)]
627 pub fn is_value2(&self) -> bool {
628 *self == PC6_A::VALUE2
629 }
630 #[doc = "Input - Internal pull-up device active"]
631 #[inline(always)]
632 pub fn is_value3(&self) -> bool {
633 *self == PC6_A::VALUE3
634 }
635 #[doc = "Input - No internal pull device, Pn_OUTx = input value"]
636 #[inline(always)]
637 pub fn is_value4(&self) -> bool {
638 *self == PC6_A::VALUE4
639 }
640 #[doc = "Input inverted - No internal pull device active"]
641 #[inline(always)]
642 pub fn is_value5(&self) -> bool {
643 *self == PC6_A::VALUE5
644 }
645 #[doc = "Input inverted - Internal pull-down device active"]
646 #[inline(always)]
647 pub fn is_value6(&self) -> bool {
648 *self == PC6_A::VALUE6
649 }
650 #[doc = "Input inverted - Internal pull-up device active"]
651 #[inline(always)]
652 pub fn is_value7(&self) -> bool {
653 *self == PC6_A::VALUE7
654 }
655 #[doc = "Input inverted - No internal pull device, Pn_OUTx = input value"]
656 #[inline(always)]
657 pub fn is_value8(&self) -> bool {
658 *self == PC6_A::VALUE8
659 }
660 #[doc = "Output Push-Pull - General-purpose output"]
661 #[inline(always)]
662 pub fn is_value9(&self) -> bool {
663 *self == PC6_A::VALUE9
664 }
665 #[doc = "Output Push-Pull - Alternate output function 1"]
666 #[inline(always)]
667 pub fn is_value10(&self) -> bool {
668 *self == PC6_A::VALUE10
669 }
670 #[doc = "Output Push-Pull - Alternate output function 2"]
671 #[inline(always)]
672 pub fn is_value11(&self) -> bool {
673 *self == PC6_A::VALUE11
674 }
675 #[doc = "Output Push-Pull - Alternate output function 3"]
676 #[inline(always)]
677 pub fn is_value12(&self) -> bool {
678 *self == PC6_A::VALUE12
679 }
680 #[doc = "Output Push-Pull - Alternate output function 4"]
681 #[inline(always)]
682 pub fn is_value13(&self) -> bool {
683 *self == PC6_A::VALUE13
684 }
685 #[doc = "Output Open Drain - General-purpose output"]
686 #[inline(always)]
687 pub fn is_value14(&self) -> bool {
688 *self == PC6_A::VALUE14
689 }
690 #[doc = "Output Open Drain - Alternate output function 1"]
691 #[inline(always)]
692 pub fn is_value15(&self) -> bool {
693 *self == PC6_A::VALUE15
694 }
695 #[doc = "Output Open Drain - Alternate output function 2"]
696 #[inline(always)]
697 pub fn is_value16(&self) -> bool {
698 *self == PC6_A::VALUE16
699 }
700 #[doc = "Output Open Drain - Alternate output function 3"]
701 #[inline(always)]
702 pub fn is_value17(&self) -> bool {
703 *self == PC6_A::VALUE17
704 }
705 #[doc = "Output Open Drain - Alternate output function 4"]
706 #[inline(always)]
707 pub fn is_value18(&self) -> bool {
708 *self == PC6_A::VALUE18
709 }
710}
711#[doc = "Field `PC6` writer - Port Control for Port n Pin 4 to 7"]
712pub type PC6_W<'a, REG> = crate::FieldWriter<'a, REG, 5, PC6_A>;
713impl<'a, REG> PC6_W<'a, REG>
714where
715 REG: crate::Writable + crate::RegisterSpec,
716 REG::Ux: From<u8>,
717{
718 #[doc = "Input - No internal pull device active"]
719 #[inline(always)]
720 pub fn value1(self) -> &'a mut crate::W<REG> {
721 self.variant(PC6_A::VALUE1)
722 }
723 #[doc = "Input - Internal pull-down device active"]
724 #[inline(always)]
725 pub fn value2(self) -> &'a mut crate::W<REG> {
726 self.variant(PC6_A::VALUE2)
727 }
728 #[doc = "Input - Internal pull-up device active"]
729 #[inline(always)]
730 pub fn value3(self) -> &'a mut crate::W<REG> {
731 self.variant(PC6_A::VALUE3)
732 }
733 #[doc = "Input - No internal pull device, Pn_OUTx = input value"]
734 #[inline(always)]
735 pub fn value4(self) -> &'a mut crate::W<REG> {
736 self.variant(PC6_A::VALUE4)
737 }
738 #[doc = "Input inverted - No internal pull device active"]
739 #[inline(always)]
740 pub fn value5(self) -> &'a mut crate::W<REG> {
741 self.variant(PC6_A::VALUE5)
742 }
743 #[doc = "Input inverted - Internal pull-down device active"]
744 #[inline(always)]
745 pub fn value6(self) -> &'a mut crate::W<REG> {
746 self.variant(PC6_A::VALUE6)
747 }
748 #[doc = "Input inverted - Internal pull-up device active"]
749 #[inline(always)]
750 pub fn value7(self) -> &'a mut crate::W<REG> {
751 self.variant(PC6_A::VALUE7)
752 }
753 #[doc = "Input inverted - No internal pull device, Pn_OUTx = input value"]
754 #[inline(always)]
755 pub fn value8(self) -> &'a mut crate::W<REG> {
756 self.variant(PC6_A::VALUE8)
757 }
758 #[doc = "Output Push-Pull - General-purpose output"]
759 #[inline(always)]
760 pub fn value9(self) -> &'a mut crate::W<REG> {
761 self.variant(PC6_A::VALUE9)
762 }
763 #[doc = "Output Push-Pull - Alternate output function 1"]
764 #[inline(always)]
765 pub fn value10(self) -> &'a mut crate::W<REG> {
766 self.variant(PC6_A::VALUE10)
767 }
768 #[doc = "Output Push-Pull - Alternate output function 2"]
769 #[inline(always)]
770 pub fn value11(self) -> &'a mut crate::W<REG> {
771 self.variant(PC6_A::VALUE11)
772 }
773 #[doc = "Output Push-Pull - Alternate output function 3"]
774 #[inline(always)]
775 pub fn value12(self) -> &'a mut crate::W<REG> {
776 self.variant(PC6_A::VALUE12)
777 }
778 #[doc = "Output Push-Pull - Alternate output function 4"]
779 #[inline(always)]
780 pub fn value13(self) -> &'a mut crate::W<REG> {
781 self.variant(PC6_A::VALUE13)
782 }
783 #[doc = "Output Open Drain - General-purpose output"]
784 #[inline(always)]
785 pub fn value14(self) -> &'a mut crate::W<REG> {
786 self.variant(PC6_A::VALUE14)
787 }
788 #[doc = "Output Open Drain - Alternate output function 1"]
789 #[inline(always)]
790 pub fn value15(self) -> &'a mut crate::W<REG> {
791 self.variant(PC6_A::VALUE15)
792 }
793 #[doc = "Output Open Drain - Alternate output function 2"]
794 #[inline(always)]
795 pub fn value16(self) -> &'a mut crate::W<REG> {
796 self.variant(PC6_A::VALUE16)
797 }
798 #[doc = "Output Open Drain - Alternate output function 3"]
799 #[inline(always)]
800 pub fn value17(self) -> &'a mut crate::W<REG> {
801 self.variant(PC6_A::VALUE17)
802 }
803 #[doc = "Output Open Drain - Alternate output function 4"]
804 #[inline(always)]
805 pub fn value18(self) -> &'a mut crate::W<REG> {
806 self.variant(PC6_A::VALUE18)
807 }
808}
809#[doc = "Port Control for Port n Pin 4 to 7\n\nValue on reset: 0"]
810#[derive(Clone, Copy, Debug, PartialEq, Eq)]
811#[repr(u8)]
812pub enum PC7_A {
813 #[doc = "0: Input - No internal pull device active"]
814 VALUE1 = 0,
815 #[doc = "1: Input - Internal pull-down device active"]
816 VALUE2 = 1,
817 #[doc = "2: Input - Internal pull-up device active"]
818 VALUE3 = 2,
819 #[doc = "3: Input - No internal pull device, Pn_OUTx = input value"]
820 VALUE4 = 3,
821 #[doc = "4: Input inverted - No internal pull device active"]
822 VALUE5 = 4,
823 #[doc = "5: Input inverted - Internal pull-down device active"]
824 VALUE6 = 5,
825 #[doc = "6: Input inverted - Internal pull-up device active"]
826 VALUE7 = 6,
827 #[doc = "7: Input inverted - No internal pull device, Pn_OUTx = input value"]
828 VALUE8 = 7,
829 #[doc = "16: Output Push-Pull - General-purpose output"]
830 VALUE9 = 16,
831 #[doc = "17: Output Push-Pull - Alternate output function 1"]
832 VALUE10 = 17,
833 #[doc = "18: Output Push-Pull - Alternate output function 2"]
834 VALUE11 = 18,
835 #[doc = "19: Output Push-Pull - Alternate output function 3"]
836 VALUE12 = 19,
837 #[doc = "20: Output Push-Pull - Alternate output function 4"]
838 VALUE13 = 20,
839 #[doc = "24: Output Open Drain - General-purpose output"]
840 VALUE14 = 24,
841 #[doc = "25: Output Open Drain - Alternate output function 1"]
842 VALUE15 = 25,
843 #[doc = "26: Output Open Drain - Alternate output function 2"]
844 VALUE16 = 26,
845 #[doc = "27: Output Open Drain - Alternate output function 3"]
846 VALUE17 = 27,
847 #[doc = "28: Output Open Drain - Alternate output function 4"]
848 VALUE18 = 28,
849}
850impl From<PC7_A> for u8 {
851 #[inline(always)]
852 fn from(variant: PC7_A) -> Self {
853 variant as _
854 }
855}
856impl crate::FieldSpec for PC7_A {
857 type Ux = u8;
858}
859impl crate::IsEnum for PC7_A {}
860#[doc = "Field `PC7` reader - Port Control for Port n Pin 4 to 7"]
861pub type PC7_R = crate::FieldReader<PC7_A>;
862impl PC7_R {
863 #[doc = "Get enumerated values variant"]
864 #[inline(always)]
865 pub const fn variant(&self) -> Option<PC7_A> {
866 match self.bits {
867 0 => Some(PC7_A::VALUE1),
868 1 => Some(PC7_A::VALUE2),
869 2 => Some(PC7_A::VALUE3),
870 3 => Some(PC7_A::VALUE4),
871 4 => Some(PC7_A::VALUE5),
872 5 => Some(PC7_A::VALUE6),
873 6 => Some(PC7_A::VALUE7),
874 7 => Some(PC7_A::VALUE8),
875 16 => Some(PC7_A::VALUE9),
876 17 => Some(PC7_A::VALUE10),
877 18 => Some(PC7_A::VALUE11),
878 19 => Some(PC7_A::VALUE12),
879 20 => Some(PC7_A::VALUE13),
880 24 => Some(PC7_A::VALUE14),
881 25 => Some(PC7_A::VALUE15),
882 26 => Some(PC7_A::VALUE16),
883 27 => Some(PC7_A::VALUE17),
884 28 => Some(PC7_A::VALUE18),
885 _ => None,
886 }
887 }
888 #[doc = "Input - No internal pull device active"]
889 #[inline(always)]
890 pub fn is_value1(&self) -> bool {
891 *self == PC7_A::VALUE1
892 }
893 #[doc = "Input - Internal pull-down device active"]
894 #[inline(always)]
895 pub fn is_value2(&self) -> bool {
896 *self == PC7_A::VALUE2
897 }
898 #[doc = "Input - Internal pull-up device active"]
899 #[inline(always)]
900 pub fn is_value3(&self) -> bool {
901 *self == PC7_A::VALUE3
902 }
903 #[doc = "Input - No internal pull device, Pn_OUTx = input value"]
904 #[inline(always)]
905 pub fn is_value4(&self) -> bool {
906 *self == PC7_A::VALUE4
907 }
908 #[doc = "Input inverted - No internal pull device active"]
909 #[inline(always)]
910 pub fn is_value5(&self) -> bool {
911 *self == PC7_A::VALUE5
912 }
913 #[doc = "Input inverted - Internal pull-down device active"]
914 #[inline(always)]
915 pub fn is_value6(&self) -> bool {
916 *self == PC7_A::VALUE6
917 }
918 #[doc = "Input inverted - Internal pull-up device active"]
919 #[inline(always)]
920 pub fn is_value7(&self) -> bool {
921 *self == PC7_A::VALUE7
922 }
923 #[doc = "Input inverted - No internal pull device, Pn_OUTx = input value"]
924 #[inline(always)]
925 pub fn is_value8(&self) -> bool {
926 *self == PC7_A::VALUE8
927 }
928 #[doc = "Output Push-Pull - General-purpose output"]
929 #[inline(always)]
930 pub fn is_value9(&self) -> bool {
931 *self == PC7_A::VALUE9
932 }
933 #[doc = "Output Push-Pull - Alternate output function 1"]
934 #[inline(always)]
935 pub fn is_value10(&self) -> bool {
936 *self == PC7_A::VALUE10
937 }
938 #[doc = "Output Push-Pull - Alternate output function 2"]
939 #[inline(always)]
940 pub fn is_value11(&self) -> bool {
941 *self == PC7_A::VALUE11
942 }
943 #[doc = "Output Push-Pull - Alternate output function 3"]
944 #[inline(always)]
945 pub fn is_value12(&self) -> bool {
946 *self == PC7_A::VALUE12
947 }
948 #[doc = "Output Push-Pull - Alternate output function 4"]
949 #[inline(always)]
950 pub fn is_value13(&self) -> bool {
951 *self == PC7_A::VALUE13
952 }
953 #[doc = "Output Open Drain - General-purpose output"]
954 #[inline(always)]
955 pub fn is_value14(&self) -> bool {
956 *self == PC7_A::VALUE14
957 }
958 #[doc = "Output Open Drain - Alternate output function 1"]
959 #[inline(always)]
960 pub fn is_value15(&self) -> bool {
961 *self == PC7_A::VALUE15
962 }
963 #[doc = "Output Open Drain - Alternate output function 2"]
964 #[inline(always)]
965 pub fn is_value16(&self) -> bool {
966 *self == PC7_A::VALUE16
967 }
968 #[doc = "Output Open Drain - Alternate output function 3"]
969 #[inline(always)]
970 pub fn is_value17(&self) -> bool {
971 *self == PC7_A::VALUE17
972 }
973 #[doc = "Output Open Drain - Alternate output function 4"]
974 #[inline(always)]
975 pub fn is_value18(&self) -> bool {
976 *self == PC7_A::VALUE18
977 }
978}
979#[doc = "Field `PC7` writer - Port Control for Port n Pin 4 to 7"]
980pub type PC7_W<'a, REG> = crate::FieldWriter<'a, REG, 5, PC7_A>;
981impl<'a, REG> PC7_W<'a, REG>
982where
983 REG: crate::Writable + crate::RegisterSpec,
984 REG::Ux: From<u8>,
985{
986 #[doc = "Input - No internal pull device active"]
987 #[inline(always)]
988 pub fn value1(self) -> &'a mut crate::W<REG> {
989 self.variant(PC7_A::VALUE1)
990 }
991 #[doc = "Input - Internal pull-down device active"]
992 #[inline(always)]
993 pub fn value2(self) -> &'a mut crate::W<REG> {
994 self.variant(PC7_A::VALUE2)
995 }
996 #[doc = "Input - Internal pull-up device active"]
997 #[inline(always)]
998 pub fn value3(self) -> &'a mut crate::W<REG> {
999 self.variant(PC7_A::VALUE3)
1000 }
1001 #[doc = "Input - No internal pull device, Pn_OUTx = input value"]
1002 #[inline(always)]
1003 pub fn value4(self) -> &'a mut crate::W<REG> {
1004 self.variant(PC7_A::VALUE4)
1005 }
1006 #[doc = "Input inverted - No internal pull device active"]
1007 #[inline(always)]
1008 pub fn value5(self) -> &'a mut crate::W<REG> {
1009 self.variant(PC7_A::VALUE5)
1010 }
1011 #[doc = "Input inverted - Internal pull-down device active"]
1012 #[inline(always)]
1013 pub fn value6(self) -> &'a mut crate::W<REG> {
1014 self.variant(PC7_A::VALUE6)
1015 }
1016 #[doc = "Input inverted - Internal pull-up device active"]
1017 #[inline(always)]
1018 pub fn value7(self) -> &'a mut crate::W<REG> {
1019 self.variant(PC7_A::VALUE7)
1020 }
1021 #[doc = "Input inverted - No internal pull device, Pn_OUTx = input value"]
1022 #[inline(always)]
1023 pub fn value8(self) -> &'a mut crate::W<REG> {
1024 self.variant(PC7_A::VALUE8)
1025 }
1026 #[doc = "Output Push-Pull - General-purpose output"]
1027 #[inline(always)]
1028 pub fn value9(self) -> &'a mut crate::W<REG> {
1029 self.variant(PC7_A::VALUE9)
1030 }
1031 #[doc = "Output Push-Pull - Alternate output function 1"]
1032 #[inline(always)]
1033 pub fn value10(self) -> &'a mut crate::W<REG> {
1034 self.variant(PC7_A::VALUE10)
1035 }
1036 #[doc = "Output Push-Pull - Alternate output function 2"]
1037 #[inline(always)]
1038 pub fn value11(self) -> &'a mut crate::W<REG> {
1039 self.variant(PC7_A::VALUE11)
1040 }
1041 #[doc = "Output Push-Pull - Alternate output function 3"]
1042 #[inline(always)]
1043 pub fn value12(self) -> &'a mut crate::W<REG> {
1044 self.variant(PC7_A::VALUE12)
1045 }
1046 #[doc = "Output Push-Pull - Alternate output function 4"]
1047 #[inline(always)]
1048 pub fn value13(self) -> &'a mut crate::W<REG> {
1049 self.variant(PC7_A::VALUE13)
1050 }
1051 #[doc = "Output Open Drain - General-purpose output"]
1052 #[inline(always)]
1053 pub fn value14(self) -> &'a mut crate::W<REG> {
1054 self.variant(PC7_A::VALUE14)
1055 }
1056 #[doc = "Output Open Drain - Alternate output function 1"]
1057 #[inline(always)]
1058 pub fn value15(self) -> &'a mut crate::W<REG> {
1059 self.variant(PC7_A::VALUE15)
1060 }
1061 #[doc = "Output Open Drain - Alternate output function 2"]
1062 #[inline(always)]
1063 pub fn value16(self) -> &'a mut crate::W<REG> {
1064 self.variant(PC7_A::VALUE16)
1065 }
1066 #[doc = "Output Open Drain - Alternate output function 3"]
1067 #[inline(always)]
1068 pub fn value17(self) -> &'a mut crate::W<REG> {
1069 self.variant(PC7_A::VALUE17)
1070 }
1071 #[doc = "Output Open Drain - Alternate output function 4"]
1072 #[inline(always)]
1073 pub fn value18(self) -> &'a mut crate::W<REG> {
1074 self.variant(PC7_A::VALUE18)
1075 }
1076}
1077impl R {
1078 #[doc = "Bits 3:7 - Port Control for Port n Pin 4 to 7"]
1079 #[inline(always)]
1080 pub fn pc4(&self) -> PC4_R {
1081 PC4_R::new(((self.bits >> 3) & 0x1f) as u8)
1082 }
1083 #[doc = "Bits 11:15 - Port Control for Port n Pin 4 to 7"]
1084 #[inline(always)]
1085 pub fn pc5(&self) -> PC5_R {
1086 PC5_R::new(((self.bits >> 11) & 0x1f) as u8)
1087 }
1088 #[doc = "Bits 19:23 - Port Control for Port n Pin 4 to 7"]
1089 #[inline(always)]
1090 pub fn pc6(&self) -> PC6_R {
1091 PC6_R::new(((self.bits >> 19) & 0x1f) as u8)
1092 }
1093 #[doc = "Bits 27:31 - Port Control for Port n Pin 4 to 7"]
1094 #[inline(always)]
1095 pub fn pc7(&self) -> PC7_R {
1096 PC7_R::new(((self.bits >> 27) & 0x1f) as u8)
1097 }
1098}
1099impl W {
1100 #[doc = "Bits 3:7 - Port Control for Port n Pin 4 to 7"]
1101 #[inline(always)]
1102 pub fn pc4(&mut self) -> PC4_W<IOCR4_SPEC> {
1103 PC4_W::new(self, 3)
1104 }
1105 #[doc = "Bits 11:15 - Port Control for Port n Pin 4 to 7"]
1106 #[inline(always)]
1107 pub fn pc5(&mut self) -> PC5_W<IOCR4_SPEC> {
1108 PC5_W::new(self, 11)
1109 }
1110 #[doc = "Bits 19:23 - Port Control for Port n Pin 4 to 7"]
1111 #[inline(always)]
1112 pub fn pc6(&mut self) -> PC6_W<IOCR4_SPEC> {
1113 PC6_W::new(self, 19)
1114 }
1115 #[doc = "Bits 27:31 - Port Control for Port n Pin 4 to 7"]
1116 #[inline(always)]
1117 pub fn pc7(&mut self) -> PC7_W<IOCR4_SPEC> {
1118 PC7_W::new(self, 27)
1119 }
1120}
1121#[doc = "Port 2 Input/Output Control Register 4\n\nYou can [`read`](crate::Reg::read) this register and get [`iocr4::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`iocr4::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
1122pub struct IOCR4_SPEC;
1123impl crate::RegisterSpec for IOCR4_SPEC {
1124 type Ux = u32;
1125}
1126#[doc = "`read()` method returns [`iocr4::R`](R) reader structure"]
1127impl crate::Readable for IOCR4_SPEC {}
1128#[doc = "`write(|w| ..)` method takes [`iocr4::W`](W) writer structure"]
1129impl crate::Writable for IOCR4_SPEC {
1130 type Safety = crate::Unsafe;
1131 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
1132 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
1133}
1134#[doc = "`reset()` method sets IOCR4 to value 0"]
1135impl crate::Resettable for IOCR4_SPEC {
1136 const RESET_VALUE: u32 = 0;
1137}