本文整理汇总了C++中send_data_cmd函数的典型用法代码示例。如果您正苦于以下问题:C++ send_data_cmd函数的具体用法?C++ send_data_cmd怎么用?C++ send_data_cmd使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了send_data_cmd函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
}
}
开发者ID:4Fwolf,项目名称:lcm_drivers,代码行数:31,代码来源:zes588_hx8363b.c
示例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;
}
开发者ID:aleksandar9999a,项目名称:acer-z120-kernel-3.4.0,代码行数:60,代码来源:by35hh10t7c_hvga_rm68140.c
示例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
}
开发者ID:4Fwolf,项目名称:lcm_drivers,代码行数:29,代码来源:zes588_hx8363b.c
示例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;
}
开发者ID:4Fwolf,项目名称:lcm_drivers,代码行数:26,代码来源:rfd402_nt35510.c
示例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
}
开发者ID:ariafan,项目名称:Fly_IQ255_Firmware_Build,代码行数:34,代码来源:luckasfb_hx8357c.c
示例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);
}
}
}
开发者ID:4Fwolf,项目名称:lcm_drivers,代码行数:29,代码来源:rfd402_nt35510.c
示例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
}
开发者ID:4Fwolf,项目名称:lcm_drivers,代码行数:32,代码来源:rfd402_nt35510.c
示例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;
}
开发者ID:SeriniTY320,项目名称:mediatek,代码行数:33,代码来源:hx8369a_HUARUI_MS_HX450939FP_BOE_mcu18_fwvga.c
示例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
}
开发者ID:ariafan,项目名称:Fly_IQ255_Firmware_Build,代码行数:31,代码来源:luckasfb_hx8357c.c
示例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;
}
开发者ID:4Fwolf,项目名称:lcm_drivers,代码行数:59,代码来源:txd350nh_hvga_ili9487.c
示例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;
}
开发者ID:aleksandar9999a,项目名称:acer-z120-kernel-3.4.0,代码行数:58,代码来源:by35hp_hvga_hx8357.c
示例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
}
开发者ID:kelvinbui31,项目名称:android_mediatek_muse72,代码行数:10,代码来源:ili9340d_dbi_qvga_s5.c
示例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;
}
开发者ID:aleksandar9999a,项目名称:acer-z120-kernel-3.4.0,代码行数:55,代码来源:jmo4861_hvga_hx8357.c
示例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
}
开发者ID:kelvinbui31,项目名称:android_mediatek_muse72,代码行数:11,代码来源:ili9340d_dbi_qvga_s5.c
示例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;
}
开发者ID:4Fwolf,项目名称:lcm_drivers,代码行数:13,代码来源:hx8369_hvga.c
示例16: lcm_update
static void lcm_update(unsigned int x, unsigned int y, unsigned int width, unsigned int height)
{
unsigned short x0, y0, x1, y1;
unsigned short h_X_start, l_X_start, h_X_end, l_X_end, h_Y_start, l_Y_start, h_Y_end, l_Y_end;
x0 = (unsigned short)x;
y0 = (unsigned short)y;
x1 = (unsigned short)x + width - 1;
y1 = (unsigned short)y + height - 1;
h_X_start = (x0 & 0xFF00) >> 8;
l_X_start = x0 & 0x00FF;
h_X_end = (x1 & 0xFF00) >> 8;
l_X_end = x1 & 0x00FF;
h_Y_start = (y0 & 0xFF00) >> 8;
l_Y_start = y0 & 0x00FF;
h_Y_end = (y1 & 0xFF00) >> 8;
l_Y_end = y1 & 0x00FF;
send_ctrl_cmd(0x2A);
send_data_cmd(h_X_start);
send_data_cmd(l_X_start);
send_data_cmd(h_X_end);
send_data_cmd(l_X_end);
send_ctrl_cmd(0x2B);
send_data_cmd(h_Y_start);
send_data_cmd(l_Y_start);
send_data_cmd(h_Y_end);
send_data_cmd(l_Y_end);
send_ctrl_cmd(0x2C);
}
开发者ID:John677,项目名称:Kernal_k3note,代码行数:34,代码来源:st7789h2_dbi.c
示例17: sw_clear_panel
static void sw_clear_panel(unsigned int color)
{
unsigned int x0 = 0;
unsigned int y0 = 0;
unsigned int x1 = x0 + FRAME_WIDTH - 1;
unsigned int y1 = y0 + FRAME_HEIGHT - 1;
unsigned int x, y;
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); // send DDRAM set
// 18-bit mode (256K color) coding
for (y = y0; y <= y1; ++ y) {
for (x = x0; x <= x1; ++ x) {
lcm_util.send_data(color);
}
}
}
开发者ID:4Fwolf,项目名称:lcm_drivers,代码行数:30,代码来源:lcm_drv.c
示例18: lcm_resume
static void lcm_resume(void)
{
#if 1
// truely's patch for BT UART noise issue
send_ctrl_cmd(0xD0);
send_data_cmd(0x07);
send_data_cmd(0x42);
send_data_cmd(0x1D);
MDELAY(200);
#endif
send_ctrl_cmd(0x11);
MDELAY(120);
send_ctrl_cmd(0x29);
MDELAY(100); // wait for LCM is stable to show
}
开发者ID:4Fwolf,项目名称:lcm_drivers,代码行数:16,代码来源:lcm_drv.c
示例19: lcm_setbacklight
static void lcm_setbacklight(unsigned int level)
{
if(level > 255) level = 255;
send_ctrl_cmd(0x51);
send_data_cmd(level);
}
开发者ID:4Fwolf,项目名称:ALCATEL_LCM,代码行数:7,代码来源:hx8369_mcu_6572.c
示例20: lcm_suspend
static void lcm_suspend(void)
{
send_ctrl_cmd(0x28);
#if 1
// truely's patch for BT UART noise issue
send_ctrl_cmd(0xD0);
send_data_cmd(0x05);
send_data_cmd(0x47);
send_data_cmd(0x1D);
MDELAY(200);
#endif
send_ctrl_cmd(0x10);
MDELAY(10);
}
开发者ID:4Fwolf,项目名称:lcm_drivers,代码行数:16,代码来源:lcm_drv.c
注:本文中的send_data_cmd函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论