/* Initializes SPI interface for access to board controller FPGA registers.  */
static void SPI_BC_Init(void)
/* Initializes SPI interface for access to board controller FPGA registers.  */
static void SPI_BC_Init(void)
{
  USART_InitSync_TypeDef bcinit = USART_INITSYNC_DEFAULT;
  CMU_ClockEnable(USART_CLK, true);
  GPIO_PinModeSet(PORT_SPI_TX, PIN_SPI_TX, gpioModePushPull, 0);
  GPIO_PinModeSet(PORT_SPI_RX, PIN_SPI_RX, gpioModeInput, 0);
  GPIO_PinModeSet(PORT_SPI_CLK, PIN_SPI_CLK, gpioModePushPull, 0);
  GPIO_PinModeSet(PORT_SPI_CS, PIN_SPI_CS, gpioModePushPull, 1);
  bcinit.refFreq  = 48000000;
  bcinit.baudrate = 7000000;
  USART_InitSync(USART_USED, &bcinit);
  USART_USED->ROUTE = USART_ROUTE_TXPEN | USART_ROUTE_RXPEN | USART_ROUTE_CLKPEN;
}