⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pimadata.h

📁 dz3000_51.0.0.4.rar
💻 H
字号:
/*++

Copyright (c) 2001 Sunplus Technology Co., Ltd.

Module Name:

        pimadata.h

Abstract:

        Header file related to PIMA 15740 PTP data

Environment:

        Keil C51 Compiler

Revision History:

        08/28/2001      Chi-Yeh Tsai    created                 

--*/

//------------------------------------------------------------------------------
//Constant and Type
//------------------------------------------------------------------------------

//-------------------------------------
//DeviceInfo
//-------------------------------------
//Field existence
#define PIMA_OPERATIONS                         1
#define PIMA_EVENTS                             0
#define PIMA_DEVICE_PROPERTIES                  1
#define PIMA_CAPTURE_FORMATS                    0
#define PIMA_IMAGE_FORMATS                      1

//Field definition
#define K_PIMADATA_StandardVersion              0x6400          //1.00
#define K_PIMADATA_VendorExtensionID            0x00000000      //no extesnions
#define K_PIMADATA_VendorExtensionVersion       0x6400          //1.00
#define K_PIMADATA_FunctionalMode               0x0000          //standard mode

#if (PIMA_OPERATIONS)
#define K_PIMADATA_OperationsSupportedSize      0x00000010      //size of operation supported
code    USHORT  K_PIMADATA_OperationsSupported[K_PIMADATA_OperationsSupportedSize] =
{
        K_PIMAOPE_GetDeviceInfo,                //0x0110
        K_PIMAOPE_OpenSession,                  //0x0210
        K_PIMAOPE_CloseSession,                 //0x0310
        K_PIMAOPE_GetStorageIDs,                //0x0410
        K_PIMAOPE_GetStorageInfo,               //0x0510
        K_PIMAOPE_GetNumObjects,                //0x0610
        K_PIMAOPE_GetObjectHandles,             //0x0710
        K_PIMAOPE_GetObjectInfo,                //0x0810
        K_PIMAOPE_GetObject,                    //0x0910
        K_PIMAOPE_GetThumb,                     //0x0a10 
        K_PIMAOPE_DeleteObject,                 //0x0b10
        K_PIMAOPE_GetDevicePropDesc,            //0x1410
        K_PIMAOPE_GetDevicePropValue,           //0x1510
        K_PIMAOPE_SetDevicePropValue,           //0x1610
        K_PIMAOPE_ResetDevicePropValue,         //0x1710
        K_PIMAOPE_GetPartialObject,             //0x1b10
};
#else
#define K_PIMADATA_OperationSupportedSize       0x00000000      //size of operation supported
#endif

#if (PIMA_EVENTS)
#define K_PIMADATA_EventsSupportedSize          0x00000001      //size of events supported
code    USHORT  K_PIMADATA_EventsSupported[K_PIMADATA_EventsSupportedSize] =
{
        K_PIMAEVE_CancelTransaction,            //0x0140
};
#else
#define K_PIMADATA_EventsSupportedSize          0x00000000      //size of events supported
#endif

#if (PIMA_DEVICE_PROPERTIES)
#define K_PIMADATA_DevicePropertiesSupportedSize 0x00000003     //size of device properties supported
code    USHORT  K_PIMADATA_DevicePropertiesSupported[K_PIMADATA_DevicePropertiesSupportedSize] =
{
        K_PIMADEV_BatteryLevel,                 //0x0150
        K_PIMADEV_ImageSize,                    //0x0350
        K_PIMADEV_DateTime,                     //0x1150
};
#else
#define K_PIMADATA_DevicePropertiesSupportedSize 0x00000000     //size of device properties supported
#endif

#if (PIMA_CAPTURE_FORMATS)
#define K_PIMADATA_CaptureFormatsSupportedSize  0x00000001      //size of capture formats supported
code    USHORT  K_PIMADATA_ImageFormatsSupported[K_PIMADATA_CaptureFormatsSupportedSize] =
{
        K_PIMAOBJ_EXIF_JPEG,                    //0x0138
};
#else
						//richie@si0401
#define K_PIMADATA_CaptureFormatsSupportedSize  0x00000000      //size of capture formats supported
#endif

