summaryrefslogtreecommitdiff
path: root/docs/Driver/html/group__usbd__interface__gr.html
blob: 5fbd09b4d34bf572b29c2cec3d5b8f77ec6a8a34 (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
<!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>USB Device Interface</title>
<title>CMSIS-Driver: USB Device 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__usbd__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">USB Device Interface<div class="ingroups"><a class="el" href="group__usb__interface__gr.html">USB Interface</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Driver API for USB Device Peripheral (Driver_USBD.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__USBD__dev__events"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__USBD__dev__events.html">USBD Device Events</a></td></tr>
<tr class="memdesc:group__USBD__dev__events"><td class="mdescLeft">&#160;</td><td class="mdescRight">The USB Device driver generates Device call back events that are notified via the function <a class="el" href="group__usbd__interface__gr.html#gafe58a4db1d26b21ca5d418ee49e103a5">ARM_USBD_SignalDeviceEvent</a>. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__USBD__ep__events"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__USBD__ep__events.html">USBD Endpoint Events</a></td></tr>
<tr class="memdesc:group__USBD__ep__events"><td class="mdescLeft">&#160;</td><td class="mdescRight">The USB Device driver generates Endpoint call back events that are notified via the function <a class="el" href="group__usbd__interface__gr.html#ga9aa5bc5cb45084194a77fae1457f6575">ARM_USBD_SignalEndpointEvent</a>. <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__USBD"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#structARM__DRIVER__USBD">ARM_DRIVER_USBD</a></td></tr>
<tr class="memdesc:structARM__DRIVER__USBD"><td class="mdescLeft">&#160;</td><td class="mdescRight">Access structure of the USB Device Driver.  <a href="group__usbd__interface__gr.html#structARM__DRIVER__USBD">More...</a><br/></td></tr>
<tr class="separator:structARM__DRIVER__USBD"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structARM__USBD__CAPABILITIES"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#structARM__USBD__CAPABILITIES">ARM_USBD_CAPABILITIES</a></td></tr>
<tr class="memdesc:structARM__USBD__CAPABILITIES"><td class="mdescLeft">&#160;</td><td class="mdescRight">USB Device Driver Capabilities.  <a href="group__usbd__interface__gr.html#structARM__USBD__CAPABILITIES">More...</a><br/></td></tr>
<tr class="separator:structARM__USBD__CAPABILITIES"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structARM__USBD__STATE"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#structARM__USBD__STATE">ARM_USBD_STATE</a></td></tr>
<tr class="memdesc:structARM__USBD__STATE"><td class="mdescLeft">&#160;</td><td class="mdescRight">USB Device State.  <a href="group__usbd__interface__gr.html#structARM__USBD__STATE">More...</a><br/></td></tr>
<tr class="separator:structARM__USBD__STATE"><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:ga7c1878799699ddd34cec696da499f7bd"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#ga7c1878799699ddd34cec696da499f7bd">ARM_USBD_SignalDeviceEvent_t</a> )(uint32_t event)</td></tr>
<tr class="memdesc:ga7c1878799699ddd34cec696da499f7bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usbd__interface__gr.html#gafe58a4db1d26b21ca5d418ee49e103a5">ARM_USBD_SignalDeviceEvent</a> : Signal USB Device Event.  <a href="#ga7c1878799699ddd34cec696da499f7bd">More...</a><br/></td></tr>
<tr class="separator:ga7c1878799699ddd34cec696da499f7bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaae754763700fc5059a6bde57ea2d4e2c"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#gaae754763700fc5059a6bde57ea2d4e2c">ARM_USBD_SignalEndpointEvent_t</a> )(uint8_t ep_addr, uint32_t event)</td></tr>
<tr class="memdesc:gaae754763700fc5059a6bde57ea2d4e2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usbd__interface__gr.html#ga9aa5bc5cb45084194a77fae1457f6575">ARM_USBD_SignalEndpointEvent</a> : Signal USB Endpoint Event.  <a href="#gaae754763700fc5059a6bde57ea2d4e2c">More...</a><br/></td></tr>
<tr class="separator:gaae754763700fc5059a6bde57ea2d4e2c"><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:ga1dcb8b7790f0e3613ee3da77e5fd18fc"><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__usbd__interface__gr.html#ga1dcb8b7790f0e3613ee3da77e5fd18fc">ARM_USBD_GetVersion</a> (void)</td></tr>
<tr class="memdesc:ga1dcb8b7790f0e3613ee3da77e5fd18fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get driver version.  <a href="#ga1dcb8b7790f0e3613ee3da77e5fd18fc">More...</a><br/></td></tr>
<tr class="separator:ga1dcb8b7790f0e3613ee3da77e5fd18fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga178d01ab7896e1c675b90bbccfe8ea7d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__usbd__interface__gr.html#structARM__USBD__CAPABILITIES">ARM_USBD_CAPABILITIES</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#ga178d01ab7896e1c675b90bbccfe8ea7d">ARM_USBD_GetCapabilities</a> (void)</td></tr>
<tr class="memdesc:ga178d01ab7896e1c675b90bbccfe8ea7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get driver capabilities.  <a href="#ga178d01ab7896e1c675b90bbccfe8ea7d">More...</a><br/></td></tr>
<tr class="separator:ga178d01ab7896e1c675b90bbccfe8ea7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga60b95c9c0c6767ff5938464cfd748f81"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#ga60b95c9c0c6767ff5938464cfd748f81">ARM_USBD_Initialize</a> (<a class="el" href="group__usbd__interface__gr.html#ga7c1878799699ddd34cec696da499f7bd">ARM_USBD_SignalDeviceEvent_t</a> cb_device_event, <a class="el" href="group__usbd__interface__gr.html#gaae754763700fc5059a6bde57ea2d4e2c">ARM_USBD_SignalEndpointEvent_t</a> cb_endpoint_event)</td></tr>
<tr class="memdesc:ga60b95c9c0c6767ff5938464cfd748f81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize USB Device Interface.  <a href="#ga60b95c9c0c6767ff5938464cfd748f81">More...</a><br/></td></tr>
<tr class="separator:ga60b95c9c0c6767ff5938464cfd748f81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafaead6713f141be1734de0110eda966b"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#gafaead6713f141be1734de0110eda966b">ARM_USBD_Uninitialize</a> (void)</td></tr>
<tr class="memdesc:gafaead6713f141be1734de0110eda966b"><td class="mdescLeft">&#160;</td><td class="mdescRight">De-initialize USB Device Interface.  <a href="#gafaead6713f141be1734de0110eda966b">More...</a><br/></td></tr>
<tr class="separator:gafaead6713f141be1734de0110eda966b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa5bdaac19f6df30c6e569abef17cdb42"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#gaa5bdaac19f6df30c6e569abef17cdb42">ARM_USBD_PowerControl</a> (<a class="el" href="group__common__drv__gr.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5">ARM_POWER_STATE</a> state)</td></tr>
<tr class="memdesc:gaa5bdaac19f6df30c6e569abef17cdb42"><td class="mdescLeft">&#160;</td><td class="mdescRight">Control USB Device Interface Power.  <a href="#gaa5bdaac19f6df30c6e569abef17cdb42">More...</a><br/></td></tr>
<tr class="separator:gaa5bdaac19f6df30c6e569abef17cdb42"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga99207f7ff5e97a7f65754eab7f775fca"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#ga99207f7ff5e97a7f65754eab7f775fca">ARM_USBD_DeviceConnect</a> (void)</td></tr>
<tr class="memdesc:ga99207f7ff5e97a7f65754eab7f775fca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect USB Device.  <a href="#ga99207f7ff5e97a7f65754eab7f775fca">More...</a><br/></td></tr>
<tr class="separator:ga99207f7ff5e97a7f65754eab7f775fca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga37234abecbb63e4e739f9676e489d2d1"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#ga37234abecbb63e4e739f9676e489d2d1">ARM_USBD_DeviceDisconnect</a> (void)</td></tr>
<tr class="memdesc:ga37234abecbb63e4e739f9676e489d2d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disconnect USB Device.  <a href="#ga37234abecbb63e4e739f9676e489d2d1">More...</a><br/></td></tr>
<tr class="separator:ga37234abecbb63e4e739f9676e489d2d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7624d6b2cbe5e6ab5016206ce641eee2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__usbd__interface__gr.html#structARM__USBD__STATE">ARM_USBD_STATE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#ga7624d6b2cbe5e6ab5016206ce641eee2">ARM_USBD_DeviceGetState</a> (void)</td></tr>
<tr class="memdesc:ga7624d6b2cbe5e6ab5016206ce641eee2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current USB Device State.  <a href="#ga7624d6b2cbe5e6ab5016206ce641eee2">More...</a><br/></td></tr>
<tr class="separator:ga7624d6b2cbe5e6ab5016206ce641eee2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7e149a4c6a0196da24a44f4fada75fb1"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#ga7e149a4c6a0196da24a44f4fada75fb1">ARM_USBD_DeviceRemoteWakeup</a> (void)</td></tr>
<tr class="memdesc:ga7e149a4c6a0196da24a44f4fada75fb1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Trigger USB Remote Wakeup.  <a href="#ga7e149a4c6a0196da24a44f4fada75fb1">More...</a><br/></td></tr>
<tr class="separator:ga7e149a4c6a0196da24a44f4fada75fb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae66f696584e25fb2ddabe9070fa38670"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#gae66f696584e25fb2ddabe9070fa38670">ARM_USBD_DeviceSetAddress</a> (uint8_t dev_addr)</td></tr>
<tr class="memdesc:gae66f696584e25fb2ddabe9070fa38670"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set USB Device Address.  <a href="#gae66f696584e25fb2ddabe9070fa38670">More...</a><br/></td></tr>
<tr class="separator:gae66f696584e25fb2ddabe9070fa38670"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6bc0ebf699a0f28330f21cab83f85e9e"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#ga6bc0ebf699a0f28330f21cab83f85e9e">ARM_USBD_ReadSetupPacket</a> (uint8_t *setup)</td></tr>
<tr class="memdesc:ga6bc0ebf699a0f28330f21cab83f85e9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read setup packet received over Control Endpoint.  <a href="#ga6bc0ebf699a0f28330f21cab83f85e9e">More...</a><br/></td></tr>
<tr class="separator:ga6bc0ebf699a0f28330f21cab83f85e9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga62d7d5bdcf9ca7bf7e6d8434368abad8"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#ga62d7d5bdcf9ca7bf7e6d8434368abad8">ARM_USBD_EndpointConfigure</a> (uint8_t ep_addr, uint8_t ep_type, uint16_t ep_max_packet_size)</td></tr>
<tr class="memdesc:ga62d7d5bdcf9ca7bf7e6d8434368abad8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure USB Endpoint.  <a href="#ga62d7d5bdcf9ca7bf7e6d8434368abad8">More...</a><br/></td></tr>
<tr class="separator:ga62d7d5bdcf9ca7bf7e6d8434368abad8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaca913df5188dc0f0c4f707b57c2a88fc"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#gaca913df5188dc0f0c4f707b57c2a88fc">ARM_USBD_EndpointUnconfigure</a> (uint8_t ep_addr)</td></tr>
<tr class="memdesc:gaca913df5188dc0f0c4f707b57c2a88fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unconfigure USB Endpoint.  <a href="#gaca913df5188dc0f0c4f707b57c2a88fc">More...</a><br/></td></tr>
<tr class="separator:gaca913df5188dc0f0c4f707b57c2a88fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9502cd7b8e4c583920fccadc4ccf7975"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#ga9502cd7b8e4c583920fccadc4ccf7975">ARM_USBD_EndpointStall</a> (uint8_t ep_addr, bool stall)</td></tr>
<tr class="memdesc:ga9502cd7b8e4c583920fccadc4ccf7975"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set/Clear Stall for USB Endpoint.  <a href="#ga9502cd7b8e4c583920fccadc4ccf7975">More...</a><br/></td></tr>
<tr class="separator:ga9502cd7b8e4c583920fccadc4ccf7975"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6e69ad097553125bb01a22dc719e0d30"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#ga6e69ad097553125bb01a22dc719e0d30">ARM_USBD_EndpointTransfer</a> (uint8_t ep_addr, uint8_t *data, uint32_t num)</td></tr>
<tr class="memdesc:ga6e69ad097553125bb01a22dc719e0d30"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read data from or Write data to USB Endpoint.  <a href="#ga6e69ad097553125bb01a22dc719e0d30">More...</a><br/></td></tr>
<tr class="separator:ga6e69ad097553125bb01a22dc719e0d30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab81fac01522a4d504edcb7b7d3abba6c"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#gab81fac01522a4d504edcb7b7d3abba6c">ARM_USBD_EndpointTransferGetResult</a> (uint8_t ep_addr)</td></tr>
<tr class="memdesc:gab81fac01522a4d504edcb7b7d3abba6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get result of USB Endpoint transfer.  <a href="#gab81fac01522a4d504edcb7b7d3abba6c">More...</a><br/></td></tr>
<tr class="separator:gab81fac01522a4d504edcb7b7d3abba6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7cf3bcc105dbb8cbdc915e8caca8529e"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#ga7cf3bcc105dbb8cbdc915e8caca8529e">ARM_USBD_EndpointTransferAbort</a> (uint8_t ep_addr)</td></tr>
<tr class="memdesc:ga7cf3bcc105dbb8cbdc915e8caca8529e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Abort current USB Endpoint transfer.  <a href="#ga7cf3bcc105dbb8cbdc915e8caca8529e">More...</a><br/></td></tr>
<tr class="separator:ga7cf3bcc105dbb8cbdc915e8caca8529e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4cd050b8343407fe465a27ad1cb7c264"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#ga4cd050b8343407fe465a27ad1cb7c264">ARM_USBD_GetFrameNumber</a> (void)</td></tr>
<tr class="memdesc:ga4cd050b8343407fe465a27ad1cb7c264"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get current USB Frame Number.  <a href="#ga4cd050b8343407fe465a27ad1cb7c264">More...</a><br/></td></tr>
<tr class="separator:ga4cd050b8343407fe465a27ad1cb7c264"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafe58a4db1d26b21ca5d418ee49e103a5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#gafe58a4db1d26b21ca5d418ee49e103a5">ARM_USBD_SignalDeviceEvent</a> (uint32_t event)</td></tr>
<tr class="memdesc:gafe58a4db1d26b21ca5d418ee49e103a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signal USB Device Event.  <a href="#gafe58a4db1d26b21ca5d418ee49e103a5">More...</a><br/></td></tr>
<tr class="separator:gafe58a4db1d26b21ca5d418ee49e103a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9aa5bc5cb45084194a77fae1457f6575"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#ga9aa5bc5cb45084194a77fae1457f6575">ARM_USBD_SignalEndpointEvent</a> (uint8_t ep_addr, uint32_t ep_event)</td></tr>
<tr class="memdesc:ga9aa5bc5cb45084194a77fae1457f6575"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signal USB Endpoint Event.  <a href="#ga9aa5bc5cb45084194a77fae1457f6575">More...</a><br/></td></tr>
<tr class="separator:ga9aa5bc5cb45084194a77fae1457f6575"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<p>Driver API for USB Device Peripheral (Driver_USBD.h) </p>
<p><b>USB Device API</b></p>
<p>The header file <b><a class="el" href="Driver__USBD_8h.html">Driver_USBD.h</a></b> defines the API for the <b>USB Device Driver</b> interface used by middleware components. The driver implementation itself is a typical part of the Device Family Pack, which provides entry points to the interface as function pointers in the struct <a class="el" href="group__usbd__interface__gr.html#structARM__DRIVER__USBD">ARM_DRIVER_USBD</a>. This structure can be available several times in each interface to control multiple USBD interfaces.</p>
<p>Header file <b><a class="el" href="Driver__USBD_8h.html">Driver_USBD.h</a></b> also defines callback routines that can be categorized as <b>device event callbacks</b> and <b>endpoint event callbacks</b>. Callbacks are called by the driver, in interrupt context when an appropriate event occurs, to signal device related events (<a class="el" href="group__USBD__dev__events.html">USBD Device Events</a>) and endpoint related events (<a class="el" href="group__USBD__ep__events.html">USBD Endpoint Events</a>).</p>
<p><b>USB Device Function Call Sequence</b></p>
<p>To use the USBD driver invoke the API functions in the following order:</p>
<div align="center">
<img src="msc_inline_mscgraph_2.png" alt="msc_inline_mscgraph_2" border="0" usemap="#msc_inline_mscgraph_2.map"/>
<map name="msc_inline_mscgraph_2.map" id="msc_inline_mscgraph_2.map"><area href="group__usbd__interface__gr.html#ga60b95c9c0c6767ff5938464cfd748f81" shape="rect" coords="244,58,357,71" alt=""/>
<area href="group__usbd__interface__gr.html#ga60b95c9c0c6767ff5938464cfd748f81" shape="rect" coords="187,90,414,103" alt=""/>
<area href="group__usbd__interface__gr.html#ga99207f7ff5e97a7f65754eab7f775fca" shape="rect" coords="235,122,366,135" alt=""/>
<area href="group__usbd__interface__gr.html#gafe58a4db1d26b21ca5d418ee49e103a5" shape="rect" coords="154,154,447,167" alt=""/>
<area href="group__usbd__interface__gr.html#ga7624d6b2cbe5e6ab5016206ce641eee2" shape="rect" coords="232,186,369,199" alt=""/>
<area href="group__usbd__interface__gr.html#ga62d7d5bdcf9ca7bf7e6d8434368abad8" shape="rect" coords="223,218,378,231" alt=""/>
<area href="group__usbd__interface__gr.html#ga6e69ad097553125bb01a22dc719e0d30" shape="rect" coords="226,269,375,282" alt=""/>
<area href="group__usbd__interface__gr.html#ga9aa5bc5cb45084194a77fae1457f6575" shape="rect" coords="217,301,384,314" alt=""/>
<area href="group__usbd__interface__gr.html#gab81fac01522a4d504edcb7b7d3abba6c" shape="rect" coords="199,333,402,346" alt=""/>
<area href="group__usbd__interface__gr.html#ga37234abecbb63e4e739f9676e489d2d1" shape="rect" coords="226,384,375,397" alt=""/>
<area href="group__usbd__interface__gr.html#ga60b95c9c0c6767ff5938464cfd748f81" shape="rect" coords="190,416,411,429" alt=""/>
<area href="group__usbd__interface__gr.html#gafaead6713f141be1734de0110eda966b" shape="rect" coords="238,448,363,461" alt=""/>
</map>
</div>
 <hr/><h2 class="groupheader">Data Structure Documentation</h2>
