📄 sensor.h
字号:
/*++
Copyright (c) 2001 Sunplus Technology Co., Ltd.
Module Name:
sensor.h
Abstract:
Header file related to sensor functions
Environment:
Keil C51 Compiler
Revision History:
08/28/2001 Chi-Yeh Tsai created
--*/
//------------------------------------------------------------------------------
//Constant
//------------------------------------------------------------------------------
//-------------------------------------
//Embedded signal generator
//-------------------------------------
//1.0M
#ifdef NOSENSOR
#define K_SENSOR_FrameRate 30
#define K_SENSOR_CaptureWidth ((ULONG)1152)
#define K_SENSOR_CaptureHeight ((ULONG)864)
#define K_SENSOR_MonitorWidth ((USHORT)576)
#define K_SENSOR_MonitorHeight ((USHORT)433)
#define K_AviSkipLine ((USHORT)73)
#endif
//-------------------------------------
//CMOS sensor
//-------------------------------------
//TASC 5130 VGA CMOS
#ifdef TASC5130
#define K_SENSOR_FrameRate 30
#define K_SENSOR_CaptureWidth ((ULONG)640)
#define K_SENSOR_CaptureHeight ((ULONG)480)
#define K_SENSOR_MonitorWidth ((USHORT)640)
#define K_SENSOR_MonitorHeight ((USHORT)493)
#define K_AviSkipLine ((USHORT)133)
#endif
//TASC 5160 SXVGA CMOS
#ifdef TASC5160
#define K_SENSOR_FrameRate 30
#define K_SENSOR_CaptureWidth ((ULONG)1280)
#define K_SENSOR_CaptureHeight ((ULONG)960)
#define K_SENSOR_MonitorWidth ((USHORT)656)//640)
#define K_SENSOR_MonitorHeight ((USHORT)493)
#define K_AviSkipLine ((USHORT)48)////132)
#endif
//IC Media 105 VGA CMOS
#ifdef ICM105
#define K_SENSOR_FrameRate 30
#define K_SENSOR_CaptureWidth ((ULONG)640)
#define K_SENSOR_CaptureHeight ((ULONG)480)
#define K_SENSOR_MonitorWidth ((USHORT)640)
#define K_SENSOR_MonitorHeight ((USHORT)493)
#define K_AviSkipLine ((USHORT)133)
#endif
//IC Media 107 1.0M CMOS
#ifdef ICM107B
#define K_SENSOR_FrameRate 30
#define K_SENSOR_CaptureWidth ((ULONG)1152)
#define K_SENSOR_CaptureHeight ((ULONG)864)
#define K_SENSOR_MonitorWidth ((USHORT)576)
#define K_SENSOR_MonitorHeight ((USHORT)433)
#define K_AviSkipLine ((USHORT)73)
#endif
//IC Media 108 1.3M CMOS
#ifdef ICM108
#define K_SENSOR_FrameRate 30
#define K_SENSOR_CaptureWidth ((ULONG)1280)// ((ULONG)1152)
#define K_SENSOR_CaptureHeight ((ULONG)1024)//((ULONG)864)
#define K_SENSOR_MonitorWidth ((USHORT)656)//((USHORT)576)
#define K_SENSOR_MonitorHeight ((USHORT)493)//((USHORT)433)
#define K_AviSkipLine ((USHORT)48)//((USHORT)73)
#endif
#ifdef ICM109
#define K_SENSOR_FrameRate 20
#define K_SENSOR_CaptureWidth ((ULONG)1600)// ((ULONG)1152)
#define K_SENSOR_CaptureHeight ((ULONG)1200)//((ULONG)864)
#define K_SENSOR_MonitorWidth ((USHORT)800)//((USHORT)576)
#define K_SENSOR_MonitorHeight ((USHORT)600)//((USHORT)433)
#define K_AviSkipLine ((USHORT)48)//((USHORT)73)
#endif
//OmniVision 9620 1.3M CMOS
#ifdef OV13
#define K_SENSOR_FrameRate 20
#define K_SENSOR_CaptureWidth ((ULONG)1280)
#define K_SENSOR_CaptureHeight ((ULONG)1024)
#define K_SENSOR_MonitorWidth ((USHORT)640)
#define K_SENSOR_MonitorHeight ((USHORT)493)
#define K_AviSkipLine ((USHORT)13)
#endif
#ifdef OV2610
#define K_SENSOR_FrameRate 20
#define K_SENSOR_CaptureWidth ((ULONG)1600)
#define K_SENSOR_CaptureHeight ((ULONG)1200)
//patch4.5@richie@ov monitor size adj begin
#define K_SENSOR_MonitorWidth ((USHORT)816)
#define K_SENSOR_MonitorHeight ((USHORT)613)
//patch4.5@richie@ov monitor size adj end
#define K_AviSkipLine ((USHORT)13)
#endif
#ifdef OV3610
#define K_SENSOR_FrameRate 20
#define K_SENSOR_CaptureWidth ((ULONG)2048)
#define K_SENSOR_CaptureHeight ((ULONG)1536)
#define K_SENSOR_MonitorWidth ((USHORT)1024)
#define K_SENSOR_MonitorHeight ((USHORT)768) //patch5.2.1@jhyu@OV3610
#define K_AviSkipLine ((USHORT)13)
#endif
//-------------------Davis:patch4.0.0.0_2005/Jun/07 begin
#ifdef OV3620
#define K_SENSOR_FrameRate 20
#define K_SENSOR_CaptureWidth ((ULONG)2048)
#define K_SENSOR_CaptureHeight ((ULONG)1536)
#define K_SENSOR_MonitorWidth ((USHORT)1008)
#define K_SENSOR_MonitorHeight ((USHORT)768)
#define K_AviSkipLine ((USHORT)13)
#endif
//-------------------Davis:patch4.0.0.0_2005/Jun/07 end
//Motorola 20027 1.3M CMOS
#ifdef MCM20027
#define K_SENSOR_FrameRate 20
#define K_SENSOR_CaptureWidth ((ULONG)1280)
#define K_SENSOR_CaptureHeight ((ULONG)1024)
#define K_SENSOR_MonitorWidth ((USHORT)640)
#define K_SENSOR_MonitorHeight ((USHORT)493)
#define K_AviSkipLine ((USHORT)13)
#endif
#ifdef HP2020
#define K_SENSOR_FrameRate 30
#define K_SENSOR_CaptureWidth ((ULONG)640)
#define K_SENSOR_CaptureHeight ((ULONG)480)
#define K_SENSOR_MonitorWidth ((USHORT)656)//640)
#define K_SENSOR_MonitorHeight ((USHORT)493)
#define K_AviSkipLine ((USHORT)48)////132)
#endif
//-------------------------------------
//CCD sensor
//-------------------------------------
//Sony 232 1.3M Interlace CCD
#ifdef SONY232
#define K_SENSOR_FrameRate 30
#define K_SENSOR_CaptureWidth ((ULONG)1280)
#define K_SENSOR_CaptureHeight ((ULONG)960)
#define K_SENSOR_MonitorWidth ((USHORT)1280)
#define K_SENSOR_MonitorHeight ((USHORT)246)
#define K_AviSkipLine ((USHORT)12)
#endif
//Sony 442 1.3M Progressive CCD
#ifdef SONY442
#define K_SENSOR_FrameRate 30
#define K_SENSOR_CaptureWidth ((ULONG)1280)
#define K_SENSOR_CaptureHeight ((ULONG)960)
#define K_SENSOR_MonitorWidth ((USHORT)1280)
#define K_SENSOR_MonitorHeight ((USHORT)246)
#define K_AviSkipLine ((USHORT)12)
#endif
// SONY 3.0M 3 field interlace CCD Sensor
#ifdef SONY432
#define K_SENSOR_FrameRate 15
#define K_SENSOR_CaptureWidth ((ULONG)2048)
#define K_SENSOR_CaptureHeight ((ULONG)1536)
#define K_SENSOR_MonitorWidth ((USHORT)2048)
#define K_SENSOR_MonitorHeight ((USHORT)252)
#define K_AviSkipLine ((USHORT)12)
#endif
//Sharp RJ23N3 2.0M Interlace CCD
#ifdef RJ23N3
#define K_SENSOR_FrameRate 10
#define K_SENSOR_CaptureWidth ((ULONG)1600)
#define K_SENSOR_CaptureHeight ((ULONG)1200)
#define K_SENSOR_MonitorWidth ((USHORT)1600)
#define K_SENSOR_MonitorHeight ((USHORT)253)
#define K_AviSkipLine ((USHORT)13)
#endif
//Panasonic 39472 2.0M Interlace CCD
#ifdef MN39472
#define K_SENSOR_FrameRate 10
#define K_SENSOR_CaptureWidth ((ULONG)1600)
#define K_SENSOR_CaptureHeight ((ULONG)1200)
#define K_SENSOR_MonitorWidth ((USHORT)1600)
#define K_SENSOR_MonitorHeight ((USHORT)304)
#define K_AviSkipLine ((USHORT)64)
#endif
//patch4.3@richie@mn0604
//Panasonic 39470 2.0M Interlace CCD
#ifdef MN39470
#define K_SENSOR_FrameRate 10
#define K_SENSOR_CaptureWidth ((ULONG)1600)
#define K_SENSOR_CaptureHeight ((ULONG)1200)
#define K_SENSOR_MonitorWidth ((USHORT)1600)
#define K_SENSOR_MonitorHeight ((USHORT)304)
#define K_AviSkipLine ((USHORT)64)
#endif
//Sony 224/284/434 2.0M Interlace CCD
#ifdef SONY224
#define K_SENSOR_FrameRate 15
#define K_SENSOR_CaptureWidth ((ULONG)1600)
#define K_SENSOR_CaptureHeight ((ULONG)1200)
#define K_SENSOR_MonitorWidth ((USHORT)1600)
#define K_SENSOR_MonitorHeight ((USHORT)304)
#define K_AviSkipLine ((USHORT)14)
#endif
//3.0M
//SONY 252/262 3.0M Interlace CCD
#ifdef SONY262
#define K_SENSOR_FrameRate 30
#define K_SENSOR_CaptureWidth ((ULONG)2048)
#define K_SENSOR_CaptureHeight ((ULONG)1536)
#define K_SENSOR_MonitorWidth ((USHORT)2048)
#define K_SENSOR_MonitorHeight ((USHORT)253)
#define K_AviSkipLine ((USHORT)13)
#endif
//patch4.4@andrew@SHARP_LZ24
#ifdef SHARP_LZ24BP
#define K_SENSOR_FrameRate 20
#define K_SENSOR_CaptureWidth ((ULONG)640)
#define K_SENSOR_CaptureHeight ((ULONG)480)
#define K_SENSOR_MonitorWidth ((USHORT)640)
#define K_SENSOR_MonitorHeight ((USHORT)480)
#define K_AviSkipLine ((USHORT)13)
#endif
#ifdef MN39592
#define K_SENSOR_FrameRate 30
#define K_SENSOR_CaptureWidth ((ULONG)2048)
#define K_SENSOR_CaptureHeight ((ULONG)1536)
#define K_SENSOR_MonitorWidth ((USHORT)2048)
#define K_SENSOR_MonitorHeight ((USHORT)257)
#define K_AviSkipLine ((USHORT)13)
#endif
//hx@030410...add begin
//Image capture resolution
/*#ifdef OV2610
#define K_SNAP_Resolution_Middle_Width ((USHORT)1280)
#define K_SNAP_Resolution_Middle_Height ((USHORT)1024)
#define K_SNAP_Resolution_Low_Width ((USHORT)640)
#define K_SNAP_Resolution_Low_Height ((USHORT)480)
*/
#ifdef OV3610
#define K_SNAP_Resolution_Middle_Width ((USHORT)1600)
#define K_SNAP_Resolution_Middle_Height ((USHORT)1200)
#define K_SNAP_Resolution_Low_Width ((USHORT)800)
#define K_SNAP_Resolution_Low_Height ((USHORT)600)
//-------------------Davis:patch4.0.0.0_2005/Jun/07 begin
#elif defined (OV3620)
#define K_SNAP_Resolution_Middle_Width ((USHORT)1600)
#define K_SNAP_Resolution_Middle_Height ((USHORT)1200)
#define K_SNAP_Resolution_Low_Width ((USHORT)800)
#define K_SNAP_Resolution_Low_Height ((USHORT)600)
#elif defined (OV2610)
#define K_SNAP_Resolution_Middle_Width ((USHORT)1280)
#define K_SNAP_Resolution_Middle_Height ((USHORT)1024)
#define K_SNAP_Resolution_Low_Width ((USHORT)640)
#define K_SNAP_Resolution_Low_Height ((USHORT)480)
#elif defined (MI2000)
#define K_SNAP_Resolution_Middle_Width ((USHORT)1280)
#define K_SNAP_Resolution_Middle_Height ((USHORT)1024)
#define K_SNAP_Resolution_Low_Width ((USHORT)800)
#define K_SNAP_Resolution_Low_Height ((USHORT)600)
#elif defined (MI3000)
#define K_SNAP_Resolution_Middle_Width ((USHORT)1600)
#define K_SNAP_Resolution_Middle_Height ((USHORT)1200)
#define K_SNAP_Resolution_Low_Width ((USHORT)1280)
#define K_SNAP_Resolution_Low_Height ((USHORT)1024)
#else
#define K_SNAP_Resolution_Middle_Width ((USHORT)640)
#define K_SNAP_Resolution_Middle_Height ((USHORT)480)
#define K_SNAP_Resolution_Low_Width ((USHORT)320)
#define K_SNAP_Resolution_Low_Height ((USHORT)240)
#endif
#if(INTERPOLATION_OPTION == 1)
#ifdef MCM20027
#define K_SNAP_Resolution_Interpolation_Width ((ULONG)1600)
#define K_SNAP_Resolution_Interpolation_Height ((ULONG)1200)
#endif
#ifdef OV13
#define K_SNAP_Resolution_Interpolation_Width ((ULONG)1600)
#define K_SNAP_Resolution_Interpolation_Height ((ULONG)1200)
#endif
/*
#ifdef MI2000
#define K_SNAP_Resolution_Interpolation_Width ((ULONG)2304)
#define K_SNAP_Resolution_Interpolation_Height ((ULONG)1728)
#endif
*/
#ifdef MI3000
#define K_SNAP_Resolution_Interpolation_Width ((ULONG)2560)//wendy
#define K_SNAP_Resolution_Interpolation_Height ((ULONG)1920)
#endif
#ifdef OV3620
#define K_SNAP_Resolution_Interpolation_Width ((ULONG)2560)//wendy
#define K_SNAP_Resolution_Interpolation_Height ((ULONG)1920)
#endif
#ifdef MI1300
#define K_SNAP_Resolution_Interpolation_Width ((ULONG)1600)
#define K_SNAP_Resolution_Interpolation_Height ((ULONG)1200)//wendy@2004/6/29
#endif
#ifdef OV2610
#define K_SNAP_Resolution_Interpolation_Width ((ULONG)2048)
#define K_SNAP_Resolution_Interpolation_Height ((ULONG)1536)
#endif
#ifdef OV3610
#define K_SNAP_Resolution_Interpolation_Width ((ULONG)2304)
#define K_SNAP_Resolution_Interpolation_Height ((ULONG)1728)
#endif
#ifdef MI2000
#define K_SNAP_Resolution_Interpolation_Width ((ULONG)2048)
#define K_SNAP_Resolution_Interpolation_Height ((ULONG)1536)
#endif
#ifdef ICM107
#define K_SNAP_Resolution_Interpolation_Width ((ULONG)1600)
#define K_SNAP_Resolution_Interpolation_Height ((ULONG)1200)
#endif
#ifdef ICM109
#define K_SNAP_Resolution_Interpolation_Width ((ULONG)2048)
#define K_SNAP_Resolution_Interpolation_Height ((ULONG)1536)
#endif
#ifdef ICM110
#define K_SNAP_Resolution_Interpolation_Width ((USHORT)2304)
#define K_SNAP_Resolution_Interpolation_Height ((USHORT)1728)
#endif
#endif
//-------------------Davis:patch4.0.0.0_2005/Jun/07 end
//hx@030410...add end
//------------------------------------------------------------------------------
//External Link
//------------------------------------------------------------------------------
extern xdata UCHAR G_Interlace_Enable;
//------------------------------------------------------------------------------
//Function Prototype
//------------------------------------------------------------------------------
void SENSOR_Initialize(void);
void SENSOR_CaptureAeAwbAf(void);
void SENSOR_OrdinaryAeAwbAf(void);
void SENSOR_GetColorInformation(USHORT colorIndex);
void SENSOR_SetColorInformation(USHORT colorIndex);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -