资源简介
经过验证的adv7180的驱动,希望大家多多分享,只要分享就自然会有积分下载
代码片段和文件信息
#include “adv7180_hyc.h“
#define DEVICE_NAME “matt_test“
#define I2C_adv7180a 0x40
static int init_adv7180a(void);
static struct i2c_board_info hi_info =
{
I2C_BOARD_INFO(“adv7180“ 0x40)
};
static struct i2c_client* tlv_client;
static int MAJOR_DEV_NUM =1;
int adv7180_write(unsigned char chip_addr unsigned char reg_addr unsigned char value)
{
int ret;
unsigned char buf[2];
struct i2c_client* client = tlv_client;
buf[0] = reg_addr;
buf[1] = value;
ret = i2c_master_send(client buf 2);
return ret;
}
int adv7180_read(unsigned char chip_addr char reg_addr)
{
int ret;
char *tmp=NULL;
tmp=®_addr;
struct i2c_client* client = tlv_client;
ret = i2c_master_recv(client tmp 1);
printk(“matt-ret1=%dval=%x\n“ret*tmp);
return ret;
}
void adv7180_Rese
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 6936 2017-08-21 15:17 hi3516a adv7180驱动\adv7180_hyc.c
文件 1879 2017-08-21 14:12 hi3516a adv7180驱动\adv7180_hyc.h
目录 0 2017-08-22 16:46 hi3516a adv7180驱动
----------- --------- ---------- ----- ----
8815 3
评论
共有 条评论