/* Fills the given LCD buffer with a particular color. Only works in 24-bits packed mode for now.  */
void LCDD_Fill(void *pBuffer, unsigned int color)
/* Fills the given LCD buffer with a particular color. Only works in 24-bits packed mode for now.  */
void LCDD_Fill(void *pBuffer, unsigned int color)
{
    unsigned int i;
    unsigned short color16 = RGB24ToRGB16(color);
    LCD_SetCursor((void *)BOARD_LCD_BASE, 0, 0);
    LCD_WriteRAM_Prepare((void *)BOARD_LCD_BASE);
    for (i = 0; i < (BOARD_LCD_WIDTH * BOARD_LCD_HEIGHT); i++) {
        LCD_WriteRAM((void *)BOARD_LCD_BASE, color16);
    }
}