当前位置: 首页>>代码示例>>C++>>正文


C++ wr_cmd函数代码示例

本文整理汇总了C++中wr_cmd函数的典型用法代码示例。如果您正苦于以下问题:C++ wr_cmd函数的具体用法?C++ wr_cmd怎么用?C++ wr_cmd使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了wr_cmd函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: erase_single_block

unsigned int erase_single_block(int dev, unsigned int addr)
{
	wr_cmd(dev, addr, XFL_CMD_BLOCK_ERASE_SETUP);
	wr_cmd(dev, addr, XFL_CMD_CONFIRM);

	return flash_wt_rdy(dev, addr);
}
开发者ID:CharlieBashford,项目名称:P33,代码行数:7,代码来源:emc_flash_lib.c

示例2: S6B33BG_ColorMode

void S6B33BG_ColorMode(COLOR_MODE color_mode) {

  wr_cmd(S6B33BG_ADDRESSING_MODE);
  wr_cmd(0x1B|color_mode);
  S6B33BG_color_mode=color_mode;

}
开发者ID:aldwinakbar,项目名称:stm32f103_libs,代码行数:7,代码来源:S6B33BG.c

示例3: switch

void S65L2F50::setArea(int_least16_t x0, int_least16_t y0, int_least16_t x1, int_least16_t y1)
{
  switch(lcd_orientation)
  {
    default:
    case 0:
      wr_cmd(0x15);                   //column address set 
      wr_dat(0x08+y0);                //start column
      wr_dat(0x01);                   //start column
      wr_dat(0x08+y1);                //end column
      wr_dat(0x01);                   //end column
      wr_cmd(0x75);                   //page address set 
      wr_dat(x0);                     //start page
      wr_dat(x1);                     //end page
      break;
    //case 90:
      //not implemented
    //  break;
    case 180:
      wr_cmd(0x15);                   //column address set 
      wr_dat(0x08+(LCD_HEIGHT-1)-y1); //start column
      wr_dat(0x01);                   //start column
      wr_dat(0x08+(LCD_HEIGHT-1)-y0); //end column
      wr_dat(0x01);                   //end column
      wr_cmd(0x75);                   //page address set 
      wr_dat(x0);                     //start page
      wr_dat(x1);                     //end page
      break;
    //case 270:
      //not implemented
    //  break;
  }

  return;
}
开发者ID:Overtuner,项目名称:Arduino-Libs,代码行数:35,代码来源:S65L2F50.cpp

示例4: ili9341_set_window

static void ili9341_set_window (unsigned short col_l,   // 
                                unsigned short col_h,	// col_l <= col_h < 320 --> x
								unsigned short row_l,	// row_l <= row_h < 240	--> y
								unsigned short row_h) {

/*
	0 ----------> X (max 319)
	|
	|
	|
	|
	Y (max 239)	
*/

	wr_cmd(0x2A);              // Collum area set  (collum max = 320)
	
	wr_dat((col_l>>8)& 0xFF);  // Colum high byte (lower collum)
	wr_dat(col_l & 0xFF);      // Colum low byte  (lower collum)

	wr_dat((col_h>>8)& 0xFF);  // Colum high byte (upper collum)
	wr_dat(col_h & 0xFF);      // Colum low byte  (upper collum)
    
		
	wr_cmd(0x2B);              // Row area set	  (row max = 240)

	wr_dat((row_l>>8)& 0xFF);  // Row high byte   (lower row)
	wr_dat(row_l & 0xFF);      // Row low byte    (lower row)

	wr_dat((row_h>>8)& 0xFF);  // Row high byte   (upper row)
	wr_dat(row_h & 0xFF);      // Row low byte    (upper row)
		  
	wr_cmd(0x2c);

}
开发者ID:12019,项目名称:library-management-stm32f107,代码行数:34,代码来源:GLCD.c

示例5: display_set_orientation

void display_set_orientation(u08 o)
{
    switch(o)
    {
        case DISPLAY_ORIENTATION_0:
        display_orientation = DISPLAY_ORIENTATION_0;
        display_width  = 320;
        display_height = 240;
        wr_cmd(0x16, 0x00A8); //MY=1 MX=0 MV=1 ML=0 BGR=1
        break;

        case DISPLAY_ORIENTATION_90:
        display_orientation = DISPLAY_ORIENTATION_90;
        display_width  = 240;
        display_height = 320;
        wr_cmd(0x16, 0x0008); //MY=0 MX=0 MV=0 ML=0 BGR=1
        break;

        case DISPLAY_ORIENTATION_180:
        display_orientation = DISPLAY_ORIENTATION_180;
        display_width  = 320;
        display_height = 240;
        wr_cmd(0x16, 0x0068); //MY=0 MX=1 MV=1 ML=0 BGR=1
        break;

        case DISPLAY_ORIENTATION_270:
        display_orientation = DISPLAY_ORIENTATION_270;
        display_width  = 240;
        display_height = 320;
        wr_cmd(0x16, 0x00C8); //MY=1 MX=0 MV=1 ML=0 BGR=1
        break;
    }

    display_set_area(0, 0, display_width-1, display_height-1);
}
开发者ID:cnvogelg,项目名称:knobterm,代码行数:35,代码来源:display.c

示例6: lock_single_block

void lock_single_block(int dev, unsigned int addr)
{
	char status;

	do
	{
		wr_cmd(dev, addr, XFL_CMD_BLOCK_LOCK_SETUP);
		wr_cmd(dev, addr, XFL_CMD_BLOCK_LOCK_CONFIRM);
		status = rd_cmd(dev, addr + 2, XFL_CMD_READ_ELEC_SIG);
	}
	while (status == 0);
}
开发者ID:CharlieBashford,项目名称:P33,代码行数:12,代码来源:emc_flash_lib.c

