本文整理汇总了C++中send_data_cmd函数的典型用法代码示例。如果您正苦于以下问题:C++ send_data_cmd函数的具体用法?C++ send_data_cmd怎么用?C++ send_data_cmd使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了send_data_cmd函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: lcm_update_black
static void lcm_update_black(unsigned int x, unsigned int y,unsigned int width, unsigned int height, unsigned short data)
{
unsigned int x0 = x;
unsigned int y0 = y;
unsigned int x1 = x0 + width;
unsigned int y1 = y0 + height + 2;
unsigned int k, i;
send_ctrl_cmd(0x2A);
send_data_cmd(HIGH_BYTE(x0));
send_data_cmd(LOW_BYTE(x0));
send_data_cmd(HIGH_BYTE(x1));
send_data_cmd(LOW_BYTE(x1));
send_ctrl_cmd(0x2B);
send_data_cmd(HIGH_BYTE(y0));
send_data_cmd(LOW_BYTE(y0));
send_data_cmd(HIGH_BYTE(y1));
send_data_cmd(LOW_BYTE(y1));
send_ctrl_cmd(0x2C);
for (i = x0; i < x1; i++)
{
for (k = y0; k < y1; k++)
{
send_data_cmd(data);
send_data_cmd(data);
}
}
}
示例2: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
unsigned int id1 = 0;
unsigned int id2 = 0;
unsigned int id = 0;
//unsigned char data[4];
//#ifdef BUILD_LK
//unsigned int lcm_idpin_value = 0;
// lcm_idpin_value = lcm_check_idpin_adc(ADC_CHECK_COUNT);
//#endif
config_gpio();//config gpio before use spi
MDELAY(1);
SET_RESET_PIN(1);
MDELAY(10);
SET_RESET_PIN(0);
MDELAY(50);
SET_RESET_PIN(1);
MDELAY(120);
send_ctrl_cmd(0xb0);
//send_data_cmd(0x83);//bit7=7,sdo disable,sdo/sdi use the same pin
send_data_cmd(0x03);//bit7=0,sdo en
send_ctrl_cmd(0xfb);
send_data_cmd(0x12);
id1=spi_get_data(0xd3);
send_ctrl_cmd(0xfb);
send_data_cmd(0x13);
id2=spi_get_data(0xd3);
id = (id1<<8)|id2;//ic id
#ifdef BUILD_LK
printf("by35hh_lcd_id=0x%x \r\n",id);
//printf("by35hp_lcd_id data=0x%x,0x%x,0x%x,0x%x \r\n",data[0],data[1],data[2],data[3]);
#else
printk("by35hh_lcd_id=0x%x\r\n",id);
#endif
//#ifdef BUILD_LK
// if(/*(LCM_ID == id) || */( lcm_idpin_value >= 190))//id pin voltage is about 2.0v
//#else
if(LCM_ID == id)
//#endif
{
return 1;
}
else
{
return 0;
}
//return (LCM_ID == id)?1:0;
}
示例3: lcm_resume
static void lcm_resume(void)
{
#if 1
send_ctrl_cmd(0x1100);
MDELAY(120);
send_ctrl_cmd(0x2900);
MDELAY(50);
#else
unsigned int lcd_id = 0;
SET_RESET_PIN(1);
MDELAY(5);
SET_RESET_PIN(0);
MDELAY(50);
SET_RESET_PIN(1);
MDELAY(100); // 400
send_ctrl_cmd(0xB9);
send_data_cmd(0xFF);
send_data_cmd(0x83);
send_data_cmd(0x63);
UDELAY(10);
lcd_id = get_lcd_id_n(LCM_ID_REG, 2) & 0xFF;
LCD_PRINT(LCM_NAME"lcm_resume: lcd_id = 0x%x\n", lcd_id);
init_lcm_registers();
#endif
}
示例4: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
unsigned int lcd_id = 0;
SET_RESET_PIN(1);
MDELAY(5);
SET_RESET_PIN(0);
MDELAY(50);
SET_RESET_PIN(1);
MDELAY(120);
send_ctrl_cmd(0xF000);send_data_cmd(0x55);
send_ctrl_cmd(0xF001);send_data_cmd(0xAA);
send_ctrl_cmd(0xF002);send_data_cmd(0x52);
send_ctrl_cmd(0xF003);send_data_cmd(0x08);
send_ctrl_cmd(0xF004);send_data_cmd(0x01);
UDELAY(10);
lcd_id = get_lcd_id_r(LCM_ID_REG) & 0xFF;
lcd_id = (lcd_id << 8) | (get_lcd_id_r(LCM_ID_REG + 1) & 0xFF);
LCD_PRINT(LCM_NAME"lcm_compare_id: lcd_id = 0x%x\n", lcd_id);
return (LCM_ID == lcd_id)?1:0;
}
示例5: lcm_resume
static void lcm_resume(void)
{
#if 1
send_ctrl_cmd(0x11);
MDELAY(120);
send_ctrl_cmd(0x29);
MDELAY(50);
#else
unsigned int lcd_id = 0;
SET_RESET_PIN(1);
MDELAY(5);
SET_RESET_PIN(0);
MDELAY(20);
SET_RESET_PIN(1);
MDELAY(20); // 400
send_ctrl_cmd(0xB9);
send_data_cmd(0xFF);
send_data_cmd(0x83);
send_data_cmd(0x57);
UDELAY(10);
lcd_id = get_lcd_id_n(LCMID_REG, 2);
LCD_PRINT("[JINCHI35_HX8357C]lcm_resume: lcd_id = 0x%x\n", lcd_id);
#if 0//ndef BUILD_UBOOT
print_lcm_registers();
#endif
init_lcm_registers();
#endif
}
示例6: lcm_update_black
static void lcm_update_black(unsigned int x, unsigned int y,unsigned int width, unsigned int height, unsigned short data)
{
unsigned int x0 = x;
unsigned int y0 = y;
unsigned int x1 = x0 + width;
unsigned int y1 = y0 + height + 2;
unsigned int k, i;
set_lcm_register(0x2A00, HIGH_BYTE(x0), 0);
set_lcm_register(0x2A01, LOW_BYTE(x0), 0);
set_lcm_register(0x2A02, HIGH_BYTE(x1), 0);
set_lcm_register(0x2A03, LOW_BYTE(x1), 0);
set_lcm_register(0x2B00, HIGH_BYTE(y0), 0);
set_lcm_register(0x2B01, LOW_BYTE(y0), 0);
set_lcm_register(0x2B02, HIGH_BYTE(y1), 0);
set_lcm_register(0x2B03, LOW_BYTE(y1), 0);
send_ctrl_cmd(0x2C00);
for (i = x0; i < x1; i++)
{
for (k = y0; k < y1; k++)
{
send_data_cmd(data);
send_data_cmd(data);
}
}
}
示例7: lcm_resume
static void lcm_resume(void)
{
#if 1
send_ctrl_cmd(0x1100);
MDELAY(120);
send_ctrl_cmd(0x2900);
MDELAY(50);
#else
unsigned int lcd_id = 0;
SET_RESET_PIN(1);
MDELAY(5);
SET_RESET_PIN(0);
MDELAY(50);
SET_RESET_PIN(1);
MDELAY(100); // 400
send_ctrl_cmd(0xF000);send_data_cmd(0x55);
send_ctrl_cmd(0xF001);send_data_cmd(0xAA);
send_ctrl_cmd(0xF002);send_data_cmd(0x52);
send_ctrl_cmd(0xF003);send_data_cmd(0x08);
send_ctrl_cmd(0xF004);send_data_cmd(0x01);
UDELAY(10);
lcd_id = get_lcd_id_r(LCM_ID_REG) & 0xFF;
lcd_id = (lcd_id << 8) | (get_lcd_id_r(LCM_ID_REG + 1) & 0xFF);
LCD_PRINT(LCM_NAME"lcm_resume: lcd_id = 0x%x\n", lcd_id);
init_lcm_registers();
#endif
}
示例8: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
unsigned int id = 0,ID_PIN =2;
send_ctrl_cmd(0xB9); // SET password
send_data_cmd(0xFF);
send_data_cmd(0x83);
send_data_cmd(0x69);
send_ctrl_cmd(0xC3);
send_data_cmd(0xFF);
send_ctrl_cmd(0xF4);
read_data_cmd();
id = read_data_cmd();
#if defined(BUILD_LK)
printf("xxxxx MYCAT hx8369_p908 READ ID = 0x%x\n", id);
#else
printk("xxxxx MYCAT hx8369_p908 READ ID = 0x%x\n", id);
#endif
mt_set_gpio_mode(GPIO_LCD_ID_PIN,0);
mt_set_gpio_dir(GPIO_LCD_ID_PIN,0);
mt_set_gpio_pull_enable(GPIO_LCD_ID_PIN,1);
mt_set_gpio_pull_select(GPIO_LCD_ID_PIN,1);
MDELAY(1);
ID_PIN=mt_get_gpio_in(GPIO_LCD_ID_PIN);
#if defined(BUILD_LK)
printf("xxxxx MYCAT ID_PIN = 0x%x\n", ID_PIN);
#else
printk("xxxxx MYCAT ID_PIN = 0x%x\n", ID_PIN);
#endif
// return ((LCM_ID == id)&&(ID_PIN==0))?1:0;
return (LCM_ID == id)?1:0;
}
示例9: lcm_init
static void lcm_init(void)
{
//unsigned int lcd_id = 0;
SET_RESET_PIN(1);
MDELAY(10);
SET_RESET_PIN(0);
MDELAY(100);
SET_RESET_PIN(1);
// Advises that should hold high level for about 120 ms as for HX... series lcd ic
MDELAY(120);
//MDELAY(50);
//lcd_id = get_lcd_id_n(LCMID_REG, 2);
//LCD_PRINT("[XXD35_ILI9486L]lcm_init: lcd_id = 0x%x\n", lcd_id);
init_lcm_registers();
lcm_update_black(0, 0, FRAME_WIDTH, FRAME_HEIGHT, 0x00);
#if 0
//Set TE register
send_ctrl_cmd(0x35);
send_data_cmd(0x00);
send_ctrl_cmd(0X0044); // Set TE signal delay scanline
send_data_cmd(0X0000); // Set as 0-th scanline
send_data_cmd(0X0000);
//sw_clear_panel(0);
#endif
}
示例10: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
unsigned int id1 = 0;
unsigned int id2 = 0;
unsigned int id = 0;
#ifdef BUILD_LK
unsigned int lcm_idpin_value = 0;
lcm_idpin_value = lcm_check_idpin_adc(ADC_CHECK_COUNT);
#endif
config_gpio();
SET_RESET_PIN(1);
MDELAY(1);
SET_RESET_PIN(0);
MDELAY(20);
SET_RESET_PIN(1);
MDELAY(120);
//send_ctrl_cmd(0xb0);
send_ctrl_cmd(0xb0);
//send_data_cmd(0x83);//bit7=7,sdo disable,sdo/sdi use the same pin
send_data_cmd(0x03);//bit7=0,sdo en
send_ctrl_cmd(0xfb);
send_data_cmd(0x12);
#if 0
id=spi_get_data(0xdb);//vendor id
#else
id1=spi_get_data(0xd3);
send_ctrl_cmd(0xfb);
send_data_cmd(0x13);
id2=spi_get_data(0xd3);
id = (id1<<8)|id2;//ic id
#endif
#ifdef BUILD_LK
printf("TXD9487_lcd_id1=0x%x,lcd_id2=0x%x,lcd_id=0x%x \r\n",id1,id2,id);
#else
printk("TXD9487_lcd_id1=0x%x,lcd_id2=0x%x,lcd_id=0x%x \r\n",id1,id2,id);
#endif
#ifdef BUILD_LK
if(/*(LCM_ID == id) || */( lcm_idpin_value > 140) && ( lcm_idpin_value <190))//id pin voltage is about 1.5v
#else
if(LCM_ID == id)
#endif
{
return 1;
}
else
{
return 0;
}
//return (LCM_ID == id)?1:0;
}
示例11: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
unsigned int id = 0;
//unsigned char data[4];
//#ifdef BUILD_LK
// unsigned int lcm_idpin_value = 0;
// lcm_idpin_value = lcm_check_idpin_adc(ADC_CHECK_COUNT);
//#endif
config_gpio();//config gpio before use spi
MDELAY(1);
SET_RESET_PIN(1);
MDELAY(10);
SET_RESET_PIN(0);
MDELAY(50);
SET_RESET_PIN(1);
MDELAY(120);
send_ctrl_cmd(0xB9); //EXTC
send_data_cmd(0xFF); //EXTC
send_data_cmd(0x83); //EXTC
send_data_cmd(0x57); //EXTC
MDELAY(15);
send_ctrl_cmd(0xB3);
send_data_cmd(0xC3);
//for himax8357C
send_ctrl_cmd(0xFE);
send_data_cmd(0xD0);
MDELAY(20);
id=spi_get_data(0xff);
//id=spi_get_bytes(0xff,data);
#ifdef BUILD_LK
printf("by35hp_lcd_id=0x%x \r\n",id);
//printf("by35hp_lcd_id data=0x%x,0x%x,0x%x,0x%x \r\n",data[0],data[1],data[2],data[3]);
#else
printk("by35hp_lcd_id=0x%x\r\n",id);
#endif
//#ifdef BUILD_LK
//if(/*(LCM_ID == id) || */( lcm_idpin_value >= 190))//id pin voltage is about 2.0v
//#else
if(LCM_ID == id)
//#endif
{
return 1;
}
else
{
return 0;
}
//return (LCM_ID == id)?1:0;
}
示例12: lcm_set_pwm
static void lcm_set_pwm(unsigned int divider)
{
#if 0
send_ctrl_cmd(0xBE);
send_data_cmd(0xFF);
send_ctrl_cmd(0xBF);
send_data_cmd(0x07);
#endif
}
示例13: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
unsigned int id = 0;
//unsigned char data[4];
#ifdef BUILD_LK
unsigned int lcm_idpin_value = 0;
lcm_idpin_value = lcm_check_idpin_adc(ADC_CHECK_COUNT);
#endif
SET_RESET_PIN(1);
MDELAY(10);
SET_RESET_PIN(0);
MDELAY(50);
SET_RESET_PIN(1);
MDELAY(120);
send_ctrl_cmd(0xB9); //EXTC
send_data_cmd(0xFF); //EXTC
send_data_cmd(0x83); //EXTC
send_data_cmd(0x57); //EXTC
MDELAY(15);
send_ctrl_cmd(0xB3);
send_data_cmd(0xC3);
//for himax8357C
send_ctrl_cmd(0xFE);
send_data_cmd(0xD0);
MDELAY(20);
id=spi_get_data(0xff);
//id=spi_get_bytes(0xff,data);
#ifdef BUILD_LK
printf("jmo4861_lcd_id=0x%x \r\n",id);
//printf("jmo4861_lcd_id data=0x%x,0x%x,0x%x,0x%x \r\n",data[0],data[1],data[2],data[3]);
#else
printk("jmo4861_lcd_id=0x%x\r\n",id);
#endif
#ifdef BUILD_LK
if(/*(LCM_ID == id) || */( lcm_idpin_value > 140) && ( lcm_idpin_value <190))//id pin voltage is about 1.5v
#else
if(LCM_ID == id)
#endif
{
return 1;
}
else
{
return 0;
}
//return (LCM_ID == id)?1:0;
}
示例14: lcm_setbacklight
static void lcm_setbacklight(unsigned int level)
{
if(level > 255) level = 255;
#if 0
send_ctrl_cmd(0x51);
send_data_cmd(level);
#else
send_ctrl_cmd(0xBE);
send_data_cmd(0x0F);
#endif
}
示例15: lcm_compare_id
static unsigned int lcm_compare_id(void)
{
send_ctrl_cmd(0xB9); // SET password
send_data_cmd(0xFF);
send_data_cmd(0x83);
send_data_cmd(0x69);
send_ctrl_cmd(0xC3);
send_data_cmd(0xFF);
send_ctrl_cmd(0xF4);
read_data_cmd();
return (LCM_ID == read_data_cmd())?1:0;
}