You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2020/09/24 12:51:59 UTC

[incubator-nuttx] branch master updated: nrf52 spi: build fixes for !SPI_EXCHANGE

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 0f9fb67  nrf52 spi: build fixes for !SPI_EXCHANGE
0f9fb67 is described below

commit 0f9fb67b0c27df3672acf049af2ebae0601d1bae
Author: Matias N <ma...@protobits.dev>
AuthorDate: Wed Sep 23 13:36:17 2020 -0300

    nrf52 spi: build fixes for !SPI_EXCHANGE
---
 arch/arm/src/nrf52/nrf52_spi.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/arch/arm/src/nrf52/nrf52_spi.c b/arch/arm/src/nrf52/nrf52_spi.c
index 20b77c8..c4b707d 100644
--- a/arch/arm/src/nrf52/nrf52_spi.c
+++ b/arch/arm/src/nrf52/nrf52_spi.c
@@ -172,8 +172,8 @@ static const struct spi_ops_s g_spi0ops =
 #  ifdef CONFIG_SPI_EXCHANGE
   .exchange          = nrf52_spi_exchange,
 #  else
-  .sendlock          = nrf52_spi_sendblock,
-  .recvblock         = nrf52_spi_recvblock
+  .sndblock          = nrf52_spi_sndblock,
+  .recvblock         = nrf52_spi_recvblock,
 #  endif
 #ifdef CONFIG_SPI_TRIGGER
   .trigger           = nrf52_spi_trigger,
@@ -181,7 +181,7 @@ static const struct spi_ops_s g_spi0ops =
 #ifdef CONFIG_SPI_CALLBACK
   .registercallback  = nrf52_spi0register,  /* Provided externally */
 #else
-  .registercallback  = 0,                   /* Not implemented */
+  .registercallback  = NULL,                /* Not implemented */
 #endif
 };
 
@@ -225,8 +225,8 @@ static const struct spi_ops_s g_spi1ops =
 #  ifdef CONFIG_SPI_EXCHANGE
   .exchange          = nrf52_spi_exchange,
 #  else
-  .sendlock          = nrf52_spi_sendblock,
-  .recvblock         = nrf52_spi_recvblock
+  .sndlock           = nrf52_spi_sndblock,
+  .recvblock         = nrf52_spi_recvblock,
 #  endif
 #ifdef CONFIG_SPI_TRIGGER
   .trigger           = nrf52_spi_trigger,
@@ -234,7 +234,7 @@ static const struct spi_ops_s g_spi1ops =
 #ifdef CONFIG_SPI_CALLBACK
   .registercallback  = nrf52_spi1register,  /* Provided externally */
 #else
-  .registercallback  = 0,                   /* Not implemented */
+  .registercallback  = NULL,                /* Not implemented */
 #endif
 };
 
@@ -278,8 +278,8 @@ static const struct spi_ops_s g_spi2ops =
 #  ifdef CONFIG_SPI_EXCHANGE
   .exchange          = nrf52_spi_exchange,
 #  else
-  .sendlock          = nrf52_spi_sendblock,
-  .recvblock         = nrf52_spi_recvblock
+  .sndlock           = nrf52_spi_sndblock,
+  .recvblock         = nrf52_spi_recvblock,
 #  endif
 #ifdef CONFIG_SPI_TRIGGER
   .trigger           = nrf52_spi_trigger,
@@ -287,7 +287,7 @@ static const struct spi_ops_s g_spi2ops =
 #ifdef CONFIG_SPI_CALLBACK
   .registercallback  = nrf52_spi2register,  /* Provided externally */
 #else
-  .registercallback  = 0,                   /* Not implemented */
+  .registercallback  = NULL,                /* Not implemented */
 #endif
 };
 
@@ -331,8 +331,8 @@ static const struct spi_ops_s g_spi3ops =
 #  ifdef CONFIG_SPI_EXCHANGE
   .exchange          = nrf52_spi_exchange,
 #  else
-  .sendlock          = nrf52_spi_sendblock,
-  .recvblock         = nrf52_spi_recvblock
+  .sndlock           = nrf52_spi_sndblock,
+  .recvblock         = nrf52_spi_recvblock,
 #  endif
 #ifdef CONFIG_SPI_TRIGGER
   .trigger           = nrf52_spi_trigger,
@@ -340,7 +340,7 @@ static const struct spi_ops_s g_spi3ops =
 #ifdef CONFIG_SPI_CALLBACK
   .registercallback  = nrf52_spi3register,  /* Provided externally */
 #else
-  .registercallback  = 0,                   /* Not implemented */
+  .registercallback  = NULL,                /* Not implemented */
 #endif
 };
 
@@ -1057,7 +1057,7 @@ static void nrf52_spi_recvblock(FAR struct spi_dev_s *dev,
                                 size_t nwords)
 {
   spiinfo("txbuffer=%p nwords=%d\n", txbuffer, nwords);
-  return nrf52_spi_exchange(dev, txbuffer, NULL, nwords);
+  return nrf52_spi_exchange(dev, rxbuffer, NULL, nwords);
 }
 #endif /* CONFIG_SPI_EXCHANGE */