d1-pac 0.0.32

Peripheral access API for Allwinner D1 SoC generated from unofficial SVD file
Documentation
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
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
#[doc = "Register `cir_rxsta` reader"]
pub type R = crate::R<CIR_RXSTA_SPEC>;
#[doc = "Register `cir_rxsta` writer"]
pub type W = crate::W<CIR_RXSTA_SPEC>;
#[doc = "Field `roi` reader - Receiver FIFO Overrun"]
pub type ROI_R = crate::BitReader<ROI_A>;
#[doc = "Receiver FIFO Overrun\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ROI_A {
    #[doc = "0: Receiver FIFO not overrun"]
    NOT_OVERRUN = 0,
    #[doc = "1: Receiver FIFO overrun"]
    OVERRUN = 1,
}
impl From<ROI_A> for bool {
    #[inline(always)]
    fn from(variant: ROI_A) -> Self {
        variant as u8 != 0
    }
}
impl ROI_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> ROI_A {
        match self.bits {
            false => ROI_A::NOT_OVERRUN,
            true => ROI_A::OVERRUN,
        }
    }
    #[doc = "Receiver FIFO not overrun"]
    #[inline(always)]
    pub fn is_not_overrun(&self) -> bool {
        *self == ROI_A::NOT_OVERRUN
    }
    #[doc = "Receiver FIFO overrun"]
    #[inline(always)]
    pub fn is_overrun(&self) -> bool {
        *self == ROI_A::OVERRUN
    }
}
#[doc = "Field `roi` writer - Receiver FIFO Overrun"]
pub type ROI_W<'a, REG> = crate::BitWriter1C<'a, REG, ROI_A>;
impl<'a, REG> ROI_W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Receiver FIFO not overrun"]
    #[inline(always)]
    pub fn not_overrun(self) -> &'a mut crate::W<REG> {
        self.variant(ROI_A::NOT_OVERRUN)
    }
    #[doc = "Receiver FIFO overrun"]
    #[inline(always)]
    pub fn overrun(self) -> &'a mut crate::W<REG> {
        self.variant(ROI_A::OVERRUN)
    }
}
#[doc = "Field `rpe` reader - Receiver Packet End Flag"]
pub type RPE_R = crate::BitReader<RPE_A>;
#[doc = "Receiver Packet End Flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RPE_A {
    #[doc = "0: STO was not detected. In CIR mode, one CIR symbol is receiving or not detected."]
    NOT_DETECTED = 0,
    #[doc = "1: STO field or packet abort symbol (7'b0000,000 and 8'b0000,0000 for MIR and FIR) is detected. In CIR mode, one CIR symbol is received."]
    STO_FIELD = 1,
}
impl From<RPE_A> for bool {
    #[inline(always)]
    fn from(variant: RPE_A) -> Self {
        variant as u8 != 0
    }
}
impl RPE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> RPE_A {
        match self.bits {
            false => RPE_A::NOT_DETECTED,
            true => RPE_A::STO_FIELD,
        }
    }
    #[doc = "STO was not detected. In CIR mode, one CIR symbol is receiving or not detected."]
    #[inline(always)]
    pub fn is_not_detected(&self) -> bool {
        *self == RPE_A::NOT_DETECTED
    }
    #[doc = "STO field or packet abort symbol (7'b0000,000 and 8'b0000,0000 for MIR and FIR) is detected. In CIR mode, one CIR symbol is received."]
    #[inline(always)]
    pub fn is_sto_field(&self) -> bool {
        *self == RPE_A::STO_FIELD
    }
}
#[doc = "Field `rpe` writer - Receiver Packet End Flag"]
pub type RPE_W<'a, REG> = crate::BitWriter1C<'a, REG, RPE_A>;
impl<'a, REG> RPE_W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "STO was not detected. In CIR mode, one CIR symbol is receiving or not detected."]
    #[inline(always)]
    pub fn not_detected(self) -> &'a mut crate::W<REG> {
        self.variant(RPE_A::NOT_DETECTED)
    }
    #[doc = "STO field or packet abort symbol (7'b0000,000 and 8'b0000,0000 for MIR and FIR) is detected. In CIR mode, one CIR symbol is received."]
    #[inline(always)]
    pub fn sto_field(self) -> &'a mut crate::W<REG> {
        self.variant(RPE_A::STO_FIELD)
    }
}
#[doc = "Field `ra` reader - RX FIFO Available"]
pub type RA_R = crate::BitReader<RA_A>;
#[doc = "RX FIFO Available\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RA_A {
    #[doc = "0: RX FIFO not available according to its level"]
    NO_AVAILABLE = 0,
    #[doc = "1: RX FIFO available according to its level Writing 1 clears this bit."]
    AVAILABLE = 1,
}
impl From<RA_A> for bool {
    #[inline(always)]
    fn from(variant: RA_A) -> Self {
        variant as u8 != 0
    }
}
impl RA_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> RA_A {
        match self.bits {
            false => RA_A::NO_AVAILABLE,
            true => RA_A::AVAILABLE,
        }
    }
    #[doc = "RX FIFO not available according to its level"]
    #[inline(always)]
    pub fn is_no_available(&self) -> bool {
        *self == RA_A::NO_AVAILABLE
    }
    #[doc = "RX FIFO available according to its level Writing 1 clears this bit."]
    #[inline(always)]
    pub fn is_available(&self) -> bool {
        *self == RA_A::AVAILABLE
    }
}
#[doc = "Field `ra` writer - RX FIFO Available"]
pub type RA_W<'a, REG> = crate::BitWriter1C<'a, REG, RA_A>;
impl<'a, REG> RA_W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "RX FIFO not available according to its level"]
    #[inline(always)]
    pub fn no_available(self) -> &'a mut crate::W<REG> {
        self.variant(RA_A::NO_AVAILABLE)
    }
    #[doc = "RX FIFO available according to its level Writing 1 clears this bit."]
    #[inline(always)]
    pub fn available(self) -> &'a mut crate::W<REG> {
        self.variant(RA_A::AVAILABLE)
    }
}
#[doc = "Field `stat` reader - Status of CIR"]
pub type STAT_R = crate::BitReader<STAT_A>;
#[doc = "Status of CIR\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum STAT_A {
    #[doc = "0: Idle"]
    IDLE = 0,
    #[doc = "1: Busy"]
    BUSY = 1,
}
impl From<STAT_A> for bool {
    #[inline(always)]
    fn from(variant: STAT_A) -> Self {
        variant as u8 != 0
    }
}
impl STAT_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> STAT_A {
        match self.bits {
            false => STAT_A::IDLE,
            true => STAT_A::BUSY,
        }
    }
    #[doc = "Idle"]
    #[inline(always)]
    pub fn is_idle(&self) -> bool {
        *self == STAT_A::IDLE
    }
    #[doc = "Busy"]
    #[inline(always)]
    pub fn is_busy(&self) -> bool {
        *self == STAT_A::BUSY
    }
}
#[doc = "Field `rac` reader - RX FIFO Available Counter"]
pub type RAC_R = crate::FieldReader<RAC_A>;
#[doc = "RX FIFO Available Counter\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum RAC_A {
    #[doc = "0: No available data in RX FIFO"]
    B0 = 0,
    #[doc = "1: 1 byte available in RX FIFO"]
    B1 = 1,
    #[doc = "2: 2 bytes available in RX FIFO"]
    B2 = 2,
    #[doc = "3: 3 bytes available in RX FIFO"]
    B3 = 3,
    #[doc = "4: 4 bytes available in RX FIFO"]
    B4 = 4,
    #[doc = "5: 5 bytes available in RX FIFO"]
    B5 = 5,
    #[doc = "6: 6 bytes available in RX FIFO"]
    B6 = 6,
    #[doc = "7: 7 bytes available in RX FIFO"]
    B7 = 7,
    #[doc = "8: 8 bytes available in RX FIFO"]
    B8 = 8,
    #[doc = "9: 9 bytes available in RX FIFO"]
    B9 = 9,
    #[doc = "10: 10 bytes available in RX FIFO"]
    B10 = 10,
    #[doc = "11: 11 bytes available in RX FIFO"]
    B11 = 11,
    #[doc = "12: 12 bytes available in RX FIFO"]
    B12 = 12,
    #[doc = "13: 13 bytes available in RX FIFO"]
    B13 = 13,
    #[doc = "14: 14 bytes available in RX FIFO"]
    B14 = 14,
    #[doc = "15: 15 bytes available in RX FIFO"]
    B15 = 15,
    #[doc = "16: 16 bytes available in RX FIFO"]
    B16 = 16,
    #[doc = "17: 17 bytes available in RX FIFO"]
    B17 = 17,
    #[doc = "18: 18 bytes available in RX FIFO"]
    B18 = 18,
    #[doc = "19: 19 bytes available in RX FIFO"]
    B19 = 19,
    #[doc = "20: 20 bytes available in RX FIFO"]
    B20 = 20,
    #[doc = "21: 21 bytes available in RX FIFO"]
    B21 = 21,
    #[doc = "22: 22 bytes available in RX FIFO"]
    B22 = 22,
    #[doc = "23: 23 bytes available in RX FIFO"]
    B23 = 23,
    #[doc = "24: 24 bytes available in RX FIFO"]
    B24 = 24,
    #[doc = "25: 25 bytes available in RX FIFO"]
    B25 = 25,
    #[doc = "26: 26 bytes available in RX FIFO"]
    B26 = 26,
    #[doc = "27: 27 bytes available in RX FIFO"]
    B27 = 27,
    #[doc = "28: 28 bytes available in RX FIFO"]
    B28 = 28,
    #[doc = "29: 29 bytes available in RX FIFO"]
    B29 = 29,
    #[doc = "30: 30 bytes available in RX FIFO"]
    B30 = 30,
    #[doc = "31: 31 bytes available in RX FIFO"]
    B31 = 31,
    #[doc = "32: 32 bytes available in RX FIFO"]
    B32 = 32,
    #[doc = "33: 33 bytes available in RX FIFO"]
    B33 = 33,
    #[doc = "34: 34 bytes available in RX FIFO"]
    B34 = 34,
    #[doc = "35: 35 bytes available in RX FIFO"]
    B35 = 35,
    #[doc = "36: 36 bytes available in RX FIFO"]
    B36 = 36,
    #[doc = "37: 37 bytes available in RX FIFO"]
    B37 = 37,
    #[doc = "38: 38 bytes available in RX FIFO"]
    B38 = 38,
    #[doc = "39: 39 bytes available in RX FIFO"]
    B39 = 39,
    #[doc = "40: 40 bytes available in RX FIFO"]
    B40 = 40,
    #[doc = "41: 41 bytes available in RX FIFO"]
    B41 = 41,
    #[doc = "42: 42 bytes available in RX FIFO"]
    B42 = 42,
    #[doc = "43: 43 bytes available in RX FIFO"]
    B43 = 43,
    #[doc = "44: 44 bytes available in RX FIFO"]
    B44 = 44,
    #[doc = "45: 45 bytes available in RX FIFO"]
    B45 = 45,
    #[doc = "46: 46 bytes available in RX FIFO"]
    B46 = 46,
    #[doc = "47: 47 bytes available in RX FIFO"]
    B47 = 47,
    #[doc = "48: 48 bytes available in RX FIFO"]
    B48 = 48,
    #[doc = "49: 49 bytes available in RX FIFO"]
    B49 = 49,
    #[doc = "50: 50 bytes available in RX FIFO"]
    B50 = 50,
    #[doc = "51: 51 bytes available in RX FIFO"]
    B51 = 51,
    #[doc = "52: 52 bytes available in RX FIFO"]
    B52 = 52,
    #[doc = "53: 53 bytes available in RX FIFO"]
    B53 = 53,
    #[doc = "54: 54 bytes available in RX FIFO"]
    B54 = 54,
    #[doc = "55: 55 bytes available in RX FIFO"]
    B55 = 55,
    #[doc = "56: 56 bytes available in RX FIFO"]
    B56 = 56,
    #[doc = "57: 57 bytes available in RX FIFO"]
    B57 = 57,
    #[doc = "58: 58 bytes available in RX FIFO"]
    B58 = 58,
    #[doc = "59: 59 bytes available in RX FIFO"]
    B59 = 59,
    #[doc = "60: 60 bytes available in RX FIFO"]
    B60 = 60,
    #[doc = "61: 61 bytes available in RX FIFO"]
    B61 = 61,
    #[doc = "62: 62 bytes available in RX FIFO"]
    B62 = 62,
    #[doc = "63: 63 bytes available in RX FIFO"]
    B63 = 63,
    #[doc = "64: 64 bytes available in RX FIFO"]
    B64 = 64,
}
impl From<RAC_A> for u8 {
    #[inline(always)]
    fn from(variant: RAC_A) -> Self {
        variant as _
    }
}
impl crate::FieldSpec for RAC_A {
    type Ux = u8;
}
impl RAC_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Option<RAC_A> {
        match self.bits {
            0 => Some(RAC_A::B0),
            1 => Some(RAC_A::B1),
            2 => Some(RAC_A::B2),
            3 => Some(RAC_A::B3),
            4 => Some(RAC_A::B4),
            5 => Some(RAC_A::B5),
            6 => Some(RAC_A::B6),
            7 => Some(RAC_A::B7),
            8 => Some(RAC_A::B8),
            9 => Some(RAC_A::B9),
            10 => Some(RAC_A::B10),
            11 => Some(RAC_A::B11),
            12 => Some(RAC_A::B12),
            13 => Some(RAC_A::B13),
            14 => Some(RAC_A::B14),
            15 => Some(RAC_A::B15),
            16 => Some(RAC_A::B16),
            17 => Some(RAC_A::B17),
            18 => Some(RAC_A::B18),
            19 => Some(RAC_A::B19),
            20 => Some(RAC_A::B20),
            21 => Some(RAC_A::B21),
            22 => Some(RAC_A::B22),
            23 => Some(RAC_A::B23),
            24 => Some(RAC_A::B24),
            25 => Some(RAC_A::B25),
            26 => Some(RAC_A::B26),
            27 => Some(RAC_A::B27),
            28 => Some(RAC_A::B28),
            29 => Some(RAC_A::B29),
            30 => Some(RAC_A::B30),
            31 => Some(RAC_A::B31),
            32 => Some(RAC_A::B32),
            33 => Some(RAC_A::B33),
            34 => Some(RAC_A::B34),
            35 => Some(RAC_A::B35),
            36 => Some(RAC_A::B36),
            37 => Some(RAC_A::B37),
            38 => Some(RAC_A::B38),
            39 => Some(RAC_A::B39),
            40 => Some(RAC_A::B40),
            41 => Some(RAC_A::B41),
            42 => Some(RAC_A::B42),
            43 => Some(RAC_A::B43),
            44 => Some(RAC_A::B44),
            45 => Some(RAC_A::B45),
            46 => Some(RAC_A::B46),
            47 => Some(RAC_A::B47),
            48 => Some(RAC_A::B48),
            49 => Some(RAC_A::B49),
            50 => Some(RAC_A::B50),
            51 => Some(RAC_A::B51),
            52 => Some(RAC_A::B52),
            53 => Some(RAC_A::B53),
            54 => Some(RAC_A::B54),
            55 => Some(RAC_A::B55),
            56 => Some(RAC_A::B56),
            57 => Some(RAC_A::B57),
            58 => Some(RAC_A::B58),
            59 => Some(RAC_A::B59),
            60 => Some(RAC_A::B60),
            61 => Some(RAC_A::B61),
            62 => Some(RAC_A::B62),
            63 => Some(RAC_A::B63),
            64 => Some(RAC_A::B64),
            _ => None,
        }
    }
    #[doc = "No available data in RX FIFO"]
    #[inline(always)]
    pub fn is_b0(&self) -> bool {
        *self == RAC_A::B0
    }
    #[doc = "1 byte available in RX FIFO"]
    #[inline(always)]
    pub fn is_b1(&self) -> bool {
        *self == RAC_A::B1
    }
    #[doc = "2 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b2(&self) -> bool {
        *self == RAC_A::B2
    }
    #[doc = "3 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b3(&self) -> bool {
        *self == RAC_A::B3
    }
    #[doc = "4 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b4(&self) -> bool {
        *self == RAC_A::B4
    }
    #[doc = "5 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b5(&self) -> bool {
        *self == RAC_A::B5
    }
    #[doc = "6 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b6(&self) -> bool {
        *self == RAC_A::B6
    }
    #[doc = "7 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b7(&self) -> bool {
        *self == RAC_A::B7
    }
    #[doc = "8 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b8(&self) -> bool {
        *self == RAC_A::B8
    }
    #[doc = "9 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b9(&self) -> bool {
        *self == RAC_A::B9
    }
    #[doc = "10 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b10(&self) -> bool {
        *self == RAC_A::B10
    }
    #[doc = "11 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b11(&self) -> bool {
        *self == RAC_A::B11
    }
    #[doc = "12 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b12(&self) -> bool {
        *self == RAC_A::B12
    }
    #[doc = "13 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b13(&self) -> bool {
        *self == RAC_A::B13
    }
    #[doc = "14 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b14(&self) -> bool {
        *self == RAC_A::B14
    }
    #[doc = "15 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b15(&self) -> bool {
        *self == RAC_A::B15
    }
    #[doc = "16 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b16(&self) -> bool {
        *self == RAC_A::B16
    }
    #[doc = "17 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b17(&self) -> bool {
        *self == RAC_A::B17
    }
    #[doc = "18 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b18(&self) -> bool {
        *self == RAC_A::B18
    }
    #[doc = "19 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b19(&self) -> bool {
        *self == RAC_A::B19
    }
    #[doc = "20 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b20(&self) -> bool {
        *self == RAC_A::B20
    }
    #[doc = "21 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b21(&self) -> bool {
        *self == RAC_A::B21
    }
    #[doc = "22 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b22(&self) -> bool {
        *self == RAC_A::B22
    }
    #[doc = "23 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b23(&self) -> bool {
        *self == RAC_A::B23
    }
    #[doc = "24 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b24(&self) -> bool {
        *self == RAC_A::B24
    }
    #[doc = "25 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b25(&self) -> bool {
        *self == RAC_A::B25
    }
    #[doc = "26 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b26(&self) -> bool {
        *self == RAC_A::B26
    }
    #[doc = "27 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b27(&self) -> bool {
        *self == RAC_A::B27
    }
    #[doc = "28 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b28(&self) -> bool {
        *self == RAC_A::B28
    }
    #[doc = "29 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b29(&self) -> bool {
        *self == RAC_A::B29
    }
    #[doc = "30 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b30(&self) -> bool {
        *self == RAC_A::B30
    }
    #[doc = "31 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b31(&self) -> bool {
        *self == RAC_A::B31
    }
    #[doc = "32 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b32(&self) -> bool {
        *self == RAC_A::B32
    }
    #[doc = "33 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b33(&self) -> bool {
        *self == RAC_A::B33
    }
    #[doc = "34 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b34(&self) -> bool {
        *self == RAC_A::B34
    }
    #[doc = "35 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b35(&self) -> bool {
        *self == RAC_A::B35
    }
    #[doc = "36 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b36(&self) -> bool {
        *self == RAC_A::B36
    }
    #[doc = "37 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b37(&self) -> bool {
        *self == RAC_A::B37
    }
    #[doc = "38 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b38(&self) -> bool {
        *self == RAC_A::B38
    }
    #[doc = "39 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b39(&self) -> bool {
        *self == RAC_A::B39
    }
    #[doc = "40 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b40(&self) -> bool {
        *self == RAC_A::B40
    }
    #[doc = "41 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b41(&self) -> bool {
        *self == RAC_A::B41
    }
    #[doc = "42 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b42(&self) -> bool {
        *self == RAC_A::B42
    }
    #[doc = "43 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b43(&self) -> bool {
        *self == RAC_A::B43
    }
    #[doc = "44 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b44(&self) -> bool {
        *self == RAC_A::B44
    }
    #[doc = "45 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b45(&self) -> bool {
        *self == RAC_A::B45
    }
    #[doc = "46 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b46(&self) -> bool {
        *self == RAC_A::B46
    }
    #[doc = "47 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b47(&self) -> bool {
        *self == RAC_A::B47
    }
    #[doc = "48 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b48(&self) -> bool {
        *self == RAC_A::B48
    }
    #[doc = "49 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b49(&self) -> bool {
        *self == RAC_A::B49
    }
    #[doc = "50 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b50(&self) -> bool {
        *self == RAC_A::B50
    }
    #[doc = "51 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b51(&self) -> bool {
        *self == RAC_A::B51
    }
    #[doc = "52 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b52(&self) -> bool {
        *self == RAC_A::B52
    }
    #[doc = "53 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b53(&self) -> bool {
        *self == RAC_A::B53
    }
    #[doc = "54 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b54(&self) -> bool {
        *self == RAC_A::B54
    }
    #[doc = "55 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b55(&self) -> bool {
        *self == RAC_A::B55
    }
    #[doc = "56 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b56(&self) -> bool {
        *self == RAC_A::B56
    }
    #[doc = "57 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b57(&self) -> bool {
        *self == RAC_A::B57
    }
    #[doc = "58 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b58(&self) -> bool {
        *self == RAC_A::B58
    }
    #[doc = "59 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b59(&self) -> bool {
        *self == RAC_A::B59
    }
    #[doc = "60 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b60(&self) -> bool {
        *self == RAC_A::B60
    }
    #[doc = "61 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b61(&self) -> bool {
        *self == RAC_A::B61
    }
    #[doc = "62 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b62(&self) -> bool {
        *self == RAC_A::B62
    }
    #[doc = "63 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b63(&self) -> bool {
        *self == RAC_A::B63
    }
    #[doc = "64 bytes available in RX FIFO"]
    #[inline(always)]
    pub fn is_b64(&self) -> bool {
        *self == RAC_A::B64
    }
}
impl R {
    #[doc = "Bit 0 - Receiver FIFO Overrun"]
    #[inline(always)]
    pub fn roi(&self) -> ROI_R {
        ROI_R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - Receiver Packet End Flag"]
    #[inline(always)]
    pub fn rpe(&self) -> RPE_R {
        RPE_R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 4 - RX FIFO Available"]
    #[inline(always)]
    pub fn ra(&self) -> RA_R {
        RA_R::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 7 - Status of CIR"]
    #[inline(always)]
    pub fn stat(&self) -> STAT_R {
        STAT_R::new(((self.bits >> 7) & 1) != 0)
    }
    #[doc = "Bits 8:14 - RX FIFO Available Counter"]
    #[inline(always)]
    pub fn rac(&self) -> RAC_R {
        RAC_R::new(((self.bits >> 8) & 0x7f) as u8)
    }
}
impl W {
    #[doc = "Bit 0 - Receiver FIFO Overrun"]
    #[inline(always)]
    #[must_use]
    pub fn roi(&mut self) -> ROI_W<CIR_RXSTA_SPEC> {
        ROI_W::new(self, 0)
    }
    #[doc = "Bit 1 - Receiver Packet End Flag"]
    #[inline(always)]
    #[must_use]
    pub fn rpe(&mut self) -> RPE_W<CIR_RXSTA_SPEC> {
        RPE_W::new(self, 1)
    }
    #[doc = "Bit 4 - RX FIFO Available"]
    #[inline(always)]
    #[must_use]
    pub fn ra(&mut self) -> RA_W<CIR_RXSTA_SPEC> {
        RA_W::new(self, 4)
    }
    #[doc = r" Writes raw bits to the register."]
    #[doc = r""]
    #[doc = r" # Safety"]
    #[doc = r""]
    #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
    #[inline(always)]
    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
        self.bits = bits;
        self
    }
}
#[doc = "CIR Receiver Status Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`cir_rxsta::R`](R).  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`cir_rxsta::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct CIR_RXSTA_SPEC;
impl crate::RegisterSpec for CIR_RXSTA_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [`cir_rxsta::R`](R) reader structure"]
impl crate::Readable for CIR_RXSTA_SPEC {}
#[doc = "`write(|w| ..)` method takes [`cir_rxsta::W`](W) writer structure"]
impl crate::Writable for CIR_RXSTA_SPEC {
    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0x13;
}
#[doc = "`reset()` method sets cir_rxsta to value 0"]
impl crate::Resettable for CIR_RXSTA_SPEC {
    const RESET_VALUE: Self::Ux = 0;
}