/*************************************************
LCD_DrawPoint

*************************************************/
void Gui_DrawPoint(u16 x,u16 y,u16 Data)
{
	Lcd_SetRegion(x,y,x+1,y+1);
	Lcd_WriteData(Data>>8);
	Lcd_WriteData(Data);

}    
示例#2
0
void Lcd_Clear(u16 Color)               
{	
   unsigned int i,m;
   Lcd_SetRegion(0,0,X_MAX_PIXEL-1,Y_MAX_PIXEL-1);
   //LCD_CS_CLR;
   //LCD_RS_SET;
   LCD_RS_SET;
   //SPIv_WriteByte(Data);

   
   for(i=0;i<Y_MAX_PIXEL;i++)
   {
    for(m=0;m<X_MAX_PIXEL;m++)
      {	 
	  	//SPIv_WriteByte(Color>>8);  
		//SPIv_WriteByte(Color);
		SPI_WriteByte(SPI2,Color>>8);
		SPI_WriteByte(SPI2,Color);
	  	//Lcd_WriteData16Bit(Color>>8,Color);
		//Lcd_WriteData(Color>>8);
		//Lcd_WriteData(Color);
      }   
	}
	 // LCD_CS_SET;  
}
示例#3
0
/*************************************************
函数名:Lcd_Clear
功能:全屏清屏函数
入口参数:填充颜色COLOR
返回值:无
*************************************************/
void LCD_Fill(u16 sx,u16 sy,u16 ex,u16 ey,u16 color)            
{	
   unsigned int i,m;
   Lcd_SetRegion(sx,sy,ex,ey);
   //LCD_CS_CLR;
   //LCD_RS_SET;
   LCD_RS_SET;
   //SPIv_WriteByte(Data);

   
   for(i=0;i<=ey-sy;i++)
   {
    for(m=0;m<=ex-sx;m++)
      {	 
	  	//SPIv_WriteByte(Color>>8);  
		//SPIv_WriteByte(Color);
		SPI_WriteByte(SPI2,color>>8);
		SPI_WriteByte(SPI2,color);
	  	//Lcd_WriteData16Bit(Color>>8,Color);
		//Lcd_WriteData(Color>>8);
		//Lcd_WriteData(Color);
      }   
	}
	 // LCD_CS_SET;  
}
/*************************************************
Lcd_Clear

*************************************************/
void Lcd_Clear(u16 Color)               
{	
   unsigned int i,m;
   Lcd_SetRegion(0,0,X_MAX_PIXEL-1,Y_MAX_PIXEL-1);
   Lcd_WriteIndex(0x2C);
   for(i=0;i<128;i++)
    for(m=0;m<160;m++)
    {	
	  	Lcd_WriteData(Color>>8);
			Lcd_WriteData(Color);
    }   
}
示例#5
0
void Lcd_Clear(uint16_t Color)               
{    
    unsigned int i,m;
    Lcd_SetRegion(0, 0, X_MAX_PIXEL-1, Y_MAX_PIXEL-1);        
    Lcd_WriteIndex(0x2C);
    for(i = 0; i < X_MAX_PIXEL; i++){
        for(m = 0; m < Y_MAX_PIXEL; m++){    
            Lcd_WriteData(Color>>8);
            Lcd_WriteData(Color);
        }
    }
    LCD_CS_SET;           
}
示例#6
0
/**
  * @brief  Clear the lcd.
  * @param  Color
  * @retval None
  */
void Lcd_Clear(uint16_t Color)
{
    unsigned int i,m;
    Lcd_SetRegion(0,0,X_MAX_PIXEL-1,Y_MAX_PIXEL-1);
    LCD_RS_SET;

    LCD_CS_CLR;
    for(i=0;i<Y_MAX_PIXEL;i++)
    {
        for(m=0;m<X_MAX_PIXEL;m++)
        {
            SPI_WriteByte(SPI1,Color>>8);
            SPI_WriteByte(SPI1,Color);
        }
    }
    LCD_CS_SET;
}
示例#7
0
文件: mk_text.c 项目: pawelc06/STM32
void tft_mputs_P( int x, int y, char * s, uint32_t color, uint32_t bk_color ) {

	char c;
	uint8_t gH, gW, gS, gIS;
	uint16_t offset;
	uint8_t startChar = currentFont.startChar;
	uint8_t * glyph = (uint8_t*)currentFont.data;


	Set_color32(color);
	Set_bk_color32(bk_color);

	//Set_color(color);
	//Set_bk_color(bk_color);

	gH = currentFont.heightPixels;
	gIS = currentFont.interspacePixels;
	gS = currentFont.spacePixels;

	while( (c=s) ) {
		if( c > ' ') {
			gW = currentFont.charInfo[ c - startChar  ].widthBits ;

			offset = currentFont.charInfo[ c - startChar  ].offset;

			send_font_bitmap(x, y, glyph+offset, gH, gW );
			x = x + gW + gIS;

		} else {
			//Set_active_window(x,y,x+gS-1,y+gH-1);
			Lcd_SetRegion(x,y,x+gS-1,y+gH-1);
			//Write_command(0x2c);
			for(offset=0;offset<gS*gH;offset++) {
				Draw_bk_pixel();
				Draw_bk_pixel();
				Draw_bk_pixel();
			}
			x+=gS;
		}
		s++;
	}

	CX=x;
	CY=y;
}
示例#8
0
void Gui_DrawPoint(uint16_t x,uint16_t y, uint16_t Data)
{
    Lcd_SetRegion(x,y,x+1,y+1);
    Lcd_WriteData(Data>>8);
    Lcd_WriteData(Data);
}    
示例#9
0
void Lcd_SetXY(uint16_t x, uint16_t y)
{
      Lcd_SetRegion(x, y, x, y);
}
示例#10
0
/*************************************************
LCD_Set_XY

*************************************************/
void Lcd_SetXY(u16 x,u16 y)
{
  	Lcd_SetRegion(x,y,x,y);
}