资源简介
四路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
- 下一篇:数据库练习数据
相关资源
- 三期视频网上买的,带课件,安装包
- 基于Linux的网络聊天室.rar
- linux 命令.docx
- linux 下QT讯飞语音合成demo
- linux下查看端口是否被占用以及查看所
- socket编程常用API汇总
- arcsde10.2百度云连接linux版本
- 嵌入式uClinux应用程序的NFS开发
- 如何将windows里面的文件导入到Linux虚
- SUSE Linux Enterprise Server 11 SP4 使用
- linux安装abaqus2017破解版
- 最全Linux常用命令大全.docx
- rarlinux-x64-5.5.0.tar.gz
- ADV7441 Linux 驱动源码
- keepalived-1.2.24.tar.gz+memcached-1.4.33.tar.
- QT_的socket_与_Linux_的socket通信Linux
- Linux FTP源代码
- linux下文件及目录的监控程序
- linux下QT中文滚屏小程序
- 嵌入式LINUX基础教程中文第2版 --百度
- LinuxVM虚拟机镜像.docx
- 经典Linux系统裁剪指南
- Linux DHCP图形化管理工具
- linux下QT5十字路口红绿灯信号灯模拟程
- 跟老男孩学linux三剑客命令
- Linux下C实现的聊天室
- linux下的QT登陆界面用户名,密码
- linux2.6.32exp
- linux_sntp精确到秒级服务器
- linux系统下实现聊天室
评论
共有 条评论