/* Sets the number of bits per pixel used by the LCD display.  */
void LCD_SetBitsPerPixel(unsigned int bitsPerPixel)
/* Sets the number of bits per pixel used by the LCD display.  */
void LCD_SetBitsPerPixel(unsigned int bitsPerPixel)
{
    unsigned int value;
    ASSERT((bitsPerPixel & ~AT91C_LCDC_PIXELSIZE) == 0,
           "LCD_SetScanMode: Wrong bitsPerPixel value.\n\r");
    value = AT91C_BASE_LCDC->LCDC_LCDCON2;
    value &= ~AT91C_LCDC_PIXELSIZE;
    value |= bitsPerPixel;
    AT91C_BASE_LCDC->LCDC_LCDCON2 = value;
}