Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BSP_DISCO_F746NG_patch mbed-rtos mbed
usbh_mtp_ptp.h
00001 /** 00002 ****************************************************************************** 00003 * @file usbh_mtp_ptp.h 00004 * @author MCD Application Team 00005 * @version V3.2.2 00006 * @date 07-July-2015 00007 * @brief Header file for usbh_mtp_ptp.c 00008 ****************************************************************************** 00009 * @attention 00010 * 00011 * <h2><center>© COPYRIGHT 2015 STMicroelectronics</center></h2> 00012 * 00013 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 00014 * You may not use this file except in compliance with the License. 00015 * You may obtain a copy of the License at: 00016 * 00017 * http://www.st.com/software_license_agreement_liberty_v2 00018 * 00019 * Unless required by applicable law or agreed to in writing, software 00020 * distributed under the License is distributed on an "AS IS" BASIS, 00021 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00022 * See the License for the specific language governing permissions and 00023 * limitations under the License. 00024 * 00025 ****************************************************************************** 00026 */ 00027 00028 /* Define to prevent recursive ----------------------------------------------*/ 00029 #ifndef __USBH_MTP_PTP_H 00030 #define __USBH_MTP_PTP_H 00031 00032 #ifdef __cplusplus 00033 extern "C" { 00034 #endif 00035 00036 /* Includes ------------------------------------------------------------------*/ 00037 #include "usbh_core.h" 00038 00039 /** @addtogroup USBH_LIB 00040 * @{ 00041 */ 00042 00043 /** @addtogroup USBH_CLASS 00044 * @{ 00045 */ 00046 00047 /** @addtogroup USBH_MTP_PTP_CLASS 00048 * @{ 00049 */ 00050 00051 /** @defgroup USBH_MTP_PTP 00052 * @brief This file is the Header file for usbh_mtp_ptp.c 00053 * @{ 00054 */ 00055 00056 00057 /* Operation Codes */ 00058 00059 /* PTP v1.0 operation codes */ 00060 #define PTP_OC_Undefined 0x1000 00061 #define PTP_OC_GetDeviceInfo 0x1001 00062 #define PTP_OC_OpenSession 0x1002 00063 #define PTP_OC_CloseSession 0x1003 00064 #define PTP_OC_GetStorageIDs 0x1004 00065 #define PTP_OC_GetStorageInfo 0x1005 00066 #define PTP_OC_GetNumObjects 0x1006 00067 #define PTP_OC_GetObjectHandles 0x1007 00068 #define PTP_OC_GetObjectInfo 0x1008 00069 #define PTP_OC_GetObject 0x1009 00070 #define PTP_OC_GetThumb 0x100A 00071 #define PTP_OC_DeleteObject 0x100B 00072 #define PTP_OC_SendObjectInfo 0x100C 00073 #define PTP_OC_SendObject 0x100D 00074 #define PTP_OC_InitiateCapture 0x100E 00075 #define PTP_OC_FormatStore 0x100F 00076 #define PTP_OC_ResetDevice 0x1010 00077 #define PTP_OC_SelfTest 0x1011 00078 #define PTP_OC_SetObjectProtection 0x1012 00079 #define PTP_OC_PowerDown 0x1013 00080 #define PTP_OC_GetDevicePropDesc 0x1014 00081 #define PTP_OC_GetDevicePropValue 0x1015 00082 #define PTP_OC_SetDevicePropValue 0x1016 00083 #define PTP_OC_ResetDevicePropValue 0x1017 00084 #define PTP_OC_TerminateOpenCapture 0x1018 00085 #define PTP_OC_MoveObject 0x1019 00086 #define PTP_OC_CopyObject 0x101A 00087 #define PTP_OC_GetPartialObject 0x101B 00088 #define PTP_OC_InitiateOpenCapture 0x101C 00089 00090 /* PTP v1.1 operation codes */ 00091 #define PTP_OC_StartEnumHandles 0x101D 00092 #define PTP_OC_EnumHandles 0x101E 00093 #define PTP_OC_StopEnumHandles 0x101F 00094 #define PTP_OC_GetVendorExtensionMaps 0x1020 00095 #define PTP_OC_GetVendorDeviceInfo 0x1021 00096 #define PTP_OC_GetResizedImageObject 0x1022 00097 #define PTP_OC_GetFilesystemManifest 0x1023 00098 #define PTP_OC_GetStreamInfo 0x1024 00099 #define PTP_OC_GetStream 0x1025 00100 00101 /* Microsoft / MTP extension codes */ 00102 #define PTP_OC_GetObjectPropsSupported 0x9801 00103 #define PTP_OC_GetObjectPropDesc 0x9802 00104 #define PTP_OC_GetObjectPropValue 0x9803 00105 #define PTP_OC_SetObjectPropValue 0x9804 00106 #define PTP_OC_GetObjPropList 0x9805 00107 #define PTP_OC_SetObjPropList 0x9806 00108 #define PTP_OC_GetInterdependendPropdesc 0x9807 00109 #define PTP_OC_SendObjectPropList 0x9808 00110 #define PTP_OC_GetObjectReferences 0x9810 00111 #define PTP_OC_SetObjectReferences 0x9811 00112 #define PTP_OC_UpdateDeviceFirmware 0x9812 00113 #define PTP_OC_Skip 0x9820 00114 00115 00116 /* Response Codes */ 00117 00118 /* PTP v1.0 response codes */ 00119 #define PTP_RC_Undefined 0x2000 00120 #define PTP_RC_OK 0x2001 00121 #define PTP_RC_GeneralError 0x2002 00122 #define PTP_RC_SessionNotOpen 0x2003 00123 #define PTP_RC_InvalidTransactionID 0x2004 00124 #define PTP_RC_OperationNotSupported 0x2005 00125 #define PTP_RC_ParameterNotSupported 0x2006 00126 #define PTP_RC_IncompleteTransfer 0x2007 00127 #define PTP_RC_InvalidStorageId 0x2008 00128 #define PTP_RC_InvalidObjectHandle 0x2009 00129 #define PTP_RC_DevicePropNotSupported 0x200A 00130 #define PTP_RC_InvalidObjectFormatCode 0x200B 00131 #define PTP_RC_StoreFull 0x200C 00132 #define PTP_RC_ObjectWriteProtected 0x200D 00133 #define PTP_RC_StoreReadOnly 0x200E 00134 #define PTP_RC_AccessDenied 0x200F 00135 #define PTP_RC_NoThumbnailPresent 0x2010 00136 #define PTP_RC_SelfTestFailed 0x2011 00137 #define PTP_RC_PartialDeletion 0x2012 00138 #define PTP_RC_StoreNotAvailable 0x2013 00139 #define PTP_RC_SpecificationByFormatUnsupported 0x2014 00140 #define PTP_RC_NoValidObjectInfo 0x2015 00141 #define PTP_RC_InvalidCodeFormat 0x2016 00142 #define PTP_RC_UnknownVendorCode 0x2017 00143 #define PTP_RC_CaptureAlreadyTerminated 0x2018 00144 #define PTP_RC_DeviceBusy 0x2019 00145 #define PTP_RC_InvalidParentObject 0x201A 00146 #define PTP_RC_InvalidDevicePropFormat 0x201B 00147 #define PTP_RC_InvalidDevicePropValue 0x201C 00148 #define PTP_RC_InvalidParameter 0x201D 00149 #define PTP_RC_SessionAlreadyOpened 0x201E 00150 #define PTP_RC_TransactionCanceled 0x201F 00151 #define PTP_RC_SpecificationOfDestinationUnsupported 0x2020 00152 /* PTP v1.1 response codes */ 00153 #define PTP_RC_InvalidEnumHandle 0x2021 00154 #define PTP_RC_NoStreamEnabled 0x2022 00155 #define PTP_RC_InvalidDataSet 0x2023 00156 00157 /* USB container types */ 00158 00159 #define PTP_USB_CONTAINER_UNDEFINED 0x0000 00160 #define PTP_USB_CONTAINER_COMMAND 0x0001 00161 #define PTP_USB_CONTAINER_DATA 0x0002 00162 #define PTP_USB_CONTAINER_RESPONSE 0x0003 00163 #define PTP_USB_CONTAINER_EVENT 0x0004 00164 00165 /* PTP/IP definitions */ 00166 #define PTPIP_INIT_COMMAND_REQUEST 1 00167 #define PTPIP_INIT_COMMAND_ACK 2 00168 #define PTPIP_INIT_EVENT_REQUEST 3 00169 #define PTPIP_INIT_EVENT_ACK 4 00170 #define PTPIP_INIT_FAIL 5 00171 #define PTPIP_CMD_REQUEST 6 00172 #define PTPIP_CMD_RESPONSE 7 00173 #define PTPIP_EVENT 8 00174 #define PTPIP_START_DATA_PACKET 9 00175 #define PTPIP_DATA_PACKET 10 00176 #define PTPIP_CANCEL_TRANSACTION 11 00177 #define PTPIP_END_DATA_PACKET 12 00178 #define PTPIP_PING 13 00179 #define PTPIP_PONG 14 00180 00181 /* Transaction data phase description */ 00182 #define PTP_DP_NODATA 0x0000 /* no data phase */ 00183 #define PTP_DP_SENDDATA 0x0001 /* sending data */ 00184 #define PTP_DP_GETDATA 0x0002 /* receiving data */ 00185 #define PTP_DP_DATA_MASK 0x00ff /* data phase mask */ 00186 00187 /** @defgroup USBH_MTP_PTP_Exported_Types 00188 * @{ 00189 */ 00190 00191 typedef enum 00192 { 00193 PTP_REQ_IDLE = 0, 00194 PTP_REQ_SEND = 1, 00195 PTP_REQ_WAIT, 00196 PTP_REQ_ERROR, 00197 } 00198 PTP_RequestStateTypeDef; 00199 00200 typedef enum 00201 { 00202 PTP_IDLE = 0, 00203 PTP_OP_REQUEST_STATE, 00204 PTP_OP_REQUEST_WAIT_STATE, 00205 PTP_DATA_OUT_PHASE_STATE, 00206 PTP_DATA_OUT_PHASE_WAIT_STATE, 00207 PTP_DATA_IN_PHASE_STATE, 00208 PTP_DATA_IN_PHASE_WAIT_STATE, 00209 PTP_RESPONSE_STATE, 00210 PTP_RESPONSE_WAIT_STATE, 00211 PTP_ERROR, 00212 } 00213 PTP_ProcessStateTypeDef; 00214 00215 /* PTP request/response/event general PTP container (transport independent) */ 00216 typedef struct 00217 { 00218 uint16_t Code; 00219 uint32_t SessionID; 00220 uint32_t Transaction_ID; 00221 /* params may be of any type of size less or equal to uint32_t */ 00222 uint32_t Param1; 00223 uint32_t Param2; 00224 uint32_t Param3; 00225 /* events can only have three parameters */ 00226 uint32_t Param4; 00227 uint32_t Param5; 00228 /* the number of meaningful parameters */ 00229 uint8_t Nparam; 00230 } 00231 PTP_ContainerTypedef; 00232 00233 #define PTP_USB_BULK_HS_MAX_PACKET_LEN_WRITE 1024 00234 #define PTP_USB_BULK_HS_MAX_PACKET_LEN_READ 1024 00235 #define PTP_USB_BULK_HDR_LEN (2*sizeof(uint32_t)+2*sizeof(uint16_t)) 00236 #define PTP_USB_BULK_PAYLOAD_LEN_WRITE (PTP_USB_BULK_HS_MAX_PACKET_LEN_WRITE-PTP_USB_BULK_HDR_LEN) 00237 #define PTP_USB_BULK_PAYLOAD_LEN_READ (PTP_USB_BULK_HS_MAX_PACKET_LEN_READ-PTP_USB_BULK_HDR_LEN) 00238 #define PTP_USB_BULK_REQ_LEN (PTP_USB_BULK_HDR_LEN+5*sizeof(uint32_t)) 00239 #define PTP_USB_BULK_REQ_RESP_MAX_LEN 63 00240 00241 typedef struct 00242 { 00243 uint32_t length; 00244 uint16_t type; 00245 uint16_t code; 00246 uint32_t trans_id; 00247 uint32_t param1; 00248 uint32_t param2; 00249 uint32_t param3; 00250 uint32_t param4; 00251 uint32_t param5; 00252 } 00253 PTP_RespContainerTypedef; 00254 00255 00256 typedef struct 00257 { 00258 uint32_t length; 00259 uint16_t type; 00260 uint16_t code; 00261 uint32_t trans_id; 00262 uint32_t param1; 00263 uint32_t param2; 00264 uint32_t param3; 00265 uint32_t param4; 00266 uint32_t param5; 00267 } 00268 PTP_OpContainerTypedef; 00269 00270 typedef struct 00271 { 00272 uint32_t length; 00273 uint16_t type; 00274 uint16_t code; 00275 uint32_t trans_id; 00276 union { 00277 struct { 00278 uint32_t param1; 00279 uint32_t param2; 00280 uint32_t param3; 00281 uint32_t param4; 00282 uint32_t param5; 00283 } params; 00284 uint8_t data[PTP_USB_BULK_PAYLOAD_LEN_READ]; 00285 }payload; 00286 } 00287 PTP_DataContainerTypedef; 00288 00289 /* PTP USB Asynchronous Event Interrupt Data Format */ 00290 typedef struct 00291 { 00292 uint32_t length; 00293 uint16_t type; 00294 uint16_t code; 00295 uint32_t trans_id; 00296 uint32_t param1; 00297 uint32_t param2; 00298 uint32_t param3; 00299 } 00300 PTP_EventContainerTypedef; 00301 00302 /* Structure for PTP Transport process */ 00303 typedef struct 00304 { 00305 PTP_ProcessStateTypeDef state; 00306 PTP_RequestStateTypeDef req_state; 00307 PTP_OpContainerTypedef op_container; 00308 PTP_DataContainerTypedef data_container; 00309 PTP_RespContainerTypedef resp_container; 00310 00311 /* ptp transaction ID */ 00312 uint32_t transaction_id; 00313 00314 /* ptp session ID */ 00315 uint32_t session_id; 00316 00317 /* device flags */ 00318 uint32_t flags; 00319 00320 /****** PTP transfer control *******/ 00321 00322 /* Data pointer */ 00323 uint8_t *data_ptr; 00324 00325 /* Data length */ 00326 int32_t data_length; 00327 00328 /* Data length */ 00329 uint32_t data_packet; 00330 00331 /* Data length */ 00332 uint32_t iteration; 00333 00334 /* Packet Index */ 00335 uint32_t data_packet_counter; 00336 00337 /****** Object transfer control *******/ 00338 00339 /* object pointer */ 00340 uint8_t *object_ptr; 00341 00342 } 00343 PTP_HandleTypeDef; 00344 00345 /* DeviceInfo data offset */ 00346 #define PTP_di_StandardVersion 0 00347 #define PTP_di_VendorExtensionID 2 00348 #define PTP_di_VendorExtensionVersion 6 00349 #define PTP_di_VendorExtensionDesc 8 00350 #define PTP_di_FunctionalMode 8 00351 #define PTP_di_OperationsSupported 10 00352 00353 /* Max info items size */ 00354 #define PTP_SUPPORTED_OPERATIONS_NBR 100 00355 #define PTP_SUPPORTED_EVENTS_NBR 100 00356 #define PTP_SUPPORTED_PROPRIETIES_NBR 100 00357 #define PTP_CAPTURE_FORMATS_NBR 100 00358 #define PTP_IMAGE_FORMATS_NBR 100 00359 #define PTP_MAX_STR_SIZE 255 00360 /* PTP device info structure */ 00361 typedef struct 00362 { 00363 uint16_t StandardVersion; 00364 uint32_t VendorExtensionID; 00365 uint16_t VendorExtensionVersion; 00366 uint8_t VendorExtensionDesc[PTP_MAX_STR_SIZE]; 00367 uint16_t FunctionalMode; 00368 uint32_t OperationsSupported_len; 00369 uint16_t OperationsSupported[PTP_SUPPORTED_OPERATIONS_NBR]; 00370 uint32_t EventsSupported_len; 00371 uint16_t EventsSupported[PTP_SUPPORTED_EVENTS_NBR]; 00372 uint32_t DevicePropertiesSupported_len; 00373 uint16_t DevicePropertiesSupported[PTP_SUPPORTED_PROPRIETIES_NBR]; 00374 uint32_t CaptureFormats_len; 00375 uint16_t CaptureFormats[PTP_CAPTURE_FORMATS_NBR]; 00376 uint32_t ImageFormats_len; 00377 uint16_t ImageFormats[PTP_IMAGE_FORMATS_NBR]; 00378 uint8_t Manufacturer[PTP_MAX_STR_SIZE]; 00379 uint8_t Model[PTP_MAX_STR_SIZE]; 00380 uint8_t DeviceVersion[PTP_MAX_STR_SIZE]; 00381 uint8_t SerialNumber[PTP_MAX_STR_SIZE]; 00382 } 00383 PTP_DeviceInfoTypedef; 00384 00385 #define PTP_MAX_STORAGE_UNITS_NBR 5 00386 /* PTP storageIDs structute (returned by GetStorageIDs) */ 00387 typedef struct 00388 { 00389 uint32_t n; 00390 uint32_t Storage [PTP_MAX_STORAGE_UNITS_NBR]; 00391 } 00392 PTP_StorageIDsTypedef; 00393 00394 /* PTP StorageInfo structure (returned by GetStorageInfo) */ 00395 00396 #define PTP_si_StorageType 0 00397 #define PTP_si_FilesystemType 2 00398 #define PTP_si_AccessCapability 4 00399 #define PTP_si_MaxCapability 6 00400 #define PTP_si_FreeSpaceInBytes 14 00401 #define PTP_si_FreeSpaceInImages 22 00402 #define PTP_si_StorageDescription 26 00403 00404 00405 /* PTP Storage Types */ 00406 00407 #define PTP_ST_Undefined 0x0000 00408 #define PTP_ST_FixedROM 0x0001 00409 #define PTP_ST_RemovableROM 0x0002 00410 #define PTP_ST_FixedRAM 0x0003 00411 #define PTP_ST_RemovableRAM 0x0004 00412 00413 /* PTP FilesystemType Values */ 00414 00415 #define PTP_FST_Undefined 0x0000 00416 #define PTP_FST_GenericFlat 0x0001 00417 #define PTP_FST_GenericHierarchical 0x0002 00418 #define PTP_FST_DCF 0x0003 00419 00420 /* PTP StorageInfo AccessCapability Values */ 00421 00422 #define PTP_AC_ReadWrite 0x0000 00423 #define PTP_AC_ReadOnly 0x0001 00424 #define PTP_AC_ReadOnly_with_Object_Deletion 0x0002 00425 00426 typedef struct 00427 { 00428 uint16_t StorageType; 00429 uint16_t FilesystemType; 00430 uint16_t AccessCapability; 00431 uint64_t MaxCapability; 00432 uint64_t FreeSpaceInBytes; 00433 uint32_t FreeSpaceInImages; 00434 uint8_t StorageDescription[PTP_MAX_STR_SIZE]; 00435 uint8_t VolumeLabel[PTP_MAX_STR_SIZE]; 00436 } 00437 PTP_StorageInfoTypedef; 00438 00439 /* PTP Object Format Codes */ 00440 00441 /* ancillary formats */ 00442 #define PTP_OFC_Undefined 0x3000 00443 #define PTP_OFC_Defined 0x3800 00444 #define PTP_OFC_Association 0x3001 00445 #define PTP_OFC_Script 0x3002 00446 #define PTP_OFC_Executable 0x3003 00447 #define PTP_OFC_Text 0x3004 00448 #define PTP_OFC_HTML 0x3005 00449 #define PTP_OFC_DPOF 0x3006 00450 #define PTP_OFC_AIFF 0x3007 00451 #define PTP_OFC_WAV 0x3008 00452 #define PTP_OFC_MP3 0x3009 00453 #define PTP_OFC_AVI 0x300A 00454 #define PTP_OFC_MPEG 0x300B 00455 #define PTP_OFC_ASF 0x300C 00456 #define PTP_OFC_QT 0x300D /* guessing */ 00457 /* image formats */ 00458 #define PTP_OFC_EXIF_JPEG 0x3801 00459 #define PTP_OFC_TIFF_EP 0x3802 00460 #define PTP_OFC_FlashPix 0x3803 00461 #define PTP_OFC_BMP 0x3804 00462 #define PTP_OFC_CIFF 0x3805 00463 #define PTP_OFC_Undefined_0x3806 0x3806 00464 #define PTP_OFC_GIF 0x3807 00465 #define PTP_OFC_JFIF 0x3808 00466 #define PTP_OFC_PCD 0x3809 00467 #define PTP_OFC_PICT 0x380A 00468 #define PTP_OFC_PNG 0x380B 00469 #define PTP_OFC_Undefined_0x380C 0x380C 00470 #define PTP_OFC_TIFF 0x380D 00471 #define PTP_OFC_TIFF_IT 0x380E 00472 #define PTP_OFC_JP2 0x380F 00473 #define PTP_OFC_JPX 0x3810 00474 /* ptp v1.1 has only DNG new */ 00475 #define PTP_OFC_DNG 0x3811 00476 00477 /* MTP extensions */ 00478 #define PTP_OFC_MTP_MediaCard 0xb211 00479 #define PTP_OFC_MTP_MediaCardGroup 0xb212 00480 #define PTP_OFC_MTP_Encounter 0xb213 00481 #define PTP_OFC_MTP_EncounterBox 0xb214 00482 #define PTP_OFC_MTP_M4A 0xb215 00483 #define PTP_OFC_MTP_ZUNEUNDEFINED 0xb217 /* Unknown file type */ 00484 #define PTP_OFC_MTP_Firmware 0xb802 00485 #define PTP_OFC_MTP_WindowsImageFormat 0xb881 00486 #define PTP_OFC_MTP_UndefinedAudio 0xb900 00487 #define PTP_OFC_MTP_WMA 0xb901 00488 #define PTP_OFC_MTP_OGG 0xb902 00489 #define PTP_OFC_MTP_AAC 0xb903 00490 #define PTP_OFC_MTP_AudibleCod 0xb904 00491 #define PTP_OFC_MTP_FLAC 0xb906 00492 #define PTP_OFC_MTP_SamsungPlaylist 0xb909 00493 #define PTP_OFC_MTP_UndefinedVideo 0xb980 00494 #define PTP_OFC_MTP_WMV 0xb981 00495 #define PTP_OFC_MTP_MP4 0xb982 00496 #define PTP_OFC_MTP_MP2 0xb983 00497 #define PTP_OFC_MTP_3GP 0xb984 00498 #define PTP_OFC_MTP_UndefinedCollection 0xba00 00499 #define PTP_OFC_MTP_AbstractMultimediaAlbum 0xba01 00500 #define PTP_OFC_MTP_AbstractImageAlbum 0xba02 00501 #define PTP_OFC_MTP_AbstractAudioAlbum 0xba03 00502 #define PTP_OFC_MTP_AbstractVideoAlbum 0xba04 00503 #define PTP_OFC_MTP_AbstractAudioVideoPlaylist 0xba05 00504 #define PTP_OFC_MTP_AbstractContactGroup 0xba06 00505 #define PTP_OFC_MTP_AbstractMessageFolder 0xba07 00506 #define PTP_OFC_MTP_AbstractChapteredProduction 0xba08 00507 #define PTP_OFC_MTP_AbstractAudioPlaylist 0xba09 00508 #define PTP_OFC_MTP_AbstractVideoPlaylist 0xba0a 00509 #define PTP_OFC_MTP_AbstractMediacast 0xba0b 00510 #define PTP_OFC_MTP_WPLPlaylist 0xba10 00511 #define PTP_OFC_MTP_M3UPlaylist 0xba11 00512 #define PTP_OFC_MTP_MPLPlaylist 0xba12 00513 #define PTP_OFC_MTP_ASXPlaylist 0xba13 00514 #define PTP_OFC_MTP_PLSPlaylist 0xba14 00515 #define PTP_OFC_MTP_UndefinedDocument 0xba80 00516 #define PTP_OFC_MTP_AbstractDocument 0xba81 00517 #define PTP_OFC_MTP_XMLDocument 0xba82 00518 #define PTP_OFC_MTP_MSWordDocument 0xba83 00519 #define PTP_OFC_MTP_MHTCompiledHTMLDocument 0xba84 00520 #define PTP_OFC_MTP_MSExcelSpreadsheetXLS 0xba85 00521 #define PTP_OFC_MTP_MSPowerpointPresentationPPT 0xba86 00522 #define PTP_OFC_MTP_UndefinedMessage 0xbb00 00523 #define PTP_OFC_MTP_AbstractMessage 0xbb01 00524 #define PTP_OFC_MTP_UndefinedContact 0xbb80 00525 #define PTP_OFC_MTP_AbstractContact 0xbb81 00526 #define PTP_OFC_MTP_vCard2 0xbb82 00527 #define PTP_OFC_MTP_vCard3 0xbb83 00528 #define PTP_OFC_MTP_UndefinedCalendarItem 0xbe00 00529 #define PTP_OFC_MTP_AbstractCalendarItem 0xbe01 00530 #define PTP_OFC_MTP_vCalendar1 0xbe02 00531 #define PTP_OFC_MTP_vCalendar2 0xbe03 00532 #define PTP_OFC_MTP_UndefinedWindowsExecutable 0xbe80 00533 #define PTP_OFC_MTP_MediaCast 0xbe81 00534 #define PTP_OFC_MTP_Section 0xbe82 00535 00536 /* MTP specific Object Properties */ 00537 #define PTP_OPC_StorageID 0xDC01 00538 #define PTP_OPC_ObjectFormat 0xDC02 00539 #define PTP_OPC_ProtectionStatus 0xDC03 00540 #define PTP_OPC_ObjectSize 0xDC04 00541 #define PTP_OPC_AssociationType 0xDC05 00542 #define PTP_OPC_AssociationDesc 0xDC06 00543 #define PTP_OPC_ObjectFileName 0xDC07 00544 #define PTP_OPC_DateCreated 0xDC08 00545 #define PTP_OPC_DateModified 0xDC09 00546 #define PTP_OPC_Keywords 0xDC0A 00547 #define PTP_OPC_ParentObject 0xDC0B 00548 #define PTP_OPC_AllowedFolderContents 0xDC0C 00549 #define PTP_OPC_Hidden 0xDC0D 00550 #define PTP_OPC_SystemObject 0xDC0E 00551 #define PTP_OPC_PersistantUniqueObjectIdentifier 0xDC41 00552 #define PTP_OPC_SyncID 0xDC42 00553 #define PTP_OPC_PropertyBag 0xDC43 00554 #define PTP_OPC_Name 0xDC44 00555 #define PTP_OPC_CreatedBy 0xDC45 00556 #define PTP_OPC_Artist 0xDC46 00557 #define PTP_OPC_DateAuthored 0xDC47 00558 #define PTP_OPC_Description 0xDC48 00559 #define PTP_OPC_URLReference 0xDC49 00560 #define PTP_OPC_LanguageLocale 0xDC4A 00561 #define PTP_OPC_CopyrightInformation 0xDC4B 00562 #define PTP_OPC_Source 0xDC4C 00563 #define PTP_OPC_OriginLocation 0xDC4D 00564 #define PTP_OPC_DateAdded 0xDC4E 00565 #define PTP_OPC_NonConsumable 0xDC4F 00566 #define PTP_OPC_CorruptOrUnplayable 0xDC50 00567 #define PTP_OPC_ProducerSerialNumber 0xDC51 00568 #define PTP_OPC_RepresentativeSampleFormat 0xDC81 00569 #define PTP_OPC_RepresentativeSampleSize 0xDC82 00570 #define PTP_OPC_RepresentativeSampleHeight 0xDC83 00571 #define PTP_OPC_RepresentativeSampleWidth 0xDC84 00572 #define PTP_OPC_RepresentativeSampleDuration 0xDC85 00573 #define PTP_OPC_RepresentativeSampleData 0xDC86 00574 #define PTP_OPC_Width 0xDC87 00575 #define PTP_OPC_Height 0xDC88 00576 #define PTP_OPC_Duration 0xDC89 00577 #define PTP_OPC_Rating 0xDC8A 00578 #define PTP_OPC_Track 0xDC8B 00579 #define PTP_OPC_Genre 0xDC8C 00580 #define PTP_OPC_Credits 0xDC8D 00581 #define PTP_OPC_Lyrics 0xDC8E 00582 #define PTP_OPC_SubscriptionContentID 0xDC8F 00583 #define PTP_OPC_ProducedBy 0xDC90 00584 #define PTP_OPC_UseCount 0xDC91 00585 #define PTP_OPC_SkipCount 0xDC92 00586 #define PTP_OPC_LastAccessed 0xDC93 00587 #define PTP_OPC_ParentalRating 0xDC94 00588 #define PTP_OPC_MetaGenre 0xDC95 00589 #define PTP_OPC_Composer 0xDC96 00590 #define PTP_OPC_EffectiveRating 0xDC97 00591 #define PTP_OPC_Subtitle 0xDC98 00592 #define PTP_OPC_OriginalReleaseDate 0xDC99 00593 #define PTP_OPC_AlbumName 0xDC9A 00594 #define PTP_OPC_AlbumArtist 0xDC9B 00595 #define PTP_OPC_Mood 0xDC9C 00596 #define PTP_OPC_DRMStatus 0xDC9D 00597 #define PTP_OPC_SubDescription 0xDC9E 00598 #define PTP_OPC_IsCropped 0xDCD1 00599 #define PTP_OPC_IsColorCorrected 0xDCD2 00600 #define PTP_OPC_ImageBitDepth 0xDCD3 00601 #define PTP_OPC_Fnumber 0xDCD4 00602 #define PTP_OPC_ExposureTime 0xDCD5 00603 #define PTP_OPC_ExposureIndex 0xDCD6 00604 #define PTP_OPC_DisplayName 0xDCE0 00605 #define PTP_OPC_BodyText 0xDCE1 00606 #define PTP_OPC_Subject 0xDCE2 00607 #define PTP_OPC_Priority 0xDCE3 00608 #define PTP_OPC_GivenName 0xDD00 00609 #define PTP_OPC_MiddleNames 0xDD01 00610 #define PTP_OPC_FamilyName 0xDD02 00611 #define PTP_OPC_Prefix 0xDD03 00612 #define PTP_OPC_Suffix 0xDD04 00613 #define PTP_OPC_PhoneticGivenName 0xDD05 00614 #define PTP_OPC_PhoneticFamilyName 0xDD06 00615 #define PTP_OPC_EmailPrimary 0xDD07 00616 #define PTP_OPC_EmailPersonal1 0xDD08 00617 #define PTP_OPC_EmailPersonal2 0xDD09 00618 #define PTP_OPC_EmailBusiness1 0xDD0A 00619 #define PTP_OPC_EmailBusiness2 0xDD0B 00620 #define PTP_OPC_EmailOthers 0xDD0C 00621 #define PTP_OPC_PhoneNumberPrimary 0xDD0D 00622 #define PTP_OPC_PhoneNumberPersonal 0xDD0E 00623 #define PTP_OPC_PhoneNumberPersonal2 0xDD0F 00624 #define PTP_OPC_PhoneNumberBusiness 0xDD10 00625 #define PTP_OPC_PhoneNumberBusiness2 0xDD11 00626 #define PTP_OPC_PhoneNumberMobile 0xDD12 00627 #define PTP_OPC_PhoneNumberMobile2 0xDD13 00628 #define PTP_OPC_FaxNumberPrimary 0xDD14 00629 #define PTP_OPC_FaxNumberPersonal 0xDD15 00630 #define PTP_OPC_FaxNumberBusiness 0xDD16 00631 #define PTP_OPC_PagerNumber 0xDD17 00632 #define PTP_OPC_PhoneNumberOthers 0xDD18 00633 #define PTP_OPC_PrimaryWebAddress 0xDD19 00634 #define PTP_OPC_PersonalWebAddress 0xDD1A 00635 #define PTP_OPC_BusinessWebAddress 0xDD1B 00636 #define PTP_OPC_InstantMessengerAddress 0xDD1C 00637 #define PTP_OPC_InstantMessengerAddress2 0xDD1D 00638 #define PTP_OPC_InstantMessengerAddress3 0xDD1E 00639 #define PTP_OPC_PostalAddressPersonalFull 0xDD1F 00640 #define PTP_OPC_PostalAddressPersonalFullLine1 0xDD20 00641 #define PTP_OPC_PostalAddressPersonalFullLine2 0xDD21 00642 #define PTP_OPC_PostalAddressPersonalFullCity 0xDD22 00643 #define PTP_OPC_PostalAddressPersonalFullRegion 0xDD23 00644 #define PTP_OPC_PostalAddressPersonalFullPostalCode 0xDD24 00645 #define PTP_OPC_PostalAddressPersonalFullCountry 0xDD25 00646 #define PTP_OPC_PostalAddressBusinessFull 0xDD26 00647 #define PTP_OPC_PostalAddressBusinessLine1 0xDD27 00648 #define PTP_OPC_PostalAddressBusinessLine2 0xDD28 00649 #define PTP_OPC_PostalAddressBusinessCity 0xDD29 00650 #define PTP_OPC_PostalAddressBusinessRegion 0xDD2A 00651 #define PTP_OPC_PostalAddressBusinessPostalCode 0xDD2B 00652 #define PTP_OPC_PostalAddressBusinessCountry 0xDD2C 00653 #define PTP_OPC_PostalAddressOtherFull 0xDD2D 00654 #define PTP_OPC_PostalAddressOtherLine1 0xDD2E 00655 #define PTP_OPC_PostalAddressOtherLine2 0xDD2F 00656 #define PTP_OPC_PostalAddressOtherCity 0xDD30 00657 #define PTP_OPC_PostalAddressOtherRegion 0xDD31 00658 #define PTP_OPC_PostalAddressOtherPostalCode 0xDD32 00659 #define PTP_OPC_PostalAddressOtherCountry 0xDD33 00660 #define PTP_OPC_OrganizationName 0xDD34 00661 #define PTP_OPC_PhoneticOrganizationName 0xDD35 00662 #define PTP_OPC_Role 0xDD36 00663 #define PTP_OPC_Birthdate 0xDD37 00664 #define PTP_OPC_MessageTo 0xDD40 00665 #define PTP_OPC_MessageCC 0xDD41 00666 #define PTP_OPC_MessageBCC 0xDD42 00667 #define PTP_OPC_MessageRead 0xDD43 00668 #define PTP_OPC_MessageReceivedTime 0xDD44 00669 #define PTP_OPC_MessageSender 0xDD45 00670 #define PTP_OPC_ActivityBeginTime 0xDD50 00671 #define PTP_OPC_ActivityEndTime 0xDD51 00672 #define PTP_OPC_ActivityLocation 0xDD52 00673 #define PTP_OPC_ActivityRequiredAttendees 0xDD54 00674 #define PTP_OPC_ActivityOptionalAttendees 0xDD55 00675 #define PTP_OPC_ActivityResources 0xDD56 00676 #define PTP_OPC_ActivityAccepted 0xDD57 00677 #define PTP_OPC_Owner 0xDD5D 00678 #define PTP_OPC_Editor 0xDD5E 00679 #define PTP_OPC_Webmaster 0xDD5F 00680 #define PTP_OPC_URLSource 0xDD60 00681 #define PTP_OPC_URLDestination 0xDD61 00682 #define PTP_OPC_TimeBookmark 0xDD62 00683 #define PTP_OPC_ObjectBookmark 0xDD63 00684 #define PTP_OPC_ByteBookmark 0xDD64 00685 #define PTP_OPC_LastBuildDate 0xDD70 00686 #define PTP_OPC_TimetoLive 0xDD71 00687 #define PTP_OPC_MediaGUID 0xDD72 00688 #define PTP_OPC_TotalBitRate 0xDE91 00689 #define PTP_OPC_BitRateType 0xDE92 00690 #define PTP_OPC_SampleRate 0xDE93 00691 #define PTP_OPC_NumberOfChannels 0xDE94 00692 #define PTP_OPC_AudioBitDepth 0xDE95 00693 #define PTP_OPC_ScanDepth 0xDE97 00694 #define PTP_OPC_AudioWAVECodec 0xDE99 00695 #define PTP_OPC_AudioBitRate 0xDE9A 00696 #define PTP_OPC_VideoFourCCCodec 0xDE9B 00697 #define PTP_OPC_VideoBitRate 0xDE9C 00698 #define PTP_OPC_FramesPerThousandSeconds 0xDE9D 00699 #define PTP_OPC_KeyFrameDistance 0xDE9E 00700 #define PTP_OPC_BufferSize 0xDE9F 00701 #define PTP_OPC_EncodingQuality 0xDEA0 00702 #define PTP_OPC_EncodingProfile 0xDEA1 00703 #define PTP_OPC_BuyFlag 0xD901 00704 00705 /* WiFi Provisioning MTP Extension property codes */ 00706 #define PTP_OPC_WirelessConfigurationFile 0xB104 00707 00708 00709 /* PTP Association Types */ 00710 #define PTP_AT_Undefined 0x0000 00711 #define PTP_AT_GenericFolder 0x0001 00712 #define PTP_AT_Album 0x0002 00713 #define PTP_AT_TimeSequence 0x0003 00714 #define PTP_AT_HorizontalPanoramic 0x0004 00715 #define PTP_AT_VerticalPanoramic 0x0005 00716 #define PTP_AT_2DPanoramic 0x0006 00717 #define PTP_AT_AncillaryData 0x0007 00718 00719 #define PTP_MAX_HANDLER_NBR 0x255 00720 typedef struct 00721 { 00722 uint32_t n; 00723 uint32_t Handler[PTP_MAX_HANDLER_NBR]; 00724 } 00725 PTP_ObjectHandlesTypedef; 00726 00727 00728 #define PTP_oi_StorageID 0 00729 #define PTP_oi_ObjectFormat 4 00730 #define PTP_oi_ProtectionStatus 6 00731 #define PTP_oi_ObjectCompressedSize 8 00732 #define PTP_oi_ThumbFormat 12 00733 #define PTP_oi_ThumbCompressedSize 14 00734 #define PTP_oi_ThumbPixWidth 18 00735 #define PTP_oi_ThumbPixHeight 22 00736 #define PTP_oi_ImagePixWidth 26 00737 #define PTP_oi_ImagePixHeight 30 00738 #define PTP_oi_ImageBitDepth 34 00739 #define PTP_oi_ParentObject 38 00740 #define PTP_oi_AssociationType 42 00741 #define PTP_oi_AssociationDesc 44 00742 #define PTP_oi_SequenceNumber 48 00743 #define PTP_oi_filenamelen 52 00744 #define PTP_oi_Filename 53 00745 00746 typedef struct 00747 { 00748 uint32_t StorageID; 00749 uint16_t ObjectFormat; 00750 uint16_t ProtectionStatus; 00751 /* In the regular objectinfo this is 32bit, but we keep the general object size here 00752 that also arrives via other methods and so use 64bit */ 00753 uint64_t ObjectCompressedSize; 00754 uint16_t ThumbFormat; 00755 uint32_t ThumbCompressedSize; 00756 uint32_t ThumbPixWidth; 00757 uint32_t ThumbPixHeight; 00758 uint32_t ImagePixWidth; 00759 uint32_t ImagePixHeight; 00760 uint32_t ImageBitDepth; 00761 uint32_t ParentObject; 00762 uint16_t AssociationType; 00763 uint32_t AssociationDesc; 00764 uint32_t SequenceNumber; 00765 uint8_t Filename[PTP_MAX_STR_SIZE]; 00766 uint32_t CaptureDate; 00767 uint32_t ModificationDate; 00768 uint8_t Keywords[PTP_MAX_STR_SIZE]; 00769 } 00770 PTP_ObjectInfoTypedef; 00771 00772 /* Object Property Describing Dataset (DevicePropDesc) */ 00773 00774 typedef union _PTP_PropertyValueTypedef 00775 { 00776 char str[PTP_MAX_STR_SIZE]; 00777 uint8_t u8; 00778 int8_t i8; 00779 uint16_t u16; 00780 int16_t i16; 00781 uint32_t u32; 00782 int32_t i32; 00783 uint64_t u64; 00784 int64_t i64; 00785 struct array { 00786 uint32_t count; 00787 union _PTP_PropertyValueTypedef *v; 00788 }a; 00789 }PTP_PropertyValueTypedef; 00790 00791 typedef struct 00792 { 00793 PTP_PropertyValueTypedef MinimumValue; 00794 PTP_PropertyValueTypedef MaximumValue; 00795 PTP_PropertyValueTypedef StepSize; 00796 } 00797 PTP_PropDescRangeFormTypedef; 00798 00799 /* Property Describing Dataset, Enum Form */ 00800 00801 typedef struct 00802 { 00803 uint16_t NumberOfValues; 00804 PTP_PropertyValueTypedef SupportedValue[PTP_SUPPORTED_PROPRIETIES_NBR]; 00805 } 00806 PTP_PropDescEnumFormTypedef; 00807 00808 /* (MTP) Object Property pack/unpack */ 00809 #define PTP_opd_ObjectPropertyCode 0 00810 #define PTP_opd_DataType 2 00811 #define PTP_opd_GetSet 4 00812 #define PTP_opd_FactoryDefaultValue 5 00813 00814 typedef struct 00815 { 00816 uint16_t ObjectPropertyCode; 00817 uint16_t DataType; 00818 uint8_t GetSet; 00819 PTP_PropertyValueTypedef FactoryDefaultValue; 00820 uint32_t GroupCode; 00821 uint8_t FormFlag; 00822 union { 00823 PTP_PropDescEnumFormTypedef Enum; 00824 PTP_PropDescRangeFormTypedef Range; 00825 } FORM; 00826 } 00827 PTP_ObjectPropDescTypeDef; 00828 00829 /* Metadata lists for MTP operations */ 00830 typedef struct 00831 { 00832 uint16_t property; 00833 uint16_t datatype; 00834 uint32_t ObjectHandle; 00835 PTP_PropertyValueTypedef propval; 00836 } 00837 MTP_PropertiesTypedef; 00838 00839 00840 /* Device Property Form Flag */ 00841 00842 #define PTP_DPFF_None 0x00 00843 #define PTP_DPFF_Range 0x01 00844 #define PTP_DPFF_Enumeration 0x02 00845 00846 /* Object Property Codes used by MTP (first 3 are same as DPFF codes) */ 00847 #define PTP_OPFF_None 0x00 00848 #define PTP_OPFF_Range 0x01 00849 #define PTP_OPFF_Enumeration 0x02 00850 #define PTP_OPFF_DateTime 0x03 00851 #define PTP_OPFF_FixedLengthArray 0x04 00852 #define PTP_OPFF_RegularExpression 0x05 00853 #define PTP_OPFF_ByteArray 0x06 00854 #define PTP_OPFF_LongString 0xFF 00855 00856 /* Device Property pack/unpack */ 00857 00858 #define PTP_dpd_DevicePropertyCode 0 00859 #define PTP_dpd_DataType 2 00860 #define PTP_dpd_GetSet 4 00861 #define PTP_dpd_FactoryDefaultValue 5 00862 00863 /* Device Property Describing Dataset (DevicePropDesc) */ 00864 00865 typedef struct 00866 { 00867 uint16_t DevicePropertyCode; 00868 uint16_t DataType; 00869 uint8_t GetSet; 00870 PTP_PropertyValueTypedef FactoryDefaultValue; 00871 PTP_PropertyValueTypedef CurrentValue; 00872 uint8_t FormFlag; 00873 union { 00874 PTP_PropDescEnumFormTypedef Enum; 00875 PTP_PropDescRangeFormTypedef Range; 00876 } FORM; 00877 } 00878 PTP_DevicePropDescTypdef; 00879 00880 /* DataType Codes */ 00881 00882 #define PTP_DTC_UNDEF 0x0000 00883 #define PTP_DTC_INT8 0x0001 00884 #define PTP_DTC_UINT8 0x0002 00885 #define PTP_DTC_INT16 0x0003 00886 #define PTP_DTC_UINT16 0x0004 00887 #define PTP_DTC_INT32 0x0005 00888 #define PTP_DTC_UINT32 0x0006 00889 #define PTP_DTC_INT64 0x0007 00890 #define PTP_DTC_UINT64 0x0008 00891 #define PTP_DTC_INT128 0x0009 00892 #define PTP_DTC_UINT128 0x000A 00893 00894 #define PTP_DTC_ARRAY_MASK 0x4000 00895 00896 #define PTP_DTC_AINT8 (PTP_DTC_ARRAY_MASK | PTP_DTC_INT8) 00897 #define PTP_DTC_AUINT8 (PTP_DTC_ARRAY_MASK | PTP_DTC_UINT8) 00898 #define PTP_DTC_AINT16 (PTP_DTC_ARRAY_MASK | PTP_DTC_INT16) 00899 #define PTP_DTC_AUINT16 (PTP_DTC_ARRAY_MASK | PTP_DTC_UINT16) 00900 #define PTP_DTC_AINT32 (PTP_DTC_ARRAY_MASK | PTP_DTC_INT32) 00901 #define PTP_DTC_AUINT32 (PTP_DTC_ARRAY_MASK | PTP_DTC_UINT32) 00902 #define PTP_DTC_AINT64 (PTP_DTC_ARRAY_MASK | PTP_DTC_INT64) 00903 #define PTP_DTC_AUINT64 (PTP_DTC_ARRAY_MASK | PTP_DTC_UINT64) 00904 #define PTP_DTC_AINT128 (PTP_DTC_ARRAY_MASK | PTP_DTC_INT128) 00905 #define PTP_DTC_AUINT128 (PTP_DTC_ARRAY_MASK | PTP_DTC_UINT128) 00906 00907 #define PTP_DTC_STR 0xFFFF 00908 00909 /* PTP Event Codes */ 00910 00911 #define PTP_EC_Undefined 0x4000 00912 #define PTP_EC_CancelTransaction 0x4001 00913 #define PTP_EC_ObjectAdded 0x4002 00914 #define PTP_EC_ObjectRemoved 0x4003 00915 #define PTP_EC_StoreAdded 0x4004 00916 #define PTP_EC_StoreRemoved 0x4005 00917 #define PTP_EC_DevicePropChanged 0x4006 00918 #define PTP_EC_ObjectInfoChanged 0x4007 00919 #define PTP_EC_DeviceInfoChanged 0x4008 00920 #define PTP_EC_RequestObjectTransfer 0x4009 00921 #define PTP_EC_StoreFull 0x400A 00922 #define PTP_EC_DeviceReset 0x400B 00923 #define PTP_EC_StorageInfoChanged 0x400C 00924 #define PTP_EC_CaptureComplete 0x400D 00925 #define PTP_EC_UnreportedStatus 0x400E 00926 00927 00928 /** 00929 * @} 00930 */ 00931 00932 /** @defgroup USBH_MTP_PTP_Exported_Macros 00933 * @{ 00934 */ 00935 /** 00936 * @} 00937 */ 00938 00939 /** @defgroup USBH_MTP_PTP_Exported_Variables 00940 * @{ 00941 */ 00942 00943 /** 00944 * @} 00945 */ 00946 00947 /** @defgroup USBH_MTP_PTP_Exported_FunctionsPrototype 00948 * @{ 00949 */ 00950 USBH_StatusTypeDef USBH_PTP_Init(USBH_HandleTypeDef *phost); 00951 USBH_StatusTypeDef USBH_PTP_Process (USBH_HandleTypeDef *phost); 00952 00953 USBH_StatusTypeDef USBH_PTP_SendRequest (USBH_HandleTypeDef *phost, PTP_ContainerTypedef *req); 00954 USBH_StatusTypeDef USBH_PTP_GetResponse (USBH_HandleTypeDef *phost, PTP_ContainerTypedef *req); 00955 00956 USBH_StatusTypeDef USBH_PTP_OpenSession (USBH_HandleTypeDef *phost, uint32_t session); 00957 USBH_StatusTypeDef USBH_PTP_GetDeviceInfo (USBH_HandleTypeDef *phost, PTP_DeviceInfoTypedef *dev_info); 00958 USBH_StatusTypeDef USBH_PTP_GetStorageIds (USBH_HandleTypeDef *phost, PTP_StorageIDsTypedef *storage_ids); 00959 00960 USBH_StatusTypeDef USBH_PTP_GetStorageInfo (USBH_HandleTypeDef *phost, 00961 uint32_t storage_id, 00962 PTP_StorageInfoTypedef *storage_info); 00963 00964 USBH_StatusTypeDef USBH_PTP_GetNumObjects (USBH_HandleTypeDef *phost, 00965 uint32_t storage_id, 00966 uint32_t objectformatcode, 00967 uint32_t associationOH, 00968 uint32_t* numobs); 00969 00970 USBH_StatusTypeDef USBH_PTP_GetObjectHandles (USBH_HandleTypeDef *phost, 00971 uint32_t storage_id, 00972 uint32_t objectformatcode, 00973 uint32_t associationOH, 00974 PTP_ObjectHandlesTypedef* objecthandles); 00975 00976 USBH_StatusTypeDef USBH_PTP_GetObjectInfo (USBH_HandleTypeDef *phost, 00977 uint32_t handle, 00978 PTP_ObjectInfoTypedef* objectinfo); 00979 00980 USBH_StatusTypeDef USBH_PTP_DeleteObject (USBH_HandleTypeDef *phost, 00981 uint32_t handle, 00982 uint32_t objectformatcode); 00983 00984 USBH_StatusTypeDef USBH_PTP_GetObject (USBH_HandleTypeDef *phost, 00985 uint32_t handle, 00986 uint8_t *object); 00987 00988 USBH_StatusTypeDef USBH_PTP_GetPartialObject(USBH_HandleTypeDef *phost, 00989 uint32_t handle, 00990 uint32_t offset, 00991 uint32_t maxbytes, uint8_t *object, 00992 uint32_t *len); 00993 00994 USBH_StatusTypeDef USBH_PTP_GetObjectPropsSupported (USBH_HandleTypeDef *phost, 00995 uint16_t ofc, 00996 uint32_t *propnum, 00997 uint16_t *props); 00998 00999 USBH_StatusTypeDef USBH_PTP_GetObjectPropDesc (USBH_HandleTypeDef *phost, 01000 uint16_t opc, 01001 uint16_t ofc, 01002 PTP_ObjectPropDescTypeDef *opd); 01003 01004 USBH_StatusTypeDef USBH_PTP_GetObjectPropList (USBH_HandleTypeDef *phost, 01005 uint32_t handle, 01006 MTP_PropertiesTypedef *pprops, 01007 uint32_t *nrofprops); 01008 01009 USBH_StatusTypeDef USBH_PTP_SendObject (USBH_HandleTypeDef *phost, 01010 uint32_t handle, 01011 uint8_t *object, 01012 uint32_t size); 01013 01014 USBH_StatusTypeDef USBH_PTP_GetDevicePropDesc (USBH_HandleTypeDef *phost, 01015 uint16_t propcode, 01016 PTP_DevicePropDescTypdef* devicepropertydesc); 01017 01018 /** 01019 * @} 01020 */ 01021 01022 #ifdef __cplusplus 01023 } 01024 #endif 01025 01026 #endif /* __USBH_MTP_PTP_H */ 01027 01028 01029 /** 01030 * @} 01031 */ 01032 01033 /** 01034 * @} 01035 */ 01036 01037 /** 01038 * @} 01039 */ 01040 01041 /** 01042 * @} 01043 */ 01044 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 01045
Generated on Tue Jul 12 2022 14:58:26 by
1.7.2