This is an automated email from the ASF dual-hosted git repository.

gustavonihei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 24284380375b20ced2ebc2ead8958bb3bb0d3c1f
Author: raiden00pl <raide...@railab.me>
AuthorDate: Fri Jul 15 14:10:50 2022 +0200

    stm32f0l0g0/SPI: fix compilation for DMA enabled
---
 arch/arm/src/stm32f0l0g0/stm32_spi.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/arm/src/stm32f0l0g0/stm32_spi.c 
b/arch/arm/src/stm32f0l0g0/stm32_spi.c
index 510792ab3a..50aec0f335 100644
--- a/arch/arm/src/stm32f0l0g0/stm32_spi.c
+++ b/arch/arm/src/stm32f0l0g0/stm32_spi.c
@@ -229,6 +229,13 @@ static uint32_t    spi_send(struct spi_dev_s *dev, 
uint32_t wd);
 static void        spi_exchange(struct spi_dev_s *dev,
                                 const void *txbuffer, void *rxbuffer,
                                 size_t nwords);
+
+#ifdef CONFIG_STM32F0L0G0_SPI_DMA
+static void spi_exchange_nodma(struct spi_dev_s *dev,
+                               const void *txbuffer, void *rxbuffer,
+                               size_t nwords);
+#endif
+
 #ifdef CONFIG_SPI_TRIGGER
 static int         spi_trigger(struct spi_dev_s *dev);
 #endif
@@ -1306,7 +1313,6 @@ static uint32_t spi_send(struct spi_dev_s *dev, uint32_t 
wd)
  *
  ****************************************************************************/
 
-#if !defined(CONFIG_STM32F0L0G0_SPI_DMA) || 
defined(CONFIG_STM32F0L0G0_DMACAPABLE)
 #if !defined(CONFIG_STM32F0L0G0_SPI_DMA)
 static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer,
                          void *rxbuffer, size_t nwords)
@@ -1390,7 +1396,6 @@ static void spi_exchange_nodma(struct spi_dev_s *dev,
         }
     }
 }
-#endif /* !CONFIG_STM32F0L0G0_SPI_DMA || CONFIG_STM32F0L0G0_DMACAPABLE */
 
 /****************************************************************************
  * Name: spi_exchange (with DMA capability)
@@ -1418,6 +1423,7 @@ static void spi_exchange(struct spi_dev_s *dev, const 
void *txbuffer,
                          void *rxbuffer, size_t nwords)
 {
   struct stm32_spidev_s *priv = (struct stm32_spidev_s *)dev;
+  int ret = OK;
 
   if ((priv->rxdma == NULL) || (priv->txdma == NULL) ||
       up_interrupt_context())

Reply via email to