Merge pull request #39 from howard-wa9axq/Adafruit-spidevice-fix

Update Adafruit_SPIDevice.cpp
This commit is contained in:
Limor "Ladyada" Fried 2020-11-28 21:23:02 -05:00 committed by GitHub
commit 4f444c180c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -113,12 +113,15 @@ void Adafruit_SPIDevice::transfer(uint8_t *buffer, size_t len) {
if (_spi) {
// hardware SPI is easy
#ifdef SPARK
#if defined(SPARK)
_spi->transfer(buffer, buffer, len, NULL);
#elif defined(STM32)
for (size_t i = 0; i < len; i++) {
_spi->transfer(buffer[i]);
}
#else
_spi->transfer(buffer, len);
#endif
return;
}