<a name="structARM__DRIVER__USBD" id="structARM__DRIVER__USBD"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct ARM_DRIVER_USBD</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>Access structure of the USB Device Driver. </p>
<p>The functions of the USB Device driver are accessed by function pointers. Refer to <a class="el" href="theoryOperation.html#DriverFunctions">Common Driver Functions</a> for overview information.</p>
<p>Each instance of an USBD provides such an access struct. The instance is indicated by a postfix in the symbol name of the access struct, for example:</p>
<ul>
<li><b>Driver_USBD0</b> is the name of the access struct of the first instance (no. 0).</li>
<li><b>Driver_USBD1</b> is the name of the access struct of the second instance (no. 1).</li>
</ul>
<p>A configuration setting in the middleware allows connecting the middleware to a specific driver instance <b>Driver_USBD<em>n</em></b>. The default is <span class="XML-Token">0</span>, which connects a middleware to the first instance of a driver.</p>
<dl class="section note"><dt>Note</dt><dd>The struct must remain unchanged. </dd></dl>
</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__usbd__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__usbd__interface__gr.html#ga1dcb8b7790f0e3613ee3da77e5fd18fc">ARM_USBD_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:a52045edf0f555a0f0ecdf37a5e169f7a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__usbd__interface__gr.html#structARM__USBD__CAPABILITIES">ARM_USBD_CAPABILITIES</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#a52045edf0f555a0f0ecdf37a5e169f7a">GetCapabilities</a> )(void)</td></tr>
<tr class="memdesc:a52045edf0f555a0f0ecdf37a5e169f7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usbd__interface__gr.html#ga178d01ab7896e1c675b90bbccfe8ea7d">ARM_USBD_GetCapabilities</a> : Get driver capabilities.  <a href="#a52045edf0f555a0f0ecdf37a5e169f7a">More...</a><br/></td></tr>
<tr class="separator:a52045edf0f555a0f0ecdf37a5e169f7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84439aa5677d330d257a4b43e48d6426"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#a84439aa5677d330d257a4b43e48d6426">Initialize</a> )(<a class="el" href="group__usbd__interface__gr.html#ga7c1878799699ddd34cec696da499f7bd">ARM_USBD_SignalDeviceEvent_t</a> cb_device_event, <a class="el" href="group__usbd__interface__gr.html#gaae754763700fc5059a6bde57ea2d4e2c">ARM_USBD_SignalEndpointEvent_t</a> cb_endpoint_event)</td></tr>
<tr class="memdesc:a84439aa5677d330d257a4b43e48d6426"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usbd__interface__gr.html#ga60b95c9c0c6767ff5938464cfd748f81">ARM_USBD_Initialize</a> : Initialize USB Device Interface.  <a href="#a84439aa5677d330d257a4b43e48d6426">More...</a><br/></td></tr>
<tr class="separator:a84439aa5677d330d257a4b43e48d6426"><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__usbd__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__usbd__interface__gr.html#gafaead6713f141be1734de0110eda966b">ARM_USBD_Uninitialize</a> : De-initialize USB Device 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__usbd__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__usbd__interface__gr.html#gaa5bdaac19f6df30c6e569abef17cdb42">ARM_USBD_PowerControl</a> : Control USB Device 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:a71d312ce5c5335c6a035da55c25848e4"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#a71d312ce5c5335c6a035da55c25848e4">DeviceConnect</a> )(void)</td></tr>
<tr class="memdesc:a71d312ce5c5335c6a035da55c25848e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usbd__interface__gr.html#ga99207f7ff5e97a7f65754eab7f775fca">ARM_USBD_DeviceConnect</a> : Connect USB Device.  <a href="#a71d312ce5c5335c6a035da55c25848e4">More...</a><br/></td></tr>
<tr class="separator:a71d312ce5c5335c6a035da55c25848e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adff9dd8a0dc764e78b0271113ae3b0af"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#adff9dd8a0dc764e78b0271113ae3b0af">DeviceDisconnect</a> )(void)</td></tr>
<tr class="memdesc:adff9dd8a0dc764e78b0271113ae3b0af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usbd__interface__gr.html#ga37234abecbb63e4e739f9676e489d2d1">ARM_USBD_DeviceDisconnect</a> : Disconnect USB Device.  <a href="#adff9dd8a0dc764e78b0271113ae3b0af">More...</a><br/></td></tr>
<tr class="separator:adff9dd8a0dc764e78b0271113ae3b0af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab906727173cbe8372bdc26ef20581baa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__usbd__interface__gr.html#structARM__USBD__STATE">ARM_USBD_STATE</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#ab906727173cbe8372bdc26ef20581baa">DeviceGetState</a> )(void)</td></tr>
<tr class="memdesc:ab906727173cbe8372bdc26ef20581baa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usbd__interface__gr.html#ga7624d6b2cbe5e6ab5016206ce641eee2">ARM_USBD_DeviceGetState</a> : Get current USB Device State.  <a href="#ab906727173cbe8372bdc26ef20581baa">More...</a><br/></td></tr>
<tr class="separator:ab906727173cbe8372bdc26ef20581baa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a649343be3fcfc44431d19f51d13e03b3"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#a649343be3fcfc44431d19f51d13e03b3">DeviceRemoteWakeup</a> )(void)</td></tr>
<tr class="memdesc:a649343be3fcfc44431d19f51d13e03b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usbd__interface__gr.html#ga7e149a4c6a0196da24a44f4fada75fb1">ARM_USBD_DeviceRemoteWakeup</a> : Trigger USB Remote Wakeup.  <a href="#a649343be3fcfc44431d19f51d13e03b3">More...</a><br/></td></tr>
<tr class="separator:a649343be3fcfc44431d19f51d13e03b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e927b5593f416a8641e12016208b5d5"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#a4e927b5593f416a8641e12016208b5d5">DeviceSetAddress</a> )(uint8_t dev_addr)</td></tr>
<tr class="memdesc:a4e927b5593f416a8641e12016208b5d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usbd__interface__gr.html#gae66f696584e25fb2ddabe9070fa38670">ARM_USBD_DeviceSetAddress</a> : Set USB Device Address.  <a href="#a4e927b5593f416a8641e12016208b5d5">More...</a><br/></td></tr>
<tr class="separator:a4e927b5593f416a8641e12016208b5d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5593bf9bb516cc7b36c6072fc55260f"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#ab5593bf9bb516cc7b36c6072fc55260f">ReadSetupPacket</a> )(uint8_t *setup)</td></tr>
<tr class="memdesc:ab5593bf9bb516cc7b36c6072fc55260f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usbd__interface__gr.html#ga6bc0ebf699a0f28330f21cab83f85e9e">ARM_USBD_ReadSetupPacket</a> : Read setup packet received over Control Endpoint.  <a href="#ab5593bf9bb516cc7b36c6072fc55260f">More...</a><br/></td></tr>
<tr class="separator:ab5593bf9bb516cc7b36c6072fc55260f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9fcafd15149d35022b05cf3c396e714e"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#a9fcafd15149d35022b05cf3c396e714e">EndpointConfigure</a> )(uint8_t ep_addr, uint8_t ep_type, uint16_t ep_max_packet_size)</td></tr>
<tr class="memdesc:a9fcafd15149d35022b05cf3c396e714e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usbd__interface__gr.html#ga62d7d5bdcf9ca7bf7e6d8434368abad8">ARM_USBD_EndpointConfigure</a> : Configure USB Endpoint.  <a href="#a9fcafd15149d35022b05cf3c396e714e">More...</a><br/></td></tr>
<tr class="separator:a9fcafd15149d35022b05cf3c396e714e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad45578fffbd046231f69aa058d29bba5"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#ad45578fffbd046231f69aa058d29bba5">EndpointUnconfigure</a> )(uint8_t ep_addr)</td></tr>
<tr class="memdesc:ad45578fffbd046231f69aa058d29bba5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usbd__interface__gr.html#gaca913df5188dc0f0c4f707b57c2a88fc">ARM_USBD_EndpointUnconfigure</a> : Unconfigure USB Endpoint.  <a href="#ad45578fffbd046231f69aa058d29bba5">More...</a><br/></td></tr>
<tr class="separator:ad45578fffbd046231f69aa058d29bba5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fbcf63ac9f962787cddc8f11a44dccb"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#a6fbcf63ac9f962787cddc8f11a44dccb">EndpointStall</a> )(uint8_t ep_addr, bool stall)</td></tr>
<tr class="memdesc:a6fbcf63ac9f962787cddc8f11a44dccb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usbd__interface__gr.html#ga9502cd7b8e4c583920fccadc4ccf7975">ARM_USBD_EndpointStall</a> : Set/Clear Stall for USB Endpoint.  <a href="#a6fbcf63ac9f962787cddc8f11a44dccb">More...</a><br/></td></tr>
<tr class="separator:a6fbcf63ac9f962787cddc8f11a44dccb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0cc21434bc57e696fabf0207925fe5ff"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#a0cc21434bc57e696fabf0207925fe5ff">EndpointTransfer</a> )(uint8_t ep_addr, uint8_t *data, uint32_t num)</td></tr>
<tr class="memdesc:a0cc21434bc57e696fabf0207925fe5ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usbd__interface__gr.html#ga6e69ad097553125bb01a22dc719e0d30">ARM_USBD_EndpointTransfer</a> : Read data from or Write data to USB Endpoint.  <a href="#a0cc21434bc57e696fabf0207925fe5ff">More...</a><br/></td></tr>
<tr class="separator:a0cc21434bc57e696fabf0207925fe5ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a217e38c26bbcdecbad8c984753b2597a"><td class="memItemLeft" align="right" valign="top">uint32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#a217e38c26bbcdecbad8c984753b2597a">EndpointTransferGetResult</a> )(uint8_t ep_addr)</td></tr>
<tr class="memdesc:a217e38c26bbcdecbad8c984753b2597a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usbd__interface__gr.html#gab81fac01522a4d504edcb7b7d3abba6c">ARM_USBD_EndpointTransferGetResult</a> : Get result of USB Endpoint transfer.  <a href="#a217e38c26bbcdecbad8c984753b2597a">More...</a><br/></td></tr>
<tr class="separator:a217e38c26bbcdecbad8c984753b2597a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e36fd46291f71e4a748264e2f6ae431"><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#a4e36fd46291f71e4a748264e2f6ae431">EndpointTransferAbort</a> )(uint8_t ep_addr)</td></tr>
<tr class="memdesc:a4e36fd46291f71e4a748264e2f6ae431"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usbd__interface__gr.html#ga7cf3bcc105dbb8cbdc915e8caca8529e">ARM_USBD_EndpointTransferAbort</a> : Abort current USB Endpoint transfer.  <a href="#a4e36fd46291f71e4a748264e2f6ae431">More...</a><br/></td></tr>
<tr class="separator:a4e36fd46291f71e4a748264e2f6ae431"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31d1785d6d46f75241ebbf6b5a6b4919"><td class="memItemLeft" align="right" valign="top">uint16_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__usbd__interface__gr.html#a31d1785d6d46f75241ebbf6b5a6b4919">GetFrameNumber</a> )(void)</td></tr>
<tr class="memdesc:a31d1785d6d46f75241ebbf6b5a6b4919"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to <a class="el" href="group__usbd__interface__gr.html#ga4cd050b8343407fe465a27ad1cb7c264">ARM_USBD_GetFrameNumber</a> : Get current USB Frame Number.  <a href="#a31d1785d6d46f75241ebbf6b5a6b4919">More...</a><br/></td></tr>
<tr class="separator:a31d1785d6d46f75241ebbf6b5a6b4919"><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__usbd__interface__gr.html#ga1dcb8b7790f0e3613ee3da77e5fd18fc">ARM_USBD_GetVersion</a> : Get driver version. </p>

