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
#[doc = "Register `IMR_LIN` reader"]
pub struct R(crate::R<LIN_MODE_IMR_LIN_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<LIN_MODE_IMR_LIN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<LIN_MODE_IMR_LIN_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<LIN_MODE_IMR_LIN_SPEC>) -> Self {
R(reader)
}
}
#[doc = "RXRDY Interrupt Mask\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXRDY_A {
#[doc = "0: The interrupt is disabled"]
_0 = 0,
#[doc = "1: The interrupt is enabled"]
_1 = 1,
}
impl From<RXRDY_A> for bool {
#[inline(always)]
fn from(variant: RXRDY_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RXRDY` reader - RXRDY Interrupt Mask"]
pub struct RXRDY_R(crate::FieldReader<bool, RXRDY_A>);
impl RXRDY_R {
pub(crate) fn new(bits: bool) -> Self {
RXRDY_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RXRDY_A {
match self.bits {
false => RXRDY_A::_0,
true => RXRDY_A::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline(always)]
pub fn is_0(&self) -> bool {
**self == RXRDY_A::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline(always)]
pub fn is_1(&self) -> bool {
**self == RXRDY_A::_1
}
}
impl core::ops::Deref for RXRDY_R {
type Target = crate::FieldReader<bool, RXRDY_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "TXRDY Interrupt Mask\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXRDY_A {
#[doc = "0: The interrupt is disabled"]
_0 = 0,
#[doc = "1: The interrupt is enabled"]
_1 = 1,
}
impl From<TXRDY_A> for bool {
#[inline(always)]
fn from(variant: TXRDY_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TXRDY` reader - TXRDY Interrupt Mask"]
pub struct TXRDY_R(crate::FieldReader<bool, TXRDY_A>);
impl TXRDY_R {
pub(crate) fn new(bits: bool) -> Self {
TXRDY_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TXRDY_A {
match self.bits {
false => TXRDY_A::_0,
true => TXRDY_A::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline(always)]
pub fn is_0(&self) -> bool {
**self == TXRDY_A::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline(always)]
pub fn is_1(&self) -> bool {
**self == TXRDY_A::_1
}
}
impl core::ops::Deref for TXRDY_R {
type Target = crate::FieldReader<bool, TXRDY_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Receiver Break Interrupt Mask\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXBRK_A {
#[doc = "0: The interrupt is disabled"]
_0 = 0,
#[doc = "1: The interrupt is enabled"]
_1 = 1,
}
impl From<RXBRK_A> for bool {
#[inline(always)]
fn from(variant: RXBRK_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RXBRK` reader - Receiver Break Interrupt Mask"]
pub struct RXBRK_R(crate::FieldReader<bool, RXBRK_A>);
impl RXBRK_R {
pub(crate) fn new(bits: bool) -> Self {
RXBRK_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RXBRK_A {
match self.bits {
false => RXBRK_A::_0,
true => RXBRK_A::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline(always)]
pub fn is_0(&self) -> bool {
**self == RXBRK_A::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline(always)]
pub fn is_1(&self) -> bool {
**self == RXBRK_A::_1
}
}
impl core::ops::Deref for RXBRK_R {
type Target = crate::FieldReader<bool, RXBRK_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Overrun Error Interrupt Mask\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum OVRE_A {
#[doc = "0: The interrupt is disabled"]
_0 = 0,
#[doc = "1: The interrupt is enabled"]
_1 = 1,
}
impl From<OVRE_A> for bool {
#[inline(always)]
fn from(variant: OVRE_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `OVRE` reader - Overrun Error Interrupt Mask"]
pub struct OVRE_R(crate::FieldReader<bool, OVRE_A>);
impl OVRE_R {
pub(crate) fn new(bits: bool) -> Self {
OVRE_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> OVRE_A {
match self.bits {
false => OVRE_A::_0,
true => OVRE_A::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline(always)]
pub fn is_0(&self) -> bool {
**self == OVRE_A::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline(always)]
pub fn is_1(&self) -> bool {
**self == OVRE_A::_1
}
}
impl core::ops::Deref for OVRE_R {
type Target = crate::FieldReader<bool, OVRE_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Framing Error Interrupt Mask\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum FRAME_A {
#[doc = "0: The interrupt is disabled"]
_0 = 0,
#[doc = "1: The interrupt is enabled"]
_1 = 1,
}
impl From<FRAME_A> for bool {
#[inline(always)]
fn from(variant: FRAME_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `FRAME` reader - Framing Error Interrupt Mask"]
pub struct FRAME_R(crate::FieldReader<bool, FRAME_A>);
impl FRAME_R {
pub(crate) fn new(bits: bool) -> Self {
FRAME_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> FRAME_A {
match self.bits {
false => FRAME_A::_0,
true => FRAME_A::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline(always)]
pub fn is_0(&self) -> bool {
**self == FRAME_A::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline(always)]
pub fn is_1(&self) -> bool {
**self == FRAME_A::_1
}
}
impl core::ops::Deref for FRAME_R {
type Target = crate::FieldReader<bool, FRAME_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Parity Error Interrupt Mask\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PARE_A {
#[doc = "0: The interrupt is disabled"]
_0 = 0,
#[doc = "1: The interrupt is enabled"]
_1 = 1,
}
impl From<PARE_A> for bool {
#[inline(always)]
fn from(variant: PARE_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `PARE` reader - Parity Error Interrupt Mask"]
pub struct PARE_R(crate::FieldReader<bool, PARE_A>);
impl PARE_R {
pub(crate) fn new(bits: bool) -> Self {
PARE_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PARE_A {
match self.bits {
false => PARE_A::_0,
true => PARE_A::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline(always)]
pub fn is_0(&self) -> bool {
**self == PARE_A::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline(always)]
pub fn is_1(&self) -> bool {
**self == PARE_A::_1
}
}
impl core::ops::Deref for PARE_R {
type Target = crate::FieldReader<bool, PARE_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Time-out Interrupt Mask\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIMEOUT_A {
#[doc = "0: The interrupt is disabled"]
_0 = 0,
#[doc = "1: The interrupt is enabled"]
_1 = 1,
}
impl From<TIMEOUT_A> for bool {
#[inline(always)]
fn from(variant: TIMEOUT_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TIMEOUT` reader - Time-out Interrupt Mask"]
pub struct TIMEOUT_R(crate::FieldReader<bool, TIMEOUT_A>);
impl TIMEOUT_R {
pub(crate) fn new(bits: bool) -> Self {
TIMEOUT_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TIMEOUT_A {
match self.bits {
false => TIMEOUT_A::_0,
true => TIMEOUT_A::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline(always)]
pub fn is_0(&self) -> bool {
**self == TIMEOUT_A::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline(always)]
pub fn is_1(&self) -> bool {
**self == TIMEOUT_A::_1
}
}
impl core::ops::Deref for TIMEOUT_R {
type Target = crate::FieldReader<bool, TIMEOUT_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "TXEMPTY Interrupt Mask\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXEMPTY_A {
#[doc = "0: The interrupt is disabled"]
_0 = 0,
#[doc = "1: The interrupt is enabled"]
_1 = 1,
}
impl From<TXEMPTY_A> for bool {
#[inline(always)]
fn from(variant: TXEMPTY_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TXEMPTY` reader - TXEMPTY Interrupt Mask"]
pub struct TXEMPTY_R(crate::FieldReader<bool, TXEMPTY_A>);
impl TXEMPTY_R {
pub(crate) fn new(bits: bool) -> Self {
TXEMPTY_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TXEMPTY_A {
match self.bits {
false => TXEMPTY_A::_0,
true => TXEMPTY_A::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline(always)]
pub fn is_0(&self) -> bool {
**self == TXEMPTY_A::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline(always)]
pub fn is_1(&self) -> bool {
**self == TXEMPTY_A::_1
}
}
impl core::ops::Deref for TXEMPTY_R {
type Target = crate::FieldReader<bool, TXEMPTY_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Iteration Interrupt Mask\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ITER_A {
#[doc = "0: The interrupt is disabled"]
_0 = 0,
#[doc = "1: The interrupt is enabled"]
_1 = 1,
}
impl From<ITER_A> for bool {
#[inline(always)]
fn from(variant: ITER_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `ITER` reader - Iteration Interrupt Mask"]
pub struct ITER_R(crate::FieldReader<bool, ITER_A>);
impl ITER_R {
pub(crate) fn new(bits: bool) -> Self {
ITER_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ITER_A {
match self.bits {
false => ITER_A::_0,
true => ITER_A::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline(always)]
pub fn is_0(&self) -> bool {
**self == ITER_A::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline(always)]
pub fn is_1(&self) -> bool {
**self == ITER_A::_1
}
}
impl core::ops::Deref for ITER_R {
type Target = crate::FieldReader<bool, ITER_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Buffer Empty Interrupt Mask\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXBUFE_A {
#[doc = "0: The interrupt is disabled"]
_0 = 0,
#[doc = "1: The interrupt is enabled"]
_1 = 1,
}
impl From<TXBUFE_A> for bool {
#[inline(always)]
fn from(variant: TXBUFE_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TXBUFE` reader - Buffer Empty Interrupt Mask"]
pub struct TXBUFE_R(crate::FieldReader<bool, TXBUFE_A>);
impl TXBUFE_R {
pub(crate) fn new(bits: bool) -> Self {
TXBUFE_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TXBUFE_A {
match self.bits {
false => TXBUFE_A::_0,
true => TXBUFE_A::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline(always)]
pub fn is_0(&self) -> bool {
**self == TXBUFE_A::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline(always)]
pub fn is_1(&self) -> bool {
**self == TXBUFE_A::_1
}
}
impl core::ops::Deref for TXBUFE_R {
type Target = crate::FieldReader<bool, TXBUFE_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Buffer Full Interrupt Mask\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXBUFF_A {
#[doc = "0: The interrupt is disabled"]
_0 = 0,
#[doc = "1: The interrupt is enabled"]
_1 = 1,
}
impl From<RXBUFF_A> for bool {
#[inline(always)]
fn from(variant: RXBUFF_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RXBUFF` reader - Buffer Full Interrupt Mask"]
pub struct RXBUFF_R(crate::FieldReader<bool, RXBUFF_A>);
impl RXBUFF_R {
pub(crate) fn new(bits: bool) -> Self {
RXBUFF_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RXBUFF_A {
match self.bits {
false => RXBUFF_A::_0,
true => RXBUFF_A::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline(always)]
pub fn is_0(&self) -> bool {
**self == RXBUFF_A::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline(always)]
pub fn is_1(&self) -> bool {
**self == RXBUFF_A::_1
}
}
impl core::ops::Deref for RXBUFF_R {
type Target = crate::FieldReader<bool, RXBUFF_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Non Acknowledge or LIN Break Sent or LIN Break Received Interrupt Mask\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum NACK_A {
#[doc = "0: The interrupt is disabled"]
_0 = 0,
#[doc = "1: The interrupt is enabled"]
_1 = 1,
}
impl From<NACK_A> for bool {
#[inline(always)]
fn from(variant: NACK_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `NACK` reader - Non Acknowledge or LIN Break Sent or LIN Break Received Interrupt Mask"]
pub struct NACK_R(crate::FieldReader<bool, NACK_A>);
impl NACK_R {
pub(crate) fn new(bits: bool) -> Self {
NACK_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> NACK_A {
match self.bits {
false => NACK_A::_0,
true => NACK_A::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline(always)]
pub fn is_0(&self) -> bool {
**self == NACK_A::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline(always)]
pub fn is_1(&self) -> bool {
**self == NACK_A::_1
}
}
impl core::ops::Deref for NACK_R {
type Target = crate::FieldReader<bool, NACK_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `LINID` reader - LIN Identifier Sent or LIN Received Interrupt Mask"]
pub struct LINID_R(crate::FieldReader<bool, bool>);
impl LINID_R {
pub(crate) fn new(bits: bool) -> Self {
LINID_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for LINID_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `LINTC` reader - LIN Transfer Conpleted Interrupt Mask"]
pub struct LINTC_R(crate::FieldReader<bool, bool>);
impl LINTC_R {
pub(crate) fn new(bits: bool) -> Self {
LINTC_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for LINTC_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Ring Indicator Input Change Mask\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RIIC_A {
#[doc = "0: The interrupt is disabled"]
_0 = 0,
#[doc = "1: The interrupt is enabled"]
_1 = 1,
}
impl From<RIIC_A> for bool {
#[inline(always)]
fn from(variant: RIIC_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RIIC` reader - Ring Indicator Input Change Mask"]
pub struct RIIC_R(crate::FieldReader<bool, RIIC_A>);
impl RIIC_R {
pub(crate) fn new(bits: bool) -> Self {
RIIC_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RIIC_A {
match self.bits {
false => RIIC_A::_0,
true => RIIC_A::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline(always)]
pub fn is_0(&self) -> bool {
**self == RIIC_A::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline(always)]
pub fn is_1(&self) -> bool {
**self == RIIC_A::_1
}
}
impl core::ops::Deref for RIIC_R {
type Target = crate::FieldReader<bool, RIIC_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Data Set Ready Input Change Mask\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DSRIC_A {
#[doc = "0: The interrupt is disabled"]
_0 = 0,
#[doc = "1: The interrupt is enabled"]
_1 = 1,
}
impl From<DSRIC_A> for bool {
#[inline(always)]
fn from(variant: DSRIC_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `DSRIC` reader - Data Set Ready Input Change Mask"]
pub struct DSRIC_R(crate::FieldReader<bool, DSRIC_A>);
impl DSRIC_R {
pub(crate) fn new(bits: bool) -> Self {
DSRIC_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DSRIC_A {
match self.bits {
false => DSRIC_A::_0,
true => DSRIC_A::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline(always)]
pub fn is_0(&self) -> bool {
**self == DSRIC_A::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline(always)]
pub fn is_1(&self) -> bool {
**self == DSRIC_A::_1
}
}
impl core::ops::Deref for DSRIC_R {
type Target = crate::FieldReader<bool, DSRIC_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Data Carrier Detect Input Change Interrupt Mask\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DCDIC_A {
#[doc = "0: The interrupt is disabled"]
_0 = 0,
#[doc = "1: The interrupt is enabled"]
_1 = 1,
}
impl From<DCDIC_A> for bool {
#[inline(always)]
fn from(variant: DCDIC_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `DCDIC` reader - Data Carrier Detect Input Change Interrupt Mask"]
pub struct DCDIC_R(crate::FieldReader<bool, DCDIC_A>);
impl DCDIC_R {
pub(crate) fn new(bits: bool) -> Self {
DCDIC_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DCDIC_A {
match self.bits {
false => DCDIC_A::_0,
true => DCDIC_A::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline(always)]
pub fn is_0(&self) -> bool {
**self == DCDIC_A::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline(always)]
pub fn is_1(&self) -> bool {
**self == DCDIC_A::_1
}
}
impl core::ops::Deref for DCDIC_R {
type Target = crate::FieldReader<bool, DCDIC_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Clear to Send Input Change Interrupt Mask\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTSIC_A {
#[doc = "0: The interrupt is disabled"]
_0 = 0,
#[doc = "1: The interrupt is enabled"]
_1 = 1,
}
impl From<CTSIC_A> for bool {
#[inline(always)]
fn from(variant: CTSIC_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `CTSIC` reader - Clear to Send Input Change Interrupt Mask"]
pub struct CTSIC_R(crate::FieldReader<bool, CTSIC_A>);
impl CTSIC_R {
pub(crate) fn new(bits: bool) -> Self {
CTSIC_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CTSIC_A {
match self.bits {
false => CTSIC_A::_0,
true => CTSIC_A::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline(always)]
pub fn is_0(&self) -> bool {
**self == CTSIC_A::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline(always)]
pub fn is_1(&self) -> bool {
**self == CTSIC_A::_1
}
}
impl core::ops::Deref for CTSIC_R {
type Target = crate::FieldReader<bool, CTSIC_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `LINBE` reader - LIN Bus Error Interrupt Mask"]
pub struct LINBE_R(crate::FieldReader<bool, bool>);
impl LINBE_R {
pub(crate) fn new(bits: bool) -> Self {
LINBE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for LINBE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `LINISFE` reader - LIN Inconsistent Synch Field Error Interrupt Mask"]
pub struct LINISFE_R(crate::FieldReader<bool, bool>);
impl LINISFE_R {
pub(crate) fn new(bits: bool) -> Self {
LINISFE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for LINISFE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `LINIPE` reader - LIN Identifier Parity Interrupt Mask"]
pub struct LINIPE_R(crate::FieldReader<bool, bool>);
impl LINIPE_R {
pub(crate) fn new(bits: bool) -> Self {
LINIPE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for LINIPE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `LINCE` reader - LIN Checksum Error Interrupt Mask"]
pub struct LINCE_R(crate::FieldReader<bool, bool>);
impl LINCE_R {
pub(crate) fn new(bits: bool) -> Self {
LINCE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for LINCE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `LINSNRE` reader - LIN Slave Not Responding Error Interrupt Mask"]
pub struct LINSNRE_R(crate::FieldReader<bool, bool>);
impl LINSNRE_R {
pub(crate) fn new(bits: bool) -> Self {
LINSNRE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for LINSNRE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "LIN Synch Tolerance Error Interrupt Mask\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LINSTE_A {
#[doc = "0: The interrupt is disabled"]
_0 = 0,
#[doc = "1: The interrupt is enabled"]
_1 = 1,
}
impl From<LINSTE_A> for bool {
#[inline(always)]
fn from(variant: LINSTE_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `LINSTE` reader - LIN Synch Tolerance Error Interrupt Mask"]
pub struct LINSTE_R(crate::FieldReader<bool, LINSTE_A>);
impl LINSTE_R {
pub(crate) fn new(bits: bool) -> Self {
LINSTE_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> LINSTE_A {
match self.bits {
false => LINSTE_A::_0,
true => LINSTE_A::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline(always)]
pub fn is_0(&self) -> bool {
**self == LINSTE_A::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline(always)]
pub fn is_1(&self) -> bool {
**self == LINSTE_A::_1
}
}
impl core::ops::Deref for LINSTE_R {
type Target = crate::FieldReader<bool, LINSTE_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "LIN Header Timeout Error Interrupt Mask\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LINHTE_A {
#[doc = "0: The interrupt is disabled"]
_0 = 0,
#[doc = "1: The interrupt is enabled"]
_1 = 1,
}
impl From<LINHTE_A> for bool {
#[inline(always)]
fn from(variant: LINHTE_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `LINHTE` reader - LIN Header Timeout Error Interrupt Mask"]
pub struct LINHTE_R(crate::FieldReader<bool, LINHTE_A>);
impl LINHTE_R {
pub(crate) fn new(bits: bool) -> Self {
LINHTE_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> LINHTE_A {
match self.bits {
false => LINHTE_A::_0,
true => LINHTE_A::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline(always)]
pub fn is_0(&self) -> bool {
**self == LINHTE_A::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline(always)]
pub fn is_1(&self) -> bool {
**self == LINHTE_A::_1
}
}
impl core::ops::Deref for LINHTE_R {
type Target = crate::FieldReader<bool, LINHTE_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl R {
#[doc = "Bit 0 - RXRDY Interrupt Mask"]
#[inline(always)]
pub fn rxrdy(&self) -> RXRDY_R {
RXRDY_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - TXRDY Interrupt Mask"]
#[inline(always)]
pub fn txrdy(&self) -> TXRDY_R {
TXRDY_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - Receiver Break Interrupt Mask"]
#[inline(always)]
pub fn rxbrk(&self) -> RXBRK_R {
RXBRK_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 5 - Overrun Error Interrupt Mask"]
#[inline(always)]
pub fn ovre(&self) -> OVRE_R {
OVRE_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - Framing Error Interrupt Mask"]
#[inline(always)]
pub fn frame(&self) -> FRAME_R {
FRAME_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - Parity Error Interrupt Mask"]
#[inline(always)]
pub fn pare(&self) -> PARE_R {
PARE_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8 - Time-out Interrupt Mask"]
#[inline(always)]
pub fn timeout(&self) -> TIMEOUT_R {
TIMEOUT_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9 - TXEMPTY Interrupt Mask"]
#[inline(always)]
pub fn txempty(&self) -> TXEMPTY_R {
TXEMPTY_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10 - Iteration Interrupt Mask"]
#[inline(always)]
pub fn iter(&self) -> ITER_R {
ITER_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11 - Buffer Empty Interrupt Mask"]
#[inline(always)]
pub fn txbufe(&self) -> TXBUFE_R {
TXBUFE_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12 - Buffer Full Interrupt Mask"]
#[inline(always)]
pub fn rxbuff(&self) -> RXBUFF_R {
RXBUFF_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 13 - Non Acknowledge or LIN Break Sent or LIN Break Received Interrupt Mask"]
#[inline(always)]
pub fn nack(&self) -> NACK_R {
NACK_R::new(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 14 - LIN Identifier Sent or LIN Received Interrupt Mask"]
#[inline(always)]
pub fn linid(&self) -> LINID_R {
LINID_R::new(((self.bits >> 14) & 0x01) != 0)
}
#[doc = "Bit 15 - LIN Transfer Conpleted Interrupt Mask"]
#[inline(always)]
pub fn lintc(&self) -> LINTC_R {
LINTC_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bit 16 - Ring Indicator Input Change Mask"]
#[inline(always)]
pub fn riic(&self) -> RIIC_R {
RIIC_R::new(((self.bits >> 16) & 0x01) != 0)
}
#[doc = "Bit 17 - Data Set Ready Input Change Mask"]
#[inline(always)]
pub fn dsric(&self) -> DSRIC_R {
DSRIC_R::new(((self.bits >> 17) & 0x01) != 0)
}
#[doc = "Bit 18 - Data Carrier Detect Input Change Interrupt Mask"]
#[inline(always)]
pub fn dcdic(&self) -> DCDIC_R {
DCDIC_R::new(((self.bits >> 18) & 0x01) != 0)
}
#[doc = "Bit 19 - Clear to Send Input Change Interrupt Mask"]
#[inline(always)]
pub fn ctsic(&self) -> CTSIC_R {
CTSIC_R::new(((self.bits >> 19) & 0x01) != 0)
}
#[doc = "Bit 25 - LIN Bus Error Interrupt Mask"]
#[inline(always)]
pub fn linbe(&self) -> LINBE_R {
LINBE_R::new(((self.bits >> 25) & 0x01) != 0)
}
#[doc = "Bit 26 - LIN Inconsistent Synch Field Error Interrupt Mask"]
#[inline(always)]
pub fn linisfe(&self) -> LINISFE_R {
LINISFE_R::new(((self.bits >> 26) & 0x01) != 0)
}
#[doc = "Bit 27 - LIN Identifier Parity Interrupt Mask"]
#[inline(always)]
pub fn linipe(&self) -> LINIPE_R {
LINIPE_R::new(((self.bits >> 27) & 0x01) != 0)
}
#[doc = "Bit 28 - LIN Checksum Error Interrupt Mask"]
#[inline(always)]
pub fn lince(&self) -> LINCE_R {
LINCE_R::new(((self.bits >> 28) & 0x01) != 0)
}
#[doc = "Bit 29 - LIN Slave Not Responding Error Interrupt Mask"]
#[inline(always)]
pub fn linsnre(&self) -> LINSNRE_R {
LINSNRE_R::new(((self.bits >> 29) & 0x01) != 0)
}
#[doc = "Bit 30 - LIN Synch Tolerance Error Interrupt Mask"]
#[inline(always)]
pub fn linste(&self) -> LINSTE_R {
LINSTE_R::new(((self.bits >> 30) & 0x01) != 0)
}
#[doc = "Bit 31 - LIN Header Timeout Error Interrupt Mask"]
#[inline(always)]
pub fn linhte(&self) -> LINHTE_R {
LINHTE_R::new(((self.bits >> 31) & 0x01) != 0)
}
}
#[doc = "Interrupt Mask Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [lin_mode_imr_lin](index.html) module"]
pub struct LIN_MODE_IMR_LIN_SPEC;
impl crate::RegisterSpec for LIN_MODE_IMR_LIN_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [lin_mode_imr_lin::R](R) reader structure"]
impl crate::Readable for LIN_MODE_IMR_LIN_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets IMR_LIN to value 0"]
impl crate::Resettable for LIN_MODE_IMR_LIN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}