summaryrefslogtreecommitdiff
path: root/docs/Driver/html/group__can__interface__gr.html
blob: 797138c93116512510dee44830bf3b1023cb1320 (plain)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>CAN Interface</title>
<title>CMSIS-Driver: CAN Interface</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="printComponentTabs.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 46px;">
  <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">CMSIS-Driver
   &#160;<span id="projectnumber">Version 2.7.1</span>
   </div>
   <div id="projectbrief">Peripheral Interface for Middleware and Application Code</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
    <ul class="tablist">
      <script type="text/javascript">
		<!--
		writeComponentTabs.call(this);
		//-->
      </script>
	  </ul>
</div>
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li>
      <li><a href="modules.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__can__interface__gr.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">Content</a> &#124;
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">CAN Interface</div>  </div>
</div><!--header-->
<div class="contents">

<p>Driver API for CAN Bus Peripheral (Driver_CAN.h)  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Content</h2></td></tr>
<tr class="memitem:group__can__status__code__ctrls"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__status__code__ctrls.html">Status Error Codes</a></td></tr>
<tr class="memdesc:group__can__status__code__ctrls"><td class="mdescLeft">&#160;</td><td class="mdescRight">Status codes of the CAN driver. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__CAN__unit__events"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CAN__unit__events.html">CAN Unit Events</a></td></tr>
<tr class="memdesc:group__CAN__unit__events"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback unit events notified via <a class="el" href="group__can__interface__gr.html#ga38795d1ed135ce3bd87f31ef1596bccf">ARM_CAN_SignalUnitEvent</a>. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__CAN__events"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CAN__events.html">CAN Object Events</a></td></tr>
<tr class="memdesc:group__CAN__events"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback objects events notified via <a class="el" href="group__can__interface__gr.html#gabfcaeac9e2ca25936ba5a29f2d594e7e">ARM_CAN_SignalObjectEvent</a>. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__can__control"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__control.html">CAN Control Codes</a></td></tr>
<tr class="memdesc:group__can__control"><td class="mdescLeft">&#160;</td><td class="mdescRight">Codes to configure the CAN driver. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:structARM__DRIVER__CAN"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#structARM__DRIVER__CAN">ARM_DRIVER_CAN</a></td></tr>
<tr class="memdesc:structARM__DRIVER__CAN"><td class="mdescLeft">&#160;</td><td class="mdescRight">Access structure of the CAN Driver.  <a href="group__can__interface__gr.html#structARM__DRIVER__CAN">More...</a><br/></td></tr>
<tr class="separator:structARM__DRIVER__CAN"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structARM__CAN__CAPABILITIES"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#structARM__CAN__CAPABILITIES">ARM_CAN_CAPABILITIES</a></td></tr>
<tr class="memdesc:structARM__CAN__CAPABILITIES"><td class="mdescLeft">&#160;</td><td class="mdescRight">CAN Device Driver Capabilities.  <a href="group__can__interface__gr.html#structARM__CAN__CAPABILITIES">More...</a><br/></td></tr>
<tr class="separator:structARM__CAN__CAPABILITIES"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structARM__CAN__STATUS"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#structARM__CAN__STATUS">ARM_CAN_STATUS</a></td></tr>
<tr class="memdesc:structARM__CAN__STATUS"><td class="mdescLeft">&#160;</td><td class="mdescRight">CAN Status.  <a href="group__can__interface__gr.html#structARM__CAN__STATUS">More...</a><br/></td></tr>
<tr class="separator:structARM__CAN__STATUS"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structARM__CAN__MSG__INFO"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">ARM_CAN_MSG_INFO</a></td></tr>
<tr class="memdesc:structARM__CAN__MSG__INFO"><td class="mdescLeft">&#160;</td><td class="mdescRight">CAN Message Information.  <a href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">More...</a><br/></td></tr>
<tr class="separator:structARM__CAN__MSG__INFO"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structARM__CAN__OBJ__CAPABILITIES"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#structARM__CAN__OBJ__CAPABILITIES">ARM_CAN_OBJ_CAPABILITIES</a></td></tr>
<tr class="memdesc:structARM__CAN__OBJ__CAPABILITIES"><td class="mdescLeft">&#160;</td><td class="mdescRight">CAN Object Capabilities.  <a href="group__can__interface__gr.html#structARM__CAN__OBJ__CAPABILITIES">More...</a><br/></td></tr>
<tr class="separator:structARM__CAN__OBJ__CAPABILITIES"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:gaac07b9fdf614bf439414f5417aaa376e"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#gaac07b9fdf614bf439414f5417aaa376e">ARM_CAN_SignalUnitEvent_t</a> )(uint32_t event)</td></tr>
<tr class="memdesc:gaac07b9fdf614bf439414f5417aaa376e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__can__interface__gr.html#ga38795d1ed135ce3bd87f31ef1596bccf">ARM_CAN_SignalUnitEvent</a> : Signal CAN Unit Event.  <a href="#gaac07b9fdf614bf439414f5417aaa376e">More...</a><br/></td></tr>
<tr class="separator:gaac07b9fdf614bf439414f5417aaa376e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7ceceac3e9aa0981c5cacfab88efb4eb"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#ga7ceceac3e9aa0981c5cacfab88efb4eb">ARM_CAN_SignalObjectEvent_t</a> )(uint32_t obj_idx, uint32_t event)</td></tr>
<tr class="memdesc:ga7ceceac3e9aa0981c5cacfab88efb4eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__can__interface__gr.html#gabfcaeac9e2ca25936ba5a29f2d594e7e">ARM_CAN_SignalObjectEvent</a> : Signal CAN Object Event.  <a href="#ga7ceceac3e9aa0981c5cacfab88efb4eb">More...</a><br/></td></tr>
<tr class="separator:ga7ceceac3e9aa0981c5cacfab88efb4eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga4256d5b23ffcb27759a05f8e6b854f13"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#ga4256d5b23ffcb27759a05f8e6b854f13">ARM_CAN_GetVersion</a> (void)</td></tr>
<tr class="memdesc:ga4256d5b23ffcb27759a05f8e6b854f13"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get driver version.  <a href="#ga4256d5b23ffcb27759a05f8e6b854f13">More...</a><br/></td></tr>
<tr class="separator:ga4256d5b23ffcb27759a05f8e6b854f13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga35f21cabe1637b1be964024a8f77721c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__can__interface__gr.html#structARM__CAN__CAPABILITIES">ARM_CAN_CAPABILITIES</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#ga35f21cabe1637b1be964024a8f77721c">ARM_CAN_GetCapabilities</a> (void)</td></tr>
<tr class="memdesc:ga35f21cabe1637b1be964024a8f77721c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get driver capabilities.  <a href="#ga35f21cabe1637b1be964024a8f77721c">More...</a><br/></td></tr>
<tr class="separator:ga35f21cabe1637b1be964024a8f77721c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa72ceb25ba67e279d7432404632deb44"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#gaa72ceb25ba67e279d7432404632deb44">ARM_CAN_Initialize</a> (<a class="el" href="group__can__interface__gr.html#gaac07b9fdf614bf439414f5417aaa376e">ARM_CAN_SignalUnitEvent_t</a> cb_unit_event, <a class="el" href="group__can__interface__gr.html#ga7ceceac3e9aa0981c5cacfab88efb4eb">ARM_CAN_SignalObjectEvent_t</a> cb_object_event)</td></tr>
<tr class="memdesc:gaa72ceb25ba67e279d7432404632deb44"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize CAN interface and register signal (callback) functions.  <a href="#gaa72ceb25ba67e279d7432404632deb44">More...</a><br/></td></tr>
<tr class="separator:gaa72ceb25ba67e279d7432404632deb44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1e3e364b64f2ab277399e3279cce5ef8"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#ga1e3e364b64f2ab277399e3279cce5ef8">ARM_CAN_Uninitialize</a> (void)</td></tr>
<tr class="memdesc:ga1e3e364b64f2ab277399e3279cce5ef8"><td class="mdescLeft">&#160;</td><td class="mdescRight">De-initialize CAN interface.  <a href="#ga1e3e364b64f2ab277399e3279cce5ef8">More...</a><br/></td></tr>
<tr class="separator:ga1e3e364b64f2ab277399e3279cce5ef8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6f634f126ac97daef2f3115aa7bfed7c"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#ga6f634f126ac97daef2f3115aa7bfed7c">ARM_CAN_PowerControl</a> (<a class="el" href="group__common__drv__gr.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5">ARM_POWER_STATE</a> state)</td></tr>
<tr class="memdesc:ga6f634f126ac97daef2f3115aa7bfed7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Control CAN interface power.  <a href="#ga6f634f126ac97daef2f3115aa7bfed7c">More...</a><br/></td></tr>
<tr class="separator:ga6f634f126ac97daef2f3115aa7bfed7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1fe6cc207415de604975ae251e269361"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#ga1fe6cc207415de604975ae251e269361">ARM_CAN_GetClock</a> (void)</td></tr>
<tr class="memdesc:ga1fe6cc207415de604975ae251e269361"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve CAN base clock frequency.  <a href="#ga1fe6cc207415de604975ae251e269361">More...</a><br/></td></tr>
<tr class="separator:ga1fe6cc207415de604975ae251e269361"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga88bb27a8525503a250cca7a2c4a5d07a"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#ga88bb27a8525503a250cca7a2c4a5d07a">ARM_CAN_SetBitrate</a> (<a class="el" href="group__can__timeseg__ctrls.html#ga11c12020b81a63a73a8b53e96a7e3dea">ARM_CAN_BITRATE_SELECT</a> select, uint32_t bitrate, uint32_t bit_segments)</td></tr>
<tr class="memdesc:ga88bb27a8525503a250cca7a2c4a5d07a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set bitrate for CAN interface.  <a href="#ga88bb27a8525503a250cca7a2c4a5d07a">More...</a><br/></td></tr>
<tr class="separator:ga88bb27a8525503a250cca7a2c4a5d07a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga28226a6e223f9b95b4dafb7c2f48a855"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#ga28226a6e223f9b95b4dafb7c2f48a855">ARM_CAN_SetMode</a> (<a class="el" href="group__can__bus__mode__ctrls.html#gabbca99c46d478bcf822eee71cdf75dcd">ARM_CAN_MODE</a> mode)</td></tr>
<tr class="memdesc:ga28226a6e223f9b95b4dafb7c2f48a855"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set operating mode for CAN interface.  <a href="#ga28226a6e223f9b95b4dafb7c2f48a855">More...</a><br/></td></tr>
<tr class="separator:ga28226a6e223f9b95b4dafb7c2f48a855"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga45ab314f5121cf5a1b32d9adc600e0f7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__can__interface__gr.html#structARM__CAN__OBJ__CAPABILITIES">ARM_CAN_OBJ_CAPABILITIES</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#ga45ab314f5121cf5a1b32d9adc600e0f7">ARM_CAN_ObjectGetCapabilities</a> (uint32_t obj_idx)</td></tr>
<tr class="memdesc:ga45ab314f5121cf5a1b32d9adc600e0f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve capabilities of an object.  <a href="#ga45ab314f5121cf5a1b32d9adc600e0f7">More...</a><br/></td></tr>
<tr class="separator:ga45ab314f5121cf5a1b32d9adc600e0f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4f9bc7088704483388e14872c9d5385d"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#ga4f9bc7088704483388e14872c9d5385d">ARM_CAN_ObjectSetFilter</a> (uint32_t obj_idx, <a class="el" href="group__can__filter__operation__ctrls.html#gacb04d0f8b3969ee69362ff2b62941d75">ARM_CAN_FILTER_OPERATION</a> operation, uint32_t id, uint32_t arg)</td></tr>
<tr class="memdesc:ga4f9bc7088704483388e14872c9d5385d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add or remove filter for message reception.  <a href="#ga4f9bc7088704483388e14872c9d5385d">More...</a><br/></td></tr>
<tr class="separator:ga4f9bc7088704483388e14872c9d5385d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga00ec0715f6755a49dae5b60dca182630"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#ga00ec0715f6755a49dae5b60dca182630">ARM_CAN_ObjectConfigure</a> (uint32_t obj_idx, <a class="el" href="group__can__obj__config__ctrls.html#gaa9488554de0575bc821c9f65213c4cd0">ARM_CAN_OBJ_CONFIG</a> obj_cfg)</td></tr>
<tr class="memdesc:ga00ec0715f6755a49dae5b60dca182630"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure object.  <a href="#ga00ec0715f6755a49dae5b60dca182630">More...</a><br/></td></tr>
<tr class="separator:ga00ec0715f6755a49dae5b60dca182630"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0dcffd362b4093043442a030eaebbcfe"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#ga0dcffd362b4093043442a030eaebbcfe">ARM_CAN_MessageSend</a> (uint32_t obj_idx, <a class="el" href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">ARM_CAN_MSG_INFO</a> *msg_info, const uint8_t *data, uint8_t size)</td></tr>
<tr class="memdesc:ga0dcffd362b4093043442a030eaebbcfe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send message on CAN bus.  <a href="#ga0dcffd362b4093043442a030eaebbcfe">More...</a><br/></td></tr>
<tr class="separator:ga0dcffd362b4093043442a030eaebbcfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafc37084df5eab32f593c2744d35cf647"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#gafc37084df5eab32f593c2744d35cf647">ARM_CAN_MessageRead</a> (uint32_t obj_idx, <a class="el" href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">ARM_CAN_MSG_INFO</a> *msg_info, uint8_t *data, uint8_t size)</td></tr>
<tr class="memdesc:gafc37084df5eab32f593c2744d35cf647"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read message received on CAN bus.  <a href="#gafc37084df5eab32f593c2744d35cf647">More...</a><br/></td></tr>
<tr class="separator:gafc37084df5eab32f593c2744d35cf647"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8d9f0c5f03a8a81ab062b5aa57e5dea4"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#ga8d9f0c5f03a8a81ab062b5aa57e5dea4">ARM_CAN_Control</a> (uint32_t control, uint32_t arg)</td></tr>
<tr class="memdesc:ga8d9f0c5f03a8a81ab062b5aa57e5dea4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Control CAN interface.  <a href="#ga8d9f0c5f03a8a81ab062b5aa57e5dea4">More...</a><br/></td></tr>
<tr class="separator:ga8d9f0c5f03a8a81ab062b5aa57e5dea4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga676d6b567fc4ab3d44f5d7a50ec9419c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__can__interface__gr.html#structARM__CAN__STATUS">ARM_CAN_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#ga676d6b567fc4ab3d44f5d7a50ec9419c">ARM_CAN_GetStatus</a> (void)</td></tr>
<tr class="memdesc:ga676d6b567fc4ab3d44f5d7a50ec9419c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get CAN status.  <a href="#ga676d6b567fc4ab3d44f5d7a50ec9419c">More...</a><br/></td></tr>
<tr class="separator:ga676d6b567fc4ab3d44f5d7a50ec9419c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga38795d1ed135ce3bd87f31ef1596bccf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#ga38795d1ed135ce3bd87f31ef1596bccf">ARM_CAN_SignalUnitEvent</a> (uint32_t event)</td></tr>
<tr class="memdesc:ga38795d1ed135ce3bd87f31ef1596bccf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signal CAN unit event.  <a href="#ga38795d1ed135ce3bd87f31ef1596bccf">More...</a><br/></td></tr>
<tr class="separator:ga38795d1ed135ce3bd87f31ef1596bccf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabfcaeac9e2ca25936ba5a29f2d594e7e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#gabfcaeac9e2ca25936ba5a29f2d594e7e">ARM_CAN_SignalObjectEvent</a> (uint32_t obj_idx, uint32_t event)</td></tr>
<tr class="memdesc:gabfcaeac9e2ca25936ba5a29f2d594e7e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signal CAN object event.  <a href="#gabfcaeac9e2ca25936ba5a29f2d594e7e">More...</a><br/></td></tr>
<tr class="separator:gabfcaeac9e2ca25936ba5a29f2d594e7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>Driver API for CAN Bus Peripheral (Driver_CAN.h) </p>
<p>The <b>Controller Area Network</b> Interface Bus (CAN) implements a multi-master serial bus for connecting microcontrollers and devices, also known as nodes, to communicate with each other in applications without a host computer. CAN is a message-based protocol, designed originally for automotive applications, but meanwhile used also in many other surroundings. The complexity of the node can range from a simple I/O device up to an embedded computer with a CAN interface and sophisticated software. The node may also be a gateway allowing a standard computer to communicate over a USB or Ethernet port to the devices on a CAN network. Devices are connected to the bus through a host processor, a CAN controller, and a CAN transceiver.</p>
<p>The CAN Driver API allows to implement CAN Interfaces that conform to the <a href="http://www.bosch-semiconductors.com/" target="_blank">CAN specifications available from BOSCH</a>:</p>
<ul>
<li>CAN 2.0B: CAN Specification 2.0B (released Sep. 1991) which is now superseded by ISO 11898-1.</li>
<li>CAN FD: CAN with Flexible Data Rate introduced in 2012 (released April 17th, 2012).</li>
</ul>
<p>Wikipedia offers more information about the <a href="http://en.wikipedia.org/wiki/CAN_bus" target="_blank"><b>CAN Bus</b></a>.</p>
<p>CAN 2.0B** Every CAN CMSIS-Driver supports the CAN 2.0B standard</p>
<p>CAN 2.0B supports:</p>
<ul>
<li>message can contain up to 8 data bytes</li>
<li>bitrates of up to 1Mbits/s</li>
<li><a class="el" href="group__can__interface__gr.html#Remote_Frame">Remote Frame</a> requests</li>
</ul>
<p><a class="anchor" id="CAN_FD"></a><b>CAN FD</b></p>
<p>Support for CAN FD depends on the hardware. A CMSIS-Driver that supports CAN FD has the capability <a class="el" href="group__can__interface__gr.html#structARM__CAN__CAPABILITIES">ARM_CAN_CAPABILITIES</a> data field <b>fd_mode</b> = <span class="XML-Token">1</span>, which can be retrieved with the function <a class="el" href="group__can__interface__gr.html#ga35f21cabe1637b1be964024a8f77721c">ARM_CAN_GetCapabilities</a>.</p>
<p>CAN FD supports:</p>
<ul>
<li>message can contain up to 64 data bytes</li>
<li>faster data transfers with faster bitrate used during the data phase</li>
</ul>
<p>CAN FD does not support <a class="el" href="group__can__interface__gr.html#Remote_Frame">Remote Frame</a> requests.</p>
<p><b>Block Diagram</b></p>
<p>The CAN Driver API defines a <b>CAN</b> interface for middleware components. The CAN Driver supports multiple nodes, which are able to send and receive messages, but not simultaneously.</p>
<div class="image">
<img src="CAN_Node.png" alt="CAN_Node.png"/>
<div class="caption">
CAN Node Schematic</div></div>
 <h2>CAN API </h2>
<p>The following header files define the Application Programming Interface (API) for the CAN interface:</p>
<ul>
<li><b>Driver_CAN.h</b> : Driver API for CAN Bus Peripheral</li>
</ul>
<p>The driver implementation is a typical part of the Device Family Pack (DFP) that supports the peripherals of the microcontroller family.</p>
<p><b>Driver Functions</b></p>
<p>The driver functions are published in the access struct as explained in <a class="el" href="theoryOperation.html#DriverFunctions">Common Driver Functions</a></p>
<ul>
<li><a class="el" href="group__can__interface__gr.html#structARM__DRIVER__CAN">ARM_DRIVER_CAN</a> : access struct for CAN driver functions</li>
</ul>
<p><b>Example Code</b></p>
<p>The following example code shows the usage of the CAN interface.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;stdio.h&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;string.h&gt;</span></div>
<div class="line"><span class="preprocessor">#include &quot;cmsis_os.h&quot;</span></div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="Driver__CAN_8h.html">Driver_CAN.h</a>&quot;</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">// CAN Driver Controller selector</span></div>
<div class="line"><span class="preprocessor">#define  CAN_CONTROLLER         1       // CAN Controller number</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="preprocessor">#define _CAN_Driver_(n)         Driver_CAN##n</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#define  CAN_Driver_(n)        _CAN_Driver_(n)</span></div>
<div class="line"><span class="preprocessor"></span><span class="keyword">extern</span>   <a class="code" href="group__can__interface__gr.html#structARM__DRIVER__CAN">ARM_DRIVER_CAN</a>         CAN_Driver_(CAN_CONTROLLER);</div>
<div class="line"><span class="preprocessor">#define  ptrCAN               (&amp;CAN_Driver_(CAN_CONTROLLER))</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line">uint32_t                        rx_obj_idx  = 0xFFFFFFFFU;</div>
<div class="line">uint8_t                         rx_data[8];</div>
<div class="line"><a class="code" href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">ARM_CAN_MSG_INFO</a>                rx_msg_info;</div>
<div class="line">uint32_t                        tx_obj_idx  = 0xFFFFFFFFU;</div>
<div class="line">uint8_t                         tx_data[8];</div>
<div class="line"><a class="code" href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">ARM_CAN_MSG_INFO</a>                tx_msg_info;</div>
<div class="line"> </div>
<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> Error_Handler (<span class="keywordtype">void</span>) { <span class="keywordflow">while</span> (1); }</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> CAN_SignalUnitEvent (uint32_t event) {}</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> CAN_SignalObjectEvent (uint32_t obj_idx, uint32_t event) {</div>
<div class="line"> </div>
<div class="line">  <span class="keywordflow">if</span> (obj_idx == rx_obj_idx) {                  <span class="comment">// If receive object event</span></div>
<div class="line">    <span class="keywordflow">if</span> (event == <a class="code" href="group__CAN__events.html#ga2c1082561eeae3b2b8132e81fc241e47">ARM_CAN_EVENT_RECEIVE</a>) {       <span class="comment">// If message was received successfully</span></div>
<div class="line">      <span class="keywordflow">if</span> (ptrCAN-&gt;MessageRead(rx_obj_idx, &amp;rx_msg_info, rx_data, 8U) &gt; 0U) {</div>
<div class="line">                                                <span class="comment">// Read received message</span></div>
<div class="line">        <span class="comment">// process received message ...</span></div>
<div class="line">      }</div>
<div class="line">    }</div>
<div class="line">  }</div>
<div class="line">  <span class="keywordflow">if</span> (obj_idx == tx_obj_idx) {                  <span class="comment">// If transmit object event</span></div>
<div class="line">    <span class="keywordflow">if</span> (event == <a class="code" href="group__CAN__events.html#ga486f0f35ebc7e3b5931ee68b56703503">ARM_CAN_EVENT_SEND_COMPLETE</a>) { <span class="comment">// If message was sent successfully</span></div>
<div class="line">      <span class="comment">// acknowledge sent message ...</span></div>
<div class="line">    }</div>
<div class="line">  }</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main (<span class="keywordtype">void</span>) {</div>
<div class="line">  <a class="code" href="group__can__interface__gr.html#structARM__CAN__CAPABILITIES">ARM_CAN_CAPABILITIES</a>     can_cap;</div>
<div class="line">  <a class="code" href="group__can__interface__gr.html#structARM__CAN__OBJ__CAPABILITIES">ARM_CAN_OBJ_CAPABILITIES</a> can_obj_cap;</div>
<div class="line">  int32_t                  status;</div>
<div class="line">  uint32_t                 i, num_objects;</div>
<div class="line"> </div>
<div class="line">  can_cap = ptrCAN-&gt;GetCapabilities (); <span class="comment">// Get CAN driver capabilities</span></div>
<div class="line">  num_objects = can_cap.<a class="code" href="group__can__interface__gr.html#a69bd1a164443cf6f501489f4d31f4681">num_objects</a>;    <span class="comment">// Number of receive/transmit objects</span></div>
<div class="line"> </div>
<div class="line">  status = ptrCAN-&gt;Initialize    (CAN_SignalUnitEvent, CAN_SignalObjectEvent);  <span class="comment">// Initialize CAN driver</span></div>
<div class="line">  <span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a> ) { Error_Handler(); }</div>
<div class="line"> </div>
<div class="line">  status = ptrCAN-&gt;PowerControl  (<a class="code" href="Driver__Common_8h.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5abed52b77a9ce4775570e44a842b1295e">ARM_POWER_FULL</a>);                              <span class="comment">// Power-up CAN controller</span></div>
<div class="line">  <span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a> ) { Error_Handler(); }</div>
<div class="line"> </div>
<div class="line">  status = ptrCAN-&gt;SetMode       (<a class="code" href="Driver__CAN_8h.html#gabbca99c46d478bcf822eee71cdf75dcda9967a5ebaa045afe54d75e5629676ddc">ARM_CAN_MODE_INITIALIZATION</a>);                 <span class="comment">// Activate initialization mode</span></div>
<div class="line">  <span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a> ) { Error_Handler(); }</div>
<div class="line"> </div>
<div class="line">  status = ptrCAN-&gt;SetBitrate    (<a class="code" href="Driver__CAN_8h.html#ga11c12020b81a63a73a8b53e96a7e3deaa3b6d191c99f1eba4f01bcc5fbfaf67f3">ARM_CAN_BITRATE_NOMINAL</a>,              <span class="comment">// Set nominal bitrate</span></div>
<div class="line">                                  100000U,                              <span class="comment">// Set bitrate to 100 kbit/s</span></div>
<div class="line">                                  <a class="code" href="group__can__timeseg__ctrls.html#ga01183319a5a899eafea9ffe7af73d5ea">ARM_CAN_BIT_PROP_SEG</a>(5U)   |          <span class="comment">// Set propagation segment to 5 time quanta</span></div>
<div class="line">                                  <a class="code" href="group__can__timeseg__ctrls.html#ga03f1921ee97a7ebf5d767b6cacf40792">ARM_CAN_BIT_PHASE_SEG1</a>(1U) |          <span class="comment">// Set phase segment 1 to 1 time quantum (sample point at 87.5% of bit time)</span></div>
<div class="line">                                  <a class="code" href="group__can__timeseg__ctrls.html#ga76de056d56803cb7a0d01978ee981e80">ARM_CAN_BIT_PHASE_SEG2</a>(1U) |          <span class="comment">// Set phase segment 2 to 1 time quantum (total bit is 8 time quanta long)</span></div>
<div class="line">                                  <a class="code" href="group__can__timeseg__ctrls.html#gab32e97fa4edf497c111dd3f0d8779269">ARM_CAN_BIT_SJW</a>(1U));                 <span class="comment">// Resynchronization jump width is same as phase segment 2</span></div>
<div class="line">  <span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a> ) { Error_Handler(); }</div>
<div class="line"> </div>
<div class="line">  <span class="keywordflow">for</span> (i = 0U; i &lt; num_objects; i++) {                                          <span class="comment">// Find first available object for receive and transmit</span></div>
<div class="line">    can_obj_cap = ptrCAN-&gt;ObjectGetCapabilities (i);                            <span class="comment">// Get object capabilities</span></div>
<div class="line">    <span class="keywordflow">if</span>      ((rx_obj_idx == 0xFFFFFFFFU) &amp;&amp; (can_obj_cap.<a class="code" href="group__can__interface__gr.html#a895532773c3204e1538191f155c7bac8">rx</a> == 1U)) { rx_obj_idx = i; }</div>
<div class="line">    <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((tx_obj_idx == 0xFFFFFFFFU) &amp;&amp; (can_obj_cap.<a class="code" href="group__can__interface__gr.html#a9706173b2ed538efeb5ee4a952e2272f">tx</a> == 1U)) { tx_obj_idx = i; <span class="keywordflow">break</span>; }</div>
<div class="line">  }</div>
<div class="line">  <span class="keywordflow">if</span> ((rx_obj_idx == 0xFFFFFFFFU) || (tx_obj_idx == 0xFFFFFFFFU)) { Error_Handler(); }</div>
<div class="line"> </div>
<div class="line">  <span class="comment">// Set filter to receive messages with extended ID 0x12345678 to receive object</span></div>
<div class="line">  status = ptrCAN-&gt;ObjectSetFilter(rx_obj_idx, <a class="code" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75aa734058b50573de3b0cc49311997806b">ARM_CAN_FILTER_ID_EXACT_ADD</a>, <a class="code" href="group__can__identifer__ctrls.html#gae7d4efb6fb49e1ec47c2b12e22f37cae">ARM_CAN_EXTENDED_ID</a>(0x12345678U), 0U);</div>
<div class="line">  <span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a> ) { Error_Handler(); }</div>
<div class="line"> </div>
<div class="line">  status = ptrCAN-&gt;ObjectConfigure(tx_obj_idx, <a class="code" href="Driver__CAN_8h.html#gaa9488554de0575bc821c9f65213c4cd0a3e20952f92855298cd0a39a7f47b3f3c">ARM_CAN_OBJ_TX</a>);                 <span class="comment">// Configure transmit object</span></div>
<div class="line">  <span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a> ) { Error_Handler(); }</div>
<div class="line"> </div>
<div class="line">  status = ptrCAN-&gt;ObjectConfigure(rx_obj_idx, <a class="code" href="Driver__CAN_8h.html#gaa9488554de0575bc821c9f65213c4cd0a14780ac7274831ee94f427cbbf67c003">ARM_CAN_OBJ_RX</a>);                 <span class="comment">// Configure receive object</span></div>
<div class="line">  <span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a> ) { Error_Handler(); }</div>
<div class="line">  </div>
<div class="line">  status = ptrCAN-&gt;SetMode (<a class="code" href="Driver__CAN_8h.html#gabbca99c46d478bcf822eee71cdf75dcdaa3190344bdf3452462e5c0518ac3cdc4">ARM_CAN_MODE_NORMAL</a>);                               <span class="comment">// Activate normal operation mode</span></div>
<div class="line">  <span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a> ) { Error_Handler(); }</div>
<div class="line">  </div>
<div class="line">  memset(&amp;tx_msg_info, 0U, <span class="keyword">sizeof</span>(<a class="code" href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">ARM_CAN_MSG_INFO</a>));                           <span class="comment">// Clear message info structure</span></div>
<div class="line">  tx_msg_info.<a class="code" href="group__can__interface__gr.html#abaabdc509cdaba7df9f56c6c76f3ae19">id</a> = <a class="code" href="group__can__identifer__ctrls.html#gae7d4efb6fb49e1ec47c2b12e22f37cae">ARM_CAN_EXTENDED_ID</a>(0x12345678U);                            <span class="comment">// Set extended ID for transmit message</span></div>
<div class="line">  tx_data[0]     = 0xFFU;                                                       <span class="comment">// Initialize transmit data</span></div>
<div class="line">  <span class="keywordflow">while</span> (1) {</div>
<div class="line">    tx_data[0]++;                                                               <span class="comment">// Increment transmit data</span></div>
<div class="line">    status = ptrCAN-&gt;MessageSend(tx_obj_idx, &amp;tx_msg_info, tx_data, 1U);        <span class="comment">// Send data message with 1 data byte</span></div>
<div class="line">    <span class="keywordflow">if</span> (status != 1U) { Error_Handler(); }</div>
<div class="line">    <span class="keywordflow">for</span> (i = 0U; i &lt; 1000000U; i++) { __nop(); }                                <span class="comment">// Wait a little while</span></div>
<div class="line">  }</div>
<div class="line">}</div>
</div><!-- fragment --><h1><a class="anchor" id="can_objects"></a>
CAN Message Objects</h1>
<p>The CMSIS-Driver for the CAN interface provides multiple CAN message objects, which can be seen as individual communication channels. The number of available CAN message objects depends on the CAN peripheral. The function <a class="el" href="group__can__interface__gr.html#ga35f21cabe1637b1be964024a8f77721c">ARM_CAN_GetCapabilities</a> returns the maximum number of available CAN message objects. The number is encoded in the structure <a class="el" href="group__can__interface__gr.html#structARM__CAN__CAPABILITIES">ARM_CAN_CAPABILITIES</a> in the data field <em>num_objects</em>. CAN message objects are addressed with the functions listed below, whereby the parameter <em>obj_idx</em> addresses an individual object. The valid range for <em>obj_idx</em> is <span class="XML-Token">[0 .. (<em>num_objects</em> - 1)]</span>.</p>
<table class="doxtable">
<tr>
<th align="left">Function </th><th align="left">Description  </th></tr>
<tr>
<td align="left"><a class="el" href="group__can__interface__gr.html#ga45ab314f5121cf5a1b32d9adc600e0f7">ARM_CAN_ObjectGetCapabilities</a> </td><td align="left">Retrieves message object capabilities such as receive, transmit, <a class="el" href="group__can__interface__gr.html#Remote_Frame">Remote Frame</a> automatic handling and <a class="el" href="group__can__interface__gr.html#can_filtering">CAN Message Filtering</a>. </td></tr>
<tr>
<td align="left"><a class="el" href="group__can__interface__gr.html#ga4f9bc7088704483388e14872c9d5385d">ARM_CAN_ObjectSetFilter</a> </td><td align="left">Allows to set-up CAN ID filtering for the message object. </td></tr>
<tr>
<td align="left"><a class="el" href="group__can__interface__gr.html#ga00ec0715f6755a49dae5b60dca182630">ARM_CAN_ObjectConfigure</a> </td><td align="left">Allows to configure the message object for receive, transmit or <a class="el" href="group__can__interface__gr.html#Remote_Frame">Remote Frame</a> automatic handling. </td></tr>
<tr>
<td align="left"><a class="el" href="group__can__interface__gr.html#gafc37084df5eab32f593c2744d35cf647">ARM_CAN_MessageRead</a> </td><td align="left">Read received message from the message object. </td></tr>
<tr>
<td align="left"><a class="el" href="group__can__interface__gr.html#ga0dcffd362b4093043442a030eaebbcfe">ARM_CAN_MessageSend</a> </td><td align="left">Send CAN message or send <a class="el" href="group__can__interface__gr.html#Remote_Frame">Remote Frame</a> or set CAN message to be sent automatically on reception of matching <a class="el" href="group__can__interface__gr.html#Remote_Frame">Remote Frame</a> on the message object. </td></tr>
<tr>
<td align="left"><a class="el" href="group__can__interface__gr.html#gabfcaeac9e2ca25936ba5a29f2d594e7e">ARM_CAN_SignalObjectEvent</a> </td><td align="left">Callback function that signals a message transfer or a received message overrun. </td></tr>
</table>
<p>Each CAN message object may have different capabilities. Before using a CAN message object, call the function <a class="el" href="group__can__interface__gr.html#ga45ab314f5121cf5a1b32d9adc600e0f7">ARM_CAN_ObjectGetCapabilities</a> to verify the available features.</p>
<h1><a class="anchor" id="can_filtering"></a>
CAN Message Filtering</h1>
<p>The CMSIS-Driver for the CAN interface supports ID filtering for the receiving message objects. The receiving CAN node examines the identifier to decide if it was relevant. This filtering is done by the CAN peripheral according the settings configured with the function <a class="el" href="group__can__interface__gr.html#ga4f9bc7088704483388e14872c9d5385d">ARM_CAN_ObjectSetFilter</a>.</p>
<p>The function <a class="el" href="group__can__interface__gr.html#ga45ab314f5121cf5a1b32d9adc600e0f7">ARM_CAN_ObjectGetCapabilities</a> retrieves the filter capabilities of the CAN message objects stored in <a class="el" href="group__can__interface__gr.html#structARM__CAN__OBJ__CAPABILITIES">ARM_CAN_OBJ_CAPABILITIES</a>.</p>
<table class="doxtable">
<tr>
<th align="left">Data Fields </th><th align="left">CAN Messages Object can be filtered with ...  </th></tr>
<tr>
<td align="left"><em>exact_filtering</em> </td><td align="left">an exact ID value set by using the function <a class="el" href="group__can__interface__gr.html#ga4f9bc7088704483388e14872c9d5385d">ARM_CAN_ObjectSetFilter</a> with <em>control</em> = <a class="el" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75aa734058b50573de3b0cc49311997806b">ARM_CAN_FILTER_ID_EXACT_ADD</a>. </td></tr>
<tr>
<td align="left"><em>range_filtering</em> </td><td align="left">a range ID value set by using the function <a class="el" href="group__can__interface__gr.html#ga4f9bc7088704483388e14872c9d5385d">ARM_CAN_ObjectSetFilter</a> with <em>control</em> = <a class="el" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75a22123bef8e773844fce604c553bf2ed5">ARM_CAN_FILTER_ID_RANGE_ADD</a>. </td></tr>
<tr>
<td align="left"><em>mask_filtering</em> </td><td align="left">a mask ID value set by as using the function <a class="el" href="group__can__interface__gr.html#ga4f9bc7088704483388e14872c9d5385d">ARM_CAN_ObjectSetFilter</a> with <em>control</em> = <a class="el" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75ac4ad302fa9b762c1d14964141e234ba9">ARM_CAN_FILTER_ID_MASKABLE_ADD</a>. </td></tr>
<tr>
<td align="left"><em>multiple_filters</em> </td><td align="left">... several filters to capture multiple ID values, or ID value ranges. </td></tr>
</table>
<p><b>CAN message filtering using an exact ID</b></p>
<p>Example: accept in message object #1 only frames with extended ID = 0x1567. </p>
<div class="fragment"><div class="line">status = ptrCAN-&gt;ObjectSetFilter (1, <a class="code" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75aa734058b50573de3b0cc49311997806b">ARM_CAN_FILTER_ID_EXACT_ADD</a>, <a class="code" href="group__can__identifer__ctrls.html#gae7d4efb6fb49e1ec47c2b12e22f37cae">ARM_CAN_EXTENDED_ID</a>(0x1567), 0);</div>
<div class="line"><span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) ... <span class="comment">// error handling</span></div>
</div><!-- fragment --><p>Example: accept in message object #2 frames with extended ID = 0x3167 and extended ID = 0x42123. </p>
<div class="fragment"><div class="line">status = ptrCAN-&gt;ObjectSetFilter (2, <a class="code" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75aa734058b50573de3b0cc49311997806b">ARM_CAN_FILTER_ID_EXACT_ADD</a>, <a class="code" href="group__can__identifer__ctrls.html#gae7d4efb6fb49e1ec47c2b12e22f37cae">ARM_CAN_EXTENDED_ID</a>(0x3167), 0);</div>
<div class="line"><span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) ... <span class="comment">// error handling</span></div>
<div class="line">status = ptrCAN-&gt;ObjectSetFilter (2, <a class="code" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75aa734058b50573de3b0cc49311997806b">ARM_CAN_FILTER_ID_EXACT_ADD</a>, <a class="code" href="group__can__identifer__ctrls.html#gae7d4efb6fb49e1ec47c2b12e22f37cae">ARM_CAN_EXTENDED_ID</a>(0x42123), 0);</div>
<div class="line"><span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) ... <span class="comment">// error handling</span></div>
</div><!-- fragment --><p><b>CAN message filtering using a range ID</b></p>
<p>Example: accept in message object #3 only frames with extended ID &gt;= 0x1567 and extended ID &lt;= 0x1577. </p>
<div class="fragment"><div class="line">status = ptrCAN-&gt;ObjectSetFilter (3, <a class="code" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75a22123bef8e773844fce604c553bf2ed5">ARM_CAN_FILTER_ID_RANGE_ADD</a>, <a class="code" href="group__can__identifer__ctrls.html#gae7d4efb6fb49e1ec47c2b12e22f37cae">ARM_CAN_EXTENDED_ID</a>(0x1567), <a class="code" href="group__can__identifer__ctrls.html#gae7d4efb6fb49e1ec47c2b12e22f37cae">ARM_CAN_EXTENDED_ID</a>(0x1577));</div>
<div class="line"><span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) ... <span class="comment">// error handling</span></div>
</div><!-- fragment --><p><b>CAN message filtering using a mask ID</b></p>
<p>Using the function <a class="el" href="group__can__interface__gr.html#ga4f9bc7088704483388e14872c9d5385d">ARM_CAN_ObjectSetFilter</a> with <em>control</em> = <a class="el" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75ac4ad302fa9b762c1d14964141e234ba9">ARM_CAN_FILTER_ID_MASKABLE_ADD</a> allows to specify with <em>arg</em> a mask value.</p>
<ul>
<li>if a mask bit is <span class="XML-Token">0</span>, the corresponding <em>ID</em> bit will be accepted, regardless of the value.</li>
<li>if a mask bit is <span class="XML-Token">1</span>, the corresponding <em>ID</em> bit will be compared with the value of the ID filter bit; if they match the message will be accepted otherwise the frame is rejected.</li>
</ul>
<p>Example: accept in message object #0 only frames with extended IDs 0x1560 to 0x156F. </p>
<div class="fragment"><div class="line">status = ptrCAN-&gt;ObjectSetFilter (0, <a class="code" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75ac4ad302fa9b762c1d14964141e234ba9">ARM_CAN_FILTER_ID_MASKABLE_ADD</a>, <a class="code" href="group__can__identifer__ctrls.html#gae7d4efb6fb49e1ec47c2b12e22f37cae">ARM_CAN_EXTENDED_ID</a>(0x1560), 0x1FFFFFF0);</div>
<div class="line"><span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) ... <span class="comment">// error handling</span></div>
</div><!-- fragment --><p>Example: accept in message object #2 only frames with extended IDs 0x35603, 0x35613, 0x35623, and 0x35633. </p>
<div class="fragment"><div class="line">status = ptrCAN-&gt;ObjectSetFilter (2, <a class="code" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75ac4ad302fa9b762c1d14964141e234ba9">ARM_CAN_FILTER_ID_MASKABLE_ADD</a>, <a class="code" href="group__can__identifer__ctrls.html#gae7d4efb6fb49e1ec47c2b12e22f37cae">ARM_CAN_EXTENDED_ID</a>(0x35603), 0x1FFFFFCF);</div>
<div class="line"><span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) ... <span class="comment">// error handling</span></div>
</div><!-- fragment --><p>Example: accept any message in object #4 regardless of the ID. </p>
<div class="fragment"><div class="line">status = ptrCAN-&gt;ObjectSetFilter (4, <a class="code" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75ac4ad302fa9b762c1d14964141e234ba9">ARM_CAN_FILTER_ID_MASKABLE_ADD</a>, <a class="code" href="group__can__identifer__ctrls.html#gae7d4efb6fb49e1ec47c2b12e22f37cae">ARM_CAN_EXTENDED_ID</a>(0), 0);</div>
<div class="line"><span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) ... <span class="comment">// error handling</span></div>
</div><!-- fragment --><h1><a class="anchor" id="Remote_Frame"></a>
Remote Frame</h1>
<p>In general, data transmission is performed on an autonomous basis with the data source node sending out Data Frames.</p>
<p>However, sending a <b>Remote Frame</b> allows a destination node to request the data from the source node. The examples below shows the data exchange using a <b>Remote Transmission Request (RTR)</b>.</p>
<p><b>Example for automatic Data Message response on RTR</b></p>
<p>For automatic data message response on an RTR, the object is configured with the function <a class="el" href="group__can__interface__gr.html#ga00ec0715f6755a49dae5b60dca182630">ARM_CAN_ObjectConfigure</a> <em>obj_cfg</em> = <a class="el" href="Driver__CAN_8h.html#gaa9488554de0575bc821c9f65213c4cd0ac5d28d180ea9e4328974ffcb8b928a0c">ARM_CAN_OBJ_RX_RTR_TX_DATA</a>.</p>
<p>In this case, the function <a class="el" href="group__can__interface__gr.html#ga0dcffd362b4093043442a030eaebbcfe">ARM_CAN_MessageSend</a> sets a data message that is transmitted when an RTR with a matching CAN ID is received. If <a class="el" href="group__can__interface__gr.html#ga0dcffd362b4093043442a030eaebbcfe">ARM_CAN_MessageSend</a> was not called before the RTR is received, the response is hardware dependent (either last data message is repeated or no data message is sent until <a class="el" href="group__can__interface__gr.html#ga0dcffd362b4093043442a030eaebbcfe">ARM_CAN_MessageSend</a> is called).</p>
<p>After data transmission is completed, the driver calls a callback function <a class="el" href="group__can__interface__gr.html#gabfcaeac9e2ca25936ba5a29f2d594e7e">ARM_CAN_SignalObjectEvent</a> with <em>event</em> = <a class="el" href="group__CAN__events.html#ga486f0f35ebc7e3b5931ee68b56703503">ARM_CAN_EVENT_SEND_COMPLETE</a> and the related <em>obj_idx</em>.</p>
<p><b>Example:</b> </p>
<div class="fragment"><div class="line">status = ptrCAN-&gt;ObjectSetFilter(0, <a class="code" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75aa734058b50573de3b0cc49311997806b">ARM_CAN_FILTER_ID_EXACT_ADD</a>, <a class="code" href="group__can__identifer__ctrls.html#gae7d4efb6fb49e1ec47c2b12e22f37cae">ARM_CAN_EXTENDED_ID</a>(0x12345678U), 0U);</div>
<div class="line"><span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) ... <span class="comment">// error handling</span></div>
<div class="line">status = trCAN-&gt;ObjectConfigure(0, <a class="code" href="Driver__CAN_8h.html#gaa9488554de0575bc821c9f65213c4cd0ac5d28d180ea9e4328974ffcb8b928a0c">ARM_CAN_OBJ_RX_RTR_TX_DATA</a>);</div>
<div class="line"><span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) ... <span class="comment">// error handling</span></div>
<div class="line"></div>
<div class="line">memset(&amp;tx_msg_info, 0, <span class="keyword">sizeof</span>(<a class="code" href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">ARM_CAN_MSG_INFO</a>));            <span class="comment">// Clear transmit message structure</span></div>
<div class="line">tx_msg_info.<a class="code" href="group__can__interface__gr.html#abaabdc509cdaba7df9f56c6c76f3ae19">id</a>  = <a class="code" href="group__can__identifer__ctrls.html#gae7d4efb6fb49e1ec47c2b12e22f37cae">ARM_CAN_EXTENDED_ID</a>(0x12345678U);           <span class="comment">// Set ID of message</span></div>
<div class="line">data_buf[0] = <span class="charliteral">&#39;1&#39;</span>;  data_buf[1] = <span class="charliteral">&#39;2&#39;</span>;                        <span class="comment">// Prepare data to transmit</span></div>
<div class="line">data_buf[2] = <span class="charliteral">&#39;3&#39;</span>;  data_buf[3] = <span class="charliteral">&#39;4&#39;</span>;</div>
<div class="line">data_buf[4] = <span class="charliteral">&#39;5&#39;</span>;  data_buf[5] = <span class="charliteral">&#39;6&#39;</span>;</div>
<div class="line">data_buf[6] = <span class="charliteral">&#39;7&#39;</span>;  data_buf[7] = <span class="charliteral">&#39;8&#39;</span>;</div>
<div class="line">ptrCAN-&gt;MessageSend(0, &amp;tx_msg_info, data_buf, 8);            <span class="comment">// Start send message that will be triggered on RTR reception</span></div>
</div><!-- fragment --><p><b>Example for automatic Data Message reception using RTR</b></p>
<p>For automatic data message reception on an RTR, the object is configured with the function <a class="el" href="group__can__interface__gr.html#ga00ec0715f6755a49dae5b60dca182630">ARM_CAN_ObjectConfigure</a> <em>obj_cfg</em> = <a class="el" href="Driver__CAN_8h.html#gaa9488554de0575bc821c9f65213c4cd0a396d7a6cd2353e1a2936405ace6417f5">ARM_CAN_OBJ_TX_RTR_RX_DATA</a>.</p>
<p>The receiver or consumer requests data with transmission of an RTR with the <a class="el" href="group__can__interface__gr.html#ga0dcffd362b4093043442a030eaebbcfe">ARM_CAN_MessageSend</a>. This RTR requests from the transmitter or producer to send the data message. Once the data message is received, the driver calls a callback function <a class="el" href="group__can__interface__gr.html#gabfcaeac9e2ca25936ba5a29f2d594e7e">ARM_CAN_SignalObjectEvent</a> with <em>event</em> = <a class="el" href="group__CAN__events.html#ga2c1082561eeae3b2b8132e81fc241e47">ARM_CAN_EVENT_RECEIVE</a> and the related <em>obj_idx</em>. The received data message can then be read with the function <a class="el" href="group__can__interface__gr.html#gafc37084df5eab32f593c2744d35cf647">ARM_CAN_MessageRead</a>.</p>
<p><b>Example:</b> </p>
<div class="fragment"><div class="line">status = ptrCAN-&gt;ObjectSetFilter(0, <a class="code" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75aa734058b50573de3b0cc49311997806b">ARM_CAN_FILTER_ID_EXACT_ADD</a>, <a class="code" href="group__can__identifer__ctrls.html#gae7d4efb6fb49e1ec47c2b12e22f37cae">ARM_CAN_EXTENDED_ID</a>(0x12345678U), 0U);</div>
<div class="line"><span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) ... <span class="comment">// error handling</span></div>
<div class="line">status = ptrCAN-&gt;ObjectConfigure(0, <a class="code" href="Driver__CAN_8h.html#gaa9488554de0575bc821c9f65213c4cd0a396d7a6cd2353e1a2936405ace6417f5">ARM_CAN_OBJ_TX_RTR_RX_DATA</a>);</div>
<div class="line"><span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>) ... <span class="comment">// error handling</span></div>
<div class="line">memset(&amp;tx_msg_info, 0, <span class="keyword">sizeof</span>(<a class="code" href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">ARM_CAN_MSG_INFO</a>));            <span class="comment">// Clear transmit message structure</span></div>
<div class="line">tx_msg_info.<a class="code" href="group__can__interface__gr.html#abaabdc509cdaba7df9f56c6c76f3ae19">id</a>  = <a class="code" href="group__can__identifer__ctrls.html#gae7d4efb6fb49e1ec47c2b12e22f37cae">ARM_CAN_EXTENDED_ID</a>(0x12345678U);           <span class="comment">// Set ID of message</span></div>
<div class="line">tx_msg_info.<a class="code" href="group__can__interface__gr.html#a1f32fc9e5d3b33babf5905140e7a53af">rtr</a> = 1;                                          <span class="comment">// Set RTR flag of message to send RTR</span></div>
<div class="line">tx_msg_info.<a class="code" href="group__can__interface__gr.html#a811fbb0cb2c2263b1a7440a7e9d78239">dlc</a> = 1;                                          <span class="comment">// Set data length code of message to 1 to request 1 data byte</span></div>
<div class="line">ptrCAN-&gt;MesageSend(0, &amp;tx_msg_info, 0, 0);                    <span class="comment">// Send RTR</span></div>
<div class="line"></div>
<div class="line"><span class="comment">// Wait for ARM_CAN_EVENT_RECEIVE</span></div>
<div class="line">ptrCAN-&gt;MessageRead(0, &amp;rx_msg_info, data_buf, 8);            <span class="comment">// Read received message</span></div>
</div><!-- fragment --> <hr/><h2 class="groupheader">Data Structure Documentation</h2>
<a name="structARM__DRIVER__CAN" id="structARM__DRIVER__CAN"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct ARM_DRIVER_CAN</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>Access structure of the CAN Driver. </p>
<p>The functions of the CAN are accessed by function pointers exposed by this structure. Refer to <a class="el" href="theoryOperation.html#DriverFunctions">Common Driver Functions</a> for overview information.</p>
<p>Each instance of a CAN provides such an access structure. The instance is identified by a postfix number in the symbol name of the access structure, for example:</p>
<ul>
<li><b>Driver_CAN0</b> is the name of the access struct of the first instance (no. 0).</li>
<li><b>Driver_CAN1</b> is the name of the access struct of the second instance (no. 1).</li>
</ul>
<p>A configuration setting in the middleware allows you to connect the middleware to a specific driver instance <b>Driver_CAN<em>n</em></b>. </p>
</div><table class="memberdecls">
<tr><td colspan="2"><h3>Data Fields</h3></td></tr>
<tr class="memitem:a8834b281da48583845c044a81566c1b3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#a8834b281da48583845c044a81566c1b3">GetVersion</a> )(void)</td></tr>
<tr class="memdesc:a8834b281da48583845c044a81566c1b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__can__interface__gr.html#ga4256d5b23ffcb27759a05f8e6b854f13">ARM_CAN_GetVersion</a> : Get driver version.  <a href="#a8834b281da48583845c044a81566c1b3">More...</a><br/></td></tr>
<tr class="separator:a8834b281da48583845c044a81566c1b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62c0c62c2bf482c000b1b2a2c817a96f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__can__interface__gr.html#structARM__CAN__CAPABILITIES">ARM_CAN_CAPABILITIES</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#a62c0c62c2bf482c000b1b2a2c817a96f">GetCapabilities</a> )(void)</td></tr>
<tr class="memdesc:a62c0c62c2bf482c000b1b2a2c817a96f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__can__interface__gr.html#ga35f21cabe1637b1be964024a8f77721c">ARM_CAN_GetCapabilities</a> : Get driver capabilities.  <a href="#a62c0c62c2bf482c000b1b2a2c817a96f">More...</a><br/></td></tr>
<tr class="separator:a62c0c62c2bf482c000b1b2a2c817a96f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a322b44b8e757887616b75035a8fd7027"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#a322b44b8e757887616b75035a8fd7027">Initialize</a> )(<a class="el" href="group__can__interface__gr.html#gaac07b9fdf614bf439414f5417aaa376e">ARM_CAN_SignalUnitEvent_t</a> cb_unit_event, <a class="el" href="group__can__interface__gr.html#ga7ceceac3e9aa0981c5cacfab88efb4eb">ARM_CAN_SignalObjectEvent_t</a> cb_object_event)</td></tr>
<tr class="memdesc:a322b44b8e757887616b75035a8fd7027"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__can__interface__gr.html#gaa72ceb25ba67e279d7432404632deb44">ARM_CAN_Initialize</a> : Initialize CAN interface.  <a href="#a322b44b8e757887616b75035a8fd7027">More...</a><br/></td></tr>
<tr class="separator:a322b44b8e757887616b75035a8fd7027"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcf20681a1402869ecb5c6447fada17b"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#adcf20681a1402869ecb5c6447fada17b">Uninitialize</a> )(void)</td></tr>
<tr class="memdesc:adcf20681a1402869ecb5c6447fada17b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__can__interface__gr.html#ga1e3e364b64f2ab277399e3279cce5ef8">ARM_CAN_Uninitialize</a> : De-initialize CAN interface.  <a href="#adcf20681a1402869ecb5c6447fada17b">More...</a><br/></td></tr>
<tr class="separator:adcf20681a1402869ecb5c6447fada17b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba8f1c8019af95ffe19c32403e3240ef"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#aba8f1c8019af95ffe19c32403e3240ef">PowerControl</a> )(<a class="el" href="group__common__drv__gr.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5">ARM_POWER_STATE</a> state)</td></tr>
<tr class="memdesc:aba8f1c8019af95ffe19c32403e3240ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__can__interface__gr.html#ga6f634f126ac97daef2f3115aa7bfed7c">ARM_CAN_PowerControl</a> : Control CAN interface power.  <a href="#aba8f1c8019af95ffe19c32403e3240ef">More...</a><br/></td></tr>
<tr class="separator:aba8f1c8019af95ffe19c32403e3240ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21063f38e762cf29dfd3f5991ee936e2"><td class="memItemLeft" align="right" valign="top">uint32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#a21063f38e762cf29dfd3f5991ee936e2">GetClock</a> )(void)</td></tr>
<tr class="memdesc:a21063f38e762cf29dfd3f5991ee936e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__can__interface__gr.html#ga1fe6cc207415de604975ae251e269361">ARM_CAN_GetClock</a> : Retrieve CAN base clock frequency.  <a href="#a21063f38e762cf29dfd3f5991ee936e2">More...</a><br/></td></tr>
<tr class="separator:a21063f38e762cf29dfd3f5991ee936e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a360a314665607fc2d866c24e1608fd06"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#a360a314665607fc2d866c24e1608fd06">SetBitrate</a> )(<a class="el" href="group__can__timeseg__ctrls.html#ga11c12020b81a63a73a8b53e96a7e3dea">ARM_CAN_BITRATE_SELECT</a> select, uint32_t bitrate, uint32_t bit_segments)</td></tr>
<tr class="memdesc:a360a314665607fc2d866c24e1608fd06"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__can__interface__gr.html#ga88bb27a8525503a250cca7a2c4a5d07a">ARM_CAN_SetBitrate</a> : Set bitrate for CAN interface.  <a href="#a360a314665607fc2d866c24e1608fd06">More...</a><br/></td></tr>
<tr class="separator:a360a314665607fc2d866c24e1608fd06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0fa2edbde052011604addec816782b4e"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#a0fa2edbde052011604addec816782b4e">SetMode</a> )(<a class="el" href="group__can__bus__mode__ctrls.html#gabbca99c46d478bcf822eee71cdf75dcd">ARM_CAN_MODE</a> mode)</td></tr>
<tr class="memdesc:a0fa2edbde052011604addec816782b4e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__can__interface__gr.html#ga28226a6e223f9b95b4dafb7c2f48a855">ARM_CAN_SetMode</a> : Set operating mode for CAN interface.  <a href="#a0fa2edbde052011604addec816782b4e">More...</a><br/></td></tr>
<tr class="separator:a0fa2edbde052011604addec816782b4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7239c03265659edcaf69dc9ea5e29ce3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__can__interface__gr.html#structARM__CAN__OBJ__CAPABILITIES">ARM_CAN_OBJ_CAPABILITIES</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#a7239c03265659edcaf69dc9ea5e29ce3">ObjectGetCapabilities</a> )(uint32_t obj_idx)</td></tr>
<tr class="memdesc:a7239c03265659edcaf69dc9ea5e29ce3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__can__interface__gr.html#ga45ab314f5121cf5a1b32d9adc600e0f7">ARM_CAN_ObjectGetCapabilities</a> : Retrieve capabilities of an object.  <a href="#a7239c03265659edcaf69dc9ea5e29ce3">More...</a><br/></td></tr>
<tr class="separator:a7239c03265659edcaf69dc9ea5e29ce3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2bfa264f66c84606ebf9f9e8dc45b907"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#a2bfa264f66c84606ebf9f9e8dc45b907">ObjectSetFilter</a> )(uint32_t obj_idx, <a class="el" href="group__can__filter__operation__ctrls.html#gacb04d0f8b3969ee69362ff2b62941d75">ARM_CAN_FILTER_OPERATION</a> operation, uint32_t id, uint32_t arg)</td></tr>
<tr class="memdesc:a2bfa264f66c84606ebf9f9e8dc45b907"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__can__interface__gr.html#ga4f9bc7088704483388e14872c9d5385d">ARM_CAN_ObjectSetFilter</a> : Add or remove filter for message reception.  <a href="#a2bfa264f66c84606ebf9f9e8dc45b907">More...</a><br/></td></tr>
<tr class="separator:a2bfa264f66c84606ebf9f9e8dc45b907"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24cfe29d7f6a29dfbac3c7011fc5b652"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#a24cfe29d7f6a29dfbac3c7011fc5b652">ObjectConfigure</a> )(uint32_t obj_idx, <a class="el" href="group__can__obj__config__ctrls.html#gaa9488554de0575bc821c9f65213c4cd0">ARM_CAN_OBJ_CONFIG</a> obj_cfg)</td></tr>
<tr class="memdesc:a24cfe29d7f6a29dfbac3c7011fc5b652"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__can__interface__gr.html#ga00ec0715f6755a49dae5b60dca182630">ARM_CAN_ObjectConfigure</a> : Configure object.  <a href="#a24cfe29d7f6a29dfbac3c7011fc5b652">More...</a><br/></td></tr>
<tr class="separator:a24cfe29d7f6a29dfbac3c7011fc5b652"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e6eb8bae2b7f8af99a3ca3cbbacce22"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#a3e6eb8bae2b7f8af99a3ca3cbbacce22">MessageSend</a> )(uint32_t obj_idx, <a class="el" href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">ARM_CAN_MSG_INFO</a> *msg_info, const uint8_t *data, uint8_t size)</td></tr>
<tr class="memdesc:a3e6eb8bae2b7f8af99a3ca3cbbacce22"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__can__interface__gr.html#ga0dcffd362b4093043442a030eaebbcfe">ARM_CAN_MessageSend</a> : Send message on CAN bus.  <a href="#a3e6eb8bae2b7f8af99a3ca3cbbacce22">More...</a><br/></td></tr>
<tr class="separator:a3e6eb8bae2b7f8af99a3ca3cbbacce22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace17a0046cf2c6cdbcb0fd3202e460a0"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#ace17a0046cf2c6cdbcb0fd3202e460a0">MessageRead</a> )(uint32_t obj_idx, <a class="el" href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">ARM_CAN_MSG_INFO</a> *msg_info, uint8_t *data, uint8_t size)</td></tr>
<tr class="memdesc:ace17a0046cf2c6cdbcb0fd3202e460a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__can__interface__gr.html#gafc37084df5eab32f593c2744d35cf647">ARM_CAN_MessageRead</a> : Read message received on CAN bus.  <a href="#ace17a0046cf2c6cdbcb0fd3202e460a0">More...</a><br/></td></tr>
<tr class="separator:ace17a0046cf2c6cdbcb0fd3202e460a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e0f47a92f626a971c5197fca6545505"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#a6e0f47a92f626a971c5197fca6545505">Control</a> )(uint32_t control, uint32_t arg)</td></tr>
<tr class="memdesc:a6e0f47a92f626a971c5197fca6545505"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__can__interface__gr.html#ga8d9f0c5f03a8a81ab062b5aa57e5dea4">ARM_CAN_Control</a> : Control CAN interface.  <a href="#a6e0f47a92f626a971c5197fca6545505">More...</a><br/></td></tr>
<tr class="separator:a6e0f47a92f626a971c5197fca6545505"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad60ff24982cdb3ce38b8c17e0b4f0acc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__can__interface__gr.html#structARM__CAN__STATUS">ARM_CAN_STATUS</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__can__interface__gr.html#ad60ff24982cdb3ce38b8c17e0b4f0acc">GetStatus</a> )(void)</td></tr>
<tr class="memdesc:ad60ff24982cdb3ce38b8c17e0b4f0acc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__can__interface__gr.html#ga676d6b567fc4ab3d44f5d7a50ec9419c">ARM_CAN_GetStatus</a> : Get CAN status.  <a href="#ad60ff24982cdb3ce38b8c17e0b4f0acc">More...</a><br/></td></tr>
<tr class="separator:ad60ff24982cdb3ce38b8c17e0b4f0acc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h4 class="groupheader">Field Documentation</h4>
<a class="anchor" id="a8834b281da48583845c044a81566c1b3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a>(* GetVersion)(void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__can__interface__gr.html#ga4256d5b23ffcb27759a05f8e6b854f13">ARM_CAN_GetVersion</a> : Get driver version. </p>

</div>
</div>
<a class="anchor" id="a62c0c62c2bf482c000b1b2a2c817a96f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__can__interface__gr.html#structARM__CAN__CAPABILITIES">ARM_CAN_CAPABILITIES</a>(* GetCapabilities)(void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__can__interface__gr.html#ga35f21cabe1637b1be964024a8f77721c">ARM_CAN_GetCapabilities</a> : Get driver capabilities. </p>

</div>
</div>
<a class="anchor" id="a322b44b8e757887616b75035a8fd7027"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* Initialize)(<a class="el" href="group__can__interface__gr.html#gaac07b9fdf614bf439414f5417aaa376e">ARM_CAN_SignalUnitEvent_t</a> cb_unit_event, <a class="el" href="group__can__interface__gr.html#ga7ceceac3e9aa0981c5cacfab88efb4eb">ARM_CAN_SignalObjectEvent_t</a> cb_object_event)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__can__interface__gr.html#gaa72ceb25ba67e279d7432404632deb44">ARM_CAN_Initialize</a> : Initialize CAN interface. </p>

</div>
</div>
<a class="anchor" id="adcf20681a1402869ecb5c6447fada17b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* Uninitialize)(void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__can__interface__gr.html#ga1e3e364b64f2ab277399e3279cce5ef8">ARM_CAN_Uninitialize</a> : De-initialize CAN interface. </p>

</div>
</div>
<a class="anchor" id="aba8f1c8019af95ffe19c32403e3240ef"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* PowerControl)(<a class="el" href="group__common__drv__gr.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5">ARM_POWER_STATE</a> state)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__can__interface__gr.html#ga6f634f126ac97daef2f3115aa7bfed7c">ARM_CAN_PowerControl</a> : Control CAN interface power. </p>

</div>
</div>
<a class="anchor" id="a21063f38e762cf29dfd3f5991ee936e2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t(* GetClock)(void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__can__interface__gr.html#ga1fe6cc207415de604975ae251e269361">ARM_CAN_GetClock</a> : Retrieve CAN base clock frequency. </p>

</div>
</div>
<a class="anchor" id="a360a314665607fc2d866c24e1608fd06"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* SetBitrate)(<a class="el" href="group__can__timeseg__ctrls.html#ga11c12020b81a63a73a8b53e96a7e3dea">ARM_CAN_BITRATE_SELECT</a> select, uint32_t bitrate, uint32_t bit_segments)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__can__interface__gr.html#ga88bb27a8525503a250cca7a2c4a5d07a">ARM_CAN_SetBitrate</a> : Set bitrate for CAN interface. </p>

</div>
</div>
<a class="anchor" id="a0fa2edbde052011604addec816782b4e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* SetMode)(<a class="el" href="group__can__bus__mode__ctrls.html#gabbca99c46d478bcf822eee71cdf75dcd">ARM_CAN_MODE</a> mode)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__can__interface__gr.html#ga28226a6e223f9b95b4dafb7c2f48a855">ARM_CAN_SetMode</a> : Set operating mode for CAN interface. </p>

</div>
</div>
<a class="anchor" id="a7239c03265659edcaf69dc9ea5e29ce3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__can__interface__gr.html#structARM__CAN__OBJ__CAPABILITIES">ARM_CAN_OBJ_CAPABILITIES</a>(* ObjectGetCapabilities)(uint32_t obj_idx)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__can__interface__gr.html#ga45ab314f5121cf5a1b32d9adc600e0f7">ARM_CAN_ObjectGetCapabilities</a> : Retrieve capabilities of an object. </p>

