本文整理汇总了C++中read_reg_v2函数的典型用法代码示例。如果您正苦于以下问题:C++ read_reg_v2函数的具体用法?C++ read_reg_v2怎么用?C++ read_reg_v2使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了read_reg_v2函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
int array[4];
char buffer[5];
char id_high=0;
char id_low=0;
int id=0;
SET_RESET_PIN(1);
SET_RESET_PIN(0);
MDELAY(10);
SET_RESET_PIN(1);
MDELAY(200);
array[0] = 0x00053700;
dsi_set_cmdq(array, 1, 1);
read_reg_v2(0xa1, buffer, 5);
id_high = buffer[2];
id_low = buffer[3];
id = (id_high<<8) | id_low;
#if defined(BUILD_UBOOT)
//printf("OTM8018B uboot %s \n", __func__);
//printf("%s id = 0x%08x \n", __func__, id);
#else
//printk("OTM8018B kernel %s \n", __func__);
//printk("%s id = 0x%08x \n", __func__, id);
#endif
return (LCM_ID_OTM8018B == id)?1:0;
}
开发者ID:darklord4822,项目名称:cyanogenmod_kernel_hs_zerafrs,代码行数:32,代码来源:otm8018b_wvga_dsi_vdo_dijing.c
示例2: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
int array[4];
char buffer[5];
unsigned int id=0;
#if defined(BUILD_LK)
upmu_set_rg_vgp2_vosel(5);
upmu_set_rg_vgp2_en(1);
upmu_set_rg_vgp3_vosel(3);
upmu_set_rg_vgp3_en(1);
#else
hwPowerOn(MT6323_POWER_LDO_VGP2, VOL_2800, "Lance_LCM");
hwPowerOn(MT6323_POWER_LDO_VGP3, VOL_1800, "Lance_LCM");
#endif
MDELAY(100);
SET_RESET_PIN(1);
MDELAY(5);
SET_RESET_PIN(0);
MDELAY(30);
SET_RESET_PIN(1);
MDELAY(120);
array[0] = 0x00083700;// read id return two byte,version and id
dsi_set_cmdq(array, 1, 1);
read_reg_v2(0xA1,buffer,4);
id=(buffer[2]<<8)+buffer[3];
Lcd_Log("mycat lcd id: 0x%08x\n", id);
return (LCM_ID == id)?1:0;
}
开发者ID:SeriniTY320,项目名称:mediatek,代码行数:35,代码来源:otm9608a_hengsheng_TM_dsi_2_qhd.c
示例3: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
unsigned int id=0;
unsigned char buffer[2];
unsigned int array[16];
SET_RESET_PIN(1);
SET_RESET_PIN(0);
MDELAY(1);
SET_RESET_PIN(1);
MDELAY(20);
array[0] = 0x00023700;// read id return two byte,version and id
dsi_set_cmdq(array, 1, 1);
read_reg_v2(0xF4, buffer, 2);
id = buffer[0]; //we only need ID
#ifdef BUILD_LK
printf("%s, LK nt35590 debug: nt35590 id = 0x%08x\n", __func__, id);
#else
printk("%s, kernel nt35590 horse debug: nt35590 id = 0x%08x\n", __func__, id);
#endif
if(id == LCM_ID_NT35590)
return 1;
else
return 0;
}
开发者ID:beyondmtk,项目名称:MT6589_kernel_source,代码行数:31,代码来源:r63311_fhd_dsi_vdo_sharp.c
示例4: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
unsigned int id = 0;
unsigned char buffer[2] = { 0 };
unsigned int data_array[16];
SET_RESET_PIN(1);
SET_RESET_PIN(0);
MDELAY(5);
SET_RESET_PIN(1);
MDELAY(20);
data_array[0] = 0x00063902;
data_array[1] = 0x52AA55F0;
data_array[2] = 0x00000108;
dsi_set_cmdq(data_array, 3, 1);
MDELAY(10);
data_array[0] = 0x00023700;
dsi_set_cmdq(data_array, 1, 1);
MDELAY(10);
read_reg_v2(0xC5, buffer, 2);
id = buffer[0];
return (LCM_ID1 == id) ? 1 : 0;
}
开发者ID:John677,项目名称:Kernal_k3note,代码行数:27,代码来源:nt35510_dsi_cmd.c
示例5: lcm_esd_check
static unsigned int lcm_esd_check(void)
{
#ifndef BUILD_LK
static int ok_count = 0;
unsigned char buffer[12];
unsigned int array[16];
int i;
if(lcm_esd_test)
{
lcm_esd_test = 0;
return 1;
}
array[0] = 0x00013700;
dsi_set_cmdq(array, 1, 1);
//MDELAY(20);
read_reg_v2(0x0A, buffer, 1);
printk("mycat$$ ### esd check buffer[0] = 0x%x\r\n",buffer[0]);
if(buffer[0] == 0x9C)//9C
return 0;
else
return 1;
#endif
}
开发者ID:SeriniTY320,项目名称:mediatek,代码行数:29,代码来源:otm8018b_hongsheng_HS4501213B_BOE_dsi_vdo_2_fwvga.c
示例6: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
unsigned int id = 0;
unsigned char buffer[5];
unsigned int array[16];
SET_RESET_PIN(1); //NOTE:should reset LCM firstly
MDELAY(10);
SET_RESET_PIN(0);
MDELAY(50);
SET_RESET_PIN(1);
MDELAY(50);
array[0] = 0x00053700; // read id return two byte,version and id
dsi_set_cmdq(array, 1, 1);
read_reg_v2(0xa1, buffer, 5);
id = ((buffer[2] << 8) | buffer[3]); //we only need ID
#ifdef BUILD_LK
printf("[erick-lk]%s, otm9605a id = 0x%08x\n", __func__, id);
#else
printk("[erick-k]%s, otm9605a id = 0x%08x\n", __func__, id);
#endif
return (LCM_ID == id&&get_lcd_id()==1)?1:0;
//return (LCM_ID == id)?1:0;
// return (get_lcd_id()==0)?1:0;
}
开发者ID:rock12,项目名称:mediatek,代码行数:29,代码来源:otm9605_rixin_NST500QH2302ANJ_LG_dsi_vdo_qhd.c
示例7: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
unsigned int id=0;
unsigned int id1=0;
unsigned char buffer[2];
unsigned int array[16];
SET_RESET_PIN(1);
SET_RESET_PIN(0);
MDELAY(1);
SET_RESET_PIN(1);
MDELAY(10);//Must over 6 ms
array[0]=0x00043902;
array[1]=0x8983FFB9;// page enable
dsi_set_cmdq(&array, 2, 1);
MDELAY(10);
array[0] = 0x00023700;// return byte number
dsi_set_cmdq(&array, 1, 1);
MDELAY(10);
read_reg_v2(0xF4, buffer, 2);
id = buffer[0];
id1 = buffer[0]<<8 |buffer[1];
LCM_DBG("[WUHAI] -- hx8389b 0x%x , 0x%x , 0x%x , 0x%x \n",buffer[0],buffer[1],id,id1);
#if defined(BUILD_UBOOT) || defined(BUILD_LK)
return 1;//lcm_adc_read_chip_id();
#endif
return 1 ;
}
开发者ID:kashifmin,项目名称:BLU_LIFE_ONE,代码行数:33,代码来源:hx8389b_qhd_dsi_vdo_tcl.c
示例8: test_compare_id
static unsigned int test_compare_id(void)
{
unsigned int id=0;
unsigned int id1=0;
unsigned char buffer[2];
unsigned int array[16];
array[0]=0x00043902;
array[1]=0x8983FFB9;// page enable
dsi_set_cmdq(&array, 2, 1);
MDELAY(10);
array[0] = 0x00023700;// return byte number
dsi_set_cmdq(&array, 1, 1);
MDELAY(10);
read_reg_v2(0xF4, buffer, 2);
id = buffer[0];
id1 = buffer[0]<<8 |buffer[1];
LCM_DBG("[WUHAI] -- hx8389b 0x%x , 0x%x , 0x%x , 0x%x \n",buffer[0],buffer[1],id,id1);
if(LCM_ID_HX8389B == id){
//#if defined(BUILD_UBOOT) || defined(BUILD_LK)
if(lcm_adc_read_chip_id())
return 1;
else
return 0;//Default LCM
//#endif
return 1;
}
return 0 ;
}
开发者ID:kashifmin,项目名称:BLU_LIFE_ONE,代码行数:34,代码来源:hx8389b_qhd_dsi_vdo_tcl.c
示例9: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
//return 1;
unsigned int id = 0,id1=0,id2 = 0;
unsigned char buffer[2];
unsigned int data_array[16];
SET_RESET_PIN(1); //NOTE:should reset LCM firstly
MDELAY(10);
SET_RESET_PIN(0);
MDELAY(10);
SET_RESET_PIN(1);
MDELAY(10);
//*************Enable CMD2 Page1 *******************//
data_array[0]=0x00063902;
data_array[1]=0x52AA55F0;
data_array[2]=0x00000108;
dsi_set_cmdq(data_array, 3, 1);
MDELAY(10);
data_array[0] = 0x00023700;// read id return two byte,version and id
dsi_set_cmdq(data_array, 1, 1);
MDELAY(10);
read_reg_v2(0xC5, buffer, 2);
id1 = buffer[0]; //we only need ID
id2= buffer[1]; //we test buffer 1
id = (id1<<8) | id2;
return (0x5517 == id)?1:0;
}
开发者ID:SeriniTY320,项目名称:mediatek,代码行数:59,代码来源:nt35517_rixin_NST446QH3912ANJ_CMI_dsi_qhd.c
示例10: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
unsigned int id = 0, id2 = 0;
unsigned char buffer[4];
unsigned int array[16];
// push_table(lcm_compare_id_setting, sizeof(lcm_compare_id_setting) / sizeof(struct LCM_setting_table), 1);
//Ivan
// 00 = MTK Config = Type 0 Instruction = Short Packet read/write
// 37 = DSI Data type = Set Maximum return packet size
// 0003 = data length = 3 bytes data to read
//Data = 00/11/22/33
// config_gpio();
/*
SET_RESET_PIN(1); //NOTE:should reset LCM firstly
MDELAY(10);
SET_RESET_PIN(0);
MDELAY(10);
SET_RESET_PIN(1);
MDELAY(120);
array[0] = 0x00013700;// read id return two byte,version and id
dsi_set_cmdq(array, 1, 1);
MDELAY(10);
read_reg_v2(0xDB, buffer, 1);
id = buffer[0]; //we only need ID
*/
SET_RESET_PIN(1); //NOTE:should reset LCM firstly
MDELAY(10);
SET_RESET_PIN(0);
MDELAY(10);
SET_RESET_PIN(1);
MDELAY(120);
buffer[0] = 0;
buffer[1] = 0;
buffer[2] = 0;
buffer[3] = 0;
array[0]=0x00063902;
array[1]=0x52AA55F0;
array[2]=0x00000108;
dsi_set_cmdq(&array, 3, 1);
MDELAY(10);
array[0] = 0x00023700;// read id return two byte,version and id
dsi_set_cmdq(array, 1, 1);
MDELAY(10);
read_reg_v2(0xC5, buffer, 2);
id = buffer[0]; //we only need ID
id2= buffer[1]; //we test buffer 1
LCM_DBG("ID1 = %x, ID2 = %x, ID3 = %x, ID4 = %x", buffer[0],buffer[1],buffer[2],buffer[3]);
// return (LCM_ID == id)?1:0;
return 1;
}
开发者ID:4Fwolf,项目名称:lcm_drivers,代码行数:59,代码来源:nt35510_dsi.c
示例11: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
unsigned int data_array[16];
unsigned int id=0;
unsigned char buff[3];
unsigned char id_04;
SET_RESET_PIN(1);
MDELAY(1);
SET_RESET_PIN(0);
MDELAY(10);
SET_RESET_PIN(1);
MDELAY(50);
data_array[0]=0x00043902;
data_array[1]=0x9483FFB9;
dsi_set_cmdq(&data_array,2,1);
MDELAY(10);
data_array[0]=0x13BA1502;
dsi_set_cmdq(&data_array,1,1);
MDELAY(10);
data_array[0] = 0x00033700;
dsi_set_cmdq(&data_array, 1, 1);
MDELAY(10);
read_reg_v2(0x04,buff, 3);
id_04 = buff[0];
mt_set_gpio_mode(142,0); // gpio mode high
mt_set_gpio_pull_enable(142,0);
mt_set_gpio_dir(142,0); //input
id = mt_get_gpio_in(142);//should be 0
#if defined(BUILD_LK)
printf(" BUILD_LK m_compare_id id_04 = %x,buff = %x,%x.%x-----------------\n", id_04,buff[0],buff[1],buff[2]);
printf("BUILD_LK cm_compare_id id = %x-----------------\n", id);
#elif defined(BUILD_UBOOT)
printf(" BUILD_UBOOT m_compare_id id_04 = %x,buff = %x,%x.%x-----------------\n", id_04,buff[0],buff[1],buff[2]);
printf("BUILD_UBOOT cm_compare_id id = %x-----------------\n", id);
#else
printk(" lcm_compare_id id_04 = %x,buff = %x,%x.%x-----------------\n", id_04,buff[0],buff[1],buff[2]);
printk("lcm_compare_id id = %x-----------------\n", id);
#endif
if((id_04 & 0xff) == 0x1C)
{
return 0;
}
else if(id == LCM_ID)
{
return 1;
}
else
{
return 0;
}
}
开发者ID:4Fwolf,项目名称:ALCATEL_LCM,代码行数:59,代码来源:hx8394a.c
示例12: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
#if 0
unsigned int id=0;
unsigned char buffer[2];
unsigned int array[16];
SET_RESET_PIN(1);
SET_RESET_PIN(0);
MDELAY(1);
SET_RESET_PIN(1);
MDELAY(10);//Must over 6 ms
array[0]=0x00043902;
array[1]=0x9483FFB9;// page enable
dsi_set_cmdq(&array, 2, 1);
MDELAY(10);
array[0] = 0x00023700;// return byte number
dsi_set_cmdq(&array, 1, 1);
MDELAY(10);
read_reg_v2(0xF4, buffer, 2);
id = buffer[0];
#ifdef BUILD_LK
printf("HX8394D_dsi_truly %s, id = 0x%08x\n", __func__, id);
#else
printk("HX8394D_dsi_truly %s, id = 0x%08x\n", __func__, id);
#endif
return (LCM_ID_HX8394D == id)?1:0;
#else
unsigned int ret = 0;
ret = mt_get_gpio_in(GPIO17);
#if defined(BUILD_LK)
printf("%s, [jx]hx8394a GPIO17 = %d \n", __func__, ret);
printf("------------------lcm_compare_id\n");
#endif
if(ret == 1)
{
mt_set_gpio_out(GPIO126,1);
}
else{
mt_set_gpio_out(GPIO126,0);
}
//mt_set_gpio_mode(GPIO126, GPIO_MODE_00);
//mt_set_gpio_dir(GPIO126, GPIO_DIR_OUT);
//mt_set_gpio_out(GPIO126,1);
//return (ret == 1)?1:0;
return 0;
#endif
}
开发者ID:LuckJC,项目名称:pro-mk,代码行数:59,代码来源:q500_hx8394_khx5001e12_dsi_vdo.c
示例13: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
int array[4];
char buffer[3];
char id0=0;
char id1=0;
char id2=0;
SET_RESET_PIN(0);
MDELAY(200);
SET_RESET_PIN(1);
MDELAY(200);
array[0] = 0x00033700;// read id return two byte,version and id
dsi_set_cmdq(array, 1, 1);
read_reg_v2(0xDA,buffer, 1);
array[0] = 0x00033700;// read id return two byte,version and id
dsi_set_cmdq(array, 1, 1);
read_reg_v2(0xDB,buffer+1, 1);
array[0] = 0x00033700;// read id return two byte,version and id
dsi_set_cmdq(array, 1, 1);
read_reg_v2(0xDC,buffer+2, 1);
id0 = buffer[0]; //should be 0x00
id1 = buffer[1];//should be 0xaa
id2 = buffer[2];//should be 0x55
#ifdef BUILD_UBOOT
printf("zhibin uboot %s\n", __func__);
printf("%s, id0 = 0x%08x\n", __func__, id0);//should be 0x00
printf("%s, id1 = 0x%08x\n", __func__, id1);//should be 0xaa
printf("%s, id2 = 0x%08x\n", __func__, id2);//should be 0x55
#else
//printk("zhibin kernel %s\n", __func__);
#endif
return 1;
}
开发者ID:4Fwolf,项目名称:lcm_drivers,代码行数:46,代码来源:otm9608_wvga_dsi_cmd.c
示例14: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
unsigned int id=0, id1 = 0,id2 = 0;
unsigned int check_esd = 0;
unsigned int array[16];
unsigned char buffer[4];
int volt = 0;
unsigned int data[4];
array[0] = 0x00043700;// read id return 4 bytes,version and id
dsi_set_cmdq(array, 1, 1);
MDELAY(10);
read_reg_v2(0xA1, buffer, 4);
id1 = buffer[2];
id2 = buffer[3];
id = (id1<<8 | id2);
LCM_DBG("lcm_compare_id read id=0x%x, id1=0x%x, id2=0x%x",id, id1,id2);
array[0] = 0x00033700;// read esd return 3 bytes
dsi_set_cmdq(array, 1, 1);
MDELAY(10);
read_reg_v2(0x0A, buffer, 3);
check_esd = buffer[0];
LCM_DBG("lcm_compare_id read check_esd=0x%x",check_esd);
if(LCM_ID_OTM1283 == id)
{
IMM_GetOneChannelValue(0, data, &volt);
#ifndef BUILD_LK
printk(" lcm_compare_id tcl_oncell lishengli volt = %d ", volt);
#else
printf(" lcm_compare_id tcl_onclee lishengli volt = %d ", volt);
#endif
if(volt > 100)
return 1;
else
return 0;
}
else
return 0;
//return (LCM_ID_OTM1283 == id)?1:0;
}
开发者ID:SiddheshK15,项目名称:WR2-Kernel,代码行数:44,代码来源:otm1283a_hd720_dsi_vdo.c
示例15: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
int array[4];
char buffer[3];
char id0=0;
char id1=0;
char id2=0;
lcm_reset();//must be ahead of this function.
#if defined BUILD_UBOOT
if(lcm_adc_read_chip_id())
return 1;
#endif
array[0] = 0x00033700;// read id return two byte,version and id
dsi_set_cmdq(array, 1, 1);
read_reg_v2(0xDA,buffer, 1);
array[0] = 0x00033700;// read id return two byte,version and id
dsi_set_cmdq(array, 1, 1);
read_reg_v2(0xDB,buffer+1, 1);
array[0] = 0x00033700;// read id return two byte,version and id
dsi_set_cmdq(array, 1, 1);
read_reg_v2(0xDC,buffer+2, 1);
id0 = buffer[0]; //should be 0x00
id1 = buffer[1];//should be 0xaa
id2 = buffer[2];//should be 0x55
#ifdef BUILD_UBOOT
printf("%s, id0 = 0x%08x\n", __func__, id0);//should be 0x00
printf("%s, id1 = 0x%08x\n", __func__, id1);//should be 0xaa
printf("%s, id2 = 0x%08x\n", __func__, id2);//should be 0x55
#endif
return 1;
}
开发者ID:4Fwolf,项目名称:lcm_drivers,代码行数:43,代码来源:otm9608_qhd_dsi_cmd.c
示例16: lcm_esd_check
static unsigned int lcm_esd_check(void)
{
#ifndef BUILD_LK
int array[4];
unsigned char buffer[2];
if(lcm_esd_test)
{
lcm_esd_test = FALSE;
return TRUE;
}
/// please notice: the max return packet size is 1
/// if you want to change it, you can refer to the following marked code
/// but read_reg currently only support read no more than 4 bytes....
/// if you need to read more, please let BinHan knows.
/*
unsigned int data_array[16];
unsigned int max_return_size = 1;
data_array[0]= 0x00003700 | (max_return_size << 16);
dsi_set_cmdq(&data_array, 1, 1);
*/
array[0]=0x00043902;
array[1]=0x9483FFB9;// page enable
dsi_set_cmdq(array, 2, 1);
// MDELAY(20);
array[0]=0x00083902;
array[1]=0x009341BA;// page enable
array[2]=0x1800A416;
dsi_set_cmdq(array, 3, 1);
// MDELAY(10);
array[0] = 0x00023700;// return byte number
dsi_set_cmdq(array, 1, 1);
// MDELAY(10);
read_reg_v2(0x0a, buffer, 1);
#ifndef BUILD_LK
printk("[%s] hct_hx8394f_dsi_vdo_hd_* lcm esd check. arthur %x\n", __FUNCTION__, buffer[0]);
#endif
if(buffer[0] == 0x1c)
{
return FALSE;
}
else
{
return TRUE;
}
#endif
}
开发者ID:P-D-A,项目名称:android_kernel_ark_benefit_m7,代码行数:55,代码来源:hct_hx8394f_dsi_vdo_hd_cmi.c
示例17: lcm_check_state
static unsigned int lcm_check_state()
{
unsigned char buffer_1[12] = {0};
unsigned char buffer_2[12] = {0};
unsigned char buffer_3[12] = {0};
unsigned char buffer_4[12] = {0};
unsigned int array_1[16];
unsigned int array_2[16];
unsigned int array_3[16];
unsigned int array_4[16];
array_1[0] = 0x00013700;
dsi_set_cmdq(array_1, 1,1);
read_reg_v2(0x0A, buffer_1,7);
printk("nt35521_hd720_dsi_vdo_tm buffer_1[0] = %d\n",buffer_1[0]);
array_2[0] = 0x00013700;
dsi_set_cmdq(array_2, 1,1);
read_reg_v2(0x0B, buffer_2,7);
printk("nt35521_hd720_dsi_vdo_tm buffer_2[0] = %d\n",buffer_2[0]);
array_3[0] = 0x00013700;
dsi_set_cmdq(array_3, 1,1);
read_reg_v2(0x0C, buffer_3,7);
printk("nt35521_hd720_dsi_vdo_tm buffer_3[0] = %d\n",buffer_3[0]);
array_4[0] = 0x00013700;
dsi_set_cmdq(array_4, 1,1);
read_reg_v2(0x0D, buffer_4,7);
printk("nt35521_hd720_dsi_vdo_tm buffer_4[0] = %d\n",buffer_4[0]);
if((buffer_1[0] != 0x9C) || (buffer_2[0] != 0x00) || (buffer_3[0] != 0x70) || (buffer_4[0] != 0x00))/*LCD work status error,need re-initalize*/
{
printk("nt35521_hd720_dsi_vdo_tm lcm_esd_check fail! buffer_1[0] = %d buffer_2[0] = %d buffer_3[0] = %d buffer_4[0] = %d\n",buffer_1[0],buffer_2[0],buffer_3[0],buffer_4[0]);
return FALSE;
}
else/*LCD work status ok*/
{
printk("nt35521_hd720_dsi_vdo_tm lcm_esd_check ok! buffer_1[0] = %d buffer_2[0] = %d buffer_3[0] = %d buffer_4[0] = %d\n",buffer_1[0],buffer_2[0],buffer_3[0],buffer_4[0]);
return TRUE;
}
}
开发者ID:jawad6233,项目名称:android_kernel_huawei_h30t00,代码行数:42,代码来源:nt35521_hd720_dsi_vdo_tm.c
示例18: lcm_esd_check
static unsigned int lcm_esd_check(void)
{
#ifndef BUILD_LK
/*
#ifdef BUILD_LK
printf("ccccccccccccccccccccccccccccccccccccccccccccccccccccc");
#else
printk(KERN_ERR "ccccccccccccccccccccccccccccccccccccccccccccccccccccc");
printk(KERN_ERR "ccccccccccccccccccccccccccccccccccccccccccccccccccccc");
printk(KERN_ERR "ccccccccccccccccccccccccccccccccccccccccccccccccccccc");
#endif
*/
int array[4];
char buffer[3]={0};
array[0] = 0x00013700;
dsi_set_cmdq(array, 1, 1);
read_reg_v2(0x0A, buffer, 1);
//#ifndef BUILD_LK
// printk(KERN_ERR "cccccccccccccccccccccccccccbuf0=%4x\n",buffer[0]);
//#endif
if(0x9c == buffer[0])
return FALSE;
else if(0x02 == buffer[0])
{
array[0] = 0x00013700;
dsi_set_cmdq(array, 1, 1);
read_reg_v2(0x0A, buffer, 1);
if(0x9c == buffer[0])
return FALSE;
else if(0x02 == buffer[0])
{
printk(KERN_ERR "nt35517:read register 0x0A=%4x\n",buffer[0]);
return TRUE;
}
}
#endif
}
开发者ID:SeriniTY320,项目名称:mediatek,代码行数:42,代码来源:nt35517_rixin_NST446QH3912ANJ_CMI_dsi_qhd.c
示例19: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
#if 0
unsigned int id,id1=0;
unsigned char buffer[2];
unsigned int array[16];
SET_RESET_PIN(0);
MDELAY(20);
SET_RESET_PIN(1);
MDELAY(20);
array[0]=0x00043902;
array[1]=0x8983FFB9;// page enable
dsi_set_cmdq(array, 2, 1);
//MDELAY(10);
//{0x39,0xBA,7,{0x41,0x93,0x00,0x16,0xA4,0x10,0x18}},
array[0]=0x00083902;
array[1]=0x009341BA;// page enable
array[2]=0x1810a416;
dsi_set_cmdq(array, 3, 1);
array[0] = 0x00043700;// return byte number
dsi_set_cmdq(array, 1, 1);
MDELAY(10);
read_reg_v2(0xF4, buffer, 3);
id = buffer[1];
id1 = buffer[0];
#ifdef BUILD_LK
printf("%s, id = 0x%08x id1=%x \n", __func__, id,id1);
#else
printk("%s, id = 0x%08x id1=%x \n",__func__, id,id1);
#endif
return (LCM_ID_HX8389B == id)?1:0;
#else
unsigned int ret=0;
ret=mt_get_gpio_in(GPIO92);
#ifdef BUILD_LK
printf("read gpio92 = %d \n",ret);
#else
printk("read gpio92 = %d \n",ret);
#endif
return (ret==0)?1:0;
#endif
}
开发者ID:CryToCry96,项目名称:MT6582_kernel_source,代码行数:52,代码来源:hx8389b_qhd_dsi_vdo_tianma.c
示例20: lcm_compare_id
static unsigned int lcm_compare_id()
{
unsigned int id = 0;
unsigned int lcd_id=0;
unsigned char buffer[4];
unsigned int data_array[16];
SET_RESET_PIN(1); //TE:should reset LCM firstly
MDELAY(1);
SET_RESET_PIN(0);
MDELAY(20);
SET_RESET_PIN(1);
MDELAY(120);
#ifdef BUILD_LK
DSI_clk_HS_mode(1);
#endif
MDELAY(10);
#ifdef BUILD_LK
DSI_clk_HS_mode(0);
#endif
//data_array[0]=0x00063902;
//data_array[1]=0x52AA55F0; // SET password
//data_array[2]=0x00000108;
push_table(lcm_read_lcm_compare_id, sizeof(lcm_read_lcm_compare_id) / sizeof(struct LCM_setting_table), 1);
read_reg_v2(0xF4, buffer, 3);
id = buffer[0]; //we only need ID 0x00 0x80 0x00
#ifndef BUILD_LK
printk("<6>zhangjun [lcm_compare_id %x,%x,%x\n",buffer[0],buffer[1],buffer[2]);
#else
printf("<6>zhangjun [lcm_compare_id %x,%x,%x\n",buffer[0],buffer[1],buffer[2]);
#endif
if(0x79!= id)
return 0;
mt_set_gpio_mode(GPIO_LCM_ID, GPIO_LCM_ID_M_GPIO);
mt_set_gpio_dir(GPIO_LCM_ID, GPIO_DIR_IN);
mt_set_gpio_pull_enable(GPIO_LCM_ID,GPIO_PULL_DISABLE);
mt_set_gpio_pull_select(GPIO_LCM_ID,GPIO_PULL_DOWN);
MDELAY(1);
lcd_id = mt_get_gpio_in(GPIO_LCM_ID);
#ifndef BUILD_LK
printk("<6>vendor jingtai [lcm_compare_id] lcd_id =%x\n",lcd_id);
#else
printf("<6>vendor jingtai [lcm_compare_id] lcd_id =%x\n",lcd_id);
#endif
if(lcd_id)
return 0;
else
return 1;
}
开发者ID:SeriniTY320,项目名称:mediatek_drivers,代码行数:52,代码来源:hx8379a_wvga_dsi_vdo_v815w_txd_ips.c
注:本文中的read_reg_v2函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论