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


C++ LCD_WriteData函数代码示例

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


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

示例1: LCD_SetArea

/*********************************************************************
* Function:  LCD_SetArea(start_x,start_y,end_x,end_y)
*
* PreCondition: SetActivePage(page)
*
* Input: start_x, end_x	- start column and end column
*		 start_y,end_y 	- start row and end row position (i.e. page address)
*
* Output: none
*
* Side Effects: none
*
* Overview: defines start/end columns and start/end rows for memory access
*			from host to SSD1963
* Note: none
********************************************************************/
void LCD_SetArea(u16 start_x, u16 start_y, u16 end_x, u16 end_y)
{
	long offset;

	offset = (u16)_activePage*(GetMaxY()+1);

	start_y = offset + start_y;
	end_y   = offset + end_y;



	LCD_WriteCommand(CMD_SET_COLUMN);
	Clr_Cs;
	LCD_WriteData(start_x>>8);
	LCD_WriteData(start_x);
	LCD_WriteData(end_x>>8);
	LCD_WriteData(end_x);
	Set_Cs;
	LCD_WriteCommand(CMD_SET_PAGE);
	Clr_Cs;
	LCD_WriteData(start_y>>8);
	LCD_WriteData(start_y);
	LCD_WriteData(end_y>>8);
	LCD_WriteData(end_y);
	Set_Cs;
}
开发者ID:candrian,项目名称:SSD1963_STM32F4,代码行数:42,代码来源:SSD1963.c

示例2: LCD_Update

void LCD_Update(void)
{
    uint8_t i;

    LCD_WriteCmd(LCDCMD_SET_DDRAM_ADDRESS | LCD_FIRSTLINE_ADDRESS);
    
    for(i = 0; i < 16; i++)
    {
        if( LCDText[i] == 0 )
        {
            LCD_WriteData(' ');
        }
        else
        {
            LCD_WriteData(LCDText[i]);
        }
    }
    
    LCD_WriteCmd(LCDCMD_SET_DDRAM_ADDRESS | LCD_SECONDLINE_ADDRESS);
    
    for(i = 16; i < 32; i++)
    {
        if( LCDText[i] == 0 )
        {
            LCD_WriteData(' ');
        }
        else
        {
            LCD_WriteData(LCDText[i]);
        }
    }
}
开发者ID:243-510-MA,项目名称:ProjetSansFil,代码行数:32,代码来源:lcd.c

示例3: LCD_OpenWin

/********************************************************************************************************
*  Function: LCD_OpenWin				                                                           
*  Object: lcd open window for display
*  Input: x0,y0, x1, y1
*  Output: none                                  
*  brief: none
********************************************************************************************************/
void LCD_OpenWin(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1)
{
		/*
		#if (LCD_DIRECT == 1)
			LCD_WriteReg(0x0044);
			LCD_WriteData((x1<<8)+x0);
			LCD_WriteReg(0x0045);
			LCD_WriteData((y1<<8)+y0);	
			LCD_WriteReg(0x0021);
			LCD_WriteData((y0<<8)+x0); 
		#else
			LCD_WriteReg(0x0045);
			LCD_WriteData((x1<<8)+x0);
			LCD_WriteReg(0x0044);
			LCD_WriteData((y1<<8)+y0);
			LCD_WriteReg(0x0021);
			LCD_WriteData((x0<<8)+y0); 
		#endif
			LCD_WriteReg(0x0022);
		//S_DogFeed();
		*/
		LCD_WriteReg(0x2A);	
		LCD_WriteData(y0>>8);
		LCD_WriteData(0x00FF&y0);		
		LCD_WriteData(y1>>8);
		LCD_WriteData(0x00FF&y1);
		LCD_WriteReg(0x2B);	
		LCD_WriteData(x0>>8);
		LCD_WriteData(0x00FF&x0);		
		LCD_WriteData(x1>>8);
		LCD_WriteData(0x00FF&x1);
		LCD_WriteReg(0x2C);
}
开发者ID:ydwzj,项目名称:STM32F4,代码行数:40,代码来源:ILI9341.c

示例4: LCD_DisGB2312String16x16

/********************************************************************************************************
*  Function: LCD_DisGB2312String16x16				                                                           
*  Object: display a chinese string
*  Input: site, char, fColor, bColor
*  Output: none                                  
*  brief: none
********************************************************************************************************/
void LCD_DisGB2312String16x16(uint16_t x0, uint16_t y0, u8 *s, uint16_t fColor, uint16_t bColor)
{
		uint16_t Num;
		u8 i,j,m,l = 1;
		while(*s)
		{
				LCD_OpenWin(x0, y0+(16-1)*(l-1), x0+16-1, y0+(16-1)*l);
				for(Num = 0; Num < sizeof(GB2312Code16x16)/35; Num++)
				{
						if((GB2312Code16x16[Num].Head[0] == *s) && (GB2312Code16x16[Num].Head[1] == *(s+1)))
						{ 
								for(i = 0; i < 32; i++) 
								{
										m = GB2312Code16x16[Num].Infor[i];
										for(j = 0; j<8; j++) 
										{
												if(m&CHSBIT7)
													LCD_WriteData(fColor);
												else 
													LCD_WriteData(bColor);
												m<<=1;
										}
								}
						}
				}
				s+=2;
				l++;
		}
}
开发者ID:ydwzj,项目名称:STM32F4,代码行数:36,代码来源:ILI9341.c

