mcxa-pac 0.2.0

Peripheral Access Crate for MCXA256 devices
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
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
#[doc = "Register `STAT` reader"]
pub type R = crate::R<StatSpec>;
#[doc = "Register `STAT` writer"]
pub type W = crate::W<StatSpec>;
#[doc = "LIN Break Flag Enable\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Lbkfe {
    #[doc = "0: Disable"]
    Disabled = 0,
    #[doc = "1: Enable"]
    Enabled = 1,
}
impl From<Lbkfe> for bool {
    #[inline(always)]
    fn from(variant: Lbkfe) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `LBKFE` reader - LIN Break Flag Enable"]
pub type LbkfeR = crate::BitReader<Lbkfe>;
impl LbkfeR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Lbkfe {
        match self.bits {
            false => Lbkfe::Disabled,
            true => Lbkfe::Enabled,
        }
    }
    #[doc = "Disable"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        *self == Lbkfe::Disabled
    }
    #[doc = "Enable"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        *self == Lbkfe::Enabled
    }
}
#[doc = "Field `LBKFE` writer - LIN Break Flag Enable"]
pub type LbkfeW<'a, REG> = crate::BitWriter<'a, REG, Lbkfe>;
impl<'a, REG> LbkfeW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Disable"]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut crate::W<REG> {
        self.variant(Lbkfe::Disabled)
    }
    #[doc = "Enable"]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut crate::W<REG> {
        self.variant(Lbkfe::Enabled)
    }
}
#[doc = "Address Mark Enable\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Ame {
    #[doc = "0: Disable"]
    Disabled = 0,
    #[doc = "1: Enable"]
    Enabled = 1,
}
impl From<Ame> for bool {
    #[inline(always)]
    fn from(variant: Ame) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `AME` reader - Address Mark Enable"]
pub type AmeR = crate::BitReader<Ame>;
impl AmeR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Ame {
        match self.bits {
            false => Ame::Disabled,
            true => Ame::Enabled,
        }
    }
    #[doc = "Disable"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        *self == Ame::Disabled
    }
    #[doc = "Enable"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        *self == Ame::Enabled
    }
}
#[doc = "Field `AME` writer - Address Mark Enable"]
pub type AmeW<'a, REG> = crate::BitWriter<'a, REG, Ame>;
impl<'a, REG> AmeW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Disable"]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut crate::W<REG> {
        self.variant(Ame::Disabled)
    }
    #[doc = "Enable"]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut crate::W<REG> {
        self.variant(Ame::Enabled)
    }
}
#[doc = "Match 2 Flag\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Ma2f {
    #[doc = "0: Not equal to MA2"]
    Nomatch = 0,
    #[doc = "1: Equal to MA2"]
    Match = 1,
}
impl From<Ma2f> for bool {
    #[inline(always)]
    fn from(variant: Ma2f) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `MA2F` reader - Match 2 Flag"]
pub type Ma2fR = crate::BitReader<Ma2f>;
impl Ma2fR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Ma2f {
        match self.bits {
            false => Ma2f::Nomatch,
            true => Ma2f::Match,
        }
    }
    #[doc = "Not equal to MA2"]
    #[inline(always)]
    pub fn is_nomatch(&self) -> bool {
        *self == Ma2f::Nomatch
    }
    #[doc = "Equal to MA2"]
    #[inline(always)]
    pub fn is_match(&self) -> bool {
        *self == Ma2f::Match
    }
}
#[doc = "Field `MA2F` writer - Match 2 Flag"]
pub type Ma2fW<'a, REG> = crate::BitWriter1C<'a, REG, Ma2f>;
impl<'a, REG> Ma2fW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Not equal to MA2"]
    #[inline(always)]
    pub fn nomatch(self) -> &'a mut crate::W<REG> {
        self.variant(Ma2f::Nomatch)
    }
    #[doc = "Equal to MA2"]
    #[inline(always)]
    pub fn match_(self) -> &'a mut crate::W<REG> {
        self.variant(Ma2f::Match)
    }
}
#[doc = "Match 1 Flag\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Ma1f {
    #[doc = "0: Not equal to MA1"]
    Nomatch = 0,
    #[doc = "1: Equal to MA1"]
    Match = 1,
}
impl From<Ma1f> for bool {
    #[inline(always)]
    fn from(variant: Ma1f) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `MA1F` reader - Match 1 Flag"]
pub type Ma1fR = crate::BitReader<Ma1f>;
impl Ma1fR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Ma1f {
        match self.bits {
            false => Ma1f::Nomatch,
            true => Ma1f::Match,
        }
    }
    #[doc = "Not equal to MA1"]
    #[inline(always)]
    pub fn is_nomatch(&self) -> bool {
        *self == Ma1f::Nomatch
    }
    #[doc = "Equal to MA1"]
    #[inline(always)]
    pub fn is_match(&self) -> bool {
        *self == Ma1f::Match
    }
}
#[doc = "Field `MA1F` writer - Match 1 Flag"]
pub type Ma1fW<'a, REG> = crate::BitWriter1C<'a, REG, Ma1f>;
impl<'a, REG> Ma1fW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Not equal to MA1"]
    #[inline(always)]
    pub fn nomatch(self) -> &'a mut crate::W<REG> {
        self.variant(Ma1f::Nomatch)
    }
    #[doc = "Equal to MA1"]
    #[inline(always)]
    pub fn match_(self) -> &'a mut crate::W<REG> {
        self.variant(Ma1f::Match)
    }
}
#[doc = "Parity Error Flag\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Pf {
    #[doc = "0: No parity error detected"]
    Noparity = 0,
    #[doc = "1: Parity error detected"]
    Parity = 1,
}
impl From<Pf> for bool {
    #[inline(always)]
    fn from(variant: Pf) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `PF` reader - Parity Error Flag"]
pub type PfR = crate::BitReader<Pf>;
impl PfR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Pf {
        match self.bits {
            false => Pf::Noparity,
            true => Pf::Parity,
        }
    }
    #[doc = "No parity error detected"]
    #[inline(always)]
    pub fn is_noparity(&self) -> bool {
        *self == Pf::Noparity
    }
    #[doc = "Parity error detected"]
    #[inline(always)]
    pub fn is_parity(&self) -> bool {
        *self == Pf::Parity
    }
}
#[doc = "Field `PF` writer - Parity Error Flag"]
pub type PfW<'a, REG> = crate::BitWriter1C<'a, REG, Pf>;
impl<'a, REG> PfW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "No parity error detected"]
    #[inline(always)]
    pub fn noparity(self) -> &'a mut crate::W<REG> {
        self.variant(Pf::Noparity)
    }
    #[doc = "Parity error detected"]
    #[inline(always)]
    pub fn parity(self) -> &'a mut crate::W<REG> {
        self.variant(Pf::Parity)
    }
}
#[doc = "Framing Error Flag\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Fe {
    #[doc = "0: No framing error detected (this does not guarantee that the framing is correct)"]
    Noerror = 0,
    #[doc = "1: Framing error detected"]
    Error = 1,
}
impl From<Fe> for bool {
    #[inline(always)]
    fn from(variant: Fe) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `FE` reader - Framing Error Flag"]
pub type FeR = crate::BitReader<Fe>;
impl FeR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Fe {
        match self.bits {
            false => Fe::Noerror,
            true => Fe::Error,
        }
    }
    #[doc = "No framing error detected (this does not guarantee that the framing is correct)"]
    #[inline(always)]
    pub fn is_noerror(&self) -> bool {
        *self == Fe::Noerror
    }
    #[doc = "Framing error detected"]
    #[inline(always)]
    pub fn is_error(&self) -> bool {
        *self == Fe::Error
    }
}
#[doc = "Field `FE` writer - Framing Error Flag"]
pub type FeW<'a, REG> = crate::BitWriter1C<'a, REG, Fe>;
impl<'a, REG> FeW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "No framing error detected (this does not guarantee that the framing is correct)"]
    #[inline(always)]
    pub fn noerror(self) -> &'a mut crate::W<REG> {
        self.variant(Fe::Noerror)
    }
    #[doc = "Framing error detected"]
    #[inline(always)]
    pub fn error(self) -> &'a mut crate::W<REG> {
        self.variant(Fe::Error)
    }
}
#[doc = "Noise Flag\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Nf {
    #[doc = "0: No noise detected"]
    Nonoise = 0,
    #[doc = "1: Noise detected"]
    Noise = 1,
}
impl From<Nf> for bool {
    #[inline(always)]
    fn from(variant: Nf) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `NF` reader - Noise Flag"]
pub type NfR = crate::BitReader<Nf>;
impl NfR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Nf {
        match self.bits {
            false => Nf::Nonoise,
            true => Nf::Noise,
        }
    }
    #[doc = "No noise detected"]
    #[inline(always)]
    pub fn is_nonoise(&self) -> bool {
        *self == Nf::Nonoise
    }
    #[doc = "Noise detected"]
    #[inline(always)]
    pub fn is_noise(&self) -> bool {
        *self == Nf::Noise
    }
}
#[doc = "Field `NF` writer - Noise Flag"]
pub type NfW<'a, REG> = crate::BitWriter1C<'a, REG, Nf>;
impl<'a, REG> NfW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "No noise detected"]
    #[inline(always)]
    pub fn nonoise(self) -> &'a mut crate::W<REG> {
        self.variant(Nf::Nonoise)
    }
    #[doc = "Noise detected"]
    #[inline(always)]
    pub fn noise(self) -> &'a mut crate::W<REG> {
        self.variant(Nf::Noise)
    }
}
#[doc = "Receiver Overrun Flag\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Or {
    #[doc = "0: No overrun"]
    NoOverrun = 0,
    #[doc = "1: Receive overrun (new LPUART data is lost)"]
    Overrun = 1,
}
impl From<Or> for bool {
    #[inline(always)]
    fn from(variant: Or) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `OR` reader - Receiver Overrun Flag"]
pub type OrR = crate::BitReader<Or>;
impl OrR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Or {
        match self.bits {
            false => Or::NoOverrun,
            true => Or::Overrun,
        }
    }
    #[doc = "No overrun"]
    #[inline(always)]
    pub fn is_no_overrun(&self) -> bool {
        *self == Or::NoOverrun
    }
    #[doc = "Receive overrun (new LPUART data is lost)"]
    #[inline(always)]
    pub fn is_overrun(&self) -> bool {
        *self == Or::Overrun
    }
}
#[doc = "Field `OR` writer - Receiver Overrun Flag"]
pub type OrW<'a, REG> = crate::BitWriter1C<'a, REG, Or>;
impl<'a, REG> OrW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "No overrun"]
    #[inline(always)]
    pub fn no_overrun(self) -> &'a mut crate::W<REG> {
        self.variant(Or::NoOverrun)
    }
    #[doc = "Receive overrun (new LPUART data is lost)"]
    #[inline(always)]
    pub fn overrun(self) -> &'a mut crate::W<REG> {
        self.variant(Or::Overrun)
    }
}
#[doc = "Idle Line Flag\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Idle {
    #[doc = "0: Idle line detected"]
    Noidle = 0,
    #[doc = "1: Idle line not detected"]
    Idle = 1,
}
impl From<Idle> for bool {
    #[inline(always)]
    fn from(variant: Idle) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `IDLE` reader - Idle Line Flag"]
pub type IdleR = crate::BitReader<Idle>;
impl IdleR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Idle {
        match self.bits {
            false => Idle::Noidle,
            true => Idle::Idle,
        }
    }
    #[doc = "Idle line detected"]
    #[inline(always)]
    pub fn is_noidle(&self) -> bool {
        *self == Idle::Noidle
    }
    #[doc = "Idle line not detected"]
    #[inline(always)]
    pub fn is_idle(&self) -> bool {
        *self == Idle::Idle
    }
}
#[doc = "Field `IDLE` writer - Idle Line Flag"]
pub type IdleW<'a, REG> = crate::BitWriter1C<'a, REG, Idle>;
impl<'a, REG> IdleW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Idle line detected"]
    #[inline(always)]
    pub fn noidle(self) -> &'a mut crate::W<REG> {
        self.variant(Idle::Noidle)
    }
    #[doc = "Idle line not detected"]
    #[inline(always)]
    pub fn idle(self) -> &'a mut crate::W<REG> {
        self.variant(Idle::Idle)
    }
}
#[doc = "Receive Data Register Full Flag\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Rdrf {
    #[doc = "0: Equal to or less than watermark"]
    NoRxdata = 0,
    #[doc = "1: Greater than watermark"]
    Rxdata = 1,
}
impl From<Rdrf> for bool {
    #[inline(always)]
    fn from(variant: Rdrf) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `RDRF` reader - Receive Data Register Full Flag"]
pub type RdrfR = crate::BitReader<Rdrf>;
impl RdrfR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Rdrf {
        match self.bits {
            false => Rdrf::NoRxdata,
            true => Rdrf::Rxdata,
        }
    }
    #[doc = "Equal to or less than watermark"]
    #[inline(always)]
    pub fn is_no_rxdata(&self) -> bool {
        *self == Rdrf::NoRxdata
    }
    #[doc = "Greater than watermark"]
    #[inline(always)]
    pub fn is_rxdata(&self) -> bool {
        *self == Rdrf::Rxdata
    }
}
#[doc = "Transmission Complete Flag\n\nValue on reset: 1"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Tc {
    #[doc = "0: Transmitter active"]
    Active = 0,
    #[doc = "1: Transmitter idle"]
    Complete = 1,
}
impl From<Tc> for bool {
    #[inline(always)]
    fn from(variant: Tc) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `TC` reader - Transmission Complete Flag"]
pub type TcR = crate::BitReader<Tc>;
impl TcR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Tc {
        match self.bits {
            false => Tc::Active,
            true => Tc::Complete,
        }
    }
    #[doc = "Transmitter active"]
    #[inline(always)]
    pub fn is_active(&self) -> bool {
        *self == Tc::Active
    }
    #[doc = "Transmitter idle"]
    #[inline(always)]
    pub fn is_complete(&self) -> bool {
        *self == Tc::Complete
    }
}
#[doc = "Transmit Data Register Empty Flag\n\nValue on reset: 1"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Tdre {
    #[doc = "0: Greater than watermark"]
    Txdata = 0,
    #[doc = "1: Equal to or less than watermark"]
    NoTxdata = 1,
}
impl From<Tdre> for bool {
    #[inline(always)]
    fn from(variant: Tdre) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `TDRE` reader - Transmit Data Register Empty Flag"]
pub type TdreR = crate::BitReader<Tdre>;
impl TdreR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Tdre {
        match self.bits {
            false => Tdre::Txdata,
            true => Tdre::NoTxdata,
        }
    }
    #[doc = "Greater than watermark"]
    #[inline(always)]
    pub fn is_txdata(&self) -> bool {
        *self == Tdre::Txdata
    }
    #[doc = "Equal to or less than watermark"]
    #[inline(always)]
    pub fn is_no_txdata(&self) -> bool {
        *self == Tdre::NoTxdata
    }
}
#[doc = "Receiver Active Flag\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Raf {
    #[doc = "0: Idle, waiting for a start bit"]
    Idle = 0,
    #[doc = "1: Receiver active (RXD pin input not idle)"]
    Active = 1,
}
impl From<Raf> for bool {
    #[inline(always)]
    fn from(variant: Raf) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `RAF` reader - Receiver Active Flag"]
pub type RafR = crate::BitReader<Raf>;
impl RafR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Raf {
        match self.bits {
            false => Raf::Idle,
            true => Raf::Active,
        }
    }
    #[doc = "Idle, waiting for a start bit"]
    #[inline(always)]
    pub fn is_idle(&self) -> bool {
        *self == Raf::Idle
    }
    #[doc = "Receiver active (RXD pin input not idle)"]
    #[inline(always)]
    pub fn is_active(&self) -> bool {
        *self == Raf::Active
    }
}
#[doc = "LIN Break Detection Enable\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Lbkde {
    #[doc = "0: Disable"]
    Disabled = 0,
    #[doc = "1: Enable"]
    Enabled = 1,
}
impl From<Lbkde> for bool {
    #[inline(always)]
    fn from(variant: Lbkde) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `LBKDE` reader - LIN Break Detection Enable"]
pub type LbkdeR = crate::BitReader<Lbkde>;
impl LbkdeR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Lbkde {
        match self.bits {
            false => Lbkde::Disabled,
            true => Lbkde::Enabled,
        }
    }
    #[doc = "Disable"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        *self == Lbkde::Disabled
    }
    #[doc = "Enable"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        *self == Lbkde::Enabled
    }
}
#[doc = "Field `LBKDE` writer - LIN Break Detection Enable"]
pub type LbkdeW<'a, REG> = crate::BitWriter<'a, REG, Lbkde>;
impl<'a, REG> LbkdeW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Disable"]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut crate::W<REG> {
        self.variant(Lbkde::Disabled)
    }
    #[doc = "Enable"]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut crate::W<REG> {
        self.variant(Lbkde::Enabled)
    }
}
#[doc = "Break Character Generation Length\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Brk13 {
    #[doc = "0: 9 to 13 bit times"]
    Short = 0,
    #[doc = "1: 12 to 15 bit times"]
    Long = 1,
}
impl From<Brk13> for bool {
    #[inline(always)]
    fn from(variant: Brk13) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `BRK13` reader - Break Character Generation Length"]
pub type Brk13R = crate::BitReader<Brk13>;
impl Brk13R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Brk13 {
        match self.bits {
            false => Brk13::Short,
            true => Brk13::Long,
        }
    }
    #[doc = "9 to 13 bit times"]
    #[inline(always)]
    pub fn is_short(&self) -> bool {
        *self == Brk13::Short
    }
    #[doc = "12 to 15 bit times"]
    #[inline(always)]
    pub fn is_long(&self) -> bool {
        *self == Brk13::Long
    }
}
#[doc = "Field `BRK13` writer - Break Character Generation Length"]
pub type Brk13W<'a, REG> = crate::BitWriter<'a, REG, Brk13>;
impl<'a, REG> Brk13W<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "9 to 13 bit times"]
    #[inline(always)]
    pub fn short(self) -> &'a mut crate::W<REG> {
        self.variant(Brk13::Short)
    }
    #[doc = "12 to 15 bit times"]
    #[inline(always)]
    pub fn long(self) -> &'a mut crate::W<REG> {
        self.variant(Brk13::Long)
    }
}
#[doc = "Receive Wake Up Idle Detect\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Rwuid {
    #[doc = "0: STAT\\[IDLE\\] does not become 1"]
    IdleNotset = 0,
    #[doc = "1: STAT\\[IDLE\\] becomes 1"]
    IdleSet = 1,
}
impl From<Rwuid> for bool {
    #[inline(always)]
    fn from(variant: Rwuid) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `RWUID` reader - Receive Wake Up Idle Detect"]
pub type RwuidR = crate::BitReader<Rwuid>;
impl RwuidR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Rwuid {
        match self.bits {
            false => Rwuid::IdleNotset,
            true => Rwuid::IdleSet,
        }
    }
    #[doc = "STAT\\[IDLE\\] does not become 1"]
    #[inline(always)]
    pub fn is_idle_notset(&self) -> bool {
        *self == Rwuid::IdleNotset
    }
    #[doc = "STAT\\[IDLE\\] becomes 1"]
    #[inline(always)]
    pub fn is_idle_set(&self) -> bool {
        *self == Rwuid::IdleSet
    }
}
#[doc = "Field `RWUID` writer - Receive Wake Up Idle Detect"]
pub type RwuidW<'a, REG> = crate::BitWriter<'a, REG, Rwuid>;
impl<'a, REG> RwuidW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "STAT\\[IDLE\\] does not become 1"]
    #[inline(always)]
    pub fn idle_notset(self) -> &'a mut crate::W<REG> {
        self.variant(Rwuid::IdleNotset)
    }
    #[doc = "STAT\\[IDLE\\] becomes 1"]
    #[inline(always)]
    pub fn idle_set(self) -> &'a mut crate::W<REG> {
        self.variant(Rwuid::IdleSet)
    }
}
#[doc = "Receive Data Inversion\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Rxinv {
    #[doc = "0: Inverted"]
    NotInverted = 0,
    #[doc = "1: Not inverted"]
    Inverted = 1,
}
impl From<Rxinv> for bool {
    #[inline(always)]
    fn from(variant: Rxinv) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `RXINV` reader - Receive Data Inversion"]
pub type RxinvR = crate::BitReader<Rxinv>;
impl RxinvR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Rxinv {
        match self.bits {
            false => Rxinv::NotInverted,
            true => Rxinv::Inverted,
        }
    }
    #[doc = "Inverted"]
    #[inline(always)]
    pub fn is_not_inverted(&self) -> bool {
        *self == Rxinv::NotInverted
    }
    #[doc = "Not inverted"]
    #[inline(always)]
    pub fn is_inverted(&self) -> bool {
        *self == Rxinv::Inverted
    }
}
#[doc = "Field `RXINV` writer - Receive Data Inversion"]
pub type RxinvW<'a, REG> = crate::BitWriter<'a, REG, Rxinv>;
impl<'a, REG> RxinvW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Inverted"]
    #[inline(always)]
    pub fn not_inverted(self) -> &'a mut crate::W<REG> {
        self.variant(Rxinv::NotInverted)
    }
    #[doc = "Not inverted"]
    #[inline(always)]
    pub fn inverted(self) -> &'a mut crate::W<REG> {
        self.variant(Rxinv::Inverted)
    }
}
#[doc = "MSB First\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Msbf {
    #[doc = "0: LSB"]
    LsbFirst = 0,
    #[doc = "1: MSB"]
    MsbFirst = 1,
}
impl From<Msbf> for bool {
    #[inline(always)]
    fn from(variant: Msbf) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `MSBF` reader - MSB First"]
pub type MsbfR = crate::BitReader<Msbf>;
impl MsbfR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Msbf {
        match self.bits {
            false => Msbf::LsbFirst,
            true => Msbf::MsbFirst,
        }
    }
    #[doc = "LSB"]
    #[inline(always)]
    pub fn is_lsb_first(&self) -> bool {
        *self == Msbf::LsbFirst
    }
    #[doc = "MSB"]
    #[inline(always)]
    pub fn is_msb_first(&self) -> bool {
        *self == Msbf::MsbFirst
    }
}
#[doc = "Field `MSBF` writer - MSB First"]
pub type MsbfW<'a, REG> = crate::BitWriter<'a, REG, Msbf>;
impl<'a, REG> MsbfW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "LSB"]
    #[inline(always)]
    pub fn lsb_first(self) -> &'a mut crate::W<REG> {
        self.variant(Msbf::LsbFirst)
    }
    #[doc = "MSB"]
    #[inline(always)]
    pub fn msb_first(self) -> &'a mut crate::W<REG> {
        self.variant(Msbf::MsbFirst)
    }
}
#[doc = "RXD Pin Active Edge Interrupt Flag\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Rxedgif {
    #[doc = "0: Not occurred"]
    NoEdge = 0,
    #[doc = "1: Occurred"]
    Edge = 1,
}
impl From<Rxedgif> for bool {
    #[inline(always)]
    fn from(variant: Rxedgif) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `RXEDGIF` reader - RXD Pin Active Edge Interrupt Flag"]
pub type RxedgifR = crate::BitReader<Rxedgif>;
impl RxedgifR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Rxedgif {
        match self.bits {
            false => Rxedgif::NoEdge,
            true => Rxedgif::Edge,
        }
    }
    #[doc = "Not occurred"]
    #[inline(always)]
    pub fn is_no_edge(&self) -> bool {
        *self == Rxedgif::NoEdge
    }
    #[doc = "Occurred"]
    #[inline(always)]
    pub fn is_edge(&self) -> bool {
        *self == Rxedgif::Edge
    }
}
#[doc = "Field `RXEDGIF` writer - RXD Pin Active Edge Interrupt Flag"]
pub type RxedgifW<'a, REG> = crate::BitWriter1C<'a, REG, Rxedgif>;
impl<'a, REG> RxedgifW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Not occurred"]
    #[inline(always)]
    pub fn no_edge(self) -> &'a mut crate::W<REG> {
        self.variant(Rxedgif::NoEdge)
    }
    #[doc = "Occurred"]
    #[inline(always)]
    pub fn edge(self) -> &'a mut crate::W<REG> {
        self.variant(Rxedgif::Edge)
    }
}
#[doc = "LIN Break Detect Interrupt Flag\n\nValue on reset: 0"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Lbkdif {
    #[doc = "0: Not detected"]
    NotDetected = 0,
    #[doc = "1: Detected"]
    Detected = 1,
}
impl From<Lbkdif> for bool {
    #[inline(always)]
    fn from(variant: Lbkdif) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `LBKDIF` reader - LIN Break Detect Interrupt Flag"]
pub type LbkdifR = crate::BitReader<Lbkdif>;
impl LbkdifR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Lbkdif {
        match self.bits {
            false => Lbkdif::NotDetected,
            true => Lbkdif::Detected,
        }
    }
    #[doc = "Not detected"]
    #[inline(always)]
    pub fn is_not_detected(&self) -> bool {
        *self == Lbkdif::NotDetected
    }
    #[doc = "Detected"]
    #[inline(always)]
    pub fn is_detected(&self) -> bool {
        *self == Lbkdif::Detected
    }
}
#[doc = "Field `LBKDIF` writer - LIN Break Detect Interrupt Flag"]
pub type LbkdifW<'a, REG> = crate::BitWriter1C<'a, REG, Lbkdif>;
impl<'a, REG> LbkdifW<'a, REG>
where
    REG: crate::Writable + crate::RegisterSpec,
{
    #[doc = "Not detected"]
    #[inline(always)]
    pub fn not_detected(self) -> &'a mut crate::W<REG> {
        self.variant(Lbkdif::NotDetected)
    }
    #[doc = "Detected"]
    #[inline(always)]
    pub fn detected(self) -> &'a mut crate::W<REG> {
        self.variant(Lbkdif::Detected)
    }
}
impl R {
    #[doc = "Bit 0 - LIN Break Flag Enable"]
    #[inline(always)]
    pub fn lbkfe(&self) -> LbkfeR {
        LbkfeR::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - Address Mark Enable"]
    #[inline(always)]
    pub fn ame(&self) -> AmeR {
        AmeR::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 14 - Match 2 Flag"]
    #[inline(always)]
    pub fn ma2f(&self) -> Ma2fR {
        Ma2fR::new(((self.bits >> 14) & 1) != 0)
    }
    #[doc = "Bit 15 - Match 1 Flag"]
    #[inline(always)]
    pub fn ma1f(&self) -> Ma1fR {
        Ma1fR::new(((self.bits >> 15) & 1) != 0)
    }
    #[doc = "Bit 16 - Parity Error Flag"]
    #[inline(always)]
    pub fn pf(&self) -> PfR {
        PfR::new(((self.bits >> 16) & 1) != 0)
    }
    #[doc = "Bit 17 - Framing Error Flag"]
    #[inline(always)]
    pub fn fe(&self) -> FeR {
        FeR::new(((self.bits >> 17) & 1) != 0)
    }
    #[doc = "Bit 18 - Noise Flag"]
    #[inline(always)]
    pub fn nf(&self) -> NfR {
        NfR::new(((self.bits >> 18) & 1) != 0)
    }
    #[doc = "Bit 19 - Receiver Overrun Flag"]
    #[inline(always)]
    pub fn or(&self) -> OrR {
        OrR::new(((self.bits >> 19) & 1) != 0)
    }
    #[doc = "Bit 20 - Idle Line Flag"]
    #[inline(always)]
    pub fn idle(&self) -> IdleR {
        IdleR::new(((self.bits >> 20) & 1) != 0)
    }
    #[doc = "Bit 21 - Receive Data Register Full Flag"]
    #[inline(always)]
    pub fn rdrf(&self) -> RdrfR {
        RdrfR::new(((self.bits >> 21) & 1) != 0)
    }
    #[doc = "Bit 22 - Transmission Complete Flag"]
    #[inline(always)]
    pub fn tc(&self) -> TcR {
        TcR::new(((self.bits >> 22) & 1) != 0)
    }
    #[doc = "Bit 23 - Transmit Data Register Empty Flag"]
    #[inline(always)]
    pub fn tdre(&self) -> TdreR {
        TdreR::new(((self.bits >> 23) & 1) != 0)
    }
    #[doc = "Bit 24 - Receiver Active Flag"]
    #[inline(always)]
    pub fn raf(&self) -> RafR {
        RafR::new(((self.bits >> 24) & 1) != 0)
    }
    #[doc = "Bit 25 - LIN Break Detection Enable"]
    #[inline(always)]
    pub fn lbkde(&self) -> LbkdeR {
        LbkdeR::new(((self.bits >> 25) & 1) != 0)
    }
    #[doc = "Bit 26 - Break Character Generation Length"]
    #[inline(always)]
    pub fn brk13(&self) -> Brk13R {
        Brk13R::new(((self.bits >> 26) & 1) != 0)
    }
    #[doc = "Bit 27 - Receive Wake Up Idle Detect"]
    #[inline(always)]
    pub fn rwuid(&self) -> RwuidR {
        RwuidR::new(((self.bits >> 27) & 1) != 0)
    }
    #[doc = "Bit 28 - Receive Data Inversion"]
    #[inline(always)]
    pub fn rxinv(&self) -> RxinvR {
        RxinvR::new(((self.bits >> 28) & 1) != 0)
    }
    #[doc = "Bit 29 - MSB First"]
    #[inline(always)]
    pub fn msbf(&self) -> MsbfR {
        MsbfR::new(((self.bits >> 29) & 1) != 0)
    }
    #[doc = "Bit 30 - RXD Pin Active Edge Interrupt Flag"]
    #[inline(always)]
    pub fn rxedgif(&self) -> RxedgifR {
        RxedgifR::new(((self.bits >> 30) & 1) != 0)
    }
    #[doc = "Bit 31 - LIN Break Detect Interrupt Flag"]
    #[inline(always)]
    pub fn lbkdif(&self) -> LbkdifR {
        LbkdifR::new(((self.bits >> 31) & 1) != 0)
    }
}
#[cfg(feature = "debug")]
impl core::fmt::Debug for R {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("STAT")
            .field("lbkfe", &self.lbkfe())
            .field("ame", &self.ame())
            .field("ma2f", &self.ma2f())
            .field("ma1f", &self.ma1f())
            .field("pf", &self.pf())
            .field("fe", &self.fe())
            .field("nf", &self.nf())
            .field("or", &self.or())
            .field("idle", &self.idle())
            .field("rdrf", &self.rdrf())
            .field("tc", &self.tc())
            .field("tdre", &self.tdre())
            .field("raf", &self.raf())
            .field("lbkde", &self.lbkde())
            .field("brk13", &self.brk13())
            .field("rwuid", &self.rwuid())
            .field("rxinv", &self.rxinv())
            .field("msbf", &self.msbf())
            .field("rxedgif", &self.rxedgif())
            .field("lbkdif", &self.lbkdif())
            .finish()
    }
}
impl W {
    #[doc = "Bit 0 - LIN Break Flag Enable"]
    #[inline(always)]
    pub fn lbkfe(&mut self) -> LbkfeW<'_, StatSpec> {
        LbkfeW::new(self, 0)
    }
    #[doc = "Bit 1 - Address Mark Enable"]
    #[inline(always)]
    pub fn ame(&mut self) -> AmeW<'_, StatSpec> {
        AmeW::new(self, 1)
    }
    #[doc = "Bit 14 - Match 2 Flag"]
    #[inline(always)]
    pub fn ma2f(&mut self) -> Ma2fW<'_, StatSpec> {
        Ma2fW::new(self, 14)
    }
    #[doc = "Bit 15 - Match 1 Flag"]
    #[inline(always)]
    pub fn ma1f(&mut self) -> Ma1fW<'_, StatSpec> {
        Ma1fW::new(self, 15)
    }
    #[doc = "Bit 16 - Parity Error Flag"]
    #[inline(always)]
    pub fn pf(&mut self) -> PfW<'_, StatSpec> {
        PfW::new(self, 16)
    }
    #[doc = "Bit 17 - Framing Error Flag"]
    #[inline(always)]
    pub fn fe(&mut self) -> FeW<'_, StatSpec> {
        FeW::new(self, 17)
    }
    #[doc = "Bit 18 - Noise Flag"]
    #[inline(always)]
    pub fn nf(&mut self) -> NfW<'_, StatSpec> {
        NfW::new(self, 18)
    }
    #[doc = "Bit 19 - Receiver Overrun Flag"]
    #[inline(always)]
    pub fn or(&mut self) -> OrW<'_, StatSpec> {
        OrW::new(self, 19)
    }
    #[doc = "Bit 20 - Idle Line Flag"]
    #[inline(always)]
    pub fn idle(&mut self) -> IdleW<'_, StatSpec> {
        IdleW::new(self, 20)
    }
    #[doc = "Bit 25 - LIN Break Detection Enable"]
    #[inline(always)]
    pub fn lbkde(&mut self) -> LbkdeW<'_, StatSpec> {
        LbkdeW::new(self, 25)
    }
    #[doc = "Bit 26 - Break Character Generation Length"]
    #[inline(always)]
    pub fn brk13(&mut self) -> Brk13W<'_, StatSpec> {
        Brk13W::new(self, 26)
    }
    #[doc = "Bit 27 - Receive Wake Up Idle Detect"]
    #[inline(always)]
    pub fn rwuid(&mut self) -> RwuidW<'_, StatSpec> {
        RwuidW::new(self, 27)
    }
    #[doc = "Bit 28 - Receive Data Inversion"]
    #[inline(always)]
    pub fn rxinv(&mut self) -> RxinvW<'_, StatSpec> {
        RxinvW::new(self, 28)
    }
    #[doc = "Bit 29 - MSB First"]
    #[inline(always)]
    pub fn msbf(&mut self) -> MsbfW<'_, StatSpec> {
        MsbfW::new(self, 29)
    }
    #[doc = "Bit 30 - RXD Pin Active Edge Interrupt Flag"]
    #[inline(always)]
    pub fn rxedgif(&mut self) -> RxedgifW<'_, StatSpec> {
        RxedgifW::new(self, 30)
    }
    #[doc = "Bit 31 - LIN Break Detect Interrupt Flag"]
    #[inline(always)]
    pub fn lbkdif(&mut self) -> LbkdifW<'_, StatSpec> {
        LbkdifW::new(self, 31)
    }
}
#[doc = "Status\n\nYou can [`read`](crate::Reg::read) this register and get [`stat::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`stat::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct StatSpec;
impl crate::RegisterSpec for StatSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`stat::R`](R) reader structure"]
impl crate::Readable for StatSpec {}
#[doc = "`write(|w| ..)` method takes [`stat::W`](W) writer structure"]
impl crate::Writable for StatSpec {
    type Safety = crate::Unsafe;
    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0xc01f_c000;
}
#[doc = "`reset()` method sets STAT to value 0x00c0_0000"]
impl crate::Resettable for StatSpec {
    const RESET_VALUE: u32 = 0x00c0_0000;
}