• 大小: 21KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-08
  • 语言: 其他
  • 标签: ov5648  

资源简介

OV5648摄像头linux mipi 2lane驱动代码,前摄像头linux驱动代码,默认参数。

资源截图

代码片段和文件信息


#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include “ov5648_2lane_26m.h“

#define OV5648_CHIP_ID_H (0x56)
#define OV5648_CHIP_ID_L (0x48)

#define SXGA_WIDTH 1280
#define SXGA_HEIGHT 960
#define MAX_WIDTH 2560
#define MAX_HEIGHT 1920
#define MAX_PREVIEW_WIDTH SXGA_WIDTH
#define MAX_PREVIEW_HEIGHT  SXGA_HEIGHT

#define OV5648_REG_END 0xffff
#define OV5648_REG_DELAY 0xfffe

#define OV5648_REG_VAL_PREVIEW  0xff
#define OV5648_REG_VAL_SNAPSHOT 0xfe

static int sensor_get_aecgc_win_setting(int width int heightint meter_mode void **vals);

struct ov5648_format_struct;
struct ov5648_info {
struct v4l2_subdev sd;
struct ov5648_format_struct *fmt;
struct ov5648_win_size *win;
unsigned short vts_address1;
unsigned short vts_address2;
int frame_rate;
int binning;
};

struct regval_list {
unsigned short reg_num;
unsigned char value;
};

struct otp_struct {
unsigned int module_integrator_id;
unsigned int lens_id;
unsigned int rg_ratio;
unsigned int bg_ratio;
unsigned int user_data[3];
unsigned int light_rg;
unsigned int light_bg;
};

static struct regval_list ov5648_init_regs[] = {

{0x01030x01}
{OV5648_REG_DELAY 5}//delay(5ms)
{0x30010x00}
{0x30020x00}
{0x30110x02}
{0x30170x05}
{0x30180x4c}
{0x301c0xd2}
{0x30220x00}
{0x30340x1a}
{0x30350x21}
{0x30360x63}
{0x30370x03}
{0x30380x00}
{0x30390x00}
{0x303a0x00}
{0x303b0x18}
{0x303c0x11}
{0x303d0x30}
{0x31050x11}
{0x31060x05}
{0x33040x28}
{0x33050x41}
{0x33060x30}
{0x33080x00}
{0x33090xc8}
{0x330a0x01}
{0x330b0x90}
{0x330c0x02}
{0x330d0x58}
{0x330e0x03}
{0x330f0x20}
{0x33000x00}
{0x35000x00}
{0x35010x7b}
{0x35020x00}
{0x35030x07}
{0x350a0x00}
{0x350b0x40}
{0x36010x33}
{0x36020x00}
{0x36110x0e}
{0x36120x2b}
{0x36140x50}
{0x36200x33}
{0x36220x00}
{0x36300xad}
{0x36310x00}
{0x36320x94}
{0x36330x17}
{0x36340x14}
{0x37040xc0}
{0x37050x2a}
{0x37080x63}
{0x37090x12}
{0x370b0x23}
{0x370c0xcc}
{0x370d0x00}
{0x370e0x00}
{0x371c0x07}
{0x37390xd2}
{0x373c0x00}
{0x38000x00}
{0x38010x00}
{0x38020x00}
{0x38030x00}
{0x38040x0a}
{0x38050x3f}
{0x38060x07}
{0x38070xa3}
{0x38080x0a}
{0x38090x00}
{0x380a0x07}
{0x380b0x80}
{0x380c0x0b}
{0x380d0x20}
{0x380e0x07}
{0x380f0xd0}
{0x38100x00}
{0x38110x10}
{0x38120x00}
{0x38130x06}
{0x38140x11}
{0x38150x11}
{0x38170x00}
{0x38200x40}
{0x38210x06}
{0x38260x03}
{0x38290x00}
{0x382b0x0b}
{0x38300x00}
{0x38360x00}
{0x38370x00}
{0x38380x00}
{0x38390x04}
{0x383a0x00}
{0x383b0x01}
{0x3b000x00}
{0x3b020x08}
{0x3b030x00}
{0x3b0

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件       41351  2018-04-03 05:49  ov5648_2lane_26m.c
     文件       70651  2018-04-03 05:49  ov5648_2lane_26m.h

评论

共有 条评论