/* Copy pixels from the screen to a pixel buffer. 
Limits have to be set prior to calling this function, e.g.:  */
void ili9341_copy_pixels_from_screen(ili9341_color_t *pixels, uint32_t count)
/* Copy pixels from the screen to a pixel buffer. 
Limits have to be set prior to calling this function, e.g.:  */
void ili9341_copy_pixels_from_screen(ili9341_color_t *pixels, uint32_t count)
{
	uint8_t red, green, blue;
	Assert(count > 0);
	ili9341_send_command(ILI9341_CMD_MEMORY_READ);
	red = ili9341_read_byte();
	while (count--) {
		red = ili9341_read_byte();
		green = ili9341_read_byte();
		blue = ili9341_read_byte();
		*pixels = ILI9341_COLOR(red, green, blue);
		pixels++;
	}
	ili9341_deselect_chip();
}