</div>
</div>
<a class="anchor" id="a2bfa264f66c84606ebf9f9e8dc45b907"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* ObjectSetFilter)(uint32_t obj_idx, <a class="el" href="group__can__filter__operation__ctrls.html#gacb04d0f8b3969ee69362ff2b62941d75">ARM_CAN_FILTER_OPERATION</a> operation, uint32_t id, uint32_t arg)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__can__interface__gr.html#ga4f9bc7088704483388e14872c9d5385d">ARM_CAN_ObjectSetFilter</a> : Add or remove filter for message reception. </p>

</div>
</div>
<a class="anchor" id="a24cfe29d7f6a29dfbac3c7011fc5b652"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* ObjectConfigure)(uint32_t obj_idx, <a class="el" href="group__can__obj__config__ctrls.html#gaa9488554de0575bc821c9f65213c4cd0">ARM_CAN_OBJ_CONFIG</a> obj_cfg)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__can__interface__gr.html#ga00ec0715f6755a49dae5b60dca182630">ARM_CAN_ObjectConfigure</a> : Configure object. </p>

</div>
</div>
<a class="anchor" id="a3e6eb8bae2b7f8af99a3ca3cbbacce22"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* MessageSend)(uint32_t obj_idx, <a class="el" href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">ARM_CAN_MSG_INFO</a> *msg_info, const uint8_t *data, uint8_t size)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__can__interface__gr.html#ga0dcffd362b4093043442a030eaebbcfe">ARM_CAN_MessageSend</a> : Send message on CAN bus. </p>

</div>
</div>
<a class="anchor" id="ace17a0046cf2c6cdbcb0fd3202e460a0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* MessageRead)(uint32_t obj_idx, <a class="el" href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">ARM_CAN_MSG_INFO</a> *msg_info, uint8_t *data, uint8_t size)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__can__interface__gr.html#gafc37084df5eab32f593c2744d35cf647">ARM_CAN_MessageRead</a> : Read message received on CAN bus. </p>

