Update Adafruit_SPIDevice.cpp

Changing #ifdef construct to make STM32 a special case.
This commit is contained in:
howard-wa9axq 2020-11-28 16:43:05 -06:00 committed by GitHub
parent 40ccbb3739
commit 02b702fc41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -115,12 +115,14 @@ void Adafruit_SPIDevice::transfer(uint8_t *buffer, size_t len) {
#ifdef SPARK #ifdef SPARK
_spi->transfer(buffer, buffer, len, NULL); _spi->transfer(buffer, buffer, len, NULL);
#elsif STM32 #else
#ifdef STM32
for (size_t i = 0; i < len; i++) { for (size_t i = 0; i < len; i++) {
_spi->transfer(buffer[i]); _spi->transfer(buffer[i]);
} }
#else #else
_spi->transfer(buffer, len); _spi->transfer(buffer, len);
#endif
#endif #endif
return; return;