#if (PIMA_IMAGE_FORMATS)
#define K_PIMADATA_ImageFormatsSupportedSize    0x00000006      //size of image formats supported
code    USHORT  K_PIMADATA_ImageFormatsSupported[K_PIMADATA_ImageFormatsSupportedSize] =
{
        K_PIMAOBJ_Association,                  //0x0130
        K_PIMAOBJ_DPOF,                         //0x0630
        K_PIMAOBJ_AVI,                          //0x0a30
        K_PIMAOBJ_EXIF_JPEG,                    //0x0138
        K_PIMAOBJ_JFIF,                         //0x0838
//richie@si0401 unmarked
        K_PIMAOBJ_TIFF,                         //0x0d38
};
#else
#define K_PIMADATA_ImageFormatsSupportedSize    0x00000000      //size of image formats supported
#endif

#define K_PIMADATA_VendorExtensionDescSize        0x08          //size of vendor extension descriptor
code    USHORT  K_PIMADATA_VendorExtensionDesc[K_PIMADATA_VendorExtensionDescSize] =
{
        0x5300,                                 //'S'
        0x7500,                                 //'u'
        0x6e00,                                 //'n'
        0x7000,                                 //'p'                         
        0x6c00,                                 //'l'
        0x7500,                                 //'u'
        0x7300,                                 //'s'
        0x0000,                                 //''
};

#define K_PIMADATA_ManufacturerSize               0x08          //size of manufacturer
code    USHORT  K_PIMADATA_Manufacturer[K_PIMADATA_ManufacturerSize] =
{
        0x5300,                                 //'S'
        0x7500,                                 //'u'
        0x6e00,                                 //'n'
        0x7000,                                 //'p'
        0x6c00,                                 //'l'
        0x7500,                                 //'u'
        0x7300,                                 //'s'
        0x0000,                                 //''
};

#define K_PIMADATA_ModelSize                    0x10            //size of model
code    USHORT  K_PIMADATA_Model[K_PIMADATA_ModelSize] =    
{
        0x5300,                                 //'S'
        0x7500,                                 //'u'
        0x6e00,                                 //'n'
        0x7000,                                 //'p'
        0x6c00,                                 //'l'
        0x7500,                                 //'u'
        0x7300,                                 //'s'
        0x2000,                                 //' '
        0x5300,                                 //'S'
        0x5000,                                 //'P'
        0x4300,                                 //'C'
        0x4100,                                 //'A'
        0x3500,                                 //'5'
        0x3300,                                 //'3'
        0x3300,                                 //'3'
        0x0000,                                 //''
};

#define K_PIMADATA_DeviceVersionSize            0x08            //size of device version
code    USHORT  K_PIMADATA_DeviceVersion[K_PIMADATA_DeviceVersionSize] =
{
        0x3000,                                 //'0'
        0x3100,                                 //'1'
        0x2e00,                                 //'.'
        0x3000,                                 //'0'
        0x3000,                                 //'0'
        0x2000,                                 //' '
        0x2000,                                 //' '
        0x0000,                                 //''
};

#define K_PIMADATA_SerialNumberSize             0x08            //size of serial number 
code    USHORT  K_PIMADATA_SerialNumber[K_PIMADATA_SerialNumberSize] =
{
        0x3000,                                 //'0'
        0x3000,                                 //'0'
        0x2000,                                 //' '
        0x2000,                                 //' '
        0x2000,                                 //' '
        0x2000,                                 //' '
        0x2000,                                 //' '
        0x0000,                                 //''
};

//Structure definition
typedef struct _PIMADATA_DEVICE_INFO
{
        USHORT  standardVersion;
        ULONG   vendorExtensionID;
        USHORT  vendorExtensionVersion;
        STR0x08 vendorExtensionDesc;
        USHORT  functionalMode;
        ULONG   operationsSupportedSize;
#if (PIMA_OPERATIONS)
        USHORT  operationsSupported[K_PIMADATA_OperationsSupportedSize];
#endif
        ULONG   eventsSupportedSize;
#if (PIMA_EVENTS)
        USHORT  eventsSupported[K_PIMADATA_EventsSupportedSize];
#endif
        ULONG   devicePropertiesSupportedSize;
#if (PIMA_DEVICE_PROPERTIES)
        USHORT  devicePropertiesSupported[K_PIMADATA_DevicePropertiesSupportedSize];
#endif
        ULONG   captureFormatsSupportedSize;
#if (PIMA_CAPTURE_FORMATS)
        USHORT  captureFormatsSupported[K_PIMADATA_CaptureFormatsSupportedSize];
#endif
        ULONG   imageFormatsSupportedSize;
#if (PIMA_IMAGE_FORMATS)
        USHORT  imageFormatsSupported[K_PIMADATA_ImageFormatsSupportedSize];
#endif
        STR0x08 manufacturer;
        STR0x10 model;
        STR0x08 deviceVersion;
        STR0x08 serialNumber;
} PIMADATA_DEVICE_INFO, *PPIMADATA_DEVICE_INFO;