示例5: Bcd3IntLcd

/**************************************************************************
*   Function name :   Bcd3IntLcd
*   Returns :         нет       
*   Parameters :      значение числа от 0 до 999    
*   Purpose :         переводит число в символ и выводит на жкд        
****************************************************************************/
void Bcd3IntLcd(unsigned int value)
{
    unsigned char high = 0;
    unsigned char flag = 0;
   
    if (value >= 100) flag = 48;   
    else flag = 32;
    while (value >= 100)                
    {
        high++;
        value -= 100;
    }
    if (high) high += 48;
    else high = 32;
    LCD_WriteData(high );
    
    high = 0;
    while (value >= 10)                 
    {
        high++;
        value -= 10;
    }
    if (high) high += 48;
    else high = flag;
    LCD_WriteData(high );
    
    value += 48;
    LCD_WriteData(value);  
}
开发者ID:storozhilov,项目名称:pomidorka,代码行数:35,代码来源:bcd.c

示例6: Lcd_SetCursor

void Lcd_SetCursor(unsigned int x,unsigned int y)
{
    LCD_WriteRegIndex(0x20);
    LCD_WriteData(x);//水平坐标
    LCD_WriteRegIndex(0x21);
    LCD_WriteData(y);//垂直坐标
}
开发者ID:XiaodongJia,项目名称:jiaoxuetaojian,代码行数:7,代码来源:TFT_Screen.c

示例7: Bcd5IntLcd

/**************************************************************************
*   Function name :   Bcd5IntLcd
*   Returns :         нет       
*   Parameters :      значение числа от 0 до 65535    
*   Purpose :         переводит число в символ и выводит на жкд        
****************************************************************************/
void Bcd5IntLcd(unsigned int value)
{
    unsigned char high = 0;
    unsigned char flag = 0;
    unsigned char flag2 = 0;
	unsigned char flag3 = 0;  
    
    if (value >= 10000) {flag = 48; flag2 = 48; flag3 = 48;}  
    else
    {
      if (value >= 1000) {flag = 32; flag2 = 48; flag3 = 48;}
      else {flag = 32; flag2 = 32; flag3 = 48;}
    }
    
    while (value >= 10000)               
    {
        high++;
        value -= 10000;
    }
    if (high) high += 48;
    else high = 32;
    LCD_WriteData(high);
    
    high = 0;	


    while (value >= 1000)                // Count thousand
    {
        high++;
        value -= 1000;
    }
    if (high) high += 48;
    else high = flag;
    LCD_WriteData(high);
    
    high = 0;
    while (value >= 100)                
    {
        high++;
        value -= 100;
    }
    if (high) high += 48;
    else high = flag2;
    LCD_WriteData(high );
    
    
    high = 0;
    while (value >= 10)                 
    {
        high++;
        value -= 10;
    }
    if (high) high += 48;
    else high = flag3;
    LCD_WriteData(high );
    
    value += 48;
    LCD_WriteData(value);  
}
开发者ID:storozhilov,项目名称:pomidorka,代码行数:65,代码来源:bcd.c

示例8: lcdDisplayTick

int lcdDisplayTick(task* t){

	//actions	
	switch(t->state){
		case lcd_init:
			LCD_init();							//initialize LCD
			LCD_ClearScreen();					//clear screen of any artifacts
			break;
		case s1:
			//LCD_ClearScreen();					//clear screen of any artifacts
			//LCD_DisplayString(1,motionSensorMsg);	//display motion sensor message
			
				LCD_Cursor(14);
				
				if(fanMode)
				{
				    LCD_WriteData(1);
			    }
			    else if(led_fan && !kill && enable && temp)
			    {
			        LCD_WriteData(2);
			    }
			    else
			    {
			        LCD_WriteData(' ');
			    }
			    
				LCD_Cursor(12);
			    
			    if(enable)
			    {
			        LCD_WriteData(3);
			    }
			    else
			    {
			        LCD_WriteData(4);
			    }
			
			break;
		default:
			break;
	}

	//transitions
	switch(t->state){
		case lcd_init:
			t->state = s1;
			break;
		case s1:
			t->state = s1;
			break;
		default:
			break;
	}
	
	return 0;
}
开发者ID:dutchthomas,项目名称:cs122a,代码行数:57,代码来源:temperature_motion.c

示例9: LCD_SetCursor

