/* Sets the vertical timings of the LCD controller. Only meaningful when using a TFT display.  */
void LCD_SetVerticalTimings(unsigned int vfp, unsigned int vbp, unsigned int vpw, unsigned int vhdly)
/* Sets the vertical timings of the LCD controller. Only meaningful when using a TFT display.  */
void LCD_SetVerticalTimings(unsigned int vfp, unsigned int vbp, unsigned int vpw, unsigned int vhdly)
{
    ASSERT((vfp & 0xFFFFFF00) == 0,
           "LCD_SetVerticalTimings: Wrong vfp value.\n\r");
    ASSERT((vbp & 0xFFFFFF00) == 0,
           "LCD_SetVerticalTimings: Wrong vbp value.\n\r");
    ASSERT(((vpw-1) & 0xFFFFFFC0) == 0,
           "LCD_SetVerticalTimings: Wrong vpw value.\n\r");
    ASSERT(((vhdly-1) & 0xFFFFFFF0) == 0,
           "LCD_SetVerticalTimings: Wrong vhdly value.\n\r");
    AT91C_BASE_LCDC->LCDC_TIM1 = vfp
                                 | (vbp << 8)
                                 | ((vpw-1) << 16)
                                 | ((vhdly-1) << 24);
}