//-------------------------------------
//DevicePropDesc
//-------------------------------------
//Constant Definition
#define K_PIMADATA_GET                          0x00
#define K_PIMADATA_GET_SET                      0x01

#define K_PIMADATA_FORMFLAG_NONE                0x00
#define K_PIMADATA_FORMFLAG_RANGE               0x01
#define K_PIMADATA_FORMFLAG_ENUM                0x02

//Structure Definition
//Battery Level
#define K_PIMADATA_BATTERY_LEVEL_DEFAULT        100
#define K_PIMADATA_BATTERY_LEVEL_MIN            0
#define K_PIMADATA_BATTERY_LEVEL_MAX            100
#define K_PIMADATA_BATTERY_LEVEL_STEP           10 
typedef struct _PIMADATA_BATTERY_LEVEL_DESC
{
        USHORT  devicePropertyCode;
        USHORT  dataType;
        UCHAR   getSet;
        UCHAR   defaultValue;
        UCHAR   currentValue;
        UCHAR   formFlag;
        UCHAR   minValue;
        UCHAR   maxValue;
        UCHAR   stepSize;
} PIMADATA_BATTERY_LEVEL_DESC, *PPIMADATA_BATTERY_LEVEL_DESC;

//Image Size
#define K_PIMADATA_ImageSizeAmount      0x0001
#define K_PIMADATA_ImageSizeLength      0x0010
code    USHORT  K_PIMADATA_ImageSize[K_PIMADATA_ImageSizeAmount][K_PIMADATA_ImageSizeLength] =
{
        {
                0x3100,         //'1'
                0x3600,         //'6'
                0x3000,         //'0'
                0x3000,         //'0'
                0x7800,         //'x'
                0x3100,         //'1'
                0x3200,         //'2'
                0x3000,         //'0'
                0x3000,         //'0'
                0x2000,         //' '
                0x2000,         //' '
                0x2000,         //' '
                0x2000,         //' '
                0x2000,         //' '
                0x2000,         //' '
                0x0000,         //''
        },
};
typedef struct _PIMADATA_IMAGE_SIZE_DESC
{
        USHORT  devicePropertyCode;
        USHORT  dataType;
        UCHAR   getSet;
        STR0x10 defaultValue;
        STR0x10 currentValue;
        UCHAR   formFlag;
        USHORT  numberOfValues;
        STR0x10 supportedValue[K_PIMADATA_ImageSizeAmount];
} PIMADATA_IMAGE_SIZE_DESC, *PPIMADATA_IMAGE_SIZE_DESC;

//Date Time
#define K_PIMADATA_DateTimeSize         0x18
code    USHORT  K_PIMADATA_DateTime[K_PIMADATA_DateTimeSize] =
{
        0x3200,                 //'2'
        0x3000,                 //'0'
        0x3000,                 //'0'
        0x3200,                 //'2'
        0x3000,                 //'0'
        0x3100,                 //'1'
        0x3000,                 //'0'
        0x3100,                 //'1'
        0x5400,                 //'T'
        0x3000,                 //'0'
        0x3000,                 //'0'
        0x3000,                 //'0'
        0x3000,                 //'0'
        0x3000,                 //'0'
        0x3000,                 //'0'
//richie@si0401
        0x2E00,                 //'.'
        0x3000,                 //'0'
        0x2000,                 //' '
        0x2000,                 //' '
        0x2000,                 //' '
        0x2000,                 //' '
        0x2000,                 //' '
        0x2000,                 //' '
        0x0000,                 //''
};
typedef struct _PIMADATA_DATE_TIME_DESC
{
        USHORT  devicePropertyCode;
        USHORT  dataType;
        UCHAR   getSet;
        STR0x18 defaultValue;
        STR0x18 currentValue;
        UCHAR   formFlag;
} PIMADATA_DATE_TIME_DESC, *PPIMADATA_DATE_TIME_DESC;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -