1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
#[doc = "Reader of register OSPD"]
pub type R = crate::R<u32, super::OSPD>;
#[doc = "Writer for register OSPD"]
pub type W = crate::W<u32, super::OSPD>;
#[doc = "Register OSPD `reset()`'s with value 0"]
impl crate::ResetValue for super::OSPD {
    type Type = u32;
    #[inline(always)]
    fn reset_value() -> Self::Type {
        0
    }
}
#[doc = "Pin 15 output max speed bits\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum OSPD15_A {
    #[doc = "0: Max output speed 2 MHz"]
    SPEED2M = 0,
    #[doc = "1: Max output speed 10 MHz"]
    SPEED10M = 1,
    #[doc = "3: Max output speed 50 MHz"]
    SPEED50M = 3,
}
impl From<OSPD15_A> for u8 {
    #[inline(always)]
    fn from(variant: OSPD15_A) -> Self {
        variant as _
    }
}
#[doc = "Reader of field `OSPD15`"]
pub type OSPD15_R = crate::R<u8, OSPD15_A>;
impl OSPD15_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, OSPD15_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(OSPD15_A::SPEED2M),
            1 => Val(OSPD15_A::SPEED10M),
            3 => Val(OSPD15_A::SPEED50M),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `SPEED2M`"]
    #[inline(always)]
    pub fn is_speed2m(&self) -> bool {
        *self == OSPD15_A::SPEED2M
    }
    #[doc = "Checks if the value of the field is `SPEED10M`"]
    #[inline(always)]
    pub fn is_speed10m(&self) -> bool {
        *self == OSPD15_A::SPEED10M
    }
    #[doc = "Checks if the value of the field is `SPEED50M`"]
    #[inline(always)]
    pub fn is_speed50m(&self) -> bool {
        *self == OSPD15_A::SPEED50M
    }
}
#[doc = "Write proxy for field `OSPD15`"]
pub struct OSPD15_W<'a> {
    w: &'a mut W,
}
impl<'a> OSPD15_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OSPD15_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "Max output speed 2 MHz"]
    #[inline(always)]
    pub fn speed2m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED2M)
    }
    #[doc = "Max output speed 10 MHz"]
    #[inline(always)]
    pub fn speed10m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED10M)
    }
    #[doc = "Max output speed 50 MHz"]
    #[inline(always)]
    pub fn speed50m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED50M)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 30)) | (((value as u32) & 0x03) << 30);
        self.w
    }
}
#[doc = "Pin 14 output max speed bits"]
pub type OSPD14_A = OSPD15_A;
#[doc = "Reader of field `OSPD14`"]
pub type OSPD14_R = crate::R<u8, OSPD15_A>;
#[doc = "Write proxy for field `OSPD14`"]
pub struct OSPD14_W<'a> {
    w: &'a mut W,
}
impl<'a> OSPD14_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OSPD14_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "Max output speed 2 MHz"]
    #[inline(always)]
    pub fn speed2m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED2M)
    }
    #[doc = "Max output speed 10 MHz"]
    #[inline(always)]
    pub fn speed10m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED10M)
    }
    #[doc = "Max output speed 50 MHz"]
    #[inline(always)]
    pub fn speed50m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED50M)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 28)) | (((value as u32) & 0x03) << 28);
        self.w
    }
}
#[doc = "Pin 13 output max speed bits"]
pub type OSPD13_A = OSPD15_A;
#[doc = "Reader of field `OSPD13`"]
pub type OSPD13_R = crate::R<u8, OSPD15_A>;
#[doc = "Write proxy for field `OSPD13`"]
pub struct OSPD13_W<'a> {
    w: &'a mut W,
}
impl<'a> OSPD13_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OSPD13_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "Max output speed 2 MHz"]
    #[inline(always)]
    pub fn speed2m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED2M)
    }
    #[doc = "Max output speed 10 MHz"]
    #[inline(always)]
    pub fn speed10m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED10M)
    }
    #[doc = "Max output speed 50 MHz"]
    #[inline(always)]
    pub fn speed50m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED50M)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 26)) | (((value as u32) & 0x03) << 26);
        self.w
    }
}
#[doc = "Pin 12 output max speed bits"]
pub type OSPD12_A = OSPD15_A;
#[doc = "Reader of field `OSPD12`"]
pub type OSPD12_R = crate::R<u8, OSPD15_A>;
#[doc = "Write proxy for field `OSPD12`"]
pub struct OSPD12_W<'a> {
    w: &'a mut W,
}
impl<'a> OSPD12_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OSPD12_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "Max output speed 2 MHz"]
    #[inline(always)]
    pub fn speed2m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED2M)
    }
    #[doc = "Max output speed 10 MHz"]
    #[inline(always)]
    pub fn speed10m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED10M)
    }
    #[doc = "Max output speed 50 MHz"]
    #[inline(always)]
    pub fn speed50m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED50M)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 24)) | (((value as u32) & 0x03) << 24);
        self.w
    }
}
#[doc = "Pin 11 output max speed bits"]
pub type OSPD11_A = OSPD15_A;
#[doc = "Reader of field `OSPD11`"]
pub type OSPD11_R = crate::R<u8, OSPD15_A>;
#[doc = "Write proxy for field `OSPD11`"]
pub struct OSPD11_W<'a> {
    w: &'a mut W,
}
impl<'a> OSPD11_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OSPD11_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "Max output speed 2 MHz"]
    #[inline(always)]
    pub fn speed2m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED2M)
    }
    #[doc = "Max output speed 10 MHz"]
    #[inline(always)]
    pub fn speed10m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED10M)
    }
    #[doc = "Max output speed 50 MHz"]
    #[inline(always)]
    pub fn speed50m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED50M)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 22)) | (((value as u32) & 0x03) << 22);
        self.w
    }
}
#[doc = "Pin 10 output max speed bits"]
pub type OSPD10_A = OSPD15_A;
#[doc = "Reader of field `OSPD10`"]
pub type OSPD10_R = crate::R<u8, OSPD15_A>;
#[doc = "Write proxy for field `OSPD10`"]
pub struct OSPD10_W<'a> {
    w: &'a mut W,
}
impl<'a> OSPD10_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OSPD10_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "Max output speed 2 MHz"]
    #[inline(always)]
    pub fn speed2m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED2M)
    }
    #[doc = "Max output speed 10 MHz"]
    #[inline(always)]
    pub fn speed10m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED10M)
    }
    #[doc = "Max output speed 50 MHz"]
    #[inline(always)]
    pub fn speed50m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED50M)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 20)) | (((value as u32) & 0x03) << 20);
        self.w
    }
}
#[doc = "Pin 9 output max speed bits"]
pub type OSPD9_A = OSPD15_A;
#[doc = "Reader of field `OSPD9`"]
pub type OSPD9_R = crate::R<u8, OSPD15_A>;
#[doc = "Write proxy for field `OSPD9`"]
pub struct OSPD9_W<'a> {
    w: &'a mut W,
}
impl<'a> OSPD9_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OSPD9_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "Max output speed 2 MHz"]
    #[inline(always)]
    pub fn speed2m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED2M)
    }
    #[doc = "Max output speed 10 MHz"]
    #[inline(always)]
    pub fn speed10m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED10M)
    }
    #[doc = "Max output speed 50 MHz"]
    #[inline(always)]
    pub fn speed50m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED50M)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 18)) | (((value as u32) & 0x03) << 18);
        self.w
    }
}
#[doc = "Pin 8 output max speed bits"]
pub type OSPD8_A = OSPD15_A;
#[doc = "Reader of field `OSPD8`"]
pub type OSPD8_R = crate::R<u8, OSPD15_A>;
#[doc = "Write proxy for field `OSPD8`"]
pub struct OSPD8_W<'a> {
    w: &'a mut W,
}
impl<'a> OSPD8_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OSPD8_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "Max output speed 2 MHz"]
    #[inline(always)]
    pub fn speed2m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED2M)
    }
    #[doc = "Max output speed 10 MHz"]
    #[inline(always)]
    pub fn speed10m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED10M)
    }
    #[doc = "Max output speed 50 MHz"]
    #[inline(always)]
    pub fn speed50m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED50M)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 16)) | (((value as u32) & 0x03) << 16);
        self.w
    }
}
#[doc = "Pin 7 output max speed bits"]
pub type OSPD7_A = OSPD15_A;
#[doc = "Reader of field `OSPD7`"]
pub type OSPD7_R = crate::R<u8, OSPD15_A>;
#[doc = "Write proxy for field `OSPD7`"]
pub struct OSPD7_W<'a> {
    w: &'a mut W,
}
impl<'a> OSPD7_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OSPD7_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "Max output speed 2 MHz"]
    #[inline(always)]
    pub fn speed2m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED2M)
    }
    #[doc = "Max output speed 10 MHz"]
    #[inline(always)]
    pub fn speed10m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED10M)
    }
    #[doc = "Max output speed 50 MHz"]
    #[inline(always)]
    pub fn speed50m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED50M)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 14)) | (((value as u32) & 0x03) << 14);
        self.w
    }
}
#[doc = "Pin 6 output max speed bits"]
pub type OSPD6_A = OSPD15_A;
#[doc = "Reader of field `OSPD6`"]
pub type OSPD6_R = crate::R<u8, OSPD15_A>;
#[doc = "Write proxy for field `OSPD6`"]
pub struct OSPD6_W<'a> {
    w: &'a mut W,
}
impl<'a> OSPD6_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OSPD6_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "Max output speed 2 MHz"]
    #[inline(always)]
    pub fn speed2m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED2M)
    }
    #[doc = "Max output speed 10 MHz"]
    #[inline(always)]
    pub fn speed10m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED10M)
    }
    #[doc = "Max output speed 50 MHz"]
    #[inline(always)]
    pub fn speed50m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED50M)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12);
        self.w
    }
}
#[doc = "Pin 5 output max speed bits"]
pub type OSPD5_A = OSPD15_A;
#[doc = "Reader of field `OSPD5`"]
pub type OSPD5_R = crate::R<u8, OSPD15_A>;
#[doc = "Write proxy for field `OSPD5`"]
pub struct OSPD5_W<'a> {
    w: &'a mut W,
}
impl<'a> OSPD5_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OSPD5_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "Max output speed 2 MHz"]
    #[inline(always)]
    pub fn speed2m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED2M)
    }
    #[doc = "Max output speed 10 MHz"]
    #[inline(always)]
    pub fn speed10m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED10M)
    }
    #[doc = "Max output speed 50 MHz"]
    #[inline(always)]
    pub fn speed50m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED50M)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u32) & 0x03) << 10);
        self.w
    }
}
#[doc = "Pin 4 output max speed bits"]
pub type OSPD4_A = OSPD15_A;
#[doc = "Reader of field `OSPD4`"]
pub type OSPD4_R = crate::R<u8, OSPD15_A>;
#[doc = "Write proxy for field `OSPD4`"]
pub struct OSPD4_W<'a> {
    w: &'a mut W,
}
impl<'a> OSPD4_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OSPD4_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "Max output speed 2 MHz"]
    #[inline(always)]
    pub fn speed2m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED2M)
    }
    #[doc = "Max output speed 10 MHz"]
    #[inline(always)]
    pub fn speed10m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED10M)
    }
    #[doc = "Max output speed 50 MHz"]
    #[inline(always)]
    pub fn speed50m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED50M)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8);
        self.w
    }
}
#[doc = "Pin 3 output max speed bits"]
pub type OSPD3_A = OSPD15_A;
#[doc = "Reader of field `OSPD3`"]
pub type OSPD3_R = crate::R<u8, OSPD15_A>;
#[doc = "Write proxy for field `OSPD3`"]
pub struct OSPD3_W<'a> {
    w: &'a mut W,
}
impl<'a> OSPD3_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OSPD3_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "Max output speed 2 MHz"]
    #[inline(always)]
    pub fn speed2m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED2M)
    }
    #[doc = "Max output speed 10 MHz"]
    #[inline(always)]
    pub fn speed10m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED10M)
    }
    #[doc = "Max output speed 50 MHz"]
    #[inline(always)]
    pub fn speed50m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED50M)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 6)) | (((value as u32) & 0x03) << 6);
        self.w
    }
}
#[doc = "Pin 2 output max speed bits"]
pub type OSPD2_A = OSPD15_A;
#[doc = "Reader of field `OSPD2`"]
pub type OSPD2_R = crate::R<u8, OSPD15_A>;
#[doc = "Write proxy for field `OSPD2`"]
pub struct OSPD2_W<'a> {
    w: &'a mut W,
}
impl<'a> OSPD2_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OSPD2_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "Max output speed 2 MHz"]
    #[inline(always)]
    pub fn speed2m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED2M)
    }
    #[doc = "Max output speed 10 MHz"]
    #[inline(always)]
    pub fn speed10m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED10M)
    }
    #[doc = "Max output speed 50 MHz"]
    #[inline(always)]
    pub fn speed50m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED50M)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 4)) | (((value as u32) & 0x03) << 4);
        self.w
    }
}
#[doc = "Pin 1 output max speed bits"]
pub type OSPD1_A = OSPD15_A;
#[doc = "Reader of field `OSPD1`"]
pub type OSPD1_R = crate::R<u8, OSPD15_A>;
#[doc = "Write proxy for field `OSPD1`"]
pub struct OSPD1_W<'a> {
    w: &'a mut W,
}
impl<'a> OSPD1_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OSPD1_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "Max output speed 2 MHz"]
    #[inline(always)]
    pub fn speed2m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED2M)
    }
    #[doc = "Max output speed 10 MHz"]
    #[inline(always)]
    pub fn speed10m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED10M)
    }
    #[doc = "Max output speed 50 MHz"]
    #[inline(always)]
    pub fn speed50m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED50M)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 2)) | (((value as u32) & 0x03) << 2);
        self.w
    }
}
#[doc = "Pin 0 output max speed bits"]
pub type OSPD0_A = OSPD15_A;
#[doc = "Reader of field `OSPD0`"]
pub type OSPD0_R = crate::R<u8, OSPD15_A>;
#[doc = "Write proxy for field `OSPD0`"]
pub struct OSPD0_W<'a> {
    w: &'a mut W,
}
impl<'a> OSPD0_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: OSPD0_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "Max output speed 2 MHz"]
    #[inline(always)]
    pub fn speed2m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED2M)
    }
    #[doc = "Max output speed 10 MHz"]
    #[inline(always)]
    pub fn speed10m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED10M)
    }
    #[doc = "Max output speed 50 MHz"]
    #[inline(always)]
    pub fn speed50m(self) -> &'a mut W {
        self.variant(OSPD15_A::SPEED50M)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !0x03) | ((value as u32) & 0x03);
        self.w
    }
}
impl R {
    #[doc = "Bits 30:31 - Pin 15 output max speed bits"]
    #[inline(always)]
    pub fn ospd15(&self) -> OSPD15_R {
        OSPD15_R::new(((self.bits >> 30) & 0x03) as u8)
    }
    #[doc = "Bits 28:29 - Pin 14 output max speed bits"]
    #[inline(always)]
    pub fn ospd14(&self) -> OSPD14_R {
        OSPD14_R::new(((self.bits >> 28) & 0x03) as u8)
    }
    #[doc = "Bits 26:27 - Pin 13 output max speed bits"]
    #[inline(always)]
    pub fn ospd13(&self) -> OSPD13_R {
        OSPD13_R::new(((self.bits >> 26) & 0x03) as u8)
    }
    #[doc = "Bits 24:25 - Pin 12 output max speed bits"]
    #[inline(always)]
    pub fn ospd12(&self) -> OSPD12_R {
        OSPD12_R::new(((self.bits >> 24) & 0x03) as u8)
    }
    #[doc = "Bits 22:23 - Pin 11 output max speed bits"]
    #[inline(always)]
    pub fn ospd11(&self) -> OSPD11_R {
        OSPD11_R::new(((self.bits >> 22) & 0x03) as u8)
    }
    #[doc = "Bits 20:21 - Pin 10 output max speed bits"]
    #[inline(always)]
    pub fn ospd10(&self) -> OSPD10_R {
        OSPD10_R::new(((self.bits >> 20) & 0x03) as u8)
    }
    #[doc = "Bits 18:19 - Pin 9 output max speed bits"]
    #[inline(always)]
    pub fn ospd9(&self) -> OSPD9_R {
        OSPD9_R::new(((self.bits >> 18) & 0x03) as u8)
    }
    #[doc = "Bits 16:17 - Pin 8 output max speed bits"]
    #[inline(always)]
    pub fn ospd8(&self) -> OSPD8_R {
        OSPD8_R::new(((self.bits >> 16) & 0x03) as u8)
    }
    #[doc = "Bits 14:15 - Pin 7 output max speed bits"]
    #[inline(always)]
    pub fn ospd7(&self) -> OSPD7_R {
        OSPD7_R::new(((self.bits >> 14) & 0x03) as u8)
    }
    #[doc = "Bits 12:13 - Pin 6 output max speed bits"]
    #[inline(always)]
    pub fn ospd6(&self) -> OSPD6_R {
        OSPD6_R::new(((self.bits >> 12) & 0x03) as u8)
    }
    #[doc = "Bits 10:11 - Pin 5 output max speed bits"]
    #[inline(always)]
    pub fn ospd5(&self) -> OSPD5_R {
        OSPD5_R::new(((self.bits >> 10) & 0x03) as u8)
    }
    #[doc = "Bits 8:9 - Pin 4 output max speed bits"]
    #[inline(always)]
    pub fn ospd4(&self) -> OSPD4_R {
        OSPD4_R::new(((self.bits >> 8) & 0x03) as u8)
    }
    #[doc = "Bits 6:7 - Pin 3 output max speed bits"]
    #[inline(always)]
    pub fn ospd3(&self) -> OSPD3_R {
        OSPD3_R::new(((self.bits >> 6) & 0x03) as u8)
    }
    #[doc = "Bits 4:5 - Pin 2 output max speed bits"]
    #[inline(always)]
    pub fn ospd2(&self) -> OSPD2_R {
        OSPD2_R::new(((self.bits >> 4) & 0x03) as u8)
    }
    #[doc = "Bits 2:3 - Pin 1 output max speed bits"]
    #[inline(always)]
    pub fn ospd1(&self) -> OSPD1_R {
        OSPD1_R::new(((self.bits >> 2) & 0x03) as u8)
    }
    #[doc = "Bits 0:1 - Pin 0 output max speed bits"]
    #[inline(always)]
    pub fn ospd0(&self) -> OSPD0_R {
        OSPD0_R::new((self.bits & 0x03) as u8)
    }
}
impl W {
    #[doc = "Bits 30:31 - Pin 15 output max speed bits"]
    #[inline(always)]
    pub fn ospd15(&mut self) -> OSPD15_W {
        OSPD15_W { w: self }
    }
    #[doc = "Bits 28:29 - Pin 14 output max speed bits"]
    #[inline(always)]
    pub fn ospd14(&mut self) -> OSPD14_W {
        OSPD14_W { w: self }
    }
    #[doc = "Bits 26:27 - Pin 13 output max speed bits"]
    #[inline(always)]
    pub fn ospd13(&mut self) -> OSPD13_W {
        OSPD13_W { w: self }
    }
    #[doc = "Bits 24:25 - Pin 12 output max speed bits"]
    #[inline(always)]
    pub fn ospd12(&mut self) -> OSPD12_W {
        OSPD12_W { w: self }
    }
    #[doc = "Bits 22:23 - Pin 11 output max speed bits"]
    #[inline(always)]
    pub fn ospd11(&mut self) -> OSPD11_W {
        OSPD11_W { w: self }
    }
    #[doc = "Bits 20:21 - Pin 10 output max speed bits"]
    #[inline(always)]
    pub fn ospd10(&mut self) -> OSPD10_W {
        OSPD10_W { w: self }
    }
    #[doc = "Bits 18:19 - Pin 9 output max speed bits"]
    #[inline(always)]
    pub fn ospd9(&mut self) -> OSPD9_W {
        OSPD9_W { w: self }
    }
    #[doc = "Bits 16:17 - Pin 8 output max speed bits"]
    #[inline(always)]
    pub fn ospd8(&mut self) -> OSPD8_W {
        OSPD8_W { w: self }
    }
    #[doc = "Bits 14:15 - Pin 7 output max speed bits"]
    #[inline(always)]
    pub fn ospd7(&mut self) -> OSPD7_W {
        OSPD7_W { w: self }
    }
    #[doc = "Bits 12:13 - Pin 6 output max speed bits"]
    #[inline(always)]
    pub fn ospd6(&mut self) -> OSPD6_W {
        OSPD6_W { w: self }
    }
    #[doc = "Bits 10:11 - Pin 5 output max speed bits"]
    #[inline(always)]
    pub fn ospd5(&mut self) -> OSPD5_W {
        OSPD5_W { w: self }
    }
    #[doc = "Bits 8:9 - Pin 4 output max speed bits"]
    #[inline(always)]
    pub fn ospd4(&mut self) -> OSPD4_W {
        OSPD4_W { w: self }
    }
    #[doc = "Bits 6:7 - Pin 3 output max speed bits"]
    #[inline(always)]
    pub fn ospd3(&mut self) -> OSPD3_W {
        OSPD3_W { w: self }
    }
    #[doc = "Bits 4:5 - Pin 2 output max speed bits"]
    #[inline(always)]
    pub fn ospd2(&mut self) -> OSPD2_W {
        OSPD2_W { w: self }
    }
    #[doc = "Bits 2:3 - Pin 1 output max speed bits"]
    #[inline(always)]
    pub fn ospd1(&mut self) -> OSPD1_W {
        OSPD1_W { w: self }
    }
    #[doc = "Bits 0:1 - Pin 0 output max speed bits"]
    #[inline(always)]
    pub fn ospd0(&mut self) -> OSPD0_W {
        OSPD0_W { w: self }
    }
}