1*53ee8cc1Swenshuai.xi //<MStar Software> 2*53ee8cc1Swenshuai.xi //****************************************************************************** 3*53ee8cc1Swenshuai.xi // MStar Software 4*53ee8cc1Swenshuai.xi // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved. 5*53ee8cc1Swenshuai.xi // All software, firmware and related documentation herein ("MStar Software") are 6*53ee8cc1Swenshuai.xi // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by 7*53ee8cc1Swenshuai.xi // law, including, but not limited to, copyright law and international treaties. 8*53ee8cc1Swenshuai.xi // Any use, modification, reproduction, retransmission, or republication of all 9*53ee8cc1Swenshuai.xi // or part of MStar Software is expressly prohibited, unless prior written 10*53ee8cc1Swenshuai.xi // permission has been granted by MStar. 11*53ee8cc1Swenshuai.xi // 12*53ee8cc1Swenshuai.xi // By accessing, browsing and/or using MStar Software, you acknowledge that you 13*53ee8cc1Swenshuai.xi // have read, understood, and agree, to be bound by below terms ("Terms") and to 14*53ee8cc1Swenshuai.xi // comply with all applicable laws and regulations: 15*53ee8cc1Swenshuai.xi // 16*53ee8cc1Swenshuai.xi // 1. MStar shall retain any and all right, ownership and interest to MStar 17*53ee8cc1Swenshuai.xi // Software and any modification/derivatives thereof. 18*53ee8cc1Swenshuai.xi // No right, ownership, or interest to MStar Software and any 19*53ee8cc1Swenshuai.xi // modification/derivatives thereof is transferred to you under Terms. 20*53ee8cc1Swenshuai.xi // 21*53ee8cc1Swenshuai.xi // 2. You understand that MStar Software might include, incorporate or be 22*53ee8cc1Swenshuai.xi // supplied together with third party`s software and the use of MStar 23*53ee8cc1Swenshuai.xi // Software may require additional licenses from third parties. 24*53ee8cc1Swenshuai.xi // Therefore, you hereby agree it is your sole responsibility to separately 25*53ee8cc1Swenshuai.xi // obtain any and all third party right and license necessary for your use of 26*53ee8cc1Swenshuai.xi // such third party`s software. 27*53ee8cc1Swenshuai.xi // 28*53ee8cc1Swenshuai.xi // 3. MStar Software and any modification/derivatives thereof shall be deemed as 29*53ee8cc1Swenshuai.xi // MStar`s confidential information and you agree to keep MStar`s 30*53ee8cc1Swenshuai.xi // confidential information in strictest confidence and not disclose to any 31*53ee8cc1Swenshuai.xi // third party. 32*53ee8cc1Swenshuai.xi // 33*53ee8cc1Swenshuai.xi // 4. MStar Software is provided on an "AS IS" basis without warranties of any 34*53ee8cc1Swenshuai.xi // kind. Any warranties are hereby expressly disclaimed by MStar, including 35*53ee8cc1Swenshuai.xi // without limitation, any warranties of merchantability, non-infringement of 36*53ee8cc1Swenshuai.xi // intellectual property rights, fitness for a particular purpose, error free 37*53ee8cc1Swenshuai.xi // and in conformity with any international standard. You agree to waive any 38*53ee8cc1Swenshuai.xi // claim against MStar for any loss, damage, cost or expense that you may 39*53ee8cc1Swenshuai.xi // incur related to your use of MStar Software. 40*53ee8cc1Swenshuai.xi // In no event shall MStar be liable for any direct, indirect, incidental or 41*53ee8cc1Swenshuai.xi // consequential damages, including without limitation, lost of profit or 42*53ee8cc1Swenshuai.xi // revenues, lost or damage of data, and unauthorized system use. 43*53ee8cc1Swenshuai.xi // You agree that this Section 4 shall still apply without being affected 44*53ee8cc1Swenshuai.xi // even if MStar Software has been modified by MStar in accordance with your 45*53ee8cc1Swenshuai.xi // request or instruction for your use, except otherwise agreed by both 46*53ee8cc1Swenshuai.xi // parties in writing. 47*53ee8cc1Swenshuai.xi // 48*53ee8cc1Swenshuai.xi // 5. If requested, MStar may from time to time provide technical supports or 49*53ee8cc1Swenshuai.xi // services in relation with MStar Software to you for your use of 50*53ee8cc1Swenshuai.xi // MStar Software in conjunction with your or your customer`s product 51*53ee8cc1Swenshuai.xi // ("Services"). 52*53ee8cc1Swenshuai.xi // You understand and agree that, except otherwise agreed by both parties in 53*53ee8cc1Swenshuai.xi // writing, Services are provided on an "AS IS" basis and the warranty 54*53ee8cc1Swenshuai.xi // disclaimer set forth in Section 4 above shall apply. 55*53ee8cc1Swenshuai.xi // 56*53ee8cc1Swenshuai.xi // 6. Nothing contained herein shall be construed as by implication, estoppels 57*53ee8cc1Swenshuai.xi // or otherwise: 58*53ee8cc1Swenshuai.xi // (a) conferring any license or right to use MStar name, trademark, service 59*53ee8cc1Swenshuai.xi // mark, symbol or any other identification; 60*53ee8cc1Swenshuai.xi // (b) obligating MStar or any of its affiliates to furnish any person, 61*53ee8cc1Swenshuai.xi // including without limitation, you and your customers, any assistance 62*53ee8cc1Swenshuai.xi // of any kind whatsoever, or any information; or 63*53ee8cc1Swenshuai.xi // (c) conferring any license or right under any intellectual property right. 64*53ee8cc1Swenshuai.xi // 65*53ee8cc1Swenshuai.xi // 7. These terms shall be governed by and construed in accordance with the laws 66*53ee8cc1Swenshuai.xi // of Taiwan, R.O.C., excluding its conflict of law rules. 67*53ee8cc1Swenshuai.xi // Any and all dispute arising out hereof or related hereto shall be finally 68*53ee8cc1Swenshuai.xi // settled by arbitration referred to the Chinese Arbitration Association, 69*53ee8cc1Swenshuai.xi // Taipei in accordance with the ROC Arbitration Law and the Arbitration 70*53ee8cc1Swenshuai.xi // Rules of the Association by three (3) arbitrators appointed in accordance 71*53ee8cc1Swenshuai.xi // with the said Rules. 72*53ee8cc1Swenshuai.xi // The place of arbitration shall be in Taipei, Taiwan and the language shall 73*53ee8cc1Swenshuai.xi // be English. 74*53ee8cc1Swenshuai.xi // The arbitration award shall be final and binding to both parties. 75*53ee8cc1Swenshuai.xi // 76*53ee8cc1Swenshuai.xi //****************************************************************************** 77*53ee8cc1Swenshuai.xi //<MStar Software> 78*53ee8cc1Swenshuai.xi //Copyright (C) 2008 MStar All Rights Reserved. 79*53ee8cc1Swenshuai.xi 80*53ee8cc1Swenshuai.xi /*! \file drvUsbPTPLib.h 81*53ee8cc1Swenshuai.xi \brief Library for PTP functions. 82*53ee8cc1Swenshuai.xi 83*53ee8cc1Swenshuai.xi 84*53ee8cc1Swenshuai.xi \n\b History: 85*53ee8cc1Swenshuai.xi \n\b Date: 2008/8/18 86*53ee8cc1Swenshuai.xi \n\b Author: Colin Tsai 87*53ee8cc1Swenshuai.xi \n\b Reason: Create 88*53ee8cc1Swenshuai.xi \n 89*53ee8cc1Swenshuai.xi */ 90*53ee8cc1Swenshuai.xi //============================================================================= 91*53ee8cc1Swenshuai.xi 92*53ee8cc1Swenshuai.xi #ifndef DRVUSBPTPLIB_H 93*53ee8cc1Swenshuai.xi #define DRVUSBPTPLIB_H 94*53ee8cc1Swenshuai.xi 95*53ee8cc1Swenshuai.xi #include "datatype.h" 96*53ee8cc1Swenshuai.xi //#include "..\source\drvUSBHost_PTP.h" 97*53ee8cc1Swenshuai.xi 98*53ee8cc1Swenshuai.xi typedef enum PTP_OPERATION_CODE 99*53ee8cc1Swenshuai.xi { 100*53ee8cc1Swenshuai.xi PTP_UnDefined = 0x1000, 101*53ee8cc1Swenshuai.xi PTP_GetDeviceInfo, 102*53ee8cc1Swenshuai.xi PTP_OpenSession, 103*53ee8cc1Swenshuai.xi PTP_CloseSession, 104*53ee8cc1Swenshuai.xi PTP_GetStorageIDs, 105*53ee8cc1Swenshuai.xi PTP_GetStorageInfo, 106*53ee8cc1Swenshuai.xi PTP_GetNumObjects, 107*53ee8cc1Swenshuai.xi PTP_GetObjectHandles, 108*53ee8cc1Swenshuai.xi PTP_GetObjectInfo, 109*53ee8cc1Swenshuai.xi PTP_GetObject, 110*53ee8cc1Swenshuai.xi PTP_GetThumb, 111*53ee8cc1Swenshuai.xi PTP_DeleteObject, 112*53ee8cc1Swenshuai.xi PTP_SendObjectInfo, 113*53ee8cc1Swenshuai.xi PTP_SendObject, 114*53ee8cc1Swenshuai.xi PTP_InitiateCapture, 115*53ee8cc1Swenshuai.xi PTP_FormatStore, 116*53ee8cc1Swenshuai.xi PTP_ResetDevice, 117*53ee8cc1Swenshuai.xi PTP_SelfTest, 118*53ee8cc1Swenshuai.xi PTP_SetObjectProtection, 119*53ee8cc1Swenshuai.xi PTP_PowerDown, 120*53ee8cc1Swenshuai.xi PTP_GetDevicePropDesc, 121*53ee8cc1Swenshuai.xi PTP_GetDevicePropValue, 122*53ee8cc1Swenshuai.xi PTP_SetDevicePropValue, 123*53ee8cc1Swenshuai.xi PTP_ResetDevicePropValue, 124*53ee8cc1Swenshuai.xi PTP_TerminateOpenCapture, 125*53ee8cc1Swenshuai.xi PTP_MoveObject, 126*53ee8cc1Swenshuai.xi PTP_CopyObject, 127*53ee8cc1Swenshuai.xi PTP_GetPartialObject, 128*53ee8cc1Swenshuai.xi PTP_InitiateOpenCapture 129*53ee8cc1Swenshuai.xi }ePTP_OPERATION_CODE; 130*53ee8cc1Swenshuai.xi 131*53ee8cc1Swenshuai.xi enum 132*53ee8cc1Swenshuai.xi { 133*53ee8cc1Swenshuai.xi UnKnownFile, 134*53ee8cc1Swenshuai.xi JpegFile, 135*53ee8cc1Swenshuai.xi OtherFile 136*53ee8cc1Swenshuai.xi }; 137*53ee8cc1Swenshuai.xi 138*53ee8cc1Swenshuai.xi 139*53ee8cc1Swenshuai.xi enum 140*53ee8cc1Swenshuai.xi { 141*53ee8cc1Swenshuai.xi PTP_OK=0, 142*53ee8cc1Swenshuai.xi PTP_RESP_FAIL 143*53ee8cc1Swenshuai.xi 144*53ee8cc1Swenshuai.xi }; 145*53ee8cc1Swenshuai.xi 146*53ee8cc1Swenshuai.xi typedef enum PTP_OBJECTFORMATCODE 147*53ee8cc1Swenshuai.xi { 148*53ee8cc1Swenshuai.xi OBJ_UNDEFINED_NON_IMAGE = 0x3000, 149*53ee8cc1Swenshuai.xi OBJ_ASSOCIATION, 150*53ee8cc1Swenshuai.xi OBJ_SCRIPT, 151*53ee8cc1Swenshuai.xi OBJ_EXECUTABLE, 152*53ee8cc1Swenshuai.xi OBJ_TEXT, 153*53ee8cc1Swenshuai.xi OBJ_HTML, 154*53ee8cc1Swenshuai.xi OBJ_DPOF, 155*53ee8cc1Swenshuai.xi OBJ_AIFF, 156*53ee8cc1Swenshuai.xi OBJ_WAV, 157*53ee8cc1Swenshuai.xi OBJ_MP3, 158*53ee8cc1Swenshuai.xi OBJ_AVI, 159*53ee8cc1Swenshuai.xi OBJ_MPEG, 160*53ee8cc1Swenshuai.xi OBJ_ASF, 161*53ee8cc1Swenshuai.xi OBJ_UNDIFINED_IMAGE = 0x3800, 162*53ee8cc1Swenshuai.xi OBJ_JPEG, 163*53ee8cc1Swenshuai.xi OBJ_TIFF_EP, 164*53ee8cc1Swenshuai.xi OBJ_FLASHPIX, 165*53ee8cc1Swenshuai.xi OBJ_BMP, 166*53ee8cc1Swenshuai.xi OBJ_CIFF, 167*53ee8cc1Swenshuai.xi OBJ_UNDIFFINED_RESERVED_0, 168*53ee8cc1Swenshuai.xi OBJ_GIF, 169*53ee8cc1Swenshuai.xi OBJ_JFIF, 170*53ee8cc1Swenshuai.xi OBJ_PCD, 171*53ee8cc1Swenshuai.xi OBJ_PICT, 172*53ee8cc1Swenshuai.xi OBJ_PNG, 173*53ee8cc1Swenshuai.xi OBJ_UNDIFFINED_RESERVED_1, 174*53ee8cc1Swenshuai.xi OBJ_TIFF, 175*53ee8cc1Swenshuai.xi OBJ_TIFF_IT, 176*53ee8cc1Swenshuai.xi OBJ_JP2, 177*53ee8cc1Swenshuai.xi OBJ_JPX 178*53ee8cc1Swenshuai.xi 179*53ee8cc1Swenshuai.xi }ePTP_OBJECTFORMATCODE; 180*53ee8cc1Swenshuai.xi 181*53ee8cc1Swenshuai.xi typedef struct _DATETIME { 182*53ee8cc1Swenshuai.xi 183*53ee8cc1Swenshuai.xi U8 bDateTime[5]; // 5+2+2+2 = 13 bytes 184*53ee8cc1Swenshuai.xi U16 wTemp; 185*53ee8cc1Swenshuai.xi //------------------------------------------------------- 186*53ee8cc1Swenshuai.xi // bit 0- bit 4 Day (1-31) 187*53ee8cc1Swenshuai.xi // bit 5- bit 8 Month (1-12) 188*53ee8cc1Swenshuai.xi // bit 9- bit f Year relative to 1980 189*53ee8cc1Swenshuai.xi //------------------------------------------------------- 190*53ee8cc1Swenshuai.xi U16 wDate; 191*53ee8cc1Swenshuai.xi //------------------------------------------------------- 192*53ee8cc1Swenshuai.xi // bit 0- bit 4 binary numbers of 2 secs increament 0-58 193*53ee8cc1Swenshuai.xi // bit 5- bit a binary numbers of minutes 0-59 194*53ee8cc1Swenshuai.xi // bit b- bit f binary numbers of hours 0-23 195*53ee8cc1Swenshuai.xi //------------------------------------------------------- 196*53ee8cc1Swenshuai.xi U16 wTime; 197*53ee8cc1Swenshuai.xi 198*53ee8cc1Swenshuai.xi } DATETIME, *PDATETIME; 199*53ee8cc1Swenshuai.xi 200*53ee8cc1Swenshuai.xi typedef struct _PTP_OBJECTINFO 201*53ee8cc1Swenshuai.xi { 202*53ee8cc1Swenshuai.xi U16 ObjectFormat; 203*53ee8cc1Swenshuai.xi U32 ObjectCompressedSize; 204*53ee8cc1Swenshuai.xi U16 ThumbFormat; 205*53ee8cc1Swenshuai.xi U32 ThumbCompressedSize; 206*53ee8cc1Swenshuai.xi U32 ThumbPixWidth; 207*53ee8cc1Swenshuai.xi U32 ThumbPixHeight; 208*53ee8cc1Swenshuai.xi U32 ImagePixWidth; 209*53ee8cc1Swenshuai.xi U32 ImagePixHeight; 210*53ee8cc1Swenshuai.xi U32 ParentObject; 211*53ee8cc1Swenshuai.xi U16 Filename[13]; // 8 + . + 3 + null 212*53ee8cc1Swenshuai.xi struct _DATETIME sDateTime; 213*53ee8cc1Swenshuai.xi } PTP_OBJECTINFO, *PPTP_OBJECTINFO; 214*53ee8cc1Swenshuai.xi 215*53ee8cc1Swenshuai.xi //Function_Name: drvUsbPTP_GetObjectHandles( ) 216*53ee8cc1Swenshuai.xi /*! \brief Gather all object handles according to parameters passed in. 217*53ee8cc1Swenshuai.xi 218*53ee8cc1Swenshuai.xi This function will try to gather all object handles according to parameters passed in. 219*53ee8cc1Swenshuai.xi The handles are stored in memory of PTP library. 220*53ee8cc1Swenshuai.xi 221*53ee8cc1Swenshuai.xi \param u8UsbPort The USB port number. 222*53ee8cc1Swenshuai.xi 223*53ee8cc1Swenshuai.xi \param u16ObjFormat The object format code you want to get. All handles returned 224*53ee8cc1Swenshuai.xi will belong to this format. The value 0 means "Dont care" 225*53ee8cc1Swenshuai.xi 226*53ee8cc1Swenshuai.xi \param u32AssociObjHandle The associate object handle. All handles returned will 227*53ee8cc1Swenshuai.xi be its children. The value 0 means "Don't case", 228*53ee8cc1Swenshuai.xi and 0xFFFFFFFF means the "Root" 229*53ee8cc1Swenshuai.xi 230*53ee8cc1Swenshuai.xi \return The number of object handles it got. 231*53ee8cc1Swenshuai.xi */ 232*53ee8cc1Swenshuai.xi U32 drvUsbPTP_GetObjectHandles(U8 u8UsbPort, U16 u16ObjFormat, U32 u32AssociObjHandle); 233*53ee8cc1Swenshuai.xi 234*53ee8cc1Swenshuai.xi //Function_Name: drvUsbPTP_GetObjectHandleByIndex( ) 235*53ee8cc1Swenshuai.xi /*! \brief Get real object handle from PTP library memory. 236*53ee8cc1Swenshuai.xi 237*53ee8cc1Swenshuai.xi This function will try to get the real object handle from PTP library memory. It should be 238*53ee8cc1Swenshuai.xi called after the function msAPI_PTP_GetObjectHandles. 239*53ee8cc1Swenshuai.xi 240*53ee8cc1Swenshuai.xi \param u8UsbPort The USB port number. 241*53ee8cc1Swenshuai.xi 242*53ee8cc1Swenshuai.xi \param u32Index The object index you want to get. 243*53ee8cc1Swenshuai.xi 244*53ee8cc1Swenshuai.xi \return Object handle or 0xFFFFFFFF for invalid object handle. 245*53ee8cc1Swenshuai.xi */ 246*53ee8cc1Swenshuai.xi U32 drvUsbPTP_GetObjectHandleByIndex(U8 u8UsbPort, U32 u32Index); 247*53ee8cc1Swenshuai.xi 248*53ee8cc1Swenshuai.xi //Function_Name: drvUsbPTP_GetObjectInfo( ) 249*53ee8cc1Swenshuai.xi /*! \brief Get PTP object information. 250*53ee8cc1Swenshuai.xi 251*53ee8cc1Swenshuai.xi This function will try to get object information. 252*53ee8cc1Swenshuai.xi 253*53ee8cc1Swenshuai.xi \param u8UsbPort The USB port number. 254*53ee8cc1Swenshuai.xi \param u32ObjectHandle The object handle you want to get. 255*53ee8cc1Swenshuai.xi 256*53ee8cc1Swenshuai.xi \return Pointer for ObjectInfo. 257*53ee8cc1Swenshuai.xi */ 258*53ee8cc1Swenshuai.xi PTP_OBJECTINFO * drvUsbPTP_GetObjectInfo(U8 u8UsbPort, U32 u32ObjectHandle); 259*53ee8cc1Swenshuai.xi 260*53ee8cc1Swenshuai.xi //Function_Name: drvUsbPTP_GetThumb( ) 261*53ee8cc1Swenshuai.xi /*! \brief Get the thumbnail of object. 262*53ee8cc1Swenshuai.xi 263*53ee8cc1Swenshuai.xi This function will try to get the thumbnail of object. 264*53ee8cc1Swenshuai.xi 265*53ee8cc1Swenshuai.xi \param u8UsbPort The USB port number. 266*53ee8cc1Swenshuai.xi \param u32ObjectHandle The object handle you want to get. 267*53ee8cc1Swenshuai.xi \param u32Offset The start offset you want to get. 268*53ee8cc1Swenshuai.xi \param u32Length The buffer size. 269*53ee8cc1Swenshuai.xi \param u32BufAddr The buffer address. 270*53ee8cc1Swenshuai.xi 271*53ee8cc1Swenshuai.xi \return acutal thumb size it got. 272*53ee8cc1Swenshuai.xi */ 273*53ee8cc1Swenshuai.xi U32 drvUsbPTP_GetThumb(U8 u8UsbPort, U32 u32ObjectHandle, U32 u32Offset, U32 u32Length, U32 u32BufAddr); 274*53ee8cc1Swenshuai.xi 275*53ee8cc1Swenshuai.xi //Function_Name: drvUsbPTP_GetObject( ) 276*53ee8cc1Swenshuai.xi /*! \brief Get the object. 277*53ee8cc1Swenshuai.xi 278*53ee8cc1Swenshuai.xi This function will try to get content of object. 279*53ee8cc1Swenshuai.xi 280*53ee8cc1Swenshuai.xi Please follow the offset sequence to get the object data. When the u32Offset is zero, 281*53ee8cc1Swenshuai.xi PTP USB driver will issue PTP command (GetObject) to the camera , and get the first bank of data. 282*53ee8cc1Swenshuai.xi For example, if the AP has a 16K buffer to get image data, the operation sequence is as follow. 283*53ee8cc1Swenshuai.xi 1st : offset 0 , length 16K 284*53ee8cc1Swenshuai.xi 2nd: offset 16K, length 16K 285*53ee8cc1Swenshuai.xi 3rd: offset 32K, length 16K 286*53ee8cc1Swenshuai.xi .. 287*53ee8cc1Swenshuai.xi If users want to stop or issue other commands before the end of the object data stream, 288*53ee8cc1Swenshuai.xi driver has to read all data at the camera side, it may take a period of time. 289*53ee8cc1Swenshuai.xi 290*53ee8cc1Swenshuai.xi \param u8UsbPort The USB port number. 291*53ee8cc1Swenshuai.xi \param u32ObjectHandle The object handle you want to get. 292*53ee8cc1Swenshuai.xi \param u32Offset The start offset you want to get. 293*53ee8cc1Swenshuai.xi \param u32Length The size you want to get. 294*53ee8cc1Swenshuai.xi \param u32BufAddr Buffer address. 295*53ee8cc1Swenshuai.xi 296*53ee8cc1Swenshuai.xi \return acutal object size it got. 297*53ee8cc1Swenshuai.xi */ 298*53ee8cc1Swenshuai.xi U32 drvUsbPTP_GetObject(U8 u8UsbPort, U32 u32ObjectHandle, U32 u32Offset, U32 u32Length, U32 u32BufAddr); 299*53ee8cc1Swenshuai.xi 300*53ee8cc1Swenshuai.xi 301*53ee8cc1Swenshuai.xi //Function_Name: drvUsbPTP_GetObjectEnd( ) 302*53ee8cc1Swenshuai.xi /*! \brief Terminate the operation of getting object. 303*53ee8cc1Swenshuai.xi 304*53ee8cc1Swenshuai.xi This function will try to terminate the operation of getting object. 305*53ee8cc1Swenshuai.xi 306*53ee8cc1Swenshuai.xi \param u8UsbPort The USB port number. 307*53ee8cc1Swenshuai.xi \param u32ObjectHandle The object handle you want to get. 308*53ee8cc1Swenshuai.xi \param u32BufAddr The buffer address. (buffer size must be 16KB at least) 309*53ee8cc1Swenshuai.xi 310*53ee8cc1Swenshuai.xi \return none. 311*53ee8cc1Swenshuai.xi */ 312*53ee8cc1Swenshuai.xi void drvUsbPTP_GetObjectEnd(U8 u8UsbPort, U32 u32ObjectHandle, U32 u32BufAddr); 313*53ee8cc1Swenshuai.xi 314*53ee8cc1Swenshuai.xi //Function_Name: drvUsbPTP_GetError( ) 315*53ee8cc1Swenshuai.xi /*! \brief Get the error code of PTP. 316*53ee8cc1Swenshuai.xi 317*53ee8cc1Swenshuai.xi This function will try to get the error code of PTP library. 318*53ee8cc1Swenshuai.xi 319*53ee8cc1Swenshuai.xi \param u8UsbPort The USB port number. 320*53ee8cc1Swenshuai.xi 321*53ee8cc1Swenshuai.xi \return USB error code. 322*53ee8cc1Swenshuai.xi #define HOST20_OK 0x00 323*53ee8cc1Swenshuai.xi #define HOST20_FAIL 0x01 324*53ee8cc1Swenshuai.xi #define HOST20_FATAL 0x02 325*53ee8cc1Swenshuai.xi #define HOST20_DEVICE_STALL 0x03 326*53ee8cc1Swenshuai.xi #define HOST20_TRANSACTION_ERROR 0x04 327*53ee8cc1Swenshuai.xi */ 328*53ee8cc1Swenshuai.xi U8 drvUsbPTP_GetError(U8 u8UsbPort); 329*53ee8cc1Swenshuai.xi 330*53ee8cc1Swenshuai.xi #endif // #ifndef DRVUSBPTPLIB_H 331*53ee8cc1Swenshuai.xi 332