@@ -312,22 +312,6 @@ bool Adafruit_SPIDevice::write(uint8_t *buffer, size_t len,
312312 _spi->transferBytes (buffer, nullptr , len);
313313 }
314314 } else
315- #elif defined(ARDUINO_ARCH_SAMD) && defined(_ADAFRUIT_ZERODMA_H_)
316- // The variant of transfer() used below currently only exists in the Adafruit
317- // core. It causes a build failure when building against the main Arduino SAMD
318- // core. Unfortunately there doesn't seem to be a supported #define that this
319- // code can use to tell which core it's building against. This hack (checking
320- // for the include guard that gets defined when the Adafruit core's SPI.h
321- // includes Adafruit_ZeroDMA.h) works for now, but it should be improved when
322- // possible.
323- if (_spi) {
324- if (prefix_len > 0 ) {
325- _spi->transfer (prefix_buffer, nullptr , prefix_len);
326- }
327- if (len > 0 ) {
328- _spi->transfer (buffer, nullptr , len);
329- }
330- } else
331315#endif
332316 {
333317 for (size_t i = 0 ; i < prefix_len; i++) {
@@ -433,19 +417,6 @@ bool Adafruit_SPIDevice::write_then_read(uint8_t *write_buffer,
433417 _spi->transferBytes (write_buffer, nullptr , write_len);
434418 }
435419 } else
436- #elif defined(ARDUINO_ARCH_SAMD) && defined(_ADAFRUIT_ZERODMA_H_)
437- // The variant of transfer() used below currently only exists in the Adafruit
438- // core. It causes a build failure when building against the main Arduino SAMD
439- // core. Unfortunately there doesn't seem to be a supported #define that this
440- // code can use to tell which core it's building against. This hack (checking
441- // for the include guard that gets defined when the Adafruit core's SPI.h
442- // includes Adafruit_ZeroDMA.h) works for now, but it should be improved when
443- // possible.
444- if (_spi) {
445- if (write_len > 0 ) {
446- _spi->transfer (write_buffer, nullptr , write_len);
447- }
448- } else
449420#endif
450421 {
451422 for (size_t i = 0 ; i < write_len; i++) {
0 commit comments