</div>
</div>
<a class="anchor" id="a52045edf0f555a0f0ecdf37a5e169f7a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__usbd__interface__gr.html#structARM__USBD__CAPABILITIES">ARM_USBD_CAPABILITIES</a>(* GetCapabilities)(void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usbd__interface__gr.html#ga178d01ab7896e1c675b90bbccfe8ea7d">ARM_USBD_GetCapabilities</a> : Get driver capabilities. </p>

</div>
</div>
<a class="anchor" id="a84439aa5677d330d257a4b43e48d6426"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* Initialize)(<a class="el" href="group__usbd__interface__gr.html#ga7c1878799699ddd34cec696da499f7bd">ARM_USBD_SignalDeviceEvent_t</a> cb_device_event, <a class="el" href="group__usbd__interface__gr.html#gaae754763700fc5059a6bde57ea2d4e2c">ARM_USBD_SignalEndpointEvent_t</a> cb_endpoint_event)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usbd__interface__gr.html#ga60b95c9c0c6767ff5938464cfd748f81">ARM_USBD_Initialize</a> : Initialize USB Device 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__usbd__interface__gr.html#gafaead6713f141be1734de0110eda966b">ARM_USBD_Uninitialize</a> : De-initialize USB Device 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__usbd__interface__gr.html#gaa5bdaac19f6df30c6e569abef17cdb42">ARM_USBD_PowerControl</a> : Control USB Device Interface Power. </p>

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

<p>Pointer to <a class="el" href="group__usbd__interface__gr.html#ga99207f7ff5e97a7f65754eab7f775fca">ARM_USBD_DeviceConnect</a> : Connect USB Device. </p>

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

<p>Pointer to <a class="el" href="group__usbd__interface__gr.html#ga37234abecbb63e4e739f9676e489d2d1">ARM_USBD_DeviceDisconnect</a> : Disconnect USB Device. </p>

</div>
</div>
<a class="anchor" id="ab906727173cbe8372bdc26ef20581baa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__usbd__interface__gr.html#structARM__USBD__STATE">ARM_USBD_STATE</a>(* DeviceGetState)(void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usbd__interface__gr.html#ga7624d6b2cbe5e6ab5016206ce641eee2">ARM_USBD_DeviceGetState</a> : Get current USB Device State. </p>

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

<p>Pointer to <a class="el" href="group__usbd__interface__gr.html#ga7e149a4c6a0196da24a44f4fada75fb1">ARM_USBD_DeviceRemoteWakeup</a> : Trigger USB Remote Wakeup. </p>

</div>
</div>
<a class="anchor" id="a4e927b5593f416a8641e12016208b5d5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* DeviceSetAddress)(uint8_t dev_addr)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usbd__interface__gr.html#gae66f696584e25fb2ddabe9070fa38670">ARM_USBD_DeviceSetAddress</a> : Set USB Device Address. </p>

</div>
</div>
<a class="anchor" id="ab5593bf9bb516cc7b36c6072fc55260f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* ReadSetupPacket)(uint8_t *setup)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usbd__interface__gr.html#ga6bc0ebf699a0f28330f21cab83f85e9e">ARM_USBD_ReadSetupPacket</a> : Read setup packet received over Control Endpoint. </p>

</div>
</div>
<a class="anchor" id="a9fcafd15149d35022b05cf3c396e714e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* EndpointConfigure)(uint8_t ep_addr, uint8_t ep_type, uint16_t ep_max_packet_size)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usbd__interface__gr.html#ga62d7d5bdcf9ca7bf7e6d8434368abad8">ARM_USBD_EndpointConfigure</a> : Configure USB Endpoint. </p>

</div>
</div>
<a class="anchor" id="ad45578fffbd046231f69aa058d29bba5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* EndpointUnconfigure)(uint8_t ep_addr)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usbd__interface__gr.html#gaca913df5188dc0f0c4f707b57c2a88fc">ARM_USBD_EndpointUnconfigure</a> : Unconfigure USB Endpoint. </p>

</div>
</div>
<a class="anchor" id="a6fbcf63ac9f962787cddc8f11a44dccb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* EndpointStall)(uint8_t ep_addr, bool stall)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usbd__interface__gr.html#ga9502cd7b8e4c583920fccadc4ccf7975">ARM_USBD_EndpointStall</a> : Set/Clear Stall for USB Endpoint. </p>

</div>
</div>
<a class="anchor" id="a0cc21434bc57e696fabf0207925fe5ff"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* EndpointTransfer)(uint8_t ep_addr, uint8_t *data, uint32_t num)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usbd__interface__gr.html#ga6e69ad097553125bb01a22dc719e0d30">ARM_USBD_EndpointTransfer</a> : Read data from or Write data to USB Endpoint. </p>

