ILI9805C DSI如何读ID?
时间:10-02
整理:3721RD
点击:
72平台,有人读过这个屏的ID吗,我现在读的时候一直超时,另一个屏读ID是OK的,
static unsigned int LCM_compare_id(void)
{
int array[4];
char buffer[6] = {0};
unsigned int id=0;
char retry = 0;
SET_RESET_PIN(1);
MDELAY(10);
SET_RESET_PIN(0);
MDELAY(100);
SET_RESET_PIN(1);
MDELAY(120);
array[0] = 0x00033902;
array[1] = 0x0598FFFF;
dsi_set_cmdq(&array, 2, 1);
array[0] = 0x00043700;// read id return two byte,version and id
dsi_set_cmdq(array, 1, 1);
read_reg_v2(0xD3, buffer, 4);
id = buffer[2] << 8 | buffer[3]; //we only need ID
PRINT_LOG("\n\n%s, lcm_read id=0x%02x %02x %02x %02x\n", __func__, buffer[0], buffer[1], buffer[2], buffer[3]);
return (LCM_ID == id) ? 1 : 0;
}
static unsigned int LCM_compare_id(void)
{
int array[4];
char buffer[6] = {0};
unsigned int id=0;
char retry = 0;
SET_RESET_PIN(1);
MDELAY(10);
SET_RESET_PIN(0);
MDELAY(100);
SET_RESET_PIN(1);
MDELAY(120);
array[0] = 0x00033902;
array[1] = 0x0598FFFF;
dsi_set_cmdq(&array, 2, 1);
array[0] = 0x00043700;// read id return two byte,version and id
dsi_set_cmdq(array, 1, 1);
read_reg_v2(0xD3, buffer, 4);
id = buffer[2] << 8 | buffer[3]; //we only need ID
PRINT_LOG("\n\n%s, lcm_read id=0x%02x %02x %02x %02x\n", __func__, buffer[0], buffer[1], buffer[2], buffer[3]);
return (LCM_ID == id) ? 1 : 0;
}