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
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
#[doc = "LPI2C"]
#[repr(C)]
pub struct RegisterBlock {
    #[doc = "Version ID Register"]
    pub VERID: crate::RORegister<u32>,
    #[doc = "Parameter Register"]
    pub PARAM: crate::RORegister<u32>,
    _reserved0: [u8; 0x08],
    #[doc = "Master Control Register"]
    pub MCR: crate::RWRegister<u32>,
    #[doc = "Master Status Register"]
    pub MSR: crate::RWRegister<u32>,
    #[doc = "Master Interrupt Enable Register"]
    pub MIER: crate::RWRegister<u32>,
    #[doc = "Master DMA Enable Register"]
    pub MDER: crate::RWRegister<u32>,
    #[doc = "Master Configuration Register 0"]
    pub MCFGR0: crate::RWRegister<u32>,
    #[doc = "Master Configuration Register 1"]
    pub MCFGR1: crate::RWRegister<u32>,
    #[doc = "Master Configuration Register 2"]
    pub MCFGR2: crate::RWRegister<u32>,
    #[doc = "Master Configuration Register 3"]
    pub MCFGR3: crate::RWRegister<u32>,
    _reserved1: [u8; 0x10],
    #[doc = "Master Data Match Register"]
    pub MDMR: crate::RWRegister<u32>,
    _reserved2: [u8; 0x04],
    #[doc = "Master Clock Configuration Register 0"]
    pub MCCR0: crate::RWRegister<u32>,
    _reserved3: [u8; 0x04],
    #[doc = "Master Clock Configuration Register 1"]
    pub MCCR1: crate::RWRegister<u32>,
    _reserved4: [u8; 0x04],
    #[doc = "Master FIFO Control Register"]
    pub MFCR: crate::RWRegister<u32>,
    #[doc = "Master FIFO Status Register"]
    pub MFSR: crate::RORegister<u32>,
    #[doc = "Master Transmit Data Register"]
    pub MTDR: crate::WORegister<u32>,
    _reserved5: [u8; 0x0c],
    #[doc = "Master Receive Data Register"]
    pub MRDR: crate::RORegister<u32>,
    _reserved6: [u8; 0x9c],
    #[doc = "Slave Control Register"]
    pub SCR: crate::RWRegister<u32>,
    #[doc = "Slave Status Register"]
    pub SSR: crate::RWRegister<u32>,
    #[doc = "Slave Interrupt Enable Register"]
    pub SIER: crate::RWRegister<u32>,
    #[doc = "Slave DMA Enable Register"]
    pub SDER: crate::RWRegister<u32>,
    _reserved7: [u8; 0x04],
    #[doc = "Slave Configuration Register 1"]
    pub SCFGR1: crate::RWRegister<u32>,
    #[doc = "Slave Configuration Register 2"]
    pub SCFGR2: crate::RWRegister<u32>,
    _reserved8: [u8; 0x14],
    #[doc = "Slave Address Match Register"]
    pub SAMR: crate::RWRegister<u32>,
    _reserved9: [u8; 0x0c],
    #[doc = "Slave Address Status Register"]
    pub SASR: crate::RORegister<u32>,
    #[doc = "Slave Transmit ACK Register"]
    pub STAR: crate::RWRegister<u32>,
    _reserved10: [u8; 0x08],
    #[doc = "Slave Transmit Data Register"]
    pub STDR: crate::WORegister<u32>,
    _reserved11: [u8; 0x0c],
    #[doc = "Slave Receive Data Register"]
    pub SRDR: crate::RORegister<u32>,
}
#[doc = "Version ID Register"]
pub mod VERID {
    #[doc = "Feature Specification Number"]
    pub mod FEATURE {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xffff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Master only, with standard feature set"]
            pub const FEATURE_2: u32 = 0x02;
            #[doc = "Master and slave, with standard feature set"]
            pub const FEATURE_3: u32 = 0x03;
        }
    }
    #[doc = "Minor Version Number"]
    pub mod MINOR {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Major Version Number"]
    pub mod MAJOR {
        pub const offset: u32 = 24;
        pub const mask: u32 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Parameter Register"]
pub mod PARAM {
    #[doc = "Master Transmit FIFO Size"]
    pub mod MTXFIFO {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x0f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Master Receive FIFO Size"]
    pub mod MRXFIFO {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x0f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Master Control Register"]
pub mod MCR {
    #[doc = "Master Enable"]
    pub mod MEN {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Master logic is disabled"]
            pub const MEN_0: u32 = 0;
            #[doc = "Master logic is enabled"]
            pub const MEN_1: u32 = 0x01;
        }
    }
    #[doc = "Software Reset"]
    pub mod RST {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Master logic is not reset"]
            pub const RST_0: u32 = 0;
            #[doc = "Master logic is reset"]
            pub const RST_1: u32 = 0x01;
        }
    }
    #[doc = "Doze mode enable"]
    pub mod DOZEN {
        pub const offset: u32 = 2;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Master is enabled in Doze mode"]
            pub const DOZEN_0: u32 = 0;
            #[doc = "Master is disabled in Doze mode"]
            pub const DOZEN_1: u32 = 0x01;
        }
    }
    #[doc = "Debug Enable"]
    pub mod DBGEN {
        pub const offset: u32 = 3;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Master is disabled in debug mode"]
            pub const DBGEN_0: u32 = 0;
            #[doc = "Master is enabled in debug mode"]
            pub const DBGEN_1: u32 = 0x01;
        }
    }
    #[doc = "Reset Transmit FIFO"]
    pub mod RTF {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No effect"]
            pub const RTF_0: u32 = 0;
            #[doc = "Transmit FIFO is reset"]
            pub const RTF_1: u32 = 0x01;
        }
    }
    #[doc = "Reset Receive FIFO"]
    pub mod RRF {
        pub const offset: u32 = 9;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No effect"]
            pub const RRF_0: u32 = 0;
            #[doc = "Receive FIFO is reset"]
            pub const RRF_1: u32 = 0x01;
        }
    }
}
#[doc = "Master Status Register"]
pub mod MSR {
    #[doc = "Transmit Data Flag"]
    pub mod TDF {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Transmit data is not requested"]
            pub const TDF_0: u32 = 0;
            #[doc = "Transmit data is requested"]
            pub const TDF_1: u32 = 0x01;
        }
    }
    #[doc = "Receive Data Flag"]
    pub mod RDF {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Receive Data is not ready"]
            pub const RDF_0: u32 = 0;
            #[doc = "Receive data is ready"]
            pub const RDF_1: u32 = 0x01;
        }
    }
    #[doc = "End Packet Flag"]
    pub mod EPF {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Master has not generated a STOP or Repeated START condition"]
            pub const EPF_0: u32 = 0;
            #[doc = "Master has generated a STOP or Repeated START condition"]
            pub const EPF_1: u32 = 0x01;
        }
    }
    #[doc = "STOP Detect Flag"]
    pub mod SDF {
        pub const offset: u32 = 9;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Master has not generated a STOP condition"]
            pub const SDF_0: u32 = 0;
            #[doc = "Master has generated a STOP condition"]
            pub const SDF_1: u32 = 0x01;
        }
    }
    #[doc = "NACK Detect Flag"]
    pub mod NDF {
        pub const offset: u32 = 10;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Unexpected NACK was not detected"]
            pub const NDF_0: u32 = 0;
            #[doc = "Unexpected NACK was detected"]
            pub const NDF_1: u32 = 0x01;
        }
    }
    #[doc = "Arbitration Lost Flag"]
    pub mod ALF {
        pub const offset: u32 = 11;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Master has not lost arbitration"]
            pub const ALF_0: u32 = 0;
            #[doc = "Master has lost arbitration"]
            pub const ALF_1: u32 = 0x01;
        }
    }
    #[doc = "FIFO Error Flag"]
    pub mod FEF {
        pub const offset: u32 = 12;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No error"]
            pub const FEF_0: u32 = 0;
            #[doc = "Master sending or receiving data without a START condition"]
            pub const FEF_1: u32 = 0x01;
        }
    }
    #[doc = "Pin Low Timeout Flag"]
    pub mod PLTF {
        pub const offset: u32 = 13;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Pin low timeout has not occurred or is disabled"]
            pub const PLTF_0: u32 = 0;
            #[doc = "Pin low timeout has occurred"]
            pub const PLTF_1: u32 = 0x01;
        }
    }
    #[doc = "Data Match Flag"]
    pub mod DMF {
        pub const offset: u32 = 14;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Have not received matching data"]
            pub const DMF_0: u32 = 0;
            #[doc = "Have received matching data"]
            pub const DMF_1: u32 = 0x01;
        }
    }
    #[doc = "Master Busy Flag"]
    pub mod MBF {
        pub const offset: u32 = 24;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "I2C Master is idle"]
            pub const MBF_0: u32 = 0;
            #[doc = "I2C Master is busy"]
            pub const MBF_1: u32 = 0x01;
        }
    }
    #[doc = "Bus Busy Flag"]
    pub mod BBF {
        pub const offset: u32 = 25;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "I2C Bus is idle"]
            pub const BBF_0: u32 = 0;
            #[doc = "I2C Bus is busy"]
            pub const BBF_1: u32 = 0x01;
        }
    }
}
#[doc = "Master Interrupt Enable Register"]
pub mod MIER {
    #[doc = "Transmit Data Interrupt Enable"]
    pub mod TDIE {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const TDIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const TDIE_1: u32 = 0x01;
        }
    }
    #[doc = "Receive Data Interrupt Enable"]
    pub mod RDIE {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const RDIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const RDIE_1: u32 = 0x01;
        }
    }
    #[doc = "End Packet Interrupt Enable"]
    pub mod EPIE {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const EPIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const EPIE_1: u32 = 0x01;
        }
    }
    #[doc = "STOP Detect Interrupt Enable"]
    pub mod SDIE {
        pub const offset: u32 = 9;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const SDIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const SDIE_1: u32 = 0x01;
        }
    }
    #[doc = "NACK Detect Interrupt Enable"]
    pub mod NDIE {
        pub const offset: u32 = 10;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const NDIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const NDIE_1: u32 = 0x01;
        }
    }
    #[doc = "Arbitration Lost Interrupt Enable"]
    pub mod ALIE {
        pub const offset: u32 = 11;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const ALIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const ALIE_1: u32 = 0x01;
        }
    }
    #[doc = "FIFO Error Interrupt Enable"]
    pub mod FEIE {
        pub const offset: u32 = 12;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Enabled"]
            pub const FEIE_0: u32 = 0;
            #[doc = "Disabled"]
            pub const FEIE_1: u32 = 0x01;
        }
    }
    #[doc = "Pin Low Timeout Interrupt Enable"]
    pub mod PLTIE {
        pub const offset: u32 = 13;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const PLTIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const PLTIE_1: u32 = 0x01;
        }
    }
    #[doc = "Data Match Interrupt Enable"]
    pub mod DMIE {
        pub const offset: u32 = 14;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const DMIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const DMIE_1: u32 = 0x01;
        }
    }
}
#[doc = "Master DMA Enable Register"]
pub mod MDER {
    #[doc = "Transmit Data DMA Enable"]
    pub mod TDDE {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "DMA request is disabled"]
            pub const TDDE_0: u32 = 0;
            #[doc = "DMA request is enabled"]
            pub const TDDE_1: u32 = 0x01;
        }
    }
    #[doc = "Receive Data DMA Enable"]
    pub mod RDDE {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "DMA request is disabled"]
            pub const RDDE_0: u32 = 0;
            #[doc = "DMA request is enabled"]
            pub const RDDE_1: u32 = 0x01;
        }
    }
}
#[doc = "Master Configuration Register 0"]
pub mod MCFGR0 {
    #[doc = "Host Request Enable"]
    pub mod HREN {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Host request input is disabled"]
            pub const HREN_0: u32 = 0;
            #[doc = "Host request input is enabled"]
            pub const HREN_1: u32 = 0x01;
        }
    }
    #[doc = "Host Request Polarity"]
    pub mod HRPOL {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Active low"]
            pub const HRPOL_0: u32 = 0;
            #[doc = "Active high"]
            pub const HRPOL_1: u32 = 0x01;
        }
    }
    #[doc = "Host Request Select"]
    pub mod HRSEL {
        pub const offset: u32 = 2;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Host request input is pin HREQ"]
            pub const HRSEL_0: u32 = 0;
            #[doc = "Host request input is input trigger"]
            pub const HRSEL_1: u32 = 0x01;
        }
    }
    #[doc = "Circular FIFO Enable"]
    pub mod CIRFIFO {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Circular FIFO is disabled"]
            pub const CIRFIFO_0: u32 = 0;
            #[doc = "Circular FIFO is enabled"]
            pub const CIRFIFO_1: u32 = 0x01;
        }
    }
    #[doc = "Receive Data Match Only"]
    pub mod RDMO {
        pub const offset: u32 = 9;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Received data is stored in the receive FIFO"]
            pub const RDMO_0: u32 = 0;
            #[doc = "Received data is discarded unless the the Data Match Flag (MSR\\[DMF\\]) is set"]
            pub const RDMO_1: u32 = 0x01;
        }
    }
}
#[doc = "Master Configuration Register 1"]
pub mod MCFGR1 {
    #[doc = "Prescaler"]
    pub mod PRESCALE {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x07 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Divide by 1"]
            pub const PRESCALE_0: u32 = 0;
            #[doc = "Divide by 2"]
            pub const PRESCALE_1: u32 = 0x01;
            #[doc = "Divide by 4"]
            pub const PRESCALE_2: u32 = 0x02;
            #[doc = "Divide by 8"]
            pub const PRESCALE_3: u32 = 0x03;
            #[doc = "Divide by 16"]
            pub const PRESCALE_4: u32 = 0x04;
            #[doc = "Divide by 32"]
            pub const PRESCALE_5: u32 = 0x05;
            #[doc = "Divide by 64"]
            pub const PRESCALE_6: u32 = 0x06;
            #[doc = "Divide by 128"]
            pub const PRESCALE_7: u32 = 0x07;
        }
    }
    #[doc = "Automatic STOP Generation"]
    pub mod AUTOSTOP {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No effect"]
            pub const AUTOSTOP_0: u32 = 0;
            #[doc = "STOP condition is automatically generated whenever the transmit FIFO is empty and the LPI2C master is busy"]
            pub const AUTOSTOP_1: u32 = 0x01;
        }
    }
    #[doc = "IGNACK"]
    pub mod IGNACK {
        pub const offset: u32 = 9;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "LPI2C Master will receive ACK and NACK normally"]
            pub const IGNACK_0: u32 = 0;
            #[doc = "LPI2C Master will treat a received NACK as if it (NACK) was an ACK"]
            pub const IGNACK_1: u32 = 0x01;
        }
    }
    #[doc = "Timeout Configuration"]
    pub mod TIMECFG {
        pub const offset: u32 = 10;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Pin Low Timeout Flag will set if SCL is low for longer than the configured timeout"]
            pub const TIMECFG_0: u32 = 0;
            #[doc = "Pin Low Timeout Flag will set if either SCL or SDA is low for longer than the configured timeout"]
            pub const TIMECFG_1: u32 = 0x01;
        }
    }
    #[doc = "Match Configuration"]
    pub mod MATCFG {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x07 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Match is disabled"]
            pub const MATCFG_0: u32 = 0;
            #[doc = "Match is enabled (1st data word equals MATCH0 OR MATCH1)"]
            pub const MATCFG_2: u32 = 0x02;
            #[doc = "Match is enabled (any data word equals MATCH0 OR MATCH1)"]
            pub const MATCFG_3: u32 = 0x03;
            #[doc = "Match is enabled (1st data word equals MATCH0 AND 2nd data word equals MATCH1)"]
            pub const MATCFG_4: u32 = 0x04;
            #[doc = "Match is enabled (any data word equals MATCH0 AND next data word equals MATCH1)"]
            pub const MATCFG_5: u32 = 0x05;
            #[doc = "Match is enabled (1st data word AND MATCH1 equals MATCH0 AND MATCH1)"]
            pub const MATCFG_6: u32 = 0x06;
            #[doc = "Match is enabled (any data word AND MATCH1 equals MATCH0 AND MATCH1)"]
            pub const MATCFG_7: u32 = 0x07;
        }
    }
    #[doc = "Pin Configuration"]
    pub mod PINCFG {
        pub const offset: u32 = 24;
        pub const mask: u32 = 0x07 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "2-pin open drain mode"]
            pub const PINCFG_0: u32 = 0;
            #[doc = "2-pin output only mode (ultra-fast mode)"]
            pub const PINCFG_1: u32 = 0x01;
            #[doc = "2-pin push-pull mode"]
            pub const PINCFG_2: u32 = 0x02;
            #[doc = "4-pin push-pull mode"]
            pub const PINCFG_3: u32 = 0x03;
            #[doc = "2-pin open drain mode with separate LPI2C slave"]
            pub const PINCFG_4: u32 = 0x04;
            #[doc = "2-pin output only mode (ultra-fast mode) with separate LPI2C slave"]
            pub const PINCFG_5: u32 = 0x05;
            #[doc = "2-pin push-pull mode with separate LPI2C slave"]
            pub const PINCFG_6: u32 = 0x06;
            #[doc = "4-pin push-pull mode (inverted outputs)"]
            pub const PINCFG_7: u32 = 0x07;
        }
    }
}
#[doc = "Master Configuration Register 2"]
pub mod MCFGR2 {
    #[doc = "Bus Idle Timeout"]
    pub mod BUSIDLE {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x0fff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Glitch Filter SCL"]
    pub mod FILTSCL {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x0f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Glitch Filter SDA"]
    pub mod FILTSDA {
        pub const offset: u32 = 24;
        pub const mask: u32 = 0x0f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Master Configuration Register 3"]
pub mod MCFGR3 {
    #[doc = "Pin Low Timeout"]
    pub mod PINLOW {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x0fff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Master Data Match Register"]
pub mod MDMR {
    #[doc = "Match 0 Value"]
    pub mod MATCH0 {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Match 1 Value"]
    pub mod MATCH1 {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Master Clock Configuration Register 0"]
pub mod MCCR0 {
    #[doc = "Clock Low Period"]
    pub mod CLKLO {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x3f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Clock High Period"]
    pub mod CLKHI {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x3f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Setup Hold Delay"]
    pub mod SETHOLD {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x3f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Data Valid Delay"]
    pub mod DATAVD {
        pub const offset: u32 = 24;
        pub const mask: u32 = 0x3f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Master Clock Configuration Register 1"]
pub mod MCCR1 {
    #[doc = "Clock Low Period"]
    pub mod CLKLO {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x3f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Clock High Period"]
    pub mod CLKHI {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x3f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Setup Hold Delay"]
    pub mod SETHOLD {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x3f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Data Valid Delay"]
    pub mod DATAVD {
        pub const offset: u32 = 24;
        pub const mask: u32 = 0x3f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Master FIFO Control Register"]
pub mod MFCR {
    #[doc = "Transmit FIFO Watermark"]
    pub mod TXWATER {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x03 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Receive FIFO Watermark"]
    pub mod RXWATER {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x03 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Master FIFO Status Register"]
pub mod MFSR {
    #[doc = "Transmit FIFO Count"]
    pub mod TXCOUNT {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x07 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Receive FIFO Count"]
    pub mod RXCOUNT {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x07 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Master Transmit Data Register"]
pub mod MTDR {
    #[doc = "Transmit Data"]
    pub mod DATA {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Command Data"]
    pub mod CMD {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x07 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Transmit DATA\\[7:0\\]"]
            pub const CMD_0: u32 = 0;
            #[doc = "Receive (DATA\\[7:0\\] + 1) bytes"]
            pub const CMD_1: u32 = 0x01;
            #[doc = "Generate STOP condition"]
            pub const CMD_2: u32 = 0x02;
            #[doc = "Receive and discard (DATA\\[7:0\\] + 1) bytes"]
            pub const CMD_3: u32 = 0x03;
            #[doc = "Generate (repeated) START and transmit address in DATA\\[7:0\\]"]
            pub const CMD_4: u32 = 0x04;
            #[doc = "Generate (repeated) START and transmit address in DATA\\[7:0\\]. This transfer expects a NACK to be returned."]
            pub const CMD_5: u32 = 0x05;
            #[doc = "Generate (repeated) START and transmit address in DATA\\[7:0\\] using high speed mode"]
            pub const CMD_6: u32 = 0x06;
            #[doc = "Generate (repeated) START and transmit address in DATA\\[7:0\\] using high speed mode. This transfer expects a NACK to be returned."]
            pub const CMD_7: u32 = 0x07;
        }
    }
}
#[doc = "Master Receive Data Register"]
pub mod MRDR {
    #[doc = "Receive Data"]
    pub mod DATA {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "RX Empty"]
    pub mod RXEMPTY {
        pub const offset: u32 = 14;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Receive FIFO is not empty"]
            pub const RXEMPTY_0: u32 = 0;
            #[doc = "Receive FIFO is empty"]
            pub const RXEMPTY_1: u32 = 0x01;
        }
    }
}
#[doc = "Slave Control Register"]
pub mod SCR {
    #[doc = "Slave Enable"]
    pub mod SEN {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "I2C Slave mode is disabled"]
            pub const SEN_0: u32 = 0;
            #[doc = "I2C Slave mode is enabled"]
            pub const SEN_1: u32 = 0x01;
        }
    }
    #[doc = "Software Reset"]
    pub mod RST {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Slave mode logic is not reset"]
            pub const RST_0: u32 = 0;
            #[doc = "Slave mode logic is reset"]
            pub const RST_1: u32 = 0x01;
        }
    }
    #[doc = "Filter Enable"]
    pub mod FILTEN {
        pub const offset: u32 = 4;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disable digital filter and output delay counter for slave mode"]
            pub const FILTEN_0: u32 = 0;
            #[doc = "Enable digital filter and output delay counter for slave mode"]
            pub const FILTEN_1: u32 = 0x01;
        }
    }
    #[doc = "Filter Doze Enable"]
    pub mod FILTDZ {
        pub const offset: u32 = 5;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Filter remains enabled in Doze mode"]
            pub const FILTDZ_0: u32 = 0;
            #[doc = "Filter is disabled in Doze mode"]
            pub const FILTDZ_1: u32 = 0x01;
        }
    }
    #[doc = "Reset Transmit FIFO"]
    pub mod RTF {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No effect"]
            pub const RTF_0: u32 = 0;
            #[doc = "Transmit Data Register is now empty"]
            pub const RTF_1: u32 = 0x01;
        }
    }
    #[doc = "Reset Receive FIFO"]
    pub mod RRF {
        pub const offset: u32 = 9;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "No effect"]
            pub const RRF_0: u32 = 0;
            #[doc = "Receive Data Register is now empty"]
            pub const RRF_1: u32 = 0x01;
        }
    }
}
#[doc = "Slave Status Register"]
pub mod SSR {
    #[doc = "Transmit Data Flag"]
    pub mod TDF {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Transmit data not requested"]
            pub const TDF_0: u32 = 0;
            #[doc = "Transmit data is requested"]
            pub const TDF_1: u32 = 0x01;
        }
    }
    #[doc = "Receive Data Flag"]
    pub mod RDF {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Receive data is not ready"]
            pub const RDF_0: u32 = 0;
            #[doc = "Receive data is ready"]
            pub const RDF_1: u32 = 0x01;
        }
    }
    #[doc = "Address Valid Flag"]
    pub mod AVF {
        pub const offset: u32 = 2;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Address Status Register is not valid"]
            pub const AVF_0: u32 = 0;
            #[doc = "Address Status Register is valid"]
            pub const AVF_1: u32 = 0x01;
        }
    }
    #[doc = "Transmit ACK Flag"]
    pub mod TAF {
        pub const offset: u32 = 3;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Transmit ACK/NACK is not required"]
            pub const TAF_0: u32 = 0;
            #[doc = "Transmit ACK/NACK is required"]
            pub const TAF_1: u32 = 0x01;
        }
    }
    #[doc = "Repeated Start Flag"]
    pub mod RSF {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Slave has not detected a Repeated START condition"]
            pub const RSF_0: u32 = 0;
            #[doc = "Slave has detected a Repeated START condition"]
            pub const RSF_1: u32 = 0x01;
        }
    }
    #[doc = "STOP Detect Flag"]
    pub mod SDF {
        pub const offset: u32 = 9;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Slave has not detected a STOP condition"]
            pub const SDF_0: u32 = 0;
            #[doc = "Slave has detected a STOP condition"]
            pub const SDF_1: u32 = 0x01;
        }
    }
    #[doc = "Bit Error Flag"]
    pub mod BEF {
        pub const offset: u32 = 10;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Slave has not detected a bit error"]
            pub const BEF_0: u32 = 0;
            #[doc = "Slave has detected a bit error"]
            pub const BEF_1: u32 = 0x01;
        }
    }
    #[doc = "FIFO Error Flag"]
    pub mod FEF {
        pub const offset: u32 = 11;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "FIFO underflow or overflow was not detected"]
            pub const FEF_0: u32 = 0;
            #[doc = "FIFO underflow or overflow was detected"]
            pub const FEF_1: u32 = 0x01;
        }
    }
    #[doc = "Address Match 0 Flag"]
    pub mod AM0F {
        pub const offset: u32 = 12;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Have not received an ADDR0 matching address"]
            pub const AM0F_0: u32 = 0;
            #[doc = "Have received an ADDR0 matching address"]
            pub const AM0F_1: u32 = 0x01;
        }
    }
    #[doc = "Address Match 1 Flag"]
    pub mod AM1F {
        pub const offset: u32 = 13;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Have not received an ADDR1 or ADDR0/ADDR1 range matching address"]
            pub const AM1F_0: u32 = 0;
            #[doc = "Have received an ADDR1 or ADDR0/ADDR1 range matching address"]
            pub const AM1F_1: u32 = 0x01;
        }
    }
    #[doc = "General Call Flag"]
    pub mod GCF {
        pub const offset: u32 = 14;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Slave has not detected the General Call Address or the General Call Address is disabled"]
            pub const GCF_0: u32 = 0;
            #[doc = "Slave has detected the General Call Address"]
            pub const GCF_1: u32 = 0x01;
        }
    }
    #[doc = "SMBus Alert Response Flag"]
    pub mod SARF {
        pub const offset: u32 = 15;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "SMBus Alert Response is disabled or not detected"]
            pub const SARF_0: u32 = 0;
            #[doc = "SMBus Alert Response is enabled and detected"]
            pub const SARF_1: u32 = 0x01;
        }
    }
    #[doc = "Slave Busy Flag"]
    pub mod SBF {
        pub const offset: u32 = 24;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "I2C Slave is idle"]
            pub const SBF_0: u32 = 0;
            #[doc = "I2C Slave is busy"]
            pub const SBF_1: u32 = 0x01;
        }
    }
    #[doc = "Bus Busy Flag"]
    pub mod BBF {
        pub const offset: u32 = 25;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "I2C Bus is idle"]
            pub const BBF_0: u32 = 0;
            #[doc = "I2C Bus is busy"]
            pub const BBF_1: u32 = 0x01;
        }
    }
}
#[doc = "Slave Interrupt Enable Register"]
pub mod SIER {
    #[doc = "Transmit Data Interrupt Enable"]
    pub mod TDIE {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const TDIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const TDIE_1: u32 = 0x01;
        }
    }
    #[doc = "Receive Data Interrupt Enable"]
    pub mod RDIE {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const RDIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const RDIE_1: u32 = 0x01;
        }
    }
    #[doc = "Address Valid Interrupt Enable"]
    pub mod AVIE {
        pub const offset: u32 = 2;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const AVIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const AVIE_1: u32 = 0x01;
        }
    }
    #[doc = "Transmit ACK Interrupt Enable"]
    pub mod TAIE {
        pub const offset: u32 = 3;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const TAIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const TAIE_1: u32 = 0x01;
        }
    }
    #[doc = "Repeated Start Interrupt Enable"]
    pub mod RSIE {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const RSIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const RSIE_1: u32 = 0x01;
        }
    }
    #[doc = "STOP Detect Interrupt Enable"]
    pub mod SDIE {
        pub const offset: u32 = 9;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const SDIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const SDIE_1: u32 = 0x01;
        }
    }
    #[doc = "Bit Error Interrupt Enable"]
    pub mod BEIE {
        pub const offset: u32 = 10;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const BEIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const BEIE_1: u32 = 0x01;
        }
    }
    #[doc = "FIFO Error Interrupt Enable"]
    pub mod FEIE {
        pub const offset: u32 = 11;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const FEIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const FEIE_1: u32 = 0x01;
        }
    }
    #[doc = "Address Match 0 Interrupt Enable"]
    pub mod AM0IE {
        pub const offset: u32 = 12;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Enabled"]
            pub const AM0IE_0: u32 = 0;
            #[doc = "Disabled"]
            pub const AM0IE_1: u32 = 0x01;
        }
    }
    #[doc = "Address Match 1 Interrupt Enable"]
    pub mod AM1IE {
        pub const offset: u32 = 13;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const AM1F_0: u32 = 0;
            #[doc = "Enabled"]
            pub const AM1F_1: u32 = 0x01;
        }
    }
    #[doc = "General Call Interrupt Enable"]
    pub mod GCIE {
        pub const offset: u32 = 14;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const GCIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const GCIE_1: u32 = 0x01;
        }
    }
    #[doc = "SMBus Alert Response Interrupt Enable"]
    pub mod SARIE {
        pub const offset: u32 = 15;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disabled"]
            pub const SARIE_0: u32 = 0;
            #[doc = "Enabled"]
            pub const SARIE_1: u32 = 0x01;
        }
    }
}
#[doc = "Slave DMA Enable Register"]
pub mod SDER {
    #[doc = "Transmit Data DMA Enable"]
    pub mod TDDE {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "DMA request is disabled"]
            pub const TDDE_0: u32 = 0;
            #[doc = "DMA request is enabled"]
            pub const TDDE_1: u32 = 0x01;
        }
    }
    #[doc = "Receive Data DMA Enable"]
    pub mod RDDE {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "DMA request is disabled"]
            pub const RDDE_0: u32 = 0;
            #[doc = "DMA request is enabled"]
            pub const RDDE_1: u32 = 0x01;
        }
    }
    #[doc = "Address Valid DMA Enable"]
    pub mod AVDE {
        pub const offset: u32 = 2;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "DMA request is disabled"]
            pub const AVDE_0: u32 = 0;
            #[doc = "DMA request is enabled"]
            pub const AVDE_1: u32 = 0x01;
        }
    }
}
#[doc = "Slave Configuration Register 1"]
pub mod SCFGR1 {
    #[doc = "Address SCL Stall"]
    pub mod ADRSTALL {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Clock stretching is disabled"]
            pub const ADRSTALL_0: u32 = 0;
            #[doc = "Clock stretching is enabled"]
            pub const ADRSTALL_1: u32 = 0x01;
        }
    }
    #[doc = "RX SCL Stall"]
    pub mod RXSTALL {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Clock stretching is disabled"]
            pub const RXSTALL_0: u32 = 0;
            #[doc = "Clock stretching is enabled"]
            pub const RXSTALL_1: u32 = 0x01;
        }
    }
    #[doc = "TX Data SCL Stall"]
    pub mod TXDSTALL {
        pub const offset: u32 = 2;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Clock stretching is disabled"]
            pub const TXDSTALL_0: u32 = 0;
            #[doc = "Clock stretching is enabled"]
            pub const TXDSTALL_1: u32 = 0x01;
        }
    }
    #[doc = "ACK SCL Stall"]
    pub mod ACKSTALL {
        pub const offset: u32 = 3;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Clock stretching is disabled"]
            pub const ACKSTALL_0: u32 = 0;
            #[doc = "Clock stretching is enabled"]
            pub const ACKSTALL_1: u32 = 0x01;
        }
    }
    #[doc = "General Call Enable"]
    pub mod GCEN {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "General Call address is disabled"]
            pub const GCEN_0: u32 = 0;
            #[doc = "General Call address is enabled"]
            pub const GCEN_1: u32 = 0x01;
        }
    }
    #[doc = "SMBus Alert Enable"]
    pub mod SAEN {
        pub const offset: u32 = 9;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disables match on SMBus Alert"]
            pub const SAEN_0: u32 = 0;
            #[doc = "Enables match on SMBus Alert"]
            pub const SAEN_1: u32 = 0x01;
        }
    }
    #[doc = "Transmit Flag Configuration"]
    pub mod TXCFG {
        pub const offset: u32 = 10;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Transmit Data Flag will only assert during a slave-transmit transfer when the Transmit Data register is empty"]
            pub const TXCFG_0: u32 = 0;
            #[doc = "Transmit Data Flag will assert whenever the Transmit Data register is empty"]
            pub const TXCFG_1: u32 = 0x01;
        }
    }
    #[doc = "Receive Data Configuration"]
    pub mod RXCFG {
        pub const offset: u32 = 11;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Reading the Receive Data register will return received data and clear the Receive Data flag (MSR\\[RDF\\])."]
            pub const RXCFG_0: u32 = 0;
            #[doc = "Reading the Receive Data register when the Address Valid flag (SSR\\[AVF\\])is set, will return the Address Status register and clear the Address Valid flag. Reading the Receive Data register when the Address Valid flag is clear, will return received data and clear the Receive Data flag (MSR\\[RDF\\])."]
            pub const RXCFG_1: u32 = 0x01;
        }
    }
    #[doc = "Ignore NACK"]
    pub mod IGNACK {
        pub const offset: u32 = 12;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Slave will end transfer when NACK is detected"]
            pub const IGNACK_0: u32 = 0;
            #[doc = "Slave will not end transfer when NACK detected"]
            pub const IGNACK_1: u32 = 0x01;
        }
    }
    #[doc = "High Speed Mode Enable"]
    pub mod HSMEN {
        pub const offset: u32 = 13;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Disables detection of HS-mode master code"]
            pub const HSMEN_0: u32 = 0;
            #[doc = "Enables detection of HS-mode master code"]
            pub const HSMEN_1: u32 = 0x01;
        }
    }
    #[doc = "Address Configuration"]
    pub mod ADDRCFG {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x07 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Address match 0 (7-bit)"]
            pub const ADDRCFG_0: u32 = 0;
            #[doc = "Address match 0 (10-bit)"]
            pub const ADDRCFG_1: u32 = 0x01;
            #[doc = "Address match 0 (7-bit) or Address match 1 (7-bit)"]
            pub const ADDRCFG_2: u32 = 0x02;
            #[doc = "Address match 0 (10-bit) or Address match 1 (10-bit)"]
            pub const ADDRCFG_3: u32 = 0x03;
            #[doc = "Address match 0 (7-bit) or Address match 1 (10-bit)"]
            pub const ADDRCFG_4: u32 = 0x04;
            #[doc = "Address match 0 (10-bit) or Address match 1 (7-bit)"]
            pub const ADDRCFG_5: u32 = 0x05;
            #[doc = "From Address match 0 (7-bit) to Address match 1 (7-bit)"]
            pub const ADDRCFG_6: u32 = 0x06;
            #[doc = "From Address match 0 (10-bit) to Address match 1 (10-bit)"]
            pub const ADDRCFG_7: u32 = 0x07;
        }
    }
}
#[doc = "Slave Configuration Register 2"]
pub mod SCFGR2 {
    #[doc = "Clock Hold Time"]
    pub mod CLKHOLD {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x0f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Data Valid Delay"]
    pub mod DATAVD {
        pub const offset: u32 = 8;
        pub const mask: u32 = 0x3f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Glitch Filter SCL"]
    pub mod FILTSCL {
        pub const offset: u32 = 16;
        pub const mask: u32 = 0x0f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Glitch Filter SDA"]
    pub mod FILTSDA {
        pub const offset: u32 = 24;
        pub const mask: u32 = 0x0f << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Slave Address Match Register"]
pub mod SAMR {
    #[doc = "Address 0 Value"]
    pub mod ADDR0 {
        pub const offset: u32 = 1;
        pub const mask: u32 = 0x03ff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Address 1 Value"]
    pub mod ADDR1 {
        pub const offset: u32 = 17;
        pub const mask: u32 = 0x03ff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Slave Address Status Register"]
pub mod SASR {
    #[doc = "Received Address"]
    pub mod RADDR {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x07ff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "Address Not Valid"]
    pub mod ANV {
        pub const offset: u32 = 14;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Received Address (RADDR) is valid"]
            pub const ANV_0: u32 = 0;
            #[doc = "Received Address (RADDR) is not valid"]
            pub const ANV_1: u32 = 0x01;
        }
    }
}
#[doc = "Slave Transmit ACK Register"]
pub mod STAR {
    #[doc = "Transmit NACK"]
    pub mod TXNACK {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Write a Transmit ACK for each received word"]
            pub const TXNACK_0: u32 = 0;
            #[doc = "Write a Transmit NACK for each received word"]
            pub const TXNACK_1: u32 = 0x01;
        }
    }
}
#[doc = "Slave Transmit Data Register"]
pub mod STDR {
    #[doc = "Transmit Data"]
    pub mod DATA {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
}
#[doc = "Slave Receive Data Register"]
pub mod SRDR {
    #[doc = "Receive Data"]
    pub mod DATA {
        pub const offset: u32 = 0;
        pub const mask: u32 = 0xff << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {}
    }
    #[doc = "RX Empty"]
    pub mod RXEMPTY {
        pub const offset: u32 = 14;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "The Receive Data Register is not empty"]
            pub const RXEMPTY_0: u32 = 0;
            #[doc = "The Receive Data Register is empty"]
            pub const RXEMPTY_1: u32 = 0x01;
        }
    }
    #[doc = "Start Of Frame"]
    pub mod SOF {
        pub const offset: u32 = 15;
        pub const mask: u32 = 0x01 << offset;
        pub mod R {}
        pub mod W {}
        pub mod RW {
            #[doc = "Indicates this is not the first data word since a (repeated) START or STOP condition"]
            pub const SOF_0: u32 = 0;
            #[doc = "Indicates this is the first data word since a (repeated) START or STOP condition"]
            pub const SOF_1: u32 = 0x01;
        }
    }
}