/*=====================================================================================================*/
void LCD_SetCursor( u16 CoordiX, u16 CoordiY )
{
	LCD_WriteCmd(0x2A);
  LCD_WriteData(Byte8H(CoordiX));
	LCD_WriteData(Byte8L(CoordiX));
	LCD_WriteCmd(0x2B);
  LCD_WriteData(Byte8H(CoordiY));
	LCD_WriteData(Byte8L(CoordiY));
	LCD_WriteCmd(0x2C);
}
开发者ID:SeanLee412,项目名称:QCopterRemoteControl,代码行数:11,代码来源:module_r61581.c

示例10: LCD_SetCursor

/*====================================================================================================*/
void LCD_SetCursor( uint16_t coordiX, uint16_t coordiY )
{
  LCD_WriteCmd(0x2A);
  LCD_WriteData(Byte8H(coordiX));
  LCD_WriteData(Byte8L(coordiX));
  LCD_WriteCmd(0x2B);
  LCD_WriteData(Byte8H(coordiY));
  LCD_WriteData(Byte8L(coordiY));
  LCD_WriteCmd(0x2C);
}
开发者ID:KitSprout,项目名称:KDWM1000,代码行数:11,代码来源:module_ili9341.c

示例11: LCD_DefineChar

/**
 ******************************************************************************
 **
 **	Function Name		: LCD_DefineCharacter
 **
 **	Description			: Define dot pattern for user-defined character.
 **
 **	Passed Parameters	: address = address of character( 0x00-0x07 )
 **						  pattern = pointer to 8-byte array containing 
 **                                 the dot pattern
 **	Modified Data		: None
 **
 **	Return Value		: None
 **
 ******************************************************************************
 */
void LCD_DefineChar( uint8 address, const uint8 *pattern )
{
	uint8 i;

	LCD_WriteControl( 1, 0x40 +( address << 3 ) );
	LCD_WriteControl( 2, 0x40 +( address << 3 ) );
	for( i=0; i<8; i++ ) {
		LCD_WriteData( 1, *pattern++ );
		LCD_WriteData( 2, *pattern++ );
	}
}
开发者ID:padwalsandip,项目名称:OpenSource_Free,代码行数:27,代码来源:lcd.c

示例12: LCD_SetScrollArea

/*********************************************************************
* Function:  SetScrollArea(SHORT top, SHORT scroll, SHORT bottom)
*
* PreCondition: none
*
* Input: top - Top Fixed Area in number of lines from the top
*				of the frame buffer
*		 scroll - Vertical scrolling area in number of lines
*		 bottom - Bottom Fixed Area in number of lines
*
* Output: none
*
* Side Effects: none
*
* Overview:
*
* Note: Reference: section 9.22 Set Scroll Area, SSD1963 datasheet Rev0.20
********************************************************************/
void LCD_SetScrollArea(u16 top, u16 scroll, u16 bottom)
{
	LCD_WriteCommand(CMD_SET_SCROLL_AREA);
	Clr_Cs;
	LCD_WriteData(top>>8);
	LCD_WriteData(top);
	LCD_WriteData(scroll>>8);
	LCD_WriteData(scroll);
	LCD_WriteData(bottom>>8);
	LCD_WriteData(bottom);
	Set_Cs;	
}
开发者ID:candrian,项目名称:SSD1963_STM32F4,代码行数:30,代码来源:SSD1963.c

示例13: Display_Update_Ingame

void Display_Update_Ingame ()
{
	LCD_Cursor(8); // score tens
	LCD_WriteData(points/10 + '0');
	LCD_Cursor(9); // score one
	LCD_WriteData(points%10 + '0');
		
	LCD_Cursor(26); //enemy ones
	LCD_WriteData(enemy_count + '0');
	LCD_Cursor(0);
	return;
}
开发者ID:rlaw1294,项目名称:CS120B_TheMatrix,代码行数:12,代码来源:rlaw001_project.c

示例14: Display_Gameover

void Display_Gameover() {
	LCD_DisplayString(5, "GAME OVER        Score: ");
	LCD_Cursor(3);
	LCD_WriteData(0b00001000);
	LCD_Cursor(15);
	LCD_WriteData(0b00001000);
	LCD_Cursor(28);
	LCD_WriteData(points/10 + '0');
	LCD_Cursor(29);
	LCD_WriteData(points%10 + '0');
	LCD_Cursor(0);
	return;
}
开发者ID:rlaw1294,项目名称:CS120B_TheMatrix,代码行数:13,代码来源:rlaw001_project.c

示例15: toggle_pause

//Function Definitions
void toggle_pause() {
    pause = pause ? 0 : 1;
    if(pause) {
        for(int i=0; i<8; i++) {
            LCD_Cursor(i+5);
            LCD_WriteData(pause_message[i]);
        }
    } else {
        LCD_DisplayString(1,(unsigned char*)" ");
        LCD_Cursor(player);
        LCD_WriteData('@');
        move_obstacles();
    }
}
开发者ID:bradley-evans,项目名称:college-courses-repo,代码行数:15,代码来源:main.c


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