STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
usbh_mtp_ptp.h
Go to the documentation of this file.
1 
28 /* Define to prevent recursive ----------------------------------------------*/
29 #ifndef __USBH_MTP_PTP_H
30 #define __USBH_MTP_PTP_H
31 
32 #ifdef __cplusplus
33  extern "C" {
34 #endif
35 
36 /* Includes ------------------------------------------------------------------*/
37 #include "usbh_core.h"
38 
57 /* Operation Codes */
58 
59 /* PTP v1.0 operation codes */
60 #define PTP_OC_Undefined 0x1000
61 #define PTP_OC_GetDeviceInfo 0x1001
62 #define PTP_OC_OpenSession 0x1002
63 #define PTP_OC_CloseSession 0x1003
64 #define PTP_OC_GetStorageIDs 0x1004
65 #define PTP_OC_GetStorageInfo 0x1005
66 #define PTP_OC_GetNumObjects 0x1006
67 #define PTP_OC_GetObjectHandles 0x1007
68 #define PTP_OC_GetObjectInfo 0x1008
69 #define PTP_OC_GetObject 0x1009
70 #define PTP_OC_GetThumb 0x100A
71 #define PTP_OC_DeleteObject 0x100B
72 #define PTP_OC_SendObjectInfo 0x100C
73 #define PTP_OC_SendObject 0x100D
74 #define PTP_OC_InitiateCapture 0x100E
75 #define PTP_OC_FormatStore 0x100F
76 #define PTP_OC_ResetDevice 0x1010
77 #define PTP_OC_SelfTest 0x1011
78 #define PTP_OC_SetObjectProtection 0x1012
79 #define PTP_OC_PowerDown 0x1013
80 #define PTP_OC_GetDevicePropDesc 0x1014
81 #define PTP_OC_GetDevicePropValue 0x1015
82 #define PTP_OC_SetDevicePropValue 0x1016
83 #define PTP_OC_ResetDevicePropValue 0x1017
84 #define PTP_OC_TerminateOpenCapture 0x1018
85 #define PTP_OC_MoveObject 0x1019
86 #define PTP_OC_CopyObject 0x101A
87 #define PTP_OC_GetPartialObject 0x101B
88 #define PTP_OC_InitiateOpenCapture 0x101C
89 
90 /* PTP v1.1 operation codes */
91 #define PTP_OC_StartEnumHandles 0x101D
92 #define PTP_OC_EnumHandles 0x101E
93 #define PTP_OC_StopEnumHandles 0x101F
94 #define PTP_OC_GetVendorExtensionMaps 0x1020
95 #define PTP_OC_GetVendorDeviceInfo 0x1021
96 #define PTP_OC_GetResizedImageObject 0x1022
97 #define PTP_OC_GetFilesystemManifest 0x1023
98 #define PTP_OC_GetStreamInfo 0x1024
99 #define PTP_OC_GetStream 0x1025
100 
101  /* Microsoft / MTP extension codes */
102 #define PTP_OC_GetObjectPropsSupported 0x9801
103 #define PTP_OC_GetObjectPropDesc 0x9802
104 #define PTP_OC_GetObjectPropValue 0x9803
105 #define PTP_OC_SetObjectPropValue 0x9804
106 #define PTP_OC_GetObjPropList 0x9805
107 #define PTP_OC_SetObjPropList 0x9806
108 #define PTP_OC_GetInterdependendPropdesc 0x9807
109 #define PTP_OC_SendObjectPropList 0x9808
110 #define PTP_OC_GetObjectReferences 0x9810
111 #define PTP_OC_SetObjectReferences 0x9811
112 #define PTP_OC_UpdateDeviceFirmware 0x9812
113 #define PTP_OC_Skip 0x9820
114 
115 
116 /* Response Codes */
117 
118 /* PTP v1.0 response codes */
119 #define PTP_RC_Undefined 0x2000
120 #define PTP_RC_OK 0x2001
121 #define PTP_RC_GeneralError 0x2002
122 #define PTP_RC_SessionNotOpen 0x2003
123 #define PTP_RC_InvalidTransactionID 0x2004
124 #define PTP_RC_OperationNotSupported 0x2005
125 #define PTP_RC_ParameterNotSupported 0x2006
126 #define PTP_RC_IncompleteTransfer 0x2007
127 #define PTP_RC_InvalidStorageId 0x2008
128 #define PTP_RC_InvalidObjectHandle 0x2009
129 #define PTP_RC_DevicePropNotSupported 0x200A
130 #define PTP_RC_InvalidObjectFormatCode 0x200B
131 #define PTP_RC_StoreFull 0x200C
132 #define PTP_RC_ObjectWriteProtected 0x200D
133 #define PTP_RC_StoreReadOnly 0x200E
134 #define PTP_RC_AccessDenied 0x200F
135 #define PTP_RC_NoThumbnailPresent 0x2010
136 #define PTP_RC_SelfTestFailed 0x2011
137 #define PTP_RC_PartialDeletion 0x2012
138 #define PTP_RC_StoreNotAvailable 0x2013
139 #define PTP_RC_SpecificationByFormatUnsupported 0x2014
140 #define PTP_RC_NoValidObjectInfo 0x2015
141 #define PTP_RC_InvalidCodeFormat 0x2016
142 #define PTP_RC_UnknownVendorCode 0x2017
143 #define PTP_RC_CaptureAlreadyTerminated 0x2018
144 #define PTP_RC_DeviceBusy 0x2019
145 #define PTP_RC_InvalidParentObject 0x201A
146 #define PTP_RC_InvalidDevicePropFormat 0x201B
147 #define PTP_RC_InvalidDevicePropValue 0x201C
148 #define PTP_RC_InvalidParameter 0x201D
149 #define PTP_RC_SessionAlreadyOpened 0x201E
150 #define PTP_RC_TransactionCanceled 0x201F
151 #define PTP_RC_SpecificationOfDestinationUnsupported 0x2020
152 /* PTP v1.1 response codes */
153 #define PTP_RC_InvalidEnumHandle 0x2021
154 #define PTP_RC_NoStreamEnabled 0x2022
155 #define PTP_RC_InvalidDataSet 0x2023
156 
157 /* USB container types */
158 
159 #define PTP_USB_CONTAINER_UNDEFINED 0x0000
160 #define PTP_USB_CONTAINER_COMMAND 0x0001
161 #define PTP_USB_CONTAINER_DATA 0x0002
162 #define PTP_USB_CONTAINER_RESPONSE 0x0003
163 #define PTP_USB_CONTAINER_EVENT 0x0004
164 
165 /* PTP/IP definitions */
166 #define PTPIP_INIT_COMMAND_REQUEST 1
167 #define PTPIP_INIT_COMMAND_ACK 2
168 #define PTPIP_INIT_EVENT_REQUEST 3
169 #define PTPIP_INIT_EVENT_ACK 4
170 #define PTPIP_INIT_FAIL 5
171 #define PTPIP_CMD_REQUEST 6
172 #define PTPIP_CMD_RESPONSE 7
173 #define PTPIP_EVENT 8
174 #define PTPIP_START_DATA_PACKET 9
175 #define PTPIP_DATA_PACKET 10
176 #define PTPIP_CANCEL_TRANSACTION 11
177 #define PTPIP_END_DATA_PACKET 12
178 #define PTPIP_PING 13
179 #define PTPIP_PONG 14
180 
181 /* Transaction data phase description */
182 #define PTP_DP_NODATA 0x0000 /* no data phase */
183 #define PTP_DP_SENDDATA 0x0001 /* sending data */
184 #define PTP_DP_GETDATA 0x0002 /* receiving data */
185 #define PTP_DP_DATA_MASK 0x00ff /* data phase mask */
186 
191 typedef enum
192 {
197 }
199 
200 typedef enum
201 {
202  PTP_IDLE = 0,
212 }
214 
215 /* PTP request/response/event general PTP container (transport independent) */
216 typedef struct
217 {
218  uint16_t Code;
219  uint32_t SessionID;
220  uint32_t Transaction_ID;
221  /* params may be of any type of size less or equal to uint32_t */
222  uint32_t Param1;
223  uint32_t Param2;
224  uint32_t Param3;
225  /* events can only have three parameters */
226  uint32_t Param4;
227  uint32_t Param5;
228  /* the number of meaningful parameters */
229  uint8_t Nparam;
230 }
232 
233 #define PTP_USB_BULK_HS_MAX_PACKET_LEN_WRITE 1024
234 #define PTP_USB_BULK_HS_MAX_PACKET_LEN_READ 1024
235 #define PTP_USB_BULK_HDR_LEN (2*sizeof(uint32_t)+2*sizeof(uint16_t))
236 #define PTP_USB_BULK_PAYLOAD_LEN_WRITE (PTP_USB_BULK_HS_MAX_PACKET_LEN_WRITE-PTP_USB_BULK_HDR_LEN)
237 #define PTP_USB_BULK_PAYLOAD_LEN_READ (PTP_USB_BULK_HS_MAX_PACKET_LEN_READ-PTP_USB_BULK_HDR_LEN)
238 #define PTP_USB_BULK_REQ_LEN (PTP_USB_BULK_HDR_LEN+5*sizeof(uint32_t))
239 #define PTP_USB_BULK_REQ_RESP_MAX_LEN 63
240 
241 typedef struct
242 {
243  uint32_t length;
244  uint16_t type;
245  uint16_t code;
246  uint32_t trans_id;
247  uint32_t param1;
248  uint32_t param2;
249  uint32_t param3;
250  uint32_t param4;
251  uint32_t param5;
252 }
254 
255 
256 typedef struct
257 {
258  uint32_t length;
259  uint16_t type;
260  uint16_t code;
261  uint32_t trans_id;
262  uint32_t param1;
263  uint32_t param2;
264  uint32_t param3;
265  uint32_t param4;
266  uint32_t param5;
267 }
269 
270 typedef struct
271 {
272  uint32_t length;
273  uint16_t type;
274  uint16_t code;
275  uint32_t trans_id;
276  union {
277  struct {
278  uint32_t param1;
279  uint32_t param2;
280  uint32_t param3;
281  uint32_t param4;
282  uint32_t param5;
283  } params;
285  }payload;
286 }
288 
289 /* PTP USB Asynchronous Event Interrupt Data Format */
290 typedef struct
291 {
292  uint32_t length;
293  uint16_t type;
294  uint16_t code;
295  uint32_t trans_id;
296  uint32_t param1;
297  uint32_t param2;
298  uint32_t param3;
299 }
301 
302 /* Structure for PTP Transport process */
303 typedef struct
304 {
305  PTP_ProcessStateTypeDef state;
306  PTP_RequestStateTypeDef req_state;
310 
311  /* ptp transaction ID */
312  uint32_t transaction_id;
313 
314  /* ptp session ID */
315  uint32_t session_id;
316 
317  /* device flags */
318  uint32_t flags;
319 
320  /****** PTP transfer control *******/
321 
322  /* Data pointer */
323  uint8_t *data_ptr;
324 
325  /* Data length */
326  int32_t data_length;
327 
328  /* Data length */
329  uint32_t data_packet;
330 
331  /* Data length */
332  uint32_t iteration;
333 
334  /* Packet Index */
336 
337  /****** Object transfer control *******/
338 
339  /* object pointer */
340  uint8_t *object_ptr;
341 
342 }
344 
345 /* DeviceInfo data offset */
346 #define PTP_di_StandardVersion 0
347 #define PTP_di_VendorExtensionID 2
348 #define PTP_di_VendorExtensionVersion 6
349 #define PTP_di_VendorExtensionDesc 8
350 #define PTP_di_FunctionalMode 8
351 #define PTP_di_OperationsSupported 10
352 
353 /* Max info items size */
354 #define PTP_SUPPORTED_OPERATIONS_NBR 100
355 #define PTP_SUPPORTED_EVENTS_NBR 100
356 #define PTP_SUPPORTED_PROPRIETIES_NBR 100
357 #define PTP_CAPTURE_FORMATS_NBR 100
358 #define PTP_IMAGE_FORMATS_NBR 100
359 #define PTP_MAX_STR_SIZE 255
360 /* PTP device info structure */
361 typedef struct
362 {
363  uint16_t StandardVersion;
366  uint8_t VendorExtensionDesc[PTP_MAX_STR_SIZE];
367  uint16_t FunctionalMode;
369  uint16_t OperationsSupported[PTP_SUPPORTED_OPERATIONS_NBR];
371  uint16_t EventsSupported[PTP_SUPPORTED_EVENTS_NBR];
373  uint16_t DevicePropertiesSupported[PTP_SUPPORTED_PROPRIETIES_NBR];
375  uint16_t CaptureFormats[PTP_CAPTURE_FORMATS_NBR];
377  uint16_t ImageFormats[PTP_IMAGE_FORMATS_NBR];
378  uint8_t Manufacturer[PTP_MAX_STR_SIZE];
379  uint8_t Model[PTP_MAX_STR_SIZE];
380  uint8_t DeviceVersion[PTP_MAX_STR_SIZE];
381  uint8_t SerialNumber[PTP_MAX_STR_SIZE];
382 }
384 
385 #define PTP_MAX_STORAGE_UNITS_NBR 5
386 /* PTP storageIDs structute (returned by GetStorageIDs) */
387 typedef struct
388 {
389  uint32_t n;
390  uint32_t Storage [PTP_MAX_STORAGE_UNITS_NBR];
391 }
393 
394 /* PTP StorageInfo structure (returned by GetStorageInfo) */
395 
396 #define PTP_si_StorageType 0
397 #define PTP_si_FilesystemType 2
398 #define PTP_si_AccessCapability 4
399 #define PTP_si_MaxCapability 6
400 #define PTP_si_FreeSpaceInBytes 14
401 #define PTP_si_FreeSpaceInImages 22
402 #define PTP_si_StorageDescription 26
403 
404 
405 /* PTP Storage Types */
406 
407 #define PTP_ST_Undefined 0x0000
408 #define PTP_ST_FixedROM 0x0001
409 #define PTP_ST_RemovableROM 0x0002
410 #define PTP_ST_FixedRAM 0x0003
411 #define PTP_ST_RemovableRAM 0x0004
412 
413 /* PTP FilesystemType Values */
414 
415 #define PTP_FST_Undefined 0x0000
416 #define PTP_FST_GenericFlat 0x0001
417 #define PTP_FST_GenericHierarchical 0x0002
418 #define PTP_FST_DCF 0x0003
419 
420 /* PTP StorageInfo AccessCapability Values */
421 
422 #define PTP_AC_ReadWrite 0x0000
423 #define PTP_AC_ReadOnly 0x0001
424 #define PTP_AC_ReadOnly_with_Object_Deletion 0x0002
425 
426 typedef struct
427 {
428  uint16_t StorageType;
429  uint16_t FilesystemType;
431  uint64_t MaxCapability;
434  uint8_t StorageDescription[PTP_MAX_STR_SIZE];
435  uint8_t VolumeLabel[PTP_MAX_STR_SIZE];
436 }
438 
439 /* PTP Object Format Codes */
440 
441 /* ancillary formats */
442 #define PTP_OFC_Undefined 0x3000
443 #define PTP_OFC_Defined 0x3800
444 #define PTP_OFC_Association 0x3001
445 #define PTP_OFC_Script 0x3002
446 #define PTP_OFC_Executable 0x3003
447 #define PTP_OFC_Text 0x3004
448 #define PTP_OFC_HTML 0x3005
449 #define PTP_OFC_DPOF 0x3006
450 #define PTP_OFC_AIFF 0x3007
451 #define PTP_OFC_WAV 0x3008
452 #define PTP_OFC_MP3 0x3009
453 #define PTP_OFC_AVI 0x300A
454 #define PTP_OFC_MPEG 0x300B
455 #define PTP_OFC_ASF 0x300C
456 #define PTP_OFC_QT 0x300D /* guessing */
457 /* image formats */
458 #define PTP_OFC_EXIF_JPEG 0x3801
459 #define PTP_OFC_TIFF_EP 0x3802
460 #define PTP_OFC_FlashPix 0x3803
461 #define PTP_OFC_BMP 0x3804
462 #define PTP_OFC_CIFF 0x3805
463 #define PTP_OFC_Undefined_0x3806 0x3806
464 #define PTP_OFC_GIF 0x3807
465 #define PTP_OFC_JFIF 0x3808
466 #define PTP_OFC_PCD 0x3809
467 #define PTP_OFC_PICT 0x380A
468 #define PTP_OFC_PNG 0x380B
469 #define PTP_OFC_Undefined_0x380C 0x380C
470 #define PTP_OFC_TIFF 0x380D
471 #define PTP_OFC_TIFF_IT 0x380E
472 #define PTP_OFC_JP2 0x380F
473 #define PTP_OFC_JPX 0x3810
474 /* ptp v1.1 has only DNG new */
475 #define PTP_OFC_DNG 0x3811
476 
477 /* MTP extensions */
478 #define PTP_OFC_MTP_MediaCard 0xb211
479 #define PTP_OFC_MTP_MediaCardGroup 0xb212
480 #define PTP_OFC_MTP_Encounter 0xb213
481 #define PTP_OFC_MTP_EncounterBox 0xb214
482 #define PTP_OFC_MTP_M4A 0xb215
483 #define PTP_OFC_MTP_ZUNEUNDEFINED 0xb217 /* Unknown file type */
484 #define PTP_OFC_MTP_Firmware 0xb802
485 #define PTP_OFC_MTP_WindowsImageFormat 0xb881
486 #define PTP_OFC_MTP_UndefinedAudio 0xb900
487 #define PTP_OFC_MTP_WMA 0xb901
488 #define PTP_OFC_MTP_OGG 0xb902
489 #define PTP_OFC_MTP_AAC 0xb903
490 #define PTP_OFC_MTP_AudibleCod 0xb904
491 #define PTP_OFC_MTP_FLAC 0xb906
492 #define PTP_OFC_MTP_SamsungPlaylist 0xb909
493 #define PTP_OFC_MTP_UndefinedVideo 0xb980
494 #define PTP_OFC_MTP_WMV 0xb981
495 #define PTP_OFC_MTP_MP4 0xb982
496 #define PTP_OFC_MTP_MP2 0xb983
497 #define PTP_OFC_MTP_3GP 0xb984
498 #define PTP_OFC_MTP_UndefinedCollection 0xba00
499 #define PTP_OFC_MTP_AbstractMultimediaAlbum 0xba01
500 #define PTP_OFC_MTP_AbstractImageAlbum 0xba02
501 #define PTP_OFC_MTP_AbstractAudioAlbum 0xba03
502 #define PTP_OFC_MTP_AbstractVideoAlbum 0xba04
503 #define PTP_OFC_MTP_AbstractAudioVideoPlaylist 0xba05
504 #define PTP_OFC_MTP_AbstractContactGroup 0xba06
505 #define PTP_OFC_MTP_AbstractMessageFolder 0xba07
506 #define PTP_OFC_MTP_AbstractChapteredProduction 0xba08
507 #define PTP_OFC_MTP_AbstractAudioPlaylist 0xba09
508 #define PTP_OFC_MTP_AbstractVideoPlaylist 0xba0a
509 #define PTP_OFC_MTP_AbstractMediacast 0xba0b
510 #define PTP_OFC_MTP_WPLPlaylist 0xba10
511 #define PTP_OFC_MTP_M3UPlaylist 0xba11
512 #define PTP_OFC_MTP_MPLPlaylist 0xba12
513 #define PTP_OFC_MTP_ASXPlaylist 0xba13
514 #define PTP_OFC_MTP_PLSPlaylist 0xba14
515 #define PTP_OFC_MTP_UndefinedDocument 0xba80
516 #define PTP_OFC_MTP_AbstractDocument 0xba81
517 #define PTP_OFC_MTP_XMLDocument 0xba82
518 #define PTP_OFC_MTP_MSWordDocument 0xba83
519 #define PTP_OFC_MTP_MHTCompiledHTMLDocument 0xba84
520 #define PTP_OFC_MTP_MSExcelSpreadsheetXLS 0xba85
521 #define PTP_OFC_MTP_MSPowerpointPresentationPPT 0xba86
522 #define PTP_OFC_MTP_UndefinedMessage 0xbb00
523 #define PTP_OFC_MTP_AbstractMessage 0xbb01
524 #define PTP_OFC_MTP_UndefinedContact 0xbb80
525 #define PTP_OFC_MTP_AbstractContact 0xbb81
526 #define PTP_OFC_MTP_vCard2 0xbb82
527 #define PTP_OFC_MTP_vCard3 0xbb83
528 #define PTP_OFC_MTP_UndefinedCalendarItem 0xbe00
529 #define PTP_OFC_MTP_AbstractCalendarItem 0xbe01
530 #define PTP_OFC_MTP_vCalendar1 0xbe02
531 #define PTP_OFC_MTP_vCalendar2 0xbe03
532 #define PTP_OFC_MTP_UndefinedWindowsExecutable 0xbe80
533 #define PTP_OFC_MTP_MediaCast 0xbe81
534 #define PTP_OFC_MTP_Section 0xbe82
535 
536 /* MTP specific Object Properties */
537 #define PTP_OPC_StorageID 0xDC01
538 #define PTP_OPC_ObjectFormat 0xDC02
539 #define PTP_OPC_ProtectionStatus 0xDC03
540 #define PTP_OPC_ObjectSize 0xDC04
541 #define PTP_OPC_AssociationType 0xDC05
542 #define PTP_OPC_AssociationDesc 0xDC06
543 #define PTP_OPC_ObjectFileName 0xDC07
544 #define PTP_OPC_DateCreated 0xDC08
545 #define PTP_OPC_DateModified 0xDC09
546 #define PTP_OPC_Keywords 0xDC0A
547 #define PTP_OPC_ParentObject 0xDC0B
548 #define PTP_OPC_AllowedFolderContents 0xDC0C
549 #define PTP_OPC_Hidden 0xDC0D
550 #define PTP_OPC_SystemObject 0xDC0E
551 #define PTP_OPC_PersistantUniqueObjectIdentifier 0xDC41
552 #define PTP_OPC_SyncID 0xDC42
553 #define PTP_OPC_PropertyBag 0xDC43
554 #define PTP_OPC_Name 0xDC44
555 #define PTP_OPC_CreatedBy 0xDC45
556 #define PTP_OPC_Artist 0xDC46
557 #define PTP_OPC_DateAuthored 0xDC47
558 #define PTP_OPC_Description 0xDC48
559 #define PTP_OPC_URLReference 0xDC49
560 #define PTP_OPC_LanguageLocale 0xDC4A
561 #define PTP_OPC_CopyrightInformation 0xDC4B
562 #define PTP_OPC_Source 0xDC4C
563 #define PTP_OPC_OriginLocation 0xDC4D
564 #define PTP_OPC_DateAdded 0xDC4E
565 #define PTP_OPC_NonConsumable 0xDC4F
566 #define PTP_OPC_CorruptOrUnplayable 0xDC50
567 #define PTP_OPC_ProducerSerialNumber 0xDC51
568 #define PTP_OPC_RepresentativeSampleFormat 0xDC81
569 #define PTP_OPC_RepresentativeSampleSize 0xDC82
570 #define PTP_OPC_RepresentativeSampleHeight 0xDC83
571 #define PTP_OPC_RepresentativeSampleWidth 0xDC84
572 #define PTP_OPC_RepresentativeSampleDuration 0xDC85
573 #define PTP_OPC_RepresentativeSampleData 0xDC86
574 #define PTP_OPC_Width 0xDC87
575 #define PTP_OPC_Height 0xDC88
576 #define PTP_OPC_Duration 0xDC89
577 #define PTP_OPC_Rating 0xDC8A
578 #define PTP_OPC_Track 0xDC8B
579 #define PTP_OPC_Genre 0xDC8C
580 #define PTP_OPC_Credits 0xDC8D
581 #define PTP_OPC_Lyrics 0xDC8E
582 #define PTP_OPC_SubscriptionContentID 0xDC8F
583 #define PTP_OPC_ProducedBy 0xDC90
584 #define PTP_OPC_UseCount 0xDC91
585 #define PTP_OPC_SkipCount 0xDC92
586 #define PTP_OPC_LastAccessed 0xDC93
587 #define PTP_OPC_ParentalRating 0xDC94
588 #define PTP_OPC_MetaGenre 0xDC95
589 #define PTP_OPC_Composer 0xDC96
590 #define PTP_OPC_EffectiveRating 0xDC97
591 #define PTP_OPC_Subtitle 0xDC98
592 #define PTP_OPC_OriginalReleaseDate 0xDC99
593 #define PTP_OPC_AlbumName 0xDC9A
594 #define PTP_OPC_AlbumArtist 0xDC9B
595 #define PTP_OPC_Mood 0xDC9C
596 #define PTP_OPC_DRMStatus 0xDC9D
597 #define PTP_OPC_SubDescription 0xDC9E
598 #define PTP_OPC_IsCropped 0xDCD1
599 #define PTP_OPC_IsColorCorrected 0xDCD2
600 #define PTP_OPC_ImageBitDepth 0xDCD3
601 #define PTP_OPC_Fnumber 0xDCD4
602 #define PTP_OPC_ExposureTime 0xDCD5
603 #define PTP_OPC_ExposureIndex 0xDCD6
604 #define PTP_OPC_DisplayName 0xDCE0
605 #define PTP_OPC_BodyText 0xDCE1
606 #define PTP_OPC_Subject 0xDCE2
607 #define PTP_OPC_Priority 0xDCE3
608 #define PTP_OPC_GivenName 0xDD00
609 #define PTP_OPC_MiddleNames 0xDD01
610 #define PTP_OPC_FamilyName 0xDD02
611 #define PTP_OPC_Prefix 0xDD03
612 #define PTP_OPC_Suffix 0xDD04
613 #define PTP_OPC_PhoneticGivenName 0xDD05
614 #define PTP_OPC_PhoneticFamilyName 0xDD06
615 #define PTP_OPC_EmailPrimary 0xDD07
616 #define PTP_OPC_EmailPersonal1 0xDD08
617 #define PTP_OPC_EmailPersonal2 0xDD09
618 #define PTP_OPC_EmailBusiness1 0xDD0A
619 #define PTP_OPC_EmailBusiness2 0xDD0B
620 #define PTP_OPC_EmailOthers 0xDD0C
621 #define PTP_OPC_PhoneNumberPrimary 0xDD0D
622 #define PTP_OPC_PhoneNumberPersonal 0xDD0E
623 #define PTP_OPC_PhoneNumberPersonal2 0xDD0F
624 #define PTP_OPC_PhoneNumberBusiness 0xDD10
625 #define PTP_OPC_PhoneNumberBusiness2 0xDD11
626 #define PTP_OPC_PhoneNumberMobile 0xDD12
627 #define PTP_OPC_PhoneNumberMobile2 0xDD13
628 #define PTP_OPC_FaxNumberPrimary 0xDD14
629 #define PTP_OPC_FaxNumberPersonal 0xDD15
630 #define PTP_OPC_FaxNumberBusiness 0xDD16
631 #define PTP_OPC_PagerNumber 0xDD17
632 #define PTP_OPC_PhoneNumberOthers 0xDD18
633 #define PTP_OPC_PrimaryWebAddress 0xDD19
634 #define PTP_OPC_PersonalWebAddress 0xDD1A
635 #define PTP_OPC_BusinessWebAddress 0xDD1B
636 #define PTP_OPC_InstantMessengerAddress 0xDD1C
637 #define PTP_OPC_InstantMessengerAddress2 0xDD1D
638 #define PTP_OPC_InstantMessengerAddress3 0xDD1E
639 #define PTP_OPC_PostalAddressPersonalFull 0xDD1F
640 #define PTP_OPC_PostalAddressPersonalFullLine1 0xDD20
641 #define PTP_OPC_PostalAddressPersonalFullLine2 0xDD21
642 #define PTP_OPC_PostalAddressPersonalFullCity 0xDD22
643 #define PTP_OPC_PostalAddressPersonalFullRegion 0xDD23
644 #define PTP_OPC_PostalAddressPersonalFullPostalCode 0xDD24
645 #define PTP_OPC_PostalAddressPersonalFullCountry 0xDD25
646 #define PTP_OPC_PostalAddressBusinessFull 0xDD26
647 #define PTP_OPC_PostalAddressBusinessLine1 0xDD27
648 #define PTP_OPC_PostalAddressBusinessLine2 0xDD28
649 #define PTP_OPC_PostalAddressBusinessCity 0xDD29
650 #define PTP_OPC_PostalAddressBusinessRegion 0xDD2A
651 #define PTP_OPC_PostalAddressBusinessPostalCode 0xDD2B
652 #define PTP_OPC_PostalAddressBusinessCountry 0xDD2C
653 #define PTP_OPC_PostalAddressOtherFull 0xDD2D
654 #define PTP_OPC_PostalAddressOtherLine1 0xDD2E
655 #define PTP_OPC_PostalAddressOtherLine2 0xDD2F
656 #define PTP_OPC_PostalAddressOtherCity 0xDD30
657 #define PTP_OPC_PostalAddressOtherRegion 0xDD31
658 #define PTP_OPC_PostalAddressOtherPostalCode 0xDD32
659 #define PTP_OPC_PostalAddressOtherCountry 0xDD33
660 #define PTP_OPC_OrganizationName 0xDD34
661 #define PTP_OPC_PhoneticOrganizationName 0xDD35
662 #define PTP_OPC_Role 0xDD36
663 #define PTP_OPC_Birthdate 0xDD37
664 #define PTP_OPC_MessageTo 0xDD40
665 #define PTP_OPC_MessageCC 0xDD41
666 #define PTP_OPC_MessageBCC 0xDD42
667 #define PTP_OPC_MessageRead 0xDD43
668 #define PTP_OPC_MessageReceivedTime 0xDD44
669 #define PTP_OPC_MessageSender 0xDD45
670 #define PTP_OPC_ActivityBeginTime 0xDD50
671 #define PTP_OPC_ActivityEndTime 0xDD51
672 #define PTP_OPC_ActivityLocation 0xDD52
673 #define PTP_OPC_ActivityRequiredAttendees 0xDD54
674 #define PTP_OPC_ActivityOptionalAttendees 0xDD55
675 #define PTP_OPC_ActivityResources 0xDD56
676 #define PTP_OPC_ActivityAccepted 0xDD57
677 #define PTP_OPC_Owner 0xDD5D
678 #define PTP_OPC_Editor 0xDD5E
679 #define PTP_OPC_Webmaster 0xDD5F
680 #define PTP_OPC_URLSource 0xDD60
681 #define PTP_OPC_URLDestination 0xDD61
682 #define PTP_OPC_TimeBookmark 0xDD62
683 #define PTP_OPC_ObjectBookmark 0xDD63
684 #define PTP_OPC_ByteBookmark 0xDD64
685 #define PTP_OPC_LastBuildDate 0xDD70
686 #define PTP_OPC_TimetoLive 0xDD71
687 #define PTP_OPC_MediaGUID 0xDD72
688 #define PTP_OPC_TotalBitRate 0xDE91
689 #define PTP_OPC_BitRateType 0xDE92
690 #define PTP_OPC_SampleRate 0xDE93
691 #define PTP_OPC_NumberOfChannels 0xDE94
692 #define PTP_OPC_AudioBitDepth 0xDE95
693 #define PTP_OPC_ScanDepth 0xDE97
694 #define PTP_OPC_AudioWAVECodec 0xDE99
695 #define PTP_OPC_AudioBitRate 0xDE9A
696 #define PTP_OPC_VideoFourCCCodec 0xDE9B
697 #define PTP_OPC_VideoBitRate 0xDE9C
698 #define PTP_OPC_FramesPerThousandSeconds 0xDE9D
699 #define PTP_OPC_KeyFrameDistance 0xDE9E
700 #define PTP_OPC_BufferSize 0xDE9F
701 #define PTP_OPC_EncodingQuality 0xDEA0
702 #define PTP_OPC_EncodingProfile 0xDEA1
703 #define PTP_OPC_BuyFlag 0xD901
704 
705 /* WiFi Provisioning MTP Extension property codes */
706 #define PTP_OPC_WirelessConfigurationFile 0xB104
707 
708 
709 /* PTP Association Types */
710 #define PTP_AT_Undefined 0x0000
711 #define PTP_AT_GenericFolder 0x0001
712 #define PTP_AT_Album 0x0002
713 #define PTP_AT_TimeSequence 0x0003
714 #define PTP_AT_HorizontalPanoramic 0x0004
715 #define PTP_AT_VerticalPanoramic 0x0005
716 #define PTP_AT_2DPanoramic 0x0006
717 #define PTP_AT_AncillaryData 0x0007
718 
719 #define PTP_MAX_HANDLER_NBR 0x255
720 typedef struct
721 {
722  uint32_t n;
723  uint32_t Handler[PTP_MAX_HANDLER_NBR];
724 }
726 
727 
728 #define PTP_oi_StorageID 0
729 #define PTP_oi_ObjectFormat 4
730 #define PTP_oi_ProtectionStatus 6
731 #define PTP_oi_ObjectCompressedSize 8
732 #define PTP_oi_ThumbFormat 12
733 #define PTP_oi_ThumbCompressedSize 14
734 #define PTP_oi_ThumbPixWidth 18
735 #define PTP_oi_ThumbPixHeight 22
736 #define PTP_oi_ImagePixWidth 26
737 #define PTP_oi_ImagePixHeight 30
738 #define PTP_oi_ImageBitDepth 34
739 #define PTP_oi_ParentObject 38
740 #define PTP_oi_AssociationType 42
741 #define PTP_oi_AssociationDesc 44
742 #define PTP_oi_SequenceNumber 48
743 #define PTP_oi_filenamelen 52
744 #define PTP_oi_Filename 53
745 
746 typedef struct
747 {
748  uint32_t StorageID;
749  uint16_t ObjectFormat;
751  /* In the regular objectinfo this is 32bit, but we keep the general object size here
752  that also arrives via other methods and so use 64bit */
754  uint16_t ThumbFormat;
756  uint32_t ThumbPixWidth;
757  uint32_t ThumbPixHeight;
758  uint32_t ImagePixWidth;
759  uint32_t ImagePixHeight;
760  uint32_t ImageBitDepth;
761  uint32_t ParentObject;
762  uint16_t AssociationType;
763  uint32_t AssociationDesc;
764  uint32_t SequenceNumber;
765  uint8_t Filename[PTP_MAX_STR_SIZE];
766  uint32_t CaptureDate;
768  uint8_t Keywords[PTP_MAX_STR_SIZE];
769 }
771 
772 /* Object Property Describing Dataset (DevicePropDesc) */
773 
775 {
777  uint8_t u8;
778  int8_t i8;
779  uint16_t u16;
780  int16_t i16;
781  uint32_t u32;
782  int32_t i32;
783  uint64_t u64;
784  int64_t i64;
785  struct array {
786  uint32_t count;
788  }a;
790 
791 typedef struct
792 {
796 }
798 
799 /* Property Describing Dataset, Enum Form */
800 
801 typedef struct
802 {
803  uint16_t NumberOfValues;
805 }
807 
808 /* (MTP) Object Property pack/unpack */
809 #define PTP_opd_ObjectPropertyCode 0
810 #define PTP_opd_DataType 2
811 #define PTP_opd_GetSet 4
812 #define PTP_opd_FactoryDefaultValue 5
813 
814 typedef struct
815 {
817  uint16_t DataType;
818  uint8_t GetSet;
820  uint32_t GroupCode;
821  uint8_t FormFlag;
822  union {
825  } FORM;
826 }
828 
829 /* Metadata lists for MTP operations */
830 typedef struct
831 {
832  uint16_t property;
833  uint16_t datatype;
834  uint32_t ObjectHandle;
836 }
838 
839 
840 /* Device Property Form Flag */
841 
842 #define PTP_DPFF_None 0x00
843 #define PTP_DPFF_Range 0x01
844 #define PTP_DPFF_Enumeration 0x02
845 
846 /* Object Property Codes used by MTP (first 3 are same as DPFF codes) */
847 #define PTP_OPFF_None 0x00
848 #define PTP_OPFF_Range 0x01
849 #define PTP_OPFF_Enumeration 0x02
850 #define PTP_OPFF_DateTime 0x03
851 #define PTP_OPFF_FixedLengthArray 0x04
852 #define PTP_OPFF_RegularExpression 0x05
853 #define PTP_OPFF_ByteArray 0x06
854 #define PTP_OPFF_LongString 0xFF
855 
856 /* Device Property pack/unpack */
857 
858 #define PTP_dpd_DevicePropertyCode 0
859 #define PTP_dpd_DataType 2
860 #define PTP_dpd_GetSet 4
861 #define PTP_dpd_FactoryDefaultValue 5
862 
863 /* Device Property Describing Dataset (DevicePropDesc) */
864 
865 typedef struct
866 {
868  uint16_t DataType;
869  uint8_t GetSet;
872  uint8_t FormFlag;
873  union {
876  } FORM;
877 }
879 
880 /* DataType Codes */
881 
882 #define PTP_DTC_UNDEF 0x0000
883 #define PTP_DTC_INT8 0x0001
884 #define PTP_DTC_UINT8 0x0002
885 #define PTP_DTC_INT16 0x0003
886 #define PTP_DTC_UINT16 0x0004
887 #define PTP_DTC_INT32 0x0005
888 #define PTP_DTC_UINT32 0x0006
889 #define PTP_DTC_INT64 0x0007
890 #define PTP_DTC_UINT64 0x0008
891 #define PTP_DTC_INT128 0x0009
892 #define PTP_DTC_UINT128 0x000A
893 
894 #define PTP_DTC_ARRAY_MASK 0x4000
895 
896 #define PTP_DTC_AINT8 (PTP_DTC_ARRAY_MASK | PTP_DTC_INT8)
897 #define PTP_DTC_AUINT8 (PTP_DTC_ARRAY_MASK | PTP_DTC_UINT8)
898 #define PTP_DTC_AINT16 (PTP_DTC_ARRAY_MASK | PTP_DTC_INT16)
899 #define PTP_DTC_AUINT16 (PTP_DTC_ARRAY_MASK | PTP_DTC_UINT16)
900 #define PTP_DTC_AINT32 (PTP_DTC_ARRAY_MASK | PTP_DTC_INT32)
901 #define PTP_DTC_AUINT32 (PTP_DTC_ARRAY_MASK | PTP_DTC_UINT32)
902 #define PTP_DTC_AINT64 (PTP_DTC_ARRAY_MASK | PTP_DTC_INT64)
903 #define PTP_DTC_AUINT64 (PTP_DTC_ARRAY_MASK | PTP_DTC_UINT64)
904 #define PTP_DTC_AINT128 (PTP_DTC_ARRAY_MASK | PTP_DTC_INT128)
905 #define PTP_DTC_AUINT128 (PTP_DTC_ARRAY_MASK | PTP_DTC_UINT128)
906 
907 #define PTP_DTC_STR 0xFFFF
908 
909 /* PTP Event Codes */
910 
911 #define PTP_EC_Undefined 0x4000
912 #define PTP_EC_CancelTransaction 0x4001
913 #define PTP_EC_ObjectAdded 0x4002
914 #define PTP_EC_ObjectRemoved 0x4003
915 #define PTP_EC_StoreAdded 0x4004
916 #define PTP_EC_StoreRemoved 0x4005
917 #define PTP_EC_DevicePropChanged 0x4006
918 #define PTP_EC_ObjectInfoChanged 0x4007
919 #define PTP_EC_DeviceInfoChanged 0x4008
920 #define PTP_EC_RequestObjectTransfer 0x4009
921 #define PTP_EC_StoreFull 0x400A
922 #define PTP_EC_DeviceReset 0x400B
923 #define PTP_EC_StorageInfoChanged 0x400C
924 #define PTP_EC_CaptureComplete 0x400D
925 #define PTP_EC_UnreportedStatus 0x400E
926 
927 
952 
955 
959 
961  uint32_t storage_id,
962  PTP_StorageInfoTypedef *storage_info);
963 
965  uint32_t storage_id,
966  uint32_t objectformatcode,
967  uint32_t associationOH,
968  uint32_t* numobs);
969 
971  uint32_t storage_id,
972  uint32_t objectformatcode,
973  uint32_t associationOH,
974  PTP_ObjectHandlesTypedef* objecthandles);
975 
977  uint32_t handle,
978  PTP_ObjectInfoTypedef* objectinfo);
979 
981  uint32_t handle,
982  uint32_t objectformatcode);
983 
985  uint32_t handle,
986  uint8_t *object);
987 
989  uint32_t handle,
990  uint32_t offset,
991  uint32_t maxbytes, uint8_t *object,
992  uint32_t *len);
993 
995  uint16_t ofc,
996  uint32_t *propnum,
997  uint16_t *props);
998 
1000  uint16_t opc,
1001  uint16_t ofc,
1003 
1005  uint32_t handle,
1006  MTP_PropertiesTypedef *pprops,
1007  uint32_t *nrofprops);
1008 
1010  uint32_t handle,
1011  uint8_t *object,
1012  uint32_t size);
1013 
1015  uint16_t propcode,
1016  PTP_DevicePropDescTypdef* devicepropertydesc);
1017 
1022 #ifdef __cplusplus
1023 }
1024 #endif
1025 
1026 #endif /* __USBH_MTP_PTP_H */
1027 
1028 
1044 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
1045 
PTP_RequestStateTypeDef
Definition: usbh_mtp_ptp.h:191
USBH_StatusTypeDef USBH_PTP_GetPartialObject(USBH_HandleTypeDef *phost, uint32_t handle, uint32_t offset, uint32_t maxbytes, uint8_t *object, uint32_t *len)
USBH_PTP_GetPartialObject Gets object partially.
PTP_ProcessStateTypeDef state
Definition: usbh_mtp_ptp.h:305
uint32_t data_packet_counter
Definition: usbh_mtp_ptp.h:335
Header file for usbh_core.c.
USBH_StatusTypeDef USBH_PTP_SendRequest(USBH_HandleTypeDef *phost, PTP_ContainerTypedef *req)
USBH_PTP_OpenSession Open a new session.
Definition: usbh_mtp_ptp.c:391
#define PTP_SUPPORTED_PROPRIETIES_NBR
Definition: usbh_mtp_ptp.h:356
PTP_RespContainerTypedef resp_container
Definition: usbh_mtp_ptp.h:309
USBH_StatusTypeDef USBH_PTP_GetStorageInfo(USBH_HandleTypeDef *phost, uint32_t storage_id, PTP_StorageInfoTypedef *storage_info)
USBH_PTP_GetDeviceInfo Gets device info dataset and fills deviceinfo structure.
PTP_ProcessStateTypeDef
Definition: usbh_mtp_ptp.h:200
uint64_t ObjectCompressedSize
Definition: usbh_mtp_ptp.h:753
USBH_StatusTypeDef USBH_PTP_GetObjectPropDesc(USBH_HandleTypeDef *phost, uint16_t opc, uint16_t ofc, PTP_ObjectPropDescTypeDef *opd)
USBH_PTP_GetObjectPropDesc Gets object partially.
uint32_t DevicePropertiesSupported_len
Definition: usbh_mtp_ptp.h:372
uint32_t EventsSupported_len
Definition: usbh_mtp_ptp.h:370
#define PTP_CAPTURE_FORMATS_NBR
Definition: usbh_mtp_ptp.h:357
USBH_StatusTypeDef USBH_PTP_GetObjectPropList(USBH_HandleTypeDef *phost, uint32_t handle, MTP_PropertiesTypedef *pprops, uint32_t *nrofprops)
USBH_PTP_GetObjectPropList Gets object partially.
PTP_RequestStateTypeDef req_state
Definition: usbh_mtp_ptp.h:306
#define PTP_MAX_STORAGE_UNITS_NBR
Definition: usbh_mtp_ptp.h:385
uint32_t data_packet
Definition: usbh_mtp_ptp.h:329
USBH_StatusTypeDef USBH_PTP_GetResponse(USBH_HandleTypeDef *phost, PTP_ContainerTypedef *req)
USBH_PTP_OpenSession Open a new session.
Definition: usbh_mtp_ptp.c:419
PTP_PropertyValueTypedef MaximumValue
Definition: usbh_mtp_ptp.h:794
uint32_t ThumbCompressedSize
Definition: usbh_mtp_ptp.h:755
uint32_t OperationsSupported_len
Definition: usbh_mtp_ptp.h:368
uint8_t * object_ptr
Definition: usbh_mtp_ptp.h:340
USBH_StatusTypeDef USBH_PTP_GetObjectPropsSupported(USBH_HandleTypeDef *phost, uint16_t ofc, uint32_t *propnum, uint16_t *props)
USBH_PTP_GetObjectPropsSupported Gets object partially.
PTP_OpContainerTypedef op_container
Definition: usbh_mtp_ptp.h:307
#define PTP_SUPPORTED_EVENTS_NBR
Definition: usbh_mtp_ptp.h:355
PTP_PropertyValueTypedef FactoryDefaultValue
Definition: usbh_mtp_ptp.h:870
PTP_PropertyValueTypedef propval
Definition: usbh_mtp_ptp.h:835
#define PTP_IMAGE_FORMATS_NBR
Definition: usbh_mtp_ptp.h:358
char str[PTP_MAX_STR_SIZE]
Definition: usbh_mtp_ptp.h:776
USBH_StatusTypeDef USBH_PTP_GetObject(USBH_HandleTypeDef *phost, uint32_t handle, uint8_t *object)
USBH_PTP_GetObject Gets object.
USBH_StatusTypeDef USBH_PTP_GetDevicePropDesc(USBH_HandleTypeDef *phost, uint16_t propcode, PTP_DevicePropDescTypdef *devicepropertydesc)
USBH_PTP_GetDevicePropDesc Gets object partially.
Definition: usbh_mtp_ptp.c:933
USBH_StatusTypeDef USBH_PTP_GetObjectHandles(USBH_HandleTypeDef *phost, uint32_t storage_id, uint32_t objectformatcode, uint32_t associationOH, PTP_ObjectHandlesTypedef *objecthandles)
USBH_PTP_GetObjectHandles Gets device info dataset and fills deviceinfo structure.
USBH_StatusTypeDef USBH_PTP_Process(USBH_HandleTypeDef *phost)
USBH_PTP_Process The function handle the BOT protocol.
Definition: usbh_mtp_ptp.c:143
union _PTP_PropertyValueTypedef * v
Definition: usbh_mtp_ptp.h:787
union _PTP_PropertyValueTypedef PTP_PropertyValueTypedef
#define PTP_USB_BULK_PAYLOAD_LEN_READ
Definition: usbh_mtp_ptp.h:237
USBH_StatusTypeDef USBH_PTP_GetNumObjects(USBH_HandleTypeDef *phost, uint32_t storage_id, uint32_t objectformatcode, uint32_t associationOH, uint32_t *numobs)
USBH_PTP_GetNumObjects Gets device info dataset and fills deviceinfo structure.
USBH_StatusTypeDef USBH_PTP_DeleteObject(USBH_HandleTypeDef *phost, uint32_t handle, uint32_t objectformatcode)
USBH_PTP_DeleteObject Delete an object.
struct _PTP_PropertyValueTypedef::array a
#define PTP_MAX_HANDLER_NBR
Definition: usbh_mtp_ptp.h:719
PTP_PropertyValueTypedef StepSize
Definition: usbh_mtp_ptp.h:795
PTP_PropertyValueTypedef CurrentValue
Definition: usbh_mtp_ptp.h:871
uint16_t VendorExtensionVersion
Definition: usbh_mtp_ptp.h:365
#define PTP_SUPPORTED_OPERATIONS_NBR
Definition: usbh_mtp_ptp.h:354
PTP_PropDescEnumFormTypedef Enum
Definition: usbh_mtp_ptp.h:823
USBH_StatusTypeDef
Definition: usbh_def.h:302
PTP_PropDescRangeFormTypedef Range
Definition: usbh_mtp_ptp.h:875
PTP_PropDescEnumFormTypedef Enum
Definition: usbh_mtp_ptp.h:874
USBH_StatusTypeDef USBH_PTP_GetObjectInfo(USBH_HandleTypeDef *phost, uint32_t handle, PTP_ObjectInfoTypedef *objectinfo)
USBH_PTP_GetObjectInfo Gets objert info.
USBH_StatusTypeDef USBH_PTP_SendObject(USBH_HandleTypeDef *phost, uint32_t handle, uint8_t *object, uint32_t size)
USBH_PTP_SendObject Send an object.
PTP_PropertyValueTypedef MinimumValue
Definition: usbh_mtp_ptp.h:793
PTP_PropDescRangeFormTypedef Range
Definition: usbh_mtp_ptp.h:824
PTP_PropertyValueTypedef FactoryDefaultValue
Definition: usbh_mtp_ptp.h:819
USBH_StatusTypeDef USBH_PTP_GetStorageIds(USBH_HandleTypeDef *phost, PTP_StorageIDsTypedef *storage_ids)
USBH_PTP_GetStorageIds Gets device info dataset and fills deviceinfo structure.
USBH_StatusTypeDef USBH_PTP_Init(USBH_HandleTypeDef *phost)
USBH_PTP_Init The function Initializes the BOT protocol.
Definition: usbh_mtp_ptp.c:125
uint32_t transaction_id
Definition: usbh_mtp_ptp.h:312
PTP_DataContainerTypedef data_container
Definition: usbh_mtp_ptp.h:308
uint8_t * data_ptr
Definition: usbh_mtp_ptp.h:323
#define PTP_MAX_STR_SIZE
Definition: usbh_mtp_ptp.h:359
USBH_StatusTypeDef USBH_PTP_GetDeviceInfo(USBH_HandleTypeDef *phost, PTP_DeviceInfoTypedef *dev_info)
USBH_PTP_GetDeviceInfo Gets device info dataset and fills deviceinfo structure.
Definition: usbh_mtp_ptp.c:995
USBH_StatusTypeDef USBH_PTP_OpenSession(USBH_HandleTypeDef *phost, uint32_t session)
USBH_PTP_OpenSession Open a new session.
Definition: usbh_mtp_ptp.c:882