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
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139#![allow(clippy::missing_safety_doc)]
#![allow(clippy::identity_op)]
#![allow(clippy::unnecessary_cast)]
#![allow(clippy::erasing_op)]
# [doc = "Reset and clock control"]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Rcc { ptr : * mut u8 } unsafe impl Send for Rcc { } unsafe impl Sync for Rcc { } impl Rcc { # [inline (always)]
pub const unsafe fn from_ptr (ptr : * mut ()) -> Self { Self { ptr : ptr as _ , } } # [inline (always)]
pub const fn as_ptr (& self) -> * mut () { self . ptr as _ } # [doc = "clock control register"]
# [inline (always)]
pub const fn cr (self) -> crate :: common :: Reg < regs :: Cr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x0usize) as _) } } # [doc = "PLL configuration register"]
# [inline (always)]
pub const fn pllcfgr (self) -> crate :: common :: Reg < regs :: Pllcfgr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x04usize) as _) } } # [doc = "clock configuration register"]
# [inline (always)]
pub const fn cfgr (self) -> crate :: common :: Reg < regs :: Cfgr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x08usize) as _) } } # [doc = "clock interrupt register"]
# [inline (always)]
pub const fn cir (self) -> crate :: common :: Reg < regs :: Cir , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x0cusize) as _) } } # [doc = "AHB1 peripheral reset register"]
# [inline (always)]
pub const fn ahb1rstr (self) -> crate :: common :: Reg < regs :: Ahb1rstr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x10usize) as _) } } # [doc = "AHB2 peripheral reset register"]
# [inline (always)]
pub const fn ahb2rstr (self) -> crate :: common :: Reg < regs :: Ahb2rstr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x14usize) as _) } } # [doc = "AHB3 peripheral reset register"]
# [inline (always)]
pub const fn ahb3rstr (self) -> crate :: common :: Reg < regs :: Ahb3rstr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x18usize) as _) } } # [doc = "APB1 peripheral reset register"]
# [inline (always)]
pub const fn apb1rstr (self) -> crate :: common :: Reg < regs :: Apb1rstr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x20usize) as _) } } # [doc = "APB2 peripheral reset register"]
# [inline (always)]
pub const fn apb2rstr (self) -> crate :: common :: Reg < regs :: Apb2rstr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x24usize) as _) } } # [doc = "AHB1 peripheral clock register"]
# [inline (always)]
pub const fn ahb1enr (self) -> crate :: common :: Reg < regs :: Ahb1enr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x30usize) as _) } } # [doc = "AHB2 peripheral clock enable register"]
# [inline (always)]
pub const fn ahb2enr (self) -> crate :: common :: Reg < regs :: Ahb2enr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x34usize) as _) } } # [doc = "AHB3 peripheral clock enable register"]
# [inline (always)]
pub const fn ahb3enr (self) -> crate :: common :: Reg < regs :: Ahb3enr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x38usize) as _) } } # [doc = "APB1 peripheral clock enable register"]
# [inline (always)]
pub const fn apb1enr (self) -> crate :: common :: Reg < regs :: Apb1enr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x40usize) as _) } } # [doc = "APB2 peripheral clock enable register"]
# [inline (always)]
pub const fn apb2enr (self) -> crate :: common :: Reg < regs :: Apb2enr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x44usize) as _) } } # [doc = "AHB1 peripheral clock enable in low power mode register"]
# [inline (always)]
pub const fn ahb1lpenr (self) -> crate :: common :: Reg < regs :: Ahb1lpenr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x50usize) as _) } } # [doc = "AHB2 peripheral clock enable in low power mode register"]
# [inline (always)]
pub const fn ahb2lpenr (self) -> crate :: common :: Reg < regs :: Ahb2lpenr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x54usize) as _) } } # [doc = "AHB3 peripheral clock enable in low power mode register"]
# [inline (always)]
pub const fn ahb3lpenr (self) -> crate :: common :: Reg < regs :: Ahb3lpenr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x58usize) as _) } } # [doc = "APB1 peripheral clock enable in low power mode register"]
# [inline (always)]
pub const fn apb1lpenr (self) -> crate :: common :: Reg < regs :: Apb1lpenr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x60usize) as _) } } # [doc = "APB2 peripheral clock enabled in low power mode register"]
# [inline (always)]
pub const fn apb2lpenr (self) -> crate :: common :: Reg < regs :: Apb2lpenr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x64usize) as _) } } # [doc = "Backup domain control register"]
# [inline (always)]
pub const fn bdcr (self) -> crate :: common :: Reg < regs :: Bdcr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x70usize) as _) } } # [doc = "clock control & status register"]
# [inline (always)]
pub const fn csr (self) -> crate :: common :: Reg < regs :: Csr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x74usize) as _) } } # [doc = "spread spectrum clock generation register"]
# [inline (always)]
pub const fn sscgr (self) -> crate :: common :: Reg < regs :: Sscgr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x80usize) as _) } } # [doc = "PLLI2S configuration register"]
# [inline (always)]
pub const fn plli2scfgr (self) -> crate :: common :: Reg < regs :: Plli2scfgr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x84usize) as _) } } # [doc = "RCC PLL configuration register"]
# [inline (always)]
pub const fn pllsaicfgr (self) -> crate :: common :: Reg < regs :: Pllsaicfgr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x88usize) as _) } } # [doc = "RCC Dedicated Clock Configuration Register"]
# [inline (always)]
pub const fn dckcfgr (self) -> crate :: common :: Reg < regs :: Dckcfgr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x8cusize) as _) } } # [doc = "Clocks gated enable register"]
# [inline (always)]
pub const fn ckgatenr (self) -> crate :: common :: Reg < regs :: Ckgatenr , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x90usize) as _) } } # [doc = "DCKCFGR2 register"]
# [inline (always)]
pub const fn dckcfgr2 (self) -> crate :: common :: Reg < regs :: Dckcfgr2 , crate :: common :: RW > { unsafe { crate :: common :: Reg :: from_ptr (self . ptr . add (0x94usize) as _) } } } pub mod regs { # [doc = "AHB1 peripheral clock register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Ahb1enr (pub u32) ; impl Ahb1enr { # [doc = "IO port A clock enable"]
# [inline (always)]
pub const fn gpioaen (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "IO port A clock enable"]
# [inline (always)]
pub fn set_gpioaen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "IO port B clock enable"]
# [inline (always)]
pub const fn gpioben (& self) -> bool { let val = (self . 0 >> 1usize) & 0x01 ; val != 0 } # [doc = "IO port B clock enable"]
# [inline (always)]
pub fn set_gpioben (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize) ; } # [doc = "IO port C clock enable"]
# [inline (always)]
pub const fn gpiocen (& self) -> bool { let val = (self . 0 >> 2usize) & 0x01 ; val != 0 } # [doc = "IO port C clock enable"]
# [inline (always)]
pub fn set_gpiocen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize) ; } # [doc = "IO port D clock enable"]
# [inline (always)]
pub const fn gpioden (& self) -> bool { let val = (self . 0 >> 3usize) & 0x01 ; val != 0 } # [doc = "IO port D clock enable"]
# [inline (always)]
pub fn set_gpioden (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize) ; } # [doc = "IO port E clock enable"]
# [inline (always)]
pub const fn gpioeen (& self) -> bool { let val = (self . 0 >> 4usize) & 0x01 ; val != 0 } # [doc = "IO port E clock enable"]
# [inline (always)]
pub fn set_gpioeen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize) ; } # [doc = "IO port F clock enable"]
# [inline (always)]
pub const fn gpiofen (& self) -> bool { let val = (self . 0 >> 5usize) & 0x01 ; val != 0 } # [doc = "IO port F clock enable"]
# [inline (always)]
pub fn set_gpiofen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize) ; } # [doc = "IO port G clock enable"]
# [inline (always)]
pub const fn gpiogen (& self) -> bool { let val = (self . 0 >> 6usize) & 0x01 ; val != 0 } # [doc = "IO port G clock enable"]
# [inline (always)]
pub fn set_gpiogen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize) ; } # [doc = "IO port H clock enable"]
# [inline (always)]
pub const fn gpiohen (& self) -> bool { let val = (self . 0 >> 7usize) & 0x01 ; val != 0 } # [doc = "IO port H clock enable"]
# [inline (always)]
pub fn set_gpiohen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize) ; } # [doc = "IO port I clock enable"]
# [inline (always)]
pub const fn gpioien (& self) -> bool { let val = (self . 0 >> 8usize) & 0x01 ; val != 0 } # [doc = "IO port I clock enable"]
# [inline (always)]
pub fn set_gpioien (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize) ; } # [doc = "IO port J clock enable"]
# [inline (always)]
pub const fn gpiojen (& self) -> bool { let val = (self . 0 >> 9usize) & 0x01 ; val != 0 } # [doc = "IO port J clock enable"]
# [inline (always)]
pub fn set_gpiojen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize) ; } # [doc = "IO port K clock enable"]
# [inline (always)]
pub const fn gpioken (& self) -> bool { let val = (self . 0 >> 10usize) & 0x01 ; val != 0 } # [doc = "IO port K clock enable"]
# [inline (always)]
pub fn set_gpioken (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize) ; } # [doc = "CRC clock enable"]
# [inline (always)]
pub const fn crcen (& self) -> bool { let val = (self . 0 >> 12usize) & 0x01 ; val != 0 } # [doc = "CRC clock enable"]
# [inline (always)]
pub fn set_crcen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize) ; } # [doc = "Backup SRAM interface clock enable"]
# [inline (always)]
pub const fn bkpsramen (& self) -> bool { let val = (self . 0 >> 18usize) & 0x01 ; val != 0 } # [doc = "Backup SRAM interface clock enable"]
# [inline (always)]
pub fn set_bkpsramen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize) ; } # [doc = "CCM data RAM clock enable"]
# [inline (always)]
pub const fn ccmdataramen (& self) -> bool { let val = (self . 0 >> 20usize) & 0x01 ; val != 0 } # [doc = "CCM data RAM clock enable"]
# [inline (always)]
pub fn set_ccmdataramen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize) ; } # [doc = "DMA1 clock enable"]
# [inline (always)]
pub const fn dma1en (& self) -> bool { let val = (self . 0 >> 21usize) & 0x01 ; val != 0 } # [doc = "DMA1 clock enable"]
# [inline (always)]
pub fn set_dma1en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize) ; } # [doc = "DMA2 clock enable"]
# [inline (always)]
pub const fn dma2en (& self) -> bool { let val = (self . 0 >> 22usize) & 0x01 ; val != 0 } # [doc = "DMA2 clock enable"]
# [inline (always)]
pub fn set_dma2en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize) ; } # [doc = "DMA2D clock enable"]
# [inline (always)]
pub const fn dma2den (& self) -> bool { let val = (self . 0 >> 23usize) & 0x01 ; val != 0 } # [doc = "DMA2D clock enable"]
# [inline (always)]
pub fn set_dma2den (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize) ; } # [doc = "Ethernet MAC clock enable"]
# [inline (always)]
pub const fn ethen (& self) -> bool { let val = (self . 0 >> 25usize) & 0x01 ; val != 0 } # [doc = "Ethernet MAC clock enable"]
# [inline (always)]
pub fn set_ethen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize) ; } # [doc = "Ethernet Transmission clock enable"]
# [inline (always)]
pub const fn ethtxen (& self) -> bool { let val = (self . 0 >> 26usize) & 0x01 ; val != 0 } # [doc = "Ethernet Transmission clock enable"]
# [inline (always)]
pub fn set_ethtxen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize) ; } # [doc = "Ethernet Reception clock enable"]
# [inline (always)]
pub const fn ethrxen (& self) -> bool { let val = (self . 0 >> 27usize) & 0x01 ; val != 0 } # [doc = "Ethernet Reception clock enable"]
# [inline (always)]
pub fn set_ethrxen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize) ; } # [doc = "Ethernet PTP clock enable"]
# [inline (always)]
pub const fn ethptpen (& self) -> bool { let val = (self . 0 >> 28usize) & 0x01 ; val != 0 } # [doc = "Ethernet PTP clock enable"]
# [inline (always)]
pub fn set_ethptpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize) ; } # [doc = "USB OTG HS clock enable"]
# [inline (always)]
pub const fn usb_otg_hsen (& self) -> bool { let val = (self . 0 >> 29usize) & 0x01 ; val != 0 } # [doc = "USB OTG HS clock enable"]
# [inline (always)]
pub fn set_usb_otg_hsen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize) ; } # [doc = "USB OTG HSULPI clock enable"]
# [inline (always)]
pub const fn usb_otg_hsulpien (& self) -> bool { let val = (self . 0 >> 30usize) & 0x01 ; val != 0 } # [doc = "USB OTG HSULPI clock enable"]
# [inline (always)]
pub fn set_usb_otg_hsulpien (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize) ; } } impl Default for Ahb1enr { # [inline (always)]
fn default () -> Ahb1enr { Ahb1enr (0) } } # [doc = "AHB1 peripheral clock enable in low power mode register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Ahb1lpenr (pub u32) ; impl Ahb1lpenr { # [doc = "IO port A clock enable during sleep mode"]
# [inline (always)]
pub const fn gpioalpen (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "IO port A clock enable during sleep mode"]
# [inline (always)]
pub fn set_gpioalpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "IO port B clock enable during Sleep mode"]
# [inline (always)]
pub const fn gpioblpen (& self) -> bool { let val = (self . 0 >> 1usize) & 0x01 ; val != 0 } # [doc = "IO port B clock enable during Sleep mode"]
# [inline (always)]
pub fn set_gpioblpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize) ; } # [doc = "IO port C clock enable during Sleep mode"]
# [inline (always)]
pub const fn gpioclpen (& self) -> bool { let val = (self . 0 >> 2usize) & 0x01 ; val != 0 } # [doc = "IO port C clock enable during Sleep mode"]
# [inline (always)]
pub fn set_gpioclpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize) ; } # [doc = "IO port D clock enable during Sleep mode"]
# [inline (always)]
pub const fn gpiodlpen (& self) -> bool { let val = (self . 0 >> 3usize) & 0x01 ; val != 0 } # [doc = "IO port D clock enable during Sleep mode"]
# [inline (always)]
pub fn set_gpiodlpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize) ; } # [doc = "IO port E clock enable during Sleep mode"]
# [inline (always)]
pub const fn gpioelpen (& self) -> bool { let val = (self . 0 >> 4usize) & 0x01 ; val != 0 } # [doc = "IO port E clock enable during Sleep mode"]
# [inline (always)]
pub fn set_gpioelpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize) ; } # [doc = "IO port F clock enable during Sleep mode"]
# [inline (always)]
pub const fn gpioflpen (& self) -> bool { let val = (self . 0 >> 5usize) & 0x01 ; val != 0 } # [doc = "IO port F clock enable during Sleep mode"]
# [inline (always)]
pub fn set_gpioflpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize) ; } # [doc = "IO port G clock enable during Sleep mode"]
# [inline (always)]
pub const fn gpioglpen (& self) -> bool { let val = (self . 0 >> 6usize) & 0x01 ; val != 0 } # [doc = "IO port G clock enable during Sleep mode"]
# [inline (always)]
pub fn set_gpioglpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize) ; } # [doc = "IO port H clock enable during Sleep mode"]
# [inline (always)]
pub const fn gpiohlpen (& self) -> bool { let val = (self . 0 >> 7usize) & 0x01 ; val != 0 } # [doc = "IO port H clock enable during Sleep mode"]
# [inline (always)]
pub fn set_gpiohlpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize) ; } # [doc = "IO port I clock enable during Sleep mode"]
# [inline (always)]
pub const fn gpioilpen (& self) -> bool { let val = (self . 0 >> 8usize) & 0x01 ; val != 0 } # [doc = "IO port I clock enable during Sleep mode"]
# [inline (always)]
pub fn set_gpioilpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize) ; } # [doc = "IO port J clock enable during Sleep mode"]
# [inline (always)]
pub const fn gpiojlpen (& self) -> bool { let val = (self . 0 >> 9usize) & 0x01 ; val != 0 } # [doc = "IO port J clock enable during Sleep mode"]
# [inline (always)]
pub fn set_gpiojlpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize) ; } # [doc = "IO port K clock enable during Sleep mode"]
# [inline (always)]
pub const fn gpioklpen (& self) -> bool { let val = (self . 0 >> 10usize) & 0x01 ; val != 0 } # [doc = "IO port K clock enable during Sleep mode"]
# [inline (always)]
pub fn set_gpioklpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize) ; } # [doc = "CRC clock enable during Sleep mode"]
# [inline (always)]
pub const fn crclpen (& self) -> bool { let val = (self . 0 >> 12usize) & 0x01 ; val != 0 } # [doc = "CRC clock enable during Sleep mode"]
# [inline (always)]
pub fn set_crclpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize) ; } # [doc = "Flash interface clock enable during Sleep mode"]
# [inline (always)]
pub const fn flashlpen (& self) -> bool { let val = (self . 0 >> 15usize) & 0x01 ; val != 0 } # [doc = "Flash interface clock enable during Sleep mode"]
# [inline (always)]
pub fn set_flashlpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize) ; } # [doc = "SRAM 1interface clock enable during Sleep mode"]
# [inline (always)]
pub const fn sram1lpen (& self) -> bool { let val = (self . 0 >> 16usize) & 0x01 ; val != 0 } # [doc = "SRAM 1interface clock enable during Sleep mode"]
# [inline (always)]
pub fn set_sram1lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize) ; } # [doc = "SRAM 2 interface clock enable during Sleep mode"]
# [inline (always)]
pub const fn sram2lpen (& self) -> bool { let val = (self . 0 >> 17usize) & 0x01 ; val != 0 } # [doc = "SRAM 2 interface clock enable during Sleep mode"]
# [inline (always)]
pub fn set_sram2lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize) ; } # [doc = "Backup SRAM interface clock enable during Sleep mode"]
# [inline (always)]
pub const fn bkpsramlpen (& self) -> bool { let val = (self . 0 >> 18usize) & 0x01 ; val != 0 } # [doc = "Backup SRAM interface clock enable during Sleep mode"]
# [inline (always)]
pub fn set_bkpsramlpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize) ; } # [doc = "SRAM 3 interface clock enable during Sleep mode"]
# [inline (always)]
pub const fn sram3lpen (& self) -> bool { let val = (self . 0 >> 19usize) & 0x01 ; val != 0 } # [doc = "SRAM 3 interface clock enable during Sleep mode"]
# [inline (always)]
pub fn set_sram3lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize) ; } # [doc = "DMA1 clock enable during Sleep mode"]
# [inline (always)]
pub const fn dma1lpen (& self) -> bool { let val = (self . 0 >> 21usize) & 0x01 ; val != 0 } # [doc = "DMA1 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_dma1lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize) ; } # [doc = "DMA2 clock enable during Sleep mode"]
# [inline (always)]
pub const fn dma2lpen (& self) -> bool { let val = (self . 0 >> 22usize) & 0x01 ; val != 0 } # [doc = "DMA2 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_dma2lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize) ; } # [doc = "DMA2D clock enable during Sleep mode"]
# [inline (always)]
pub const fn dma2dlpen (& self) -> bool { let val = (self . 0 >> 23usize) & 0x01 ; val != 0 } # [doc = "DMA2D clock enable during Sleep mode"]
# [inline (always)]
pub fn set_dma2dlpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize) ; } # [doc = "Ethernet MAC clock enable during Sleep mode"]
# [inline (always)]
pub const fn ethlpen (& self) -> bool { let val = (self . 0 >> 25usize) & 0x01 ; val != 0 } # [doc = "Ethernet MAC clock enable during Sleep mode"]
# [inline (always)]
pub fn set_ethlpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize) ; } # [doc = "Ethernet transmission clock enable during Sleep mode"]
# [inline (always)]
pub const fn ethtxlpen (& self) -> bool { let val = (self . 0 >> 26usize) & 0x01 ; val != 0 } # [doc = "Ethernet transmission clock enable during Sleep mode"]
# [inline (always)]
pub fn set_ethtxlpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize) ; } # [doc = "Ethernet reception clock enable during Sleep mode"]
# [inline (always)]
pub const fn ethrxlpen (& self) -> bool { let val = (self . 0 >> 27usize) & 0x01 ; val != 0 } # [doc = "Ethernet reception clock enable during Sleep mode"]
# [inline (always)]
pub fn set_ethrxlpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize) ; } # [doc = "Ethernet PTP clock enable during Sleep mode"]
# [inline (always)]
pub const fn ethptplpen (& self) -> bool { let val = (self . 0 >> 28usize) & 0x01 ; val != 0 } # [doc = "Ethernet PTP clock enable during Sleep mode"]
# [inline (always)]
pub fn set_ethptplpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize) ; } # [doc = "USB OTG HS clock enable during Sleep mode"]
# [inline (always)]
pub const fn usb_otg_hslpen (& self) -> bool { let val = (self . 0 >> 29usize) & 0x01 ; val != 0 } # [doc = "USB OTG HS clock enable during Sleep mode"]
# [inline (always)]
pub fn set_usb_otg_hslpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize) ; } # [doc = "USB OTG HS ULPI clock enable during Sleep mode"]
# [inline (always)]
pub const fn usb_otg_hsulpilpen (& self) -> bool { let val = (self . 0 >> 30usize) & 0x01 ; val != 0 } # [doc = "USB OTG HS ULPI clock enable during Sleep mode"]
# [inline (always)]
pub fn set_usb_otg_hsulpilpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize) ; } # [doc = "RNG clock enable during sleep mode"]
# [inline (always)]
pub const fn rnglpen (& self) -> bool { let val = (self . 0 >> 31usize) & 0x01 ; val != 0 } # [doc = "RNG clock enable during sleep mode"]
# [inline (always)]
pub fn set_rnglpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize) ; } } impl Default for Ahb1lpenr { # [inline (always)]
fn default () -> Ahb1lpenr { Ahb1lpenr (0) } } # [doc = "AHB1 peripheral reset register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Ahb1rstr (pub u32) ; impl Ahb1rstr { # [doc = "IO port A reset"]
# [inline (always)]
pub const fn gpioarst (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "IO port A reset"]
# [inline (always)]
pub fn set_gpioarst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "IO port B reset"]
# [inline (always)]
pub const fn gpiobrst (& self) -> bool { let val = (self . 0 >> 1usize) & 0x01 ; val != 0 } # [doc = "IO port B reset"]
# [inline (always)]
pub fn set_gpiobrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize) ; } # [doc = "IO port C reset"]
# [inline (always)]
pub const fn gpiocrst (& self) -> bool { let val = (self . 0 >> 2usize) & 0x01 ; val != 0 } # [doc = "IO port C reset"]
# [inline (always)]
pub fn set_gpiocrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize) ; } # [doc = "IO port D reset"]
# [inline (always)]
pub const fn gpiodrst (& self) -> bool { let val = (self . 0 >> 3usize) & 0x01 ; val != 0 } # [doc = "IO port D reset"]
# [inline (always)]
pub fn set_gpiodrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize) ; } # [doc = "IO port E reset"]
# [inline (always)]
pub const fn gpioerst (& self) -> bool { let val = (self . 0 >> 4usize) & 0x01 ; val != 0 } # [doc = "IO port E reset"]
# [inline (always)]
pub fn set_gpioerst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize) ; } # [doc = "IO port F reset"]
# [inline (always)]
pub const fn gpiofrst (& self) -> bool { let val = (self . 0 >> 5usize) & 0x01 ; val != 0 } # [doc = "IO port F reset"]
# [inline (always)]
pub fn set_gpiofrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize) ; } # [doc = "IO port G reset"]
# [inline (always)]
pub const fn gpiogrst (& self) -> bool { let val = (self . 0 >> 6usize) & 0x01 ; val != 0 } # [doc = "IO port G reset"]
# [inline (always)]
pub fn set_gpiogrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize) ; } # [doc = "IO port H reset"]
# [inline (always)]
pub const fn gpiohrst (& self) -> bool { let val = (self . 0 >> 7usize) & 0x01 ; val != 0 } # [doc = "IO port H reset"]
# [inline (always)]
pub fn set_gpiohrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize) ; } # [doc = "IO port I reset"]
# [inline (always)]
pub const fn gpioirst (& self) -> bool { let val = (self . 0 >> 8usize) & 0x01 ; val != 0 } # [doc = "IO port I reset"]
# [inline (always)]
pub fn set_gpioirst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize) ; } # [doc = "IO port J reset"]
# [inline (always)]
pub const fn gpiojrst (& self) -> bool { let val = (self . 0 >> 9usize) & 0x01 ; val != 0 } # [doc = "IO port J reset"]
# [inline (always)]
pub fn set_gpiojrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize) ; } # [doc = "IO port K reset"]
# [inline (always)]
pub const fn gpiokrst (& self) -> bool { let val = (self . 0 >> 10usize) & 0x01 ; val != 0 } # [doc = "IO port K reset"]
# [inline (always)]
pub fn set_gpiokrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize) ; } # [doc = "CRC reset"]
# [inline (always)]
pub const fn crcrst (& self) -> bool { let val = (self . 0 >> 12usize) & 0x01 ; val != 0 } # [doc = "CRC reset"]
# [inline (always)]
pub fn set_crcrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize) ; } # [doc = "DMA2 reset"]
# [inline (always)]
pub const fn dma1rst (& self) -> bool { let val = (self . 0 >> 21usize) & 0x01 ; val != 0 } # [doc = "DMA2 reset"]
# [inline (always)]
pub fn set_dma1rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize) ; } # [doc = "DMA2 reset"]
# [inline (always)]
pub const fn dma2rst (& self) -> bool { let val = (self . 0 >> 22usize) & 0x01 ; val != 0 } # [doc = "DMA2 reset"]
# [inline (always)]
pub fn set_dma2rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize) ; } # [doc = "DMA2D reset"]
# [inline (always)]
pub const fn dma2drst (& self) -> bool { let val = (self . 0 >> 23usize) & 0x01 ; val != 0 } # [doc = "DMA2D reset"]
# [inline (always)]
pub fn set_dma2drst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize) ; } # [doc = "Ethernet MAC reset"]
# [inline (always)]
pub const fn ethrst (& self) -> bool { let val = (self . 0 >> 25usize) & 0x01 ; val != 0 } # [doc = "Ethernet MAC reset"]
# [inline (always)]
pub fn set_ethrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize) ; } # [doc = "USB OTG HS module reset"]
# [inline (always)]
pub const fn usb_otg_hsrst (& self) -> bool { let val = (self . 0 >> 29usize) & 0x01 ; val != 0 } # [doc = "USB OTG HS module reset"]
# [inline (always)]
pub fn set_usb_otg_hsrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize) ; } } impl Default for Ahb1rstr { # [inline (always)]
fn default () -> Ahb1rstr { Ahb1rstr (0) } } # [doc = "AHB2 peripheral clock enable register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Ahb2enr (pub u32) ; impl Ahb2enr { # [doc = "Camera interface enable"]
# [inline (always)]
pub const fn dcmien (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "Camera interface enable"]
# [inline (always)]
pub fn set_dcmien (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "CRYP clock enable"]
# [inline (always)]
pub const fn crypen (& self) -> bool { let val = (self . 0 >> 4usize) & 0x01 ; val != 0 } # [doc = "CRYP clock enable"]
# [inline (always)]
pub fn set_crypen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize) ; } # [doc = "Hash modules clock enable"]
# [inline (always)]
pub const fn hashen (& self) -> bool { let val = (self . 0 >> 5usize) & 0x01 ; val != 0 } # [doc = "Hash modules clock enable"]
# [inline (always)]
pub fn set_hashen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize) ; } # [doc = "Random number generator clock enable"]
# [inline (always)]
pub const fn rngen (& self) -> bool { let val = (self . 0 >> 6usize) & 0x01 ; val != 0 } # [doc = "Random number generator clock enable"]
# [inline (always)]
pub fn set_rngen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize) ; } # [doc = "USB OTG FS clock enable"]
# [inline (always)]
pub const fn usb_otg_fsen (& self) -> bool { let val = (self . 0 >> 7usize) & 0x01 ; val != 0 } # [doc = "USB OTG FS clock enable"]
# [inline (always)]
pub fn set_usb_otg_fsen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize) ; } } impl Default for Ahb2enr { # [inline (always)]
fn default () -> Ahb2enr { Ahb2enr (0) } } # [doc = "AHB2 peripheral clock enable in low power mode register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Ahb2lpenr (pub u32) ; impl Ahb2lpenr { # [doc = "Camera interface enable during Sleep mode"]
# [inline (always)]
pub const fn dcmilpen (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "Camera interface enable during Sleep mode"]
# [inline (always)]
pub fn set_dcmilpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "Flexible memory controller module clock enable during Sleep mode"]
# [inline (always)]
pub const fn fsmclpen (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "Flexible memory controller module clock enable during Sleep mode"]
# [inline (always)]
pub fn set_fsmclpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "QUADSPI memory controller module clock enable during Sleep mode"]
# [inline (always)]
pub const fn quadspilpen (& self) -> bool { let val = (self . 0 >> 1usize) & 0x01 ; val != 0 } # [doc = "QUADSPI memory controller module clock enable during Sleep mode"]
# [inline (always)]
pub fn set_quadspilpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize) ; } # [doc = "Cryptography modules clock enable during Sleep mode"]
# [inline (always)]
pub const fn cryplpen (& self) -> bool { let val = (self . 0 >> 4usize) & 0x01 ; val != 0 } # [doc = "Cryptography modules clock enable during Sleep mode"]
# [inline (always)]
pub fn set_cryplpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize) ; } # [doc = "Hash modules clock enable during Sleep mode"]
# [inline (always)]
pub const fn hashlpen (& self) -> bool { let val = (self . 0 >> 5usize) & 0x01 ; val != 0 } # [doc = "Hash modules clock enable during Sleep mode"]
# [inline (always)]
pub fn set_hashlpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize) ; } # [doc = "Random number generator clock enable during Sleep mode"]
# [inline (always)]
pub const fn rnglpen (& self) -> bool { let val = (self . 0 >> 6usize) & 0x01 ; val != 0 } # [doc = "Random number generator clock enable during Sleep mode"]
# [inline (always)]
pub fn set_rnglpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize) ; } # [doc = "USB OTG FS clock enable during Sleep mode"]
# [inline (always)]
pub const fn usb_otg_fslpen (& self) -> bool { let val = (self . 0 >> 7usize) & 0x01 ; val != 0 } # [doc = "USB OTG FS clock enable during Sleep mode"]
# [inline (always)]
pub fn set_usb_otg_fslpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize) ; } } impl Default for Ahb2lpenr { # [inline (always)]
fn default () -> Ahb2lpenr { Ahb2lpenr (0) } } # [doc = "AHB2 peripheral reset register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Ahb2rstr (pub u32) ; impl Ahb2rstr { # [doc = "Camera interface reset"]
# [inline (always)]
pub const fn dcmirst (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "Camera interface reset"]
# [inline (always)]
pub fn set_dcmirst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "CRYP module reset"]
# [inline (always)]
pub const fn cryprst (& self) -> bool { let val = (self . 0 >> 4usize) & 0x01 ; val != 0 } # [doc = "CRYP module reset"]
# [inline (always)]
pub fn set_cryprst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize) ; } # [doc = "Hash module reset"]
# [inline (always)]
pub const fn hsahrst (& self) -> bool { let val = (self . 0 >> 5usize) & 0x01 ; val != 0 } # [doc = "Hash module reset"]
# [inline (always)]
pub fn set_hsahrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize) ; } # [doc = "Random number generator module reset"]
# [inline (always)]
pub const fn rngrst (& self) -> bool { let val = (self . 0 >> 6usize) & 0x01 ; val != 0 } # [doc = "Random number generator module reset"]
# [inline (always)]
pub fn set_rngrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize) ; } # [doc = "USB OTG FS module reset"]
# [inline (always)]
pub const fn usb_otg_fsrst (& self) -> bool { let val = (self . 0 >> 7usize) & 0x01 ; val != 0 } # [doc = "USB OTG FS module reset"]
# [inline (always)]
pub fn set_usb_otg_fsrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize) ; } } impl Default for Ahb2rstr { # [inline (always)]
fn default () -> Ahb2rstr { Ahb2rstr (0) } } # [doc = "AHB3 peripheral clock enable register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Ahb3enr (pub u32) ; impl Ahb3enr { # [doc = "Flexible static memory controller module clock enable"]
# [inline (always)]
pub const fn fmcen (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "Flexible static memory controller module clock enable"]
# [inline (always)]
pub fn set_fmcen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "Flexible static memory controller module clock enable"]
# [inline (always)]
pub const fn fsmcen (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "Flexible static memory controller module clock enable"]
# [inline (always)]
pub fn set_fsmcen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "QUADSPI memory controller module clock enable"]
# [inline (always)]
pub const fn quadspien (& self) -> bool { let val = (self . 0 >> 1usize) & 0x01 ; val != 0 } # [doc = "QUADSPI memory controller module clock enable"]
# [inline (always)]
pub fn set_quadspien (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize) ; } } impl Default for Ahb3enr { # [inline (always)]
fn default () -> Ahb3enr { Ahb3enr (0) } } # [doc = "AHB3 peripheral clock enable in low power mode register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Ahb3lpenr (pub u32) ; impl Ahb3lpenr { # [doc = "Flexible static memory controller module clock enable during Sleep mode"]
# [inline (always)]
pub const fn fmclpen (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "Flexible static memory controller module clock enable during Sleep mode"]
# [inline (always)]
pub fn set_fmclpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "Flexible static memory controller module clock enable during Sleep mode"]
# [inline (always)]
pub const fn fsmclpen (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "Flexible static memory controller module clock enable during Sleep mode"]
# [inline (always)]
pub fn set_fsmclpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "QUADSPI memory controller module clock enable during Sleep mode"]
# [inline (always)]
pub const fn quadspilpen (& self) -> bool { let val = (self . 0 >> 1usize) & 0x01 ; val != 0 } # [doc = "QUADSPI memory controller module clock enable during Sleep mode"]
# [inline (always)]
pub fn set_quadspilpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize) ; } } impl Default for Ahb3lpenr { # [inline (always)]
fn default () -> Ahb3lpenr { Ahb3lpenr (0) } } # [doc = "AHB3 peripheral reset register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Ahb3rstr (pub u32) ; impl Ahb3rstr { # [doc = "Flexible static memory controller module reset"]
# [inline (always)]
pub const fn fmcrst (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "Flexible static memory controller module reset"]
# [inline (always)]
pub fn set_fmcrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "Flexible static memory controller module reset"]
# [inline (always)]
pub const fn fsmcrst (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "Flexible static memory controller module reset"]
# [inline (always)]
pub fn set_fsmcrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "QUADSPI module reset"]
# [inline (always)]
pub const fn quadspirst (& self) -> bool { let val = (self . 0 >> 1usize) & 0x01 ; val != 0 } # [doc = "QUADSPI module reset"]
# [inline (always)]
pub fn set_quadspirst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize) ; } } impl Default for Ahb3rstr { # [inline (always)]
fn default () -> Ahb3rstr { Ahb3rstr (0) } } # [doc = "APB1 peripheral clock enable register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Apb1enr (pub u32) ; impl Apb1enr { # [doc = "TIM2 clock enable"]
# [inline (always)]
pub const fn tim2en (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "TIM2 clock enable"]
# [inline (always)]
pub fn set_tim2en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "TIM3 clock enable"]
# [inline (always)]
pub const fn tim3en (& self) -> bool { let val = (self . 0 >> 1usize) & 0x01 ; val != 0 } # [doc = "TIM3 clock enable"]
# [inline (always)]
pub fn set_tim3en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize) ; } # [doc = "TIM4 clock enable"]
# [inline (always)]
pub const fn tim4en (& self) -> bool { let val = (self . 0 >> 2usize) & 0x01 ; val != 0 } # [doc = "TIM4 clock enable"]
# [inline (always)]
pub fn set_tim4en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize) ; } # [doc = "TIM5 clock enable"]
# [inline (always)]
pub const fn tim5en (& self) -> bool { let val = (self . 0 >> 3usize) & 0x01 ; val != 0 } # [doc = "TIM5 clock enable"]
# [inline (always)]
pub fn set_tim5en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize) ; } # [doc = "TIM6 clock enable"]
# [inline (always)]
pub const fn tim6en (& self) -> bool { let val = (self . 0 >> 4usize) & 0x01 ; val != 0 } # [doc = "TIM6 clock enable"]
# [inline (always)]
pub fn set_tim6en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize) ; } # [doc = "TIM7 clock enable"]
# [inline (always)]
pub const fn tim7en (& self) -> bool { let val = (self . 0 >> 5usize) & 0x01 ; val != 0 } # [doc = "TIM7 clock enable"]
# [inline (always)]
pub fn set_tim7en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize) ; } # [doc = "TIM12 clock enable"]
# [inline (always)]
pub const fn tim12en (& self) -> bool { let val = (self . 0 >> 6usize) & 0x01 ; val != 0 } # [doc = "TIM12 clock enable"]
# [inline (always)]
pub fn set_tim12en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize) ; } # [doc = "TIM13 clock enable"]
# [inline (always)]
pub const fn tim13en (& self) -> bool { let val = (self . 0 >> 7usize) & 0x01 ; val != 0 } # [doc = "TIM13 clock enable"]
# [inline (always)]
pub fn set_tim13en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize) ; } # [doc = "TIM14 clock enable"]
# [inline (always)]
pub const fn tim14en (& self) -> bool { let val = (self . 0 >> 8usize) & 0x01 ; val != 0 } # [doc = "TIM14 clock enable"]
# [inline (always)]
pub fn set_tim14en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize) ; } # [doc = "LPTIM1 clock enable"]
# [inline (always)]
pub const fn lptim1en (& self) -> bool { let val = (self . 0 >> 9usize) & 0x01 ; val != 0 } # [doc = "LPTIM1 clock enable"]
# [inline (always)]
pub fn set_lptim1en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize) ; } # [doc = "RTC APB clock enable"]
# [inline (always)]
pub const fn rtcapben (& self) -> bool { let val = (self . 0 >> 10usize) & 0x01 ; val != 0 } # [doc = "RTC APB clock enable"]
# [inline (always)]
pub fn set_rtcapben (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize) ; } # [doc = "Window watchdog clock enable"]
# [inline (always)]
pub const fn wwdgen (& self) -> bool { let val = (self . 0 >> 11usize) & 0x01 ; val != 0 } # [doc = "Window watchdog clock enable"]
# [inline (always)]
pub fn set_wwdgen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize) ; } # [doc = "SPI2 clock enable"]
# [inline (always)]
pub const fn spi2en (& self) -> bool { let val = (self . 0 >> 14usize) & 0x01 ; val != 0 } # [doc = "SPI2 clock enable"]
# [inline (always)]
pub fn set_spi2en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize) ; } # [doc = "SPI3 clock enable"]
# [inline (always)]
pub const fn spi3en (& self) -> bool { let val = (self . 0 >> 15usize) & 0x01 ; val != 0 } # [doc = "SPI3 clock enable"]
# [inline (always)]
pub fn set_spi3en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize) ; } # [doc = "SPDIF-IN clock enable"]
# [inline (always)]
pub const fn spdifen (& self) -> bool { let val = (self . 0 >> 16usize) & 0x01 ; val != 0 } # [doc = "SPDIF-IN clock enable"]
# [inline (always)]
pub fn set_spdifen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize) ; } # [doc = "USART 2 clock enable"]
# [inline (always)]
pub const fn usart2en (& self) -> bool { let val = (self . 0 >> 17usize) & 0x01 ; val != 0 } # [doc = "USART 2 clock enable"]
# [inline (always)]
pub fn set_usart2en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize) ; } # [doc = "USART3 clock enable"]
# [inline (always)]
pub const fn usart3en (& self) -> bool { let val = (self . 0 >> 18usize) & 0x01 ; val != 0 } # [doc = "USART3 clock enable"]
# [inline (always)]
pub fn set_usart3en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize) ; } # [doc = "UART4 clock enable"]
# [inline (always)]
pub const fn uart4en (& self) -> bool { let val = (self . 0 >> 19usize) & 0x01 ; val != 0 } # [doc = "UART4 clock enable"]
# [inline (always)]
pub fn set_uart4en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize) ; } # [doc = "UART5 clock enable"]
# [inline (always)]
pub const fn uart5en (& self) -> bool { let val = (self . 0 >> 20usize) & 0x01 ; val != 0 } # [doc = "UART5 clock enable"]
# [inline (always)]
pub fn set_uart5en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize) ; } # [doc = "I2C1 clock enable"]
# [inline (always)]
pub const fn i2c1en (& self) -> bool { let val = (self . 0 >> 21usize) & 0x01 ; val != 0 } # [doc = "I2C1 clock enable"]
# [inline (always)]
pub fn set_i2c1en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize) ; } # [doc = "I2C2 clock enable"]
# [inline (always)]
pub const fn i2c2en (& self) -> bool { let val = (self . 0 >> 22usize) & 0x01 ; val != 0 } # [doc = "I2C2 clock enable"]
# [inline (always)]
pub fn set_i2c2en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize) ; } # [doc = "I2C3 clock enable"]
# [inline (always)]
pub const fn i2c3en (& self) -> bool { let val = (self . 0 >> 23usize) & 0x01 ; val != 0 } # [doc = "I2C3 clock enable"]
# [inline (always)]
pub fn set_i2c3en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize) ; } # [doc = "FMPI2C1 clock enable"]
# [inline (always)]
pub const fn fmpi2c1en (& self) -> bool { let val = (self . 0 >> 24usize) & 0x01 ; val != 0 } # [doc = "FMPI2C1 clock enable"]
# [inline (always)]
pub fn set_fmpi2c1en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize) ; } # [doc = "CAN 1 clock enable"]
# [inline (always)]
pub const fn can1en (& self) -> bool { let val = (self . 0 >> 25usize) & 0x01 ; val != 0 } # [doc = "CAN 1 clock enable"]
# [inline (always)]
pub fn set_can1en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize) ; } # [doc = "CAN 2 clock enable"]
# [inline (always)]
pub const fn can2en (& self) -> bool { let val = (self . 0 >> 26usize) & 0x01 ; val != 0 } # [doc = "CAN 2 clock enable"]
# [inline (always)]
pub fn set_can2en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize) ; } # [doc = "CAN 3 clock enable"]
# [inline (always)]
pub const fn can3en (& self) -> bool { let val = (self . 0 >> 27usize) & 0x01 ; val != 0 } # [doc = "CAN 3 clock enable"]
# [inline (always)]
pub fn set_can3en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize) ; } # [doc = "CEC interface clock enable"]
# [inline (always)]
pub const fn cecen (& self) -> bool { let val = (self . 0 >> 27usize) & 0x01 ; val != 0 } # [doc = "CEC interface clock enable"]
# [inline (always)]
pub fn set_cecen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize) ; } # [doc = "Power interface clock enable"]
# [inline (always)]
pub const fn pwren (& self) -> bool { let val = (self . 0 >> 28usize) & 0x01 ; val != 0 } # [doc = "Power interface clock enable"]
# [inline (always)]
pub fn set_pwren (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize) ; } # [doc = "DAC interface clock enable"]
# [inline (always)]
pub const fn dacen (& self) -> bool { let val = (self . 0 >> 29usize) & 0x01 ; val != 0 } # [doc = "DAC interface clock enable"]
# [inline (always)]
pub fn set_dacen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize) ; } # [doc = "UART7 clock enable"]
# [inline (always)]
pub const fn uart7en (& self) -> bool { let val = (self . 0 >> 30usize) & 0x01 ; val != 0 } # [doc = "UART7 clock enable"]
# [inline (always)]
pub fn set_uart7en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize) ; } # [doc = "UART8 clock enable"]
# [inline (always)]
pub const fn uart8en (& self) -> bool { let val = (self . 0 >> 31usize) & 0x01 ; val != 0 } # [doc = "UART8 clock enable"]
# [inline (always)]
pub fn set_uart8en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize) ; } } impl Default for Apb1enr { # [inline (always)]
fn default () -> Apb1enr { Apb1enr (0) } } # [doc = "APB1 peripheral clock enable in low power mode register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Apb1lpenr (pub u32) ; impl Apb1lpenr { # [doc = "TIM2 clock enable during Sleep mode"]
# [inline (always)]
pub const fn tim2lpen (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "TIM2 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_tim2lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "TIM3 clock enable during Sleep mode"]
# [inline (always)]
pub const fn tim3lpen (& self) -> bool { let val = (self . 0 >> 1usize) & 0x01 ; val != 0 } # [doc = "TIM3 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_tim3lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize) ; } # [doc = "TIM4 clock enable during Sleep mode"]
# [inline (always)]
pub const fn tim4lpen (& self) -> bool { let val = (self . 0 >> 2usize) & 0x01 ; val != 0 } # [doc = "TIM4 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_tim4lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize) ; } # [doc = "TIM5 clock enable during Sleep mode"]
# [inline (always)]
pub const fn tim5lpen (& self) -> bool { let val = (self . 0 >> 3usize) & 0x01 ; val != 0 } # [doc = "TIM5 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_tim5lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize) ; } # [doc = "TIM6 clock enable during Sleep mode"]
# [inline (always)]
pub const fn tim6lpen (& self) -> bool { let val = (self . 0 >> 4usize) & 0x01 ; val != 0 } # [doc = "TIM6 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_tim6lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize) ; } # [doc = "TIM7 clock enable during Sleep mode"]
# [inline (always)]
pub const fn tim7lpen (& self) -> bool { let val = (self . 0 >> 5usize) & 0x01 ; val != 0 } # [doc = "TIM7 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_tim7lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize) ; } # [doc = "TIM12 clock enable during Sleep mode"]
# [inline (always)]
pub const fn tim12lpen (& self) -> bool { let val = (self . 0 >> 6usize) & 0x01 ; val != 0 } # [doc = "TIM12 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_tim12lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize) ; } # [doc = "TIM13 clock enable during Sleep mode"]
# [inline (always)]
pub const fn tim13lpen (& self) -> bool { let val = (self . 0 >> 7usize) & 0x01 ; val != 0 } # [doc = "TIM13 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_tim13lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize) ; } # [doc = "TIM14 clock enable during Sleep mode"]
# [inline (always)]
pub const fn tim14lpen (& self) -> bool { let val = (self . 0 >> 8usize) & 0x01 ; val != 0 } # [doc = "TIM14 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_tim14lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize) ; } # [doc = "LPTIM1 clock enable during sleep mode"]
# [inline (always)]
pub const fn lptim1lpen (& self) -> bool { let val = (self . 0 >> 9usize) & 0x01 ; val != 0 } # [doc = "LPTIM1 clock enable during sleep mode"]
# [inline (always)]
pub fn set_lptim1lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize) ; } # [doc = "RTC APB clock enable during sleep mode"]
# [inline (always)]
pub const fn rtcapblpen (& self) -> bool { let val = (self . 0 >> 10usize) & 0x01 ; val != 0 } # [doc = "RTC APB clock enable during sleep mode"]
# [inline (always)]
pub fn set_rtcapblpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize) ; } # [doc = "Window watchdog clock enable during Sleep mode"]
# [inline (always)]
pub const fn wwdglpen (& self) -> bool { let val = (self . 0 >> 11usize) & 0x01 ; val != 0 } # [doc = "Window watchdog clock enable during Sleep mode"]
# [inline (always)]
pub fn set_wwdglpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize) ; } # [doc = "SPI2 clock enable during Sleep mode"]
# [inline (always)]
pub const fn spi2lpen (& self) -> bool { let val = (self . 0 >> 14usize) & 0x01 ; val != 0 } # [doc = "SPI2 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_spi2lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize) ; } # [doc = "SPI3 clock enable during Sleep mode"]
# [inline (always)]
pub const fn spi3lpen (& self) -> bool { let val = (self . 0 >> 15usize) & 0x01 ; val != 0 } # [doc = "SPI3 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_spi3lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize) ; } # [doc = "SPDIF clock enable during Sleep mode"]
# [inline (always)]
pub const fn spdiflpen (& self) -> bool { let val = (self . 0 >> 16usize) & 0x01 ; val != 0 } # [doc = "SPDIF clock enable during Sleep mode"]
# [inline (always)]
pub fn set_spdiflpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize) ; } # [doc = "USART2 clock enable during Sleep mode"]
# [inline (always)]
pub const fn usart2lpen (& self) -> bool { let val = (self . 0 >> 17usize) & 0x01 ; val != 0 } # [doc = "USART2 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_usart2lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize) ; } # [doc = "USART3 clock enable during Sleep mode"]
# [inline (always)]
pub const fn usart3lpen (& self) -> bool { let val = (self . 0 >> 18usize) & 0x01 ; val != 0 } # [doc = "USART3 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_usart3lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize) ; } # [doc = "UART4 clock enable during Sleep mode"]
# [inline (always)]
pub const fn uart4lpen (& self) -> bool { let val = (self . 0 >> 19usize) & 0x01 ; val != 0 } # [doc = "UART4 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_uart4lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize) ; } # [doc = "UART5 clock enable during Sleep mode"]
# [inline (always)]
pub const fn uart5lpen (& self) -> bool { let val = (self . 0 >> 20usize) & 0x01 ; val != 0 } # [doc = "UART5 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_uart5lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize) ; } # [doc = "I2C1 clock enable during Sleep mode"]
# [inline (always)]
pub const fn i2c1lpen (& self) -> bool { let val = (self . 0 >> 21usize) & 0x01 ; val != 0 } # [doc = "I2C1 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_i2c1lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize) ; } # [doc = "I2C2 clock enable during Sleep mode"]
# [inline (always)]
pub const fn i2c2lpen (& self) -> bool { let val = (self . 0 >> 22usize) & 0x01 ; val != 0 } # [doc = "I2C2 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_i2c2lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize) ; } # [doc = "I2C3 clock enable during Sleep mode"]
# [inline (always)]
pub const fn i2c3lpen (& self) -> bool { let val = (self . 0 >> 23usize) & 0x01 ; val != 0 } # [doc = "I2C3 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_i2c3lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize) ; } # [doc = "FMPI2C1 clock enable during Sleep"]
# [inline (always)]
pub const fn fmpi2c1lpen (& self) -> bool { let val = (self . 0 >> 24usize) & 0x01 ; val != 0 } # [doc = "FMPI2C1 clock enable during Sleep"]
# [inline (always)]
pub fn set_fmpi2c1lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize) ; } # [doc = "CAN 1 clock enable during Sleep mode"]
# [inline (always)]
pub const fn can1lpen (& self) -> bool { let val = (self . 0 >> 25usize) & 0x01 ; val != 0 } # [doc = "CAN 1 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_can1lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize) ; } # [doc = "CAN 2 clock enable during Sleep mode"]
# [inline (always)]
pub const fn can2lpen (& self) -> bool { let val = (self . 0 >> 26usize) & 0x01 ; val != 0 } # [doc = "CAN 2 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_can2lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize) ; } # [doc = "CAN3 clock enable during Sleep mode"]
# [inline (always)]
pub const fn can3lpen (& self) -> bool { let val = (self . 0 >> 27usize) & 0x01 ; val != 0 } # [doc = "CAN3 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_can3lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize) ; } # [doc = "CEC clock enable during Sleep mode"]
# [inline (always)]
pub const fn ceclpen (& self) -> bool { let val = (self . 0 >> 27usize) & 0x01 ; val != 0 } # [doc = "CEC clock enable during Sleep mode"]
# [inline (always)]
pub fn set_ceclpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize) ; } # [doc = "Power interface clock enable during Sleep mode"]
# [inline (always)]
pub const fn pwrlpen (& self) -> bool { let val = (self . 0 >> 28usize) & 0x01 ; val != 0 } # [doc = "Power interface clock enable during Sleep mode"]
# [inline (always)]
pub fn set_pwrlpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize) ; } # [doc = "DAC interface clock enable during Sleep mode"]
# [inline (always)]
pub const fn daclpen (& self) -> bool { let val = (self . 0 >> 29usize) & 0x01 ; val != 0 } # [doc = "DAC interface clock enable during Sleep mode"]
# [inline (always)]
pub fn set_daclpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize) ; } # [doc = "UART7 clock enable during Sleep mode"]
# [inline (always)]
pub const fn uart7lpen (& self) -> bool { let val = (self . 0 >> 30usize) & 0x01 ; val != 0 } # [doc = "UART7 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_uart7lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize) ; } # [doc = "UART8 clock enable during Sleep mode"]
# [inline (always)]
pub const fn uart8lpen (& self) -> bool { let val = (self . 0 >> 31usize) & 0x01 ; val != 0 } # [doc = "UART8 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_uart8lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize) ; } } impl Default for Apb1lpenr { # [inline (always)]
fn default () -> Apb1lpenr { Apb1lpenr (0) } } # [doc = "APB1 peripheral reset register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Apb1rstr (pub u32) ; impl Apb1rstr { # [doc = "TIM2 reset"]
# [inline (always)]
pub const fn tim2rst (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "TIM2 reset"]
# [inline (always)]
pub fn set_tim2rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "TIM3 reset"]
# [inline (always)]
pub const fn tim3rst (& self) -> bool { let val = (self . 0 >> 1usize) & 0x01 ; val != 0 } # [doc = "TIM3 reset"]
# [inline (always)]
pub fn set_tim3rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize) ; } # [doc = "TIM4 reset"]
# [inline (always)]
pub const fn tim4rst (& self) -> bool { let val = (self . 0 >> 2usize) & 0x01 ; val != 0 } # [doc = "TIM4 reset"]
# [inline (always)]
pub fn set_tim4rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize) ; } # [doc = "TIM5 reset"]
# [inline (always)]
pub const fn tim5rst (& self) -> bool { let val = (self . 0 >> 3usize) & 0x01 ; val != 0 } # [doc = "TIM5 reset"]
# [inline (always)]
pub fn set_tim5rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize) ; } # [doc = "TIM6 reset"]
# [inline (always)]
pub const fn tim6rst (& self) -> bool { let val = (self . 0 >> 4usize) & 0x01 ; val != 0 } # [doc = "TIM6 reset"]
# [inline (always)]
pub fn set_tim6rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize) ; } # [doc = "TIM7 reset"]
# [inline (always)]
pub const fn tim7rst (& self) -> bool { let val = (self . 0 >> 5usize) & 0x01 ; val != 0 } # [doc = "TIM7 reset"]
# [inline (always)]
pub fn set_tim7rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize) ; } # [doc = "TIM12 reset"]
# [inline (always)]
pub const fn tim12rst (& self) -> bool { let val = (self . 0 >> 6usize) & 0x01 ; val != 0 } # [doc = "TIM12 reset"]
# [inline (always)]
pub fn set_tim12rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize) ; } # [doc = "TIM13 reset"]
# [inline (always)]
pub const fn tim13rst (& self) -> bool { let val = (self . 0 >> 7usize) & 0x01 ; val != 0 } # [doc = "TIM13 reset"]
# [inline (always)]
pub fn set_tim13rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize) ; } # [doc = "TIM14 reset"]
# [inline (always)]
pub const fn tim14rst (& self) -> bool { let val = (self . 0 >> 8usize) & 0x01 ; val != 0 } # [doc = "TIM14 reset"]
# [inline (always)]
pub fn set_tim14rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize) ; } # [doc = "LPTIM1 reset"]
# [inline (always)]
pub const fn lptim1rst (& self) -> bool { let val = (self . 0 >> 9usize) & 0x01 ; val != 0 } # [doc = "LPTIM1 reset"]
# [inline (always)]
pub fn set_lptim1rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize) ; } # [doc = "Window watchdog reset"]
# [inline (always)]
pub const fn wwdgrst (& self) -> bool { let val = (self . 0 >> 11usize) & 0x01 ; val != 0 } # [doc = "Window watchdog reset"]
# [inline (always)]
pub fn set_wwdgrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize) ; } # [doc = "SPI 2 reset"]
# [inline (always)]
pub const fn spi2rst (& self) -> bool { let val = (self . 0 >> 14usize) & 0x01 ; val != 0 } # [doc = "SPI 2 reset"]
# [inline (always)]
pub fn set_spi2rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize) ; } # [doc = "SPI 3 reset"]
# [inline (always)]
pub const fn spi3rst (& self) -> bool { let val = (self . 0 >> 15usize) & 0x01 ; val != 0 } # [doc = "SPI 3 reset"]
# [inline (always)]
pub fn set_spi3rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize) ; } # [doc = "SPDIF-IN reset"]
# [inline (always)]
pub const fn spdifrst (& self) -> bool { let val = (self . 0 >> 16usize) & 0x01 ; val != 0 } # [doc = "SPDIF-IN reset"]
# [inline (always)]
pub fn set_spdifrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize) ; } # [doc = "USART 2 reset"]
# [inline (always)]
pub const fn usart2rst (& self) -> bool { let val = (self . 0 >> 17usize) & 0x01 ; val != 0 } # [doc = "USART 2 reset"]
# [inline (always)]
pub fn set_usart2rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize) ; } # [doc = "USART 3 reset"]
# [inline (always)]
pub const fn usart3rst (& self) -> bool { let val = (self . 0 >> 18usize) & 0x01 ; val != 0 } # [doc = "USART 3 reset"]
# [inline (always)]
pub fn set_usart3rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize) ; } # [doc = "UART 4 reset"]
# [inline (always)]
pub const fn uart4rst (& self) -> bool { let val = (self . 0 >> 19usize) & 0x01 ; val != 0 } # [doc = "UART 4 reset"]
# [inline (always)]
pub fn set_uart4rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize) ; } # [doc = "UART 5 reset"]
# [inline (always)]
pub const fn uart5rst (& self) -> bool { let val = (self . 0 >> 20usize) & 0x01 ; val != 0 } # [doc = "UART 5 reset"]
# [inline (always)]
pub fn set_uart5rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize) ; } # [doc = "I2C 1 reset"]
# [inline (always)]
pub const fn i2c1rst (& self) -> bool { let val = (self . 0 >> 21usize) & 0x01 ; val != 0 } # [doc = "I2C 1 reset"]
# [inline (always)]
pub fn set_i2c1rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize) ; } # [doc = "I2C 2 reset"]
# [inline (always)]
pub const fn i2c2rst (& self) -> bool { let val = (self . 0 >> 22usize) & 0x01 ; val != 0 } # [doc = "I2C 2 reset"]
# [inline (always)]
pub fn set_i2c2rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize) ; } # [doc = "I2C3 reset"]
# [inline (always)]
pub const fn i2c3rst (& self) -> bool { let val = (self . 0 >> 23usize) & 0x01 ; val != 0 } # [doc = "I2C3 reset"]
# [inline (always)]
pub fn set_i2c3rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize) ; } # [doc = "FMPI2C1 reset"]
# [inline (always)]
pub const fn fmpi2c1rst (& self) -> bool { let val = (self . 0 >> 24usize) & 0x01 ; val != 0 } # [doc = "FMPI2C1 reset"]
# [inline (always)]
pub fn set_fmpi2c1rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize) ; } # [doc = "CAN1 reset"]
# [inline (always)]
pub const fn can1rst (& self) -> bool { let val = (self . 0 >> 25usize) & 0x01 ; val != 0 } # [doc = "CAN1 reset"]
# [inline (always)]
pub fn set_can1rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize) ; } # [doc = "CAN2 reset"]
# [inline (always)]
pub const fn can2rst (& self) -> bool { let val = (self . 0 >> 26usize) & 0x01 ; val != 0 } # [doc = "CAN2 reset"]
# [inline (always)]
pub fn set_can2rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize) ; } # [doc = "CAN 3 reset"]
# [inline (always)]
pub const fn can3rst (& self) -> bool { let val = (self . 0 >> 27usize) & 0x01 ; val != 0 } # [doc = "CAN 3 reset"]
# [inline (always)]
pub fn set_can3rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize) ; } # [doc = "Power interface reset"]
# [inline (always)]
pub const fn pwrrst (& self) -> bool { let val = (self . 0 >> 28usize) & 0x01 ; val != 0 } # [doc = "Power interface reset"]
# [inline (always)]
pub fn set_pwrrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize) ; } # [doc = "DAC reset"]
# [inline (always)]
pub const fn dacrst (& self) -> bool { let val = (self . 0 >> 29usize) & 0x01 ; val != 0 } # [doc = "DAC reset"]
# [inline (always)]
pub fn set_dacrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize) ; } # [doc = "UART 7 reset"]
# [inline (always)]
pub const fn uart7rst (& self) -> bool { let val = (self . 0 >> 30usize) & 0x01 ; val != 0 } # [doc = "UART 7 reset"]
# [inline (always)]
pub fn set_uart7rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize) ; } # [doc = "UART 8 reset"]
# [inline (always)]
pub const fn uart8rst (& self) -> bool { let val = (self . 0 >> 31usize) & 0x01 ; val != 0 } # [doc = "UART 8 reset"]
# [inline (always)]
pub fn set_uart8rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize) ; } } impl Default for Apb1rstr { # [inline (always)]
fn default () -> Apb1rstr { Apb1rstr (0) } } # [doc = "APB2 peripheral clock enable register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Apb2enr (pub u32) ; impl Apb2enr { # [doc = "TIM1 clock enable"]
# [inline (always)]
pub const fn tim1en (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "TIM1 clock enable"]
# [inline (always)]
pub fn set_tim1en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "TIM8 clock enable"]
# [inline (always)]
pub const fn tim8en (& self) -> bool { let val = (self . 0 >> 1usize) & 0x01 ; val != 0 } # [doc = "TIM8 clock enable"]
# [inline (always)]
pub fn set_tim8en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize) ; } # [doc = "USART1 clock enable"]
# [inline (always)]
pub const fn usart1en (& self) -> bool { let val = (self . 0 >> 4usize) & 0x01 ; val != 0 } # [doc = "USART1 clock enable"]
# [inline (always)]
pub fn set_usart1en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize) ; } # [doc = "USART6 clock enable"]
# [inline (always)]
pub const fn usart6en (& self) -> bool { let val = (self . 0 >> 5usize) & 0x01 ; val != 0 } # [doc = "USART6 clock enable"]
# [inline (always)]
pub fn set_usart6en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize) ; } # [doc = "UART9 clock enable"]
# [inline (always)]
pub const fn uart9en (& self) -> bool { let val = (self . 0 >> 6usize) & 0x01 ; val != 0 } # [doc = "UART9 clock enable"]
# [inline (always)]
pub fn set_uart9en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize) ; } # [doc = "UART10 clock enable"]
# [inline (always)]
pub const fn uart10en (& self) -> bool { let val = (self . 0 >> 7usize) & 0x01 ; val != 0 } # [doc = "UART10 clock enable"]
# [inline (always)]
pub fn set_uart10en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize) ; } # [doc = "ADC1 clock enable"]
# [inline (always)]
pub const fn adc1en (& self) -> bool { let val = (self . 0 >> 8usize) & 0x01 ; val != 0 } # [doc = "ADC1 clock enable"]
# [inline (always)]
pub fn set_adc1en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize) ; } # [doc = "ADC2 clock enable"]
# [inline (always)]
pub const fn adc2en (& self) -> bool { let val = (self . 0 >> 9usize) & 0x01 ; val != 0 } # [doc = "ADC2 clock enable"]
# [inline (always)]
pub fn set_adc2en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize) ; } # [doc = "ADC3 clock enable"]
# [inline (always)]
pub const fn adc3en (& self) -> bool { let val = (self . 0 >> 10usize) & 0x01 ; val != 0 } # [doc = "ADC3 clock enable"]
# [inline (always)]
pub fn set_adc3en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize) ; } # [doc = "SDIO clock enable"]
# [inline (always)]
pub const fn sdioen (& self) -> bool { let val = (self . 0 >> 11usize) & 0x01 ; val != 0 } # [doc = "SDIO clock enable"]
# [inline (always)]
pub fn set_sdioen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize) ; } # [doc = "SPI1 clock enable"]
# [inline (always)]
pub const fn spi1en (& self) -> bool { let val = (self . 0 >> 12usize) & 0x01 ; val != 0 } # [doc = "SPI1 clock enable"]
# [inline (always)]
pub fn set_spi1en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize) ; } # [doc = "SPI4 clock enable"]
# [inline (always)]
pub const fn spi4en (& self) -> bool { let val = (self . 0 >> 13usize) & 0x01 ; val != 0 } # [doc = "SPI4 clock enable"]
# [inline (always)]
pub fn set_spi4en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize) ; } # [doc = "System configuration controller clock enable"]
# [inline (always)]
pub const fn syscfgen (& self) -> bool { let val = (self . 0 >> 14usize) & 0x01 ; val != 0 } # [doc = "System configuration controller clock enable"]
# [inline (always)]
pub fn set_syscfgen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize) ; } # [doc = "EXTI ans external IT clock enable"]
# [inline (always)]
pub const fn extiten (& self) -> bool { let val = (self . 0 >> 15usize) & 0x01 ; val != 0 } # [doc = "EXTI ans external IT clock enable"]
# [inline (always)]
pub fn set_extiten (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize) ; } # [doc = "TIM9 clock enable"]
# [inline (always)]
pub const fn tim9en (& self) -> bool { let val = (self . 0 >> 16usize) & 0x01 ; val != 0 } # [doc = "TIM9 clock enable"]
# [inline (always)]
pub fn set_tim9en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize) ; } # [doc = "TIM10 clock enable"]
# [inline (always)]
pub const fn tim10en (& self) -> bool { let val = (self . 0 >> 17usize) & 0x01 ; val != 0 } # [doc = "TIM10 clock enable"]
# [inline (always)]
pub fn set_tim10en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize) ; } # [doc = "TIM11 clock enable"]
# [inline (always)]
pub const fn tim11en (& self) -> bool { let val = (self . 0 >> 18usize) & 0x01 ; val != 0 } # [doc = "TIM11 clock enable"]
# [inline (always)]
pub fn set_tim11en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize) ; } # [doc = "SPI5 clock enable"]
# [inline (always)]
pub const fn spi5en (& self) -> bool { let val = (self . 0 >> 20usize) & 0x01 ; val != 0 } # [doc = "SPI5 clock enable"]
# [inline (always)]
pub fn set_spi5en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize) ; } # [doc = "SPI6 clock enable"]
# [inline (always)]
pub const fn spi6en (& self) -> bool { let val = (self . 0 >> 21usize) & 0x01 ; val != 0 } # [doc = "SPI6 clock enable"]
# [inline (always)]
pub fn set_spi6en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize) ; } # [doc = "SAI 1 clock enable"]
# [inline (always)]
pub const fn sai1en (& self) -> bool { let val = (self . 0 >> 22usize) & 0x01 ; val != 0 } # [doc = "SAI 1 clock enable"]
# [inline (always)]
pub fn set_sai1en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize) ; } # [doc = "SAI2 clock enable"]
# [inline (always)]
pub const fn sai2en (& self) -> bool { let val = (self . 0 >> 23usize) & 0x01 ; val != 0 } # [doc = "SAI2 clock enable"]
# [inline (always)]
pub fn set_sai2en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize) ; } # [doc = "DFSDMEN"]
# [inline (always)]
pub const fn dfsdmen (& self) -> bool { let val = (self . 0 >> 24usize) & 0x01 ; val != 0 } # [doc = "DFSDMEN"]
# [inline (always)]
pub fn set_dfsdmen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize) ; } # [doc = "DFSDM2 clock enable"]
# [inline (always)]
pub const fn dfsdm2en (& self) -> bool { let val = (self . 0 >> 25usize) & 0x01 ; val != 0 } # [doc = "DFSDM2 clock enable"]
# [inline (always)]
pub fn set_dfsdm2en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize) ; } # [doc = "LTDC clock enable"]
# [inline (always)]
pub const fn ltdcen (& self) -> bool { let val = (self . 0 >> 26usize) & 0x01 ; val != 0 } # [doc = "LTDC clock enable"]
# [inline (always)]
pub fn set_ltdcen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize) ; } # [doc = "DSI clocks enable"]
# [inline (always)]
pub const fn dsien (& self) -> bool { let val = (self . 0 >> 27usize) & 0x01 ; val != 0 } # [doc = "DSI clocks enable"]
# [inline (always)]
pub fn set_dsien (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize) ; } } impl Default for Apb2enr { # [inline (always)]
fn default () -> Apb2enr { Apb2enr (0) } } # [doc = "APB2 peripheral clock enabled in low power mode register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Apb2lpenr (pub u32) ; impl Apb2lpenr { # [doc = "TIM1 clock enable during Sleep mode"]
# [inline (always)]
pub const fn tim1lpen (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "TIM1 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_tim1lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "TIM8 clock enable during Sleep mode"]
# [inline (always)]
pub const fn tim8lpen (& self) -> bool { let val = (self . 0 >> 1usize) & 0x01 ; val != 0 } # [doc = "TIM8 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_tim8lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize) ; } # [doc = "USART1 clock enable during Sleep mode"]
# [inline (always)]
pub const fn usart1lpen (& self) -> bool { let val = (self . 0 >> 4usize) & 0x01 ; val != 0 } # [doc = "USART1 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_usart1lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize) ; } # [doc = "USART6 clock enable during Sleep mode"]
# [inline (always)]
pub const fn usart6lpen (& self) -> bool { let val = (self . 0 >> 5usize) & 0x01 ; val != 0 } # [doc = "USART6 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_usart6lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize) ; } # [doc = "UART9 clock enable during Sleep mode"]
# [inline (always)]
pub const fn uart9lpen (& self) -> bool { let val = (self . 0 >> 6usize) & 0x01 ; val != 0 } # [doc = "UART9 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_uart9lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize) ; } # [doc = "UART10 clock enable during Sleep mode"]
# [inline (always)]
pub const fn uart10lpen (& self) -> bool { let val = (self . 0 >> 7usize) & 0x01 ; val != 0 } # [doc = "UART10 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_uart10lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize) ; } # [doc = "ADC1 clock enable during Sleep mode"]
# [inline (always)]
pub const fn adc1lpen (& self) -> bool { let val = (self . 0 >> 8usize) & 0x01 ; val != 0 } # [doc = "ADC1 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_adc1lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize) ; } # [doc = "ADC2 clock enable during Sleep mode"]
# [inline (always)]
pub const fn adc2lpen (& self) -> bool { let val = (self . 0 >> 9usize) & 0x01 ; val != 0 } # [doc = "ADC2 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_adc2lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize) ; } # [doc = "ADC 3 clock enable during Sleep mode"]
# [inline (always)]
pub const fn adc3lpen (& self) -> bool { let val = (self . 0 >> 10usize) & 0x01 ; val != 0 } # [doc = "ADC 3 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_adc3lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize) ; } # [doc = "SDIO clock enable during Sleep mode"]
# [inline (always)]
pub const fn sdiolpen (& self) -> bool { let val = (self . 0 >> 11usize) & 0x01 ; val != 0 } # [doc = "SDIO clock enable during Sleep mode"]
# [inline (always)]
pub fn set_sdiolpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize) ; } # [doc = "SPI 1 clock enable during Sleep mode"]
# [inline (always)]
pub const fn spi1lpen (& self) -> bool { let val = (self . 0 >> 12usize) & 0x01 ; val != 0 } # [doc = "SPI 1 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_spi1lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize) ; } # [doc = "SPI4 clock enable during Sleep mode"]
# [inline (always)]
pub const fn spi4lpen (& self) -> bool { let val = (self . 0 >> 13usize) & 0x01 ; val != 0 } # [doc = "SPI4 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_spi4lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize) ; } # [doc = "System configuration controller clock enable during Sleep mode"]
# [inline (always)]
pub const fn syscfglpen (& self) -> bool { let val = (self . 0 >> 14usize) & 0x01 ; val != 0 } # [doc = "System configuration controller clock enable during Sleep mode"]
# [inline (always)]
pub fn set_syscfglpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize) ; } # [doc = "EXTI and External IT clock enable during sleep mode"]
# [inline (always)]
pub const fn extitlpen (& self) -> bool { let val = (self . 0 >> 15usize) & 0x01 ; val != 0 } # [doc = "EXTI and External IT clock enable during sleep mode"]
# [inline (always)]
pub fn set_extitlpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize) ; } # [doc = "TIM9 clock enable during sleep mode"]
# [inline (always)]
pub const fn tim9lpen (& self) -> bool { let val = (self . 0 >> 16usize) & 0x01 ; val != 0 } # [doc = "TIM9 clock enable during sleep mode"]
# [inline (always)]
pub fn set_tim9lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize) ; } # [doc = "TIM10 clock enable during Sleep mode"]
# [inline (always)]
pub const fn tim10lpen (& self) -> bool { let val = (self . 0 >> 17usize) & 0x01 ; val != 0 } # [doc = "TIM10 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_tim10lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize) ; } # [doc = "TIM11 clock enable during Sleep mode"]
# [inline (always)]
pub const fn tim11lpen (& self) -> bool { let val = (self . 0 >> 18usize) & 0x01 ; val != 0 } # [doc = "TIM11 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_tim11lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize) ; } # [doc = "SPI5 clock enable during Sleep mode"]
# [inline (always)]
pub const fn spi5lpen (& self) -> bool { let val = (self . 0 >> 20usize) & 0x01 ; val != 0 } # [doc = "SPI5 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_spi5lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize) ; } # [doc = "SPI 6 clock enable during Sleep mode"]
# [inline (always)]
pub const fn spi6lpen (& self) -> bool { let val = (self . 0 >> 21usize) & 0x01 ; val != 0 } # [doc = "SPI 6 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_spi6lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize) ; } # [doc = "SAI1 clock enable during Sleep mode"]
# [inline (always)]
pub const fn sai1lpen (& self) -> bool { let val = (self . 0 >> 22usize) & 0x01 ; val != 0 } # [doc = "SAI1 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_sai1lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize) ; } # [doc = "SAI2 clock enable"]
# [inline (always)]
pub const fn sai2lpen (& self) -> bool { let val = (self . 0 >> 23usize) & 0x01 ; val != 0 } # [doc = "SAI2 clock enable"]
# [inline (always)]
pub fn set_sai2lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize) ; } # [doc = "DFSDMLPEN"]
# [inline (always)]
pub const fn dfsdmlpen (& self) -> bool { let val = (self . 0 >> 24usize) & 0x01 ; val != 0 } # [doc = "DFSDMLPEN"]
# [inline (always)]
pub fn set_dfsdmlpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize) ; } # [doc = "DFSDM2 clock enable during Sleep mode"]
# [inline (always)]
pub const fn dfsdm2lpen (& self) -> bool { let val = (self . 0 >> 25usize) & 0x01 ; val != 0 } # [doc = "DFSDM2 clock enable during Sleep mode"]
# [inline (always)]
pub fn set_dfsdm2lpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize) ; } # [doc = "LTDC clock enable during Sleep mode"]
# [inline (always)]
pub const fn ltdclpen (& self) -> bool { let val = (self . 0 >> 26usize) & 0x01 ; val != 0 } # [doc = "LTDC clock enable during Sleep mode"]
# [inline (always)]
pub fn set_ltdclpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize) ; } # [doc = "DSI clocks enable during Sleep mode"]
# [inline (always)]
pub const fn dsilpen (& self) -> bool { let val = (self . 0 >> 27usize) & 0x01 ; val != 0 } # [doc = "DSI clocks enable during Sleep mode"]
# [inline (always)]
pub fn set_dsilpen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize) ; } } impl Default for Apb2lpenr { # [inline (always)]
fn default () -> Apb2lpenr { Apb2lpenr (0) } } # [doc = "APB2 peripheral reset register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Apb2rstr (pub u32) ; impl Apb2rstr { # [doc = "TIM1 reset"]
# [inline (always)]
pub const fn tim1rst (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "TIM1 reset"]
# [inline (always)]
pub fn set_tim1rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "TIM8 reset"]
# [inline (always)]
pub const fn tim8rst (& self) -> bool { let val = (self . 0 >> 1usize) & 0x01 ; val != 0 } # [doc = "TIM8 reset"]
# [inline (always)]
pub fn set_tim8rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize) ; } # [doc = "USART1 reset"]
# [inline (always)]
pub const fn usart1rst (& self) -> bool { let val = (self . 0 >> 4usize) & 0x01 ; val != 0 } # [doc = "USART1 reset"]
# [inline (always)]
pub fn set_usart1rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize) ; } # [doc = "USART6 reset"]
# [inline (always)]
pub const fn usart6rst (& self) -> bool { let val = (self . 0 >> 5usize) & 0x01 ; val != 0 } # [doc = "USART6 reset"]
# [inline (always)]
pub fn set_usart6rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize) ; } # [doc = "UART9 reset"]
# [inline (always)]
pub const fn uart9rst (& self) -> bool { let val = (self . 0 >> 6usize) & 0x01 ; val != 0 } # [doc = "UART9 reset"]
# [inline (always)]
pub fn set_uart9rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize) ; } # [doc = "UART10 reset"]
# [inline (always)]
pub const fn uart10rst (& self) -> bool { let val = (self . 0 >> 7usize) & 0x01 ; val != 0 } # [doc = "UART10 reset"]
# [inline (always)]
pub fn set_uart10rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize) ; } # [doc = "ADC interface reset (common to all ADCs)"]
# [inline (always)]
pub const fn adcrst (& self) -> bool { let val = (self . 0 >> 8usize) & 0x01 ; val != 0 } # [doc = "ADC interface reset (common to all ADCs)"]
# [inline (always)]
pub fn set_adcrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize) ; } # [doc = "SDIO reset"]
# [inline (always)]
pub const fn sdiorst (& self) -> bool { let val = (self . 0 >> 11usize) & 0x01 ; val != 0 } # [doc = "SDIO reset"]
# [inline (always)]
pub fn set_sdiorst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize) ; } # [doc = "SPI 1 reset"]
# [inline (always)]
pub const fn spi1rst (& self) -> bool { let val = (self . 0 >> 12usize) & 0x01 ; val != 0 } # [doc = "SPI 1 reset"]
# [inline (always)]
pub fn set_spi1rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize) ; } # [doc = "SPI4 reset"]
# [inline (always)]
pub const fn spi4rst (& self) -> bool { let val = (self . 0 >> 13usize) & 0x01 ; val != 0 } # [doc = "SPI4 reset"]
# [inline (always)]
pub fn set_spi4rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize) ; } # [doc = "System configuration controller reset"]
# [inline (always)]
pub const fn syscfgrst (& self) -> bool { let val = (self . 0 >> 14usize) & 0x01 ; val != 0 } # [doc = "System configuration controller reset"]
# [inline (always)]
pub fn set_syscfgrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize) ; } # [doc = "TIM9 reset"]
# [inline (always)]
pub const fn tim9rst (& self) -> bool { let val = (self . 0 >> 16usize) & 0x01 ; val != 0 } # [doc = "TIM9 reset"]
# [inline (always)]
pub fn set_tim9rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize) ; } # [doc = "TIM10 reset"]
# [inline (always)]
pub const fn tim10rst (& self) -> bool { let val = (self . 0 >> 17usize) & 0x01 ; val != 0 } # [doc = "TIM10 reset"]
# [inline (always)]
pub fn set_tim10rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize) ; } # [doc = "TIM11 reset"]
# [inline (always)]
pub const fn tim11rst (& self) -> bool { let val = (self . 0 >> 18usize) & 0x01 ; val != 0 } # [doc = "TIM11 reset"]
# [inline (always)]
pub fn set_tim11rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize) ; } # [doc = "SPI5 reset"]
# [inline (always)]
pub const fn spi5rst (& self) -> bool { let val = (self . 0 >> 20usize) & 0x01 ; val != 0 } # [doc = "SPI5 reset"]
# [inline (always)]
pub fn set_spi5rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize) ; } # [doc = "SPI6 reset"]
# [inline (always)]
pub const fn spi6rst (& self) -> bool { let val = (self . 0 >> 21usize) & 0x01 ; val != 0 } # [doc = "SPI6 reset"]
# [inline (always)]
pub fn set_spi6rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize) ; } # [doc = "SAI1 reset"]
# [inline (always)]
pub const fn sai1rst (& self) -> bool { let val = (self . 0 >> 22usize) & 0x01 ; val != 0 } # [doc = "SAI1 reset"]
# [inline (always)]
pub fn set_sai1rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize) ; } # [doc = "SAI2 reset"]
# [inline (always)]
pub const fn sai2rst (& self) -> bool { let val = (self . 0 >> 23usize) & 0x01 ; val != 0 } # [doc = "SAI2 reset"]
# [inline (always)]
pub fn set_sai2rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize) ; } # [doc = "DFSDMRST"]
# [inline (always)]
pub const fn dfsdmrst (& self) -> bool { let val = (self . 0 >> 24usize) & 0x01 ; val != 0 } # [doc = "DFSDMRST"]
# [inline (always)]
pub fn set_dfsdmrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize) ; } # [doc = "DFSDM2 reset"]
# [inline (always)]
pub const fn dfsdm2rst (& self) -> bool { let val = (self . 0 >> 25usize) & 0x01 ; val != 0 } # [doc = "DFSDM2 reset"]
# [inline (always)]
pub fn set_dfsdm2rst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize) ; } # [doc = "LTDC reset"]
# [inline (always)]
pub const fn ltdcrst (& self) -> bool { let val = (self . 0 >> 26usize) & 0x01 ; val != 0 } # [doc = "LTDC reset"]
# [inline (always)]
pub fn set_ltdcrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize) ; } # [doc = "DSI host reset"]
# [inline (always)]
pub const fn dsirst (& self) -> bool { let val = (self . 0 >> 27usize) & 0x01 ; val != 0 } # [doc = "DSI host reset"]
# [inline (always)]
pub fn set_dsirst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize) ; } } impl Default for Apb2rstr { # [inline (always)]
fn default () -> Apb2rstr { Apb2rstr (0) } } # [doc = "Backup domain control register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Bdcr (pub u32) ; impl Bdcr { # [doc = "External low-speed oscillator enable"]
# [inline (always)]
pub const fn lseon (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "External low-speed oscillator enable"]
# [inline (always)]
pub fn set_lseon (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "External low-speed oscillator ready"]
# [inline (always)]
pub const fn lserdy (& self) -> bool { let val = (self . 0 >> 1usize) & 0x01 ; val != 0 } # [doc = "External low-speed oscillator ready"]
# [inline (always)]
pub fn set_lserdy (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize) ; } # [doc = "External low-speed oscillator bypass"]
# [inline (always)]
pub const fn lsebyp (& self) -> bool { let val = (self . 0 >> 2usize) & 0x01 ; val != 0 } # [doc = "External low-speed oscillator bypass"]
# [inline (always)]
pub fn set_lsebyp (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize) ; } # [doc = "External low-speed oscillator bypass"]
# [inline (always)]
pub const fn lsemod (& self) -> super :: vals :: Lsemod { let val = (self . 0 >> 3usize) & 0x01 ; super :: vals :: Lsemod :: from_bits (val as u8) } # [doc = "External low-speed oscillator bypass"]
# [inline (always)]
pub fn set_lsemod (& mut self , val : super :: vals :: Lsemod) { self . 0 = (self . 0 & ! (0x01 << 3usize)) | (((val . to_bits () as u32) & 0x01) << 3usize) ; } # [doc = "RTC clock source selection"]
# [inline (always)]
pub const fn rtcsel (& self) -> super :: vals :: Rtcsel { let val = (self . 0 >> 8usize) & 0x03 ; super :: vals :: Rtcsel :: from_bits (val as u8) } # [doc = "RTC clock source selection"]
# [inline (always)]
pub fn set_rtcsel (& mut self , val : super :: vals :: Rtcsel) { self . 0 = (self . 0 & ! (0x03 << 8usize)) | (((val . to_bits () as u32) & 0x03) << 8usize) ; } # [doc = "RTC clock enable"]
# [inline (always)]
pub const fn rtcen (& self) -> bool { let val = (self . 0 >> 15usize) & 0x01 ; val != 0 } # [doc = "RTC clock enable"]
# [inline (always)]
pub fn set_rtcen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 15usize)) | (((val as u32) & 0x01) << 15usize) ; } # [doc = "Backup domain software reset"]
# [inline (always)]
pub const fn bdrst (& self) -> bool { let val = (self . 0 >> 16usize) & 0x01 ; val != 0 } # [doc = "Backup domain software reset"]
# [inline (always)]
pub fn set_bdrst (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize) ; } } impl Default for Bdcr { # [inline (always)]
fn default () -> Bdcr { Bdcr (0) } } # [doc = "clock configuration register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Cfgr (pub u32) ; impl Cfgr { # [doc = "System clock switch"]
# [inline (always)]
pub const fn sw (& self) -> super :: vals :: Sw { let val = (self . 0 >> 0usize) & 0x03 ; super :: vals :: Sw :: from_bits (val as u8) } # [doc = "System clock switch"]
# [inline (always)]
pub fn set_sw (& mut self , val : super :: vals :: Sw) { self . 0 = (self . 0 & ! (0x03 << 0usize)) | (((val . to_bits () as u32) & 0x03) << 0usize) ; } # [doc = "System clock switch status"]
# [inline (always)]
pub const fn sws (& self) -> super :: vals :: Sw { let val = (self . 0 >> 2usize) & 0x03 ; super :: vals :: Sw :: from_bits (val as u8) } # [doc = "System clock switch status"]
# [inline (always)]
pub fn set_sws (& mut self , val : super :: vals :: Sw) { self . 0 = (self . 0 & ! (0x03 << 2usize)) | (((val . to_bits () as u32) & 0x03) << 2usize) ; } # [doc = "AHB prescaler"]
# [inline (always)]
pub const fn hpre (& self) -> super :: vals :: Hpre { let val = (self . 0 >> 4usize) & 0x0f ; super :: vals :: Hpre :: from_bits (val as u8) } # [doc = "AHB prescaler"]
# [inline (always)]
pub fn set_hpre (& mut self , val : super :: vals :: Hpre) { self . 0 = (self . 0 & ! (0x0f << 4usize)) | (((val . to_bits () as u32) & 0x0f) << 4usize) ; } # [doc = "MCO output enable"]
# [inline (always)]
pub const fn mco1en (& self) -> bool { let val = (self . 0 >> 8usize) & 0x01 ; val != 0 } # [doc = "MCO output enable"]
# [inline (always)]
pub fn set_mco1en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize) ; } # [doc = "MCO output enable"]
# [inline (always)]
pub const fn mco2en (& self) -> bool { let val = (self . 0 >> 9usize) & 0x01 ; val != 0 } # [doc = "MCO output enable"]
# [inline (always)]
pub fn set_mco2en (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize) ; } # [doc = "APB Low speed prescaler (APB1)"]
# [inline (always)]
pub const fn ppre1 (& self) -> super :: vals :: Ppre { let val = (self . 0 >> 10usize) & 0x07 ; super :: vals :: Ppre :: from_bits (val as u8) } # [doc = "APB Low speed prescaler (APB1)"]
# [inline (always)]
pub fn set_ppre1 (& mut self , val : super :: vals :: Ppre) { self . 0 = (self . 0 & ! (0x07 << 10usize)) | (((val . to_bits () as u32) & 0x07) << 10usize) ; } # [doc = "APB high-speed prescaler (APB2)"]
# [inline (always)]
pub const fn ppre2 (& self) -> super :: vals :: Ppre { let val = (self . 0 >> 13usize) & 0x07 ; super :: vals :: Ppre :: from_bits (val as u8) } # [doc = "APB high-speed prescaler (APB2)"]
# [inline (always)]
pub fn set_ppre2 (& mut self , val : super :: vals :: Ppre) { self . 0 = (self . 0 & ! (0x07 << 13usize)) | (((val . to_bits () as u32) & 0x07) << 13usize) ; } # [doc = "HSE division factor for RTC clock"]
# [inline (always)]
pub const fn rtcpre (& self) -> u8 { let val = (self . 0 >> 16usize) & 0x1f ; val as u8 } # [doc = "HSE division factor for RTC clock"]
# [inline (always)]
pub fn set_rtcpre (& mut self , val : u8) { self . 0 = (self . 0 & ! (0x1f << 16usize)) | (((val as u32) & 0x1f) << 16usize) ; } # [doc = "Microcontroller clock output 1"]
# [inline (always)]
pub const fn mco1sel (& self) -> super :: vals :: Mco1sel { let val = (self . 0 >> 21usize) & 0x03 ; super :: vals :: Mco1sel :: from_bits (val as u8) } # [doc = "Microcontroller clock output 1"]
# [inline (always)]
pub fn set_mco1sel (& mut self , val : super :: vals :: Mco1sel) { self . 0 = (self . 0 & ! (0x03 << 21usize)) | (((val . to_bits () as u32) & 0x03) << 21usize) ; } # [doc = "I2S clock selection"]
# [inline (always)]
pub const fn i2ssrc (& self) -> super :: vals :: I2ssrcCfgr { let val = (self . 0 >> 23usize) & 0x01 ; super :: vals :: I2ssrcCfgr :: from_bits (val as u8) } # [doc = "I2S clock selection"]
# [inline (always)]
pub fn set_i2ssrc (& mut self , val : super :: vals :: I2ssrcCfgr) { self . 0 = (self . 0 & ! (0x01 << 23usize)) | (((val . to_bits () as u32) & 0x01) << 23usize) ; } # [doc = "MCO1 prescaler"]
# [inline (always)]
pub const fn mco1pre (& self) -> super :: vals :: Mcopre { let val = (self . 0 >> 24usize) & 0x07 ; super :: vals :: Mcopre :: from_bits (val as u8) } # [doc = "MCO1 prescaler"]
# [inline (always)]
pub fn set_mco1pre (& mut self , val : super :: vals :: Mcopre) { self . 0 = (self . 0 & ! (0x07 << 24usize)) | (((val . to_bits () as u32) & 0x07) << 24usize) ; } # [doc = "MCO2 prescaler"]
# [inline (always)]
pub const fn mco2pre (& self) -> super :: vals :: Mcopre { let val = (self . 0 >> 27usize) & 0x07 ; super :: vals :: Mcopre :: from_bits (val as u8) } # [doc = "MCO2 prescaler"]
# [inline (always)]
pub fn set_mco2pre (& mut self , val : super :: vals :: Mcopre) { self . 0 = (self . 0 & ! (0x07 << 27usize)) | (((val . to_bits () as u32) & 0x07) << 27usize) ; } # [doc = "Microcontroller clock output 2"]
# [inline (always)]
pub const fn mco2sel (& self) -> super :: vals :: Mco2sel { let val = (self . 0 >> 30usize) & 0x03 ; super :: vals :: Mco2sel :: from_bits (val as u8) } # [doc = "Microcontroller clock output 2"]
# [inline (always)]
pub fn set_mco2sel (& mut self , val : super :: vals :: Mco2sel) { self . 0 = (self . 0 & ! (0x03 << 30usize)) | (((val . to_bits () as u32) & 0x03) << 30usize) ; } } impl Default for Cfgr { # [inline (always)]
fn default () -> Cfgr { Cfgr (0) } } # [doc = "clock interrupt register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Cir (pub u32) ; impl Cir { # [doc = "LSI ready interrupt flag"]
# [inline (always)]
pub const fn lsirdyf (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "LSI ready interrupt flag"]
# [inline (always)]
pub fn set_lsirdyf (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "LSE ready interrupt flag"]
# [inline (always)]
pub const fn lserdyf (& self) -> bool { let val = (self . 0 >> 1usize) & 0x01 ; val != 0 } # [doc = "LSE ready interrupt flag"]
# [inline (always)]
pub fn set_lserdyf (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize) ; } # [doc = "HSI ready interrupt flag"]
# [inline (always)]
pub const fn hsirdyf (& self) -> bool { let val = (self . 0 >> 2usize) & 0x01 ; val != 0 } # [doc = "HSI ready interrupt flag"]
# [inline (always)]
pub fn set_hsirdyf (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize) ; } # [doc = "HSE ready interrupt flag"]
# [inline (always)]
pub const fn hserdyf (& self) -> bool { let val = (self . 0 >> 3usize) & 0x01 ; val != 0 } # [doc = "HSE ready interrupt flag"]
# [inline (always)]
pub fn set_hserdyf (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize) ; } # [doc = "Main PLL (PLL) ready interrupt flag"]
# [inline (always)]
pub const fn pllrdyf (& self) -> bool { let val = (self . 0 >> 4usize) & 0x01 ; val != 0 } # [doc = "Main PLL (PLL) ready interrupt flag"]
# [inline (always)]
pub fn set_pllrdyf (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize) ; } # [doc = "PLLI2S ready interrupt flag"]
# [inline (always)]
pub const fn plli2srdyf (& self) -> bool { let val = (self . 0 >> 5usize) & 0x01 ; val != 0 } # [doc = "PLLI2S ready interrupt flag"]
# [inline (always)]
pub fn set_plli2srdyf (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize) ; } # [doc = "PLLSAI ready interrupt flag"]
# [inline (always)]
pub const fn pllsairdyf (& self) -> bool { let val = (self . 0 >> 6usize) & 0x01 ; val != 0 } # [doc = "PLLSAI ready interrupt flag"]
# [inline (always)]
pub fn set_pllsairdyf (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize) ; } # [doc = "Clock security system interrupt flag"]
# [inline (always)]
pub const fn cssf (& self) -> bool { let val = (self . 0 >> 7usize) & 0x01 ; val != 0 } # [doc = "Clock security system interrupt flag"]
# [inline (always)]
pub fn set_cssf (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize) ; } # [doc = "LSI ready interrupt enable"]
# [inline (always)]
pub const fn lsirdyie (& self) -> bool { let val = (self . 0 >> 8usize) & 0x01 ; val != 0 } # [doc = "LSI ready interrupt enable"]
# [inline (always)]
pub fn set_lsirdyie (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 8usize)) | (((val as u32) & 0x01) << 8usize) ; } # [doc = "LSE ready interrupt enable"]
# [inline (always)]
pub const fn lserdyie (& self) -> bool { let val = (self . 0 >> 9usize) & 0x01 ; val != 0 } # [doc = "LSE ready interrupt enable"]
# [inline (always)]
pub fn set_lserdyie (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 9usize)) | (((val as u32) & 0x01) << 9usize) ; } # [doc = "HSI ready interrupt enable"]
# [inline (always)]
pub const fn hsirdyie (& self) -> bool { let val = (self . 0 >> 10usize) & 0x01 ; val != 0 } # [doc = "HSI ready interrupt enable"]
# [inline (always)]
pub fn set_hsirdyie (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 10usize)) | (((val as u32) & 0x01) << 10usize) ; } # [doc = "HSE ready interrupt enable"]
# [inline (always)]
pub const fn hserdyie (& self) -> bool { let val = (self . 0 >> 11usize) & 0x01 ; val != 0 } # [doc = "HSE ready interrupt enable"]
# [inline (always)]
pub fn set_hserdyie (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 11usize)) | (((val as u32) & 0x01) << 11usize) ; } # [doc = "Main PLL (PLL) ready interrupt enable"]
# [inline (always)]
pub const fn pllrdyie (& self) -> bool { let val = (self . 0 >> 12usize) & 0x01 ; val != 0 } # [doc = "Main PLL (PLL) ready interrupt enable"]
# [inline (always)]
pub fn set_pllrdyie (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 12usize)) | (((val as u32) & 0x01) << 12usize) ; } # [doc = "PLLI2S ready interrupt enable"]
# [inline (always)]
pub const fn plli2srdyie (& self) -> bool { let val = (self . 0 >> 13usize) & 0x01 ; val != 0 } # [doc = "PLLI2S ready interrupt enable"]
# [inline (always)]
pub fn set_plli2srdyie (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 13usize)) | (((val as u32) & 0x01) << 13usize) ; } # [doc = "PLLSAI Ready Interrupt Enable"]
# [inline (always)]
pub const fn pllsairdyie (& self) -> bool { let val = (self . 0 >> 14usize) & 0x01 ; val != 0 } # [doc = "PLLSAI Ready Interrupt Enable"]
# [inline (always)]
pub fn set_pllsairdyie (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 14usize)) | (((val as u32) & 0x01) << 14usize) ; } # [doc = "LSI ready interrupt clear"]
# [inline (always)]
pub const fn lsirdyc (& self) -> bool { let val = (self . 0 >> 16usize) & 0x01 ; val != 0 } # [doc = "LSI ready interrupt clear"]
# [inline (always)]
pub fn set_lsirdyc (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize) ; } # [doc = "LSE ready interrupt clear"]
# [inline (always)]
pub const fn lserdyc (& self) -> bool { let val = (self . 0 >> 17usize) & 0x01 ; val != 0 } # [doc = "LSE ready interrupt clear"]
# [inline (always)]
pub fn set_lserdyc (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize) ; } # [doc = "HSI ready interrupt clear"]
# [inline (always)]
pub const fn hsirdyc (& self) -> bool { let val = (self . 0 >> 18usize) & 0x01 ; val != 0 } # [doc = "HSI ready interrupt clear"]
# [inline (always)]
pub fn set_hsirdyc (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize) ; } # [doc = "HSE ready interrupt clear"]
# [inline (always)]
pub const fn hserdyc (& self) -> bool { let val = (self . 0 >> 19usize) & 0x01 ; val != 0 } # [doc = "HSE ready interrupt clear"]
# [inline (always)]
pub fn set_hserdyc (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize) ; } # [doc = "Main PLL(PLL) ready interrupt clear"]
# [inline (always)]
pub const fn pllrdyc (& self) -> bool { let val = (self . 0 >> 20usize) & 0x01 ; val != 0 } # [doc = "Main PLL(PLL) ready interrupt clear"]
# [inline (always)]
pub fn set_pllrdyc (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 20usize)) | (((val as u32) & 0x01) << 20usize) ; } # [doc = "PLLI2S ready interrupt clear"]
# [inline (always)]
pub const fn plli2srdyc (& self) -> bool { let val = (self . 0 >> 21usize) & 0x01 ; val != 0 } # [doc = "PLLI2S ready interrupt clear"]
# [inline (always)]
pub fn set_plli2srdyc (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize) ; } # [doc = "PLLSAI Ready Interrupt Clear"]
# [inline (always)]
pub const fn pllsairdyc (& self) -> bool { let val = (self . 0 >> 22usize) & 0x01 ; val != 0 } # [doc = "PLLSAI Ready Interrupt Clear"]
# [inline (always)]
pub fn set_pllsairdyc (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize) ; } # [doc = "Clock security system interrupt clear"]
# [inline (always)]
pub const fn cssc (& self) -> bool { let val = (self . 0 >> 23usize) & 0x01 ; val != 0 } # [doc = "Clock security system interrupt clear"]
# [inline (always)]
pub fn set_cssc (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize) ; } } impl Default for Cir { # [inline (always)]
fn default () -> Cir { Cir (0) } } # [doc = "clocks gated enable register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Ckgatenr (pub u32) ; impl Ckgatenr { # [doc = "AHB to APB1 Bridge clock enable"]
# [inline (always)]
pub const fn ahb2apb1_cken (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "AHB to APB1 Bridge clock enable"]
# [inline (always)]
pub fn set_ahb2apb1_cken (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "AHB to APB2 Bridge clock enable"]
# [inline (always)]
pub const fn ahb2apb2_cken (& self) -> bool { let val = (self . 0 >> 1usize) & 0x01 ; val != 0 } # [doc = "AHB to APB2 Bridge clock enable"]
# [inline (always)]
pub fn set_ahb2apb2_cken (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize) ; } # [doc = "Cortex M4 ETM clock enable"]
# [inline (always)]
pub const fn cm4dbg_cken (& self) -> bool { let val = (self . 0 >> 2usize) & 0x01 ; val != 0 } # [doc = "Cortex M4 ETM clock enable"]
# [inline (always)]
pub fn set_cm4dbg_cken (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize) ; } # [doc = "Spare clock enable"]
# [inline (always)]
pub const fn spare_cken (& self) -> bool { let val = (self . 0 >> 3usize) & 0x01 ; val != 0 } # [doc = "Spare clock enable"]
# [inline (always)]
pub fn set_spare_cken (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize) ; } # [doc = "SRAM controller clock enable"]
# [inline (always)]
pub const fn sram_cken (& self) -> bool { let val = (self . 0 >> 4usize) & 0x01 ; val != 0 } # [doc = "SRAM controller clock enable"]
# [inline (always)]
pub fn set_sram_cken (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize) ; } # [doc = "Flash interface clock enable"]
# [inline (always)]
pub const fn flash_cken (& self) -> bool { let val = (self . 0 >> 5usize) & 0x01 ; val != 0 } # [doc = "Flash interface clock enable"]
# [inline (always)]
pub fn set_flash_cken (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize) ; } # [doc = "RCC clock enable"]
# [inline (always)]
pub const fn rcc_cken (& self) -> bool { let val = (self . 0 >> 6usize) & 0x01 ; val != 0 } # [doc = "RCC clock enable"]
# [inline (always)]
pub fn set_rcc_cken (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize) ; } # [doc = "EVTCL clock enable"]
# [inline (always)]
pub const fn evtcl_cken (& self) -> bool { let val = (self . 0 >> 7usize) & 0x01 ; val != 0 } # [doc = "EVTCL clock enable"]
# [inline (always)]
pub fn set_evtcl_cken (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 7usize)) | (((val as u32) & 0x01) << 7usize) ; } } impl Default for Ckgatenr { # [inline (always)]
fn default () -> Ckgatenr { Ckgatenr (0) } } # [doc = "clock control register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Cr (pub u32) ; impl Cr { # [doc = "Internal high-speed clock enable"]
# [inline (always)]
pub const fn hsion (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "Internal high-speed clock enable"]
# [inline (always)]
pub fn set_hsion (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "Internal high-speed clock ready flag"]
# [inline (always)]
pub const fn hsirdy (& self) -> bool { let val = (self . 0 >> 1usize) & 0x01 ; val != 0 } # [doc = "Internal high-speed clock ready flag"]
# [inline (always)]
pub fn set_hsirdy (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize) ; } # [doc = "Internal high-speed clock trimming"]
# [inline (always)]
pub const fn hsitrim (& self) -> u8 { let val = (self . 0 >> 3usize) & 0x1f ; val as u8 } # [doc = "Internal high-speed clock trimming"]
# [inline (always)]
pub fn set_hsitrim (& mut self , val : u8) { self . 0 = (self . 0 & ! (0x1f << 3usize)) | (((val as u32) & 0x1f) << 3usize) ; } # [doc = "Internal high-speed clock calibration"]
# [inline (always)]
pub const fn hsical (& self) -> u8 { let val = (self . 0 >> 8usize) & 0xff ; val as u8 } # [doc = "Internal high-speed clock calibration"]
# [inline (always)]
pub fn set_hsical (& mut self , val : u8) { self . 0 = (self . 0 & ! (0xff << 8usize)) | (((val as u32) & 0xff) << 8usize) ; } # [doc = "HSE clock enable"]
# [inline (always)]
pub const fn hseon (& self) -> bool { let val = (self . 0 >> 16usize) & 0x01 ; val != 0 } # [doc = "HSE clock enable"]
# [inline (always)]
pub fn set_hseon (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize) ; } # [doc = "HSE clock ready flag"]
# [inline (always)]
pub const fn hserdy (& self) -> bool { let val = (self . 0 >> 17usize) & 0x01 ; val != 0 } # [doc = "HSE clock ready flag"]
# [inline (always)]
pub fn set_hserdy (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 17usize)) | (((val as u32) & 0x01) << 17usize) ; } # [doc = "HSE clock bypass"]
# [inline (always)]
pub const fn hsebyp (& self) -> bool { let val = (self . 0 >> 18usize) & 0x01 ; val != 0 } # [doc = "HSE clock bypass"]
# [inline (always)]
pub fn set_hsebyp (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 18usize)) | (((val as u32) & 0x01) << 18usize) ; } # [doc = "Clock security system enable"]
# [inline (always)]
pub const fn csson (& self) -> bool { let val = (self . 0 >> 19usize) & 0x01 ; val != 0 } # [doc = "Clock security system enable"]
# [inline (always)]
pub fn set_csson (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize) ; } # [doc = "Main PLL (PLL) enable"]
# [inline (always)]
pub const fn pllon (& self) -> bool { let val = (self . 0 >> 24usize) & 0x01 ; val != 0 } # [doc = "Main PLL (PLL) enable"]
# [inline (always)]
pub fn set_pllon (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize) ; } # [doc = "Main PLL (PLL) clock ready flag"]
# [inline (always)]
pub const fn pllrdy (& self) -> bool { let val = (self . 0 >> 25usize) & 0x01 ; val != 0 } # [doc = "Main PLL (PLL) clock ready flag"]
# [inline (always)]
pub fn set_pllrdy (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize) ; } # [doc = "PLLI2S enable"]
# [inline (always)]
pub const fn plli2son (& self) -> bool { let val = (self . 0 >> 26usize) & 0x01 ; val != 0 } # [doc = "PLLI2S enable"]
# [inline (always)]
pub fn set_plli2son (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize) ; } # [doc = "PLLI2S clock ready flag"]
# [inline (always)]
pub const fn plli2srdy (& self) -> bool { let val = (self . 0 >> 27usize) & 0x01 ; val != 0 } # [doc = "PLLI2S clock ready flag"]
# [inline (always)]
pub fn set_plli2srdy (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize) ; } # [doc = "PLLSAI enable"]
# [inline (always)]
pub const fn pllsaion (& self) -> bool { let val = (self . 0 >> 28usize) & 0x01 ; val != 0 } # [doc = "PLLSAI enable"]
# [inline (always)]
pub fn set_pllsaion (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize) ; } # [doc = "PLLSAI clock ready flag"]
# [inline (always)]
pub const fn pllsairdy (& self) -> bool { let val = (self . 0 >> 29usize) & 0x01 ; val != 0 } # [doc = "PLLSAI clock ready flag"]
# [inline (always)]
pub fn set_pllsairdy (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize) ; } } impl Default for Cr { # [inline (always)]
fn default () -> Cr { Cr (0) } } # [doc = "clock control & status register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Csr (pub u32) ; impl Csr { # [doc = "Internal low-speed oscillator enable"]
# [inline (always)]
pub const fn lsion (& self) -> bool { let val = (self . 0 >> 0usize) & 0x01 ; val != 0 } # [doc = "Internal low-speed oscillator enable"]
# [inline (always)]
pub fn set_lsion (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize) ; } # [doc = "Internal low-speed oscillator ready"]
# [inline (always)]
pub const fn lsirdy (& self) -> bool { let val = (self . 0 >> 1usize) & 0x01 ; val != 0 } # [doc = "Internal low-speed oscillator ready"]
# [inline (always)]
pub fn set_lsirdy (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize) ; } # [doc = "Remove reset flag"]
# [inline (always)]
pub const fn rmvf (& self) -> bool { let val = (self . 0 >> 24usize) & 0x01 ; val != 0 } # [doc = "Remove reset flag"]
# [inline (always)]
pub fn set_rmvf (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 24usize)) | (((val as u32) & 0x01) << 24usize) ; } # [doc = "BOR reset flag"]
# [inline (always)]
pub const fn borrstf (& self) -> bool { let val = (self . 0 >> 25usize) & 0x01 ; val != 0 } # [doc = "BOR reset flag"]
# [inline (always)]
pub fn set_borrstf (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 25usize)) | (((val as u32) & 0x01) << 25usize) ; } # [doc = "PIN reset flag"]
# [inline (always)]
pub const fn padrstf (& self) -> bool { let val = (self . 0 >> 26usize) & 0x01 ; val != 0 } # [doc = "PIN reset flag"]
# [inline (always)]
pub fn set_padrstf (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 26usize)) | (((val as u32) & 0x01) << 26usize) ; } # [doc = "POR/PDR reset flag"]
# [inline (always)]
pub const fn porrstf (& self) -> bool { let val = (self . 0 >> 27usize) & 0x01 ; val != 0 } # [doc = "POR/PDR reset flag"]
# [inline (always)]
pub fn set_porrstf (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 27usize)) | (((val as u32) & 0x01) << 27usize) ; } # [doc = "Software reset flag"]
# [inline (always)]
pub const fn sftrstf (& self) -> bool { let val = (self . 0 >> 28usize) & 0x01 ; val != 0 } # [doc = "Software reset flag"]
# [inline (always)]
pub fn set_sftrstf (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 28usize)) | (((val as u32) & 0x01) << 28usize) ; } # [doc = "Independent watchdog reset flag"]
# [inline (always)]
pub const fn wdgrstf (& self) -> bool { let val = (self . 0 >> 29usize) & 0x01 ; val != 0 } # [doc = "Independent watchdog reset flag"]
# [inline (always)]
pub fn set_wdgrstf (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 29usize)) | (((val as u32) & 0x01) << 29usize) ; } # [doc = "Window watchdog reset flag"]
# [inline (always)]
pub const fn wwdgrstf (& self) -> bool { let val = (self . 0 >> 30usize) & 0x01 ; val != 0 } # [doc = "Window watchdog reset flag"]
# [inline (always)]
pub fn set_wwdgrstf (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 30usize)) | (((val as u32) & 0x01) << 30usize) ; } # [doc = "Low-power reset flag"]
# [inline (always)]
pub const fn lpwrrstf (& self) -> bool { let val = (self . 0 >> 31usize) & 0x01 ; val != 0 } # [doc = "Low-power reset flag"]
# [inline (always)]
pub fn set_lpwrrstf (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize) ; } } impl Default for Csr { # [inline (always)]
fn default () -> Csr { Csr (0) } } # [doc = "Dedicated Clock Configuration Register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Dckcfgr (pub u32) ; impl Dckcfgr { # [doc = "PLLI2S division factor for SAI1 clock"]
# [inline (always)]
pub const fn plli2sdivq (& self) -> super :: vals :: Plli2sdivq { let val = (self . 0 >> 0usize) & 0x1f ; super :: vals :: Plli2sdivq :: from_bits (val as u8) } # [doc = "PLLI2S division factor for SAI1 clock"]
# [inline (always)]
pub fn set_plli2sdivq (& mut self , val : super :: vals :: Plli2sdivq) { self . 0 = (self . 0 & ! (0x1f << 0usize)) | (((val . to_bits () as u32) & 0x1f) << 0usize) ; } # [doc = "PLLI2S division factor for SAI1 A/B clock"]
# [inline (always)]
pub const fn plli2sdivr (& self) -> super :: vals :: Plli2sdivr { let val = (self . 0 >> 0usize) & 0x1f ; super :: vals :: Plli2sdivr :: from_bits (val as u8) } # [doc = "PLLI2S division factor for SAI1 A/B clock"]
# [inline (always)]
pub fn set_plli2sdivr (& mut self , val : super :: vals :: Plli2sdivr) { self . 0 = (self . 0 & ! (0x1f << 0usize)) | (((val . to_bits () as u32) & 0x1f) << 0usize) ; } # [doc = "PLL division factor for SAI1 A/B clock"]
# [inline (always)]
pub const fn plldivr (& self) -> super :: vals :: Plldivr { let val = (self . 0 >> 8usize) & 0x1f ; super :: vals :: Plldivr :: from_bits (val as u8) } # [doc = "PLL division factor for SAI1 A/B clock"]
# [inline (always)]
pub fn set_plldivr (& mut self , val : super :: vals :: Plldivr) { self . 0 = (self . 0 & ! (0x1f << 8usize)) | (((val . to_bits () as u32) & 0x1f) << 8usize) ; } # [doc = "PLLSAI division factor for SAI1 clock"]
# [inline (always)]
pub const fn pllsaidivq (& self) -> super :: vals :: Pllsaidivq { let val = (self . 0 >> 8usize) & 0x1f ; super :: vals :: Pllsaidivq :: from_bits (val as u8) } # [doc = "PLLSAI division factor for SAI1 clock"]
# [inline (always)]
pub fn set_pllsaidivq (& mut self , val : super :: vals :: Pllsaidivq) { self . 0 = (self . 0 & ! (0x1f << 8usize)) | (((val . to_bits () as u32) & 0x1f) << 8usize) ; } # [doc = "DFSDM2 audio clock selection"]
# [inline (always)]
pub const fn ckdfsdm2asel (& self) -> super :: vals :: Ckdfsdmasel { let val = (self . 0 >> 14usize) & 0x01 ; super :: vals :: Ckdfsdmasel :: from_bits (val as u8) } # [doc = "DFSDM2 audio clock selection"]
# [inline (always)]
pub fn set_ckdfsdm2asel (& mut self , val : super :: vals :: Ckdfsdmasel) { self . 0 = (self . 0 & ! (0x01 << 14usize)) | (((val . to_bits () as u32) & 0x01) << 14usize) ; } # [doc = "DFSDM1 audio clock selection"]
# [inline (always)]
pub const fn ckdfsdm1asel (& self) -> super :: vals :: Ckdfsdmasel { let val = (self . 0 >> 15usize) & 0x01 ; super :: vals :: Ckdfsdmasel :: from_bits (val as u8) } # [doc = "DFSDM1 audio clock selection"]
# [inline (always)]
pub fn set_ckdfsdm1asel (& mut self , val : super :: vals :: Ckdfsdmasel) { self . 0 = (self . 0 & ! (0x01 << 15usize)) | (((val . to_bits () as u32) & 0x01) << 15usize) ; } # [doc = "division factor for LCD_CLK"]
# [inline (always)]
pub const fn pllsaidivr (& self) -> super :: vals :: Pllsaidivr { let val = (self . 0 >> 16usize) & 0x03 ; super :: vals :: Pllsaidivr :: from_bits (val as u8) } # [doc = "division factor for LCD_CLK"]
# [inline (always)]
pub fn set_pllsaidivr (& mut self , val : super :: vals :: Pllsaidivr) { self . 0 = (self . 0 & ! (0x03 << 16usize)) | (((val . to_bits () as u32) & 0x03) << 16usize) ; } # [doc = "SAI1-A clock source selection"]
# [inline (always)]
pub const fn sai1asrc (& self) -> super :: vals :: Saiasrc { let val = (self . 0 >> 20usize) & 0x03 ; super :: vals :: Saiasrc :: from_bits (val as u8) } # [doc = "SAI1-A clock source selection"]
# [inline (always)]
pub fn set_sai1asrc (& mut self , val : super :: vals :: Saiasrc) { self . 0 = (self . 0 & ! (0x03 << 20usize)) | (((val . to_bits () as u32) & 0x03) << 20usize) ; } # [doc = "SAI1 clock source selection"]
# [inline (always)]
pub const fn sai1src (& self) -> super :: vals :: Sai1src { let val = (self . 0 >> 20usize) & 0x03 ; super :: vals :: Sai1src :: from_bits (val as u8) } # [doc = "SAI1 clock source selection"]
# [inline (always)]
pub fn set_sai1src (& mut self , val : super :: vals :: Sai1src) { self . 0 = (self . 0 & ! (0x03 << 20usize)) | (((val . to_bits () as u32) & 0x03) << 20usize) ; } # [doc = "SAI1-B clock source selection"]
# [inline (always)]
pub const fn sai1bsrc (& self) -> super :: vals :: Saibsrc { let val = (self . 0 >> 22usize) & 0x03 ; super :: vals :: Saibsrc :: from_bits (val as u8) } # [doc = "SAI1-B clock source selection"]
# [inline (always)]
pub fn set_sai1bsrc (& mut self , val : super :: vals :: Saibsrc) { self . 0 = (self . 0 & ! (0x03 << 22usize)) | (((val . to_bits () as u32) & 0x03) << 22usize) ; } # [doc = "SAI2 clock source selection"]
# [inline (always)]
pub const fn sai2src (& self) -> super :: vals :: Sai2src { let val = (self . 0 >> 22usize) & 0x03 ; super :: vals :: Sai2src :: from_bits (val as u8) } # [doc = "SAI2 clock source selection"]
# [inline (always)]
pub fn set_sai2src (& mut self , val : super :: vals :: Sai2src) { self . 0 = (self . 0 & ! (0x03 << 22usize)) | (((val . to_bits () as u32) & 0x03) << 22usize) ; } # [doc = "Timers clocks prescalers selection"]
# [inline (always)]
pub const fn timpre (& self) -> super :: vals :: Timpre { let val = (self . 0 >> 24usize) & 0x01 ; super :: vals :: Timpre :: from_bits (val as u8) } # [doc = "Timers clocks prescalers selection"]
# [inline (always)]
pub fn set_timpre (& mut self , val : super :: vals :: Timpre) { self . 0 = (self . 0 & ! (0x01 << 24usize)) | (((val . to_bits () as u32) & 0x01) << 24usize) ; } # [doc = "I2S APB1 clocks source selection (I2S2/3)"]
# [inline (always)]
pub const fn i2s1src (& self) -> super :: vals :: I2s1src { let val = (self . 0 >> 25usize) & 0x03 ; super :: vals :: I2s1src :: from_bits (val as u8) } # [doc = "I2S APB1 clocks source selection (I2S2/3)"]
# [inline (always)]
pub fn set_i2s1src (& mut self , val : super :: vals :: I2s1src) { self . 0 = (self . 0 & ! (0x03 << 25usize)) | (((val . to_bits () as u32) & 0x03) << 25usize) ; } # [doc = "I2SSRC"]
# [inline (always)]
pub const fn i2ssrc (& self) -> super :: vals :: I2ssrcDckcfgr { let val = (self . 0 >> 25usize) & 0x03 ; super :: vals :: I2ssrcDckcfgr :: from_bits (val as u8) } # [doc = "I2SSRC"]
# [inline (always)]
pub fn set_i2ssrc (& mut self , val : super :: vals :: I2ssrcDckcfgr) { self . 0 = (self . 0 & ! (0x03 << 25usize)) | (((val . to_bits () as u32) & 0x03) << 25usize) ; } # [doc = "48 MHz clock source selection"]
# [inline (always)]
pub const fn clk48sel (& self) -> super :: vals :: Clk48sel { let val = (self . 0 >> 27usize) & 0x01 ; super :: vals :: Clk48sel :: from_bits (val as u8) } # [doc = "48 MHz clock source selection"]
# [inline (always)]
pub fn set_clk48sel (& mut self , val : super :: vals :: Clk48sel) { self . 0 = (self . 0 & ! (0x01 << 27usize)) | (((val . to_bits () as u32) & 0x01) << 27usize) ; } # [doc = "I2S APB2 clocks source selection (I2S1/4/5)"]
# [inline (always)]
pub const fn i2s2src (& self) -> super :: vals :: I2s1src { let val = (self . 0 >> 27usize) & 0x03 ; super :: vals :: I2s1src :: from_bits (val as u8) } # [doc = "I2S APB2 clocks source selection (I2S1/4/5)"]
# [inline (always)]
pub fn set_i2s2src (& mut self , val : super :: vals :: I2s1src) { self . 0 = (self . 0 & ! (0x03 << 27usize)) | (((val . to_bits () as u32) & 0x03) << 27usize) ; } # [doc = "SDIO clock source selection"]
# [inline (always)]
pub const fn sdiosel (& self) -> super :: vals :: Sdiosel { let val = (self . 0 >> 28usize) & 0x01 ; super :: vals :: Sdiosel :: from_bits (val as u8) } # [doc = "SDIO clock source selection"]
# [inline (always)]
pub fn set_sdiosel (& mut self , val : super :: vals :: Sdiosel) { self . 0 = (self . 0 & ! (0x01 << 28usize)) | (((val . to_bits () as u32) & 0x01) << 28usize) ; } # [doc = "DSI clock source selection"]
# [inline (always)]
pub const fn dsisel (& self) -> super :: vals :: Dsisel { let val = (self . 0 >> 29usize) & 0x01 ; super :: vals :: Dsisel :: from_bits (val as u8) } # [doc = "DSI clock source selection"]
# [inline (always)]
pub fn set_dsisel (& mut self , val : super :: vals :: Dsisel) { self . 0 = (self . 0 & ! (0x01 << 29usize)) | (((val . to_bits () as u32) & 0x01) << 29usize) ; } # [doc = "DFSDM1 Kernel clock selection"]
# [inline (always)]
pub const fn ckdfsdm1sel (& self) -> super :: vals :: Ckdfsdmsel { let val = (self . 0 >> 31usize) & 0x01 ; super :: vals :: Ckdfsdmsel :: from_bits (val as u8) } # [doc = "DFSDM1 Kernel clock selection"]
# [inline (always)]
pub fn set_ckdfsdm1sel (& mut self , val : super :: vals :: Ckdfsdmsel) { self . 0 = (self . 0 & ! (0x01 << 31usize)) | (((val . to_bits () as u32) & 0x01) << 31usize) ; } } impl Default for Dckcfgr { # [inline (always)]
fn default () -> Dckcfgr { Dckcfgr (0) } } # [doc = "dedicated clocks configuration register 2"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Dckcfgr2 (pub u32) ; impl Dckcfgr2 { # [doc = "FMPI2C1 kernel clock source selection"]
# [inline (always)]
pub const fn fmpi2c1sel (& self) -> super :: vals :: Fmpi2csel { let val = (self . 0 >> 22usize) & 0x03 ; super :: vals :: Fmpi2csel :: from_bits (val as u8) } # [doc = "FMPI2C1 kernel clock source selection"]
# [inline (always)]
pub fn set_fmpi2c1sel (& mut self , val : super :: vals :: Fmpi2csel) { self . 0 = (self . 0 & ! (0x03 << 22usize)) | (((val . to_bits () as u32) & 0x03) << 22usize) ; } # [doc = "HDMI CEC clock source selection"]
# [inline (always)]
pub const fn cecsel (& self) -> super :: vals :: Cecsel { let val = (self . 0 >> 26usize) & 0x01 ; super :: vals :: Cecsel :: from_bits (val as u8) } # [doc = "HDMI CEC clock source selection"]
# [inline (always)]
pub fn set_cecsel (& mut self , val : super :: vals :: Cecsel) { self . 0 = (self . 0 & ! (0x01 << 26usize)) | (((val . to_bits () as u32) & 0x01) << 26usize) ; } # [doc = "SDIO/USB clock selection"]
# [inline (always)]
pub const fn clk48sel (& self) -> super :: vals :: Clk48sel { let val = (self . 0 >> 27usize) & 0x01 ; super :: vals :: Clk48sel :: from_bits (val as u8) } # [doc = "SDIO/USB clock selection"]
# [inline (always)]
pub fn set_clk48sel (& mut self , val : super :: vals :: Clk48sel) { self . 0 = (self . 0 & ! (0x01 << 27usize)) | (((val . to_bits () as u32) & 0x01) << 27usize) ; } # [doc = "SDIO clock selection"]
# [inline (always)]
pub const fn sdiosel (& self) -> super :: vals :: Sdiosel { let val = (self . 0 >> 28usize) & 0x01 ; super :: vals :: Sdiosel :: from_bits (val as u8) } # [doc = "SDIO clock selection"]
# [inline (always)]
pub fn set_sdiosel (& mut self , val : super :: vals :: Sdiosel) { self . 0 = (self . 0 & ! (0x01 << 28usize)) | (((val . to_bits () as u32) & 0x01) << 28usize) ; } # [doc = "SPDIF clock selection"]
# [inline (always)]
pub const fn spdifrxsel (& self) -> super :: vals :: Spdifrxsel { let val = (self . 0 >> 29usize) & 0x01 ; super :: vals :: Spdifrxsel :: from_bits (val as u8) } # [doc = "SPDIF clock selection"]
# [inline (always)]
pub fn set_spdifrxsel (& mut self , val : super :: vals :: Spdifrxsel) { self . 0 = (self . 0 & ! (0x01 << 29usize)) | (((val . to_bits () as u32) & 0x01) << 29usize) ; } # [doc = "LPTIM1SEL"]
# [inline (always)]
pub const fn lptim1sel (& self) -> super :: vals :: Lptimsel { let val = (self . 0 >> 30usize) & 0x03 ; super :: vals :: Lptimsel :: from_bits (val as u8) } # [doc = "LPTIM1SEL"]
# [inline (always)]
pub fn set_lptim1sel (& mut self , val : super :: vals :: Lptimsel) { self . 0 = (self . 0 & ! (0x03 << 30usize)) | (((val . to_bits () as u32) & 0x03) << 30usize) ; } } impl Default for Dckcfgr2 { # [inline (always)]
fn default () -> Dckcfgr2 { Dckcfgr2 (0) } } # [doc = "PLL configuration register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Pllcfgr (pub u32) ; impl Pllcfgr { # [doc = "Division factor for the main PLL (PLL) and audio PLL (PLLI2S) input clock"]
# [inline (always)]
pub const fn pllm (& self) -> super :: vals :: Pllm { let val = (self . 0 >> 0usize) & 0x3f ; super :: vals :: Pllm :: from_bits (val as u8) } # [doc = "Division factor for the main PLL (PLL) and audio PLL (PLLI2S) input clock"]
# [inline (always)]
pub fn set_pllm (& mut self , val : super :: vals :: Pllm) { self . 0 = (self . 0 & ! (0x3f << 0usize)) | (((val . to_bits () as u32) & 0x3f) << 0usize) ; } # [doc = "Main PLL (PLL) multiplication factor for VCO"]
# [inline (always)]
pub const fn plln (& self) -> super :: vals :: Plln { let val = (self . 0 >> 6usize) & 0x01ff ; super :: vals :: Plln :: from_bits (val as u16) } # [doc = "Main PLL (PLL) multiplication factor for VCO"]
# [inline (always)]
pub fn set_plln (& mut self , val : super :: vals :: Plln) { self . 0 = (self . 0 & ! (0x01ff << 6usize)) | (((val . to_bits () as u32) & 0x01ff) << 6usize) ; } # [doc = "Main PLL (PLL) division factor for main system clock"]
# [inline (always)]
pub const fn pllp (& self) -> super :: vals :: Pllp { let val = (self . 0 >> 16usize) & 0x03 ; super :: vals :: Pllp :: from_bits (val as u8) } # [doc = "Main PLL (PLL) division factor for main system clock"]
# [inline (always)]
pub fn set_pllp (& mut self , val : super :: vals :: Pllp) { self . 0 = (self . 0 & ! (0x03 << 16usize)) | (((val . to_bits () as u32) & 0x03) << 16usize) ; } # [doc = "Main PLL(PLL) and audio PLL (PLLI2S) entry clock source"]
# [inline (always)]
pub const fn pllsrc (& self) -> super :: vals :: Pllsrc { let val = (self . 0 >> 22usize) & 0x01 ; super :: vals :: Pllsrc :: from_bits (val as u8) } # [doc = "Main PLL(PLL) and audio PLL (PLLI2S) entry clock source"]
# [inline (always)]
pub fn set_pllsrc (& mut self , val : super :: vals :: Pllsrc) { self . 0 = (self . 0 & ! (0x01 << 22usize)) | (((val . to_bits () as u32) & 0x01) << 22usize) ; } # [doc = "Main PLL (PLL) division factor for USB OTG FS, SDIO and random number generator clocks"]
# [inline (always)]
pub const fn pllq (& self) -> super :: vals :: Pllq { let val = (self . 0 >> 24usize) & 0x0f ; super :: vals :: Pllq :: from_bits (val as u8) } # [doc = "Main PLL (PLL) division factor for USB OTG FS, SDIO and random number generator clocks"]
# [inline (always)]
pub fn set_pllq (& mut self , val : super :: vals :: Pllq) { self . 0 = (self . 0 & ! (0x0f << 24usize)) | (((val . to_bits () as u32) & 0x0f) << 24usize) ; } # [doc = "PLL division factor for I2S and System clocks"]
# [inline (always)]
pub const fn pllr (& self) -> super :: vals :: Pllr { let val = (self . 0 >> 28usize) & 0x07 ; super :: vals :: Pllr :: from_bits (val as u8) } # [doc = "PLL division factor for I2S and System clocks"]
# [inline (always)]
pub fn set_pllr (& mut self , val : super :: vals :: Pllr) { self . 0 = (self . 0 & ! (0x07 << 28usize)) | (((val . to_bits () as u32) & 0x07) << 28usize) ; } } impl Default for Pllcfgr { # [inline (always)]
fn default () -> Pllcfgr { Pllcfgr (0) } } # [doc = "PLLI2S configuration register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Plli2scfgr (pub u32) ; impl Plli2scfgr { # [doc = "Division factor for the main PLL (PLL) and audio PLL (PLLI2S) input clock"]
# [inline (always)]
pub const fn pllm (& self) -> super :: vals :: Pllm { let val = (self . 0 >> 0usize) & 0x3f ; super :: vals :: Pllm :: from_bits (val as u8) } # [doc = "Division factor for the main PLL (PLL) and audio PLL (PLLI2S) input clock"]
# [inline (always)]
pub fn set_pllm (& mut self , val : super :: vals :: Pllm) { self . 0 = (self . 0 & ! (0x3f << 0usize)) | (((val . to_bits () as u32) & 0x3f) << 0usize) ; } # [doc = "Main PLL (PLL) multiplication factor for VCO"]
# [inline (always)]
pub const fn plln (& self) -> super :: vals :: Plln { let val = (self . 0 >> 6usize) & 0x01ff ; super :: vals :: Plln :: from_bits (val as u16) } # [doc = "Main PLL (PLL) multiplication factor for VCO"]
# [inline (always)]
pub fn set_plln (& mut self , val : super :: vals :: Plln) { self . 0 = (self . 0 & ! (0x01ff << 6usize)) | (((val . to_bits () as u32) & 0x01ff) << 6usize) ; } # [doc = "Main PLL (PLL) division factor for main system clock"]
# [inline (always)]
pub const fn pllp (& self) -> super :: vals :: Pllp { let val = (self . 0 >> 16usize) & 0x03 ; super :: vals :: Pllp :: from_bits (val as u8) } # [doc = "Main PLL (PLL) division factor for main system clock"]
# [inline (always)]
pub fn set_pllp (& mut self , val : super :: vals :: Pllp) { self . 0 = (self . 0 & ! (0x03 << 16usize)) | (((val . to_bits () as u32) & 0x03) << 16usize) ; } # [doc = "PLLI2S entry clock source"]
# [inline (always)]
pub const fn plli2ssrc (& self) -> super :: vals :: Plli2ssrc { let val = (self . 0 >> 22usize) & 0x01 ; super :: vals :: Plli2ssrc :: from_bits (val as u8) } # [doc = "PLLI2S entry clock source"]
# [inline (always)]
pub fn set_plli2ssrc (& mut self , val : super :: vals :: Plli2ssrc) { self . 0 = (self . 0 & ! (0x01 << 22usize)) | (((val . to_bits () as u32) & 0x01) << 22usize) ; } # [doc = "Main PLL(PLL) and audio PLL (PLLI2S) entry clock source"]
# [inline (always)]
pub const fn pllsrc (& self) -> super :: vals :: Pllsrc { let val = (self . 0 >> 22usize) & 0x01 ; super :: vals :: Pllsrc :: from_bits (val as u8) } # [doc = "Main PLL(PLL) and audio PLL (PLLI2S) entry clock source"]
# [inline (always)]
pub fn set_pllsrc (& mut self , val : super :: vals :: Pllsrc) { self . 0 = (self . 0 & ! (0x01 << 22usize)) | (((val . to_bits () as u32) & 0x01) << 22usize) ; } # [doc = "Main PLL (PLL) division factor for USB OTG FS, SDIO and random number generator clocks"]
# [inline (always)]
pub const fn pllq (& self) -> super :: vals :: Pllq { let val = (self . 0 >> 24usize) & 0x0f ; super :: vals :: Pllq :: from_bits (val as u8) } # [doc = "Main PLL (PLL) division factor for USB OTG FS, SDIO and random number generator clocks"]
# [inline (always)]
pub fn set_pllq (& mut self , val : super :: vals :: Pllq) { self . 0 = (self . 0 & ! (0x0f << 24usize)) | (((val . to_bits () as u32) & 0x0f) << 24usize) ; } # [doc = "PLL division factor for I2S and System clocks"]
# [inline (always)]
pub const fn pllr (& self) -> super :: vals :: Pllr { let val = (self . 0 >> 28usize) & 0x07 ; super :: vals :: Pllr :: from_bits (val as u8) } # [doc = "PLL division factor for I2S and System clocks"]
# [inline (always)]
pub fn set_pllr (& mut self , val : super :: vals :: Pllr) { self . 0 = (self . 0 & ! (0x07 << 28usize)) | (((val . to_bits () as u32) & 0x07) << 28usize) ; } } impl Default for Plli2scfgr { # [inline (always)]
fn default () -> Plli2scfgr { Plli2scfgr (0) } } # [doc = "PLL configuration register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Pllsaicfgr (pub u32) ; impl Pllsaicfgr { # [doc = "Division factor for the main PLL (PLL) and audio PLL (PLLI2S) input clock"]
# [inline (always)]
pub const fn pllm (& self) -> super :: vals :: Pllm { let val = (self . 0 >> 0usize) & 0x3f ; super :: vals :: Pllm :: from_bits (val as u8) } # [doc = "Division factor for the main PLL (PLL) and audio PLL (PLLI2S) input clock"]
# [inline (always)]
pub fn set_pllm (& mut self , val : super :: vals :: Pllm) { self . 0 = (self . 0 & ! (0x3f << 0usize)) | (((val . to_bits () as u32) & 0x3f) << 0usize) ; } # [doc = "Main PLL (PLL) multiplication factor for VCO"]
# [inline (always)]
pub const fn plln (& self) -> super :: vals :: Plln { let val = (self . 0 >> 6usize) & 0x01ff ; super :: vals :: Plln :: from_bits (val as u16) } # [doc = "Main PLL (PLL) multiplication factor for VCO"]
# [inline (always)]
pub fn set_plln (& mut self , val : super :: vals :: Plln) { self . 0 = (self . 0 & ! (0x01ff << 6usize)) | (((val . to_bits () as u32) & 0x01ff) << 6usize) ; } # [doc = "Main PLL (PLL) division factor for main system clock"]
# [inline (always)]
pub const fn pllp (& self) -> super :: vals :: Pllp { let val = (self . 0 >> 16usize) & 0x03 ; super :: vals :: Pllp :: from_bits (val as u8) } # [doc = "Main PLL (PLL) division factor for main system clock"]
# [inline (always)]
pub fn set_pllp (& mut self , val : super :: vals :: Pllp) { self . 0 = (self . 0 & ! (0x03 << 16usize)) | (((val . to_bits () as u32) & 0x03) << 16usize) ; } # [doc = "Main PLL(PLL) and audio PLL (PLLI2S) entry clock source"]
# [inline (always)]
pub const fn pllsrc (& self) -> super :: vals :: Pllsrc { let val = (self . 0 >> 22usize) & 0x01 ; super :: vals :: Pllsrc :: from_bits (val as u8) } # [doc = "Main PLL(PLL) and audio PLL (PLLI2S) entry clock source"]
# [inline (always)]
pub fn set_pllsrc (& mut self , val : super :: vals :: Pllsrc) { self . 0 = (self . 0 & ! (0x01 << 22usize)) | (((val . to_bits () as u32) & 0x01) << 22usize) ; } # [doc = "Main PLL (PLL) division factor for USB OTG FS, SDIO and random number generator clocks"]
# [inline (always)]
pub const fn pllq (& self) -> super :: vals :: Pllq { let val = (self . 0 >> 24usize) & 0x0f ; super :: vals :: Pllq :: from_bits (val as u8) } # [doc = "Main PLL (PLL) division factor for USB OTG FS, SDIO and random number generator clocks"]
# [inline (always)]
pub fn set_pllq (& mut self , val : super :: vals :: Pllq) { self . 0 = (self . 0 & ! (0x0f << 24usize)) | (((val . to_bits () as u32) & 0x0f) << 24usize) ; } # [doc = "PLL division factor for I2S and System clocks"]
# [inline (always)]
pub const fn pllr (& self) -> super :: vals :: Pllr { let val = (self . 0 >> 28usize) & 0x07 ; super :: vals :: Pllr :: from_bits (val as u8) } # [doc = "PLL division factor for I2S and System clocks"]
# [inline (always)]
pub fn set_pllr (& mut self , val : super :: vals :: Pllr) { self . 0 = (self . 0 & ! (0x07 << 28usize)) | (((val . to_bits () as u32) & 0x07) << 28usize) ; } } impl Default for Pllsaicfgr { # [inline (always)]
fn default () -> Pllsaicfgr { Pllsaicfgr (0) } } # [doc = "spread spectrum clock generation register"]
# [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq)]
pub struct Sscgr (pub u32) ; impl Sscgr { # [doc = "Modulation period"]
# [inline (always)]
pub const fn modper (& self) -> u16 { let val = (self . 0 >> 0usize) & 0x1fff ; val as u16 } # [doc = "Modulation period"]
# [inline (always)]
pub fn set_modper (& mut self , val : u16) { self . 0 = (self . 0 & ! (0x1fff << 0usize)) | (((val as u32) & 0x1fff) << 0usize) ; } # [doc = "Incrementation step"]
# [inline (always)]
pub const fn incstep (& self) -> u16 { let val = (self . 0 >> 13usize) & 0x7fff ; val as u16 } # [doc = "Incrementation step"]
# [inline (always)]
pub fn set_incstep (& mut self , val : u16) { self . 0 = (self . 0 & ! (0x7fff << 13usize)) | (((val as u32) & 0x7fff) << 13usize) ; } # [doc = "Spread Select"]
# [inline (always)]
pub const fn spreadsel (& self) -> super :: vals :: Spreadsel { let val = (self . 0 >> 30usize) & 0x01 ; super :: vals :: Spreadsel :: from_bits (val as u8) } # [doc = "Spread Select"]
# [inline (always)]
pub fn set_spreadsel (& mut self , val : super :: vals :: Spreadsel) { self . 0 = (self . 0 & ! (0x01 << 30usize)) | (((val . to_bits () as u32) & 0x01) << 30usize) ; } # [doc = "Spread spectrum modulation enable"]
# [inline (always)]
pub const fn sscgen (& self) -> bool { let val = (self . 0 >> 31usize) & 0x01 ; val != 0 } # [doc = "Spread spectrum modulation enable"]
# [inline (always)]
pub fn set_sscgen (& mut self , val : bool) { self . 0 = (self . 0 & ! (0x01 << 31usize)) | (((val as u32) & 0x01) << 31usize) ; } } impl Default for Sscgr { # [inline (always)]
fn default () -> Sscgr { Sscgr (0) } } } pub mod vals { # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Cecsel { # [doc = "LSE clock is selected as HDMI-CEC clock"]
LSE = 0x0 , # [doc = "HSI divided by 488 clock is selected as HDMI-CEC clock"]
HSI_DIV488 = 0x01 , } impl Cecsel { # [inline (always)]
pub const fn from_bits (val : u8) -> Cecsel { unsafe { core :: mem :: transmute (val & 0x01) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Cecsel { # [inline (always)]
fn from (val : u8) -> Cecsel { Cecsel :: from_bits (val) } } impl From < Cecsel > for u8 { # [inline (always)]
fn from (val : Cecsel) -> u8 { Cecsel :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Ckdfsdmasel { # [doc = "CK_I2S_APB1 selected as audio clock"]
I2S1 = 0x0 , # [doc = "CK_I2S_APB2 selected as audio clock"]
I2S2 = 0x01 , } impl Ckdfsdmasel { # [inline (always)]
pub const fn from_bits (val : u8) -> Ckdfsdmasel { unsafe { core :: mem :: transmute (val & 0x01) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Ckdfsdmasel { # [inline (always)]
fn from (val : u8) -> Ckdfsdmasel { Ckdfsdmasel :: from_bits (val) } } impl From < Ckdfsdmasel > for u8 { # [inline (always)]
fn from (val : Ckdfsdmasel) -> u8 { Ckdfsdmasel :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Ckdfsdmsel { # [doc = "APB2 clock used as Kernel clock"]
PCLK2 = 0x0 , # [doc = "System clock used as Kernel clock"]
SYS = 0x01 , } impl Ckdfsdmsel { # [inline (always)]
pub const fn from_bits (val : u8) -> Ckdfsdmsel { unsafe { core :: mem :: transmute (val & 0x01) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Ckdfsdmsel { # [inline (always)]
fn from (val : u8) -> Ckdfsdmsel { Ckdfsdmsel :: from_bits (val) } } impl From < Ckdfsdmsel > for u8 { # [inline (always)]
fn from (val : Ckdfsdmsel) -> u8 { Ckdfsdmsel :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Clk48sel { # [doc = "48MHz clock from PLL is selected"]
PLL1_Q = 0x0 , # [doc = "48MHz clock from PLLSAI is selected"]
PLLSAI1_Q = 0x01 , } impl Clk48sel { # [inline (always)]
pub const fn from_bits (val : u8) -> Clk48sel { unsafe { core :: mem :: transmute (val & 0x01) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Clk48sel { # [inline (always)]
fn from (val : u8) -> Clk48sel { Clk48sel :: from_bits (val) } } impl From < Clk48sel > for u8 { # [inline (always)]
fn from (val : Clk48sel) -> u8 { Clk48sel :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Dsisel { # [doc = "DSI-PHY used as DSI byte lane clock source (usual case)"]
DSI_PHY = 0x0 , # [doc = "PLLR used as DSI byte lane clock source, used in case DSI PLL and DSI-PHY are off (low power mode)"]
PLL1_R = 0x01 , } impl Dsisel { # [inline (always)]
pub const fn from_bits (val : u8) -> Dsisel { unsafe { core :: mem :: transmute (val & 0x01) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Dsisel { # [inline (always)]
fn from (val : u8) -> Dsisel { Dsisel :: from_bits (val) } } impl From < Dsisel > for u8 { # [inline (always)]
fn from (val : Dsisel) -> u8 { Dsisel :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Fmpi2csel { # [doc = "APB clock selected as I2C clock"]
PCLK1 = 0x0 , # [doc = "System clock selected as I2C clock"]
SYS = 0x01 , # [doc = "HSI clock selected as I2C clock"]
HSI = 0x02 , _RESERVED_3 = 0x03 , } impl Fmpi2csel { # [inline (always)]
pub const fn from_bits (val : u8) -> Fmpi2csel { unsafe { core :: mem :: transmute (val & 0x03) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Fmpi2csel { # [inline (always)]
fn from (val : u8) -> Fmpi2csel { Fmpi2csel :: from_bits (val) } } impl From < Fmpi2csel > for u8 { # [inline (always)]
fn from (val : Fmpi2csel) -> u8 { Fmpi2csel :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Hpre { # [doc = "SYSCLK not divided"]
DIV1 = 0x0 , _RESERVED_1 = 0x01 , _RESERVED_2 = 0x02 , _RESERVED_3 = 0x03 , _RESERVED_4 = 0x04 , _RESERVED_5 = 0x05 , _RESERVED_6 = 0x06 , _RESERVED_7 = 0x07 , # [doc = "SYSCLK divided by 2"]
DIV2 = 0x08 , # [doc = "SYSCLK divided by 4"]
DIV4 = 0x09 , # [doc = "SYSCLK divided by 8"]
DIV8 = 0x0a , # [doc = "SYSCLK divided by 16"]
DIV16 = 0x0b , # [doc = "SYSCLK divided by 64"]
DIV64 = 0x0c , # [doc = "SYSCLK divided by 128"]
DIV128 = 0x0d , # [doc = "SYSCLK divided by 256"]
DIV256 = 0x0e , # [doc = "SYSCLK divided by 512"]
DIV512 = 0x0f , } impl Hpre { # [inline (always)]
pub const fn from_bits (val : u8) -> Hpre { unsafe { core :: mem :: transmute (val & 0x0f) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Hpre { # [inline (always)]
fn from (val : u8) -> Hpre { Hpre :: from_bits (val) } } impl From < Hpre > for u8 { # [inline (always)]
fn from (val : Hpre) -> u8 { Hpre :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum I2s1src { # [doc = "I2Sx clock frequency = f(PLLI2S_R)"]
PLLI2SR = 0x0 , # [doc = "I2Sx clock frequency = I2S_CKIN Alternate function input frequency"]
I2S_CKIN = 0x01 , # [doc = "I2Sx clock frequency = f(PLL_R)"]
PLLR = 0x02 , # [doc = "I2Sx clock frequency = HSI/HSE depends on PLLSRC bit (PLLCFGR\\[22\\])"]
HSI_HSE = 0x03 , } impl I2s1src { # [inline (always)]
pub const fn from_bits (val : u8) -> I2s1src { unsafe { core :: mem :: transmute (val & 0x03) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for I2s1src { # [inline (always)]
fn from (val : u8) -> I2s1src { I2s1src :: from_bits (val) } } impl From < I2s1src > for u8 { # [inline (always)]
fn from (val : I2s1src) -> u8 { I2s1src :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum I2ssrcCfgr { # [doc = "PLLI2S clock used as I2S clock source"]
PLLI2S = 0x0 , # [doc = "External clock mapped on the I2S_CKIN pin used as I2S clock source"]
CKIN = 0x01 , } impl I2ssrcCfgr { # [inline (always)]
pub const fn from_bits (val : u8) -> I2ssrcCfgr { unsafe { core :: mem :: transmute (val & 0x01) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for I2ssrcCfgr { # [inline (always)]
fn from (val : u8) -> I2ssrcCfgr { I2ssrcCfgr :: from_bits (val) } } impl From < I2ssrcCfgr > for u8 { # [inline (always)]
fn from (val : I2ssrcCfgr) -> u8 { I2ssrcCfgr :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum I2ssrcDckcfgr { # [doc = "clock frequency = f(PLLI2S_R)"]
PLLI2S_R = 0x0 , # [doc = "clock frequency = I2S_CKIN Alternate function input frequency"]
I2S_CKIN = 0x01 , # [doc = "clock frequency = f(PLL_R)"]
PLL_R = 0x02 , # [doc = "clock frequency = HSI/HSE depends on PLLSRC bit (PLLCFGR\\[22\\])"]
HSI_HSE = 0x03 , } impl I2ssrcDckcfgr { # [inline (always)]
pub const fn from_bits (val : u8) -> I2ssrcDckcfgr { unsafe { core :: mem :: transmute (val & 0x03) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for I2ssrcDckcfgr { # [inline (always)]
fn from (val : u8) -> I2ssrcDckcfgr { I2ssrcDckcfgr :: from_bits (val) } } impl From < I2ssrcDckcfgr > for u8 { # [inline (always)]
fn from (val : I2ssrcDckcfgr) -> u8 { I2ssrcDckcfgr :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Lptimsel { # [doc = "APB1 clock (PCLK1) selected as LPTILM1 clock"]
PCLK1 = 0x0 , # [doc = "LSI clock is selected as LPTILM1 clock"]
LSI = 0x01 , # [doc = "HSI clock is selected as LPTILM1 clock"]
HSI = 0x02 , # [doc = "LSE clock is selected as LPTILM1 clock"]
LSE = 0x03 , } impl Lptimsel { # [inline (always)]
pub const fn from_bits (val : u8) -> Lptimsel { unsafe { core :: mem :: transmute (val & 0x03) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Lptimsel { # [inline (always)]
fn from (val : u8) -> Lptimsel { Lptimsel :: from_bits (val) } } impl From < Lptimsel > for u8 { # [inline (always)]
fn from (val : Lptimsel) -> u8 { Lptimsel :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Lsemod { # [doc = "LSE oscillator low power mode selection"]
LOW = 0x0 , # [doc = "LSE oscillator high drive mode selection"]
HIGH = 0x01 , } impl Lsemod { # [inline (always)]
pub const fn from_bits (val : u8) -> Lsemod { unsafe { core :: mem :: transmute (val & 0x01) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Lsemod { # [inline (always)]
fn from (val : u8) -> Lsemod { Lsemod :: from_bits (val) } } impl From < Lsemod > for u8 { # [inline (always)]
fn from (val : Lsemod) -> u8 { Lsemod :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Mco1sel { # [doc = "HSI clock selected"]
HSI = 0x0 , # [doc = "LSE oscillator selected"]
LSE = 0x01 , # [doc = "HSE oscillator clock selected"]
HSE = 0x02 , # [doc = "PLL clock selected"]
PLL = 0x03 , } impl Mco1sel { # [inline (always)]
pub const fn from_bits (val : u8) -> Mco1sel { unsafe { core :: mem :: transmute (val & 0x03) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Mco1sel { # [inline (always)]
fn from (val : u8) -> Mco1sel { Mco1sel :: from_bits (val) } } impl From < Mco1sel > for u8 { # [inline (always)]
fn from (val : Mco1sel) -> u8 { Mco1sel :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Mco2sel { # [doc = "System clock (SYSCLK) selected"]
SYS = 0x0 , # [doc = "PLLI2S clock selected"]
PLLI2S = 0x01 , # [doc = "HSE oscillator clock selected"]
HSE = 0x02 , # [doc = "PLL clock selected"]
PLL = 0x03 , } impl Mco2sel { # [inline (always)]
pub const fn from_bits (val : u8) -> Mco2sel { unsafe { core :: mem :: transmute (val & 0x03) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Mco2sel { # [inline (always)]
fn from (val : u8) -> Mco2sel { Mco2sel :: from_bits (val) } } impl From < Mco2sel > for u8 { # [inline (always)]
fn from (val : Mco2sel) -> u8 { Mco2sel :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Mcopre { # [doc = "No division"]
DIV1 = 0x0 , _RESERVED_1 = 0x01 , _RESERVED_2 = 0x02 , _RESERVED_3 = 0x03 , # [doc = "Division by 2"]
DIV2 = 0x04 , # [doc = "Division by 3"]
DIV3 = 0x05 , # [doc = "Division by 4"]
DIV4 = 0x06 , # [doc = "Division by 5"]
DIV5 = 0x07 , } impl Mcopre { # [inline (always)]
pub const fn from_bits (val : u8) -> Mcopre { unsafe { core :: mem :: transmute (val & 0x07) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Mcopre { # [inline (always)]
fn from (val : u8) -> Mcopre { Mcopre :: from_bits (val) } } impl From < Mcopre > for u8 { # [inline (always)]
fn from (val : Mcopre) -> u8 { Mcopre :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Plldivr { # [doc = "PLLSAIDIVQ = /1"]
DIV1 = 0x0 , # [doc = "PLLSAIDIVQ = /2"]
DIV2 = 0x01 , # [doc = "PLLSAIDIVQ = /3"]
DIV3 = 0x02 , # [doc = "PLLSAIDIVQ = /4"]
DIV4 = 0x03 , # [doc = "PLLSAIDIVQ = /5"]
DIV5 = 0x04 , # [doc = "PLLSAIDIVQ = /6"]
DIV6 = 0x05 , # [doc = "PLLSAIDIVQ = /7"]
DIV7 = 0x06 , # [doc = "PLLSAIDIVQ = /8"]
DIV8 = 0x07 , # [doc = "PLLSAIDIVQ = /9"]
DIV9 = 0x08 , # [doc = "PLLSAIDIVQ = /10"]
DIV10 = 0x09 , # [doc = "PLLSAIDIVQ = /11"]
DIV11 = 0x0a , # [doc = "PLLSAIDIVQ = /12"]
DIV12 = 0x0b , # [doc = "PLLSAIDIVQ = /13"]
DIV13 = 0x0c , # [doc = "PLLSAIDIVQ = /14"]
DIV14 = 0x0d , # [doc = "PLLSAIDIVQ = /15"]
DIV15 = 0x0e , # [doc = "PLLSAIDIVQ = /16"]
DIV16 = 0x0f , # [doc = "PLLSAIDIVQ = /17"]
DIV17 = 0x10 , # [doc = "PLLSAIDIVQ = /18"]
DIV18 = 0x11 , # [doc = "PLLSAIDIVQ = /19"]
DIV19 = 0x12 , # [doc = "PLLSAIDIVQ = /20"]
DIV20 = 0x13 , # [doc = "PLLSAIDIVQ = /21"]
DIV21 = 0x14 , # [doc = "PLLSAIDIVQ = /22"]
DIV22 = 0x15 , # [doc = "PLLSAIDIVQ = /23"]
DIV23 = 0x16 , # [doc = "PLLSAIDIVQ = /24"]
DIV24 = 0x17 , # [doc = "PLLSAIDIVQ = /25"]
DIV25 = 0x18 , # [doc = "PLLSAIDIVQ = /26"]
DIV26 = 0x19 , # [doc = "PLLSAIDIVQ = /27"]
DIV27 = 0x1a , # [doc = "PLLSAIDIVQ = /28"]
DIV28 = 0x1b , # [doc = "PLLSAIDIVQ = /29"]
DIV29 = 0x1c , # [doc = "PLLSAIDIVQ = /30"]
DIV30 = 0x1d , # [doc = "PLLSAIDIVQ = /31"]
DIV31 = 0x1e , # [doc = "PLLSAIDIVQ = /32"]
DIV32 = 0x1f , } impl Plldivr { # [inline (always)]
pub const fn from_bits (val : u8) -> Plldivr { unsafe { core :: mem :: transmute (val & 0x1f) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Plldivr { # [inline (always)]
fn from (val : u8) -> Plldivr { Plldivr :: from_bits (val) } } impl From < Plldivr > for u8 { # [inline (always)]
fn from (val : Plldivr) -> u8 { Plldivr :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Plli2sdivq { # [doc = "PLLI2SDIVQ = /1"]
DIV1 = 0x0 , # [doc = "PLLI2SDIVQ = /2"]
DIV2 = 0x01 , # [doc = "PLLI2SDIVQ = /3"]
DIV3 = 0x02 , # [doc = "PLLI2SDIVQ = /4"]
DIV4 = 0x03 , # [doc = "PLLI2SDIVQ = /5"]
DIV5 = 0x04 , # [doc = "PLLI2SDIVQ = /6"]
DIV6 = 0x05 , # [doc = "PLLI2SDIVQ = /7"]
DIV7 = 0x06 , # [doc = "PLLI2SDIVQ = /8"]
DIV8 = 0x07 , # [doc = "PLLI2SDIVQ = /9"]
DIV9 = 0x08 , # [doc = "PLLI2SDIVQ = /10"]
DIV10 = 0x09 , # [doc = "PLLI2SDIVQ = /11"]
DIV11 = 0x0a , # [doc = "PLLI2SDIVQ = /12"]
DIV12 = 0x0b , # [doc = "PLLI2SDIVQ = /13"]
DIV13 = 0x0c , # [doc = "PLLI2SDIVQ = /14"]
DIV14 = 0x0d , # [doc = "PLLI2SDIVQ = /15"]
DIV15 = 0x0e , # [doc = "PLLI2SDIVQ = /16"]
DIV16 = 0x0f , # [doc = "PLLI2SDIVQ = /17"]
DIV17 = 0x10 , # [doc = "PLLI2SDIVQ = /18"]
DIV18 = 0x11 , # [doc = "PLLI2SDIVQ = /19"]
DIV19 = 0x12 , # [doc = "PLLI2SDIVQ = /20"]
DIV20 = 0x13 , # [doc = "PLLI2SDIVQ = /21"]
DIV21 = 0x14 , # [doc = "PLLI2SDIVQ = /22"]
DIV22 = 0x15 , # [doc = "PLLI2SDIVQ = /23"]
DIV23 = 0x16 , # [doc = "PLLI2SDIVQ = /24"]
DIV24 = 0x17 , # [doc = "PLLI2SDIVQ = /25"]
DIV25 = 0x18 , # [doc = "PLLI2SDIVQ = /26"]
DIV26 = 0x19 , # [doc = "PLLI2SDIVQ = /27"]
DIV27 = 0x1a , # [doc = "PLLI2SDIVQ = /28"]
DIV28 = 0x1b , # [doc = "PLLI2SDIVQ = /29"]
DIV29 = 0x1c , # [doc = "PLLI2SDIVQ = /30"]
DIV30 = 0x1d , # [doc = "PLLI2SDIVQ = /31"]
DIV31 = 0x1e , # [doc = "PLLI2SDIVQ = /32"]
DIV32 = 0x1f , } impl Plli2sdivq { # [inline (always)]
pub const fn from_bits (val : u8) -> Plli2sdivq { unsafe { core :: mem :: transmute (val & 0x1f) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Plli2sdivq { # [inline (always)]
fn from (val : u8) -> Plli2sdivq { Plli2sdivq :: from_bits (val) } } impl From < Plli2sdivq > for u8 { # [inline (always)]
fn from (val : Plli2sdivq) -> u8 { Plli2sdivq :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Plli2sdivr { # [doc = "PLLI2SDIVQ = /1"]
DIV1 = 0x0 , # [doc = "PLLI2SDIVQ = /2"]
DIV2 = 0x01 , # [doc = "PLLI2SDIVQ = /3"]
DIV3 = 0x02 , # [doc = "PLLI2SDIVQ = /4"]
DIV4 = 0x03 , # [doc = "PLLI2SDIVQ = /5"]
DIV5 = 0x04 , # [doc = "PLLI2SDIVQ = /6"]
DIV6 = 0x05 , # [doc = "PLLI2SDIVQ = /7"]
DIV7 = 0x06 , # [doc = "PLLI2SDIVQ = /8"]
DIV8 = 0x07 , # [doc = "PLLI2SDIVQ = /9"]
DIV9 = 0x08 , # [doc = "PLLI2SDIVQ = /10"]
DIV10 = 0x09 , # [doc = "PLLI2SDIVQ = /11"]
DIV11 = 0x0a , # [doc = "PLLI2SDIVQ = /12"]
DIV12 = 0x0b , # [doc = "PLLI2SDIVQ = /13"]
DIV13 = 0x0c , # [doc = "PLLI2SDIVQ = /14"]
DIV14 = 0x0d , # [doc = "PLLI2SDIVQ = /15"]
DIV15 = 0x0e , # [doc = "PLLI2SDIVQ = /16"]
DIV16 = 0x0f , # [doc = "PLLI2SDIVQ = /17"]
DIV17 = 0x10 , # [doc = "PLLI2SDIVQ = /18"]
DIV18 = 0x11 , # [doc = "PLLI2SDIVQ = /19"]
DIV19 = 0x12 , # [doc = "PLLI2SDIVQ = /20"]
DIV20 = 0x13 , # [doc = "PLLI2SDIVQ = /21"]
DIV21 = 0x14 , # [doc = "PLLI2SDIVQ = /22"]
DIV22 = 0x15 , # [doc = "PLLI2SDIVQ = /23"]
DIV23 = 0x16 , # [doc = "PLLI2SDIVQ = /24"]
DIV24 = 0x17 , # [doc = "PLLI2SDIVQ = /25"]
DIV25 = 0x18 , # [doc = "PLLI2SDIVQ = /26"]
DIV26 = 0x19 , # [doc = "PLLI2SDIVQ = /27"]
DIV27 = 0x1a , # [doc = "PLLI2SDIVQ = /28"]
DIV28 = 0x1b , # [doc = "PLLI2SDIVQ = /29"]
DIV29 = 0x1c , # [doc = "PLLI2SDIVQ = /30"]
DIV30 = 0x1d , # [doc = "PLLI2SDIVQ = /31"]
DIV31 = 0x1e , # [doc = "PLLI2SDIVQ = /32"]
DIV32 = 0x1f , } impl Plli2sdivr { # [inline (always)]
pub const fn from_bits (val : u8) -> Plli2sdivr { unsafe { core :: mem :: transmute (val & 0x1f) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Plli2sdivr { # [inline (always)]
fn from (val : u8) -> Plli2sdivr { Plli2sdivr :: from_bits (val) } } impl From < Plli2sdivr > for u8 { # [inline (always)]
fn from (val : Plli2sdivr) -> u8 { Plli2sdivr :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Plli2ssrc { # [doc = "HSE or HSI depending on PLLSRC of PLLCFGR"]
HSE_HSI = 0x0 , # [doc = "External AFI clock (CK_PLLI2S_EXT) selected as PLL clock entry"]
EXTERNAL = 0x01 , } impl Plli2ssrc { # [inline (always)]
pub const fn from_bits (val : u8) -> Plli2ssrc { unsafe { core :: mem :: transmute (val & 0x01) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Plli2ssrc { # [inline (always)]
fn from (val : u8) -> Plli2ssrc { Plli2ssrc :: from_bits (val) } } impl From < Plli2ssrc > for u8 { # [inline (always)]
fn from (val : Plli2ssrc) -> u8 { Plli2ssrc :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Pllm { _RESERVED_0 = 0x0 , _RESERVED_1 = 0x01 , DIV2 = 0x02 , DIV3 = 0x03 , DIV4 = 0x04 , DIV5 = 0x05 , DIV6 = 0x06 , DIV7 = 0x07 , DIV8 = 0x08 , DIV9 = 0x09 , DIV10 = 0x0a , DIV11 = 0x0b , DIV12 = 0x0c , DIV13 = 0x0d , DIV14 = 0x0e , DIV15 = 0x0f , DIV16 = 0x10 , DIV17 = 0x11 , DIV18 = 0x12 , DIV19 = 0x13 , DIV20 = 0x14 , DIV21 = 0x15 , DIV22 = 0x16 , DIV23 = 0x17 , DIV24 = 0x18 , DIV25 = 0x19 , DIV26 = 0x1a , DIV27 = 0x1b , DIV28 = 0x1c , DIV29 = 0x1d , DIV30 = 0x1e , DIV31 = 0x1f , DIV32 = 0x20 , DIV33 = 0x21 , DIV34 = 0x22 , DIV35 = 0x23 , DIV36 = 0x24 , DIV37 = 0x25 , DIV38 = 0x26 , DIV39 = 0x27 , DIV40 = 0x28 , DIV41 = 0x29 , DIV42 = 0x2a , DIV43 = 0x2b , DIV44 = 0x2c , DIV45 = 0x2d , DIV46 = 0x2e , DIV47 = 0x2f , DIV48 = 0x30 , DIV49 = 0x31 , DIV50 = 0x32 , DIV51 = 0x33 , DIV52 = 0x34 , DIV53 = 0x35 , DIV54 = 0x36 , DIV55 = 0x37 , DIV56 = 0x38 , DIV57 = 0x39 , DIV58 = 0x3a , DIV59 = 0x3b , DIV60 = 0x3c , DIV61 = 0x3d , DIV62 = 0x3e , DIV63 = 0x3f , } impl Pllm { # [inline (always)]
pub const fn from_bits (val : u8) -> Pllm { unsafe { core :: mem :: transmute (val & 0x3f) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Pllm { # [inline (always)]
fn from (val : u8) -> Pllm { Pllm :: from_bits (val) } } impl From < Pllm > for u8 { # [inline (always)]
fn from (val : Pllm) -> u8 { Pllm :: to_bits (val) } } # [repr (transparent)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub struct Plln (pub u16) ; impl Plln { pub const MUL50 : Self = Self (0x32) ; pub const MUL51 : Self = Self (0x33) ; pub const MUL52 : Self = Self (0x34) ; pub const MUL53 : Self = Self (0x35) ; pub const MUL54 : Self = Self (0x36) ; pub const MUL55 : Self = Self (0x37) ; pub const MUL56 : Self = Self (0x38) ; pub const MUL57 : Self = Self (0x39) ; pub const MUL58 : Self = Self (0x3a) ; pub const MUL59 : Self = Self (0x3b) ; pub const MUL60 : Self = Self (0x3c) ; pub const MUL61 : Self = Self (0x3d) ; pub const MUL62 : Self = Self (0x3e) ; pub const MUL63 : Self = Self (0x3f) ; pub const MUL64 : Self = Self (0x40) ; pub const MUL65 : Self = Self (0x41) ; pub const MUL66 : Self = Self (0x42) ; pub const MUL67 : Self = Self (0x43) ; pub const MUL68 : Self = Self (0x44) ; pub const MUL69 : Self = Self (0x45) ; pub const MUL70 : Self = Self (0x46) ; pub const MUL71 : Self = Self (0x47) ; pub const MUL72 : Self = Self (0x48) ; pub const MUL73 : Self = Self (0x49) ; pub const MUL74 : Self = Self (0x4a) ; pub const MUL75 : Self = Self (0x4b) ; pub const MUL76 : Self = Self (0x4c) ; pub const MUL77 : Self = Self (0x4d) ; pub const MUL78 : Self = Self (0x4e) ; pub const MUL79 : Self = Self (0x4f) ; pub const MUL80 : Self = Self (0x50) ; pub const MUL81 : Self = Self (0x51) ; pub const MUL82 : Self = Self (0x52) ; pub const MUL83 : Self = Self (0x53) ; pub const MUL84 : Self = Self (0x54) ; pub const MUL85 : Self = Self (0x55) ; pub const MUL86 : Self = Self (0x56) ; pub const MUL87 : Self = Self (0x57) ; pub const MUL88 : Self = Self (0x58) ; pub const MUL89 : Self = Self (0x59) ; pub const MUL90 : Self = Self (0x5a) ; pub const MUL91 : Self = Self (0x5b) ; pub const MUL92 : Self = Self (0x5c) ; pub const MUL93 : Self = Self (0x5d) ; pub const MUL94 : Self = Self (0x5e) ; pub const MUL95 : Self = Self (0x5f) ; pub const MUL96 : Self = Self (0x60) ; pub const MUL97 : Self = Self (0x61) ; pub const MUL98 : Self = Self (0x62) ; pub const MUL99 : Self = Self (0x63) ; pub const MUL100 : Self = Self (0x64) ; pub const MUL101 : Self = Self (0x65) ; pub const MUL102 : Self = Self (0x66) ; pub const MUL103 : Self = Self (0x67) ; pub const MUL104 : Self = Self (0x68) ; pub const MUL105 : Self = Self (0x69) ; pub const MUL106 : Self = Self (0x6a) ; pub const MUL107 : Self = Self (0x6b) ; pub const MUL108 : Self = Self (0x6c) ; pub const MUL109 : Self = Self (0x6d) ; pub const MUL110 : Self = Self (0x6e) ; pub const MUL111 : Self = Self (0x6f) ; pub const MUL112 : Self = Self (0x70) ; pub const MUL113 : Self = Self (0x71) ; pub const MUL114 : Self = Self (0x72) ; pub const MUL115 : Self = Self (0x73) ; pub const MUL116 : Self = Self (0x74) ; pub const MUL117 : Self = Self (0x75) ; pub const MUL118 : Self = Self (0x76) ; pub const MUL119 : Self = Self (0x77) ; pub const MUL120 : Self = Self (0x78) ; pub const MUL121 : Self = Self (0x79) ; pub const MUL122 : Self = Self (0x7a) ; pub const MUL123 : Self = Self (0x7b) ; pub const MUL124 : Self = Self (0x7c) ; pub const MUL125 : Self = Self (0x7d) ; pub const MUL126 : Self = Self (0x7e) ; pub const MUL127 : Self = Self (0x7f) ; pub const MUL128 : Self = Self (0x80) ; pub const MUL129 : Self = Self (0x81) ; pub const MUL130 : Self = Self (0x82) ; pub const MUL131 : Self = Self (0x83) ; pub const MUL132 : Self = Self (0x84) ; pub const MUL133 : Self = Self (0x85) ; pub const MUL134 : Self = Self (0x86) ; pub const MUL135 : Self = Self (0x87) ; pub const MUL136 : Self = Self (0x88) ; pub const MUL137 : Self = Self (0x89) ; pub const MUL138 : Self = Self (0x8a) ; pub const MUL139 : Self = Self (0x8b) ; pub const MUL140 : Self = Self (0x8c) ; pub const MUL141 : Self = Self (0x8d) ; pub const MUL142 : Self = Self (0x8e) ; pub const MUL143 : Self = Self (0x8f) ; pub const MUL144 : Self = Self (0x90) ; pub const MUL145 : Self = Self (0x91) ; pub const MUL146 : Self = Self (0x92) ; pub const MUL147 : Self = Self (0x93) ; pub const MUL148 : Self = Self (0x94) ; pub const MUL149 : Self = Self (0x95) ; pub const MUL150 : Self = Self (0x96) ; pub const MUL151 : Self = Self (0x97) ; pub const MUL152 : Self = Self (0x98) ; pub const MUL153 : Self = Self (0x99) ; pub const MUL154 : Self = Self (0x9a) ; pub const MUL155 : Self = Self (0x9b) ; pub const MUL156 : Self = Self (0x9c) ; pub const MUL157 : Self = Self (0x9d) ; pub const MUL158 : Self = Self (0x9e) ; pub const MUL159 : Self = Self (0x9f) ; pub const MUL160 : Self = Self (0xa0) ; pub const MUL161 : Self = Self (0xa1) ; pub const MUL162 : Self = Self (0xa2) ; pub const MUL163 : Self = Self (0xa3) ; pub const MUL164 : Self = Self (0xa4) ; pub const MUL165 : Self = Self (0xa5) ; pub const MUL166 : Self = Self (0xa6) ; pub const MUL167 : Self = Self (0xa7) ; pub const MUL168 : Self = Self (0xa8) ; pub const MUL169 : Self = Self (0xa9) ; pub const MUL170 : Self = Self (0xaa) ; pub const MUL171 : Self = Self (0xab) ; pub const MUL172 : Self = Self (0xac) ; pub const MUL173 : Self = Self (0xad) ; pub const MUL174 : Self = Self (0xae) ; pub const MUL175 : Self = Self (0xaf) ; pub const MUL176 : Self = Self (0xb0) ; pub const MUL177 : Self = Self (0xb1) ; pub const MUL178 : Self = Self (0xb2) ; pub const MUL179 : Self = Self (0xb3) ; pub const MUL180 : Self = Self (0xb4) ; pub const MUL181 : Self = Self (0xb5) ; pub const MUL182 : Self = Self (0xb6) ; pub const MUL183 : Self = Self (0xb7) ; pub const MUL184 : Self = Self (0xb8) ; pub const MUL185 : Self = Self (0xb9) ; pub const MUL186 : Self = Self (0xba) ; pub const MUL187 : Self = Self (0xbb) ; pub const MUL188 : Self = Self (0xbc) ; pub const MUL189 : Self = Self (0xbd) ; pub const MUL190 : Self = Self (0xbe) ; pub const MUL191 : Self = Self (0xbf) ; pub const MUL192 : Self = Self (0xc0) ; pub const MUL193 : Self = Self (0xc1) ; pub const MUL194 : Self = Self (0xc2) ; pub const MUL195 : Self = Self (0xc3) ; pub const MUL196 : Self = Self (0xc4) ; pub const MUL197 : Self = Self (0xc5) ; pub const MUL198 : Self = Self (0xc6) ; pub const MUL199 : Self = Self (0xc7) ; pub const MUL200 : Self = Self (0xc8) ; pub const MUL201 : Self = Self (0xc9) ; pub const MUL202 : Self = Self (0xca) ; pub const MUL203 : Self = Self (0xcb) ; pub const MUL204 : Self = Self (0xcc) ; pub const MUL205 : Self = Self (0xcd) ; pub const MUL206 : Self = Self (0xce) ; pub const MUL207 : Self = Self (0xcf) ; pub const MUL208 : Self = Self (0xd0) ; pub const MUL209 : Self = Self (0xd1) ; pub const MUL210 : Self = Self (0xd2) ; pub const MUL211 : Self = Self (0xd3) ; pub const MUL212 : Self = Self (0xd4) ; pub const MUL213 : Self = Self (0xd5) ; pub const MUL214 : Self = Self (0xd6) ; pub const MUL215 : Self = Self (0xd7) ; pub const MUL216 : Self = Self (0xd8) ; pub const MUL217 : Self = Self (0xd9) ; pub const MUL218 : Self = Self (0xda) ; pub const MUL219 : Self = Self (0xdb) ; pub const MUL220 : Self = Self (0xdc) ; pub const MUL221 : Self = Self (0xdd) ; pub const MUL222 : Self = Self (0xde) ; pub const MUL223 : Self = Self (0xdf) ; pub const MUL224 : Self = Self (0xe0) ; pub const MUL225 : Self = Self (0xe1) ; pub const MUL226 : Self = Self (0xe2) ; pub const MUL227 : Self = Self (0xe3) ; pub const MUL228 : Self = Self (0xe4) ; pub const MUL229 : Self = Self (0xe5) ; pub const MUL230 : Self = Self (0xe6) ; pub const MUL231 : Self = Self (0xe7) ; pub const MUL232 : Self = Self (0xe8) ; pub const MUL233 : Self = Self (0xe9) ; pub const MUL234 : Self = Self (0xea) ; pub const MUL235 : Self = Self (0xeb) ; pub const MUL236 : Self = Self (0xec) ; pub const MUL237 : Self = Self (0xed) ; pub const MUL238 : Self = Self (0xee) ; pub const MUL239 : Self = Self (0xef) ; pub const MUL240 : Self = Self (0xf0) ; pub const MUL241 : Self = Self (0xf1) ; pub const MUL242 : Self = Self (0xf2) ; pub const MUL243 : Self = Self (0xf3) ; pub const MUL244 : Self = Self (0xf4) ; pub const MUL245 : Self = Self (0xf5) ; pub const MUL246 : Self = Self (0xf6) ; pub const MUL247 : Self = Self (0xf7) ; pub const MUL248 : Self = Self (0xf8) ; pub const MUL249 : Self = Self (0xf9) ; pub const MUL250 : Self = Self (0xfa) ; pub const MUL251 : Self = Self (0xfb) ; pub const MUL252 : Self = Self (0xfc) ; pub const MUL253 : Self = Self (0xfd) ; pub const MUL254 : Self = Self (0xfe) ; pub const MUL255 : Self = Self (0xff) ; pub const MUL256 : Self = Self (0x0100) ; pub const MUL257 : Self = Self (0x0101) ; pub const MUL258 : Self = Self (0x0102) ; pub const MUL259 : Self = Self (0x0103) ; pub const MUL260 : Self = Self (0x0104) ; pub const MUL261 : Self = Self (0x0105) ; pub const MUL262 : Self = Self (0x0106) ; pub const MUL263 : Self = Self (0x0107) ; pub const MUL264 : Self = Self (0x0108) ; pub const MUL265 : Self = Self (0x0109) ; pub const MUL266 : Self = Self (0x010a) ; pub const MUL267 : Self = Self (0x010b) ; pub const MUL268 : Self = Self (0x010c) ; pub const MUL269 : Self = Self (0x010d) ; pub const MUL270 : Self = Self (0x010e) ; pub const MUL271 : Self = Self (0x010f) ; pub const MUL272 : Self = Self (0x0110) ; pub const MUL273 : Self = Self (0x0111) ; pub const MUL274 : Self = Self (0x0112) ; pub const MUL275 : Self = Self (0x0113) ; pub const MUL276 : Self = Self (0x0114) ; pub const MUL277 : Self = Self (0x0115) ; pub const MUL278 : Self = Self (0x0116) ; pub const MUL279 : Self = Self (0x0117) ; pub const MUL280 : Self = Self (0x0118) ; pub const MUL281 : Self = Self (0x0119) ; pub const MUL282 : Self = Self (0x011a) ; pub const MUL283 : Self = Self (0x011b) ; pub const MUL284 : Self = Self (0x011c) ; pub const MUL285 : Self = Self (0x011d) ; pub const MUL286 : Self = Self (0x011e) ; pub const MUL287 : Self = Self (0x011f) ; pub const MUL288 : Self = Self (0x0120) ; pub const MUL289 : Self = Self (0x0121) ; pub const MUL290 : Self = Self (0x0122) ; pub const MUL291 : Self = Self (0x0123) ; pub const MUL292 : Self = Self (0x0124) ; pub const MUL293 : Self = Self (0x0125) ; pub const MUL294 : Self = Self (0x0126) ; pub const MUL295 : Self = Self (0x0127) ; pub const MUL296 : Self = Self (0x0128) ; pub const MUL297 : Self = Self (0x0129) ; pub const MUL298 : Self = Self (0x012a) ; pub const MUL299 : Self = Self (0x012b) ; pub const MUL300 : Self = Self (0x012c) ; pub const MUL301 : Self = Self (0x012d) ; pub const MUL302 : Self = Self (0x012e) ; pub const MUL303 : Self = Self (0x012f) ; pub const MUL304 : Self = Self (0x0130) ; pub const MUL305 : Self = Self (0x0131) ; pub const MUL306 : Self = Self (0x0132) ; pub const MUL307 : Self = Self (0x0133) ; pub const MUL308 : Self = Self (0x0134) ; pub const MUL309 : Self = Self (0x0135) ; pub const MUL310 : Self = Self (0x0136) ; pub const MUL311 : Self = Self (0x0137) ; pub const MUL312 : Self = Self (0x0138) ; pub const MUL313 : Self = Self (0x0139) ; pub const MUL314 : Self = Self (0x013a) ; pub const MUL315 : Self = Self (0x013b) ; pub const MUL316 : Self = Self (0x013c) ; pub const MUL317 : Self = Self (0x013d) ; pub const MUL318 : Self = Self (0x013e) ; pub const MUL319 : Self = Self (0x013f) ; pub const MUL320 : Self = Self (0x0140) ; pub const MUL321 : Self = Self (0x0141) ; pub const MUL322 : Self = Self (0x0142) ; pub const MUL323 : Self = Self (0x0143) ; pub const MUL324 : Self = Self (0x0144) ; pub const MUL325 : Self = Self (0x0145) ; pub const MUL326 : Self = Self (0x0146) ; pub const MUL327 : Self = Self (0x0147) ; pub const MUL328 : Self = Self (0x0148) ; pub const MUL329 : Self = Self (0x0149) ; pub const MUL330 : Self = Self (0x014a) ; pub const MUL331 : Self = Self (0x014b) ; pub const MUL332 : Self = Self (0x014c) ; pub const MUL333 : Self = Self (0x014d) ; pub const MUL334 : Self = Self (0x014e) ; pub const MUL335 : Self = Self (0x014f) ; pub const MUL336 : Self = Self (0x0150) ; pub const MUL337 : Self = Self (0x0151) ; pub const MUL338 : Self = Self (0x0152) ; pub const MUL339 : Self = Self (0x0153) ; pub const MUL340 : Self = Self (0x0154) ; pub const MUL341 : Self = Self (0x0155) ; pub const MUL342 : Self = Self (0x0156) ; pub const MUL343 : Self = Self (0x0157) ; pub const MUL344 : Self = Self (0x0158) ; pub const MUL345 : Self = Self (0x0159) ; pub const MUL346 : Self = Self (0x015a) ; pub const MUL347 : Self = Self (0x015b) ; pub const MUL348 : Self = Self (0x015c) ; pub const MUL349 : Self = Self (0x015d) ; pub const MUL350 : Self = Self (0x015e) ; pub const MUL351 : Self = Self (0x015f) ; pub const MUL352 : Self = Self (0x0160) ; pub const MUL353 : Self = Self (0x0161) ; pub const MUL354 : Self = Self (0x0162) ; pub const MUL355 : Self = Self (0x0163) ; pub const MUL356 : Self = Self (0x0164) ; pub const MUL357 : Self = Self (0x0165) ; pub const MUL358 : Self = Self (0x0166) ; pub const MUL359 : Self = Self (0x0167) ; pub const MUL360 : Self = Self (0x0168) ; pub const MUL361 : Self = Self (0x0169) ; pub const MUL362 : Self = Self (0x016a) ; pub const MUL363 : Self = Self (0x016b) ; pub const MUL364 : Self = Self (0x016c) ; pub const MUL365 : Self = Self (0x016d) ; pub const MUL366 : Self = Self (0x016e) ; pub const MUL367 : Self = Self (0x016f) ; pub const MUL368 : Self = Self (0x0170) ; pub const MUL369 : Self = Self (0x0171) ; pub const MUL370 : Self = Self (0x0172) ; pub const MUL371 : Self = Self (0x0173) ; pub const MUL372 : Self = Self (0x0174) ; pub const MUL373 : Self = Self (0x0175) ; pub const MUL374 : Self = Self (0x0176) ; pub const MUL375 : Self = Self (0x0177) ; pub const MUL376 : Self = Self (0x0178) ; pub const MUL377 : Self = Self (0x0179) ; pub const MUL378 : Self = Self (0x017a) ; pub const MUL379 : Self = Self (0x017b) ; pub const MUL380 : Self = Self (0x017c) ; pub const MUL381 : Self = Self (0x017d) ; pub const MUL382 : Self = Self (0x017e) ; pub const MUL383 : Self = Self (0x017f) ; pub const MUL384 : Self = Self (0x0180) ; pub const MUL385 : Self = Self (0x0181) ; pub const MUL386 : Self = Self (0x0182) ; pub const MUL387 : Self = Self (0x0183) ; pub const MUL388 : Self = Self (0x0184) ; pub const MUL389 : Self = Self (0x0185) ; pub const MUL390 : Self = Self (0x0186) ; pub const MUL391 : Self = Self (0x0187) ; pub const MUL392 : Self = Self (0x0188) ; pub const MUL393 : Self = Self (0x0189) ; pub const MUL394 : Self = Self (0x018a) ; pub const MUL395 : Self = Self (0x018b) ; pub const MUL396 : Self = Self (0x018c) ; pub const MUL397 : Self = Self (0x018d) ; pub const MUL398 : Self = Self (0x018e) ; pub const MUL399 : Self = Self (0x018f) ; pub const MUL400 : Self = Self (0x0190) ; pub const MUL401 : Self = Self (0x0191) ; pub const MUL402 : Self = Self (0x0192) ; pub const MUL403 : Self = Self (0x0193) ; pub const MUL404 : Self = Self (0x0194) ; pub const MUL405 : Self = Self (0x0195) ; pub const MUL406 : Self = Self (0x0196) ; pub const MUL407 : Self = Self (0x0197) ; pub const MUL408 : Self = Self (0x0198) ; pub const MUL409 : Self = Self (0x0199) ; pub const MUL410 : Self = Self (0x019a) ; pub const MUL411 : Self = Self (0x019b) ; pub const MUL412 : Self = Self (0x019c) ; pub const MUL413 : Self = Self (0x019d) ; pub const MUL414 : Self = Self (0x019e) ; pub const MUL415 : Self = Self (0x019f) ; pub const MUL416 : Self = Self (0x01a0) ; pub const MUL417 : Self = Self (0x01a1) ; pub const MUL418 : Self = Self (0x01a2) ; pub const MUL419 : Self = Self (0x01a3) ; pub const MUL420 : Self = Self (0x01a4) ; pub const MUL421 : Self = Self (0x01a5) ; pub const MUL422 : Self = Self (0x01a6) ; pub const MUL423 : Self = Self (0x01a7) ; pub const MUL424 : Self = Self (0x01a8) ; pub const MUL425 : Self = Self (0x01a9) ; pub const MUL426 : Self = Self (0x01aa) ; pub const MUL427 : Self = Self (0x01ab) ; pub const MUL428 : Self = Self (0x01ac) ; pub const MUL429 : Self = Self (0x01ad) ; pub const MUL430 : Self = Self (0x01ae) ; pub const MUL431 : Self = Self (0x01af) ; pub const MUL432 : Self = Self (0x01b0) ; } impl Plln { pub const fn from_bits (val : u16) -> Plln { Self (val & 0x01ff) } pub const fn to_bits (self) -> u16 { self . 0 } } impl From < u16 > for Plln { # [inline (always)]
fn from (val : u16) -> Plln { Plln :: from_bits (val) } } impl From < Plln > for u16 { # [inline (always)]
fn from (val : Plln) -> u16 { Plln :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Pllp { # [doc = "PLLP=2"]
DIV2 = 0x0 , # [doc = "PLLP=4"]
DIV4 = 0x01 , # [doc = "PLLP=6"]
DIV6 = 0x02 , # [doc = "PLLP=8"]
DIV8 = 0x03 , } impl Pllp { # [inline (always)]
pub const fn from_bits (val : u8) -> Pllp { unsafe { core :: mem :: transmute (val & 0x03) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Pllp { # [inline (always)]
fn from (val : u8) -> Pllp { Pllp :: from_bits (val) } } impl From < Pllp > for u8 { # [inline (always)]
fn from (val : Pllp) -> u8 { Pllp :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Pllq { _RESERVED_0 = 0x0 , _RESERVED_1 = 0x01 , DIV2 = 0x02 , DIV3 = 0x03 , DIV4 = 0x04 , DIV5 = 0x05 , DIV6 = 0x06 , DIV7 = 0x07 , DIV8 = 0x08 , DIV9 = 0x09 , DIV10 = 0x0a , DIV11 = 0x0b , DIV12 = 0x0c , DIV13 = 0x0d , DIV14 = 0x0e , DIV15 = 0x0f , } impl Pllq { # [inline (always)]
pub const fn from_bits (val : u8) -> Pllq { unsafe { core :: mem :: transmute (val & 0x0f) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Pllq { # [inline (always)]
fn from (val : u8) -> Pllq { Pllq :: from_bits (val) } } impl From < Pllq > for u8 { # [inline (always)]
fn from (val : Pllq) -> u8 { Pllq :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Pllr { _RESERVED_0 = 0x0 , _RESERVED_1 = 0x01 , DIV2 = 0x02 , DIV3 = 0x03 , DIV4 = 0x04 , DIV5 = 0x05 , DIV6 = 0x06 , DIV7 = 0x07 , } impl Pllr { # [inline (always)]
pub const fn from_bits (val : u8) -> Pllr { unsafe { core :: mem :: transmute (val & 0x07) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Pllr { # [inline (always)]
fn from (val : u8) -> Pllr { Pllr :: from_bits (val) } } impl From < Pllr > for u8 { # [inline (always)]
fn from (val : Pllr) -> u8 { Pllr :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Pllsaidivq { # [doc = "PLLSAIDIVQ = /1"]
DIV1 = 0x0 , # [doc = "PLLSAIDIVQ = /2"]
DIV2 = 0x01 , # [doc = "PLLSAIDIVQ = /3"]
DIV3 = 0x02 , # [doc = "PLLSAIDIVQ = /4"]
DIV4 = 0x03 , # [doc = "PLLSAIDIVQ = /5"]
DIV5 = 0x04 , # [doc = "PLLSAIDIVQ = /6"]
DIV6 = 0x05 , # [doc = "PLLSAIDIVQ = /7"]
DIV7 = 0x06 , # [doc = "PLLSAIDIVQ = /8"]
DIV8 = 0x07 , # [doc = "PLLSAIDIVQ = /9"]
DIV9 = 0x08 , # [doc = "PLLSAIDIVQ = /10"]
DIV10 = 0x09 , # [doc = "PLLSAIDIVQ = /11"]
DIV11 = 0x0a , # [doc = "PLLSAIDIVQ = /12"]
DIV12 = 0x0b , # [doc = "PLLSAIDIVQ = /13"]
DIV13 = 0x0c , # [doc = "PLLSAIDIVQ = /14"]
DIV14 = 0x0d , # [doc = "PLLSAIDIVQ = /15"]
DIV15 = 0x0e , # [doc = "PLLSAIDIVQ = /16"]
DIV16 = 0x0f , # [doc = "PLLSAIDIVQ = /17"]
DIV17 = 0x10 , # [doc = "PLLSAIDIVQ = /18"]
DIV18 = 0x11 , # [doc = "PLLSAIDIVQ = /19"]
DIV19 = 0x12 , # [doc = "PLLSAIDIVQ = /20"]
DIV20 = 0x13 , # [doc = "PLLSAIDIVQ = /21"]
DIV21 = 0x14 , # [doc = "PLLSAIDIVQ = /22"]
DIV22 = 0x15 , # [doc = "PLLSAIDIVQ = /23"]
DIV23 = 0x16 , # [doc = "PLLSAIDIVQ = /24"]
DIV24 = 0x17 , # [doc = "PLLSAIDIVQ = /25"]
DIV25 = 0x18 , # [doc = "PLLSAIDIVQ = /26"]
DIV26 = 0x19 , # [doc = "PLLSAIDIVQ = /27"]
DIV27 = 0x1a , # [doc = "PLLSAIDIVQ = /28"]
DIV28 = 0x1b , # [doc = "PLLSAIDIVQ = /29"]
DIV29 = 0x1c , # [doc = "PLLSAIDIVQ = /30"]
DIV30 = 0x1d , # [doc = "PLLSAIDIVQ = /31"]
DIV31 = 0x1e , # [doc = "PLLSAIDIVQ = /32"]
DIV32 = 0x1f , } impl Pllsaidivq { # [inline (always)]
pub const fn from_bits (val : u8) -> Pllsaidivq { unsafe { core :: mem :: transmute (val & 0x1f) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Pllsaidivq { # [inline (always)]
fn from (val : u8) -> Pllsaidivq { Pllsaidivq :: from_bits (val) } } impl From < Pllsaidivq > for u8 { # [inline (always)]
fn from (val : Pllsaidivq) -> u8 { Pllsaidivq :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Pllsaidivr { # [doc = "PLLSAIDIVR = /2"]
DIV2 = 0x0 , # [doc = "PLLSAIDIVR = /4"]
DIV4 = 0x01 , # [doc = "PLLSAIDIVR = /8"]
DIV8 = 0x02 , # [doc = "PLLSAIDIVR = /16"]
DIV16 = 0x03 , } impl Pllsaidivr { # [inline (always)]
pub const fn from_bits (val : u8) -> Pllsaidivr { unsafe { core :: mem :: transmute (val & 0x03) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Pllsaidivr { # [inline (always)]
fn from (val : u8) -> Pllsaidivr { Pllsaidivr :: from_bits (val) } } impl From < Pllsaidivr > for u8 { # [inline (always)]
fn from (val : Pllsaidivr) -> u8 { Pllsaidivr :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Pllsrc { # [doc = "HSI clock selected as PLL and PLLI2S clock entry"]
HSI = 0x0 , # [doc = "HSE oscillator clock selected as PLL and PLLI2S clock entry"]
HSE = 0x01 , } impl Pllsrc { # [inline (always)]
pub const fn from_bits (val : u8) -> Pllsrc { unsafe { core :: mem :: transmute (val & 0x01) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Pllsrc { # [inline (always)]
fn from (val : u8) -> Pllsrc { Pllsrc :: from_bits (val) } } impl From < Pllsrc > for u8 { # [inline (always)]
fn from (val : Pllsrc) -> u8 { Pllsrc :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Ppre { # [doc = "HCLK not divided"]
DIV1 = 0x0 , _RESERVED_1 = 0x01 , _RESERVED_2 = 0x02 , _RESERVED_3 = 0x03 , # [doc = "HCLK divided by 2"]
DIV2 = 0x04 , # [doc = "HCLK divided by 4"]
DIV4 = 0x05 , # [doc = "HCLK divided by 8"]
DIV8 = 0x06 , # [doc = "HCLK divided by 16"]
DIV16 = 0x07 , } impl Ppre { # [inline (always)]
pub const fn from_bits (val : u8) -> Ppre { unsafe { core :: mem :: transmute (val & 0x07) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Ppre { # [inline (always)]
fn from (val : u8) -> Ppre { Ppre :: from_bits (val) } } impl From < Ppre > for u8 { # [inline (always)]
fn from (val : Ppre) -> u8 { Ppre :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Rtcsel { # [doc = "No clock"]
DISABLE = 0x0 , # [doc = "LSE oscillator clock used as RTC clock"]
LSE = 0x01 , # [doc = "LSI oscillator clock used as RTC clock"]
LSI = 0x02 , # [doc = "HSE oscillator clock divided by a prescaler used as RTC clock"]
HSE = 0x03 , } impl Rtcsel { # [inline (always)]
pub const fn from_bits (val : u8) -> Rtcsel { unsafe { core :: mem :: transmute (val & 0x03) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Rtcsel { # [inline (always)]
fn from (val : u8) -> Rtcsel { Rtcsel :: from_bits (val) } } impl From < Rtcsel > for u8 { # [inline (always)]
fn from (val : Rtcsel) -> u8 { Rtcsel :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Sai1src { # [doc = "SAI1 clock frequency = f(PLLSAI_Q) / PLLSAIDIVQ"]
PLLSAI = 0x0 , # [doc = "SAI1 clock frequency = f(PLLI2S_Q) / PLLI2SDIVQ"]
PLLI2S = 0x01 , # [doc = "SAI1 clock frequency = f(PLL_R)"]
PLLR = 0x02 , # [doc = "I2S_CKIN Alternate function input frequency"]
I2S_CKIN = 0x03 , } impl Sai1src { # [inline (always)]
pub const fn from_bits (val : u8) -> Sai1src { unsafe { core :: mem :: transmute (val & 0x03) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Sai1src { # [inline (always)]
fn from (val : u8) -> Sai1src { Sai1src :: from_bits (val) } } impl From < Sai1src > for u8 { # [inline (always)]
fn from (val : Sai1src) -> u8 { Sai1src :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Sai2src { # [doc = "SAI2 clock frequency = f(PLLSAI_Q) / PLLSAIDIVQ"]
PLLSAI = 0x0 , # [doc = "SAI2 clock frequency = f(PLLI2S_Q) / PLLI2SDIVQ"]
PLLI2S = 0x01 , # [doc = "SAI2 clock frequency = f(PLL_R)"]
PLLR = 0x02 , # [doc = "SAI2 clock frequency = Alternate function input frequency"]
HSI_HSE = 0x03 , } impl Sai2src { # [inline (always)]
pub const fn from_bits (val : u8) -> Sai2src { unsafe { core :: mem :: transmute (val & 0x03) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Sai2src { # [inline (always)]
fn from (val : u8) -> Sai2src { Sai2src :: from_bits (val) } } impl From < Sai2src > for u8 { # [inline (always)]
fn from (val : Sai2src) -> u8 { Sai2src :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Saiasrc { # [doc = "SAI1-A clock frequency = f(PLLSAI_Q) / PLLSAIDIVQ"]
PLLSAI = 0x0 , # [doc = "SAI1-A clock frequency = f(PLLI2S_Q) / PLLI2SDIVQ"]
PLLI2S = 0x01 , # [doc = "SAI1-A clock frequency = Alternate function input frequency"]
I2S_CKIN = 0x02 , _RESERVED_3 = 0x03 , } impl Saiasrc { # [inline (always)]
pub const fn from_bits (val : u8) -> Saiasrc { unsafe { core :: mem :: transmute (val & 0x03) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Saiasrc { # [inline (always)]
fn from (val : u8) -> Saiasrc { Saiasrc :: from_bits (val) } } impl From < Saiasrc > for u8 { # [inline (always)]
fn from (val : Saiasrc) -> u8 { Saiasrc :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Saibsrc { # [doc = "SAI1-B clock frequency = f(PLLSAI_Q) / PLLSAIDIVQ"]
PLLSAI = 0x0 , # [doc = "SAI1-B clock frequency = f(PLLI2S_Q) / PLLI2SDIVQ"]
PLLI2S = 0x01 , # [doc = "SAI1-B clock frequency = Alternate function input frequency"]
I2S_CKIN = 0x02 , _RESERVED_3 = 0x03 , } impl Saibsrc { # [inline (always)]
pub const fn from_bits (val : u8) -> Saibsrc { unsafe { core :: mem :: transmute (val & 0x03) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Saibsrc { # [inline (always)]
fn from (val : u8) -> Saibsrc { Saibsrc :: from_bits (val) } } impl From < Saibsrc > for u8 { # [inline (always)]
fn from (val : Saibsrc) -> u8 { Saibsrc :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Sdiosel { # [doc = "48 MHz clock is selected as SD clock"]
CLK48 = 0x0 , # [doc = "System clock is selected as SD clock"]
SYS = 0x01 , } impl Sdiosel { # [inline (always)]
pub const fn from_bits (val : u8) -> Sdiosel { unsafe { core :: mem :: transmute (val & 0x01) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Sdiosel { # [inline (always)]
fn from (val : u8) -> Sdiosel { Sdiosel :: from_bits (val) } } impl From < Sdiosel > for u8 { # [inline (always)]
fn from (val : Sdiosel) -> u8 { Sdiosel :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Spdifrxsel { # [doc = "SPDIF-Rx clock from PLL is selected"]
PLL1_R = 0x0 , # [doc = "SPDIF-Rx clock from PLLI2S is selected"]
PLLI2S1_P = 0x01 , } impl Spdifrxsel { # [inline (always)]
pub const fn from_bits (val : u8) -> Spdifrxsel { unsafe { core :: mem :: transmute (val & 0x01) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Spdifrxsel { # [inline (always)]
fn from (val : u8) -> Spdifrxsel { Spdifrxsel :: from_bits (val) } } impl From < Spdifrxsel > for u8 { # [inline (always)]
fn from (val : Spdifrxsel) -> u8 { Spdifrxsel :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Spreadsel { # [doc = "Center spread"]
CENTER = 0x0 , # [doc = "Down spread"]
DOWN = 0x01 , } impl Spreadsel { # [inline (always)]
pub const fn from_bits (val : u8) -> Spreadsel { unsafe { core :: mem :: transmute (val & 0x01) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Spreadsel { # [inline (always)]
fn from (val : u8) -> Spreadsel { Spreadsel :: from_bits (val) } } impl From < Spreadsel > for u8 { # [inline (always)]
fn from (val : Spreadsel) -> u8 { Spreadsel :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Sw { # [doc = "HSI oscillator used as system clock"]
HSI = 0x0 , # [doc = "HSE oscillator used as system clock"]
HSE = 0x01 , # [doc = "PLL used as system clock"]
PLL1_P = 0x02 , _RESERVED_3 = 0x03 , } impl Sw { # [inline (always)]
pub const fn from_bits (val : u8) -> Sw { unsafe { core :: mem :: transmute (val & 0x03) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Sw { # [inline (always)]
fn from (val : u8) -> Sw { Sw :: from_bits (val) } } impl From < Sw > for u8 { # [inline (always)]
fn from (val : Sw) -> u8 { Sw :: to_bits (val) } } # [repr (u8)]
# [derive (Copy , Clone , Eq , PartialEq , Ord , PartialOrd)]
pub enum Timpre { # [doc = "If the APB prescaler is configured 1, TIMxCLK = PCLKx. Otherwise, TIMxCLK = 2xPCLKx"]
MUL2 = 0x0 , # [doc = "If the APB prescaler is configured 1, 2 or 4, TIMxCLK = HCLK. Otherwise, TIMxCLK = 4xPCLKx"]
MUL4 = 0x01 , } impl Timpre { # [inline (always)]
pub const fn from_bits (val : u8) -> Timpre { unsafe { core :: mem :: transmute (val & 0x01) } } # [inline (always)]
pub const fn to_bits (self) -> u8 { unsafe { core :: mem :: transmute (self) } } } impl From < u8 > for Timpre { # [inline (always)]
fn from (val : u8) -> Timpre { Timpre :: from_bits (val) } } impl From < Timpre > for u8 { # [inline (always)]
fn from (val : Timpre) -> u8 { Timpre :: to_bits (val) } } }