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

📄 csi.h

📁 linux下基于Arm9的嵌入式linux摄像头接口驱动。非常实用的源码!
💻 H
字号:
/*
 * MX21 CSI driver
 *
 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Copyright (C) 2004 Motorola Semiconductors Hong Kong.
 *
 */


/**
*@addtogroup CSI
*/
/**@{*/


/**
*@file csi.h
*@brief CSI driver header file
*
* linux/drivers/csi/csi.h
*/

/**@brief This structure is to store CSI config information*/
typedef struct
{
	//control reg 1
	unsigned int swap16_en;
	unsigned int ext_vsync;
	unsigned int eof_int_en;
	unsigned int prp_if_en;
	unsigned int ccir_mode;
	unsigned int cof_int_en;
	unsigned int sf_or_inten;
	unsigned int rf_or_inten;
	unsigned int statff_level;
	unsigned int staff_inten;
	unsigned int rxff_level;
	unsigned int rxff_inten;
	unsigned int sof_pol;
	unsigned int sof_inten;
	unsigned int mclkdiv;
	unsigned int hsync_pol;
	unsigned int ccir_en;
	unsigned int mclken;
	unsigned int fcc;
	unsigned int pack_dir;
	unsigned int gclk_mode;
	unsigned int inv_data;
	unsigned int inv_pclk;
	unsigned int redge;
	
	//system control
	unsigned int module_irq_enable;
	
	//control reg 3
	unsigned int csi_sup;
	unsigned int zero_pack_en;
	unsigned int ecc_int_en;
	unsigned int ecc_auto_en;
	
	//fifo counter
	unsigned int rxcnt;
}CSI_CFG;

/**@brief This structure is to store CSI status information*/
typedef struct
{
	int sff_or_int;
	int rff_or_int;
	int statff_int;
	int rxff_int;
	int eof_int;
	int sof_int;
	int f2_int;
	int f1_int;
	int cof_int;
	int ecc_int;
	int drdy;
}CSI_STATUS;


/**@def IOCTL_CSI_READ_CONFIG   CSI control command: read CSI config information*/
/**@def IOCTL_CSI_CONFIG   config CSI*/
/**@def IOCTL_CSI_READ_STATUS   read CSI status*/
/**@def IOCTL_CSI_GET_FRMCNT   get CSI frame count*/
/**@def IOCTL_CSI_RST_FRMCNT   reset CSI frame count*/

//control commands
#define IOCTL_CSI_READ_CONFIG	10	//arg type: CSI_CFG *
#define IOCTL_CSI_CONFIG	11	//arg type: CSI_CFG *
#define IOCTL_CSI_READ_STATUS	12	//arg type: CSI_STATUS *
#define IOCTL_CSI_GET_FRMCNT	13	//arg type: int *
#define IOCTL_CSI_RST_FRMCNT	14	//arg type: nil
#define IOCTL_CSI_POLL_EOF	15	//arg type: int
#define IOCTL_CSI_POLL_SOF	16	//arg type: nil
#define IOCTL_CSI_RESET		17	//arg type: nill

/**@}*/


⌨️ 快捷键说明

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