EFM32 Gecko Starter Kit: Must initialize LEDs on boot

This commit is contained in:
Gregory Nutt 2014-10-20 11:52:31 -06:00
parent ea3024c529
commit fbaa55e416
4 changed files with 19 additions and 6 deletions

View File

@ -139,14 +139,14 @@ Configurations
If this is a Windows native build, then configure.bat should be used If this is a Windows native build, then configure.bat should be used
instead of configure.sh: instead of configure.sh:
configure.bat STM32F4Discovery\<subdir> configure.bat efm32-g8xx-stk\<subdir>
Where <subdir> is one of the following: Where <subdir> is one of the following:
nsh: nsh:
--- ---
Configures the NuttShell (nsh) located at apps/examples/nsh. The Configures the NuttShell (nsh) located at apps/examples/nsh. The
Configuration enables the serial interfaces on USARTx. Support for Configuration enables the serial interfaces on UART0. Support for
builtin applications is enabled, but in the base configuration no builtin applications is enabled, but in the base configuration no
builtin applications are selected (see NOTES below). builtin applications are selected (see NOTES below).

View File

@ -75,4 +75,12 @@
* Public Function Prototypes * Public Function Prototypes
****************************************************************************/ ****************************************************************************/
/****************************************************************************
* Name: board_led_initialize
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
void board_led_initialize(void);
#endif
#endif /* __CONFIGS_EFM32_DK3650_INCLUDE_BOARD_H */ #endif /* __CONFIGS_EFM32_DK3650_INCLUDE_BOARD_H */

View File

@ -59,6 +59,11 @@
void efm32_boardinitialize(void) void efm32_boardinitialize(void)
{ {
#ifdef CONFIG_ARCH_LEDS
/* Configure on-board LEDs if LED support has been selected. */
board_led_initialize();
#endif
} }
/**************************************************************************** /****************************************************************************

View File

@ -70,33 +70,33 @@
void stm32_boardinitialize(void) void stm32_boardinitialize(void)
{ {
#if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3)
/* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function /* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function
* stm32_spiinitialize() has been brought into the link. * stm32_spiinitialize() has been brought into the link.
*/ */
#if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3)
if (stm32_spiinitialize) if (stm32_spiinitialize)
{ {
stm32_spiinitialize(); stm32_spiinitialize();
} }
#endif #endif
#ifdef CONFIG_STM32_OTGFS
/* Initialize USB if the 1) OTG FS controller is in the configuration and 2) /* Initialize USB if the 1) OTG FS controller is in the configuration and 2)
* disabled, and 3) the weak function stm32_usbinitialize() has been brought * disabled, and 3) the weak function stm32_usbinitialize() has been brought
* into the build. Presumeably either CONFIG_USBDEV or CONFIG_USBHOST is also * into the build. Presumably either CONFIG_USBDEV or CONFIG_USBHOST is also
* selected. * selected.
*/ */
#ifdef CONFIG_STM32_OTGFS
if (stm32_usbinitialize) if (stm32_usbinitialize)
{ {
stm32_usbinitialize(); stm32_usbinitialize();
} }
#endif #endif
#ifdef CONFIG_ARCH_LEDS
/* Configure on-board LEDs if LED support has been selected. */ /* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
board_led_initialize(); board_led_initialize();
#endif #endif
} }