示例7: wr_cmd

void MI0283QT9::setArea(int_least16_t x0, int_least16_t y0, int_least16_t x1, int_least16_t y1)
{
  wr_cmd(LCD_CMD_COLUMN);
  wr_data16(x0);
  wr_data16(x1);

  wr_cmd(LCD_CMD_PAGE);
  wr_data16(y0);
  wr_data16(y1);

  return;
}
开发者ID:drpjk,项目名称:Arduino-Libs,代码行数:12,代码来源:MI0283QT9.cpp

示例8: display_enable

void display_enable(u08 on)
{
  if(on) {
    wr_cmd(0x28, 0x0038);
    _delay_ms(40);
    wr_cmd(0x28, 0x003C);  
  } else {
    wr_cmd(0x28, 0x0038);
    _delay_ms(40);
    wr_cmd(0x28, 0x0004);
  }
}
开发者ID:cnvogelg,项目名称:knobterm,代码行数:12,代码来源:display.c

示例9: if

void S65LS020::setOrientation(uint_least16_t o)
{
  uint_least8_t p1, p5;

       if((o ==   9) || 
          (o ==  90))
  {
    lcd_orientation = 90;
    lcd_width  = LCD_HEIGHT;
    lcd_height = LCD_WIDTH;
    p1 = 0x00; //x0->x1, y0->y1
    p5 = 0x00; //0x04=rotate, 0x00=normal
  }

  else if((o ==  18) || 
          (o == 180))
  {
    lcd_orientation = 180;
    lcd_width  = LCD_WIDTH;
    lcd_height = LCD_HEIGHT;
    p1 = 0x80; //x0->x1, y1->y0
    p5 = 0x04; //0x04=rotate, 0x00=normal
  }

  else if((o ==  27) || 
          (o ==  14) || 
          (o == 270))
  {
    lcd_orientation = 270;
    lcd_width  = LCD_HEIGHT;
    lcd_height = LCD_WIDTH;
    p1 = 0xC0; //x1->x0, y1->y0
    p5 = 0x00; //0x04=rotate, 0x00=normal
  }

  else
  {
    lcd_orientation = 0;
    lcd_width  = LCD_WIDTH;
    lcd_height = LCD_HEIGHT;
    p1 = 0x40; //x1->x0, y0->y1
    p5 = 0x04; //0x04=rotate, 0x00=normal
  }

  wr_cmd(0xEF, 0x90);
  wr_cmd(0x01, p1);
  wr_cmd(0x05, p5);

  setArea(0, 0, lcd_width-1, lcd_height-1);

  return;
}
开发者ID:AlexanderSarapulov,项目名称:embeded_system,代码行数:52,代码来源:S65LS020.cpp

示例10: NokiaN70_SetWindow

void NokiaN70_SetWindow(uint16_t x0,uint16_t y0,uint16_t x1,uint16_t y1) {

  wr_cmd(COLUMN_ADDRESS_SET);
  wr_dat(x0>>8);
  wr_dat(x0);
  wr_dat(x1>>8);
  wr_dat(x1);

  wr_cmd(PAGE_ADDRESS_SET);
  wr_dat(y0>>8);
  wr_dat(y0);
  wr_dat(y1>>8);
  wr_dat(y1);
}
开发者ID:coldkeyboard,项目名称:stm32f103_libs,代码行数:14,代码来源:NokiaN70.c

示例11: wr_data_B

unsigned int wr_data_B(int dev, unsigned int addr, char data)
{
	wr_cmd(dev, addr, XFL_CMD_PROGRAM_SETUP);
	wr_byte(dev, addr, data);

	return flash_wt_rdy(dev, addr);
}
开发者ID:CharlieBashford,项目名称:P33,代码行数:7,代码来源:emc_flash_lib.c

示例12: NokiaN70_PartialArea

void NokiaN70_PartialArea(uint16_t y0,uint16_t y1) {
  wr_cmd(PARTIAL_AREA);
  wr_dat(y0>>8);
  wr_dat(y0);
  wr_dat(y1>>8);
  wr_dat(y1);
}
开发者ID:coldkeyboard,项目名称:stm32f103_libs,代码行数:7,代码来源:NokiaN70.c

示例13: wr_cmd

void SPI_TFT_ILI9341::window (unsigned int x, unsigned int y, unsigned int w, unsigned int h)
{
    wr_cmd(0x2A);
    SPI::write(x >> 8);
    SPI::write(x);
    SPI::write((x+w-1) >> 8);
    SPI::write(x+w-1);
    
    _cs = 1;
    wr_cmd(0x2B);
    SPI::write(y >> 8);
    SPI::write(y);
    SPI::write((y+h-1) >> 8);
    SPI::write(y+h-1);
    _cs = 1;
}
开发者ID:olegv142,项目名称:STM32L4SpecMon,代码行数:16,代码来源:SPI_TFT_ILI9341.cpp

示例14: wr_reg

static __inline void wr_reg (unsigned char reg, unsigned short val) {

  	Clr_Cs;
	wr_cmd(reg);      
	wr_dat(val);    
	Set_Cs; 
}
开发者ID:12019,项目名称:library-management-stm32f107,代码行数:7,代码来源:GLCD.c

示例15: wr_reg

static inline void wr_reg (unsigned char reg, unsigned short val) {

  LCD_CS(0)
  wr_cmd(reg);
  wr_dat(val);
  LCD_CS(1)
}
开发者ID:epffpe,项目名称:Atmel,代码行数:7,代码来源:lcd.c


注:本文中的wr_cmd函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。