📄 api_def.h
字号:
/* ****************************************************************** */
/* Api_def.h */
/* ****************************************************************** */
/* Copyright (c) 1997 ZORAN Corporation, All Rights Reserved */
/* THIS IS PROPRIETARY SOURCE CODE OF ZORAN CORPORATION */
/* */
/* ****************************************************************** */
#ifndef _API_DEF_H_
#define _API_DEF_H_
typedef char I43_INT8;
typedef short I43_INT16;
typedef long I43_INT32;
typedef unsigned char I43_UINT8;
typedef unsigned short I43_UINT16;
typedef unsigned long I43_UINT32;
#ifndef INT8
#define INT8 I43_INT8
#endif
#ifndef UINT8
#define UINT8 I43_UINT8
#endif
#ifndef INT16
#define INT16 I43_INT16
#endif
#ifndef UINT16
#define UINT16 I43_UINT16
#endif
#ifndef INT32
#define INT32 I43_INT32
#endif
#ifndef UINT32
#define UINT32 I43_UINT32
#endif
typedef enum _I43_BOOL
{
I43_FALSE = (unsigned char )0x0,
I43_TRUE = (unsigned char )0x1
} I43_BOOL;
typedef enum _I43_UINT2
{
I43_UINT2_0 = (char )0x00,
I43_UINT2_1 = (char )0x01,
I43_UINT2_2 = (char )0x02,
I43_UINT2_3 = (char )0x03
} I43_UINT2;
typedef enum _I43_UINT3
{
I43_UINT3_0 = (char )0x00,
I43_UINT3_1 = (char )0x01,
I43_UINT3_2 = (char )0x02,
I43_UINT3_3 = (char )0x03,
I43_UINT3_4 = (char )0x04,
I43_UINT3_5 = (char )0x05,
I43_UINT3_6 = (char )0x06,
I43_UINT3_7 = (char )0x07
} I43_UINT3;
typedef enum _I43_UINT4
{
I43_UINT4_0 = (char )0x00,
I43_UINT4_1 = (char )0x01,
I43_UINT4_2 = (char )0x02,
I43_UINT4_3 = (char )0x03,
I43_UINT4_4 = (char )0x04,
I43_UINT4_5 = (char )0x05,
I43_UINT4_6 = (char )0x06,
I43_UINT4_7 = (char )0x07,
I43_UINT4_8 = (char )0x08,
I43_UINT4_9 = (char )0x09,
I43_UINT4_A = (char )0x0A,
I43_UINT4_B = (char )0x0B,
I43_UINT4_C = (char )0x0C,
I43_UINT4_D = (char )0x0D,
I43_UINT4_E = (char )0x0E,
I43_UINT4_F = (char )0x0F
} I43_UINT4;
/* ****************************************************************** */
/* I43 Host Registers */
/* ****************************************************************** */
/* MS byte - Read=0, Write=1 */
/* LS byte - the HRS pins value. */
/* ****************************************************************** */
#define I43HR_SR0 0x00
#define I43HR_SR1 0x01
#define I43HR_SR2 0x02
#define I43HR_READ_TR 0x03
#define I43HR_COMMAND_REGISTER 0x10
#define I43HR_IRQM_REGISTER 0x12
#define I43HR_WRITE_TR 0x13
typedef enum _I43_STATUS_REGISTER
{
I43_STATUS_REG0 = 0x00,
I43_STATUS_REG1 = 0x01,
I43_STATUS_REG2 = 0x02
} I43_STATUS_REGISTER;
/* ****************************************************************** */
/* Status Register 0 values */
/* ****************************************************************** */
/* These values represent the I43 semaphore flags. */
/* ****************************************************************** */
typedef enum _I43_SR0FLAG
{
I43SR0_COMMAND_ALLOWED = (char )0x01,
I43SR0_DATA_IN_ALLOWED = (char )0x02,
I43SR0_IN_FIFO_EMPTY = (char )0x04,
I43SR0_REQUESTED_DATA_READY = (char )0x08,
I43SR0_OUT_FIFO_FULL = (char )0x10,
I43SR0_REQUEST_DATA_COMPLETION = (char )0x20,
I43SR0_PROTOCOL_ERROR = (char )0x40,
I43SR0_NULL = (char )0x00
} I43_SR0FLAG;
/* ****************************************************************** */
/* Status Register 1 values */
/* ****************************************************************** */
/* ****************************************************************** */
/* Status Register 1 Modes */
/* ****************************************************************** */
/* These values represent the deifferent states of the I43 state */
/* machine (the values are taken from the I43 spec). */
/* ****************************************************************** */
typedef enum _I43_MODE
{
I43_MENU_MODE = (unsigned char )0x00,
I43_BOOT_MODE = (unsigned char )0x10,
I43_POWER_DOWN_MODE = (unsigned char )0x20,
I43_IDLE_MODE = (unsigned char )0x30,
I43_VIEW_MODE = (unsigned char )0x40,
I43_PREVIEW_ZOOM_MODE = (unsigned char )0x4D,
I43_CAPTURE_IMAGE_MODE = (unsigned char )0x50,
I43_CAPTURE_SEQUENCE_MODE = (unsigned char )0x60,
I43_VIDEO_CAPTURE_MODE = (unsigned char )0x70,
I43_STORE_IMAGE_FLASH_MODE = (unsigned char )0x80,
I43_STORE_IMAGE_HOST_MODE = (unsigned char )0x88,
I43_RESTORE_IMAGE_FLASH_MODE = (unsigned char )0x90,
I43_RESTORE_IMAGE_THUMB_MODE = (unsigned char )0x91,
I43_CAPTURE_CLIP_MODE = (unsigned char )0xA0,
I43_CAPTURE_CLIP_VONLY_MODE = (unsigned char )0xA1,
I43_CAPTURE_CLIP_AONLY_MODE = (unsigned char )0xA2,
I43_PLAYBACK_IMAGE_MODE = (unsigned char )0xC0,
I43_RESTORE_THUMBNAILS_MODE = (unsigned char )0xD0,
I43_PLAYBACK_THUMBNAILS_MODE = (unsigned char )0xE0,
I43_CALIBRATION1_MODE = (unsigned char )0xF0,
I43_CALIBRATION2_MODE = (unsigned char )0xF1,
I43_CALIBRATION3_MODE = (unsigned char )0xF2
} I43_MODE;
/* ****************************************************************** */
/* Status Register 1 Codes */
/* ****************************************************************** */
/* These values represent the different codes that may be in SR1. */
/* ****************************************************************** */
typedef enum _I43_SR1_CODE
{
I43SR1_NULL = (short )0x0000,
I43SR1_SUCCESS = (short )0x0001,
I43SR1_FAILURE = (short )0x0002,
I43SR1_FILE_TRANSFER_BUSY = (short )0x000A,
I43SR1_FILE_TRANSFER_READY = (short )0x000B,
I43SR1_FILE_TRANSFER_ERROR = (short )0x000C,
I43SR1_FILE_NOT_FOUND = (short )0x000D,
I43SR1_NON_COMP_IMAGE_FILE = (short )0x0010,
I43SR1_NON_COMP_AUDIO_FILE = (short )0x0011,
I43SR1_RECORDING_AUDIO = (short )0x0012,
I43SR1_PLAYING_AUDIO = (short )0x0013,
I43SR1_ERASING_FILES = (short )0x0014,
I43SR1_NO_AUDIO_FILE = (short )0x0016,
I43SR1_RECOVER_POWERDOWN = (short )0x0017,
I43SR1_PROGRAM_CHECKSUM_ERROR = (short )0x0018,
I43SR1_I2C_TRANS_SUCCEEDED = (short )0x0019,
I43SR1_I2C_TRANS_FAILED = (short )0x001A,
I43SR1_SET_CUR_PATH_SUCCEEDED = (short )0x001B,
I43SR1_SET_CUR_PATH_FAILED = (short )0x001C,
I43SR1_PROGRAM_UNMATCH = (short )0x001D
} I43_SR1_CODE;
/* ****************************************************************** */
/* Status Register 2 values */
/* ****************************************************************** */
/* These values represent the various events that may be reported */
/* in status register 2. */
/* ****************************************************************** */
typedef enum _I43_SR2_EVENT
{
I43SR2_BOOT_PEND_AWB_CONVERGED = (short )0x8000,
I43SR2_FLASH_CARD_CHANGE = (short )0x4000,
I43SR2_FLASH_CARD_EXIST = (short )0x2000,
I43SR2_AE_CONVERGED_AUDIO_EXIST = (short )0x0400,
I43SR2_FLASH_LIGHT_REQUIRED = (short )0x0200,
I43SR2_MODE_COMPLETED = (short )0x0080,
I43SR2_NEW_FRAME_PROCESSED = (short )0x0040,
I43SR2_NOT_ENOUGH_FLASH_MEMORY = (short )0x0008,
I43SR2_OPERATION_COMPLETE = (short )0x0004,
I43SR2_NOT_ENOUGH_AUDIO_DRAM = (short )0x0002,
I43SR2_FLASH_MEMORY_ERROR = (short )0x0001,
I43SR2_DIGITAL_ZOOM_COMPLETE = (short )0x0001,
I43SR2_NO_EVENTS = (short )0x0000
} I43_SR2_EVENT;
/* ****************************************************************** */
/* API Error Codes */
/* ****************************************************************** */
/* These values represent the different error codes that are used */
/* in the API function. */
/* ****************************************************************** */
typedef enum _I43_ERROR_CODE
{
I43ERR_OK = (char )0x00,
/* SR0 Error Codes. */
I43ERR_HERR_ASSERTED = (char )I43SR0_PROTOCOL_ERROR,
I43ERR_RDC_NOT_ASSERTED = (char )I43SR0_REQUEST_DATA_COMPLETION,
I43ERR_OFF_NOT_ASSERTED = (char )I43SR0_OUT_FIFO_FULL,
I43ERR_RDR_NOT_ASSERTED = (char )I43SR0_REQUESTED_DATA_READY,
I43ERR_IFE_NOT_ASSERTED = (char )I43SR0_IN_FIFO_EMPTY,
I43ERR_DIA_NOT_ASSERTED = (char )I43SR0_DATA_IN_ALLOWED,
I43ERR_CA_NOT_ASSERTED = (char )I43SR0_COMMAND_ALLOWED,
/* SR2 Error Code. */
I43ERR_BOOT_AWB_NOT_ASSERTED = (char )0x41,
/* General Error Codes. */
I43ERR_NOT_STATUS_REGISTER = (char )0x51,
I43ERR_MEMORY_LOCATION_ERROR = (char )0x52,
I43ERR_FAIL = (char )0xFE,
I43ERR_UNKNOWN = (char )0xFF
} I43_ERROR_CODE;
/* ****************************************************************** */
/* Host Commands */
/* ****************************************************************** */
typedef enum _I43_HOST_COMMAND
{
/* Special Processing-flow Control Commands. */
I43HC_RESERVED_00 = (char )0x00,
I43HC_TRANSACTION_COMPLETED = (char )0x01,
I43HC_TRANSACTION_ABORT = (char )0x02,
I43HC_RESERVED_03 = (char )0x03,
I43HC_SET_PARAM_ARRAY = (char )0x04,
I43HC_GET_PARAM_ARRAY = (char )0x05,
I43HC_RESTORE_USP = (char )0x06,
I43HC_UPDATE_USP = (char )0x07,
I43HC_UPDATE_FSP = (char )0x08,
I43HC_REVERT_FSP = (char )0x09,
I43HC_GET_FREE_PARAMS = (char )0x0A,
I43HC_SET_FREE_PARAMS = (char )0x0B,
I43HC_SET_PARAM = (char )0x0C,
I43HC_GET_PARAM = (char )0x0D,
I43HC_RESERVED_0E = (char )0x0E,
I43HC_SET_TIMER = (char )0x0F,
/* System Control and Configuration Commands. */
I43HC_RESERVED_10 = (char )0x10,
I43HC_CONFIGSYS = (char )0x11,
I43HC_CONFIG_UART = (char )0x12,
I43HC_SET_BOOT_ADDRESS = (char )0x13,
I43HC_UART_LIB_CONFIG = (char )0x14,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -