Library to allo USB PTP device to be hosted by the mbed platform
Dependents: class_project_main
PIMA15740/PIMAconst.h@0:98cf19bcd828, 2013-08-23 (annotated)
- Committer:
- jakowisp
- Date:
- Fri Aug 23 00:52:52 2013 +0000
- Revision:
- 0:98cf19bcd828
- Child:
- 1:71c0e9dc153d
Fix for a buffer overrun and refactored the Tranactoion code.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jakowisp | 0:98cf19bcd828 | 1 | /* Copyright (C) 2010-2011 Circuits At Home, LTD. All rights reserved. |
jakowisp | 0:98cf19bcd828 | 2 | |
jakowisp | 0:98cf19bcd828 | 3 | This software may be distributed and modified under the terms of the GNU |
jakowisp | 0:98cf19bcd828 | 4 | General Public License version 2 (GPL2) as published by the Free Software |
jakowisp | 0:98cf19bcd828 | 5 | Foundation and appearing in the file GPL2.TXT included in the packaging of |
jakowisp | 0:98cf19bcd828 | 6 | this file. Please note that GPL2 Section 2[b] requires that all works based |
jakowisp | 0:98cf19bcd828 | 7 | on this software must also be made publicly available under the terms of |
jakowisp | 0:98cf19bcd828 | 8 | the GPL2 ("Copyleft"). |
jakowisp | 0:98cf19bcd828 | 9 | |
jakowisp | 0:98cf19bcd828 | 10 | Contact information |
jakowisp | 0:98cf19bcd828 | 11 | ------------------- |
jakowisp | 0:98cf19bcd828 | 12 | |
jakowisp | 0:98cf19bcd828 | 13 | Circuits At Home, LTD |
jakowisp | 0:98cf19bcd828 | 14 | Web : http://www.circuitsathome.com |
jakowisp | 0:98cf19bcd828 | 15 | e-mail : support@circuitsathome.com |
jakowisp | 0:98cf19bcd828 | 16 | */ |
jakowisp | 0:98cf19bcd828 | 17 | #ifndef __PTPCONST_H__ |
jakowisp | 0:98cf19bcd828 | 18 | #define __PTPCONST_H__ |
jakowisp | 0:98cf19bcd828 | 19 | |
jakowisp | 0:98cf19bcd828 | 20 | #include <inttypes.h> |
jakowisp | 0:98cf19bcd828 | 21 | |
jakowisp | 0:98cf19bcd828 | 22 | /* PTP USB Bulk-Pipe container */ |
jakowisp | 0:98cf19bcd828 | 23 | /* USB bulk max max packet length for full speed endpoints */ |
jakowisp | 0:98cf19bcd828 | 24 | //#define PTP_USB_BULK_FS_MAX_PACKET_LEN 64 |
jakowisp | 0:98cf19bcd828 | 25 | //#define PTP_USB_BULK_HDR_LEN (2*sizeof(uint32_t)+2*sizeof(uint16_t)) |
jakowisp | 0:98cf19bcd828 | 26 | //#define PTP_USB_BULK_PAYLOAD_LEN (PTP_USB_BULK_FS_MAX_PACKET_LEN-PTP_USB_BULK_HDR_LEN) |
jakowisp | 0:98cf19bcd828 | 27 | //#define PTP_USB_BULK_REQ_LEN (PTP_USB_BULK_HDR_LEN+5*sizeof(uint32_t)) |
jakowisp | 0:98cf19bcd828 | 28 | |
jakowisp | 0:98cf19bcd828 | 29 | #define PIMAContainerHeaderLength 0xc |
jakowisp | 0:98cf19bcd828 | 30 | |
jakowisp | 0:98cf19bcd828 | 31 | |
jakowisp | 0:98cf19bcd828 | 32 | #define PTP_USB_INT_PACKET_LEN 8 |
jakowisp | 0:98cf19bcd828 | 33 | |
jakowisp | 0:98cf19bcd828 | 34 | /* USB container types */ |
jakowisp | 0:98cf19bcd828 | 35 | #define PTP_USB_CONTAINER_UNDEFINED 0x0000 |
jakowisp | 0:98cf19bcd828 | 36 | #define PTP_USB_CONTAINER_COMMAND 0x0001 |
jakowisp | 0:98cf19bcd828 | 37 | #define PTP_USB_CONTAINER_DATA 0x0002 |
jakowisp | 0:98cf19bcd828 | 38 | #define PTP_USB_CONTAINER_RESPONSE 0x0003 |
jakowisp | 0:98cf19bcd828 | 39 | #define PTP_USB_CONTAINER_EVENT 0x0004 |
jakowisp | 0:98cf19bcd828 | 40 | |
jakowisp | 0:98cf19bcd828 | 41 | /* Vendor IDs */ |
jakowisp | 0:98cf19bcd828 | 42 | #define PTP_VENDOR_EASTMAN_KODAK 0x00000001 |
jakowisp | 0:98cf19bcd828 | 43 | #define PTP_VENDOR_SEIKO_EPSON 0x00000002 |
jakowisp | 0:98cf19bcd828 | 44 | #define PTP_VENDOR_AGILENT 0x00000003 |
jakowisp | 0:98cf19bcd828 | 45 | #define PTP_VENDOR_POLAROID 0x00000004 |
jakowisp | 0:98cf19bcd828 | 46 | #define PTP_VENDOR_AGFA_GEVAERT 0x00000005 |
jakowisp | 0:98cf19bcd828 | 47 | #define PTP_VENDOR_MICROSOFT 0x00000006 |
jakowisp | 0:98cf19bcd828 | 48 | #define PTP_VENDOR_EQUINOX 0x00000007 |
jakowisp | 0:98cf19bcd828 | 49 | #define PTP_VENDOR_VIEWQUEST 0x00000008 |
jakowisp | 0:98cf19bcd828 | 50 | #define PTP_VENDOR_STMICROELECTRONICS 0x00000009 |
jakowisp | 0:98cf19bcd828 | 51 | #define PTP_VENDOR_NIKON 0x0000000A |
jakowisp | 0:98cf19bcd828 | 52 | #define PTP_VENDOR_CANON 0x0000000B |
jakowisp | 0:98cf19bcd828 | 53 | #define PTP_VENDOR_FOTONATION 0x0000000C |
jakowisp | 0:98cf19bcd828 | 54 | #define PTP_VENDOR_PENTAX 0x0000000D |
jakowisp | 0:98cf19bcd828 | 55 | #define PTP_VENDOR_FUJI 0x0000000E |
jakowisp | 0:98cf19bcd828 | 56 | |
jakowisp | 0:98cf19bcd828 | 57 | /* Operation Codes */ |
jakowisp | 0:98cf19bcd828 | 58 | #define PTP_OC_Undefined 0x1000 |
jakowisp | 0:98cf19bcd828 | 59 | #define PTP_OC_GetDeviceInfo 0x1001 |
jakowisp | 0:98cf19bcd828 | 60 | #define PTP_OC_OpenSession 0x1002 |
jakowisp | 0:98cf19bcd828 | 61 | #define PTP_OC_CloseSession 0x1003 |
jakowisp | 0:98cf19bcd828 | 62 | #define PTP_OC_GetStorageIDs 0x1004 |
jakowisp | 0:98cf19bcd828 | 63 | #define PTP_OC_GetStorageInfo 0x1005 |
jakowisp | 0:98cf19bcd828 | 64 | #define PTP_OC_GetNumObjects 0x1006 |
jakowisp | 0:98cf19bcd828 | 65 | #define PTP_OC_GetObjectHandles 0x1007 |
jakowisp | 0:98cf19bcd828 | 66 | #define PTP_OC_GetObjectInfo 0x1008 |
jakowisp | 0:98cf19bcd828 | 67 | #define PTP_OC_GetObject 0x1009 |
jakowisp | 0:98cf19bcd828 | 68 | #define PTP_OC_GetThumb 0x100A |
jakowisp | 0:98cf19bcd828 | 69 | #define PTP_OC_DeleteObject 0x100B |
jakowisp | 0:98cf19bcd828 | 70 | #define PTP_OC_SendObjectInfo 0x100C |
jakowisp | 0:98cf19bcd828 | 71 | #define PTP_OC_SendObject 0x100D |
jakowisp | 0:98cf19bcd828 | 72 | #define PTP_OC_InitiateCapture 0x100E |
jakowisp | 0:98cf19bcd828 | 73 | #define PTP_OC_FormatStore 0x100F |
jakowisp | 0:98cf19bcd828 | 74 | #define PTP_OC_ResetDevice 0x1010 |
jakowisp | 0:98cf19bcd828 | 75 | #define PTP_OC_SelfTest 0x1011 |
jakowisp | 0:98cf19bcd828 | 76 | #define PTP_OC_SetObjectProtection 0x1012 |
jakowisp | 0:98cf19bcd828 | 77 | #define PTP_OC_PowerDown 0x1013 |
jakowisp | 0:98cf19bcd828 | 78 | #define PTP_OC_GetDevicePropDesc 0x1014 |
jakowisp | 0:98cf19bcd828 | 79 | #define PTP_OC_GetDevicePropValue 0x1015 |
jakowisp | 0:98cf19bcd828 | 80 | #define PTP_OC_SetDevicePropValue 0x1016 |
jakowisp | 0:98cf19bcd828 | 81 | #define PTP_OC_ResetDevicePropValue 0x1017 |
jakowisp | 0:98cf19bcd828 | 82 | #define PTP_OC_TerminateOpenCapture 0x1018 |
jakowisp | 0:98cf19bcd828 | 83 | #define PTP_OC_MoveObject 0x1019 |
jakowisp | 0:98cf19bcd828 | 84 | #define PTP_OC_CopyObject 0x101A |
jakowisp | 0:98cf19bcd828 | 85 | #define PTP_OC_GetPartialObject 0x101B |
jakowisp | 0:98cf19bcd828 | 86 | #define PTP_OC_InitiateOpenCapture 0x101C |
jakowisp | 0:98cf19bcd828 | 87 | |
jakowisp | 0:98cf19bcd828 | 88 | /* Proprietary vendor extension operations mask */ |
jakowisp | 0:98cf19bcd828 | 89 | #define PTP_OC_EXTENSION_MASK 0xF000 |
jakowisp | 0:98cf19bcd828 | 90 | #define PTP_OC_EXTENSION 0x9000 |
jakowisp | 0:98cf19bcd828 | 91 | |
jakowisp | 0:98cf19bcd828 | 92 | /* Response Codes */ |
jakowisp | 0:98cf19bcd828 | 93 | #define PIMAReturnCodeUndefined 0x2000 |
jakowisp | 0:98cf19bcd828 | 94 | #define PIMAReturnCodeOK 0x2001 |
jakowisp | 0:98cf19bcd828 | 95 | #define PIMAReturnCodeGeneralError 0x2002 |
jakowisp | 0:98cf19bcd828 | 96 | #define PIMAReturnCodeSessionNotOpen 0x2003 |
jakowisp | 0:98cf19bcd828 | 97 | #define PIMAReturnCodeInvalidTransactionID 0x2004 |
jakowisp | 0:98cf19bcd828 | 98 | #define PIMAReturnCodeOperationNotSupported 0x2005 |
jakowisp | 0:98cf19bcd828 | 99 | #define PIMAReturnCodeParameterNotSupported 0x2006 |
jakowisp | 0:98cf19bcd828 | 100 | #define PIMAReturnCodeIncompleteTransfer 0x2007 |
jakowisp | 0:98cf19bcd828 | 101 | #define PIMAReturnCodeInvalidStorageId 0x2008 |
jakowisp | 0:98cf19bcd828 | 102 | #define PIMAReturnCodeInvalidObjectHandle 0x2009 |
jakowisp | 0:98cf19bcd828 | 103 | #define PIMAReturnCodeDevicePropertyNotSupported 0x200A |
jakowisp | 0:98cf19bcd828 | 104 | #define PIMAReturnCodeInvalidObjectFormatCode 0x200B |
jakowisp | 0:98cf19bcd828 | 105 | #define PIMAReturnCodeStoreFull 0x200C |
jakowisp | 0:98cf19bcd828 | 106 | #define PIMAReturnCodeObjectWriteProtected 0x200D |
jakowisp | 0:98cf19bcd828 | 107 | #define PIMAReturnCodeStoreReadOnly 0x200E |
jakowisp | 0:98cf19bcd828 | 108 | #define PIMAReturnCodeAccessDenied 0x200F |
jakowisp | 0:98cf19bcd828 | 109 | #define PIMAReturnCodeNoThumbnailPresent 0x2010 |
jakowisp | 0:98cf19bcd828 | 110 | #define PIMAReturnCodeSelfTestFailed 0x2011 |
jakowisp | 0:98cf19bcd828 | 111 | #define PIMAReturnCodePartialDeletion 0x2012 |
jakowisp | 0:98cf19bcd828 | 112 | #define PIMAReturnCodeStoreNotAvailable 0x2013 |
jakowisp | 0:98cf19bcd828 | 113 | #define PIMAReturnCodeSpecificationByFormatUnsupported 0x2014 |
jakowisp | 0:98cf19bcd828 | 114 | #define PIMAReturnCodeNoValidObjectInfo 0x2015 |
jakowisp | 0:98cf19bcd828 | 115 | #define PIMAReturnCodeInvalidCodeFormat 0x2016 |
jakowisp | 0:98cf19bcd828 | 116 | #define PIMAReturnCodeUnknownVendorCode 0x2017 |
jakowisp | 0:98cf19bcd828 | 117 | #define PIMAReturnCodeCaptureAlreadyTerminated 0x2018 |
jakowisp | 0:98cf19bcd828 | 118 | #define PIMAReturnCodeDeviceBusy 0x2019 |
jakowisp | 0:98cf19bcd828 | 119 | #define PIMAReturnCodeInvalidParentObject 0x201A |
jakowisp | 0:98cf19bcd828 | 120 | #define PIMAReturnCodeInvalidDevicePropFormat 0x201B |
jakowisp | 0:98cf19bcd828 | 121 | #define PIMAReturnCodeInvalidDevicePropValue 0x201C |
jakowisp | 0:98cf19bcd828 | 122 | #define PIMAReturnCodeInvalidParameter 0x201D |
jakowisp | 0:98cf19bcd828 | 123 | #define PIMAReturnCodeSessionAlreadyOpened 0x201E |
jakowisp | 0:98cf19bcd828 | 124 | #define PIMAReturnCodeTransactionCanceled 0x201F |
jakowisp | 0:98cf19bcd828 | 125 | #define PIMAReturnCodeSpecificationOfDestinationUnsupported 0x2020 |
jakowisp | 0:98cf19bcd828 | 126 | |
jakowisp | 0:98cf19bcd828 | 127 | /* Proprietary vendor extension response code mask */ |
jakowisp | 0:98cf19bcd828 | 128 | #define PIMAReturnCodeEXTENSION_MASK 0xF000 |
jakowisp | 0:98cf19bcd828 | 129 | #define PIMAReturnCodeEXTENSION 0xA000 |
jakowisp | 0:98cf19bcd828 | 130 | |
jakowisp | 0:98cf19bcd828 | 131 | /* PTP Event Codes */ |
jakowisp | 0:98cf19bcd828 | 132 | #define PTP_EC_Undefined 0x4000 |
jakowisp | 0:98cf19bcd828 | 133 | #define PTP_EC_CancelTransaction 0x4001 |
jakowisp | 0:98cf19bcd828 | 134 | #define PTP_EC_ObjectAdded 0x4002 |
jakowisp | 0:98cf19bcd828 | 135 | #define PTP_EC_ObjectRemoved 0x4003 |
jakowisp | 0:98cf19bcd828 | 136 | #define PTP_EC_StoreAdded 0x4004 |
jakowisp | 0:98cf19bcd828 | 137 | #define PTP_EC_StoreRemoved 0x4005 |
jakowisp | 0:98cf19bcd828 | 138 | #define PTP_EC_DevicePropChanged 0x4006 |
jakowisp | 0:98cf19bcd828 | 139 | #define PTP_EC_ObjectInfoChanged 0x4007 |
jakowisp | 0:98cf19bcd828 | 140 | #define PTP_EC_DeviceInfoChanged 0x4008 |
jakowisp | 0:98cf19bcd828 | 141 | #define PTP_EC_RequestObjectTransfer 0x4009 |
jakowisp | 0:98cf19bcd828 | 142 | #define PTP_EC_StoreFull 0x400A |
jakowisp | 0:98cf19bcd828 | 143 | #define PTP_EC_DeviceReset 0x400B |
jakowisp | 0:98cf19bcd828 | 144 | #define PTP_EC_StorageInfoChanged 0x400C |
jakowisp | 0:98cf19bcd828 | 145 | #define PTP_EC_CaptureComplete 0x400D |
jakowisp | 0:98cf19bcd828 | 146 | #define PTP_EC_UnreportedStatus 0x400E |
jakowisp | 0:98cf19bcd828 | 147 | |
jakowisp | 0:98cf19bcd828 | 148 | #define PTP_HANDLER_SPECIAL 0xffffffff |
jakowisp | 0:98cf19bcd828 | 149 | #define PTP_HANDLER_ROOT 0x00000000 |
jakowisp | 0:98cf19bcd828 | 150 | |
jakowisp | 0:98cf19bcd828 | 151 | /* max ptp string length INCLUDING terminating null character */ |
jakowisp | 0:98cf19bcd828 | 152 | #define PTP_MAXSTRLEN 255 |
jakowisp | 0:98cf19bcd828 | 153 | |
jakowisp | 0:98cf19bcd828 | 154 | /* PTP Object Format Codes */ |
jakowisp | 0:98cf19bcd828 | 155 | |
jakowisp | 0:98cf19bcd828 | 156 | /* ancillary formats */ |
jakowisp | 0:98cf19bcd828 | 157 | #define PTP_OFC_Undefined 0x3000 |
jakowisp | 0:98cf19bcd828 | 158 | #define PTP_OFC_Association 0x3001 |
jakowisp | 0:98cf19bcd828 | 159 | #define PTP_OFC_Script 0x3002 |
jakowisp | 0:98cf19bcd828 | 160 | #define PTP_OFC_Executable 0x3003 |
jakowisp | 0:98cf19bcd828 | 161 | #define PTP_OFC_Text 0x3004 |
jakowisp | 0:98cf19bcd828 | 162 | #define PTP_OFC_HTML 0x3005 |
jakowisp | 0:98cf19bcd828 | 163 | #define PTP_OFC_DPOF 0x3006 |
jakowisp | 0:98cf19bcd828 | 164 | #define PTP_OFC_AIFF 0x3007 |
jakowisp | 0:98cf19bcd828 | 165 | #define PTP_OFC_WAV 0x3008 |
jakowisp | 0:98cf19bcd828 | 166 | #define PTP_OFC_MP3 0x3009 |
jakowisp | 0:98cf19bcd828 | 167 | #define PTP_OFC_AVI 0x300A |
jakowisp | 0:98cf19bcd828 | 168 | #define PTP_OFC_MPEG 0x300B |
jakowisp | 0:98cf19bcd828 | 169 | #define PTP_OFC_ASF 0x300C |
jakowisp | 0:98cf19bcd828 | 170 | #define PTP_OFC_QT 0x300D /* guessing */ |
jakowisp | 0:98cf19bcd828 | 171 | |
jakowisp | 0:98cf19bcd828 | 172 | /* image formats */ |
jakowisp | 0:98cf19bcd828 | 173 | #define PTP_OFC_EXIF_JPEG 0x3801 |
jakowisp | 0:98cf19bcd828 | 174 | #define PTP_OFC_TIFF_EP 0x3802 |
jakowisp | 0:98cf19bcd828 | 175 | #define PTP_OFC_FlashPix 0x3803 |
jakowisp | 0:98cf19bcd828 | 176 | #define PTP_OFC_BMP 0x3804 |
jakowisp | 0:98cf19bcd828 | 177 | #define PTP_OFC_CIFF 0x3805 |
jakowisp | 0:98cf19bcd828 | 178 | #define PTP_OFC_Undefined_0x3806 0x3806 |
jakowisp | 0:98cf19bcd828 | 179 | #define PTP_OFC_GIF 0x3807 |
jakowisp | 0:98cf19bcd828 | 180 | #define PTP_OFC_JFIF 0x3808 |
jakowisp | 0:98cf19bcd828 | 181 | #define PTP_OFC_PCD 0x3809 |
jakowisp | 0:98cf19bcd828 | 182 | #define PTP_OFC_PICT 0x380A |
jakowisp | 0:98cf19bcd828 | 183 | #define PTP_OFC_PNG 0x380B |
jakowisp | 0:98cf19bcd828 | 184 | #define PTP_OFC_Undefined_0x380C 0x380C |
jakowisp | 0:98cf19bcd828 | 185 | #define PTP_OFC_TIFF 0x380D |
jakowisp | 0:98cf19bcd828 | 186 | #define PTP_OFC_TIFF_IT 0x380E |
jakowisp | 0:98cf19bcd828 | 187 | #define PTP_OFC_JP2 0x380F |
jakowisp | 0:98cf19bcd828 | 188 | #define PTP_OFC_JPX 0x3810 |
jakowisp | 0:98cf19bcd828 | 189 | |
jakowisp | 0:98cf19bcd828 | 190 | /* PTP Association Types */ |
jakowisp | 0:98cf19bcd828 | 191 | #define PTP_AT_Undefined 0x0000 |
jakowisp | 0:98cf19bcd828 | 192 | #define PTP_AT_GenericFolder 0x0001 |
jakowisp | 0:98cf19bcd828 | 193 | #define PTP_AT_Album 0x0002 |
jakowisp | 0:98cf19bcd828 | 194 | #define PTP_AT_TimeSequence 0x0003 |
jakowisp | 0:98cf19bcd828 | 195 | #define PTP_AT_HorizontalPanoramic 0x0004 |
jakowisp | 0:98cf19bcd828 | 196 | #define PTP_AT_VerticalPanoramic 0x0005 |
jakowisp | 0:98cf19bcd828 | 197 | #define PTP_AT_2DPanoramic 0x0006 |
jakowisp | 0:98cf19bcd828 | 198 | #define PTP_AT_AncillaryData 0x0007 |
jakowisp | 0:98cf19bcd828 | 199 | |
jakowisp | 0:98cf19bcd828 | 200 | /* PTP Protection Status */ |
jakowisp | 0:98cf19bcd828 | 201 | #define PTP_PS_NoProtection 0x0000 |
jakowisp | 0:98cf19bcd828 | 202 | #define PTP_PS_ReadOnly 0x0001 |
jakowisp | 0:98cf19bcd828 | 203 | |
jakowisp | 0:98cf19bcd828 | 204 | /* PTP Storage Types */ |
jakowisp | 0:98cf19bcd828 | 205 | #define PTP_ST_Undefined 0x0000 |
jakowisp | 0:98cf19bcd828 | 206 | #define PTP_ST_FixedROM 0x0001 |
jakowisp | 0:98cf19bcd828 | 207 | #define PTP_ST_RemovableROM 0x0002 |
jakowisp | 0:98cf19bcd828 | 208 | #define PTP_ST_FixedRAM 0x0003 |
jakowisp | 0:98cf19bcd828 | 209 | #define PTP_ST_RemovableRAM 0x0004 |
jakowisp | 0:98cf19bcd828 | 210 | |
jakowisp | 0:98cf19bcd828 | 211 | /* PTP FilesystemType Values */ |
jakowisp | 0:98cf19bcd828 | 212 | #define PTP_FST_Undefined 0x0000 |
jakowisp | 0:98cf19bcd828 | 213 | #define PTP_FST_GenericFlat 0x0001 |
jakowisp | 0:98cf19bcd828 | 214 | #define PTP_FST_GenericHierarchical 0x0002 |
jakowisp | 0:98cf19bcd828 | 215 | #define PTP_FST_DCF 0x0003 |
jakowisp | 0:98cf19bcd828 | 216 | |
jakowisp | 0:98cf19bcd828 | 217 | /* PTP StorageInfo AccessCapability Values */ |
jakowisp | 0:98cf19bcd828 | 218 | #define PTP_AC_ReadWrite 0x0000 |
jakowisp | 0:98cf19bcd828 | 219 | #define PTP_AC_ReadOnly 0x0001 |
jakowisp | 0:98cf19bcd828 | 220 | #define PTP_AC_ReadOnly_with_Object_Deletion 0x0002 |
jakowisp | 0:98cf19bcd828 | 221 | |
jakowisp | 0:98cf19bcd828 | 222 | /* DataType Codes */ |
jakowisp | 0:98cf19bcd828 | 223 | #define PTP_DTC_UNDEF 0x0000 |
jakowisp | 0:98cf19bcd828 | 224 | #define PTP_DTC_INT8 0x0001 |
jakowisp | 0:98cf19bcd828 | 225 | #define PTP_DTC_UINT8 0x0002 |
jakowisp | 0:98cf19bcd828 | 226 | #define PTP_DTC_INT16 0x0003 |
jakowisp | 0:98cf19bcd828 | 227 | #define PTP_DTC_UINT16 0x0004 |
jakowisp | 0:98cf19bcd828 | 228 | #define PTP_DTC_INT32 0x0005 |
jakowisp | 0:98cf19bcd828 | 229 | #define PTP_DTC_UINT32 0x0006 |
jakowisp | 0:98cf19bcd828 | 230 | #define PTP_DTC_INT64 0x0007 |
jakowisp | 0:98cf19bcd828 | 231 | #define PTP_DTC_UINT64 0x0008 |
jakowisp | 0:98cf19bcd828 | 232 | #define PTP_DTC_INT128 0x0009 |
jakowisp | 0:98cf19bcd828 | 233 | #define PTP_DTC_UINT128 0x000A |
jakowisp | 0:98cf19bcd828 | 234 | #define PTP_DTC_AINT8 0x4001 |
jakowisp | 0:98cf19bcd828 | 235 | #define PTP_DTC_AUINT8 0x4002 |
jakowisp | 0:98cf19bcd828 | 236 | #define PTP_DTC_AINT16 0x4003 |
jakowisp | 0:98cf19bcd828 | 237 | #define PTP_DTC_AUINT16 0x4004 |
jakowisp | 0:98cf19bcd828 | 238 | #define PTP_DTC_AINT32 0x4005 |
jakowisp | 0:98cf19bcd828 | 239 | #define PTP_DTC_AUINT32 0x4006 |
jakowisp | 0:98cf19bcd828 | 240 | #define PTP_DTC_AINT64 0x4007 |
jakowisp | 0:98cf19bcd828 | 241 | #define PTP_DTC_AUINT64 0x4008 |
jakowisp | 0:98cf19bcd828 | 242 | #define PTP_DTC_AINT128 0x4009 |
jakowisp | 0:98cf19bcd828 | 243 | #define PTP_DTC_AUINT128 0x400A |
jakowisp | 0:98cf19bcd828 | 244 | #define PTP_DTC_STR 0xFFFF |
jakowisp | 0:98cf19bcd828 | 245 | |
jakowisp | 0:98cf19bcd828 | 246 | /* Device Properties Codes */ |
jakowisp | 0:98cf19bcd828 | 247 | #define PTP_DPC_Undefined 0x5000 |
jakowisp | 0:98cf19bcd828 | 248 | #define PTP_DPC_BatteryLevel 0x5001 |
jakowisp | 0:98cf19bcd828 | 249 | #define PTP_DPC_FunctionalMode 0x5002 |
jakowisp | 0:98cf19bcd828 | 250 | #define PTP_DPC_ImageSize 0x5003 |
jakowisp | 0:98cf19bcd828 | 251 | #define PTP_DPC_CompressionSetting 0x5004 |
jakowisp | 0:98cf19bcd828 | 252 | #define PTP_DPC_WhiteBalance 0x5005 |
jakowisp | 0:98cf19bcd828 | 253 | #define PTP_DPC_RGBGain 0x5006 |
jakowisp | 0:98cf19bcd828 | 254 | #define PTP_DPC_FNumber 0x5007 |
jakowisp | 0:98cf19bcd828 | 255 | #define PTP_DPC_FocalLength 0x5008 |
jakowisp | 0:98cf19bcd828 | 256 | #define PTP_DPC_FocusDistance 0x5009 |
jakowisp | 0:98cf19bcd828 | 257 | #define PTP_DPC_FocusMode 0x500A |
jakowisp | 0:98cf19bcd828 | 258 | #define PTP_DPC_ExposureMeteringMode 0x500B |
jakowisp | 0:98cf19bcd828 | 259 | #define PTP_DPC_FlashMode 0x500C |
jakowisp | 0:98cf19bcd828 | 260 | #define PTP_DPC_ExposureTime 0x500D |
jakowisp | 0:98cf19bcd828 | 261 | #define PTP_DPC_ExposureProgramMode 0x500E |
jakowisp | 0:98cf19bcd828 | 262 | #define PTP_DPC_ExposureIndex 0x500F |
jakowisp | 0:98cf19bcd828 | 263 | #define PTP_DPC_ExposureBiasCompensation 0x5010 |
jakowisp | 0:98cf19bcd828 | 264 | #define PTP_DPC_DateTime 0x5011 |
jakowisp | 0:98cf19bcd828 | 265 | #define PTP_DPC_CaptureDelay 0x5012 |
jakowisp | 0:98cf19bcd828 | 266 | #define PTP_DPC_StillCaptureMode 0x5013 |
jakowisp | 0:98cf19bcd828 | 267 | #define PTP_DPC_Contrast 0x5014 |
jakowisp | 0:98cf19bcd828 | 268 | #define PTP_DPC_Sharpness 0x5015 |
jakowisp | 0:98cf19bcd828 | 269 | #define PTP_DPC_DigitalZoom 0x5016 |
jakowisp | 0:98cf19bcd828 | 270 | #define PTP_DPC_EffectMode 0x5017 |
jakowisp | 0:98cf19bcd828 | 271 | #define PTP_DPC_BurstNumber 0x5018 |
jakowisp | 0:98cf19bcd828 | 272 | #define PTP_DPC_BurstInterval 0x5019 |
jakowisp | 0:98cf19bcd828 | 273 | #define PTP_DPC_TimelapseNumber 0x501A |
jakowisp | 0:98cf19bcd828 | 274 | #define PTP_DPC_TimelapseInterval 0x501B |
jakowisp | 0:98cf19bcd828 | 275 | #define PTP_DPC_FocusMeteringMode 0x501C |
jakowisp | 0:98cf19bcd828 | 276 | #define PTP_DPC_UploadURL 0x501D |
jakowisp | 0:98cf19bcd828 | 277 | #define PTP_DPC_Artist 0x501E |
jakowisp | 0:98cf19bcd828 | 278 | #define PTP_DPC_CopyrightInfo 0x501F |
jakowisp | 0:98cf19bcd828 | 279 | |
jakowisp | 0:98cf19bcd828 | 280 | /* Proprietary vendor extension device property mask */ |
jakowisp | 0:98cf19bcd828 | 281 | #define PTP_DPC_EXTENSION_MASK 0xF000 |
jakowisp | 0:98cf19bcd828 | 282 | #define PTP_DPC_EXTENSION 0xD000 |
jakowisp | 0:98cf19bcd828 | 283 | |
jakowisp | 0:98cf19bcd828 | 284 | /* Device Property Form Flag */ |
jakowisp | 0:98cf19bcd828 | 285 | #define PTP_DPFF_None 0x00 |
jakowisp | 0:98cf19bcd828 | 286 | #define PTP_DPFF_Range 0x01 |
jakowisp | 0:98cf19bcd828 | 287 | #define PTP_DPFF_Enumeration 0x02 |
jakowisp | 0:98cf19bcd828 | 288 | |
jakowisp | 0:98cf19bcd828 | 289 | /* Device Property GetSet type */ |
jakowisp | 0:98cf19bcd828 | 290 | #define PTP_DPGS_Get 0x00 |
jakowisp | 0:98cf19bcd828 | 291 | #define PTP_DPGS_GetSet 0x01 |
jakowisp | 0:98cf19bcd828 | 292 | |
jakowisp | 0:98cf19bcd828 | 293 | #endif //__PTPCONST_H__ |