/* Sets the format of the frame buffer memory.  */
void LCD_SetMemoryFormat(unsigned int format)
/* Sets the format of the frame buffer memory.  */
void LCD_SetMemoryFormat(unsigned int format)
{
    unsigned int value;
    ASSERT((format & ~AT91C_LCDC_MEMOR) == 0,
           "LCD_SetMemoryFormat: Wrong memory format value.\n\r");
    value = AT91C_BASE_LCDC->LCDC_LCDCON2;
    value &= ~AT91C_LCDC_MEMOR;
    value |= format;
    AT91C_BASE_LCDC->LCDC_LCDCON2 = value;
}