</div>
</div>
<a class="anchor" id="a6e0f47a92f626a971c5197fca6545505"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* Control)(uint32_t control, uint32_t arg)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__can__interface__gr.html#ga8d9f0c5f03a8a81ab062b5aa57e5dea4">ARM_CAN_Control</a> : Control CAN interface. </p>

</div>
</div>
<a class="anchor" id="ad60ff24982cdb3ce38b8c17e0b4f0acc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__can__interface__gr.html#structARM__CAN__STATUS">ARM_CAN_STATUS</a>(* GetStatus)(void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__can__interface__gr.html#ga676d6b567fc4ab3d44f5d7a50ec9419c">ARM_CAN_GetStatus</a> : Get CAN status. </p>

</div>
</div>

</div>
</div>
<a name="structARM__CAN__CAPABILITIES" id="structARM__CAN__CAPABILITIES"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct ARM_CAN_CAPABILITIES</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>CAN Device Driver Capabilities. </p>
<p>A CAN driver can be implemented with different capabilities encoded in the data fields of this structure.</p>
<p><b>Returned by:</b></p>
<ul>
<li><a class="el" href="group__can__interface__gr.html#ga35f21cabe1637b1be964024a8f77721c">ARM_CAN_GetCapabilities</a></li>
</ul>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__can__interface__gr.html#structARM__CAN__OBJ__CAPABILITIES">ARM_CAN_OBJ_CAPABILITIES</a> for information about CAN objects. </dd></dl>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a69bd1a164443cf6f501489f4d31f4681"></a>uint32_t</td>
<td class="fieldname">
num_objects: 8</td>
<td class="fielddoc">
Number of <a class="el" href="group__can__interface__gr.html#can_objects">CAN Message Objects</a> available. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ae0514834750c7452431717a881471e2b"></a>uint32_t</td>
<td class="fieldname">
reentrant_operation: 1</td>
<td class="fielddoc">
Support for reentrant calls to <a class="el" href="group__can__interface__gr.html#ga0dcffd362b4093043442a030eaebbcfe">ARM_CAN_MessageSend</a>, <a class="el" href="group__can__interface__gr.html#gafc37084df5eab32f593c2744d35cf647">ARM_CAN_MessageRead</a>, <a class="el" href="group__can__interface__gr.html#ga00ec0715f6755a49dae5b60dca182630">ARM_CAN_ObjectConfigure</a> and abort message sending used by <a class="el" href="group__can__interface__gr.html#ga8d9f0c5f03a8a81ab062b5aa57e5dea4">ARM_CAN_Control</a>. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a15d22d5906d419ed1a7ca0968be00a04"></a>uint32_t</td>
<td class="fieldname">
fd_mode: 1</td>
<td class="fielddoc">
Support for CAN with flexible data-rate mode (CAN_FD) (set by <a class="el" href="group__can__interface__gr.html#ga8d9f0c5f03a8a81ab062b5aa57e5dea4">ARM_CAN_Control</a>) </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a93008ac105806db484e78e0582ca118c"></a>uint32_t</td>
<td class="fieldname">
restricted_mode: 1</td>
<td class="fielddoc">
Support for restricted operation mode (set by <a class="el" href="group__can__interface__gr.html#ga28226a6e223f9b95b4dafb7c2f48a855">ARM_CAN_SetMode</a>) </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a176f42e68d9cba86b3594c40044b86c6"></a>uint32_t</td>
<td class="fieldname">
monitor_mode: 1</td>
<td class="fielddoc">
Support for bus monitoring mode (set by <a class="el" href="group__can__interface__gr.html#ga28226a6e223f9b95b4dafb7c2f48a855">ARM_CAN_SetMode</a>) </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="af19cdbb26d3496ed7dd63a59a7c7711f"></a>uint32_t</td>
<td class="fieldname">
internal_loopback: 1</td>
<td class="fielddoc">
Support for internal loopback mode (set by <a class="el" href="group__can__interface__gr.html#ga28226a6e223f9b95b4dafb7c2f48a855">ARM_CAN_SetMode</a>) </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a2b76df7e4bfbdd9866cc906415e626c9"></a>uint32_t</td>
<td class="fieldname">
external_loopback: 1</td>
<td class="fielddoc">
Support for external loopback mode (set by <a class="el" href="group__can__interface__gr.html#ga28226a6e223f9b95b4dafb7c2f48a855">ARM_CAN_SetMode</a>) </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa43c4c21b173ada1b6b7568956f0d650"></a>uint32_t</td>
<td class="fieldname">
reserved: 18</td>
<td class="fielddoc">
Reserved (must be zero) </td></tr>
</table>

</div>
</div>
<a name="structARM__CAN__STATUS" id="structARM__CAN__STATUS"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct ARM_CAN_STATUS</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>CAN Status. </p>
<p>Structure with information about the status of the CAN unit state and errors. The data fields encode the unit bus state, last error code, transmitter error count, and receiver error count.</p>
<p><b>Returned by:</b></p>
<ul>
<li><a class="el" href="group__can__interface__gr.html#ga676d6b567fc4ab3d44f5d7a50ec9419c">ARM_CAN_GetStatus</a> </li>
</ul>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a96ec94acab56690b3801e3c5fbd09fa2"></a>uint32_t</td>
<td class="fieldname">
unit_state: 4</td>
<td class="fielddoc">
Unit bus state. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a2171ea8dff5e4b54e84728aa134854b6"></a>uint32_t</td>
<td class="fieldname">
last_error_code: 4</td>
<td class="fielddoc">
Last error code. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a8941505f6f3ebd69825c4382184c580f"></a>uint32_t</td>
<td class="fieldname">
tx_error_count: 8</td>
<td class="fielddoc">
Transmitter error count. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ab7e8b863b379b786ad1af935aa3ef2e8"></a>uint32_t</td>
<td class="fieldname">
rx_error_count: 8</td>
<td class="fielddoc">
Receiver error count. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa43c4c21b173ada1b6b7568956f0d650"></a>uint32_t</td>
<td class="fieldname">
reserved: 8</td>
<td class="fielddoc">
</td></tr>
</table>

</div>
</div>
<a name="structARM__CAN__MSG__INFO" id="structARM__CAN__MSG__INFO"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct ARM_CAN_MSG_INFO</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>CAN Message Information. </p>
<p>Structure with information about the CAN message.</p>
<p>In CAN mode, the following <a class="el" href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">ARM_CAN_MSG_INFO</a> data fields are ignored: <em>edl</em>, <em>brs</em>, <em>esi</em>. <br/>
In CAN FD mode, the following <a class="el" href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">ARM_CAN_MSG_INFO</a> data field is ignored: <em>rtr</em>.</p>
<p><b>Parameter for:</b></p>
<ul>
<li><a class="el" href="group__can__interface__gr.html#ga0dcffd362b4093043442a030eaebbcfe">ARM_CAN_MessageSend</a></li>
<li><a class="el" href="group__can__interface__gr.html#gafc37084df5eab32f593c2744d35cf647">ARM_CAN_MessageRead</a></li>
</ul>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__can__interface__gr.html#can_filtering">CAN Message Filtering</a> </dd>
<dd>
<a class="el" href="group__can__interface__gr.html#Remote_Frame">Remote Frame</a> </dd></dl>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="abaabdc509cdaba7df9f56c6c76f3ae19"></a>uint32_t</td>
<td class="fieldname">
id</td>
<td class="fielddoc">
CAN identifier with frame format specifier (bit 31) </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a1f32fc9e5d3b33babf5905140e7a53af"></a>uint32_t</td>
<td class="fieldname">
rtr: 1</td>
<td class="fielddoc">
Remote transmission request frame. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ab6883964c9d4bdf60616684e8d2459df"></a>uint32_t</td>
<td class="fieldname">
edl: 1</td>
<td class="fielddoc">
Flexible data-rate format extended data length. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a3539c043c5868c59f76c736fe2bcadf4"></a>uint32_t</td>
<td class="fieldname">
brs: 1</td>
<td class="fielddoc">
Flexible data-rate format with bitrate switch. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ada78e3124de6adf5a5d212f9ebc4bbe0"></a>uint32_t</td>
<td class="fieldname">
esi: 1</td>
<td class="fielddoc">
Flexible data-rate format error state indicator. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a811fbb0cb2c2263b1a7440a7e9d78239"></a>uint32_t</td>
<td class="fieldname">
dlc: 4</td>
<td class="fielddoc">
Data length code. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa43c4c21b173ada1b6b7568956f0d650"></a>uint32_t</td>
<td class="fieldname">
reserved: 24</td>
<td class="fielddoc">
</td></tr>
</table>

</div>
</div>
<a name="structARM__CAN__OBJ__CAPABILITIES" id="structARM__CAN__OBJ__CAPABILITIES"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct ARM_CAN_OBJ_CAPABILITIES</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>CAN Object Capabilities. </p>
<p>A CAN object can be implemented with different capabilities encoded in the data fields of this structure.</p>
<p><b>Returned by</b>:</p>
<ul>
<li><a class="el" href="group__can__interface__gr.html#ga45ab314f5121cf5a1b32d9adc600e0f7">ARM_CAN_ObjectGetCapabilities</a></li>
</ul>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__can__interface__gr.html#ga00ec0715f6755a49dae5b60dca182630">ARM_CAN_ObjectConfigure</a> </dd>
<dd>
<a class="el" href="group__can__interface__gr.html#ga0dcffd362b4093043442a030eaebbcfe">ARM_CAN_MessageSend</a> </dd>
<dd>
<a class="el" href="group__can__interface__gr.html#gafc37084df5eab32f593c2744d35cf647">ARM_CAN_MessageRead</a> </dd>
<dd>
<a class="el" href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">ARM_CAN_MSG_INFO</a> </dd>
<dd>
<a class="el" href="group__can__interface__gr.html#can_filtering">CAN Message Filtering</a> </dd></dl>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a9706173b2ed538efeb5ee4a952e2272f"></a>uint32_t</td>
<td class="fieldname">
tx: 1</td>
<td class="fielddoc">
Object supports transmission. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a895532773c3204e1538191f155c7bac8"></a>uint32_t</td>
<td class="fieldname">
rx: 1</td>
<td class="fielddoc">
Object supports reception. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a8a41139926d7c032247458d055071fda"></a>uint32_t</td>
<td class="fieldname">
rx_rtr_tx_data: 1</td>
<td class="fielddoc">
Object supports RTR reception and automatic Data Frame transmission. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a1debac19545140bdfe3c5fa8d53f1863"></a>uint32_t</td>
<td class="fieldname">
tx_rtr_rx_data: 1</td>
<td class="fielddoc">
Object supports RTR transmission and automatic Data Frame reception. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a3662fb9a8fb81212043cadd90da704af"></a>uint32_t</td>
<td class="fieldname">
multiple_filters: 1</td>
<td class="fielddoc">
Object allows assignment of multiple filters to it. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a886337af58da4f995529eba228fb9b7a"></a>uint32_t</td>
<td class="fieldname">
exact_filtering: 1</td>
<td class="fielddoc">
Object supports exact identifier filtering. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a96dcf869f4adc9cec686630082c7c60a"></a>uint32_t</td>
<td class="fieldname">
range_filtering: 1</td>
<td class="fielddoc">
Object supports range identifier filtering. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a2aa0e772d6cb8c30bb76ce1324423464"></a>uint32_t</td>
<td class="fieldname">
mask_filtering: 1</td>
<td class="fielddoc">
Object supports mask identifier filtering. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a5a782fc223b0ea5034c6676eaec6f2d4"></a>uint32_t</td>
<td class="fieldname">
message_depth: 8</td>
<td class="fielddoc">
Number of messages buffers (FIFO) for that object. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa43c4c21b173ada1b6b7568956f0d650"></a>uint32_t</td>
<td class="fieldname">
reserved: 16</td>
<td class="fielddoc">
Reserved (must be zero) </td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="gaac07b9fdf614bf439414f5417aaa376e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ARM_CAN_SignalUnitEvent_t</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__can__interface__gr.html#ga38795d1ed135ce3bd87f31ef1596bccf">ARM_CAN_SignalUnitEvent</a> : Signal CAN Unit Event. </p>
<p>Provides the typedef for the callback function <a class="el" href="group__can__interface__gr.html#ga38795d1ed135ce3bd87f31ef1596bccf">ARM_CAN_SignalUnitEvent</a>.</p>
<p><b>Parameter for:</b></p>
<ul>
<li><a class="el" href="group__can__interface__gr.html#gaa72ceb25ba67e279d7432404632deb44">ARM_CAN_Initialize</a> </li>
</ul>

</div>
</div>
<a class="anchor" id="ga7ceceac3e9aa0981c5cacfab88efb4eb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ARM_CAN_SignalObjectEvent_t</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__can__interface__gr.html#gabfcaeac9e2ca25936ba5a29f2d594e7e">ARM_CAN_SignalObjectEvent</a> : Signal CAN Object Event. </p>
<p>Provides the typedef for the callback function <a class="el" href="group__can__interface__gr.html#gabfcaeac9e2ca25936ba5a29f2d594e7e">ARM_CAN_SignalObjectEvent</a>.</p>
<p><b>Parameter for:</b></p>
<ul>
<li><a class="el" href="group__can__interface__gr.html#gaa72ceb25ba67e279d7432404632deb44">ARM_CAN_Initialize</a> </li>
</ul>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga4256d5b23ffcb27759a05f8e6b854f13"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a> ARM_CAN_GetVersion </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get driver version. </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a></dd></dl>
<p>The function <b>ARM_CAN_GetVersion</b> returns version information of the driver implementation in <a class="el" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a></p>
<ul>
<li>API version is the version of the CMSIS-Driver specification used to implement this driver.</li>
<li>Driver version is source code version of the actual driver implementation.</li>
</ul>
<p>Example: </p>
<div class="fragment"><div class="line"><span class="keyword">extern</span> <a class="code" href="group__can__interface__gr.html#structARM__DRIVER__CAN">ARM_DRIVER_CAN</a> Driver_CAN0;</div>
<div class="line"><a class="code" href="group__can__interface__gr.html#structARM__DRIVER__CAN">ARM_DRIVER_CAN</a> *drv_info;</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">void</span> setup_can (<span class="keywordtype">void</span>)  {</div>
<div class="line">  <a class="code" href="group__common__drv__gr.html#structARM__DRIVER__VERSION">ARM_DRIVER_VERSION</a>  version;</div>
<div class="line"></div>
<div class="line">  drv_info = &amp;Driver_CAN0;</div>
<div class="line">  version = drv_info-&gt;<a class="code" href="group__can__interface__gr.html#a8834b281da48583845c044a81566c1b3">GetVersion</a> ();</div>
<div class="line">  <span class="keywordflow">if</span> (version.<a class="code" href="group__common__drv__gr.html#ad180da20fbde1d3dafc074af87c19540">api</a> &lt; 0x10A)   {      <span class="comment">// requires at minimum API version 1.10 or higher</span></div>
<div class="line">    <span class="comment">// error handling</span></div>
<div class="line">    <span class="keywordflow">return</span>;</div>
<div class="line">  }</div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga35f21cabe1637b1be964024a8f77721c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__can__interface__gr.html#structARM__CAN__CAPABILITIES">ARM_CAN_CAPABILITIES</a> ARM_CAN_GetCapabilities </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get driver capabilities. </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__can__interface__gr.html#structARM__CAN__CAPABILITIES">ARM_CAN_CAPABILITIES</a></dd></dl>
<p>The function <b>ARM_CAN_GetCapabilities</b> returns information about the capabilities in this driver implementation. The data fields of the structure <a class="el" href="group__can__interface__gr.html#structARM__CAN__CAPABILITIES">ARM_CAN_CAPABILITIES</a> encode various capabilities.</p>
<p>Example: </p>
<div class="fragment"><div class="line"><span class="keyword">extern</span> <a class="code" href="group__can__interface__gr.html#structARM__DRIVER__CAN">ARM_DRIVER_CAN</a> Driver_CAN0;</div>
<div class="line"><a class="code" href="group__can__interface__gr.html#structARM__DRIVER__CAN">ARM_DRIVER_CAN</a> *drv_info;</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">void</span> read_capabilities (<span class="keywordtype">void</span>)  {</div>
<div class="line">  <a class="code" href="group__can__interface__gr.html#structARM__CAN__CAPABILITIES">ARM_CAN_CAPABILITIES</a> drv_capabilities;</div>
<div class="line"></div>
<div class="line">  drv_info = &amp;Driver_CAN0;</div>
<div class="line">  drv_capabilities = drv_info-&gt;<a class="code" href="group__can__interface__gr.html#a62c0c62c2bf482c000b1b2a2c817a96f">GetCapabilities</a> ();</div>
<div class="line">  <span class="comment">// interrogate capabilities</span></div>
<div class="line"></div>
<div class="line">}</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="gaa72ceb25ba67e279d7432404632deb44"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_CAN_Initialize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__can__interface__gr.html#gaac07b9fdf614bf439414f5417aaa376e">ARM_CAN_SignalUnitEvent_t</a>&#160;</td>
          <td class="paramname"><em>cb_unit_event</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__can__interface__gr.html#ga7ceceac3e9aa0981c5cacfab88efb4eb">ARM_CAN_SignalObjectEvent_t</a>&#160;</td>
          <td class="paramname"><em>cb_object_event</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize CAN interface and register signal (callback) functions. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cb_unit_event</td><td>Pointer to <a class="el" href="group__can__interface__gr.html#ga38795d1ed135ce3bd87f31ef1596bccf">ARM_CAN_SignalUnitEvent</a> callback function </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cb_object_event</td><td>Pointer to <a class="el" href="group__can__interface__gr.html#gabfcaeac9e2ca25936ba5a29f2d594e7e">ARM_CAN_SignalObjectEvent</a> callback function </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>initializes</b> the CAN interface.</p>
