From b8e11f14f167367025d8ee20010ee6e70533f50c Mon Sep 17 00:00:00 2001 From: howard-wa9axq <75182246+howard-wa9axq@users.noreply.github.com> Date: Sat, 28 Nov 2020 18:22:48 -0600 Subject: [PATCH] Updated #if #elif structure. Update #if #elif structure to avoid nested #ifdef's --- Adafruit_SPIDevice.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Adafruit_SPIDevice.cpp b/Adafruit_SPIDevice.cpp index 5f42145..cc2c58c 100644 --- a/Adafruit_SPIDevice.cpp +++ b/Adafruit_SPIDevice.cpp @@ -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; }