</div>
</div>
<a class="anchor" id="a217e38c26bbcdecbad8c984753b2597a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t(* EndpointTransferGetResult)(uint8_t ep_addr)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usbd__interface__gr.html#gab81fac01522a4d504edcb7b7d3abba6c">ARM_USBD_EndpointTransferGetResult</a> : Get result of USB Endpoint transfer. </p>

</div>
</div>
<a class="anchor" id="a4e36fd46291f71e4a748264e2f6ae431"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t(* EndpointTransferAbort)(uint8_t ep_addr)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usbd__interface__gr.html#ga7cf3bcc105dbb8cbdc915e8caca8529e">ARM_USBD_EndpointTransferAbort</a> : Abort current USB Endpoint transfer. </p>

</div>
</div>
<a class="anchor" id="a31d1785d6d46f75241ebbf6b5a6b4919"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t(* GetFrameNumber)(void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer to <a class="el" href="group__usbd__interface__gr.html#ga4cd050b8343407fe465a27ad1cb7c264">ARM_USBD_GetFrameNumber</a> : Get current USB Frame Number. </p>

</div>
</div>

</div>
</div>
<a name="structARM__USBD__CAPABILITIES" id="structARM__USBD__CAPABILITIES"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct ARM_USBD_CAPABILITIES</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>USB Device Driver Capabilities. </p>
<p>A USB Device driver can be implemented with different capabilities. The data fields of this structure encode the capabilities implemented by this driver.</p>
<p><b>Returned by:</b></p>
<ul>
<li><a class="el" href="group__usbd__interface__gr.html#ga178d01ab7896e1c675b90bbccfe8ea7d">ARM_USBD_GetCapabilities</a></li>
</ul>
<dl class="section note"><dt>Note</dt><dd>The struct must remain unchanged. </dd></dl>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a6673fc1aa13f62122ecf51e52a605c6e"></a>uint32_t</td>
<td class="fieldname">
vbus_detection: 1</td>
<td class="fielddoc">
VBUS detection. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a53f95b9ecb7c84197947e7542501c7d3"></a>uint32_t</td>
<td class="fieldname">
event_vbus_on: 1</td>
<td class="fielddoc">
Signal VBUS On event. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a72d905bc20735bafda40d73c91829709"></a>uint32_t</td>
<td class="fieldname">
event_vbus_off: 1</td>
<td class="fielddoc">
Signal VBUS Off event. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa43c4c21b173ada1b6b7568956f0d650"></a>uint32_t</td>
<td class="fieldname">
reserved: 29</td>
<td class="fielddoc">
Reserved (must be zero) </td></tr>
</table>

</div>
</div>
<a name="structARM__USBD__STATE" id="structARM__USBD__STATE"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct ARM_USBD_STATE</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>USB Device State. </p>
<p>This structure stores information about the state of the USB Device. The data fields encode the established speed, whether the device is powered and active.</p>
<p><b>Returned by:</b></p>
<ul>
<li><a class="el" href="group__usbd__interface__gr.html#ga7624d6b2cbe5e6ab5016206ce641eee2">ARM_USBD_DeviceGetState</a> </li>
</ul>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa961d5fb2bd3d2960578f1ac3b903070"></a>uint32_t</td>
<td class="fieldname">
vbus: 1</td>
<td class="fielddoc">
USB Device VBUS flag. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a220859a8b5da0232739a11cbe7f79fc5"></a>uint32_t</td>
<td class="fieldname">
speed: 2</td>
<td class="fielddoc">
USB Device speed setting (ARM_USB_SPEED_xxx) </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ab22b96a3efad48f5a542f46c1b224800"></a>uint32_t</td>
<td class="fieldname">
active: 1</td>
<td class="fielddoc">
USB Device active flag. </td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa43c4c21b173ada1b6b7568956f0d650"></a>uint32_t</td>
<td class="fieldname">
reserved: 28</td>
<td class="fielddoc">
</td></tr>
</table>

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

<p>Pointer to <a class="el" href="group__usbd__interface__gr.html#gafe58a4db1d26b21ca5d418ee49e103a5">ARM_USBD_SignalDeviceEvent</a> : Signal USB Device Event. </p>
<p>Provides the typedef for the callback function <a class="el" href="group__usbd__interface__gr.html#gafe58a4db1d26b21ca5d418ee49e103a5">ARM_USBD_SignalDeviceEvent</a>.</p>
<p><b>Parameter for:</b></p>
<ul>
<li><a class="el" href="group__usbd__interface__gr.html#ga60b95c9c0c6767ff5938464cfd748f81">ARM_USBD_Initialize</a> </li>
</ul>

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

<p>Pointer to <a class="el" href="group__usbd__interface__gr.html#ga9aa5bc5cb45084194a77fae1457f6575">ARM_USBD_SignalEndpointEvent</a> : Signal USB Endpoint Event. </p>
<p>Provides the typedef for the callback function <a class="el" href="group__usbd__interface__gr.html#ga9aa5bc5cb45084194a77fae1457f6575">ARM_USBD_SignalEndpointEvent</a>.</p>
<p><b>Parameter for:</b></p>
<ul>
<li><a class="el" href="group__usbd__interface__gr.html#ga60b95c9c0c6767ff5938464cfd748f81">ARM_USBD_Initialize</a> </li>
</ul>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga1dcb8b7790f0e3613ee3da77e5fd18fc"></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_USBD_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_USBD_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__usbd__interface__gr.html#structARM__DRIVER__USBD">ARM_DRIVER_USBD</a> Driver_USBD0;</div>
<div class="line"><a class="code" href="group__usbd__interface__gr.html#structARM__DRIVER__USBD">ARM_DRIVER_USBD</a> *drv_info;</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> setup_usbd (<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_USBD0;  </div>
<div class="line">  version = drv_info-&gt;<a class="code" href="group__usbd__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="ga178d01ab7896e1c675b90bbccfe8ea7d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__usbd__interface__gr.html#structARM__USBD__CAPABILITIES">ARM_USBD_CAPABILITIES</a> ARM_USBD_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__usbd__interface__gr.html#structARM__USBD__CAPABILITIES">ARM_USBD_CAPABILITIES</a></dd></dl>
<p>The function <b>ARM_USBD_GetCapabilities</b> returns information about capabilities in this driver implementation. The data fields of the structure <a class="el" href="group__usbd__interface__gr.html#structARM__USBD__CAPABILITIES">ARM_USBD_CAPABILITIES</a> encode various capabilities, for example if the hardware can create signal events using the <a class="el" href="group__usbd__interface__gr.html#gafe58a4db1d26b21ca5d418ee49e103a5">ARM_USBD_SignalDeviceEvent</a> callback function.</p>
<p>Example: </p>
<div class="fragment"><div class="line"><span class="keyword">extern</span> <a class="code" href="group__usbd__interface__gr.html#structARM__DRIVER__USBD">ARM_DRIVER_USBD</a> Driver_USBD0;</div>
<div class="line"><a class="code" href="group__usbd__interface__gr.html#structARM__DRIVER__USBD">ARM_DRIVER_USBD</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__usbd__interface__gr.html#structARM__USBD__CAPABILITIES">ARM_USBD_CAPABILITIES</a> drv_capabilities;</div>
<div class="line"> </div>
<div class="line">  drv_info = &amp;Driver_USBD0;  </div>
<div class="line">  drv_capabilities = drv_info-&gt;<a class="code" href="group__usbd__interface__gr.html#a52045edf0f555a0f0ecdf37a5e169f7a">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="ga60b95c9c0c6767ff5938464cfd748f81"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_USBD_Initialize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__usbd__interface__gr.html#ga7c1878799699ddd34cec696da499f7bd">ARM_USBD_SignalDeviceEvent_t</a>&#160;</td>
          <td class="paramname"><em>cb_device_event</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__usbd__interface__gr.html#gaae754763700fc5059a6bde57ea2d4e2c">ARM_USBD_SignalEndpointEvent_t</a>&#160;</td>
          <td class="paramname"><em>cb_endpoint_event</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize USB Device Interface. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cb_device_event</td><td>Pointer to <a class="el" href="group__usbd__interface__gr.html#gafe58a4db1d26b21ca5d418ee49e103a5">ARM_USBD_SignalDeviceEvent</a> </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cb_endpoint_event</td><td>Pointer to <a class="el" href="group__usbd__interface__gr.html#ga9aa5bc5cb45084194a77fae1457f6575">ARM_USBD_SignalEndpointEvent</a> </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_USBD_Initialize</b> initializes the USB Device interface. It is called when the middleware component starts operation.</p>
<p>The function performs the following operations:</p>
<ul>
<li>Initializes the resources needed for the USBD interface.</li>
<li>Registers the <a class="el" href="group__usbd__interface__gr.html#gafe58a4db1d26b21ca5d418ee49e103a5">ARM_USBD_SignalDeviceEvent</a> callback function.</li>
<li>Registers the <a class="el" href="group__usbd__interface__gr.html#ga9aa5bc5cb45084194a77fae1457f6575">ARM_USBD_SignalEndpointEvent</a> callback function.</li>
</ul>
<p>The parameter <em>cb_device_event</em> is a pointer to the <a class="el" href="group__usbd__interface__gr.html#gafe58a4db1d26b21ca5d418ee49e103a5">ARM_USBD_SignalDeviceEvent</a> callback function; use a NULL pointer when no device callback signals are required. <br/>
The parameter <em>cb_endpoint_event</em> is a pointer to the <a class="el" href="group__usbd__interface__gr.html#ga9aa5bc5cb45084194a77fae1457f6575">ARM_USBD_SignalEndpointEvent</a> callback function.</p>
<p><b>Example:</b> </p>
<ul>
<li>see <a class="el" href="group__usbd__interface__gr.html">USB Device Interface</a> - Driver Functions </li>
</ul>

</div>
</div>
<a class="anchor" id="gafaead6713f141be1734de0110eda966b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_USBD_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 USB Device 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_USBD_Uninitialize</b> de-initializes the resources of USBD interface.</p>
<p>It is called when the middleware component stops operation and releases the software resources used by the interface. </p>

</div>
</div>
<a class="anchor" id="gaa5bdaac19f6df30c6e569abef17cdb42"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_USBD_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 USB Device 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 </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_USBD_PowerControl</b> operates the power modes of the USB Device interface.</p>
<p>The parameter <em>state</em> sets the operation and can have the following values:</p>
<ul>
<li><a class="el" href="Driver__Common_8h.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5abed52b77a9ce4775570e44a842b1295e">ARM_POWER_FULL</a> : set-up peripheral for data transfers, enable interrupts (NVIC) and optionally DMA. Can be called multiple times. If the peripheral is already in this mode the function performs no operation and returns with <a class="el" href="group__execution__status.html#ga85752c5de59e8adeb001e35ff5be6be7">ARM_DRIVER_OK</a>.</li>
<li><a class="el" href="Driver__Common_8h.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5a9ef9e57cbcc948d0e22314e73dc8c434">ARM_POWER_LOW</a> : may use power saving. Returns <a class="el" href="group__execution__status.html#ga2efa59e480d82697795439220e6884e4">ARM_DRIVER_ERROR_UNSUPPORTED</a> when not implemented.</li>
<li><a class="el" href="Driver__Common_8h.html#ga47d6d7c31f88f3b8ae4aaf9d8444afa5ab6f5becc85ebd51c3dd2524a95d2ca35">ARM_POWER_OFF</a> : terminates any pending data transfers, disables peripheral, disables related interrupts and DMA.</li>
</ul>
<p>Refer to <a class="el" href="theoryOperation.html#CallSequence">Function Call Sequence</a> for more information. </p>

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

<p>Connect USB Device. </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_USBD_DeviceConnect</b> signals to the host that the device is connected. </p>

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

<p>Disconnect USB Device. </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_USBD_DeviceDisconnect</b> signals to the host that the device is disconnected. </p>

</div>
</div>
<a class="anchor" id="ga7624d6b2cbe5e6ab5016206ce641eee2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__usbd__interface__gr.html#structARM__USBD__STATE">ARM_USBD_STATE</a> ARM_USBD_DeviceGetState </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 current USB Device State. </p>
<dl class="section return"><dt>Returns</dt><dd>Device State <a class="el" href="group__usbd__interface__gr.html#structARM__USBD__STATE">ARM_USBD_STATE</a></dd></dl>
<p>Retrieves the current USB device state. </p>

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

<p>Trigger USB Remote Wakeup. </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_USBD_DeviceRemoteWakeup</b> signals remote wakeup to the host. </p>

</div>
</div>
<a class="anchor" id="gae66f696584e25fb2ddabe9070fa38670"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_USBD_DeviceSetAddress </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>dev_addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set USB Device Address. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">dev_addr</td><td>Device Address </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>Assigns an address to the device. </p>

</div>
</div>
<a class="anchor" id="ga6bc0ebf699a0f28330f21cab83f85e9e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_USBD_ReadSetupPacket </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>setup</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read setup packet received over Control Endpoint. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">setup</td><td>Pointer to buffer for setup packet </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_USBD_ReadSetupPacket</b> reads the last SETUP packet (8 bytes) that was received over Control Endpoint (Endpoint 0) which is indicated by <a class="el" href="group__USBD__ep__events.html#gaa0814f6880f4c0ac302ac9ebc8170739">ARM_USBD_EVENT_SETUP</a> event.</p>
<p><b>See also:</b></p>
<ul>
<li><a class="el" href="group__usbd__interface__gr.html#ga9aa5bc5cb45084194a77fae1457f6575">ARM_USBD_SignalEndpointEvent</a> </li>
</ul>

</div>
</div>
<a class="anchor" id="ga62d7d5bdcf9ca7bf7e6d8434368abad8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_USBD_EndpointConfigure </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>ep_addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>ep_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>ep_max_packet_size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configure USB Endpoint. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ep_addr</td><td>Endpoint Address<ul>
<li>ep_addr.0..3: Address</li>
<li>ep_addr.7: Direction </li>
</ul>
</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ep_type</td><td>Endpoint Type (ARM_USB_ENDPOINT_xxx) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ep_max_packet_size</td><td>Endpoint Maximum Packet Size </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_USBD_EndpointConfigure</b> configures an endpoint for transfers. </p>

</div>
</div>
<a class="anchor" id="gaca913df5188dc0f0c4f707b57c2a88fc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_USBD_EndpointUnconfigure </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>ep_addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Unconfigure USB Endpoint. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ep_addr</td><td>Endpoint Address<ul>
<li>ep_addr.0..3: Address</li>
<li>ep_addr.7: Direction </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_USBD_EndpointUnconfigure</b> de-configures the specified endpoint.</p>
<p>The parameter <em>ep_addr</em> specifies the endpoint address. </p>

</div>
</div>
<a class="anchor" id="ga9502cd7b8e4c583920fccadc4ccf7975"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_USBD_EndpointStall </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>ep_addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>stall</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set/Clear Stall for USB Endpoint. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ep_addr</td><td>Endpoint Address<ul>
<li>ep_addr.0..3: Address</li>
<li>ep_addr.7: Direction </li>
</ul>
</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">stall</td><td>Operation<ul>
<li><b>false</b> Clear</li>
<li><b>true</b> Set </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_USBD_EndpointStall</b> sets or clears stall condition for the specified endpoint.</p>
<p>The parameter <em>ep_addr</em> specifies the endpoint address. <br/>
The parameter <em>stall</em> is a boolean parameter. </p>

</div>
</div>
<a class="anchor" id="ga6e69ad097553125bb01a22dc719e0d30"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_USBD_EndpointTransfer </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>ep_addr</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">uint32_t&#160;</td>
          <td class="paramname"><em>num</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read data from or Write data to USB Endpoint. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ep_addr</td><td>Endpoint Address<ul>
<li>ep_addr.0..3: Address</li>
<li>ep_addr.7: Direction </li>
</ul>
</td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">data</td><td>Pointer to buffer for data to read or with data to write </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num</td><td>Number of data bytes to transfer </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_USBD_EndpointTransfer</b> reads from or writes data to an USB Endpoint.</p>
<p>The parameter <em>ep_addr</em> specifies the endpoint address. <br/>
The parameter <em>data</em> is a buffer for data to read or data to write. <br/>
The parameter <em>num</em> is the number of bytes to transfer (must be multiple of endpoint maximum packet size for Read transfers).</p>
<p>The function is non-blocking and returns as soon as the driver starts the operation on the specified endpoint. During the operation it is not allowed to call this function again on the same endpoint. Also the data buffer must stay allocated and the contents of data must not be modified.</p>
<p>Direction in the endpoint address specifies the type of transfer:</p>
<ul>
<li>Endpoint Read for OUT endpoint (direction = 0)</li>
<li>Endpoint Write for IN endpoint (direction = 1)</li>
</ul>
<p>Endpoint Read is finished when the requested number of data bytes have been received or when a short packet or ZLP (Zero-Length Packet) has been received. Completion of operation is indicated by <a class="el" href="group__USBD__ep__events.html#ga35f7340508acb5fe7a5f43bbcac1887a">ARM_USBD_EVENT_OUT</a> event. Number of successfully received data bytes can be retrieved by calling <a class="el" href="group__usbd__interface__gr.html#gab81fac01522a4d504edcb7b7d3abba6c">ARM_USBD_EndpointTransferGetResult</a>.</p>
<p>Endpoint Write is finished when the requested number of data bytes have been sent. Completion of operation is indicated by <a class="el" href="group__USBD__ep__events.html#ga375d3d8f363a056ff607c5ab3b92a864">ARM_USBD_EVENT_IN</a> event. Number of successfully sent data bytes can be retrieved by calling <a class="el" href="group__usbd__interface__gr.html#gab81fac01522a4d504edcb7b7d3abba6c">ARM_USBD_EndpointTransferGetResult</a>.</p>
<p>Transfer operation can be aborted by calling <a class="el" href="group__usbd__interface__gr.html#ga7cf3bcc105dbb8cbdc915e8caca8529e">ARM_USBD_EndpointTransferAbort</a>. </p>

</div>
</div>
<a class="anchor" id="gab81fac01522a4d504edcb7b7d3abba6c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ARM_USBD_EndpointTransferGetResult </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>ep_addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get result of USB Endpoint transfer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ep_addr</td><td>Endpoint Address<ul>
<li>ep_addr.0..3: Address</li>
<li>ep_addr.7: Direction </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of successfully transferred data bytes</dd></dl>
<p>The function <b>ARM_USBD_EndpointTransferGetResult</b> returns the number of successfully transferred data bytes started by <a class="el" href="group__usbd__interface__gr.html#ga6e69ad097553125bb01a22dc719e0d30">ARM_USBD_EndpointTransfer</a>.</p>
<p>The parameter <em>ep_addr</em> specifies the endpoint address. </p>

</div>
</div>
<a class="anchor" id="ga7cf3bcc105dbb8cbdc915e8caca8529e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t ARM_USBD_EndpointTransferAbort </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>ep_addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Abort current USB Endpoint transfer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ep_addr</td><td>Endpoint Address<ul>
<li>ep_addr.0..3: Address</li>
<li>ep_addr.7: Direction </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_USBD_EndpointTransferAbort</b> aborts the transfer to an endpoint started by <a class="el" href="group__usbd__interface__gr.html#ga6e69ad097553125bb01a22dc719e0d30">ARM_USBD_EndpointTransfer</a>.</p>
<p>The parameter <em>ep_addr</em> specifies the endpoint address. </p>

</div>
</div>
<a class="anchor" id="ga4cd050b8343407fe465a27ad1cb7c264"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t ARM_USBD_GetFrameNumber </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 current USB Frame Number. </p>
<dl class="section return"><dt>Returns</dt><dd>Frame Number</dd></dl>
<p>Retrieves the sequential 11-bit frame number of the last Start of Frame (SOF) packet. </p>

</div>
</div>
<a class="anchor" id="gafe58a4db1d26b21ca5d418ee49e103a5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ARM_USBD_SignalDeviceEvent </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 USB Device 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__USBD__dev__events.html">USBD Device Events</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none</dd></dl>
<p>The function <b>ARM_USBD_SignalDeviceEvent</b> is a callback function registered by the function <a class="el" href="group__usbd__interface__gr.html#ga60b95c9c0c6767ff5938464cfd748f81">ARM_USBD_Initialize</a>.</p>
<p>The parameter <em>event</em> indicates one or more events that occurred during driver operation. Each event is encoded in a separate bit and therefore it is possible to signal multiple events within the same call.</p>
<p>Not every event is necessarily generated by the driver. This depends on the implemented capabilities stored in the data fields of the structure <a class="el" href="group__usbd__interface__gr.html#structARM__USBD__CAPABILITIES">ARM_USBD_CAPABILITIES</a>, which can be retrieved with the function <a class="el" href="group__usbd__interface__gr.html#ga178d01ab7896e1c675b90bbccfe8ea7d">ARM_USBD_GetCapabilities</a>.</p>
<p>The following events can be generated:</p>
<table class="doxtable">
<tr>
<th align="left">Event </th><th align="right">Bit</th><th align="left">Description </th><th>supported when <a class="el" href="group__usbd__interface__gr.html#structARM__USBD__CAPABILITIES">ARM_USBD_CAPABILITIES</a>  </th></tr>
<tr>
<td align="left"><a class="el" href="group__USBD__dev__events.html#ga32546413cfe55154351f74fb56de1045">ARM_USBD_EVENT_VBUS_ON</a> </td><td align="right">0 </td><td align="left">Occurs when valid VBUS voltage is detected. </td><td>data field <em>event_vbus_on</em> = <span class="XML-Token">1</span> </td></tr>
<tr>
<td align="left"><a class="el" href="group__USBD__dev__events.html#ga6810c08a6e6a46ba443899e5ba9c3aec">ARM_USBD_EVENT_VBUS_OFF</a> </td><td align="right">1 </td><td align="left">Occurs when VBUS voltage is turned off. </td><td>data field <em>event_vbus_off</em> = <span class="XML-Token">1</span> </td></tr>
<tr>
<td align="left"><a class="el" href="group__USBD__dev__events.html#ga489e1b88f7b0361494ca3a8dc73c227a">ARM_USBD_EVENT_RESET</a> </td><td align="right">2 </td><td align="left">Occurs when USB Reset is detected. </td><td><em>always supported</em> </td></tr>
<tr>
<td align="left"><a class="el" href="group__USBD__dev__events.html#ga689d1e031013d0e66aeef4243490d843">ARM_USBD_EVENT_HIGH_SPEED</a> </td><td align="right">3 </td><td align="left">Occurs when USB Device is switched to High-speed. </td><td><em>always supported</em> </td></tr>
<tr>
<td align="left"><a class="el" href="group__USBD__dev__events.html#ga74dc7c0ba71baf285400d5a555224653">ARM_USBD_EVENT_SUSPEND</a> </td><td align="right">4 </td><td align="left">Occurs when USB Suspend is detected. </td><td><em>always supported</em> </td></tr>
<tr>
<td align="left"><a class="el" href="group__USBD__dev__events.html#ga5b1c9884b237ba7778f79761e5db9f45">ARM_USBD_EVENT_RESUME</a> </td><td align="right">5 </td><td align="left">Occurs when USB Resume is detected. </td><td><em>always supported</em> </td></tr>
</table>

</div>
</div>
<a class="anchor" id="ga9aa5bc5cb45084194a77fae1457f6575"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ARM_USBD_SignalEndpointEvent </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>ep_addr</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 USB Endpoint Event. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ep_addr</td><td>Endpoint Address<ul>
<li>ep_addr.0..3: Address</li>
<li>ep_addr.7: Direction </li>
</ul>
</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">event</td><td><a class="el" href="group__USBD__ep__events.html">USBD Endpoint Events</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none</dd></dl>
<p>The function <b>ARM_USBD_SignalEndpointEvent</b> is a callback function registered by the function <a class="el" href="group__usbd__interface__gr.html#ga60b95c9c0c6767ff5938464cfd748f81">ARM_USBD_Initialize</a>.</p>
<p>The argument <em>ep_addr</em> specifies the endpoint. <br/>
The parameter <em>event</em> indicates one or more events that occurred during driver operation. Each event is encoded in a separate bit and therefore it is possible to signal multiple events within the same call.</p>
<p>The following events can be generated:</p>
<table class="doxtable">
<tr>
<th align="left">Event </th><th align="right">Bit </th><th align="left">Description  </th></tr>
<tr>
<td align="left"><a class="el" href="group__USBD__ep__events.html#gaa0814f6880f4c0ac302ac9ebc8170739">ARM_USBD_EVENT_SETUP</a> </td><td align="right">0 </td><td align="left">Occurs when SETUP packet is received over Control Endpoint. </td></tr>
<tr>
<td align="left"><a class="el" href="group__USBD__ep__events.html#ga35f7340508acb5fe7a5f43bbcac1887a">ARM_USBD_EVENT_OUT</a> </td><td align="right">1 </td><td align="left">Occurs when data is received over OUT Endpoint. </td></tr>
<tr>
<td align="left"><a class="el" href="group__USBD__ep__events.html#ga375d3d8f363a056ff607c5ab3b92a864">ARM_USBD_EVENT_IN</a> </td><td align="right">2 </td><td align="left">Occurs when data is sent over IN Endpoint. </td></tr>
</table>

</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:32 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>