/* Sets the LCD orientation to horizontal and vertical.  */
void lcdSetOrientation(lcdOrientation_t orientation)
/* Sets the LCD orientation to horizontal and vertical.  */
void lcdSetOrientation(lcdOrientation_t orientation)
{
  if(orientation == LCD_ORIENTATION_LANDSCAPE)
  {
    lcd_cmd(0x16, 0x00A8);
    hx8347dProperties.width  = 320;
    hx8347dProperties.height = 240;
  }
  else
  {
    lcd_cmd(0x16, 0x00C8);
    hx8347dProperties.width  = 240;
    hx8347dProperties.height = 320;
  }
  hx8347dPOrientation = orientation;
  lcd_area(0, 0, (hx8347dProperties.width-1), (hx8347dProperties.height-1));
}