Driver/ST7735S-0.96/graphics.c
/******************************************************************************
        Function description: display characters
        Entry data:     x, y starting point coordinates
                        num characters to display
                        mode 1 superimposed mode 0 non-superimposed mode
        Return value: None
******************************************************************************/
Function description: display characters
Entry data:     x, y starting point coordinates
num characters to display
mode 1 superimposed mode 0 non-superimposed mode
Return value: None
Function description : display characters Entry data : x y starting point coordinates num characters to display mode 1 superimposed mode 0 non - superimposed mode Return value : None
void LCD_ShowChar(u16 x,u16 y,u8 num,u8 mode,u32 color)
{
        u8 temp;
        u8 pos,t;
        u16 x0=x;    
        if(x>LCD_W-16||y>LCD_H-16)      return;	    
        num=num-' ';
        LCD_Address_Set(x,y,x+8-1,y+16-1);      
        if(!mode) 
        {
		for(pos=0;pos<16;pos++)
		{ 
			temp=asc2_1608[(u16)num*16+pos];		 
                        for(t=0;t<8;t++)
                        {
#if MODE_16_18 == 0
                                if(temp&0x01)LCD_WR_DATA(color);
                                else LCD_WR_DATA(BACK_COLOR);
#else
                                if((temp>>t)&0x1)
                                {
                                        LCD_WR_DATA8(color>>16&0xff);
                                        LCD_WR_DATA8(color>>8&0xff);
                                        LCD_WR_DATA8(color&0xff);
                                }
                                else
                                {
                                        LCD_WR_DATA8(BACK_COLOR>>16&0xff);
                                        LCD_WR_DATA8(BACK_COLOR>>8&0xff);
                                        LCD_WR_DATA8(BACK_COLOR&0xff);
                                }
#endif
                                x++;
                      }
                        x=x0;
                        y++;
		}	
	}else
	{
		for(pos=0;pos<16;pos++)
		{
		    temp=asc2_1608[(u16)num*16+pos];		 
			for(t=0;t<8;t++)
		    {                 
		        if(temp&0x01)LCD_DrawPoint(x+t,y+pos,color);
		        temp>>=1; 
		    }
		}
	}   	   	 	  
}
void LCD_ShowChar ( u16 x , u16 y , u8 num , u8 mode , u32 color ) { u8 temp ; u8 pos , t ; u16 x0 = x ; if ( x > LCD_W - 16 || y > LCD_H - 16 ) return ; num = num - ' ' ; LCD_Address_Set ( x , y , x + 8 - 1 , y + 16 - 1 ) ; if ( ! mode ) { for ( pos = 0 ; pos < 16 ; pos ++ ) { temp = asc2_1608 [ ( u16 ) num * 16 + pos ] ; for ( t = 0 ; t < 8 ; t ++ ) { #if MODE_16_18 == 0 if ( temp & 0x01 ) LCD_WR_DATA ( color ) ; else LCD_WR_DATA ( BACK_COLOR ) ; #else if ( ( temp >> t ) & 0x1 ) { LCD_WR_DATA8 ( color >> 16 & 0xff ) ; LCD_WR_DATA8 ( color >> 8 & 0xff ) ; LCD_WR_DATA8 ( color & 0xff ) ; } else { LCD_WR_DATA8 ( BACK_COLOR >> 16 & 0xff ) ; LCD_WR_DATA8 ( BACK_COLOR >> 8 & 0xff ) ; LCD_WR_DATA8 ( BACK_COLOR & 0xff ) ; } #endif x ++ ; } x = x0 ; y ++ ; } } else { for ( pos = 0 ; pos < 16 ; pos ++ ) { temp = asc2_1608 [ ( u16 ) num * 16 + pos ] ; for ( t = 0 ; t < 8 ; t ++ ) { if ( temp & 0x01 ) LCD_DrawPoint ( x + t , y + pos , color ) ; temp >>= 1 ; } } } }
Function description: display characters
Entry data:     x, y starting point coordinates
num characters to display
mode 1 superimposed mode 0 non-superimposed mode
Return value: None
Function description : display characters Entry data : x y starting point coordinates num characters to display mode 1 superimposed mode 0 non - superimposed mode Return value : None
//Settings window		    //Get offset value //Set cursor position //Non-overlapping //Call 1608 font //overlapping mode //Call 1608 font //Draw a dot   