📄 pima.h
字号:
/*++
Copyright (c) 2001 Sunplus Technology Co., Ltd.
Module Name:
pima.h
Abstract:
Header file related to PIMA 15740 PTP
Environment:
Keil C51 Compiler
Revision History:
08/28/2001 Chi-Yeh Tsai created
--*/
//------------------------------------------------------------------------------
//Constant
//------------------------------------------------------------------------------
//---- PIMA 15740 Datatype Code ------
#define K_PIMATYP_UNDEF 0x0000
#define K_PIMATYP_INT8 0x0100
#define K_PIMATYP_UINT8 0x0200
#define K_PIMATYP_INT16 0x0300
#define K_PIMATYP_UINT16 0x0400
#define K_PIMATYP_INT32 0x0500
#define K_PIMATYP_UINT32 0x0600
#define K_PIMATYP_INT64 0x0700
#define K_PIMATYP_UINT64 0x0800
#define K_PIMATYP_INT128 0x0900
#define K_PIMATYP_UINT128 0x0a00
#define K_PIMATYP_AINT8 0x0140
#define K_PIMATYP_AUINT8 0x0240
#define K_PIMATYP_AINT16 0x0340
#define K_PIMATYP_AUINT16 0x0440
#define K_PIMATYP_AINT32 0x0540
#define K_PIMATYP_AUINT32 0x0640
#define K_PIMATYP_AINT64 0x0740
#define K_PIMATYP_AUINT64 0x0840
#define K_PIMATYP_AINT128 0x0940
#define K_PIMATYP_AUINT128 0x0a40
#define K_PIMATYP_STR 0xffff
//---- PIMA 15740 Operation Code ------
#define K_PIMAOPE_Undefined 0x0010
#define K_PIMAOPE_GetDeviceInfo 0x0110
#define K_PIMAOPE_OpenSession 0x0210
#define K_PIMAOPE_CloseSession 0x0310
#define K_PIMAOPE_GetStorageIDs 0x0410
#define K_PIMAOPE_GetStorageInfo 0x0510
#define K_PIMAOPE_GetNumObjects 0x0610
#define K_PIMAOPE_GetObjectHandles 0x0710
#define K_PIMAOPE_GetObjectInfo 0x0810
#define K_PIMAOPE_GetObject 0x0910
#define K_PIMAOPE_GetThumb 0x0a10
#define K_PIMAOPE_DeleteObject 0x0b10
#define K_PIMAOPE_SendObjectInfo 0x0c10
#define K_PIMAOPE_SendObject 0x0d10
#define K_PIMAOPE_InitiateCapture 0x0e10
#define K_PIMAOPE_FormatStore 0x0f10
#define K_PIMAOPE_ResetDevice 0x1010
#define K_PIMAOPE_SelfTest 0x1110
#define K_PIMAOPE_SetObjectProtection 0x1210
#define K_PIMAOPE_PowerDown 0x1310
#define K_PIMAOPE_GetDevicePropDesc 0x1410
#define K_PIMAOPE_GetDevicePropValue 0x1510
#define K_PIMAOPE_SetDevicePropValue 0x1610
#define K_PIMAOPE_ResetDevicePropValue 0x1710
#define K_PIMAOPE_TerminateOpenCapture 0x1810
#define K_PIMAOPE_MoveObject 0x1910
#define K_PIMAOPE_CopyObject 0x1a10
#define K_PIMAOPE_GetPartialObject 0x1b10
#define K_PIMAOPE_InitiateOpenCapture 0x1c10
//---- PIMA 15740 Response Code -------
#define K_PIMARES_Undefined 0x0020
#define K_PIMARES_OK 0x0120
#define K_PIMARES_GeneralError 0x0220
#define K_PIMARES_SessionNotOpen 0x0320
#define K_PIMARES_InvalidTransactionID 0x0420
#define K_PIMARES_OperationNotSupported 0x0520
#define K_PIMARES_ParameterNotSupported 0x0620
#define K_PIMARES_IncompleteTransfer 0x0720
#define K_PIMARES_InvalidStorageID 0x0820
#define K_PIMARES_InvalidObjectHandle 0x0920
#define K_PIMARES_DevicePropNotSupported 0x0a20
#define K_PIMARES_InvalidObjectFormatCode 0x0b20
#define K_PIMARES_StoreFull 0x0c20
#define K_PIMARES_ObjectWriteProtected 0x0d20
#define K_PIMARES_StoreReadOnly 0x0e20
#define K_PIMARES_AccessDenied 0x0f20
#define K_PIMARES_NoThumbnailPresent 0x1020
#define K_PIMARES_SelfTestFailed 0x1120
#define K_PIMARES_PartialDeletion 0x1220
#define K_PIMARES_StoreNotAvailable 0x1320
#define K_PIMARES_SpecByFormatUnsupported 0x1420
#define K_PIMARES_NoValidObjectInfo 0x1520
#define K_PIMARES_InvalidCodeFormat 0x1620
#define K_PIMARES_UnknownVendorCode 0x1720
#define K_PIMARES_CaptureAlreadyTerminated 0x1820
#define K_PIMARES_DeviceBusy 0x1920
#define K_PIMARES_InvalidParentObject 0x1a20
#define K_PIMARES_InvalidDevicePropFormat 0x1b20
#define K_PIMARES_InvalidDevicePropValue 0x1c20
#define K_PIMARES_InvalidParameter 0x1d20
#define K_PIMARES_SessionAlreadyOpen 0x1e20
#define K_PIMARES_TransactionCancelled 0x1f20
#define K_PIMARES_SpecOfDestinationUnsupported 0x2020
//---- PIMA 15740 Object Format Code -------
#define K_PIMAOBJ_AncillaryUndefined 0x0030
#define K_PIMAOBJ_Association 0x0130
#define K_PIMAOBJ_Script 0x0230
#define K_PIMAOBJ_Executable 0x0330
#define K_PIMAOBJ_Text 0x0430
#define K_PIMAOBJ_HTML 0x0530
#define K_PIMAOBJ_DPOF 0x0630
#define K_PIMAOBJ_AIFF 0x0730
#define K_PIMAOBJ_WAV 0x0830
#define K_PIMAOBJ_MP3 0x0930
#define K_PIMAOBJ_AVI 0x0a30
#define K_PIMAOBJ_MPEG 0x0b30
#define K_PIMAOBJ_ASF 0x0c30
#define K_PIMAOBJ_ImageUndefined0 0x0038
#define K_PIMAOBJ_EXIF_JPEG 0x0138
#define K_PIMAOBJ_TIFF_EP 0x0238
#define K_PIMAOBJ_FlashPix 0x0338
#define K_PIMAOBJ_BMP 0x0438
#define K_PIMAOBJ_CIFF 0x0538
#define K_PIMAOBJ_ImageUndefined1 0x0638
#define K_PIMAOBJ_GIF 0x0738
#define K_PIMAOBJ_JFIF 0x0838
#define K_PIMAOBJ_PCD 0x0938
#define K_PIMAOBJ_PICT 0x0a38
#define K_PIMAOBJ_PNG 0x0b38
#define K_PIMAOBJ_ImageUndefined2 0x0c38
#define K_PIMAOBJ_TIFF 0x0d38
#define K_PIMAOBJ_TIFF_IT 0x0e38
#define K_PIMAOBJ_JP2 0x0f38
#define K_PIMAOBJ_JPX 0x1038
//---- PIMA 15740 Event Code -------
#define K_PIMAEVE_Undefined 0x0040
#define K_PIMAEVE_CancelTransaction 0x0140
#define K_PIMAEVE_ObjectAdded 0x0240
#define K_PIMAEVE_ObjectRemoved 0x0340
#define K_PIMAEVE_StoreAdded 0x0440
#define K_PIMAEVE_StoreRemoved 0x0540
#define K_PIMAEVE_DevicePropChanged 0x0640
#define K_PIMAEVE_ObjectInfoChanged 0x0740
#define K_PIMAEVE_DeviceInfoChanged 0x0840
#define K_PIMAEVE_RequestObjectTransfer 0x0940
#define K_PIMAEVE_StoreFull 0x0a40
#define K_PIMAEVE_DeviceReset 0x0b40
#define K_PIMAEVE_StorageInfoChanged 0x0c40
#define K_PIMAEVE_CaptureComplete 0x0d40
#define K_PIMAEVE_UnreportedStatus 0x0e40
//---- PIMA 15740 Device Property Code -------
#define K_PIMADEV_Undefined 0x0050
#define K_PIMADEV_BatteryLevel 0x0150
#define K_PIMADEV_FunctionMode 0x0250
#define K_PIMADEV_ImageSize 0x0350
#define K_PIMADEV_CompressionSetting 0x0450
#define K_PIMADEV_WhiteBalance 0x0550
#define K_PIMADEV_RGBGain 0x0650
#define K_PIMADEV_F-Number 0x0750
#define K_PIMADEV_FocalLength 0x0850
#define K_PIMADEV_FocusDistance 0x0950
#define K_PIMADEV_FocusMode 0x0a50
#define K_PIMADEV_ExposureMeteringMode 0x0b50
#define K_PIMADEV_FlashMode 0x0c50
#define K_PIMADEV_ExposureTime 0x0d50
#define K_PIMADEV_ExposureProgramMode 0x0e50
#define K_PIMADEV_ExposureIndex 0x0f50
#define K_PIMADEV_ExposureBiasCompensation 0x1050
#define K_PIMADEV_DateTime 0x1150
#define K_PIMADEV_CaptureDelay 0x1250
#define K_PIMADEV_StillCaptureMode 0x1350
#define K_PIMADEV_Contrast 0x1450
#define K_PIMADEV_Sharpness 0x1550
#define K_PIMADEV_DigitalZoom 0x1650
#define K_PIMADEV_EffectMode 0x1750
#define K_PIMADEV_BurstNumber 0x1850
#define K_PIMADEV_BurstInterval 0x1950
#define K_PIMADEV_TimelapseNumber 0x1a50
#define K_PIMADEV_TimelapseInterval 0x1b50
#define K_PIMADEV_FocusMeteringMode 0x1c50
#define K_PIMADEV_UploadURL 0x1d50
#define K_PIMADEV_Artist 0x1e50
#define K_PIMADEV_CopyrightInfo 0x1f50
#define K_PIMADEV_All 0xffff
//------------------------------------------------------------------------------
//Type Definition
//------------------------------------------------------------------------------
typedef struct _STR0x00
{
UCHAR numChars;
} STR0x00, *PSTR0x00;
typedef struct _STR0x08
{
UCHAR numChars;
USHORT stringChars[0x08];
} STR0x08, *PSTR0x08;
typedef struct _STR0x10
{
UCHAR numChars;
USHORT stringChars[0x10];
} STR0x10, *PSTR0x10;
typedef struct _STR0x18
{
UCHAR numChars;
USHORT stringChars[0x18];
} STR0x18, *PSTR0x18;
typedef struct _STR0x20
{
UCHAR numChars;
USHORT stringChars[0x20];
} STR0x20, *PSTR0x20;
//------------------------------------------------------------------------------
//Function Prototype
//------------------------------------------------------------------------------
UCHAR PIMAOPE_GetDeviceInfo(PULONG pSize);
UCHAR PIMAOPE_OpenSession(PULONG pSize);
UCHAR PIMAOPE_CloseSession(PULONG pSize);
UCHAR PIMAOPE_GetStorageIDs(PULONG pSize);
UCHAR PIMAOPE_GetStorageInfo(PULONG pSize);
UCHAR PIMAOPE_GetNumObjects(PULONG pSize);
UCHAR PIMAOPE_GetObjectHandles(PULONG pSize);
UCHAR PIMAOPE_GetObjectInfo(PULONG pSize);
UCHAR PIMAOPE_GetObject(PULONG pSize);
UCHAR PIMAOPE_GetThumb(PULONG pSize);
UCHAR PIMAOPE_DeleteObject(PULONG pSize);
UCHAR PIMAOPE_SendObjectInfo(PULONG pSize);
UCHAR PIMAOPE_SendObject(PULONG pSize);
UCHAR PIMAOPE_InitiateCapture(PULONG pSize);
UCHAR PIMAOPE_FormatStore(PULONG pSize);
UCHAR PIMAOPE_ResetDevice(PULONG pSize);
UCHAR PIMAOPE_SelfTest(PULONG pSize);
UCHAR PIMAOPE_SetObjectProtection(PULONG pSize);
UCHAR PIMAOPE_PowerDown(PULONG pSize);
UCHAR PIMAOPE_GetDevicePropDesc(PULONG pSize);
UCHAR PIMAOPE_GetDevicePropValue(PULONG pSize);
UCHAR PIMAOPE_SetDevicePropValue(PULONG pSize);
UCHAR PIMAOPE_SetObjectProtection(PULONG pSize);
UCHAR PIMAOPE_TerminateOpenCapture(PULONG pSize);
UCHAR PIMAOPE_MoveObject(PULONG pSize);
UCHAR PIMAOPE_CopyObject(PULONG pSize);
UCHAR PIMAOPE_GetPartialObject(PULONG pSize);
UCHAR PIMAOPE_InitiateOpenCapture(PULONG pSize);
UCHAR PIMADATA_SendObjectInfo(void);
UCHAR PIMAOPE_GetBatteryLevelDesc(PULONG pSize, PUCHAR pPayload);
UCHAR PIMAOPE_GetImageSizeDesc(PULONG pSize, PUCHAR pPayload);
UCHAR PIMAOPE_GetDateTimeDesc(PULONG pSize, PUCHAR pPayload);
UCHAR PIMAOPE_GetBatteryLevelValue(PULONG pSize, PUCHAR pPayload);
UCHAR PIMAOPE_GetImageSizeValue(PULONG pSize, PUCHAR pPayload);
UCHAR PIMAOPE_GetDateTimeValue(PULONG pSize, PUCHAR pPayload);
UCHAR PIMADATA_SetDevicePropValue(void);
UCHAR PIMADATA_SetDateTimeValue(PUCHAR pPayload);
UCHAR PIMAOPE_ResetDevicePropValue(PULONG pSize);
UCHAR PIMAOPE_ResetDateTimeValue(void);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -