Updated #if #elif structure.

Update #if #elif structure to avoid nested #ifdef's
This commit is contained in:
howard-wa9axq 2020-11-28 18:22:48 -06:00 committed by GitHub
parent 02b702fc41
commit b8e11f14f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -113,17 +113,16 @@ 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);
#else
#ifdef STM32
#elif defined(STM32)
for (size_t i = 0; i < len; i++) {
_spi->transfer(buffer[i]);
}
#else
_spi->transfer(buffer, len);
#endif
#endif
return;
}