/* Read a single color from the graphical memory. 
Limits have to be set prior to calling this function, e.g.:  */
ili9325_color_t ili9325_read_gram(void)
/* Read a single color from the graphical memory. 
Limits have to be set prior to calling this function, e.g.:  */
ili9325_color_t ili9325_read_gram(void)
{
	uint8_t value[2];
	ili9325_color_t color;
	LCD_IR(0);
	LCD_IR(ILI9325_GRAM_DATA_REG);
	value[0] = LCD_RD();
	value[1] = LCD_RD();
	value[0] = LCD_RD();
	value[1] = LCD_RD();
	color = ((value[0] & 0xF8)) |
			((value[0] & 0x07) << 13) | ((value[1] & 0xE0) << 5) |
			((value[1] & 0x1F) << 19);
	return color;
}