资源简介
csi接口的摄像头模组ov5640的配置文件,非原创!
代码片段和文件信息
#include
#include
#include
#include
#include
#include
#include
#include
#include
/* ANSI Color codes */
#define VT(CODES) “\033[“ CODES “m“
#define VT_NORMAL VT(““)
#define VT_RED VT(“0;32;31“)
#define VT_GREEN VT(“1;32“)
#define VT_YELLOW VT(“1;33“)
#define VT_BLUE VT(“1;34“)
#define VT_PURPLE VT(“0;35“)
#define OV5640_DBG
#define xprintk(fmt ...) \
printk(“%s()->%d “ fmt __func__ __LINE__ ## __VA_ARGS__)
#ifdef OV5640_DBG
#define _DBG(color fmt ...) \
xprintk(color ““ fmt VT_NORMAL ## __VA_ARGS__)
#define OV_INFO(fmt args...) _DBG(VT_GREEN fmt ## args)
#define OV_ERR(fmt args...) _DBG(VT_RED fmt ## args)
#else
#define OV_INFO(fmt args...) do {} while(0)
#define OV_ERR(fmt args...) do {} while(0)
#endif
#define _INFO(color fmt ...) \
xprintk(color “::“ fmt ““VT_NORMAL ## __VA_ARGS__)
/* mainly used in test code */
#define INFO_PURLPLE(fmt args...) _INFO(VT_PURPLE fmt ## args)
#define INFO_RED(fmt args...) _INFO(VT_RED fmt ## args)
#define INFO_GREEN(fmt args...) _INFO(VT_GREEN fmt ## args)
#define INFO_BLUE(fmt args...) _INFO(VT_BLUE fmt ## args)
#define OV5640_I2C_NAME “ov5640“
/*
* I2C write address: 0x78 read: 0x79 give up least significant bit.
*/
#define OV5640_I2C_ADDR (0x78 >> 1)
/*
* sensor ID
*/
#define OV5640 0x5640
#define VERSION(id vers) ((id << 8) | (vers & 0XFF))
/* default format */
#define QVGA_WIDTH 320
#define QVGA_HEIGHT 240
#define VGA_WIDTH 640
#define VGA_HEIGHT 480
#define XGA_WIDTH 1024
#define XGA_HEIGHT 768
#define SXGA_WIDTH 1280
#define SXGA_HEIGHT 960
#define UXGA_WIDTH 1600
#define UXGA_HEIGHT 1200
#define QXGA_WIDTH 2048
#define QXGA_HEIGHT 1536
#define QSXGA_WIDTH 2560
#define QSXGA_HEIGHT 1920 //normally 2048 but ov5640 only support simple qsxga
#define CAPTURE_frame_RATE 500 /* multiplied by 100 */
#define PREVIEW_frame_RATE 1500 /* multiplied by 100 */
#define OV5640_COLUMN_SKIP 0
#define OV5640_ROW_SKIP 0
#define OV5640_MAX_WIDTH (QSXGA_WIDTH)
#define OV5640_MAX_HEIGHT (QSXGA_HEIGHT)
#define OV5640_HFLIP 0x1
#define OV5640_VFLIP 0x2
enum ov5640_resolution {
RESV_VGA = 1
RESV_XGA
RESV_SXGA
RESV_UXGA
RESV_QXGA
RESV_QSXGA
};
struct regval {
unsigned short reg;
unsigned char val;
};
struct ov5640_color_format {
enum v4l2_mbus_pixelcode code;
enum v4l2_colorspace colorspace;
};
struct ov5640_win_size {
char *name;
enum ov5640_resolution resv;
unsigned int width;
unsigned int height;
const struct regval *regs;
};
struct ov5640_priv {
struct v4l2_subdev subdev;
const struct ov5640_color_format *cfmt;
const struct ov5640_win_size *win;
int model;
int brightness;
int contrast;
int saturation;
int hue;
int exposure;
int sha
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3140617 2012-08-14 16:44 ov5640\OV5640 Auto Focus Camera Module Application Notes (with DVP Interface) R2.12.pdf
文件 6254258 2012-08-14 16:45 ov5640\OV5640 camera module software application notes 1.3_Actions.pdf
文件 63963 2011-12-28 15:58 ov5640\ov5640.c
文件 64360 2012-08-14 16:44 ov5640\OV5640CSP_MIPI_DVP_AF_REV1.0.pdf
文件 1644475 2012-08-14 16:45 ov5640\OV5640_CSP3_DS_1.0_Action.pdf
目录 0 2012-08-23 13:39 ov5640
----------- --------- ---------- ----- ----
11167673 6
评论
共有 条评论