From 4cf3a06ef6ff34c2d8fe0d98dbdf8a63a57f8e13 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 4 Apr 2018 15:35:57 -0600 Subject: [PATCH] configs/stm32f344-disco: Fix an error that was causing build tests to fail. --- configs/stm32f334-disco/src/stm32_smps.c | 2 +- configs/stm32l476vg-disco/src/stm32_spi.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/configs/stm32f334-disco/src/stm32_smps.c b/configs/stm32f334-disco/src/stm32_smps.c index ebaf30cd11..ebb3fc1d8f 100644 --- a/configs/stm32f334-disco/src/stm32_smps.c +++ b/configs/stm32f334-disco/src/stm32_smps.c @@ -1063,7 +1063,7 @@ int stm32_smps_setup(void) ret = up_prioritize_irq(STM32_IRQ_ADC12, NVIC_SYSH_HIGH_PRIORITY); if (ret < 0) { - pwrerr("ERROR: "" + pwrerr("ERROR: " "highpri_main: ERROR: up_prioritize_irq failed: %d\n", ret); ret = EXIT_FAILURE; diff --git a/configs/stm32l476vg-disco/src/stm32_spi.c b/configs/stm32l476vg-disco/src/stm32_spi.c index 592f6b2574..b72ae6d14c 100644 --- a/configs/stm32l476vg-disco/src/stm32_spi.c +++ b/configs/stm32l476vg-disco/src/stm32_spi.c @@ -66,6 +66,9 @@ struct spi_dev_s *g_spi1; #ifdef CONFIG_STM32_SPI2 struct spi_dev_s *g_spi2; #endif +#ifdef CONFIG_STM32_SPI3 +struct spi_dev_s *g_spi3; +#endif /************************************************************************************ * Public Functions @@ -104,6 +107,20 @@ void weak_function stm32_spiinitialize(void) { spierr("ERROR: [boot] FAILED to initialize SPI port 2\n"); } + +#warning No devices specified on SPI2 +#endif + +#ifdef CONFIG_STM32_SPI2 + /* Configure SPI-based devices on SPI3 */ + + g_spi2 = up_spiinitialize(3); + if (!g_spi2) + { + spierr("ERROR: [boot] FAILED to initialize SPI port 3\n"); + } + +#warning No devices specified on SPI3 #endif }