From 0f9fb67b0c27df3672acf049af2ebae0601d1bae Mon Sep 17 00:00:00 2001 From: Matias N Date: Wed, 23 Sep 2020 13:36:17 -0300 Subject: [PATCH] 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 20b77c8d43..c4b707d176 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 */