diff --git a/libraries/SPI/src/SPI.cpp b/libraries/SPI/src/SPI.cpp index 863c43adb67..7891c4164b1 100644 --- a/libraries/SPI/src/SPI.cpp +++ b/libraries/SPI/src/SPI.cpp @@ -214,6 +214,11 @@ void SPIClass::writeBytes(uint8_t * data, uint32_t size) spiEndTransaction(_spi); } +void SPIClass::transfer(uint8_t * data, uint32_t size) +{ + transferBytes(data, data, size); +} + /** * @param data void * * @param size uint32_t diff --git a/libraries/SPI/src/SPI.h b/libraries/SPI/src/SPI.h index 783a0a394ca..6007cce8f2d 100644 --- a/libraries/SPI/src/SPI.h +++ b/libraries/SPI/src/SPI.h @@ -65,10 +65,11 @@ class SPIClass void beginTransaction(SPISettings settings); void endTransaction(void); - + void transfer(uint8_t * data, uint32_t size); uint8_t transfer(uint8_t data); uint16_t transfer16(uint16_t data); uint32_t transfer32(uint32_t data); + void transferBytes(uint8_t * data, uint8_t * out, uint32_t size); void transferBits(uint32_t data, uint32_t * out, uint8_t bits);