nRF52 SPI: fix for RX transfers when !SPI_EXCHANGE

This commit is contained in:
Matias N
2021-01-30 17:29:01 -03:00
committed by Brennan Ashton
parent e9a45ea183
commit 27ac9a6948
+3 -3
View File
@@ -1223,7 +1223,7 @@ static void nrf52_spi_sndblock(FAR struct spi_dev_s *dev,
FAR const void *txbuffer, FAR const void *txbuffer,
size_t nwords) size_t nwords)
{ {
spiinfo("txbuffer=%p nwords=%d\n", txbuffer, nwords); spiinfo("txbuffer=%p nwords=%zu\n", txbuffer, nwords);
return nrf52_spi_exchange(dev, txbuffer, NULL, nwords); return nrf52_spi_exchange(dev, txbuffer, NULL, nwords);
} }
@@ -1249,8 +1249,8 @@ static void nrf52_spi_recvblock(FAR struct spi_dev_s *dev,
FAR void *rxbuffer, FAR void *rxbuffer,
size_t nwords) size_t nwords)
{ {
spiinfo("txbuffer=%p nwords=%d\n", txbuffer, nwords); spiinfo("txbuffer=%p nwords=%zu\n", rxbuffer, nwords);
return nrf52_spi_exchange(dev, rxbuffer, NULL, nwords); return nrf52_spi_exchange(dev, NULL, rxbuffer, nwords);
} }
#endif /* CONFIG_SPI_EXCHANGE */ #endif /* CONFIG_SPI_EXCHANGE */