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
#[doc = "Reader of register CTRL2"]
pub type R = crate::R<u32, super::CTRL2>;
#[doc = "Writer for register CTRL2"]
pub type W = crate::W<u32, super::CTRL2>;
#[doc = "Register CTRL2 `reset()`'s with value 0x0080_0000"]
impl crate::ResetValue for super::CTRL2 {
    type Type = u32;
    #[inline(always)]
    fn reset_value() -> Self::Type {
        0x0080_0000
    }
}
#[doc = "Time Stamp Capture Point\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum TSTAMPCAP_A {
    #[doc = "0: The high resolution time stamp capture is disabled"]
    TSTAMPCAP_0 = 0,
    #[doc = "1: The high resolution time stamp is captured in the end of the CAN frame"]
    TSTAMPCAP_1 = 1,
    #[doc = "2: The high resolution time stamp is captured in the start of the CAN frame"]
    TSTAMPCAP_2 = 2,
    #[doc = "3: The high resolution time stamp is captured in the start of frame for classical CAN frames and in res bit for CAN FD frames"]
    TSTAMPCAP_3 = 3,
}
impl From<TSTAMPCAP_A> for u8 {
    #[inline(always)]
    fn from(variant: TSTAMPCAP_A) -> Self {
        variant as _
    }
}
#[doc = "Reader of field `TSTAMPCAP`"]
pub type TSTAMPCAP_R = crate::R<u8, TSTAMPCAP_A>;
impl TSTAMPCAP_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TSTAMPCAP_A {
        match self.bits {
            0 => TSTAMPCAP_A::TSTAMPCAP_0,
            1 => TSTAMPCAP_A::TSTAMPCAP_1,
            2 => TSTAMPCAP_A::TSTAMPCAP_2,
            3 => TSTAMPCAP_A::TSTAMPCAP_3,
            _ => unreachable!(),
        }
    }
    #[doc = "Checks if the value of the field is `TSTAMPCAP_0`"]
    #[inline(always)]
    pub fn is_tstampcap_0(&self) -> bool {
        *self == TSTAMPCAP_A::TSTAMPCAP_0
    }
    #[doc = "Checks if the value of the field is `TSTAMPCAP_1`"]
    #[inline(always)]
    pub fn is_tstampcap_1(&self) -> bool {
        *self == TSTAMPCAP_A::TSTAMPCAP_1
    }
    #[doc = "Checks if the value of the field is `TSTAMPCAP_2`"]
    #[inline(always)]
    pub fn is_tstampcap_2(&self) -> bool {
        *self == TSTAMPCAP_A::TSTAMPCAP_2
    }
    #[doc = "Checks if the value of the field is `TSTAMPCAP_3`"]
    #[inline(always)]
    pub fn is_tstampcap_3(&self) -> bool {
        *self == TSTAMPCAP_A::TSTAMPCAP_3
    }
}
#[doc = "Write proxy for field `TSTAMPCAP`"]
pub struct TSTAMPCAP_W<'a> {
    w: &'a mut W,
}
impl<'a> TSTAMPCAP_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: TSTAMPCAP_A) -> &'a mut W {
        {
            self.bits(variant.into())
        }
    }
    #[doc = "The high resolution time stamp capture is disabled"]
    #[inline(always)]
    pub fn tstampcap_0(self) -> &'a mut W {
        self.variant(TSTAMPCAP_A::TSTAMPCAP_0)
    }
    #[doc = "The high resolution time stamp is captured in the end of the CAN frame"]
    #[inline(always)]
    pub fn tstampcap_1(self) -> &'a mut W {
        self.variant(TSTAMPCAP_A::TSTAMPCAP_1)
    }
    #[doc = "The high resolution time stamp is captured in the start of the CAN frame"]
    #[inline(always)]
    pub fn tstampcap_2(self) -> &'a mut W {
        self.variant(TSTAMPCAP_A::TSTAMPCAP_2)
    }
    #[doc = "The high resolution time stamp is captured in the start of frame for classical CAN frames and in res bit for CAN FD frames"]
    #[inline(always)]
    pub fn tstampcap_3(self) -> &'a mut W {
        self.variant(TSTAMPCAP_A::TSTAMPCAP_3)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 6)) | (((value as u32) & 0x03) << 6);
        self.w
    }
}
#[doc = "Message Buffer Time Stamp Base\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum MBTSBASE_A {
    #[doc = "0: Message Buffer Time Stamp base is CAN_TIMER"]
    MBTSBASE_0 = 0,
    #[doc = "1: Message Buffer Time Stamp base is lower 16-bits of high resolution timer"]
    MBTSBASE_1 = 1,
    #[doc = "2: Message Buffer Time Stamp base is upper 16-bits of high resolution timerT"]
    MBTSBASE_2 = 2,
}
impl From<MBTSBASE_A> for u8 {
    #[inline(always)]
    fn from(variant: MBTSBASE_A) -> Self {
        variant as _
    }
}
#[doc = "Reader of field `MBTSBASE`"]
pub type MBTSBASE_R = crate::R<u8, MBTSBASE_A>;
impl MBTSBASE_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, MBTSBASE_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(MBTSBASE_A::MBTSBASE_0),
            1 => Val(MBTSBASE_A::MBTSBASE_1),
            2 => Val(MBTSBASE_A::MBTSBASE_2),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `MBTSBASE_0`"]
    #[inline(always)]
    pub fn is_mbtsbase_0(&self) -> bool {
        *self == MBTSBASE_A::MBTSBASE_0
    }
    #[doc = "Checks if the value of the field is `MBTSBASE_1`"]
    #[inline(always)]
    pub fn is_mbtsbase_1(&self) -> bool {
        *self == MBTSBASE_A::MBTSBASE_1
    }
    #[doc = "Checks if the value of the field is `MBTSBASE_2`"]
    #[inline(always)]
    pub fn is_mbtsbase_2(&self) -> bool {
        *self == MBTSBASE_A::MBTSBASE_2
    }
}
#[doc = "Write proxy for field `MBTSBASE`"]
pub struct MBTSBASE_W<'a> {
    w: &'a mut W,
}
impl<'a> MBTSBASE_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: MBTSBASE_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "Message Buffer Time Stamp base is CAN_TIMER"]
    #[inline(always)]
    pub fn mbtsbase_0(self) -> &'a mut W {
        self.variant(MBTSBASE_A::MBTSBASE_0)
    }
    #[doc = "Message Buffer Time Stamp base is lower 16-bits of high resolution timer"]
    #[inline(always)]
    pub fn mbtsbase_1(self) -> &'a mut W {
        self.variant(MBTSBASE_A::MBTSBASE_1)
    }
    #[doc = "Message Buffer Time Stamp base is upper 16-bits of high resolution timerT"]
    #[inline(always)]
    pub fn mbtsbase_2(self) -> &'a mut W {
        self.variant(MBTSBASE_A::MBTSBASE_2)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8);
        self.w
    }
}
#[doc = "Edge Filter Disable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EDFLTDIS_A {
    #[doc = "0: Edge Filter is enabled"]
    EDFLTDIS_0 = 0,
    #[doc = "1: Edge Filter is disabled"]
    EDFLTDIS_1 = 1,
}
impl From<EDFLTDIS_A> for bool {
    #[inline(always)]
    fn from(variant: EDFLTDIS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Reader of field `EDFLTDIS`"]
pub type EDFLTDIS_R = crate::R<bool, EDFLTDIS_A>;
impl EDFLTDIS_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> EDFLTDIS_A {
        match self.bits {
            false => EDFLTDIS_A::EDFLTDIS_0,
            true => EDFLTDIS_A::EDFLTDIS_1,
        }
    }
    #[doc = "Checks if the value of the field is `EDFLTDIS_0`"]
    #[inline(always)]
    pub fn is_edfltdis_0(&self) -> bool {
        *self == EDFLTDIS_A::EDFLTDIS_0
    }
    #[doc = "Checks if the value of the field is `EDFLTDIS_1`"]
    #[inline(always)]
    pub fn is_edfltdis_1(&self) -> bool {
        *self == EDFLTDIS_A::EDFLTDIS_1
    }
}
#[doc = "Write proxy for field `EDFLTDIS`"]
pub struct EDFLTDIS_W<'a> {
    w: &'a mut W,
}
impl<'a> EDFLTDIS_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: EDFLTDIS_A) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "Edge Filter is enabled"]
    #[inline(always)]
    pub fn edfltdis_0(self) -> &'a mut W {
        self.variant(EDFLTDIS_A::EDFLTDIS_0)
    }
    #[doc = "Edge Filter is disabled"]
    #[inline(always)]
    pub fn edfltdis_1(self) -> &'a mut W {
        self.variant(EDFLTDIS_A::EDFLTDIS_1)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11);
        self.w
    }
}
#[doc = "ISO CAN FD Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ISOCANFDEN_A {
    #[doc = "0: FlexCAN operates using the non-ISO CAN FD protocol."]
    ISOCANFDEN_0 = 0,
    #[doc = "1: FlexCAN operates using the ISO CAN FD protocol (ISO 11898-1)."]
    ISOCANFDEN_1 = 1,
}
impl From<ISOCANFDEN_A> for bool {
    #[inline(always)]
    fn from(variant: ISOCANFDEN_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Reader of field `ISOCANFDEN`"]
pub type ISOCANFDEN_R = crate::R<bool, ISOCANFDEN_A>;
impl ISOCANFDEN_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> ISOCANFDEN_A {
        match self.bits {
            false => ISOCANFDEN_A::ISOCANFDEN_0,
            true => ISOCANFDEN_A::ISOCANFDEN_1,
        }
    }
    #[doc = "Checks if the value of the field is `ISOCANFDEN_0`"]
    #[inline(always)]
    pub fn is_isocanfden_0(&self) -> bool {
        *self == ISOCANFDEN_A::ISOCANFDEN_0
    }
    #[doc = "Checks if the value of the field is `ISOCANFDEN_1`"]
    #[inline(always)]
    pub fn is_isocanfden_1(&self) -> bool {
        *self == ISOCANFDEN_A::ISOCANFDEN_1
    }
}
#[doc = "Write proxy for field `ISOCANFDEN`"]
pub struct ISOCANFDEN_W<'a> {
    w: &'a mut W,
}
impl<'a> ISOCANFDEN_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: ISOCANFDEN_A) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "FlexCAN operates using the non-ISO CAN FD protocol."]
    #[inline(always)]
    pub fn isocanfden_0(self) -> &'a mut W {
        self.variant(ISOCANFDEN_A::ISOCANFDEN_0)
    }
    #[doc = "FlexCAN operates using the ISO CAN FD protocol (ISO 11898-1)."]
    #[inline(always)]
    pub fn isocanfden_1(self) -> &'a mut W {
        self.variant(ISOCANFDEN_A::ISOCANFDEN_1)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12);
        self.w
    }
}
#[doc = "Bit Timing Expansion enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum BTE_A {
    #[doc = "0: CAN Bit timing expansion is disabled."]
    BTE_0 = 0,
    #[doc = "1: CAN bit timing expansion is enabled."]
    BTE_1 = 1,
}
impl From<BTE_A> for bool {
    #[inline(always)]
    fn from(variant: BTE_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Reader of field `BTE`"]
pub type BTE_R = crate::R<bool, BTE_A>;
impl BTE_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> BTE_A {
        match self.bits {
            false => BTE_A::BTE_0,
            true => BTE_A::BTE_1,
        }
    }
    #[doc = "Checks if the value of the field is `BTE_0`"]
    #[inline(always)]
    pub fn is_bte_0(&self) -> bool {
        *self == BTE_A::BTE_0
    }
    #[doc = "Checks if the value of the field is `BTE_1`"]
    #[inline(always)]
    pub fn is_bte_1(&self) -> bool {
        *self == BTE_A::BTE_1
    }
}
#[doc = "Write proxy for field `BTE`"]
pub struct BTE_W<'a> {
    w: &'a mut W,
}
impl<'a> BTE_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: BTE_A) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "CAN Bit timing expansion is disabled."]
    #[inline(always)]
    pub fn bte_0(self) -> &'a mut W {
        self.variant(BTE_A::BTE_0)
    }
    #[doc = "CAN bit timing expansion is enabled."]
    #[inline(always)]
    pub fn bte_1(self) -> &'a mut W {
        self.variant(BTE_A::BTE_1)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13);
        self.w
    }
}
#[doc = "Protocol Exception Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PREXCEN_A {
    #[doc = "0: Protocol Exception is disabled."]
    PREXCEN_0 = 0,
    #[doc = "1: Protocol Exception is enabled."]
    PREXCEN_1 = 1,
}
impl From<PREXCEN_A> for bool {
    #[inline(always)]
    fn from(variant: PREXCEN_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Reader of field `PREXCEN`"]
pub type PREXCEN_R = crate::R<bool, PREXCEN_A>;
impl PREXCEN_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> PREXCEN_A {
        match self.bits {
            false => PREXCEN_A::PREXCEN_0,
            true => PREXCEN_A::PREXCEN_1,
        }
    }
    #[doc = "Checks if the value of the field is `PREXCEN_0`"]
    #[inline(always)]
    pub fn is_prexcen_0(&self) -> bool {
        *self == PREXCEN_A::PREXCEN_0
    }
    #[doc = "Checks if the value of the field is `PREXCEN_1`"]
    #[inline(always)]
    pub fn is_prexcen_1(&self) -> bool {
        *self == PREXCEN_A::PREXCEN_1
    }
}
#[doc = "Write proxy for field `PREXCEN`"]
pub struct PREXCEN_W<'a> {
    w: &'a mut W,
}
impl<'a> PREXCEN_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: PREXCEN_A) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "Protocol Exception is disabled."]
    #[inline(always)]
    pub fn prexcen_0(self) -> &'a mut W {
        self.variant(PREXCEN_A::PREXCEN_0)
    }
    #[doc = "Protocol Exception is enabled."]
    #[inline(always)]
    pub fn prexcen_1(self) -> &'a mut W {
        self.variant(PREXCEN_A::PREXCEN_1)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14);
        self.w
    }
}
#[doc = "Timer Source\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIMER_SRC_A {
    #[doc = "0: The Free Running Timer is clocked by the CAN bit clock, which defines the baud rate on the CAN bus."]
    TIMER_SRC_0 = 0,
    #[doc = "1: The Free Running Timer is clocked by an external time tick. The period can be either adjusted to be equal to the baud rate on the CAN bus, or a different value as required. See the device specific section for details about the external time tick."]
    TIMER_SRC_1 = 1,
}
impl From<TIMER_SRC_A> for bool {
    #[inline(always)]
    fn from(variant: TIMER_SRC_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Reader of field `TIMER_SRC`"]
pub type TIMER_SRC_R = crate::R<bool, TIMER_SRC_A>;
impl TIMER_SRC_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TIMER_SRC_A {
        match self.bits {
            false => TIMER_SRC_A::TIMER_SRC_0,
            true => TIMER_SRC_A::TIMER_SRC_1,
        }
    }
    #[doc = "Checks if the value of the field is `TIMER_SRC_0`"]
    #[inline(always)]
    pub fn is_timer_src_0(&self) -> bool {
        *self == TIMER_SRC_A::TIMER_SRC_0
    }
    #[doc = "Checks if the value of the field is `TIMER_SRC_1`"]
    #[inline(always)]
    pub fn is_timer_src_1(&self) -> bool {
        *self == TIMER_SRC_A::TIMER_SRC_1
    }
}
#[doc = "Write proxy for field `TIMER_SRC`"]
pub struct TIMER_SRC_W<'a> {
    w: &'a mut W,
}
impl<'a> TIMER_SRC_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: TIMER_SRC_A) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "The Free Running Timer is clocked by the CAN bit clock, which defines the baud rate on the CAN bus."]
    #[inline(always)]
    pub fn timer_src_0(self) -> &'a mut W {
        self.variant(TIMER_SRC_A::TIMER_SRC_0)
    }
    #[doc = "The Free Running Timer is clocked by an external time tick. The period can be either adjusted to be equal to the baud rate on the CAN bus, or a different value as required. See the device specific section for details about the external time tick."]
    #[inline(always)]
    pub fn timer_src_1(self) -> &'a mut W {
        self.variant(TIMER_SRC_A::TIMER_SRC_1)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15);
        self.w
    }
}
#[doc = "Entire Frame Arbitration Field Comparison Enable For Rx Mailboxes\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EACEN_A {
    #[doc = "0: Rx Mailbox filter's IDE bit is always compared and RTR is never compared despite mask bits."]
    EACEN_0 = 0,
    #[doc = "1: Enables the comparison of both Rx Mailbox filter's IDE and RTR bit with their corresponding bits within the incoming frame. Mask bits do apply."]
    EACEN_1 = 1,
}
impl From<EACEN_A> for bool {
    #[inline(always)]
    fn from(variant: EACEN_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Reader of field `EACEN`"]
pub type EACEN_R = crate::R<bool, EACEN_A>;
impl EACEN_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> EACEN_A {
        match self.bits {
            false => EACEN_A::EACEN_0,
            true => EACEN_A::EACEN_1,
        }
    }
    #[doc = "Checks if the value of the field is `EACEN_0`"]
    #[inline(always)]
    pub fn is_eacen_0(&self) -> bool {
        *self == EACEN_A::EACEN_0
    }
    #[doc = "Checks if the value of the field is `EACEN_1`"]
    #[inline(always)]
    pub fn is_eacen_1(&self) -> bool {
        *self == EACEN_A::EACEN_1
    }
}
#[doc = "Write proxy for field `EACEN`"]
pub struct EACEN_W<'a> {
    w: &'a mut W,
}
impl<'a> EACEN_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: EACEN_A) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "Rx Mailbox filter's IDE bit is always compared and RTR is never compared despite mask bits."]
    #[inline(always)]
    pub fn eacen_0(self) -> &'a mut W {
        self.variant(EACEN_A::EACEN_0)
    }
    #[doc = "Enables the comparison of both Rx Mailbox filter's IDE and RTR bit with their corresponding bits within the incoming frame. Mask bits do apply."]
    #[inline(always)]
    pub fn eacen_1(self) -> &'a mut W {
        self.variant(EACEN_A::EACEN_1)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16);
        self.w
    }
}
#[doc = "Remote Request Storing\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RRS_A {
    #[doc = "0: Remote Response Frame is generated."]
    RRS_0 = 0,
    #[doc = "1: Remote Request Frame is stored."]
    RRS_1 = 1,
}
impl From<RRS_A> for bool {
    #[inline(always)]
    fn from(variant: RRS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Reader of field `RRS`"]
pub type RRS_R = crate::R<bool, RRS_A>;
impl RRS_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> RRS_A {
        match self.bits {
            false => RRS_A::RRS_0,
            true => RRS_A::RRS_1,
        }
    }
    #[doc = "Checks if the value of the field is `RRS_0`"]
    #[inline(always)]
    pub fn is_rrs_0(&self) -> bool {
        *self == RRS_A::RRS_0
    }
    #[doc = "Checks if the value of the field is `RRS_1`"]
    #[inline(always)]
    pub fn is_rrs_1(&self) -> bool {
        *self == RRS_A::RRS_1
    }
}
#[doc = "Write proxy for field `RRS`"]
pub struct RRS_W<'a> {
    w: &'a mut W,
}
impl<'a> RRS_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: RRS_A) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "Remote Response Frame is generated."]
    #[inline(always)]
    pub fn rrs_0(self) -> &'a mut W {
        self.variant(RRS_A::RRS_0)
    }
    #[doc = "Remote Request Frame is stored."]
    #[inline(always)]
    pub fn rrs_1(self) -> &'a mut W {
        self.variant(RRS_A::RRS_1)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17);
        self.w
    }
}
#[doc = "Mailboxes Reception Priority\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum MRP_A {
    #[doc = "0: Matching starts from Legacy Rx FIFO or Enhanced Rx FIFO and continues on Mailboxes."]
    MRP_0 = 0,
    #[doc = "1: Matching starts from Mailboxes and continues on Legacy Rx FIFO or Enhanced Rx FIFO ."]
    MRP_1 = 1,
}
impl From<MRP_A> for bool {
    #[inline(always)]
    fn from(variant: MRP_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Reader of field `MRP`"]
pub type MRP_R = crate::R<bool, MRP_A>;
impl MRP_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> MRP_A {
        match self.bits {
            false => MRP_A::MRP_0,
            true => MRP_A::MRP_1,
        }
    }
    #[doc = "Checks if the value of the field is `MRP_0`"]
    #[inline(always)]
    pub fn is_mrp_0(&self) -> bool {
        *self == MRP_A::MRP_0
    }
    #[doc = "Checks if the value of the field is `MRP_1`"]
    #[inline(always)]
    pub fn is_mrp_1(&self) -> bool {
        *self == MRP_A::MRP_1
    }
}
#[doc = "Write proxy for field `MRP`"]
pub struct MRP_W<'a> {
    w: &'a mut W,
}
impl<'a> MRP_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: MRP_A) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "Matching starts from Legacy Rx FIFO or Enhanced Rx FIFO and continues on Mailboxes."]
    #[inline(always)]
    pub fn mrp_0(self) -> &'a mut W {
        self.variant(MRP_A::MRP_0)
    }
    #[doc = "Matching starts from Mailboxes and continues on Legacy Rx FIFO or Enhanced Rx FIFO ."]
    #[inline(always)]
    pub fn mrp_1(self) -> &'a mut W {
        self.variant(MRP_A::MRP_1)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18);
        self.w
    }
}
#[doc = "Reader of field `TASD`"]
pub type TASD_R = crate::R<u8, u8>;
#[doc = "Write proxy for field `TASD`"]
pub struct TASD_W<'a> {
    w: &'a mut W,
}
impl<'a> TASD_W<'a> {
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x1f << 19)) | (((value as u32) & 0x1f) << 19);
        self.w
    }
}
#[doc = "Reader of field `RFFN`"]
pub type RFFN_R = crate::R<u8, u8>;
#[doc = "Write proxy for field `RFFN`"]
pub struct RFFN_W<'a> {
    w: &'a mut W,
}
impl<'a> RFFN_W<'a> {
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x0f << 24)) | (((value as u32) & 0x0f) << 24);
        self.w
    }
}
#[doc = "Bus Off Done Interrupt Mask\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum BOFFDONEMSK_A {
    #[doc = "0: Bus Off Done interrupt disabled."]
    BOFFDONEMSK_0 = 0,
    #[doc = "1: Bus Off Done interrupt enabled."]
    BOFFDONEMSK_1 = 1,
}
impl From<BOFFDONEMSK_A> for bool {
    #[inline(always)]
    fn from(variant: BOFFDONEMSK_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Reader of field `BOFFDONEMSK`"]
pub type BOFFDONEMSK_R = crate::R<bool, BOFFDONEMSK_A>;
impl BOFFDONEMSK_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> BOFFDONEMSK_A {
        match self.bits {
            false => BOFFDONEMSK_A::BOFFDONEMSK_0,
            true => BOFFDONEMSK_A::BOFFDONEMSK_1,
        }
    }
    #[doc = "Checks if the value of the field is `BOFFDONEMSK_0`"]
    #[inline(always)]
    pub fn is_boffdonemsk_0(&self) -> bool {
        *self == BOFFDONEMSK_A::BOFFDONEMSK_0
    }
    #[doc = "Checks if the value of the field is `BOFFDONEMSK_1`"]
    #[inline(always)]
    pub fn is_boffdonemsk_1(&self) -> bool {
        *self == BOFFDONEMSK_A::BOFFDONEMSK_1
    }
}
#[doc = "Write proxy for field `BOFFDONEMSK`"]
pub struct BOFFDONEMSK_W<'a> {
    w: &'a mut W,
}
impl<'a> BOFFDONEMSK_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: BOFFDONEMSK_A) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "Bus Off Done interrupt disabled."]
    #[inline(always)]
    pub fn boffdonemsk_0(self) -> &'a mut W {
        self.variant(BOFFDONEMSK_A::BOFFDONEMSK_0)
    }
    #[doc = "Bus Off Done interrupt enabled."]
    #[inline(always)]
    pub fn boffdonemsk_1(self) -> &'a mut W {
        self.variant(BOFFDONEMSK_A::BOFFDONEMSK_1)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30);
        self.w
    }
}
#[doc = "Error Interrupt Mask for errors detected in the Data Phase of fast CAN FD frames\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ERRMSK_FAST_A {
    #[doc = "0: ERRINT_FAST Error interrupt disabled."]
    ERRMSK_FAST_0 = 0,
    #[doc = "1: ERRINT_FAST Error interrupt enabled."]
    ERRMSK_FAST_1 = 1,
}
impl From<ERRMSK_FAST_A> for bool {
    #[inline(always)]
    fn from(variant: ERRMSK_FAST_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Reader of field `ERRMSK_FAST`"]
pub type ERRMSK_FAST_R = crate::R<bool, ERRMSK_FAST_A>;
impl ERRMSK_FAST_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> ERRMSK_FAST_A {
        match self.bits {
            false => ERRMSK_FAST_A::ERRMSK_FAST_0,
            true => ERRMSK_FAST_A::ERRMSK_FAST_1,
        }
    }
    #[doc = "Checks if the value of the field is `ERRMSK_FAST_0`"]
    #[inline(always)]
    pub fn is_errmsk_fast_0(&self) -> bool {
        *self == ERRMSK_FAST_A::ERRMSK_FAST_0
    }
    #[doc = "Checks if the value of the field is `ERRMSK_FAST_1`"]
    #[inline(always)]
    pub fn is_errmsk_fast_1(&self) -> bool {
        *self == ERRMSK_FAST_A::ERRMSK_FAST_1
    }
}
#[doc = "Write proxy for field `ERRMSK_FAST`"]
pub struct ERRMSK_FAST_W<'a> {
    w: &'a mut W,
}
impl<'a> ERRMSK_FAST_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: ERRMSK_FAST_A) -> &'a mut W {
        {
            self.bit(variant.into())
        }
    }
    #[doc = "ERRINT_FAST Error interrupt disabled."]
    #[inline(always)]
    pub fn errmsk_fast_0(self) -> &'a mut W {
        self.variant(ERRMSK_FAST_A::ERRMSK_FAST_0)
    }
    #[doc = "ERRINT_FAST Error interrupt enabled."]
    #[inline(always)]
    pub fn errmsk_fast_1(self) -> &'a mut W {
        self.variant(ERRMSK_FAST_A::ERRMSK_FAST_1)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31);
        self.w
    }
}
impl R {
    #[doc = "Bits 6:7 - Time Stamp Capture Point"]
    #[inline(always)]
    pub fn tstampcap(&self) -> TSTAMPCAP_R {
        TSTAMPCAP_R::new(((self.bits >> 6) & 0x03) as u8)
    }
    #[doc = "Bits 8:9 - Message Buffer Time Stamp Base"]
    #[inline(always)]
    pub fn mbtsbase(&self) -> MBTSBASE_R {
        MBTSBASE_R::new(((self.bits >> 8) & 0x03) as u8)
    }
    #[doc = "Bit 11 - Edge Filter Disable"]
    #[inline(always)]
    pub fn edfltdis(&self) -> EDFLTDIS_R {
        EDFLTDIS_R::new(((self.bits >> 11) & 0x01) != 0)
    }
    #[doc = "Bit 12 - ISO CAN FD Enable"]
    #[inline(always)]
    pub fn isocanfden(&self) -> ISOCANFDEN_R {
        ISOCANFDEN_R::new(((self.bits >> 12) & 0x01) != 0)
    }
    #[doc = "Bit 13 - Bit Timing Expansion enable"]
    #[inline(always)]
    pub fn bte(&self) -> BTE_R {
        BTE_R::new(((self.bits >> 13) & 0x01) != 0)
    }
    #[doc = "Bit 14 - Protocol Exception Enable"]
    #[inline(always)]
    pub fn prexcen(&self) -> PREXCEN_R {
        PREXCEN_R::new(((self.bits >> 14) & 0x01) != 0)
    }
    #[doc = "Bit 15 - Timer Source"]
    #[inline(always)]
    pub fn timer_src(&self) -> TIMER_SRC_R {
        TIMER_SRC_R::new(((self.bits >> 15) & 0x01) != 0)
    }
    #[doc = "Bit 16 - Entire Frame Arbitration Field Comparison Enable For Rx Mailboxes"]
    #[inline(always)]
    pub fn eacen(&self) -> EACEN_R {
        EACEN_R::new(((self.bits >> 16) & 0x01) != 0)
    }
    #[doc = "Bit 17 - Remote Request Storing"]
    #[inline(always)]
    pub fn rrs(&self) -> RRS_R {
        RRS_R::new(((self.bits >> 17) & 0x01) != 0)
    }
    #[doc = "Bit 18 - Mailboxes Reception Priority"]
    #[inline(always)]
    pub fn mrp(&self) -> MRP_R {
        MRP_R::new(((self.bits >> 18) & 0x01) != 0)
    }
    #[doc = "Bits 19:23 - Tx Arbitration Start Delay"]
    #[inline(always)]
    pub fn tasd(&self) -> TASD_R {
        TASD_R::new(((self.bits >> 19) & 0x1f) as u8)
    }
    #[doc = "Bits 24:27 - Number Of Legacy Rx FIFO Filters"]
    #[inline(always)]
    pub fn rffn(&self) -> RFFN_R {
        RFFN_R::new(((self.bits >> 24) & 0x0f) as u8)
    }
    #[doc = "Bit 30 - Bus Off Done Interrupt Mask"]
    #[inline(always)]
    pub fn boffdonemsk(&self) -> BOFFDONEMSK_R {
        BOFFDONEMSK_R::new(((self.bits >> 30) & 0x01) != 0)
    }
    #[doc = "Bit 31 - Error Interrupt Mask for errors detected in the Data Phase of fast CAN FD frames"]
    #[inline(always)]
    pub fn errmsk_fast(&self) -> ERRMSK_FAST_R {
        ERRMSK_FAST_R::new(((self.bits >> 31) & 0x01) != 0)
    }
}
impl W {
    #[doc = "Bits 6:7 - Time Stamp Capture Point"]
    #[inline(always)]
    pub fn tstampcap(&mut self) -> TSTAMPCAP_W {
        TSTAMPCAP_W { w: self }
    }
    #[doc = "Bits 8:9 - Message Buffer Time Stamp Base"]
    #[inline(always)]
    pub fn mbtsbase(&mut self) -> MBTSBASE_W {
        MBTSBASE_W { w: self }
    }
    #[doc = "Bit 11 - Edge Filter Disable"]
    #[inline(always)]
    pub fn edfltdis(&mut self) -> EDFLTDIS_W {
        EDFLTDIS_W { w: self }
    }
    #[doc = "Bit 12 - ISO CAN FD Enable"]
    #[inline(always)]
    pub fn isocanfden(&mut self) -> ISOCANFDEN_W {
        ISOCANFDEN_W { w: self }
    }
    #[doc = "Bit 13 - Bit Timing Expansion enable"]
    #[inline(always)]
    pub fn bte(&mut self) -> BTE_W {
        BTE_W { w: self }
    }
    #[doc = "Bit 14 - Protocol Exception Enable"]
    #[inline(always)]
    pub fn prexcen(&mut self) -> PREXCEN_W {
        PREXCEN_W { w: self }
    }
    #[doc = "Bit 15 - Timer Source"]
    #[inline(always)]
    pub fn timer_src(&mut self) -> TIMER_SRC_W {
        TIMER_SRC_W { w: self }
    }
    #[doc = "Bit 16 - Entire Frame Arbitration Field Comparison Enable For Rx Mailboxes"]
    #[inline(always)]
    pub fn eacen(&mut self) -> EACEN_W {
        EACEN_W { w: self }
    }
    #[doc = "Bit 17 - Remote Request Storing"]
    #[inline(always)]
    pub fn rrs(&mut self) -> RRS_W {
        RRS_W { w: self }
    }
    #[doc = "Bit 18 - Mailboxes Reception Priority"]
    #[inline(always)]
    pub fn mrp(&mut self) -> MRP_W {
        MRP_W { w: self }
    }
    #[doc = "Bits 19:23 - Tx Arbitration Start Delay"]
    #[inline(always)]
    pub fn tasd(&mut self) -> TASD_W {
        TASD_W { w: self }
    }
    #[doc = "Bits 24:27 - Number Of Legacy Rx FIFO Filters"]
    #[inline(always)]
    pub fn rffn(&mut self) -> RFFN_W {
        RFFN_W { w: self }
    }
    #[doc = "Bit 30 - Bus Off Done Interrupt Mask"]
    #[inline(always)]
    pub fn boffdonemsk(&mut self) -> BOFFDONEMSK_W {
        BOFFDONEMSK_W { w: self }
    }
    #[doc = "Bit 31 - Error Interrupt Mask for errors detected in the Data Phase of fast CAN FD frames"]
    #[inline(always)]
    pub fn errmsk_fast(&mut self) -> ERRMSK_FAST_W {
        ERRMSK_FAST_W { w: self }
    }
}