Skip to content

Commit a721430

Browse files
committed
Use spi_transfer instead of spi_send
To be inline with https://www.arduino.cc/en/Reference/SPITransfer "In case of buffer transfers the received data is stored in the buffer in-place (the old data is replaced with the data received)." Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 1e9f4fa commit a721430

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/SPI/SPI.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ void SPIClass::transfer(uint8_t _pin, void *_buf, size_t _count, SPITransferMode
234234
if((_pin != BOARD_SPI_OWN_SS) && (_spi.pin_ssel == NC))
235235
digitalWrite(_pin, LOW);
236236

237-
spi_send(&_spi,(uint8_t *)_buf, _count,10000);
237+
spi_transfer(&_spi, ((uint8_t*)_buf), ((uint8_t*)_buf), _count, 10000);
238238

239239
if((_pin != BOARD_SPI_OWN_SS) && (_mode == SPI_LAST) && (_spi.pin_ssel == NC))
240240
digitalWrite(_pin, HIGH);

0 commit comments

Comments
 (0)