Beispiel #1
0
void stm32_boardinitialize(void)
{
  /* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function
   * stm32_spiinitialize() has been brought into the link.
   */

#if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3)
  if (stm32_spiinitialize)
    {
      stm32_spiinitialize();
    }
#endif

  /* Initialize USB is 1) USBDEV is selected, 2) the USB controller is not
   * disabled, and 3) the weak function stm32_usbdev_initialize() has been brought
   * into the build.
   */

#if defined(CONFIG_STM32_OTGFS) && defined(CONFIG_USBDEV)
  if (stm32_usbdev_initialize)
    {
      stm32_usbdev_initialize();
    }
#endif

  /* Configure on-board LEDs (unconditionally). */

  stm32_ledinit();
}
void stm32_boardinitialize(void)
{
  /* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function
   * stm32_spiinitialize() has been brought into the link.
   */

#if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3)
  if (stm32_spiinitialize)
    {
      stm32_spiinitialize();
    }
#endif

  /* Configure on-board LEDs (unconditionally). */

  stm32_ledinit();
}