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

📄 camera.h

📁 generic driver for s3c2440 under linux
💻 H
字号:
/* * camera.h * *  Created on: 6-Jul-08 *      Author: root */#ifndef CAMERA_H_#define CAMERA_H_#include <linux/videodev.h>#define MAX_OPENS 1#define MAX_NUM_FRAMES	15//#define CAMIF_MAX_W 800//#define CAMIF_MAX_H 625#define CAMIF_MAX_W 1024#define CAMIF_MAX_H 768#define CAMIF_MIN_W 160#define CAMIF_MIN_H 120struct img_buf_t {	unsigned int phys_addr;	unsigned char *buf;};struct s3c2440_camif_dev {	//struct video_device	v;	spinlock_t		lock;	struct semaphore	change;	struct completion	stop;	int			open_count;	wait_queue_head_t	wait;	unsigned long		time_acquired;/* millisecond time stamp */	int set_chg;	int mode;	int flag;	int rdy;	size_t size;	void __iomem* addr;	struct clk *upll_clk;	struct clk *clk;	int    irq;	struct resource *addr_res;   /* resources found */	struct resource *irq_res;	unsigned char *yuv_buf;	dma_addr_t yuv_buf_dma;	unsigned char *rgb_buf;	dma_addr_t rgb_buf_dma;};struct s3c2440_camif_cfg_t {	int src_x;	int src_y;#if 1	int dst_x;	int dst_y;	int dst_fmt;	int pre_x;	int pre_y;	int pre_fmt;	__u16 bypass;	__u16 ycbcr;#endif	struct s3c2440_camif_dev *dev;};//Camera Interface.  Edited for 2440A#define CISRCFMT           (0x00000000)#define CIWDOFST           (0x00000004)#define CIGCTRL            (0x00000008)#define CICOYSA1           (0x00000018)#define CICOYSA2           (0x0000001C)#define CICOYSA3           (0x00000020)#define CICOYSA4           (0x00000024)#define CICOCBSA1          (0x00000028)#define CICOCBSA2          (0x0000002C)#define CICOCBSA3          (0x00000030)#define CICOCBSA4          (0x00000034)#define CICOCRSA1          (0x00000038)#define CICOCRSA2          (0x0000003C)#define CICOCRSA3          (0x00000040)#define CICOCRSA4          (0x00000044)#define CICOTRGFMT         (0x00000048)#define CICOCTRL           (0x0000004C)#define CICOSCPRERATIO     (0x00000050)#define CICOSCPREDST       (0x00000054)#define CICOSCCTRL         (0x00000058)#define CICOTAREA          (0x0000005C)#define CICOSTATUS         (0x00000064)#define CIPRCLRSA1         (0x0000006C)#define CIPRCLRSA2         (0x00000070)#define CIPRCLRSA3         (0x00000074)#define CIPRCLRSA4         (0x00000078)#define CIPRTRGFMT         (0x0000007C)#define CIPRCTRL           (0x00000080)#define CIPRSCPRERATIO     (0x00000084)#define CIPRSCPREDST       (0x00000088)#define CIPRSCCTRL         (0x0000008C)#define CIPRTAREA          (0x00000090)#define CIPRSTATUS         (0x00000098)#define CIIMGCPT           (0x000000A0)#define	CICOSTAY(i)	   (0x00000018+(i)*4)#define	CICOSTACb(i)	   (0x00000028+(i)*4)#define	CICOSTACr(i)	   (0x00000038+(i)*4)#define	CIPRSTARGB(i)	   (0x0000006C+(i)*4)#define	STILL_IMAGE	    1#define	VIDEO_START	    0#define	VIDEO_STOP	    -1#endif /* CAMERA_H_ */

⌨️ 快捷键说明

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