Driver/ST7735S-0.96/graphics.c
/******************************************************************************
        Function description: display 160x80 18bit (RGB666) / 16bit (RGB565) picture
        Entry data: x, y starting point coordinates
        Return value: None
******************************************************************************/
Function description: display 160x80 18bit (RGB666) / 16bit (RGB565) picture
Entry data: x, y starting point coordinates
Return value: None
Function description : display 160x80 18bit ( RGB666 ) / 16bit ( RGB565 ) picture Entry data : x y starting point coordinates Return value : None
void LCD_DrawPicture(u16 x1,u16 y1,u16 x2,u16 y2,unsigned char *source)
{
	int i;
	LCD_Address_Set(x1,y1,x2,y2);
	for(i=0;i<12800;i++)
	{
#if     MODE_16_18      
		LCD_WR_DATA8(source[i*3+0]);
                LCD_WR_DATA8(source[i*3+1]);
                LCD_WR_DATA8(source[i*3+2]);
#else                   
                LCD_WR_DATA8(source[i*3+0]<<2&0xf8 | source[i*3+1]>>3 &0x7);
                LCD_WR_DATA8(source[i*3+1]<<5&0xe0 | source[i*3+2]>>1 &0x1f);
#endif
	}
}
void LCD_DrawPicture ( u16 x1 , u16 y1 , u16 x2 , u16 y2 , unsigned char * source ) { int i ; LCD_Address_Set ( x1 , y1 , x2 , y2 ) ; for ( i = 0 ; i < 12800 ; i ++ ) { #if MODE_16_18 LCD_WR_DATA8 ( source [ i * 3 + 0 ] ) ; LCD_WR_DATA8 ( source [ i * 3 + 1 ] ) ; LCD_WR_DATA8 ( source [ i * 3 + 2 ] ) ; #else LCD_WR_DATA8 ( source [ i * 3 + 0 ] << 2 & 0xf8 | source [ i * 3 + 1 ] >> 3 & 0x7 ) ; LCD_WR_DATA8 ( source [ i * 3 + 1 ] << 5 & 0xe0 | source [ i * 3 + 2 ] >> 1 & 0x1f ) ; #endif } }
Function description: display 160x80 18bit (RGB666) / 16bit (RGB565) picture
Entry data: x, y starting point coordinates
Return value: None
Function description : display 160x80 18bit ( RGB666 ) / 16bit ( RGB565 ) picture Entry data : x y starting point coordinates Return value : None
//18bit //16bit