/* SPI_TFT_Init Initialize SPI interface to TFT-LCD SSD2119 controller.  */
void SPI_TFT_Init(void)
/* SPI_TFT_Init Initialize SPI interface to TFT-LCD SSD2119 controller.  */
void SPI_TFT_Init(void)
{
  CMU_ClockEnable(cmuClock_HFPER, true);
  CMU_ClockEnable(cmuClock_USART1, true);
  CMU_ClockEnable(cmuClock_GPIO, true);
  GPIO_PinModeSet(gpioPortD, 0, gpioModePushPull, 0);
  GPIO_PinModeSet(gpioPortD, 1, gpioModeInput, 0);
  GPIO_PinModeSet(gpioPortD, 2, gpioModePushPull, 0);
  GPIO_PinModeSet(gpioPortD, 3, gpioModePushPull, 1);
  USART_Reset(USART1);
  USART_InitSync(USART1, &inittft);
  USART1->ROUTE =
    USART_ROUTE_TXPEN |
    USART_ROUTE_RXPEN |
    USART_ROUTE_CLKPEN |
    USART_ROUTE_LOCATION_LOC1;
}