/* Copy pixels from SRAM to the screen. 
Used to copy a large quantitative of data to the screen in one go. */
void ili93xx_copy_raw_pixel_24bits_to_screen(const uint8_t *raw_pixels, uint32_t count)
/* Copy pixels from SRAM to the screen. 
Used to copy a large quantitative of data to the screen in one go. */
void ili93xx_copy_raw_pixel_24bits_to_screen(const uint8_t *raw_pixels, uint32_t count)
{
	ili93xx_color_t pixels;
	Assert(count > 0);
	if (g_uc_device_type == DEVICE_TYPE_ILI9325) {
		LCD_IR(0);
		LCD_IR(ILI9325_GRAM_DATA_REG);
	} else if (g_uc_device_type == DEVICE_TYPE_ILI9341) {
		LCD_IR(ILI9341_CMD_MEMORY_WRITE);
		LCD_IR(0);
		LCD_IR(ILI9341_CMD_WRITE_MEMORY_CONTINUE);
	}
	while (count--) {
		pixels = (*raw_pixels)  |
				(*(raw_pixels +1)) << 8 |
				(*(raw_pixels + 2)) << 16;
		LCD_WD((pixels >> 16) & 0xFF);
		LCD_WD((pixels >> 8) & 0xFF);
		LCD_WD(pixels & 0xFF);
		raw_pixels += 3;
	}
}