Select one of the symbols to view example projects that use it.
 
Outline
#define __USBH_MTP_H
#include "usbh_mtp_ptp.h"
#include "usbh_core.h"
#define USB_MTP_CLASS
#define MTP_MAX_STORAGE_UNITS_NBR
MTP_StateTypeDef
MTP_EventsStateTypeDef
MTP_EventHandleTypedef
MTP_ParamsTypedef
MTP_InfoTypedef
_MTP_Process
#define MTP_StorageInfoTypedef
#define MTP_ObjectHandlesTypedef
#define MTP_ObjectInfoTypedef
MTP_Class;
#define USBH_MTP_CLASS
USBH_MTP_IsReady(USBH_HandleTypeDef *);
USBH_MTP_SelectStorage(USBH_HandleTypeDef *, uint8_t);
USBH_MTP_GetNumStorage(USBH_HandleTypeDef *, uint8_t *);
USBH_MTP_GetNumObjects(USBH_HandleTypeDef *, uint32_t, uint32_t, uint32_t, uint32_t *);
USBH_MTP_GetStorageInfo(USBH_HandleTypeDef *, uint8_t, PTP_StorageInfoTypedef *);
USBH_MTP_GetObjectHandles(USBH_HandleTypeDef *, uint32_t, uint32_t, uint32_t, PTP_ObjectHandlesTypedef *);
USBH_MTP_GetObjectInfo(USBH_HandleTypeDef *, uint32_t, PTP_ObjectInfoTypedef *);
USBH_MTP_DeleteObject(USBH_HandleTypeDef *, uint32_t, uint32_t);
USBH_MTP_GetObject(USBH_HandleTypeDef *, uint32_t, uint8_t *);
USBH_MTP_GetPartialObject(USBH_HandleTypeDef *, uint32_t, uint32_t, uint32_t, uint8_t *, uint32_t *);
USBH_MTP_GetObjectPropsSupported(USBH_HandleTypeDef *, uint16_t, uint32_t *, uint16_t *);
USBH_MTP_GetObjectPropDesc(USBH_HandleTypeDef *, uint16_t, uint16_t, PTP_ObjectPropDescTypeDef *);
USBH_MTP_GetObjectPropList(USBH_HandleTypeDef *, uint32_t, MTP_PropertiesTypedef *, uint32_t *);
USBH_MTP_SendObject(USBH_HandleTypeDef *, uint32_t, uint8_t *, uint32_t);
USBH_MTP_GetDevicePropDesc(USBH_HandleTypeDef *, uint16_t, PTP_DevicePropDescTypdef *);
USBH_MTP_EventsCallback(USBH_HandleTypeDef *, uint32_t, uint32_t);
Files
loading...
SourceVuSTM32 Libraries and SamplesSTM32_USB_Host_LibraryClass/MTP/Inc/usbh_mtp.h
 
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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/** ****************************************************************************** * @file usbh_mtp.h * @author MCD Application Team * @brief This file contains all the prototypes for the usbh_mtp.c ****************************************************************************** * @attention * * Copyright (c) 2015 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** *//* ... */ /* Define to prevent recursive ----------------------------------------------*/ #ifndef __USBH_MTP_H #define __USBH_MTP_H #ifdef __cplusplus extern "C" { #endif /* Includes ------------------------------------------------------------------*/ #include "usbh_mtp_ptp.h" #include "usbh_core.h" /** @addtogroup USBH_LIB * @{ *//* ... */ /** @addtogroup USBH_CLASS * @{ *//* ... */ /** @addtogroup USBH_MTP_CLASS * @{ *//* ... */ /** @defgroup USBH_MTP_CORE * @brief This file is the Header file for usbh_mtp.c * @{ *//* ... */ /*Communication Class codes*/ #define USB_MTP_CLASS 0x06U /* Still Image Class)*/ #define MTP_MAX_STORAGE_UNITS_NBR PTP_MAX_STORAGE_UNITS_NBR /** * @} *//* ... */ /** @defgroup USBH_MTP_CORE_Exported_Types * @{ *//* ... */ typedef enum { MTP_IDLE = 0, MTP_GETDEVICEINFO, MTP_OPENSESSION, MTP_CLOSESESSION, MTP_GETSTORAGEIDS, MTP_GETSTORAGEINFO, ...} MTP_StateTypeDef; typedef enum { MTP_EVENTS_INIT = 0, MTP_EVENTS_GETDATA, ...} MTP_EventsStateTypeDef; typedef struct { MTP_EventsStateTypeDef state; uint32_t timer; uint16_t poll; PTP_EventContainerTypedef container; ...} MTP_EventHandleTypedef; typedef struct { uint32_t CurrentStorageId; uint32_t ObjectFormatCode; uint32_t CurrentObjectHandler; uint8_t ObjectHandlerNbr; uint32_t Objdepth; ...} MTP_ParamsTypedef; typedef struct { PTP_DeviceInfoTypedef devinfo; PTP_StorageIDsTypedef storids; PTP_StorageInfoTypedef storinfo[MTP_MAX_STORAGE_UNITS_NBR]; PTP_ObjectHandlesTypedef Handles; ...} MTP_InfoTypedef; /* Structure for MTP process */ typedef struct _MTP_Process { MTP_InfoTypedef info; MTP_ParamsTypedef params; uint8_t DataInPipe; uint8_t DataOutPipe; uint8_t NotificationPipe; uint8_t DataOutEp; uint8_t DataInEp; uint8_t NotificationEp; uint16_t DataOutEpSize; uint16_t DataInEpSize; uint16_t NotificationEpSize; MTP_StateTypeDef state; MTP_EventHandleTypedef events; PTP_HandleTypeDef ptp; uint32_t current_storage_unit; uint32_t is_ready; ...} MTP_HandleTypeDef; #define MTP_StorageInfoTypedef PTP_StorageInfoTypedef #define MTP_ObjectHandlesTypedef PTP_ObjectHandlesTypedef #define MTP_ObjectInfoTypedef PTP_ObjectInfoTypedef /** * @} *//* ... */ /** @defgroup USBH_MTP_CORE_Exported_Defines * @{ *//* ... */ /** * @} *//* ... */ /** @defgroup USBH_MTP_CORE_Exported_Macros * @{ *//* ... */ /** * @} *//* ... */ /** @defgroup USBH_MTP_CORE_Exported_Variables * @{ *//* ... */ extern USBH_ClassTypeDef MTP_Class; #define USBH_MTP_CLASS &MTP_Class /** * @} *//* ... */ /** @defgroup USBH_MTP_CORE_Exported_FunctionsPrototype * @{ *//* ... */ uint8_t USBH_MTP_IsReady(USBH_HandleTypeDef *phost); USBH_StatusTypeDef USBH_MTP_SelectStorage(USBH_HandleTypeDef *phost, uint8_t storage_idx); USBH_StatusTypeDef USBH_MTP_GetNumStorage(USBH_HandleTypeDef *phost, uint8_t *storage_num); USBH_StatusTypeDef USBH_MTP_GetNumObjects(USBH_HandleTypeDef *phost, uint32_t storage_idx, uint32_t objectformatcode, uint32_t associationOH, uint32_t *numobs); USBH_StatusTypeDef USBH_MTP_GetStorageInfo(USBH_HandleTypeDef *phost, uint8_t storage_idx, MTP_StorageInfoTypedef *info); USBH_StatusTypeDef USBH_MTP_GetObjectHandles(USBH_HandleTypeDef *phost, uint32_t storage_idx, uint32_t objectformatcode, uint32_t associationOH, PTP_ObjectHandlesTypedef *objecthandles); USBH_StatusTypeDef USBH_MTP_GetObjectInfo(USBH_HandleTypeDef *phost, uint32_t handle, PTP_ObjectInfoTypedef *objectinfo); USBH_StatusTypeDef USBH_MTP_DeleteObject(USBH_HandleTypeDef *phost, uint32_t handle, uint32_t objectformatcode); USBH_StatusTypeDef USBH_MTP_GetObject(USBH_HandleTypeDef *phost, uint32_t handle, uint8_t *object); USBH_StatusTypeDef USBH_MTP_GetPartialObject(USBH_HandleTypeDef *phost, uint32_t handle, uint32_t offset, uint32_t maxbytes, uint8_t *object, uint32_t *len); USBH_StatusTypeDef USBH_MTP_GetObjectPropsSupported(USBH_HandleTypeDef *phost, uint16_t ofc, uint32_t *propnum, uint16_t *props); USBH_StatusTypeDef USBH_MTP_GetObjectPropDesc(USBH_HandleTypeDef *phost, uint16_t opc, uint16_t ofc, PTP_ObjectPropDescTypeDef *opd); USBH_StatusTypeDef USBH_MTP_GetObjectPropList(USBH_HandleTypeDef *phost, uint32_t handle, MTP_PropertiesTypedef *pprops, uint32_t *nrofprops); USBH_StatusTypeDef USBH_MTP_SendObject(USBH_HandleTypeDef *phost, uint32_t handle, uint8_t *object, uint32_t size); USBH_StatusTypeDef USBH_MTP_GetDevicePropDesc(USBH_HandleTypeDef *phost, uint16_t propcode, PTP_DevicePropDescTypdef *devicepropertydesc); void USBH_MTP_EventsCallback(USBH_HandleTypeDef *phost, uint32_t event, uint32_t param); /** * @} *//* ... */ #ifdef __cplusplus }extern "C" { ... } #endif /* ... */ #endif /* __USBH_MTP_H */ /** * @} *//* ... */ /** * @} *//* ... */ /** * @} *//* ... */ /** * @} *//* ... */
Details
Show:
from
Types: Columns:
This file uses the notable symbols shown below. Click anywhere in the file to view more details.