资源简介
四路AHD同时输入转MIPI的max9286+96705驱动,欢迎大家下载!

代码片段和文件信息
/*
* Copyright 2017-2018 NXP
*/
/*
* The code contained herein is licensed under the GNU General Public
* License. You may obtain a copy of the GNU General Public License
* Version 2 or later at the following locations:
*
* http://www.opensource.org/licenses/gpl-license.html
* http://www.gnu.org/copyleft/gpl.html
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define MAX9271_MAX_SENSOR_NUM 4
#define CAMERA_USES_15HZ
#define ADDR_MAX9286 0x6A
#define ADDR_MAX9271 0x40
#define ADDR_MAX9271_ALL (ADDR_MAX9271 + 5) /* Broadcast address */
#define MIPI_CSI2_SENS_VC0_PAD_SOURCE 0
#define MIPI_CSI2_SENS_VC1_PAD_SOURCE 1
#define MIPI_CSI2_SENS_VC2_PAD_SOURCE 2
#define MIPI_CSI2_SENS_VC3_PAD_SOURCE 3
#define MIPI_CSI2_SENS_VCX_PADS_NUM 4
#define MAX_FPS 30
#define MIN_FPS 30
#define DEFAULT_FPS 30
#define ADDR_OV_SENSOR 0x30
#define ADDR_AP_SENSOR 0x5D
/*!
* Maintains the information on the current state of the sesor.
*/
struct imxdpu_videomode {
char name[64]; /* may not be needed */
uint32_t pixelclock; /* Hz */
/* htotal (pixels) = hlen + hfp + hsync + hbp */
uint32_t hlen;
uint32_t hfp;
uint32_t hbp;
uint32_t hsync;
/* field0 - vtotal (lines) = vlen + vfp + vsync + vbp */
uint32_t vlen;
uint32_t vfp;
uint32_t vbp;
uint32_t vsync;
/* field1 */
uint32_t vlen1;
uint32_t vfp1;
uint32_t vbp1;
uint32_t vsync1;
uint32_t flags;
uint32_t format;
uint32_t dest_format; /*buffer format for capture*/
int16_t clip_top;
int16_t clip_left;
uint16_t clip_width;
uint16_t clip_height;
};
struct sensor_data {
struct v4l2_subdev subdev;
struct media_pad pads[MIPI_CSI2_SENS_VCX_PADS_NUM];
struct i2c_client *i2c_client;
struct v4l2_mbus_framefmt format;
struct v4l2_captureparm streamcap;
char running;
/* control settings */
int brightness;
int hue;
int contrast;
int saturation;
int red;
int green;
int blue;
int ae_mode;
u32 mclk;
u8 mclk_source;
struct clk *sensor_clk;
int v_channel;
bool is_mipi;
struct imxdpu_videomode cap_mode;
unsigned int sensor_num; /* sensor num connect max9271 */
unsigned char sensor_is_there; /* Bit 0~3 for 4 cameras 0b1= is there; 0b0 = is not there */
int pwn_gpio;
};
static unsigned int g_max9286_width = 1280;
static unsigned int g_max9286_height = 800;
#define OV10635_REG_PID 0x300A
#define OV10635_REG_VER 0x300B
struct reg_value {
unsigned short reg_addr;
unsigned char val;
unsigned int delay_ms;
};
enum ov10635_frame_rate {
OV10635_30_FPS
};
static struct reg_value ov10635_init_data[] = {
{ 0x0103 0x01 0 }
{ 0x300c 0x61 0 }
{ 0x300c 0x61 0 }
{ 0x300c 0x61 0 }
{ 0x300c 0x61 0 }
{ 0x
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 70741 2019-05-23 08:35 max9286.c
- 上一篇:STM32-DS18B20.zip
- 下一篇:数据库练习数据
相关资源
- Hi3536 Linux开发环境用户指南
- 制作mipsel-linux交叉编译工具
- linux系统下的内存测试工具
- GNU/Linux系统开发者需要从桌面突破
- the_definitive_guide_to_linux_network_programm
- linux-shell脚本命令:grep命令简介
- Learning Linux Binary Analysis
- 蓝牙源代码应用于LINUX
- uboot到linux logo显示不间断 补丁
- UNIX/LINUX编程实践教程的源码
- Linux任务管理器
- linux应用层的华容道游戏源代码
- ubuntu9.10 可加载内核模块和字符设备驱
- MP3文件ID3v2ID3v2APEv2标签读取
- 操作系统实验——虚存管理实验
- linux下的发包工具sendip
- 尚观培训linux许巍关于c 的笔记和讲义
- 尚观培训linux董亮老师关于数据结构的
- linux 线程池源码 c 版
- linux C 电梯程序练习
- linux下用多进程同步方法解决生产者
- Linux 操作系统实验(全)
- Linux From Scratch 中文手册
- linux 网络实验 ftp程序
- Linux命令大全离线版&在线版
- 操作系统共享内存实验
- dos 下运行Linux 命令--gnu_utils
- linux 0.12内核源代码
- linux简易shell C实现
- linux实验报告及心得体会
评论
共有 条评论