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

📄 ovcamerachip.h

📁 ov2640驱动开发
💻 H
字号:
/* 
    ovcamerachip - OmniVsion CAMERACHIP(R) driver

    Copyright (C) 2006, OmniVsion

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
 * OmniVision is a trademark of OmniVision Technologies, Inc. 
 *
 *  Version 1.00   Jun.30.2006   david zhu
 *					      david@ovt.com.cn
 */ 

#ifndef 	_LINUX_OVCAMERACHIP_H_
#define 	_LINUX_OVCAMERACHIP_H_

#include 	<linux/videodev.h>
#include	"pxaovcamera.h"

typedef	struct {
	u32 version;
	u32 mclock;
	
	int   stream;
	unsigned long exposure;	
	unsigned int width;
	unsigned int height;
	
	u8  format;
	u8  zoom;
	u8  framerate;
	
	int  lightfrequency;
	
	int flip;
	int mirror;
	
	int  saturation;
	int  brightness;
	int  sharpness;
	int  contrast;
	int  hue;
	int  whitebalance;
	int  specialeffect;
	int  gamma;
	
} ovcamerachip;

int camerachip_func_init ( p_ovcamera_context_t );
int camerachip_func_deinit ( p_ovcamera_context_t );
int camerachip_func_capture_set_format ( p_ovcamera_context_t );
int camerachip_func_capture_start ( p_ovcamera_context_t , unsigned int  );
int camerachip_func_capture_stop ( p_ovcamera_context_t  );
int camerachip_func_stillimage ( p_ovcamera_context_t  );
int camerachip_func_power_management ( p_ovcamera_context_t , int  );
int camerachip_func_command ( p_ovcamera_context_t , unsigned int , void * );

/* sensor status  control command */
#define	OVCAMCHIP_CMD_REG_SET			0x90
#define	OVCAMCHIP_CMD_REG_GET			0x91
#define	OVCAMCHIP_CMD_BRIGHTNESS		0x10
#define	OVCAMCHIP_CMD_CONTRAST		0x11
#define	OVCAMCHIP_CMD_HUE				0x12
#define	OVCAMCHIP_CMD_SATURATION		0x13
#define	OVCAMCHIP_CMD_SHARPNESS		0x14
#define	OVCAMCHIP_CMD_GAMMA			0x15
#define	OVCAMCHIP_CMD_WHITEBALANCE	0x17
#define	OVCAMCHIP_CMD_DIGITALZOOM		0x1A
#define	OVCAMCHIP_CMD_LIGHTFREQUENCY	0x1B


typedef enum
{
	OVCAMERACHIP_SFT_YUV422 	= 	0x00,
	OVCAMERACHIP_SFT_YUV420 	= 	0x01,
	OVCAMERACHIP_SFT_RGB565 	= 	0x02,
	OVCAMERACHIP_SFT_JPEG	  	 =    	0x03,
	OVCAMERACHIP_SFT_RGB888 	= 	0x04,
	OVCAMERACHIP_SFT_RGB444 	= 	0x05,
	OVCAMERACHIP_SFT_Y8	  	 =  	0x06,
	OVCAMERACHIP_SFT_SNRAW 	=   	0x07,
	OVCAMERACHIP_SFT_RAW8	   	=	0x08,
	OVCAMERACHIP_SFT_RAW10  	=   	0x09,
	OVCAMERACHIP_SFT_MAX	   	=    	0x0a	
}OV_STREAM_FORMAT;



extern int ovcamerachip_reg8_read(u8 addr, u8 *pvalue);
extern int ovcamerachip_reg8_write(u8 addr, u8 value);
extern int i2c_ovcamerachip_init(void);
extern int i2c_ovcamerachip_cleanup(void);
#endif

⌨️ 快捷键说明

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