<p>The function performs the following operations:</p>
<ul>
<li>Initializes the resources needed for the CAN interface, for example dynamic memory allocation, RTOS object allocation, and possibly hardware pin configuration.</li>
<li>Registers the <a class="el" href="group__can__interface__gr.html#ga38795d1ed135ce3bd87f31ef1596bccf">ARM_CAN_SignalUnitEvent</a> callback function.</li>
<li>Registers the <a class="el" href="group__can__interface__gr.html#gabfcaeac9e2ca25936ba5a29f2d594e7e">ARM_CAN_SignalObjectEvent</a> callback function.</li>
</ul>
<p>The parameter <em>cb_unit_event</em> is a pointer to the <a class="el" href="group__can__interface__gr.html#ga38795d1ed135ce3bd87f31ef1596bccf">ARM_CAN_SignalUnitEvent</a> callback function; use a NULL pointer when no callback signals are required.</p>
<p>The parameter <em>cb_object_event</em> is a pointer to the <a class="el" href="group__can__interface__gr.html#gabfcaeac9e2ca25936ba5a29f2d594e7e">ARM_CAN_SignalObjectEvent</a> callback function; use a NULL pointer when no callback signals are required.</p>
<p><b>Example:</b> </p>
<ul>
<li>see <a class="el" href="group__can__interface__gr.html">CAN Interface</a> </li>
</ul>

</div>
</div>
<a class="anchor" id="ga1e3e364b64f2ab277399e3279cce5ef8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_CAN_Uninitialize </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>De-initialize CAN interface. </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>ARM_CAN_Uninitialize</b> de-initializes the resources of the CAN interface. It is called to release the software resources used by the interface such as deallocate any RTOS objects, dynamic memory and pin de-configuration. </p>

</div>
</div>
<a class="anchor" id="ga6f634f126ac97daef2f3115aa7bfed7c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_CAN_PowerControl </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__common__drv__gr.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5">ARM_POWER_STATE</a>&#160;</td>
          <td class="paramname"><em>state</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Control CAN interface power. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">state</td><td>Power state<ul>
<li><a class="el" href="Driver__Common_8h.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5ab6f5becc85ebd51c3dd2524a95d2ca35">ARM_POWER_OFF</a> : power off: no operation possible</li>
<li><a class="el" href="Driver__Common_8h.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5a9ef9e57cbcc948d0e22314e73dc8c434">ARM_POWER_LOW</a> : low power mode: retain state, detect and signal wake-up events</li>
<li><a class="el" href="Driver__Common_8h.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5abed52b77a9ce4775570e44a842b1295e">ARM_POWER_FULL</a> : power on: full operation at maximum performance </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>ARM_CAN_PowerControl</b> controls the power modes of the CAN interface.</p>
<p>The parameter <em>state</em> can be:</p>
<ul>
<li>ARM_POWER_FULL: Activate clocks and driver functionality as if peripheral was reset.</li>
<li>ARM_POWER_OFF: Unconditionally put peripheral into non-functional (reset) state.</li>
<li>ARM_POWER_LOW: Put peripheral into low power consumption state ready to wake up on bus event. </li>
</ul>

</div>
</div>
<a class="anchor" id="ga1fe6cc207415de604975ae251e269361"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ARM_CAN_GetClock </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieve CAN base clock frequency. </p>
<dl class="section return"><dt>Returns</dt><dd>base clock frequency</dd></dl>
<p>The function <b>ARM_CAN_GetClock</b> returns the CAN base clock frequency in <span class="XML-Token">[Hz]</span>. This value may be used to validate the <em>bitrate</em> for the function <a class="el" href="group__can__interface__gr.html#ga88bb27a8525503a250cca7a2c4a5d07a">ARM_CAN_SetBitrate</a>.</p>
<p><b>Example</b>: </p>
<div class="fragment"><div class="line">CAN_clock = <a class="code" href="group__can__interface__gr.html#ga1fe6cc207415de604975ae251e269361">ARM_CAN_GetClock</a>();  <span class="comment">// CAN base clock frequency</span></div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="ga88bb27a8525503a250cca7a2c4a5d07a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_CAN_SetBitrate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__can__timeseg__ctrls.html#ga11c12020b81a63a73a8b53e96a7e3dea">ARM_CAN_BITRATE_SELECT</a>&#160;</td>
          <td class="paramname"><em>select</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>bitrate</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>bit_segments</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set bitrate for CAN interface. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">select</td><td>Bitrate selection<ul>
<li><a class="el" href="Driver__CAN_8h.html#ga11c12020b81a63a73a8b53e96a7e3deaa3b6d191c99f1eba4f01bcc5fbfaf67f3">ARM_CAN_BITRATE_NOMINAL</a> : nominal (flexible data-rate arbitration) bitrate</li>
<li><a class="el" href="Driver__CAN_8h.html#ga11c12020b81a63a73a8b53e96a7e3deaaa6c9996de0cdf42da5c02086cd8f16dc">ARM_CAN_BITRATE_FD_DATA</a> : flexible data-rate data bitrate </li>
</ul>
</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bitrate</td><td>Bitrate </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bit_segments</td><td>Bit segments settings<ul>
<li><a class="el" href="group__can__timeseg__ctrls.html#ga01183319a5a899eafea9ffe7af73d5ea">ARM_CAN_BIT_PROP_SEG(x)</a> : number of time quanta for propagation time segment</li>
<li><a class="el" href="group__can__timeseg__ctrls.html#ga03f1921ee97a7ebf5d767b6cacf40792">ARM_CAN_BIT_PHASE_SEG1(x)</a> : number of time quanta for phase buffer segment 1</li>
<li><a class="el" href="group__can__timeseg__ctrls.html#ga76de056d56803cb7a0d01978ee981e80">ARM_CAN_BIT_PHASE_SEG2(x)</a> : number of time quanta for phase buffer Segment 2</li>
<li><a class="el" href="group__can__timeseg__ctrls.html#gab32e97fa4edf497c111dd3f0d8779269">ARM_CAN_BIT_SJW(x)</a> : number of time quanta for (re-)synchronization jump width </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>ARM_CAN_SetBitrate</b> sets the CAN communication bit rate.</p>
<p>The parameter <em>select</em> selects the bit rate affected by function call as defined in <a class="el" href="group__can__timeseg__ctrls.html#ga11c12020b81a63a73a8b53e96a7e3dea">ARM_CAN_BITRATE_SELECT</a> and listed in the table below.</p>
<table class="doxtable">
<tr>
<th align="left">Parameter <em>select</em> </th><th align="left">CAN Mode Bit Rate  </th></tr>
<tr>
<td align="left"><a class="el" href="Driver__CAN_8h.html#ga11c12020b81a63a73a8b53e96a7e3deaa3b6d191c99f1eba4f01bcc5fbfaf67f3">ARM_CAN_BITRATE_NOMINAL</a> </td><td align="left">Select nominal (flexible data-rate arbitration) bitrate (CAN 2.0B) </td></tr>
<tr>
<td align="left"><a class="el" href="Driver__CAN_8h.html#ga11c12020b81a63a73a8b53e96a7e3deaaa6c9996de0cdf42da5c02086cd8f16dc">ARM_CAN_BITRATE_FD_DATA</a> </td><td align="left">Select flexible data-rate data bitrate (<a class="el" href="group__can__interface__gr.html#CAN_FD">CAN_FD</a>) </td></tr>
</table>
<p>The parameter <em>bitrate</em> is the bit rate for the selected CAN mode.</p>
<p>The parameter <em>bit_segments</em> is used to setup the time quanta for sampling (see picture below). The values listed in the table below are ORed and specify the various sampling segments. The CAN controller samples each bit on the bus at the <em>Sample Point</em>.</p>
<table  class="cmtable">
<tr>
<th>Parameter <em>bit_segments</em>  </th><th>Bit </th><th>for <em>select</em> = <a class="el" href="Driver__CAN_8h.html#ga11c12020b81a63a73a8b53e96a7e3deaa3b6d191c99f1eba4f01bcc5fbfaf67f3">ARM_CAN_BITRATE_NOMINAL</a> <br/>
 (CAN specification) </th><th>for <em>select</em> = <a class="el" href="Driver__CAN_8h.html#ga11c12020b81a63a73a8b53e96a7e3deaa3b6d191c99f1eba4f01bcc5fbfaf67f3">ARM_CAN_BITRATE_NOMINAL</a> <br/>
 (CAN FD specification) </th><th>for <em>select</em> = <a class="el" href="Driver__CAN_8h.html#ga11c12020b81a63a73a8b53e96a7e3deaaa6c9996de0cdf42da5c02086cd8f16dc">ARM_CAN_BITRATE_FD_DATA</a> <br/>
 (CAN FD specification)  </th></tr>
<tr>
<td><a class="el" href="group__can__timeseg__ctrls.html#ga01183319a5a899eafea9ffe7af73d5ea">ARM_CAN_BIT_PROP_SEG</a>(<em>x</em>) <br/>
 Propagation Time Segment <br/>
 (PROP_SEG)  </td><td>0..7  </td><td><em>x</em> = <span class="XML-Token">[1..8]</span> </td><td><em>x</em> = <span class="XML-Token">[1..32] or more</span> </td><td><em>x</em> = <span class="XML-Token">[0..8]</span>  </td></tr>
<tr>
<td><a class="el" href="group__can__timeseg__ctrls.html#ga03f1921ee97a7ebf5d767b6cacf40792">ARM_CAN_BIT_PHASE_SEG1</a>(<em>x</em>) <br/>
 Phase Buffer Segment 1 <br/>
 (PHASE_SEG1)  </td><td>8..15  </td><td><em>x</em> = <span class="XML-Token">[1..8]</span> </td><td><em>x</em> = <span class="XML-Token">[1..32] or more</span> </td><td><em>x</em> = <span class="XML-Token">[1..8]</span>  </td></tr>
<tr>
<td rowspan="2"><a class="el" href="group__can__timeseg__ctrls.html#ga76de056d56803cb7a0d01978ee981e80">ARM_CAN_BIT_PHASE_SEG2</a>(<em>x</em>) <br/>
 Phase Buffer Segment 2 <br/>
 (PHASE_SEG2)  </td><td rowspan="2">16..23  </td><td><em>x</em> = <span class="XML-Token">[1..8]</span>  </td><td><em>x</em> = <span class="XML-Token">[1..32] or more</span> </td><td><em>x</em> = <span class="XML-Token">[1..8]</span> </td></tr>
<tr>
<td colspan="3">The maximum allowed value is <span class="XML-Token">x = MAX (PHASE_SEG1, IPT)</span>. IPT = Information Processing Time. Usually, IPT = <span class="XML-Token">2</span>. Exceptions apply. Read the specifications of your CAN controller.  </td></tr>
<tr>
<td rowspan="2"><a class="el" href="group__can__timeseg__ctrls.html#gab32e97fa4edf497c111dd3f0d8779269">ARM_CAN_BIT_SJW</a>(<em>x</em>) <br/>
 (Re-)Synchronization Jump Width <br/>
 (SJW).  </td><td rowspan="2">24..31  </td><td><em>x</em> = <span class="XML-Token">[1..4]</span> </td><td><em>x</em> = <span class="XML-Token">[1..4]</span> </td><td><em>x</em> = <span class="XML-Token">[1..4]</span> </td></tr>
<tr>
<td colspan="3">The maximum allowed value is <span class="XML-Token">x = MIN (MIN (PHASE_SEG1, PHASE_SEG2), 4)</span>. SJW is not allowed to be greater than either PHASE segment.   </td></tr>
</table>
<p>The picture shows a Nominal Bit Time with 10 time quanta. </p>
<div class="image">
<img src="CAN_Bit_Timing.png" alt="CAN_Bit_Timing.png"/>
<div class="caption">
CAN Bit Timing</div></div>
<p>The time quanta (N) per bit is: </p>
<div class="fragment"><div class="line">N = 1 + PROP_SEG + PHASE_SEG1 + PHASE_SEG2; <span class="comment">// note SYNC_SEG is always 1</span></div>
</div><!-- fragment --><p>The driver uses this value and the CAN clock to calculate a suitable prescaler value (P). If the driver cannot achieve the requested <em>bitrate</em> it returns with <a class="el" href="Driver__CAN_8h.html#a90b9d9323a6049fb4fcd1efe7c892294">ARM_CAN_INVALID_BITRATE</a>. The formula for the <em>bitrate</em> is: </p>
<div class="fragment"><div class="line">bitrate = (CAN_Clock / P) / N;</div>
</div><!-- fragment --><p><b>Example</b>: </p>
<div class="fragment"><div class="line">status = ptrCAN-&gt;SetBitrate    (<a class="code" href="Driver__CAN_8h.html#ga11c12020b81a63a73a8b53e96a7e3deaa3b6d191c99f1eba4f01bcc5fbfaf67f3">ARM_CAN_BITRATE_NOMINAL</a>,              <span class="comment">// Set nominal bitrate</span></div>
<div class="line">                                125000U,                              <span class="comment">// Set bitrate to 125 kbit/s</span></div>
<div class="line">                                <a class="code" href="group__can__timeseg__ctrls.html#ga01183319a5a899eafea9ffe7af73d5ea">ARM_CAN_BIT_PROP_SEG</a>(5U)   |          <span class="comment">// Set propagation segment to 5 time quanta</span></div>
<div class="line">                                <a class="code" href="group__can__timeseg__ctrls.html#ga03f1921ee97a7ebf5d767b6cacf40792">ARM_CAN_BIT_PHASE_SEG1</a>(1U) |          <span class="comment">// Set phase segment 1 to 1 time quantum (sample point at 87.5% of bit time)</span></div>
<div class="line">                                <a class="code" href="group__can__timeseg__ctrls.html#ga76de056d56803cb7a0d01978ee981e80">ARM_CAN_BIT_PHASE_SEG2</a>(1U) |          <span class="comment">// Set phase segment 2 to 1 time quantum (total bit is 8 time quanta long)</span></div>
<div class="line">                                <a class="code" href="group__can__timeseg__ctrls.html#gab32e97fa4edf497c111dd3f0d8779269">ARM_CAN_BIT_SJW</a>(1U));                 <span class="comment">// Resynchronization jump width is same as phase segment 2</span></div>
</div><!-- fragment --><p>In this example, N = 8 and with a CAN_Clock = 8MHz the prescaler (P) is calculated by the driver to 8. </p>

</div>
</div>
<a class="anchor" id="ga28226a6e223f9b95b4dafb7c2f48a855"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_CAN_SetMode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__can__bus__mode__ctrls.html#gabbca99c46d478bcf822eee71cdf75dcd">ARM_CAN_MODE</a>&#160;</td>
          <td class="paramname"><em>mode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set operating mode for CAN interface. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mode</td><td>Operating mode<ul>
<li><a class="el" href="Driver__CAN_8h.html#gabbca99c46d478bcf822eee71cdf75dcda9967a5ebaa045afe54d75e5629676ddc">ARM_CAN_MODE_INITIALIZATION</a> : initialization mode</li>
<li><a class="el" href="Driver__CAN_8h.html#gabbca99c46d478bcf822eee71cdf75dcdaa3190344bdf3452462e5c0518ac3cdc4">ARM_CAN_MODE_NORMAL</a> : normal operation mode</li>
<li><a class="el" href="Driver__CAN_8h.html#gabbca99c46d478bcf822eee71cdf75dcda22a9bb26e68c2a04f641d466040d755d">ARM_CAN_MODE_RESTRICTED</a> : restricted operation mode</li>
<li><a class="el" href="Driver__CAN_8h.html#gabbca99c46d478bcf822eee71cdf75dcda904f68f08c84c4b85c763f5d98c574ab">ARM_CAN_MODE_MONITOR</a> : bus monitoring mode</li>
<li><a class="el" href="Driver__CAN_8h.html#gabbca99c46d478bcf822eee71cdf75dcda8579315576baa43860a398a30fd527d8">ARM_CAN_MODE_LOOPBACK_INTERNAL</a> : loopback internal mode</li>
<li><a class="el" href="Driver__CAN_8h.html#gabbca99c46d478bcf822eee71cdf75dcda5ee1ba60abcf39d575e7cb309e641b9b">ARM_CAN_MODE_LOOPBACK_EXTERNAL</a> : loopback external mode </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>ARM_CAN_SetMode</b> sets the CAN bus communication mode using the parameter <em>mode</em>.</p>
<p>The table lists the values for <em>mode</em>.</p>
<table  class="cmtable">
<tr>
<th>Parameter <em>mode</em>  </th><th>Bus Communication Mode </th><th>supported when <a class="el" href="group__can__interface__gr.html#structARM__CAN__OBJ__CAPABILITIES">ARM_CAN_OBJ_CAPABILITIES</a> data field  </th></tr>
<tr>
<td><a class="el" href="Driver__CAN_8h.html#gabbca99c46d478bcf822eee71cdf75dcda9967a5ebaa045afe54d75e5629676ddc">ARM_CAN_MODE_INITIALIZATION</a> </td><td>Initialization mode; Used to setup communication parameters for the reception objects and global filtering, while peripheral is not active on the bus. Refer to <a class="el" href="group__can__interface__gr.html#can_filtering">CAN Message Filtering</a> for details. </td><td><em>always supported</em>  </td></tr>
<tr>
<td><a class="el" href="Driver__CAN_8h.html#gabbca99c46d478bcf822eee71cdf75dcdaa3190344bdf3452462e5c0518ac3cdc4">ARM_CAN_MODE_NORMAL</a> </td><td>Normal operation mode. Used when peripheral is in active mode to receive, transmit, and acknowledge messages on the bus. Depending on the current unit state, it can generate error or overload messages. Verify the unit state with <a class="el" href="group__can__interface__gr.html#ga676d6b567fc4ab3d44f5d7a50ec9419c">ARM_CAN_GetStatus</a>. </td><td><em>always supported</em>  </td></tr>
<tr>
<td><a class="el" href="Driver__CAN_8h.html#gabbca99c46d478bcf822eee71cdf75dcda22a9bb26e68c2a04f641d466040d755d">ARM_CAN_MODE_RESTRICTED</a> </td><td>Restricted operation mode. Used for monitoring the bus communication non-intrusively without transmitting. </td><td><em>restricted_mode</em> = <span class="XML-Token">1</span>  </td></tr>
<tr>
<td><a class="el" href="Driver__CAN_8h.html#gabbca99c46d478bcf822eee71cdf75dcda904f68f08c84c4b85c763f5d98c574ab">ARM_CAN_MODE_MONITOR</a> </td><td>Bus monitoring mode. </td><td><em>monitor_mode</em> = <span class="XML-Token">1</span>  </td></tr>
<tr>
<td><a class="el" href="Driver__CAN_8h.html#gabbca99c46d478bcf822eee71cdf75dcda8579315576baa43860a398a30fd527d8">ARM_CAN_MODE_LOOPBACK_INTERNAL</a> </td><td>Test mode; loopback of CAN transmission to its receiver. No transmission visible on CAN bus. </td><td><em>internal_loopback</em> = <span class="XML-Token">1</span>  </td></tr>
<tr>
<td><a class="el" href="Driver__CAN_8h.html#gabbca99c46d478bcf822eee71cdf75dcda5ee1ba60abcf39d575e7cb309e641b9b">ARM_CAN_MODE_LOOPBACK_EXTERNAL</a> </td><td>Test mode; loopback of CAN transmission to its receiver. Transmission is visible on CAN bus. </td><td><em>external_loopback</em> = <span class="XML-Token">1</span>  </td></tr>
</table>

</div>
</div>
<a class="anchor" id="ga45ab314f5121cf5a1b32d9adc600e0f7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__can__interface__gr.html#structARM__CAN__OBJ__CAPABILITIES">ARM_CAN_OBJ_CAPABILITIES</a> ARM_CAN_ObjectGetCapabilities </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>obj_idx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieve capabilities of an object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">obj_idx</td><td>Object index </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__can__interface__gr.html#structARM__CAN__OBJ__CAPABILITIES">ARM_CAN_OBJ_CAPABILITIES</a></dd></dl>
<p>The function <b>ARM_CAN_ObjectGetCapabilities</b> retrieves the capabilities of a CAN object. The structure <a class="el" href="group__can__interface__gr.html#structARM__CAN__OBJ__CAPABILITIES">ARM_CAN_OBJ_CAPABILITIES</a> stores the values.</p>
<p>The parameter <em>obj_idx</em> is the message object index.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__can__interface__gr.html#ga00ec0715f6755a49dae5b60dca182630" title="Configure object. ">ARM_CAN_ObjectConfigure</a> </dd>
<dd>
<a class="el" href="group__can__interface__gr.html#ga4f9bc7088704483388e14872c9d5385d" title="Add or remove filter for message reception. ">ARM_CAN_ObjectSetFilter</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga4f9bc7088704483388e14872c9d5385d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_CAN_ObjectSetFilter </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>obj_idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__can__filter__operation__ctrls.html#gacb04d0f8b3969ee69362ff2b62941d75">ARM_CAN_FILTER_OPERATION</a>&#160;</td>
          <td class="paramname"><em>operation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add or remove filter for message reception. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">obj_idx</td><td>Object index of object that filter should be or is assigned to </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">operation</td><td>Operation on filter<ul>
<li><a class="el" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75aa734058b50573de3b0cc49311997806b">ARM_CAN_FILTER_ID_EXACT_ADD</a> : add exact id filter</li>
<li><a class="el" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75a6fdaecf3fa244ef1e4d1069d9c6c95f8">ARM_CAN_FILTER_ID_EXACT_REMOVE</a> : remove exact id filter</li>
<li><a class="el" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75a22123bef8e773844fce604c553bf2ed5">ARM_CAN_FILTER_ID_RANGE_ADD</a> : add range id filter</li>
<li><a class="el" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75a17fea7d388dc702bb3318ecae911f50d">ARM_CAN_FILTER_ID_RANGE_REMOVE</a> : remove range id filter</li>
<li><a class="el" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75ac4ad302fa9b762c1d14964141e234ba9">ARM_CAN_FILTER_ID_MASKABLE_ADD</a> : add maskable id filter</li>
<li><a class="el" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75ad9573d5d0e112aece7abc0bc24aa92fb">ARM_CAN_FILTER_ID_MASKABLE_REMOVE</a> : remove maskable id filter </li>
</ul>
</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>ID or start of ID range (depending on filter type) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">arg</td><td>Mask or end of ID range (depending on filter type) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>ARM_CAN_ObjectSetFilter</b> sets or removes the filter for message reception. Refer to <a class="el" href="group__can__interface__gr.html#can_filtering">CAN Message Filtering</a> for details on filtering.</p>
<p>The parameter <em>obj_idx</em> is the message object index. <br/>
The parameter <em>operation</em> is the operation on the filter as listed in the table below and which are defined in the structure <a class="el" href="group__can__filter__operation__ctrls.html#gacb04d0f8b3969ee69362ff2b62941d75">ARM_CAN_FILTER_OPERATION</a>.</p>
<table class="doxtable">
<tr>
<th align="left">Parameter <em>operation</em> </th><th align="left">Operation on Filter </th><th align="left">supported when <a class="el" href="group__can__interface__gr.html#structARM__CAN__OBJ__CAPABILITIES">ARM_CAN_OBJ_CAPABILITIES</a> data field  </th></tr>
<tr>
<td align="left"><a class="el" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75aa734058b50573de3b0cc49311997806b">ARM_CAN_FILTER_ID_EXACT_ADD</a> </td><td align="left">Add exact ID filter </td><td align="left"><em>exact_filtering</em> = <span class="XML-Token">1</span> </td></tr>
<tr>
<td align="left"><a class="el" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75a6fdaecf3fa244ef1e4d1069d9c6c95f8">ARM_CAN_FILTER_ID_EXACT_REMOVE</a> </td><td align="left">Remove exact ID filter </td><td align="left"><em>exact_filtering</em> = <span class="XML-Token">1</span> </td></tr>
<tr>
<td align="left"><a class="el" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75a22123bef8e773844fce604c553bf2ed5">ARM_CAN_FILTER_ID_RANGE_ADD</a> </td><td align="left">Add range ID filter </td><td align="left"><em>range_filtering</em> = <span class="XML-Token">1</span> </td></tr>
<tr>
<td align="left"><a class="el" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75a17fea7d388dc702bb3318ecae911f50d">ARM_CAN_FILTER_ID_RANGE_REMOVE</a> </td><td align="left">Remove range ID filter </td><td align="left"><em>range_filtering</em> = <span class="XML-Token">1</span> </td></tr>
<tr>
<td align="left"><a class="el" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75ac4ad302fa9b762c1d14964141e234ba9">ARM_CAN_FILTER_ID_MASKABLE_ADD</a> </td><td align="left">Add maskable ID filter </td><td align="left"><em>mask_filtering</em> = <span class="XML-Token">1</span> </td></tr>
<tr>
<td align="left"><a class="el" href="Driver__CAN_8h.html#gacb04d0f8b3969ee69362ff2b62941d75ad9573d5d0e112aece7abc0bc24aa92fb">ARM_CAN_FILTER_ID_MASKABLE_REMOVE</a> </td><td align="left">Remove maskable ID filter </td><td align="left"><em>mask_filtering</em> = <span class="XML-Token">1</span> </td></tr>
</table>
<p>The parameter <em>id</em> is the identifier of the filter or defines the start of the filter range (depends on the filter operation). <br/>
The parameter <em>arg</em> is the mask of the filter or defines the end of the filter range (depends on the filter operation).</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__can__interface__gr.html#ga00ec0715f6755a49dae5b60dca182630" title="Configure object. ">ARM_CAN_ObjectConfigure</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga00ec0715f6755a49dae5b60dca182630"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_CAN_ObjectConfigure </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>obj_idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__can__obj__config__ctrls.html#gaa9488554de0575bc821c9f65213c4cd0">ARM_CAN_OBJ_CONFIG</a>&#160;</td>
          <td class="paramname"><em>obj_cfg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configure object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">obj_idx</td><td>Object index </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">obj_cfg</td><td>Object configuration state<ul>
<li><a class="el" href="Driver__CAN_8h.html#gaa9488554de0575bc821c9f65213c4cd0aebbd0da59658805af30203be66d80249">ARM_CAN_OBJ_INACTIVE</a> : deactivate object</li>
<li><a class="el" href="Driver__CAN_8h.html#gaa9488554de0575bc821c9f65213c4cd0a14780ac7274831ee94f427cbbf67c003">ARM_CAN_OBJ_RX</a> : configure object for reception</li>
<li><a class="el" href="Driver__CAN_8h.html#gaa9488554de0575bc821c9f65213c4cd0a3e20952f92855298cd0a39a7f47b3f3c">ARM_CAN_OBJ_TX</a> : configure object for transmission</li>
<li><a class="el" href="Driver__CAN_8h.html#gaa9488554de0575bc821c9f65213c4cd0ac5d28d180ea9e4328974ffcb8b928a0c">ARM_CAN_OBJ_RX_RTR_TX_DATA</a> : configure object that on RTR reception automatically transmits Data Frame</li>
<li><a class="el" href="Driver__CAN_8h.html#gaa9488554de0575bc821c9f65213c4cd0a396d7a6cd2353e1a2936405ace6417f5">ARM_CAN_OBJ_TX_RTR_RX_DATA</a> : configure object that transmits RTR and automatically receives Data Frame </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>ARM_CAN_ObjectConfigure</b> configures the message object, which can be a mailbox or FIFO. Refer to <a class="el" href="group__can__interface__gr.html#can_filtering">CAN Message Filtering</a> for details.</p>
<p>The parameter <em>obj_idx</em> specifies the message object index. <br/>
The parameter <em>obj_cfg</em> configures the <b>object</b> with values as shown in the following table.</p>
<table  class="cmtable">
<tr>
<th>Parameter <em>obj_cfg</em>  </th><th>Object Configuration </th><th>supported when <a class="el" href="group__can__interface__gr.html#structARM__CAN__OBJ__CAPABILITIES">ARM_CAN_OBJ_CAPABILITIES</a> data field  </th></tr>
<tr>
<td><a class="el" href="Driver__CAN_8h.html#gaa9488554de0575bc821c9f65213c4cd0aebbd0da59658805af30203be66d80249">ARM_CAN_OBJ_INACTIVE</a> </td><td>Deactivate object (default after <a class="el" href="group__can__interface__gr.html#gaa72ceb25ba67e279d7432404632deb44">ARM_CAN_Initialize</a>)  </td><td><em>always supported</em>  </td></tr>
<tr>
<td><a class="el" href="Driver__CAN_8h.html#gaa9488554de0575bc821c9f65213c4cd0a14780ac7274831ee94f427cbbf67c003">ARM_CAN_OBJ_RX</a> </td><td>Receive object; read received message with <a class="el" href="group__can__interface__gr.html#gafc37084df5eab32f593c2744d35cf647">ARM_CAN_MessageRead</a>.  </td><td><em>rx</em> = <span class="XML-Token">1</span>  </td></tr>
<tr>
<td><a class="el" href="Driver__CAN_8h.html#gaa9488554de0575bc821c9f65213c4cd0a3e20952f92855298cd0a39a7f47b3f3c">ARM_CAN_OBJ_TX</a>  </td><td>Transmit object; send message with <a class="el" href="group__can__interface__gr.html#ga0dcffd362b4093043442a030eaebbcfe">ARM_CAN_MessageSend</a>.  </td><td><em>tx</em> = <span class="XML-Token">1</span>  </td></tr>
<tr>
<td><a class="el" href="Driver__CAN_8h.html#gaa9488554de0575bc821c9f65213c4cd0ac5d28d180ea9e4328974ffcb8b928a0c">ARM_CAN_OBJ_RX_RTR_TX_DATA</a> </td><td><a class="el" href="group__can__interface__gr.html#Remote_Frame">Remote Frame</a> Receive; when <b>RTR</b> is received data message is transmitted; set data message with <a class="el" href="group__can__interface__gr.html#ga0dcffd362b4093043442a030eaebbcfe">ARM_CAN_MessageSend</a>.  </td><td><em>rx_rtr_tx_data</em> = <span class="XML-Token">1</span>  </td></tr>
<tr>
<td><a class="el" href="Driver__CAN_8h.html#gaa9488554de0575bc821c9f65213c4cd0a396d7a6cd2353e1a2936405ace6417f5">ARM_CAN_OBJ_TX_RTR_RX_DATA</a> </td><td><a class="el" href="group__can__interface__gr.html#Remote_Frame">Remote Frame</a> Transmit; a <b>RTR</b> is sent with <a class="el" href="group__can__interface__gr.html#ga0dcffd362b4093043442a030eaebbcfe">ARM_CAN_MessageSend</a> to trigger object reception; read received data message with <a class="el" href="group__can__interface__gr.html#gafc37084df5eab32f593c2744d35cf647">ARM_CAN_MessageRead</a>.  </td><td><em>tx_rtr_rx_data</em> = <span class="XML-Token">1</span>  </td></tr>
</table>
<p>When the <b>object</b> is deactivated, it is not used for data communication.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__can__interface__gr.html#ga4f9bc7088704483388e14872c9d5385d" title="Add or remove filter for message reception. ">ARM_CAN_ObjectSetFilter</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga0dcffd362b4093043442a030eaebbcfe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_CAN_MessageSend </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>obj_idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">ARM_CAN_MSG_INFO</a> *&#160;</td>
          <td class="paramname"><em>msg_info</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Send message on CAN bus. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">obj_idx</td><td>Object index </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">msg_info</td><td>Pointer to CAN message information </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Pointer to data buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Number of data bytes to send </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>value &gt;= 0 number of data bytes accepted to send </dd>
<dd>
value &lt; 0 <a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>ARM_CAN_MessageSend</b> sends a CAN message on the CAN bus, or sets data message that will be automatically returned upon RTR reception with matching CAN ID.</p>
<p>Only one message can be sent with a call to this function (for CAN up to <span class="XML-Token">8</span> bytes; for CAN FD up to <span class="XML-Token">64</span> bytes of data). A message transmission can be terminated with a call to the function <a class="el" href="group__can__interface__gr.html#ga8d9f0c5f03a8a81ab062b5aa57e5dea4">ARM_CAN_Control</a> with <em>control</em> = <a class="el" href="group__can__mode__ctrls.html#gae051a548bf785104a934908360529438">ARM_CAN_ABORT_MESSAGE_SEND</a>.</p>
<p>The parameter <em>obj_idx</em> specifies the message object index.</p>
<p>The parameter <em>msg_info</em> is a pointer to the structure <a class="el" href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">ARM_CAN_MSG_INFO</a>, which contains the following relevant data fields for sending message:</p>
<ul>
<li><em>id:</em> Identifier of the message; bit <span class="XML-Token">31</span> specifies if this is an <span class="XML-Token">11-bit</span> or <span class="XML-Token">29-bit</span> identifier.</li>
<li><em>rtr:</em> Specifies if Remote Transmission Request should be sent (<em>dlc</em> is used for number of requested bytes), otherwise the data message will be sent. Refer to <a class="el" href="group__can__interface__gr.html#Remote_Frame">Remote Frame</a> for details.</li>
<li><em>edl:</em> Specifies if Extended Data Length is used; for CAN FD, message can contain up to <span class="XML-Token">64</span> data bytes.</li>
<li><em>brs:</em> Specifies if Bit Rate Switching is to be used; for CAN FD, the bit rate can be increased during data phase.</li>
<li><em>dlc:</em> Data Length Code of requested data bytes when sending Remote Transmission Request.</li>
</ul>
<p>The parameter <em>data</em> is a pointer to the data buffer.<br/>
The parameter <em>size</em> is the number of data bytes to send.<br/>
 The function returns the number of bytes accepted to be sent or <a class="el" href="group__execution__status.html#ga13c1123319c7b9a4735d63447f35116b">ARM_DRIVER_ERROR_BUSY</a> if the hardware is not ready to accept a new message for transmission.</p>
<p>When the message is sent, the callback function <a class="el" href="group__can__interface__gr.html#gabfcaeac9e2ca25936ba5a29f2d594e7e">ARM_CAN_SignalObjectEvent</a> is called signalling <a class="el" href="group__CAN__events.html#ga486f0f35ebc7e3b5931ee68b56703503">ARM_CAN_EVENT_SEND_COMPLETE</a> on specified object.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__can__interface__gr.html#can_filtering">CAN Message Filtering</a></dd></dl>
<p><b>Example:</b></p>
<div class="fragment"><div class="line">status = ptrCAN-&gt;ObjectConfigure(0, <a class="code" href="Driver__CAN_8h.html#gaa9488554de0575bc821c9f65213c4cd0a3e20952f92855298cd0a39a7f47b3f3c">ARM_CAN_OBJ_TX</a>);</div>
<div class="line"><span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a> ) { Error_Handler(); }</div>
<div class="line"></div>
<div class="line">memset(&amp;tx_msg_info, 0, <span class="keyword">sizeof</span>(<a class="code" href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">ARM_CAN_MSG_INFO</a>));            <span class="comment">// Clear transmit message structure</span></div>
<div class="line">tx_msg_info.<a class="code" href="group__can__interface__gr.html#abaabdc509cdaba7df9f56c6c76f3ae19">id</a>  = <a class="code" href="group__can__identifer__ctrls.html#gae7d4efb6fb49e1ec47c2b12e22f37cae">ARM_CAN_EXTENDED_ID</a>(0x12345678U);           <span class="comment">// Set ID of message</span></div>
<div class="line">data_buf[0] = <span class="charliteral">&#39;1&#39;</span>;  data_buf[1] = <span class="charliteral">&#39;2&#39;</span>;                        <span class="comment">// Prepare data to transmit</span></div>
<div class="line">data_buf[2] = <span class="charliteral">&#39;3&#39;</span>;  data_buf[3] = <span class="charliteral">&#39;4&#39;</span>;</div>
<div class="line">data_buf[4] = <span class="charliteral">&#39;5&#39;</span>;  data_buf[5] = <span class="charliteral">&#39;6&#39;</span>;</div>
<div class="line">data_buf[6] = <span class="charliteral">&#39;7&#39;</span>;  data_buf[7] = <span class="charliteral">&#39;8&#39;</span>;</div>
<div class="line">status = ptrCAN-&gt;MesageSend(0, &amp;tx_msg_info, data_buf, 8);    <span class="comment">// Send message</span></div>
<div class="line"><span class="keywordflow">if</span> (status != <a class="code" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a> ) { Error_Handler(); }</div>
</div><!-- fragment --> 
</div>
</div>
<a class="anchor" id="gafc37084df5eab32f593c2744d35cf647"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_CAN_MessageRead </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>obj_idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">ARM_CAN_MSG_INFO</a> *&#160;</td>
          <td class="paramname"><em>msg_info</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read message received on CAN bus. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">obj_idx</td><td>Object index </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">msg_info</td><td>Pointer to read CAN message information </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">data</td><td>Pointer to data buffer for read data </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Maximum number of data bytes to read </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>value &gt;= 0 number of data bytes read </dd>
<dd>
value &lt; 0 <a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>ARM_CAN_MessageRead</b> reads the message received on the CAN bus, if <em>obj_idx</em> was configured for reception or for automatic Data Message reception using RTR and the callback function <a class="el" href="group__can__interface__gr.html#gabfcaeac9e2ca25936ba5a29f2d594e7e">ARM_CAN_SignalObjectEvent</a> was called signalling <a class="el" href="group__CAN__events.html#ga2c1082561eeae3b2b8132e81fc241e47">ARM_CAN_EVENT_RECEIVE</a>. If the message was overrun by another received message, then the callback function <a class="el" href="group__can__interface__gr.html#gabfcaeac9e2ca25936ba5a29f2d594e7e">ARM_CAN_SignalObjectEvent</a> will be called signalling <a class="el" href="group__CAN__events.html#ga6c2d29b5c49d5cd18e97f5931157a94c">ARM_CAN_EVENT_RECEIVE_OVERRUN</a>.</p>
<p>The function can read a maximum of <span class="XML-Token">8</span> data bytes for CAN and <span class="XML-Token">64</span> bytes for CAN FD.</p>
<p>The parameter <em>obj_idx</em> specifies the message object index. <br/>
The parameter <em>msg_info</em> is a pointer to the CAN information structure. <br/>
The parameter <em>data</em> is a pointer to the data buffer for reading data. <br/>
The parameter <em>size</em> is data buffer size in bytes and indicates the maximum number of bytes that can be read.</p>
<p>The function returns the number of read data in bytes or the <a class="el" href="group__execution__status.html">Status Error Codes</a>.</p>
<p>All data fields of the structure <a class="el" href="group__can__interface__gr.html#structARM__CAN__MSG__INFO">ARM_CAN_MSG_INFO</a> are updated as described below:</p>
<ul>
<li>id: Identifier of the message that was received, bit <span class="XML-Token">31</span> specifies if it is a <span class="XML-Token">11-bit</span> identifier or <span class="XML-Token">29-bit</span> identifier.</li>
<li>rtr: <span class="XML-Token">1</span> = Remote Frame Request was received (<em>dlc</em> is number of requested bytes). <span class="XML-Token">0</span> = data message</li>
<li>edl: <span class="XML-Token">1</span> = CAN FD Extended Data Length message was received. <span class="XML-Token">0</span> = not Extended Data Length message.</li>
<li>brs: <span class="XML-Token">1</span> = CAN FD Bit Rate Switching was used for message transfer. <span class="XML-Token">0</span> = no Bit Rate Switching was used.</li>
<li>esi: <span class="XML-Token">1</span> = CAN FD Error State Indicator is active for received message. <span class="XML-Token">0</span> = Error State Indicator is not active.</li>
<li>dlc: Data Length Code is the number of data bytes in the received message or number of data bytes requested by RTR.</li>
</ul>
<p>Message reception can be disabled by de-configuring the receive object with the function <a class="el" href="group__can__interface__gr.html#ga00ec0715f6755a49dae5b60dca182630">ARM_CAN_ObjectConfigure</a>. </p>

</div>
</div>
<a class="anchor" id="ga8d9f0c5f03a8a81ab062b5aa57e5dea4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_CAN_Control </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>control</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Control CAN interface. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">control</td><td>Operation<ul>
<li><a class="el" href="group__can__mode__ctrls.html#ga978ab3e8860f644dea780e87b3478ff4">ARM_CAN_SET_FD_MODE</a> : set FD operation mode</li>
<li><a class="el" href="group__can__mode__ctrls.html#gae051a548bf785104a934908360529438">ARM_CAN_ABORT_MESSAGE_SEND</a> : abort sending of CAN message</li>
<li><a class="el" href="group__can__mode__ctrls.html#ga0453b8900ca3a0d5210ffd6a918a78e6">ARM_CAN_CONTROL_RETRANSMISSION</a> : enable/disable automatic retransmission</li>
<li><a class="el" href="group__can__mode__ctrls.html#ga398dd25256e644cd8d6506495a06bde8">ARM_CAN_SET_TRANSCEIVER_DELAY</a> : set transceiver delay </li>
</ul>
</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">arg</td><td>Argument of operation </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__execution__status.html">Status Error Codes</a></dd></dl>
<p>The function <b>ARM_CAN_Control</b> controls the CAN interface settings and executes various operations.</p>
<p>The parameter <em>control</em> specifies various operations that are listed in the table below.</p>
<p>The parameters <em>arg</em> provides, depending on the <em>control</em> value, additional information or set values.</p>
<table class="doxtable">
<tr>
<th align="left">Parameter <em>control</em> </th><th align="left">Operation  </th></tr>
<tr>
<td align="left"><a class="el" href="group__can__mode__ctrls.html#ga978ab3e8860f644dea780e87b3478ff4">ARM_CAN_SET_FD_MODE</a> </td><td align="left">Select <a href="#CAN_FD"><b>CAN FD</b></a> mode; <em>arg</em> : <span class="XML-Token">0</span> = CAN 2.0B; <span class="XML-Token">1</span> = CAN FD. </td></tr>
<tr>
<td align="left"><a class="el" href="group__can__mode__ctrls.html#gae051a548bf785104a934908360529438">ARM_CAN_ABORT_MESSAGE_SEND</a> </td><td align="left">Abort sending of CAN message; <em>arg</em> : object index </td></tr>
<tr>
<td align="left"><a class="el" href="group__can__mode__ctrls.html#ga0453b8900ca3a0d5210ffd6a918a78e6">ARM_CAN_CONTROL_RETRANSMISSION</a> </td><td align="left">Enable/disable automatic retransmission; <em>arg</em> : <span class="XML-Token">0 = disable, 1 = enable (default state)</span> </td></tr>
<tr>
<td align="left"><a class="el" href="group__can__mode__ctrls.html#ga398dd25256e644cd8d6506495a06bde8">ARM_CAN_SET_TRANSCEIVER_DELAY</a> </td><td align="left">Set transceiver delay; <em>arg</em> : delay in time quanta </td></tr>
</table>
<p>Verify the CAN interface capabilities with <a class="el" href="group__can__interface__gr.html#ga35f21cabe1637b1be964024a8f77721c">ARM_CAN_GetCapabilities</a>. </p>

</div>
</div>
<a class="anchor" id="ga676d6b567fc4ab3d44f5d7a50ec9419c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__can__interface__gr.html#structARM__CAN__STATUS">ARM_CAN_STATUS</a> ARM_CAN_GetStatus </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get CAN status. </p>
<dl class="section return"><dt>Returns</dt><dd>CAN status <a class="el" href="group__can__interface__gr.html#structARM__CAN__STATUS">ARM_CAN_STATUS</a></dd></dl>
<p>The function <b>ARM_CAN_GetStatus</b> retrieves runtime information on CAN bus and CAN unit state.</p>
<p>The following defines give information about the current unit involvement in bus communication:</p>
<table class="doxtable">
<tr>
<th align="left">Unit State </th><th align="left">Description  </th></tr>
<tr>
<td align="left"><a class="el" href="group__can__status__code__ctrls.html#ga911a65cc31304d57d283a21476d9ade7">ARM_CAN_UNIT_STATE_INACTIVE</a> </td><td align="left">Unit state: Not active on the bus. Unit is in initialization state. </td></tr>
<tr>
<td align="left"><a class="el" href="group__can__status__code__ctrls.html#ga5f72c295ee2b829a8ae33b96466cc0e8">ARM_CAN_UNIT_STATE_ACTIVE</a> </td><td align="left">Unit state: Active on the bus. Unit can generate active error frames. </td></tr>
<tr>
<td align="left"><a class="el" href="group__can__status__code__ctrls.html#gace2db0f930f935054c21242f735e1922">ARM_CAN_UNIT_STATE_PASSIVE</a> </td><td align="left">Unit state: Error passive. Unit is interacting on the bus but does not send active error frames. </td></tr>
<tr>
<td align="left"><a class="el" href="group__can__status__code__ctrls.html#gadd78b515410235cd77d0a10213ff4192">ARM_CAN_UNIT_STATE_BUS_OFF</a> </td><td align="left">Unit state: Bus-off. Unit does not participate on the bus but monitors it and can recover to active state. </td></tr>
</table>
<p>The following defines are error codes of the last error that happened on the bus:</p>
<table class="doxtable">
<tr>
<th align="left">Last Error Code </th><th align="left">Description  </th></tr>
<tr>
<td align="left"><a class="el" href="group__can__status__code__ctrls.html#ga5332a311f44caec256d59087c705e1e9">ARM_CAN_LEC_NO_ERROR</a> </td><td align="left">No error. There was no error since last read of status or last successful transmit or receive. </td></tr>
<tr>
<td align="left"><a class="el" href="group__can__status__code__ctrls.html#ga0571c3c3e341ac0579aa713fdfdae77e">ARM_CAN_LEC_BIT_ERROR</a> </td><td align="left">Bit error. The bit monitored is different than the bit sent (except during arbitration phase). </td></tr>
<tr>
<td align="left"><a class="el" href="group__can__status__code__ctrls.html#ga33cbda311f4c2f2464e4070dee78b2f2">ARM_CAN_LEC_STUFF_ERROR</a> </td><td align="left">Bit stuffing error. There were 6 consecutive same bit levels on the bus. </td></tr>
<tr>
<td align="left"><a class="el" href="group__can__status__code__ctrls.html#ga1380f80b709ca921634aecdaf34a24e5">ARM_CAN_LEC_CRC_ERROR</a> </td><td align="left">CRC error. CRC of received data is not as expected. </td></tr>
<tr>
<td align="left"><a class="el" href="group__can__status__code__ctrls.html#ga9f753ba50045b28653fb3215ec2e4b8a">ARM_CAN_LEC_FORM_ERROR</a> </td><td align="left">Illegal fixed-form bit. Error in fixed form bits. </td></tr>
<tr>
<td align="left"><a class="el" href="group__can__status__code__ctrls.html#gaae6e827242137bc4d8976cd4ba73015f">ARM_CAN_LEC_ACK_ERROR</a> </td><td align="left">Acknowledgment error. Message was not acknowledged by any receiver on the bus. </td></tr>
</table>

</div>
</div>
<a class="anchor" id="ga38795d1ed135ce3bd87f31ef1596bccf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ARM_CAN_SignalUnitEvent </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>event</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Signal CAN unit event. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">event</td><td><a class="el" href="group__CAN__unit__events.html">CAN Unit Events</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none</dd></dl>
<p>The function <b>ARM_CAN_SignalUnitEvent</b> is a callback function registered by the function <a class="el" href="group__can__interface__gr.html#gaa72ceb25ba67e279d7432404632deb44">ARM_CAN_Initialize</a>.</p>
<p>The parameter <em>event</em> indicates unit event that occurred during driver operation.</p>
<p>The following callback notifications are generated:</p>
<table class="doxtable">
<tr>
<th align="left">Parameter <em>event</em> </th><th align="center">Value </th><th align="left">Description  </th></tr>
<tr>
<td align="left"><a class="el" href="group__CAN__unit__events.html#gaa2347c172c8a8f42ac66cb42cd7a08db">ARM_CAN_EVENT_UNIT_INACTIVE</a> </td><td align="center">0 </td><td align="left">Unit entered Inactive state. </td></tr>
<tr>
<td align="left"><a class="el" href="group__CAN__unit__events.html#ga0e65231ccb20684d7c8eac80385f8c18">ARM_CAN_EVENT_UNIT_ACTIVE</a> </td><td align="center">1 </td><td align="left">Unit entered Error Active state. </td></tr>
<tr>
<td align="left"><a class="el" href="group__CAN__unit__events.html#ga3690f864edd2e124f4f9875fdde9a2eb">ARM_CAN_EVENT_UNIT_WARNING</a> </td><td align="center">2 </td><td align="left">Unit entered Error Warning state (one or both error counters &gt;= <span class="XML-Token">96</span>). </td></tr>
<tr>
<td align="left"><a class="el" href="group__CAN__unit__events.html#ga9c529d6697fe21e69639224322f8c4b4">ARM_CAN_EVENT_UNIT_PASSIVE</a> </td><td align="center">3 </td><td align="left">Unit entered Error Passive state. </td></tr>
<tr>
<td align="left"><a class="el" href="group__CAN__unit__events.html#gafa4f992a97b4ca0f079aec2990a69bed">ARM_CAN_EVENT_UNIT_BUS_OFF</a> </td><td align="center">4 </td><td align="left">Unit entered Bus-off state. </td></tr>
</table>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__can__interface__gr.html#ga676d6b567fc4ab3d44f5d7a50ec9419c">ARM_CAN_GetStatus</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gabfcaeac9e2ca25936ba5a29f2d594e7e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ARM_CAN_SignalObjectEvent </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>obj_idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>event</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Signal CAN object event. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">obj_idx</td><td>Object index </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">event</td><td><a class="el" href="group__CAN__events.html">CAN Object Events</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none</dd></dl>
<p>The function <b>ARM_CAN_SignalObjectEvent</b> is a callback function registered by the function <a class="el" href="group__can__interface__gr.html#gaa72ceb25ba67e279d7432404632deb44">ARM_CAN_Initialize</a> and signals a CAN message object event.</p>
<p>The parameter <em>obj_idx</em> is the index of the message object. <br/>
The parameter <em>event</em> indicates object event that occurred during driver operation.</p>
<p>The following events can be generated:</p>
<table class="doxtable">
<tr>
<th align="left">Parameter <em>event</em> </th><th align="center">Bit </th><th align="left">Description  </th></tr>
<tr>
<td align="left"><a class="el" href="group__CAN__events.html#ga486f0f35ebc7e3b5931ee68b56703503">ARM_CAN_EVENT_SEND_COMPLETE</a> </td><td align="center">0 </td><td align="left">Message was sent successfully by the <em>obj_idx</em> object. </td></tr>
<tr>
<td align="left"><a class="el" href="group__CAN__events.html#ga2c1082561eeae3b2b8132e81fc241e47">ARM_CAN_EVENT_RECEIVE</a> </td><td align="center">1 </td><td align="left">Message was received successfully by the <em>obj_idx</em> object. </td></tr>
<tr>
<td align="left"><a class="el" href="group__CAN__events.html#ga6c2d29b5c49d5cd18e97f5931157a94c">ARM_CAN_EVENT_RECEIVE_OVERRUN</a> </td><td align="center">2 </td><td align="left">Message was overwritten before it was read on the <em>obj_idx</em> object. </td></tr>
</table>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__can__interface__gr.html#ga0dcffd362b4093043442a030eaebbcfe">ARM_CAN_MessageSend</a> </dd>
<dd>
<a class="el" href="group__can__interface__gr.html#gafc37084df5eab32f593c2744d35cf647">ARM_CAN_MessageRead</a> </dd>
<dd>
<a class="el" href="group__can__interface__gr.html#ga00ec0715f6755a49dae5b60dca182630">ARM_CAN_ObjectConfigure</a> </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Wed Jul 10 2019 15:20:31 for CMSIS-Driver Version 2.7.1 by Arm Ltd. All rights reserved.
	<!--
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 
	-->
	</li>
  </ul>
</div>
</body>
</html>